smbls 3.14.792 → 3.14.793

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/smbls.cjs CHANGED
@@ -1,59 +1,59 @@
1
- "use strict";var $C=Object.create;var pc=Object.defineProperty;var LC=Object.getOwnPropertyDescriptor;var MC=Object.getOwnPropertyNames;var FC=Object.getPrototypeOf,NC=Object.prototype.hasOwnProperty;var F=(t,e)=>()=>(t&&(e=t(t=0)),e);var Xu=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),P=(t,e)=>{for(var r in e)pc(t,r,{get:e[r],enumerable:!0})},Mb=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of MC(e))!NC.call(t,n)&&n!==r&&pc(t,n,{get:()=>e[n],enumerable:!(o=LC(e,n))||o.enumerable});return t};var jC=(t,e,r)=>(r=t!=null?$C(FC(t)):{},Mb(e||!t||!t.__esModule?pc(r,"default",{value:t,enumerable:!0}):r,t)),BC=t=>Mb(pc({},"__esModule",{value:!0}),t);var gd,md,v,Q,xs=F(()=>{"use strict";gd=globalThis,md=globalThis,v=globalThis,Q=v.document});var Qe,ws,Ht,Ss=F(()=>{"use strict";xs();Qe=t=>(typeof Node=="object"?t instanceof v.Node:t&&typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.nodeName=="string")||!1,ws=t=>(typeof HTMLElement=="object"?t instanceof v.HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string")||!1,Ht=t=>typeof v<"u"&&(v.Node&&t instanceof v.Node||v.Window&&t instanceof v.Window||t===v||Q!==void 0&&t===Q)});var S,w,Fe,A,Cc,Ec,T,Ac,z,bt,Tt,ks,Wt,yd,Ot=F(()=>{"use strict";Ss();S=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,w=t=>typeof t=="string",Fe=t=>typeof t=="number",A=t=>typeof t=="function",Cc=t=>t===!0||t===!1,Ec=t=>t===null,T=t=>Array.isArray(t),Ac=t=>t instanceof Date,z=t=>t===null?!1:typeof t=="object",bt=t=>t!==void 0,Tt=t=>t===void 0,ks={boolean:Cc,array:T,object:S,string:w,date:Ac,number:Fe,null:Ec,function:A,objectLike:z,node:Qe,htmlElement:ws,defined:bt},Wt=t=>(...e)=>e.some(r=>ks[r](t)),yd=t=>(...e)=>!e.some(r=>ks[r](t))});var bd,_d,xd,wd,Vo,vs,Sd,kd,Cs,vd,Cd,Ed,Ad,Td,Od,Rd,zo,Es,Ho=F(()=>{"use strict";tr();Ot();bd=(t,e)=>e.every(r=>t.includes(r)),_d=(t,e)=>{let r=0;for(let o=0;o<t.length;o++)t[o]===e&&r++;return r},xd=(t,e)=>{if(w(e)&&(e=parseInt(e)),Fe(e)){if(e<0||e>=t.length||isNaN(e))throw new Error("Invalid index");t.splice(e,1)}else throw new Error("Invalid index");return t},wd=(t,e,r)=>{e<0||r<0||e>=t.length||r>=t.length||([t[e],t[r]]=[t[r],t[e]])},Vo=(...t)=>[].concat(...t),vs=(t,e=[])=>t.reduce((r,o)=>st(r,ft(o,{exclude:e}),e),{}),Sd=(t,e)=>{let r=t.indexOf(e);return r!==-1?t.slice(0,r):t},kd=(t,e)=>{if(!T(t))return;let r=t.indexOf(e);return r!==-1?t.slice(r+1):t},Cs=(t,e)=>{let r=t.indexOf(e);if(r>-1){let o=[...t];return o.splice(r,1),o}return t},vd=(t,e)=>t.filter(r=>r!==e),Cd=(t,e)=>{let r=[];for(let o=0;o<t.length;o++)r.push(t[o]),o<t.length-1&&r.push(e);return r},Ed=(t,e,r)=>{let o=[...t],n=o.indexOf(e),s=o.indexOf(r);if(n!==-1&&s!==-1){let i=o.splice(n,1)[0],a=s<n?s:s+1;o.splice(a,0,i)}return o},Ad=(t,e)=>{if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0},Td=(t,e)=>t.filter(r=>!e.includes(r)),Od=(t,e)=>{let r=new Set(e);return t.filter(o=>!r.has(o))},Rd=(t,e)=>{if(!t)return 0;let r=0;for(let o=0;o<e.length;o++)t.includes(e[o])&&r++;return r},zo=t=>T(t)?[...new Set(t)]:t,Es=(t,e)=>{for(let r in e)Object.defineProperty(t,r,{value:e[r],enumerable:!1,configurable:!0,writable:!0})}});function to(t,e,r={}){let{bracketsLength:o=2}=r,n=o===3?"{{{":"{{";if(!t.includes(n))return t;let s=oE[o],i=e||this.state||{},a=this;return t.replace(s,(c,l,f,u)=>{let d=f.trim();if(u){let h=a?.context,g=h?.functions?.[u]||h?.utils?.[u]||h?.methods?.[u]||h?.snippets?.[u]||a?.[u];if(g&&typeof g=="function")try{return String(g.call(a,d)??"")}catch{return""}return""}if(l){let h=(l.match(/\.\.\//g)||[]).length,g=i;for(let m=0;m<h;m++){if(!g||!g.parent)return"";g=g.parent}if(d==="parent")return String(g.value??"");let p=As(g,d);return p!=null&&typeof p=="object"?"":String(p??"")}else{let h=As(i,d);if(h!=null&&typeof h!="object")return String(h);let g=a?.context?.polyglot;if(g?.translations){let p=i?.root?.lang||i?.lang||a?.context?.state?.lang||g.defaultLang||"en",m=g.translations[p];if(m){let _=As(m,d);if(_!=null&&typeof _!="object")return String(_);for(let y in m){let x=m[y];if(x&&typeof x=="object"&&!Array.isArray(x)){let k=As(x,d);if(k!=null&&typeof k!="object")return String(k)}}}let b=As(g.translations,d);if(b!=null&&typeof b!="object")return String(b)}return""}})}var Ts,Pd,oE,As,eo,Id,nE,Dd,$d,Ld,sE,Md,Fd,Os=F(()=>{"use strict";Ts=(t,e)=>{for(let r of e)if(t.includes(r))return!0;return!1},Pd=(t,e)=>{let r=new RegExp(`[${e.join("\\")}]`,"g");return t.replace(r,"")},oE={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},As=(t,e)=>e.split(".").reduce((r,o)=>r?.[o],t);eo=t=>`${t.charAt(0).toLowerCase()}${t.slice(1)}`,Id=(t,e)=>{let r=t.split(`
2
- `),o=-1,n=-1,s=-1,i=-1,a=new RegExp(`\\b${e}\\b\\s*:\\s*`),c=0,l=!1;for(let f=0;f<r.length;f++)if(a.test(r[f])&&!l){if(l=!0,o=f+1,s=r[f].indexOf(e)+1,r[f].includes("{}")){n=o,i=r[f].indexOf("{}")+3;break}let u=r[f].slice(s+e.length);if(u.includes("{")||u.includes("["))c=1;else{n=f+1,i=r[f].length+1;break}}else if(l&&(c+=(r[f].match(/{/g)||[]).length,c+=(r[f].match(/\[/g)||[]).length,c-=(r[f].match(/}/g)||[]).length,c-=(r[f].match(/]/g)||[]).length,c===0)){n=f+1,i=r[f].lastIndexOf("}")!==-1?r[f].lastIndexOf("}")+2:r[f].length+1;break}return{startColumn:s,endColumn:i,startLineNumber:o,endLineNumber:n}},nE=/\\([0-7]{1,3})/g,Dd=t=>t.replace(nE,(e,r)=>String.fromCharCode(parseInt(r,8))),$d=t=>t.replace(/\n/g,"/////n").replace(/`/g,"/////tilde").replace(/\$/g,"/////dlrsgn"),Ld=t=>t.replace(/\/\/\/\/\/n/g,`
3
- `).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),sE=/[^a-zA-Z0-9\s]/g,Md=t=>t.replace(sE,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),Fd=t=>t.replace(/%[0-9A-Fa-f]{2}/g,e=>String.fromCharCode(parseInt(e.slice(1),16)))});var _r,Rs,Nd,ro,xr,Wo,Ps,jd,qo=F(()=>{"use strict";_r=new Set(["attr","style","text","html","content","data","classlist","state","scope","root","deps","extend","extends","$router","routes","children","childExtend","childExtends","childExtendRecursive","childExtendsRecursive","props","if","define","__name","__ref","__hash","__text","key","tag","query","parent","node","variables","on","fetch","component","context","preventContentUpdate","preventContentRecreate"]),Rs=new Set(["attr","style","text","html","content","data","class","state","scope","children","props","if","key","tag","query","on","context"]),Nd=["ref","parent","__element","__depends","__ref","__children","root"],ro=new Set(["update","parse","clean","create","destroy","add","toggle","remove","apply","set","reset","replace","quietReplace","quietUpdate","applyReplace","applyFunction","keys","values","ref","rootUpdate","parentUpdate","parent","__element","__depends","__ref","__children","root","setByPath","setPathCollection","removeByPath","removePathCollection","getByPath"]),xr=new Set(["update","__element"]),Wo=new Set(["set","reset","update","remove","updateContent","removeContent","lookup","lookdown","lookdownAll","getRef","getPath","setNodeStyles","spotByPath","keys","parse","setProps","parseDeep","variables","if","log","verbose","warn","error","call","nextElement","previousElement","getRootState","getRoot","getRootData","getRootContext","getContext","getQuery","getDB","getChildren","preventContentUpdate","preventContentRecreate"]),Ps=new Set(["node","context","extends","__element","__ref",...Wo,...ro,...xr]),jd=new Set(["init","beforeClassAssign","render","renderRouter","attachNode","stateInit","stateCreated","beforeStateUpdate","stateUpdate","beforeUpdate","done","create","complete","frame","update","fetchError","fetchComplete"])});var Yb,oo,ut,Bd,gt,st,Qb,Ud,ft,Ds,iE,$s,aE,cE,lE,Ne,fE,uE,Xb,le,t_,e_,r_,o_,n_,Jb,Is,Zb,Ls,Vd,zd,Tc,Hd,Wd,Ms,no,qt,Oc,dE,qd,Kd,Rc,Gd,Yd,Xd,Jd,Zd,Qd,tp,tr=F(()=>{"use strict";xs();Ot();Ho();Os();Ss();qo();Yb="production",oo=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,ut=(t,e,r,o)=>{if(A(t))return e?typeof t.call!="function"?t:t.call(e,e,r||e.state,o||e.context):void 0;if(t!=null&&e?.context?.plugins&&(T(t)||S(t)&&!Ht(t))){let n=e.context.plugins;for(let s of n)if(s.resolveHandler){let i=s.resolveHandler(t,e);if(typeof i=="function")return ut(i,e,r,o)}}return t},Bd=(t,e,r)=>{for(let o in e)t[o]=ut(e[o],r)},gt=(t,e,r=[])=>{let o=r instanceof Set;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(oo(n)||(o?r.has(n):r.includes(n))||t[n]===void 0&&(t[n]=e[n]));return t},st=(t,e,r=Ps)=>Qb(t,e,r,null),Qb=(t,e,r,o)=>{if(t===e)return t;if(o){for(let s=0;s<o.length;s+=2)if(o[s]===t&&o[s+1]===e)return t}let n=r instanceof Set;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||oo(s)||s==="constructor"||s==="prototype"||(n?r.has(s):r.includes(s)))continue;let i=t[s],a=e[s];if(z(i)&&z(a)){let c=o||[];c.push(t,e),Qb(i,a,r,c),c.length-=2}else i===void 0&&(t[s]=a)}return t},Ud=(t,e=[])=>{let r=e instanceof Set,o={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(oo(n)||(r?e.has(n):e.includes(n))||(o[n]=t[n]));return o},ft=(t,e={})=>{let{exclude:r=[],cleanUndefined:o=!1,cleanNull:n=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!z(t)||Ht(t))return t;if(s.has(t))return s.get(t);let a=r instanceof Set?r:r.length>3?new Set(r):null,c=u=>a?a.has(u):r.includes(u),l=T(t)?[]:{};s.set(t,l);let f=[[t,l]];for(;f.length;){let[u,d]=f.pop();for(let h in u){if(!Object.prototype.hasOwnProperty.call(u,h)||oo(h)||h==="__proto__"||c(h))continue;let g=u[h];if(!(o&&g===void 0)&&!(n&&g===null)){if(Ht(g)){d[h]=g;continue}if(i&&h==="extends"&&T(g)){d[h]=vs(g,r);continue}if(A(g)){d[h]=g;continue}if(z(g))if(s.has(g))d[h]=s.get(g);else{let p=T(g)?[]:{};s.set(g,p),d[h]=p,f.push([g,p])}else d[h]=g}}}return l},Ds=(t,e={})=>{(t.node||t.__ref||t.parent||t.__element||t.parse)&&((t.__element||t.parent?.__element).warn("Trying to clone element or state at",t),t=t.parse?.());for(let r in t){let o=t[r];if(A(o))e[r]=o.toString();else if(S(o))e[r]={},Ds(o,e[r]);else if(T(o)){let n=e[r]=[];for(let s=0;s<o.length;s++){let i=o[s];S(i)?(n[s]={},Ds(i,n[s])):A(i)?n[s]=i.toString():n[s]=i}}else e[r]=o}return e},iE=new Set(["&","*","-",":","%","{","}",">","<","@",".","/","!"," "]),$s=(t={},e=0)=>{if(t===null||typeof t!="object"||t instanceof RegExp)return String(t);let r=!1;for(let s in t){r=!0;break}if(!r)return"{}";let o=" ".repeat(e),n=`{
4
- `;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=t[s],a=!1;for(let l=0;l<s.length;l++)if(iE.has(s[l])){a=!0;break}let c=a?`'${s}'`:s;if(n+=`${o} ${c}: `,i instanceof RegExp)n+=String(i);else if(T(i)){n+=`[
1
+ "use strict";var FC=Object.create;var hc=Object.defineProperty;var NC=Object.getOwnPropertyDescriptor;var jC=Object.getOwnPropertyNames;var BC=Object.getPrototypeOf,UC=Object.prototype.hasOwnProperty;var F=(t,e)=>()=>(t&&(e=t(t=0)),e);var Zu=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),P=(t,e)=>{for(var r in e)hc(t,r,{get:e[r],enumerable:!0})},jb=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of jC(e))!UC.call(t,n)&&n!==r&&hc(t,n,{get:()=>e[n],enumerable:!(o=NC(e,n))||o.enumerable});return t};var VC=(t,e,r)=>(r=t!=null?FC(BC(t)):{},jb(e||!t||!t.__esModule?hc(r,"default",{value:t,enumerable:!0}):r,t)),HC=t=>jb(hc({},"__esModule",{value:!0}),t);var yd,bd,v,Q,ws=F(()=>{"use strict";yd=globalThis,bd=globalThis,v=globalThis,Q=v.document});var Qe,Ss,zt,ks=F(()=>{"use strict";ws();Qe=t=>(typeof Node=="object"?t instanceof v.Node:t&&typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.nodeName=="string")||!1,Ss=t=>(typeof HTMLElement=="object"?t instanceof v.HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string")||!1,zt=t=>typeof v<"u"&&(v.Node&&t instanceof v.Node||v.Window&&t instanceof v.Window||t===v||Q!==void 0&&t===Q)});var S,w,Fe,A,Ec,Ac,T,Tc,H,bt,Tt,vs,Wt,_d,Ot=F(()=>{"use strict";ks();S=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,w=t=>typeof t=="string",Fe=t=>typeof t=="number",A=t=>typeof t=="function",Ec=t=>t===!0||t===!1,Ac=t=>t===null,T=t=>Array.isArray(t),Tc=t=>t instanceof Date,H=t=>t===null?!1:typeof t=="object",bt=t=>t!==void 0,Tt=t=>t===void 0,vs={boolean:Ec,array:T,object:S,string:w,date:Tc,number:Fe,null:Ac,function:A,objectLike:H,node:Qe,htmlElement:Ss,defined:bt},Wt=t=>(...e)=>e.some(r=>vs[r](t)),_d=t=>(...e)=>!e.some(r=>vs[r](t))});var xd,wd,Sd,kd,Ho,Cs,vd,Cd,Es,Ed,Ad,Td,Od,Rd,Pd,Id,zo,As,Wo=F(()=>{"use strict";tr();Ot();xd=(t,e)=>e.every(r=>t.includes(r)),wd=(t,e)=>{let r=0;for(let o=0;o<t.length;o++)t[o]===e&&r++;return r},Sd=(t,e)=>{if(w(e)&&(e=parseInt(e)),Fe(e)){if(e<0||e>=t.length||isNaN(e))throw new Error("Invalid index");t.splice(e,1)}else throw new Error("Invalid index");return t},kd=(t,e,r)=>{e<0||r<0||e>=t.length||r>=t.length||([t[e],t[r]]=[t[r],t[e]])},Ho=(...t)=>[].concat(...t),Cs=(t,e=[])=>t.reduce((r,o)=>st(r,ft(o,{exclude:e}),e),{}),vd=(t,e)=>{let r=t.indexOf(e);return r!==-1?t.slice(0,r):t},Cd=(t,e)=>{if(!T(t))return;let r=t.indexOf(e);return r!==-1?t.slice(r+1):t},Es=(t,e)=>{let r=t.indexOf(e);if(r>-1){let o=[...t];return o.splice(r,1),o}return t},Ed=(t,e)=>t.filter(r=>r!==e),Ad=(t,e)=>{let r=[];for(let o=0;o<t.length;o++)r.push(t[o]),o<t.length-1&&r.push(e);return r},Td=(t,e,r)=>{let o=[...t],n=o.indexOf(e),s=o.indexOf(r);if(n!==-1&&s!==-1){let i=o.splice(n,1)[0],a=s<n?s:s+1;o.splice(a,0,i)}return o},Od=(t,e)=>{if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0},Rd=(t,e)=>t.filter(r=>!e.includes(r)),Pd=(t,e)=>{let r=new Set(e);return t.filter(o=>!r.has(o))},Id=(t,e)=>{if(!t)return 0;let r=0;for(let o=0;o<e.length;o++)t.includes(e[o])&&r++;return r},zo=t=>T(t)?[...new Set(t)]:t,As=(t,e)=>{for(let r in e)Object.defineProperty(t,r,{value:e[r],enumerable:!1,configurable:!0,writable:!0})}});function to(t,e,r={}){let{bracketsLength:o=2}=r,n=o===3?"{{{":"{{";if(!t.includes(n))return t;let s=iE[o],i=e||this.state||{},a=this;return t.replace(s,(c,l,f,u)=>{let d=f.trim();if(u){let h=a?.context,g=h?.functions?.[u]||h?.utils?.[u]||h?.methods?.[u]||h?.snippets?.[u]||a?.[u];if(g&&typeof g=="function")try{return String(g.call(a,d)??"")}catch{return""}return""}if(l){let h=(l.match(/\.\.\//g)||[]).length,g=i;for(let m=0;m<h;m++){if(!g||!g.parent)return"";g=g.parent}if(d==="parent")return String(g.value??"");let p=Ts(g,d);return p!=null&&typeof p=="object"?"":String(p??"")}else{let h=Ts(i,d);if(h!=null&&typeof h!="object")return String(h);let g=a?.context?.polyglot;if(g?.translations){let p=i?.root?.lang||i?.lang||a?.context?.state?.lang||g.defaultLang||"en",m=g.translations[p];if(m){let _=Ts(m,d);if(_!=null&&typeof _!="object")return String(_);for(let y in m){let x=m[y];if(x&&typeof x=="object"&&!Array.isArray(x)){let k=Ts(x,d);if(k!=null&&typeof k!="object")return String(k)}}}let b=Ts(g.translations,d);if(b!=null&&typeof b!="object")return String(b)}return""}})}var Os,Dd,iE,Ts,eo,$d,aE,Ld,Md,Fd,cE,Nd,jd,Rs=F(()=>{"use strict";Os=(t,e)=>{for(let r of e)if(t.includes(r))return!0;return!1},Dd=(t,e)=>{let r=new RegExp(`[${e.join("\\")}]`,"g");return t.replace(r,"")},iE={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},Ts=(t,e)=>e.split(".").reduce((r,o)=>r?.[o],t);eo=t=>`${t.charAt(0).toLowerCase()}${t.slice(1)}`,$d=(t,e)=>{let r=t.split(`
2
+ `),o=-1,n=-1,s=-1,i=-1,a=new RegExp(`\\b${e}\\b\\s*:\\s*`),c=0,l=!1;for(let f=0;f<r.length;f++)if(a.test(r[f])&&!l){if(l=!0,o=f+1,s=r[f].indexOf(e)+1,r[f].includes("{}")){n=o,i=r[f].indexOf("{}")+3;break}let u=r[f].slice(s+e.length);if(u.includes("{")||u.includes("["))c=1;else{n=f+1,i=r[f].length+1;break}}else if(l&&(c+=(r[f].match(/{/g)||[]).length,c+=(r[f].match(/\[/g)||[]).length,c-=(r[f].match(/}/g)||[]).length,c-=(r[f].match(/]/g)||[]).length,c===0)){n=f+1,i=r[f].lastIndexOf("}")!==-1?r[f].lastIndexOf("}")+2:r[f].length+1;break}return{startColumn:s,endColumn:i,startLineNumber:o,endLineNumber:n}},aE=/\\([0-7]{1,3})/g,Ld=t=>t.replace(aE,(e,r)=>String.fromCharCode(parseInt(r,8))),Md=t=>t.replace(/\n/g,"/////n").replace(/`/g,"/////tilde").replace(/\$/g,"/////dlrsgn"),Fd=t=>t.replace(/\/\/\/\/\/n/g,`
3
+ `).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),cE=/[^a-zA-Z0-9\s]/g,Nd=t=>t.replace(cE,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),jd=t=>t.replace(/%[0-9A-Fa-f]{2}/g,e=>String.fromCharCode(parseInt(e.slice(1),16)))});var _r,Ps,Bd,ro,xr,qo,Is,Ud,Ko=F(()=>{"use strict";_r=new Set(["attr","style","text","html","content","data","classlist","state","scope","root","deps","extend","extends","$router","routes","children","childExtend","childExtends","childExtendRecursive","childExtendsRecursive","props","if","define","__name","__ref","__hash","__text","key","tag","query","parent","node","variables","on","fetch","component","context","preventContentUpdate","preventContentRecreate"]),Ps=new Set(["attr","style","text","html","content","data","class","state","scope","children","props","if","key","tag","query","on","context"]),Bd=["ref","parent","__element","__depends","__ref","__children","root"],ro=new Set(["update","parse","clean","create","destroy","add","toggle","remove","apply","set","reset","replace","quietReplace","quietUpdate","applyReplace","applyFunction","keys","values","ref","rootUpdate","parentUpdate","parent","__element","__depends","__ref","__children","root","setByPath","setPathCollection","removeByPath","removePathCollection","getByPath"]),xr=new Set(["update","__element"]),qo=new Set(["set","reset","update","remove","updateContent","removeContent","lookup","lookdown","lookdownAll","getRef","getPath","setNodeStyles","spotByPath","keys","parse","setProps","parseDeep","variables","if","log","verbose","warn","error","call","nextElement","previousElement","getRootState","getRoot","getRootData","getRootContext","getContext","getQuery","getDB","getChildren","preventContentUpdate","preventContentRecreate"]),Is=new Set(["node","context","extends","__element","__ref",...qo,...ro,...xr]),Ud=new Set(["init","beforeClassAssign","render","renderRouter","attachNode","stateInit","stateCreated","beforeStateUpdate","stateUpdate","beforeUpdate","done","create","complete","frame","update","fetchError","fetchComplete"])});var Zb,oo,ut,Vd,gt,st,r_,Hd,ft,$s,lE,Ls,fE,uE,dE,Ne,pE,hE,Qb,le,o_,n_,s_,i_,a_,t_,Ds,e_,Ms,zd,Wd,Oc,qd,Kd,Fs,no,qt,Rc,gE,Gd,Yd,Pc,Xd,Jd,Zd,Qd,tp,ep,rp,tr=F(()=>{"use strict";ws();Ot();Wo();Rs();ks();Ko();Zb="production",oo=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,ut=(t,e,r,o)=>{if(A(t))return e?typeof t.call!="function"?t:t.call(e,e,r||e.state,o||e.context):void 0;if(t!=null&&e?.context?.plugins&&(T(t)||S(t)&&!zt(t))){let n=e.context.plugins;for(let s of n)if(s.resolveHandler){let i=s.resolveHandler(t,e);if(typeof i=="function")return ut(i,e,r,o)}}return t},Vd=(t,e,r)=>{for(let o in e)t[o]=ut(e[o],r)},gt=(t,e,r=[])=>{let o=r instanceof Set;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(oo(n)||(o?r.has(n):r.includes(n))||t[n]===void 0&&(t[n]=e[n]));return t},st=(t,e,r=Is)=>r_(t,e,r,null),r_=(t,e,r,o)=>{if(t===e)return t;if(o){for(let s=0;s<o.length;s+=2)if(o[s]===t&&o[s+1]===e)return t}let n=r instanceof Set;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||oo(s)||s==="constructor"||s==="prototype"||(n?r.has(s):r.includes(s)))continue;let i=t[s],a=e[s];if(H(i)&&H(a)){let c=o||[];c.push(t,e),r_(i,a,r,c),c.length-=2}else i===void 0&&(t[s]=a)}return t},Hd=(t,e=[])=>{let r=e instanceof Set,o={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(oo(n)||(r?e.has(n):e.includes(n))||(o[n]=t[n]));return o},ft=(t,e={})=>{let{exclude:r=[],cleanUndefined:o=!1,cleanNull:n=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!H(t)||zt(t))return t;if(s.has(t))return s.get(t);let a=r instanceof Set?r:r.length>3?new Set(r):null,c=u=>a?a.has(u):r.includes(u),l=T(t)?[]:{};s.set(t,l);let f=[[t,l]];for(;f.length;){let[u,d]=f.pop();for(let h in u){if(!Object.prototype.hasOwnProperty.call(u,h)||oo(h)||h==="__proto__"||c(h))continue;let g=u[h];if(!(o&&g===void 0)&&!(n&&g===null)){if(zt(g)){d[h]=g;continue}if(i&&h==="extends"&&T(g)){d[h]=Cs(g,r);continue}if(A(g)){d[h]=g;continue}if(H(g))if(s.has(g))d[h]=s.get(g);else{let p=T(g)?[]:{};s.set(g,p),d[h]=p,f.push([g,p])}else d[h]=g}}}return l},$s=(t,e={})=>{(t.node||t.__ref||t.parent||t.__element||t.parse)&&((t.__element||t.parent?.__element).warn("Trying to clone element or state at",t),t=t.parse?.());for(let r in t){let o=t[r];if(A(o))e[r]=o.toString();else if(S(o))e[r]={},$s(o,e[r]);else if(T(o)){let n=e[r]=[];for(let s=0;s<o.length;s++){let i=o[s];S(i)?(n[s]={},$s(i,n[s])):A(i)?n[s]=i.toString():n[s]=i}}else e[r]=o}return e},lE=new Set(["&","*","-",":","%","{","}",">","<","@",".","/","!"," "]),Ls=(t={},e=0)=>{if(t===null||typeof t!="object"||t instanceof RegExp)return String(t);let r=!1;for(let s in t){r=!0;break}if(!r)return"{}";let o=" ".repeat(e),n=`{
4
+ `;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=t[s],a=!1;for(let l=0;l<s.length;l++)if(lE.has(s[l])){a=!0;break}let c=a?`'${s}'`:s;if(n+=`${o} ${c}: `,i instanceof RegExp)n+=String(i);else if(T(i)){n+=`[
5
5
  `;for(let l of i)l instanceof RegExp?n+=`${o} ${String(l)},
6
- `:z(l)&&l!==null?n+=`${o} ${$s(l,e+2)},
6
+ `:H(l)&&l!==null?n+=`${o} ${Ls(l,e+2)},
7
7
  `:w(l)?n+=`${o} '${l}',
8
8
  `:n+=`${o} ${l},
9
- `;n+=`${o} ]`}else z(i)?n+=$s(i,e+1):w(i)?n+=Ts(i,[`
9
+ `;n+=`${o} ]`}else H(i)?n+=Ls(i,e+1):w(i)?n+=Os(i,[`
10
10
  `,"'"])?`\`${i}\``:`'${i}'`:n+=i;n+=`,
11
- `}return n+=`${o}}`,n},aE=[/^\(\s*\{[^}]*\}\s*\)\s*=>/,/^(\([^)]*\)|[^=]*)\s*=>/,/^function[\s(]/,/^async\s+/,/^\(\s*function/,/^[a-zA-Z_$][a-zA-Z0-9_$]*\s*=>/,/^(?:\*\s*)?[a-zA-Z_$][\w$]*\s*\((?:[^()]|\([^()]*\))*\)\s*\{[\s\S]*\}$/],cE=/^["[{]/,lE=/^(export|import)\s/,Ne=t=>{if(!t)return!1;let e=t.trim().replace(/\n\s*/g," ").trim();if(e===""||e==="{}"||e==="[]"||lE.test(e)||!aE.some(s=>s.test(e)))return!1;let o=e.charCodeAt(0),n=e.includes("=>");return!(o===123&&!n||o===91||cE.test(e)&&!n)},fE=t=>(0,eval)(t),uE=(t,e)=>{let r=/^(\s*(?:async\s+)?function\s*[\w$]*\s*\([^)]*\)\s*)\{/.exec(t);if(!r)return null;let o=r[0].length,n=[],s=o,i=1,a=null,c=t.length,l=new RegExp("^(?:const|let|var)\\s+"+e+"\\b");for(;s<c&&i>0;){let u=t[s];if(u==="/"&&t[s+1]==="/"){let d=t.indexOf(`
11
+ `}return n+=`${o}}`,n},fE=[/^\(\s*\{[^}]*\}\s*\)\s*=>/,/^(\([^)]*\)|[^=]*)\s*=>/,/^function[\s(]/,/^async\s+/,/^\(\s*function/,/^[a-zA-Z_$][a-zA-Z0-9_$]*\s*=>/,/^(?:\*\s*)?[a-zA-Z_$][\w$]*\s*\((?:[^()]|\([^()]*\))*\)\s*\{[\s\S]*\}$/],uE=/^["[{]/,dE=/^(export|import)\s/,Ne=t=>{if(!t)return!1;let e=t.trim().replace(/\n\s*/g," ").trim();if(e===""||e==="{}"||e==="[]"||dE.test(e)||!fE.some(s=>s.test(e)))return!1;let o=e.charCodeAt(0),n=e.includes("=>");return!(o===123&&!n||o===91||uE.test(e)&&!n)},pE=t=>(0,eval)(t),hE=(t,e)=>{let r=/^(\s*(?:async\s+)?function\s*[\w$]*\s*\([^)]*\)\s*)\{/.exec(t);if(!r)return null;let o=r[0].length,n=[],s=o,i=1,a=null,c=t.length,l=new RegExp("^(?:const|let|var)\\s+"+e+"\\b");for(;s<c&&i>0;){let u=t[s];if(u==="/"&&t[s+1]==="/"){let d=t.indexOf(`
12
12
  `,s);s=d===-1?c:d;continue}if(u==="/"&&t[s+1]==="*"){let d=t.indexOf("*/",s+2);s=d===-1?c:d+2;continue}if(u==='"'||u==="'"||u==="`"){let d=u;for(s++;s<c;){if(t[s]==="\\"){s+=2;continue}if(t[s]===d){s++;break}if(d==="`"&&t[s]==="$"&&t[s+1]==="{"){s+=2;let h=1;for(;s<c&&h>0;)t[s]==="{"?h++:t[s]==="}"&&h--,s++;continue}s++}continue}if(u==="{"){i++,s++;continue}if(u==="}"){i--,s++;continue}if(i===1&&l.test(t.slice(s))){let d=s,h=0,g=s;for(;g<c;){let p=t[g];if(p==='"'||p==="'"||p==="`"){let m=p;for(g++;g<c;){if(t[g]==="\\"){g+=2;continue}if(t[g]===m){g++;break}g++}continue}if(p==="("||p==="["||p==="{"){h++,g++;continue}if(p===")"||p==="]"||p==="}"){if(h===0)break;h--,g++;continue}if(h===0&&(p===";"||p===`
13
- `)){g++;break}g++}n.push([d,g]),s=g;continue}s++}if(!n.length)return null;let f=t;for(let u=n.length-1;u>=0;u--)f=f.slice(0,n[u][0])+f.slice(n[u][1]);return f},Xb=(t,e,r)=>{let o=String(t).trimStart();if(/^(export|import)\s/.test(o))return t;try{return r.window.eval(`(${t})`)}catch(n){let s=n&&n.message?n.message:String(n),i=/await is only valid in async/.test(s),a=/Identifier '([^']+)' has already been declared/.exec(s),c=null;if(i){let l=String(t).trim();if(/^function[\s(]/.test(l))try{c=r.window.eval("(async "+l+")")}catch{}}else if(a){let l=String(t),f=a[1];for(let u=0;u<5;u++){let d=uE(l,f);if(!d||d===l)break;l=d;try{c=r.window.eval("("+l+")");break}catch(h){let g=/Identifier '([^']+)' has already been declared/.exec(h&&h.message||String(h));if(!g||g[1]!==f)break}}}if(!c&&/Unexpected (token '\{'|identifier)/.test(s))try{let l=r.window.eval("({"+t+"})");if(l&&typeof l=="object"){let f=Object.keys(l);f.length===1&&typeof l[f[0]]=="function"&&(c=l[f[0]])}}catch{}return c||(typeof console<"u"&&console.warn&&console.warn(`[smbls] deepDestringifyFunctions: eval failed on ${e} \u2014 value will be left as a string. Reason: `+s+`.
14
- First 200 chars of source: `+String(t).slice(0,200)),t)}},le=(t,e={},r={window:{eval:fE}})=>{if(!t||typeof t!="object")return e;let o=[[t,e]];for(;o.length;){let[n,s]=o.pop();for(let i in n){if(!Object.prototype.hasOwnProperty.call(n,i))continue;let a=n[i];if(w(a))Ne(a)?s[i]=Xb(a,`"${i}"`,r):s[i]=a;else if(T(a)){let c=s[i]=[];for(let l=0;l<a.length;l++){let f=a[l];if(w(f))c.push(Ne(f)?Xb(f,`array index ${l} (prop "${i}")`,r):f);else if(S(f)){let u=Zb(f);if(u)c.push(u);else{let d={};c.push(d),o.push([f,d])}}else c.push(f)}}else if(S(a)){let c=Zb(a);if(c){s[i]=c;continue}let l=s[i]&&typeof s[i]=="object"&&!T(s[i])?s[i]:s[i]={};o.push([a,l])}else s[i]=a}}return e},t_="Set",e_="Map",r_="RegExp",o_="WeakMap",n_="WeakSet",Jb=t=>{let e=Object.keys(t);return e.length===1&&e[0]==="__type"},Is=(t,e)=>{if(!t||typeof t!="object")return t;let r=s=>Is(s,e||(e=new WeakMap));if(t.__type===t_&&T(t.values))return new Set(t.values.map(r));if(t.__type===e_&&T(t.entries))return new Map(t.entries.map(s=>T(s)?[r(s[0]),r(s[1])]:s));if(t.__type===o_&&Jb(t))return new WeakMap;if(t.__type===n_&&Jb(t))return new WeakSet;if(t.__type===r_&&w(t.source))try{return new RegExp(t.source,w(t.flags)?t.flags:"")}catch{return t}if(e||(e=new WeakMap),e.has(t))return e.get(t);let o=!1;if(T(t)){let s=new Array(t.length);e.set(t,s);for(let i=0;i<t.length;i++)s[i]=Is(t[i],e),s[i]!==t[i]&&(o=!0);return o||e.set(t,t),o?s:t}let n={};e.set(t,n);for(let s of Object.keys(t))n[s]=Is(t[s],e),n[s]!==t[s]&&(o=!0);return o||e.set(t,t),o?n:t},Zb=t=>{if(!t||typeof t!="object")return null;let e=t.__type;if(e!==r_&&e!==t_&&e!==e_&&e!==o_&&e!==n_)return null;let r=Is(t);return r===t?null:r},Ls=t=>{if(!t||typeof t!="object")return t;let e={},r=[];for(let i of Object.keys(t)){let a=t[i];w(a)&&Ne(a)?r.push([i,a]):e[i]=Is(a)}if(r.length===0)return e;let o=i=>/^[A-Za-z_$][\w$]*$/.test(i),n=r.filter(([i])=>o(i)),s=Object.keys(e).filter(o).map(i=>`var ${i} = __gs__[${JSON.stringify(i)}];`).join(`
13
+ `)){g++;break}g++}n.push([d,g]),s=g;continue}s++}if(!n.length)return null;let f=t;for(let u=n.length-1;u>=0;u--)f=f.slice(0,n[u][0])+f.slice(n[u][1]);return f},Qb=(t,e,r)=>{let o=String(t).trimStart();if(/^(export|import)\s/.test(o))return t;try{return r.window.eval(`(${t})`)}catch(n){let s=n&&n.message?n.message:String(n),i=/await is only valid in async/.test(s),a=/Identifier '([^']+)' has already been declared/.exec(s),c=null;if(i){let l=String(t).trim();if(/^function[\s(]/.test(l))try{c=r.window.eval("(async "+l+")")}catch{}}else if(a){let l=String(t),f=a[1];for(let u=0;u<5;u++){let d=hE(l,f);if(!d||d===l)break;l=d;try{c=r.window.eval("("+l+")");break}catch(h){let g=/Identifier '([^']+)' has already been declared/.exec(h&&h.message||String(h));if(!g||g[1]!==f)break}}}if(!c&&/Unexpected (token '\{'|identifier)/.test(s))try{let l=r.window.eval("({"+t+"})");if(l&&typeof l=="object"){let f=Object.keys(l);f.length===1&&typeof l[f[0]]=="function"&&(c=l[f[0]])}}catch{}return c||(typeof console<"u"&&console.warn&&console.warn(`[smbls] deepDestringifyFunctions: eval failed on ${e} \u2014 value will be left as a string. Reason: `+s+`.
14
+ First 200 chars of source: `+String(t).slice(0,200)),t)}},le=(t,e={},r={window:{eval:pE}})=>{if(!t||typeof t!="object")return e;let o=[[t,e]];for(;o.length;){let[n,s]=o.pop();for(let i in n){if(!Object.prototype.hasOwnProperty.call(n,i))continue;let a=n[i];if(w(a))Ne(a)?s[i]=Qb(a,`"${i}"`,r):s[i]=a;else if(T(a)){let c=s[i]=[];for(let l=0;l<a.length;l++){let f=a[l];if(w(f))c.push(Ne(f)?Qb(f,`array index ${l} (prop "${i}")`,r):f);else if(S(f)){let u=e_(f);if(u)c.push(u);else{let d={};c.push(d),o.push([f,d])}}else c.push(f)}}else if(S(a)){let c=e_(a);if(c){s[i]=c;continue}let l=s[i]&&typeof s[i]=="object"&&!T(s[i])?s[i]:s[i]={};o.push([a,l])}else s[i]=a}}return e},o_="Set",n_="Map",s_="RegExp",i_="WeakMap",a_="WeakSet",t_=t=>{let e=Object.keys(t);return e.length===1&&e[0]==="__type"},Ds=(t,e)=>{if(!t||typeof t!="object")return t;let r=s=>Ds(s,e||(e=new WeakMap));if(t.__type===o_&&T(t.values))return new Set(t.values.map(r));if(t.__type===n_&&T(t.entries))return new Map(t.entries.map(s=>T(s)?[r(s[0]),r(s[1])]:s));if(t.__type===i_&&t_(t))return new WeakMap;if(t.__type===a_&&t_(t))return new WeakSet;if(t.__type===s_&&w(t.source))try{return new RegExp(t.source,w(t.flags)?t.flags:"")}catch{return t}if(e||(e=new WeakMap),e.has(t))return e.get(t);let o=!1;if(T(t)){let s=new Array(t.length);e.set(t,s);for(let i=0;i<t.length;i++)s[i]=Ds(t[i],e),s[i]!==t[i]&&(o=!0);return o||e.set(t,t),o?s:t}let n={};e.set(t,n);for(let s of Object.keys(t))n[s]=Ds(t[s],e),n[s]!==t[s]&&(o=!0);return o||e.set(t,t),o?n:t},e_=t=>{if(!t||typeof t!="object")return null;let e=t.__type;if(e!==s_&&e!==o_&&e!==n_&&e!==i_&&e!==a_)return null;let r=Ds(t);return r===t?null:r},Ms=t=>{if(!t||typeof t!="object")return t;let e={},r=[];for(let i of Object.keys(t)){let a=t[i];w(a)&&Ne(a)?r.push([i,a]):e[i]=Ds(a)}if(r.length===0)return e;let o=i=>/^[A-Za-z_$][\w$]*$/.test(i),n=r.filter(([i])=>o(i)),s=Object.keys(e).filter(o).map(i=>`var ${i} = __gs__[${JSON.stringify(i)}];`).join(`
15
15
  `);try{let i=n.map(([l,f])=>`var ${l} = (${f});`).join(`
16
16
  `),a="{ "+n.map(([l])=>`${JSON.stringify(l)}: ${l}`).join(", ")+" }",c=v.eval(`(function(__gs__) { ${s}
17
17
  ${i}
18
18
  return ${a}; })`)(e);Object.assign(e,c)}catch{for(let[a,c]of n)try{let l=Object.keys(e).filter(o).map(f=>`var ${f} = __gs__[${JSON.stringify(f)}];`).join(`
19
19
  `);e[a]=v.eval(`(function(__gs__) { ${l}
20
- return (${c}); })`)(e)}catch{try{e[a]=v.eval(`(${c})`)}catch{e[a]=c}}}for(let[i,a]of r)if(!o(i))try{e[i]=v.eval(`(${a})`)}catch{e[i]=a}return e},Vd=(t,e={verbose:!0})=>{try{return t?v.eval("("+t+")"):{}}catch(r){e.verbose&&console.warn(r)}},zd=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),Tc=t=>{for(let e in t)return!1;return!0},Hd=t=>S(t)&&Tc(t),Wd=()=>Object.create(null),Ms=(t,e,r={})=>{let o=r.exclude||[],n=r.preventUnderscore;for(let s in e)o.includes(s)||!n&&oo(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},no=(t,e,r=[])=>{let o=r instanceof Set;for(let n in e)oo(n)||n==="constructor"||n==="prototype"||(o?r.has(n):r.includes(n))||(t[n]=e[n]);return t},qt=(t,e,r={},o=new WeakMap)=>{if(!z(t)||!z(e)||Ht(t)||Ht(e))return e;if(o.has(t))return o.get(t);o.set(t,t);let n=r.exclude,s=n?n instanceof Set?n:new Set(n):null,i=!r.preventForce;for(let a in e){if(!Object.prototype.hasOwnProperty.call(e,a)||s&&s.has(a)||i&&oo(a)||a==="constructor"||a==="prototype")continue;let c=t[a],l=e[a];Ht(l)?t[a]=l:z(c)&&z(l)?t[a]=qt(c,l,r,o):l!==void 0&&(t[a]=l)}return t},Oc=(t,e,r=new Set)=>{if(typeof t!="object"||typeof e!="object"||t===null||e===null)return t===e;if(r.has(t)||r.has(e))return!0;r.add(t),r.add(e);let o=Object.keys(t),n=Object.keys(e);if(o.length!==n.length)return!1;for(let s=0;s<o.length;s++){let i=o[s];if(!Object.prototype.hasOwnProperty.call(e,i)||!Oc(t[i],e[i],r))return!1}return!0},dE=new Set(["node","__ref"]),qd=(t,e,r=dE)=>{if(t===e)return!0;if(!z(t)||!z(e)||Ht(t)||Ht(e))return t===e;let o=r instanceof Set?r:new Set(r),n=new WeakSet;function s(i,a){if(n.has(a))return!0;n.add(a);for(let c in a){if(!Object.prototype.hasOwnProperty.call(a,c)||o.has(c))continue;if(!Object.prototype.hasOwnProperty.call(i,c))return!1;let l=a[c],f=i[c];if(Ht(l)||Ht(f)){if(l!==f)return!1}else if(z(l)&&z(f)){if(!s(f,l))return!1}else if(l!==f)return!1}return!0}return s(t,e)},Kd=(t,e)=>{if(e==null)return t;if(Wt(e)("string","number"))delete t[e];else if(T(e))for(let r=0;r<e.length;r++)delete t[e[r]];else throw new Error("Invalid input: props must be a string or an array of strings");return t},Rc=t=>{if(t===null||typeof t!="object")return t;let e=Object.create(null);for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=Rc(t[r]));return e},Gd=(t,e)=>{if(t.length===0)return e;let r={},o=r;for(let n=0;n<t.length;n++)n===t.length-1&&e?o[t[n]]=e:(o[t[n]]={},o=o[t[n]]);return r},Yd=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let n=0;n<e.length-1;n++){if(r[e[n]]===void 0)return;r=r[e[n]]}let o=e[e.length-1];r&&Object.prototype.hasOwnProperty.call(r,o)&&delete r[o]},Xd=(t,e,r)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let o=t;for(let n=0;n<e.length-1;n++)(!o[e[n]]||typeof o[e[n]]!="object")&&(o[e[n]]={}),o=o[e[n]];return o[e[e.length-1]]=r,t},Jd=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let o=0;o<e.length;o++){if(r==null)return;r=r[e[o]]}return r},Zd=t=>{let r=[],o=0;for(let n=0;n<t.length;n++)if(r.length<2)r.push(t[n]);else if(t[n]===r[n%2]?o++:(r=[t[n-1],t[n]],o=1),o>=20)return(Yb==="test"||Yb==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",r),!0},Qd=t=>{let e=new WeakSet;function r(o){if(o&&typeof o=="object"){if(e.has(o))return!0;e.add(o);for(let n in o)if(Object.prototype.hasOwnProperty.call(o,n)&&r(o[n]))return console.log(o,"cycle at "+n),!0}return!1}return r(t)},tp=(t,e)=>{let r=e instanceof Set?e:new Set(e),o={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&!r.has(n)&&(o[n]=t[n]);return o}});var Fs,Ns,js,Pc=F(()=>{"use strict";tr();Fs=(function(){let t=0;function e(){return t++,t}return e})(),Ns=Fs,js=(t,e,r)=>(ut(r,t)||r||t.key||Fs()).toString()});var ve,ep,wr,Ic,rp,op,np,Sr,sp,so,Pt,ip=F(()=>{"use strict";ve="production",ep=ve,wr=(t=ve)=>t==="production",Ic=(t=ve)=>t==="testing"||t==="test",rp=Ic,op=(t=ve)=>t==="staging",np=(t=ve)=>t==="local",Sr=(t=ve)=>t==="development"||t==="dev"||t==="local",sp=(t,e=ve)=>e[t],so=(t=ve)=>!wr(t),Pt=t=>{let e=t&&"env"in t?t.env:typeof process<"u"&&process.env?"production":void 0;if(e&&e!=="production")return!0;let r=t&&"hostname"in t?t.hostname:typeof location<"u"?location.hostname:void 0;return typeof r=="string"&&r?r==="localhost"||r==="127.0.0.1"||r.endsWith(".localhost"):!1}});function Bs(t,e,r){let o;return function(){let n=this,s=arguments,i=function(){o=null,r||t.apply(n,s)},a=r&&!o;clearTimeout(o),o=setTimeout(i,e),a&&t.apply(n,s)}}function fp(t,e=window){let r=function(){return t.apply(e,arguments)};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r}var ap,cp,pE,lp,Ko,Go,At,Yo=F(()=>{"use strict";ap=(t,e,r=300)=>{let o;return(...n)=>{clearTimeout(o),o=setTimeout(()=>{e.apply(t,n)},r)}},cp=t=>{let e={};return(...r)=>{let o=r[0];if(o in e)return e[o];{let n=t(o);return e[o]=n,n}}},pE=/^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/,lp=t=>pE.test(t),Ko=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let r of e)if(r.resolveHandler)return!0;return!1},Go=(t,e)=>{if(typeof t=="function")return t;let r=e?.context?.plugins;if(!r)return t;for(let o of r)if(o.resolveHandler){let n=o.resolveHandler(t,e);if(typeof n=="function")return n}return t},At=(t,e,...r)=>{let o=e?.context?.plugins;if(!o)return!1;let n=!1;for(let s of o)typeof s[t]=="function"&&(s[t](e,...r),n=!0);return n}});var up,s_=F(()=>{"use strict";Ot();tr();up=(t,e)=>{let{__ref:r}=t,o=t.if;if(A(o)){let n;try{n=o(t,t.state,t.context)}catch(s){typeof console<"u"&&console.warn("[DOMQL] if condition error:",s),delete r.__if;return}n?r.__if=!0:delete r.__if}else o!=null&&typeof o=="object"?ut(o,t)?r.__if=!0:delete r.__if:r.__if=!0}});var dp,pp,i_=F(()=>{"use strict";dp=(t,...e)=>{t&&e.map(r=>console.log(r))},pp=(t,e,...r)=>{t&&(console.group(e),r.map(o=>console.log(o)),console.groupEnd(e))}});function bp(t){let e;try{if(!window.localStorage)return;e=window.localStorage.getItem(t)}catch{return}if(e!==null)try{return JSON.parse(e)}catch{return}}function _p(t,e){if(e!=null)try{if(!window.localStorage)return;let r=typeof e=="object"?JSON.stringify(e):e;window.localStorage.setItem(t,r)}catch{}}var hp,gp,mp,yp,a_=F(()=>{"use strict";Ot();xs();hp=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),gp=(t,e,r=365)=>{if(Tt(Q)||Tt(Q.cookie))return;let o=new Date;o.setTime(o.getTime()+r*24*60*60*1e3);let n=`expires=${o.toUTCString()}`;Q.cookie=`${t}=${e};${n};path=/`},mp=t=>{if(Tt(Q)||Tt(Q.cookie))return;let e=`${t}=`,o=decodeURIComponent(Q.cookie).split(";");for(let n=0;n<o.length;n++){let s=o[n];for(;s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return""},yp=t=>{Tt(Q)||Tt(Q.cookie)||(Q.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var Xo,c_,xp,wp=F(()=>{"use strict";Xo={root:["body","html"],head:["title","base","meta","style","noscript","script"],body:new Set(["string","style","fragment","a","abbr","acronym","address","applet","area","article","aside","audio","b","basefont","bdi","bdo","big","blockquote","br","button","canvas","caption","center","cite","code","search","col","colgroup","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","hgroup","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","template","hgroup","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr","svg","path","circle","ellipse","line","polygon","polyline","rect","g","defs","symbol","use","text","tspan","image","clipPath","mask","pattern","marker","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","feBlend","feColorMatrix","feFlood","feComposite","foreignObject"])},c_=new Set(["svg","path","circle","ellipse","line","polygon","polyline","rect","g","defs","symbol","use","text","tspan","image","clipPath","mask","pattern","marker","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","feBlend","feColorMatrix","feFlood","feComposite","foreignObject"]),xp=t=>Xo.body.has(t)});var Sp,l_,Jo,zs,Kt,kp,Dc,Hs,vp,Ws,$c,Lc,qs,Mc,Zo,hE,je,f_,Us,Ks,Cp,Vs,Ep,Ap,Fc,Nc,jc,Bc,Uc,Vc,u_,zc=F(()=>{"use strict";Ho();Tp();tr();Ot();Sp="production",l_=t=>t.sourcemap!==!1&&Sp!=="production",Jo=t=>{if(t.includes("+"))return t.split("+").filter(Be);if(t.includes("_")){let[e]=t.split("_");return[e]}if(t.includes(".")&&!Be(t.split(".")[1])){let[e]=t.split(".");return[e]}return[t]},zs=(t,e,r)=>{let o=[],n=Jo(r);n&&(o=[...n]);let s=t.extends;return s&&(o=T(s)?[...o,...s]:[...o,s]),o},Kt=(t,e)=>{let{__ref:r}=e,{__extends:o}=r;if(!t)return o;let n=e.variant,s=e.context;if(n&&s?.components&&!Array.isArray(t)&&typeof t=="string"){let i=`${t}.${n}`;s.components[i]&&(t=i)}return o.includes(t)||(o=Array.isArray(t)?[...o,...t]:[...o,t],r.__extends=o),o},kp=(t,e)=>{if(!t)return e;let{extends:r}=e,o=T(r)?r:[r],n=T(t)?t:[t];return{...e,extends:Vo(n,o)}},Dc=()=>Math.random().toString(36).substring(2),Hs={},vp={},Ws=t=>Hs[t.__hash],$c=(t,e)=>{let r=Dc();return w(t)||(t.__hash=r),r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(Hs[r]=e),e},Lc=(t,e)=>t.__hash?e.concat(Ws(t)):$c(t,e),qs=(t,e,r,o=new Set,n,s)=>{for(let i of t)T(i)?qs(i,e,r,o,n,s):Zo(i,e,r,o,n,void 0,s);return e},Mc=(t,e,r,o=new Set,n,s,i)=>{let a=t.extends,c={...t};delete c.extends;let l=!1;for(let f in c){l=!0;break}return l&&(e.push(c),n&&n.push(s)),a&&Zo(a,e,r,o,n,s,i),e},Zo=(t,e,r,o=new Set,n,s,i)=>{if(!t||o.has(t))return e;if(T(t))return qs(t,e,r,o,n,i);let a=s;return w(t)?(a=t,t=Ks(t,r)):i&&S(t)&&i.has(t)&&(a=i.get(t)),o.add(t),t?.extends?Mc(t,e,r,o,n,a,i):t&&(e.push(t),n&&n.push(a)),e},hE=new Set(["parent","node","__ref","__proto__","extends","childExtends","childExtendsRecursive"]),je=(t,e,r,o,n)=>{e=ft(e);for(let s in e){if(hE.has(s))continue;let i=t[s],a=e[s];if(a!==void 0&&Object.prototype.hasOwnProperty.call(e,s)&&s!=="__proto__"&&s!=="constructor"&&s!=="prototype"){if(i===void 0)t[s]=a,r&&o?S(a)&&!T(a)?(r[s]=r[s]||{},f_(r[s],a,o)):r[s]=o:r&&n?.[s]&&(r[s]=n[s]);else if(S(i)&&S(a)){let c=r?r[s]=r[s]||{}:void 0,l=n?.[s];Be(s)?t[s]=je(i,a,c,o,l):je(i,a,c,o,l)}if(s==="extends"||s==="childExtends"||s==="childExtendsRecursive"){if(T(i)&&T(a))t[s]=i.concat(a);else if(T(i)&&S(a)){let c=je({},i);t[s]=je(c,a)}}}}return t},f_=(t,e,r,o)=>{if(o||(o=new WeakSet),!o.has(e)){o.add(e);for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n)||n==="__proto__"||n==="constructor"||n==="prototype")continue;let s=e[n];S(s)&&!T(s)?(t[n]=t[n]||{},f_(t[n],s,r,o)):t[n]=r}}},Us=(t,e,r)=>t.reduce((o,n,s)=>{let i=ft(n),a=r?r[s]:void 0;return je(o,i,e,a)},{}),Ks=(t,e,r={},o)=>{let n=e?.components||r.components,s=e?.pages||r.pages;if(w(t)){let i=n&&(n[t+"."+o]||n[t]||n["smbls."+t]),a=s&&t.charCodeAt(0)===47&&s[t];if(i)return i;if(a)return a;r.verbose&&(Sp==="test"||Sp==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},Cp=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),Vs=(t,e,r,o)=>{if(!t)return[];if(t.__hash)return Ws(t)||[];let s=Zo(t,[],e,new Set,r,void 0,o);return r?s:Lc(t,s)},Ep=(t,e)=>{if(!t)return e;let r=T(t)?t:[t];return Vo(r,e)},Ap=t=>{let e=[];function r(o){for(let n in o)Object.prototype.hasOwnProperty.call(o,n)&&(Be(n)&&e.push(n),n==="extends"&&(typeof o[n]=="string"?e.push(o[n]):Array.isArray(o[n])&&(e=e.concat(o[n]))),typeof o[n]=="object"&&o[n]!==null&&r(o[n]))}return r(t),e},Fc=(t,e,r={})=>{let{__ref:o}=t,n=t.context||e.context,s=t.variant;if(t.extends)if(Array.isArray(t.extends)&&t.extends.length>0){let[i,...a]=t.extends;if(typeof i=="string"&&s&&n?.components){let c=`${i}.${s}`;n.components[c]?Kt([c,...a],t):Kt(t.extends,t)}else Kt(t.extends,t)}else if(typeof t.extends=="string"&&s&&n?.components){let i=`${t.extends}.${s}`;n.components[i]?Kt(i,t):Kt(t.extends,t)}else Kt(t.extends,t);return Nc(t,e,r),jc(t,e,r),Bc(t,e,r),t.component&&Kt(ut(t.component,t),t),n.defaultExtends&&Kt(n.defaultExtends,t),zo(o.__extends)},Nc=(t,e,r={})=>{let{__ref:o}=t;return r.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&Kt(e.childProps.extends,t),o.__extends},jc=(t,e,r={})=>{let{__ref:o}=t,n=r.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!n&&s&&Kt(s,t),o.__extends},Bc=(t,e,r={})=>{let{__ref:o}=t,n=e.childExtendsRecursive,s=r.ignoreChildExtendsRecursive||t.ignoreChildExtendsRecursive,i=t.key==="__text";return n&&!i&&!s&&Kt(n,t),o.__extends},Uc=(t,e,r={})=>{let{__ref:o}=t,n=t.context||e.context,s=t.variant,i=l_(r),a=i?[...o.__extends]:null,c=zo(o.__extends.map((l,f)=>Ks(l,n,r,f===0&&s)));if(i){let l=new WeakMap;for(let d=0;d<c.length;d++){let h=c[d],g=a[d];h&&S(h)&&w(g)&&l.set(h,g)}let f=[],u=Vs(c,n,f,l);o.__extendsStack=u,o.__extendsNames=f}else{let l=Vs(c,n);o.__extendsStack=l}return o.__extendsStack},Vc=(t,e,r={})=>{let{__ref:o}=t,{__extendsStack:n}=o;if(l_(r)){let s={},i=o.__extendsNames||[],a=Us(n,s,i),c={};je(t,a,c,void 0,s),o.__sourcemap=c}else{let s=Us(n);je(t,s)}return t},u_=(t,e,r={})=>(Fc(t,e,r),Uc(t,e,r),Vc(t,e,r),t)});function Op(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function Rp(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function Pp(t,e,r){let{context:o}=e||{},[n]=Jo(r),s=r||n;return o?.components?.[s]||o?.pages?.[s]}var Be,Tp=F(()=>{"use strict";zc();Ot();Be=t=>{if(!w(t)||!t.length)return!1;let e=t.charCodeAt(0);return e>=65&&e<=90}});function d_(t,e){let{props:r,on:o}=e,n=eo(t.split("on")[1]),s=o[n],i=r[t];A(s)?o[n]=(...a)=>{if(s(...a)!==!1&&A(i))return i(...a)}:o[n]=i}var p_=F(()=>{"use strict";Os();Ot()});function Hc(t,e={}){let r=e.cachedKeys||[];for(let o in t){let n=t[o];if(o.length>2&&o.charCodeAt(0)===111&&o.charCodeAt(1)===110&&o[2]===o[2].toUpperCase()&&(A(n)||n!=null&&Ko(this.context))){let g=eo(o.slice(2));t.on&&(t.on[g]=n),delete t[o];continue}if(o==="childProps"){t.props[o]=n,delete t[o],r.push(o);continue}let a=this.define?.[o],c=this.context?.define?.[o],l=S(a)||A(a),f=S(c)||A(c);if(l||f)continue;let u=o.charAt(0);if(g_.has(u)){t.props[o]=n,delete t[o],r.push(o);continue}let d=Ip.test(o)||h_.test(o)||mE(n),h=_r.has(o);!d&&!h&&(o in t.props||(t.props[o]=n),delete t[o],r.push(o))}return t}function Wc(t=this,e){let r=e.cachedKeys||[];for(let o in t.props){let n=t.props[o],s=o.length>2&&o.charCodeAt(0)===111&&o.charCodeAt(1)===110,i=A(n)||n!=null&&Ko(this.context);if(s&&i){d_(o,t),delete t.props[o];continue}if(r.includes(o)||o==="childProps")continue;let a=o.charAt(0);if(g_.has(a))continue;let c=this.define?.[o],l=this.context?.define?.[o],f=S(c)||A(c),u=S(l)||A(l),d=Ip.test(o)||h_.test(o),h=_r.has(o);(d||h||f||u)&&(t[o]===void 0||n===null)&&(t[o]=n,t.props&&delete t.props[o])}return t}function qc(t=this){let e=[];return Hc.call(this,t,{cachedKeys:e}),Wc.call(this,t,{cachedKeys:e}),t}function Dp(t={}){return t.on||(t.on={}),t.props||(t.props={}),qc.call(this,t)}function Lp(t,e){this.__element.update({props:t},e)}function Zs(t){let e={update:Lp.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var Ip,h_,g_,gE,mE,Xs,Gs,$p,Js,Qs,ti,Kc,Ys,Mp,Fp,Np=F(()=>{"use strict";qo();p_();tr();Ot();Os();Yo();Ip=/^[A-Z]/,h_=/^\d+$/,g_=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),gE=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),mE=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if(gE.has(e)||Ip.test(e))return!0;return!1},Xs=(t,e,r)=>{let{props:o,__ref:n}=t;if(n.__propsStack=[],o)n.__initialProps=o;else return{};return z(o)?{...o}:(n.__propsStack.push(o),{})};Gs=t=>Wt(t)("string","number")?{inheritedString:t}:t,$p=(t,e)=>!t||!e.length?!1:e.includes(t),Js=(t,e)=>{let{__ref:r}=t,o=r.__propsStack||[],n=e.props;if(!n)return o;let s=n[t.key],i=n.childProps||e.childProps,a=t.props?.ignoreChildProps;if(i&&!a){let c=Gs(i);o.unshift(c)}if(s){let c=Gs(s);o.unshift(c)}return o};Qs=t=>{let e=new Set;return t.filter(r=>!r||xr.has(r)||e.has(r)?!1:(e.add(r),!0))},ti=(t,e,r)=>(e.props=t.reduce((o,n)=>{if(xr.has(n))return o;for(;A(n);)n=ut(n,e);return st(o,ft(n,{exclude:xr}))},{}),Zs(e),e.props),Kc=(t,e)=>{let{props:r,__ref:o}=t,n=o.__propsStack||[];if(e?.props&&(n=[...Js(t,e)]),S(r)?n.push(r):r==="inherit"&&e?.props?n.push(e.props):r&&n.push(r),T(o.__extendsStack))for(let s=0;s<o.__extendsStack.length;s++){let i=o.__extendsStack[s];i.props&&i.props!==r&&n.push(i.props)}return o.__propsStack=Qs(n),o.__propsStack},Ys=(t,e)=>{let{__ref:r}=t,o=Kc(t,e);o.length?ti(o,t):(r.__propsStack=[],t.props={})},Mp=function(t,e,r){let{__ref:o}=t;if(o.__if)Ys(t,e);else try{Ys(t,e)}catch(n){t.context?.designSystem?.verbose&&console.warn("initProps error at",o.path?.join("."),n),t.props={},o.__propsStack=[]}return Zs(t),t},Fp=(t,e,r)=>{let{__ref:o}=e,s=[...o.__propsStack||[]],i=Js(e,r);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),o.__propsStack=Qs(s),o.__propsStack.length&&ti(o.__propsStack,e),e}});var m_,Gc,Yc,Xc,Jc,jp,Zc,Qc,tl,Bp,y_=F(()=>{"use strict";zc();Pc();Ss();Np();wp();Ot();m_="production",Gc=(t,e,r)=>{let o=e.childExtends&&e.childExtends.tag,n=e.childProps&&e.childProps.tag,s=Xo.body.has(r)&&r;return{text:t,tag:o||n||s||"string"}},Yc=(t,e,r)=>{if(t===void 0)return(m_==="test"||m_==="development")&&console.warn(r,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:Wt(t)("string","number")?Gc(t,e,r):A(t)?{props:t}:t},Xc=(t,e)=>{let r={};return r.origin=t,r.parent=e,r},Jc=(t,e,r,o,n)=>{if(!e)return n;if(Qe(e)){let s={key:":root",node:e};return n[`${r}_parent`]=s,s}return e},jp=(t,e)=>{let{__ref:r}=t,{__ref:o}=e,n=e&&e.key===":root";r?.root||(r.root=n?t:o?.root)},Zc=(t,e,r)=>{let{__ref:o}=e;return o||(o=e.ref={}),o.path||(o.path=[]),o.path.concat(r)},Qc=(t,e,r,o,n)=>(o.context&&!n.context&&!t.context&&(n.context=o.context),o.context||e.context||n.context||t.context),tl=(t,e,r)=>{let o=Xc(t,e);return t.__ref=o,o.__defineCache||(o.__defineCache={}),o.__exec||(o.__exec={}),o.__execProps||(o.__execProps={}),o.__class||(o.__class={}),o.__classNames||(o.__classNames={}),o.__attr||(o.__attr={}),o.__changes||(o.__changes=[]),o.__children||(o.__children=[]),o.__extends=zs(t,e,r),o.path=Zc(t,e,r),o},Bp=(t,e,r,o,n)=>{let i=t?.__hash?{extends:[t]}:Yc(t,e,r);if(!i)return;let a=Jc(i,e,r,o,n),c=js(i,a,r);tl(i,a,c);let l=Xs(i,a,c),f=Qc(i,a,c,o,n),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var Up,el,rl,ol,nl,Vp,sl,zp,Hp,Wp,qp,b_,ei,er,Ue,__=F(()=>{"use strict";Ho();qo();tr();Ot();Up=t=>{let{state:e,props:r,__ref:o}=t,n=r?.state||e;return Wt(n)("string","number")?(o.__state=n,{value:n}):n===!0?(o.__state=t.key,{}):n?(o.__hasRootState=!0,n):!1},el=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},rl=(t,e)=>{if(!t.includes("../"))return;let o=t.split("../").length-1;for(let n=0;n<o;n++){if(!e.parent)return null;e=e.parent}return e},ol=(t,e,r={})=>{let o=w(t)?t.split("/"):[t],n=o.length-1;for(let s=0;s<n;s++){let i=o[s],a=o[s+1];if(i==="__proto__"||a==="__proto__")return;let c=e[i];c||(c=e[i]={}),c[a]||(c[a]={}),t=a,e=c}return r.returnParent?e:e[t]},nl=(t,e,r={})=>{let n=t.__ref.__state;if(!sl(t))return;let s=el(n,e.state),i=e.state;if(s)i=s,n=n.replaceAll("~/","");else{let a=rl(n,e.state);a&&(i=a,n=n.replaceAll("../",""))}if(i)return ol(n,i,r)},Vp=(t,e)=>{let r=t.__ref,o=nl(t,e);if(o===void 0)return t.state;if(Wt(o)("object","array"))return ft(o);if(Wt(o)("string","number","boolean"))return r.__stateType=typeof o,{value:o};console.warn(r.__state,"is not present. Replacing with",{})},sl=t=>{let{__ref:e}=t,r=e?.__state;return!!(r&&Wt(r)("number","string","boolean"))},zp=function(t){return z(t)?!!(t.update&&t.parse&&t.clean&&t.create&&t.parent&&t.destroy&&t.rootUpdate&&t.parentUpdate&&t.keys&&t.values&&t.toggle&&t.replace&&t.quietUpdate&&t.quietReplace&&t.add&&t.apply&&t.applyReplace&&t.setByPath&&t.setPathCollection&&t.removeByPath&&t.removePathCollection&&t.getByPath&&t.applyFunction&&t.__element&&t.__children):!1},Hp=(t,e)=>{if(!t)return e||{};let r=t.split("/"),o={},n=o,s=r.length-1;for(let i=0;i<=s;i++)n[r[i]]=i===s?e||{}:{},n=n[r[i]];return o},Wp=(t,e)=>{let{__element:r}=e,o=r?.state;if(!o)return;let n=ft(o,ro),s={[t.key]:n},i=S(o.__depends)?{...o.__depends,...s}:s;return Array.isArray(o)?Es(o,{...Object.getPrototypeOf(o),__depends:i}):Object.setPrototypeOf(o,{...Object.getPrototypeOf(o),__depends:i}),n},qp=(t,e,r={})=>{let{overwrite:o}=r;if(!o)return;let n=o==="shallow";if(o==="merge"){st(t,e,ro);return}(n?no:qt)(t,e,ro)},b_="__polyglotSeededKeys",ei=t=>{if(!S(t))return new Set;let e=t[b_];if(!(e instanceof Set)){e=new Set;try{Object.defineProperty(t,b_,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},er=(t,e,r)=>ei(t).has(e)?!0:!S(r)||r[e]===void 0,Ue=(t,e)=>(ei(t).add(e),e)});var yE,Kp,x_=F(()=>{"use strict";yE=(t,e)=>{let r=e;for(;r;){if(r===t)return!0;r=Object.getPrototypeOf(r)}return!1},Kp=(t,e)=>{let{__ref:r}=t,o=t.context||e.context||r.root?.context;o&&!o.globalScope&&(o.globalScope={});let n=e.scope||r.root?.scope,s=o?.globalScope;if(!t.scope)n?t.scope=n:s?t.scope=Object.create(s):t.scope={};else if(typeof t.scope=="object"&&t.scope!==null&&Object.getPrototypeOf(t.scope)===Object.prototype){let i=n||s;i&&!yE(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var w_,il,kr,al,Gp,Yp=F(()=>{"use strict";Ot();Yo();w_=(t,e)=>{let r="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[r]},il=(t,e,r,o,n)=>{if(t=Go(t,e),!!A(t))try{let s=t.call(e,e,r||e.state,o||e.context,n);return s&&typeof s.then=="function"&&s.catch(i=>{e.error=i,i instanceof ReferenceError?console.warn("[DOMQL] Async event warning:",i.message):console.error("[DOMQL] Async event error:",i)}),s}catch(s){if(e.error=s,s instanceof ReferenceError?console.warn("[DOMQL] Event handler warning:",s.message):console.error("[DOMQL] Event handler error:",s),e.context?.strictMode)throw s}},kr=(t,e,r)=>{if(!e)throw new Error("Element is required");At(t,e,r);let o=w_(t,e);if(o){let{state:n,context:s}=e;return il(o,e,n,s,r)}},al=(t,e,r,o,n,s)=>{if(t=Go(t,r),!!A(t))try{let i=t.call(r,e,r,o||r.state,n||r.context,s);return i&&typeof i.then=="function"&&i.catch(a=>{r.error=a,console.error("[DOMQL] Async event update error:",a)}),i}catch(i){if(r.error=i,console.error("[DOMQL] Event update error:",i),r.context?.strictMode)throw i}},Gp=(t,e,r,o)=>{At(t,r,e,o);let n=w_(t,r);if(n){let{state:s,context:i}=r;return al(n,e,r,s,i,o)}}});var Xp,ri,Jp=F(()=>{"use strict";Xp={},ri={}});var k_={};P(k_,{restAdapter:()=>S_,setup:()=>_E});var bE,rr,_E,S_,v_=F(()=>{"use strict";bE=(t,e,r)=>{let o=e&&!e.startsWith("/")?"/":"",n=new URL(`${t}${o}${e}`);if(r)for(let s in r){let i=r[s];i!=null&&n.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return n.toString()},rr=async(t,e)=>{let r=await globalThis.fetch(t,e),o=r.headers.get("content-type"),n=o&&o.includes("json")?await r.json():await r.text();return{data:n,error:r.ok?null:n?.message||n?.error||r.statusText,status:r.status}},_E=async({url:t,headers:e,auth:r,fetchOptions:o})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return S_(t,e,r,o)},S_=(t,e={},r,o={})=>{let n=r?.token||null,s=f=>{let u={...e,...f};return n&&(u.Authorization=`Bearer ${n}`),u},i=f=>({...s(f),"Content-Type":"application/json"}),a=f=>({...o,...f}),c=(f,u)=>{let d=u||t;if(f&&(f.startsWith("http://")||f.startsWith("https://")))return f;let h=f&&!f.startsWith("/")?"/":"";return`${d}${h}${f||""}`};return{name:"rest",setToken:f=>{n=f},getSession:async()=>{if(!r?.sessionUrl)return n?{token:n}:null;let f=await rr(c(r.sessionUrl,r.baseUrl),a({headers:s()}));return f.error?null:f.data},signIn:async f=>{if(!r?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let u=await rr(c(r.signInUrl,r.baseUrl),a({method:"POST",headers:i(),body:JSON.stringify(f)}));return u.data?.token&&(n=u.data.token),u},signOut:async()=>(r?.signOutUrl&&await rr(c(r.signOutUrl,r.baseUrl),a({method:"POST",headers:s()})),n=null,{error:null}),select:({from:f,params:u,select:d,limit:h,offset:g,order:p,single:m,headers:b,baseUrl:_})=>{let y={...u};return d&&(y.select=d),h&&(y.limit=h),g&&(y.offset=g),m&&(y.single=!0),p&&(typeof p=="string"?y.order=p:Array.isArray(p)?y.order=p.map(x=>`${x.by}:${x.asc===!1?"desc":"asc"}`).join(","):p.by&&(y.order=`${p.by}:${p.asc===!1?"desc":"asc"}`)),rr(bE(_||t,f||"",y),a({headers:s(b)}))},rpc:({from:f,params:u,headers:d,baseUrl:h})=>rr(c(`rpc/${f}`,h),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),insert:({from:f,data:u,headers:d,baseUrl:h})=>rr(c(f,h),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),update:({from:f,data:u,params:d,method:h,headers:g,baseUrl:p})=>{let m=d?.id||u?.id,b=m?`${f}/${m}`:f;return rr(c(b,p),a({method:h||"PATCH",headers:i(g),body:JSON.stringify(u)}))},upsert:({from:f,data:u,params:d,method:h,headers:g,baseUrl:p})=>{let m=d?.id||u?.id,b=m?`${f}/${m}`:f;return rr(c(b,p),a({method:h||"PUT",headers:i(g),body:JSON.stringify(u)}))},delete:({from:f,params:u,headers:d,baseUrl:h})=>{let g=u?.id,p=g?`${f}/${g}`:f;return rr(c(p,h),a({method:"DELETE",headers:s(d)}))}}}});var E_={};P(E_,{localAdapter:()=>C_,setup:()=>wE});var cl,xE,wE,C_,A_=F(()=>{"use strict";cl=(t,e)=>{if(!e)return!0;for(let r in e){let o=e[r];if(o===null){if(t[r]!==null&&t[r]!==void 0)return!1}else if(Array.isArray(o)){if(!o.includes(t[r]))return!1}else if(typeof o=="object"){for(let n in o)if(n==="gt"&&!(t[r]>o[n])||n==="gte"&&!(t[r]>=o[n])||n==="lt"&&!(t[r]<o[n])||n==="lte"&&!(t[r]<=o[n])||n==="neq"&&t[r]===o[n]||n==="like"&&!String(t[r]).includes(o[n]))return!1}else if(t[r]!==o)return!1}return!0},xE=(t,{order:e,limit:r,offset:o,single:n})=>{let s=[...t];if(e){let i=typeof e=="string"?e:e.by,a=e.asc!==!1;s.sort((c,l)=>c[i]<l[i]?a?-1:1:c[i]>l[i]?a?1:-1:0)}return o&&(s=s.slice(o)),r&&(s=s.slice(0,r)),n?{data:s[0]||null,error:null}:{data:s,error:null}},wE=async({data:t,...e})=>C_(t,e),C_=(t={},e={})=>{let r={},o={},n=e.persist!==!1&&typeof localStorage<"u",s=e.prefix||"smbls_db_",i=f=>{if(!r[f])if(n)try{let u=localStorage.getItem(s+f);r[f]=u?JSON.parse(u):t[f]||[]}catch{r[f]=t[f]||[]}else r[f]=t[f]||[];return r[f]},a=f=>{if(n)try{localStorage.setItem(s+f,JSON.stringify(r[f]))}catch{}},c=(f,u,d,h)=>{let g=o[f];if(g)for(let p of g)p(d,h,{event:u,table:f})},l=Date.now();return{name:"local",store:r,select:async({from:f,params:u,...d})=>{let g=i(f).filter(p=>cl(p,u));return xE(g,d)},insert:async({from:f,data:u})=>{let d=i(f),g=(Array.isArray(u)?u:[u]).map(p=>{let m={id:p.id||++l,...p};return d.push(m),m});a(f);for(let p of g)c(f,"INSERT",p,null);return{data:Array.isArray(u)?g:g[0],error:null}},update:async({from:f,data:u,params:d})=>{let h=i(f),g=[];for(let p=0;p<h.length;p++)if(cl(h[p],d)){let m={...h[p]};Object.assign(h[p],u),g.push(h[p]),c(f,"UPDATE",h[p],m)}return a(f),{data:g,error:null}},upsert:async({from:f,data:u,params:d})=>{let h=i(f),g=Array.isArray(u)?u:[u],p=[];for(let m of g){let b=d||(m.id!==void 0?{id:m.id}:null),_=b?h.findIndex(y=>cl(y,b)):-1;if(_>-1){let y={...h[_]};Object.assign(h[_],m),p.push(h[_]),c(f,"UPDATE",h[_],y)}else{let y={id:m.id||++l,...m};h.push(y),p.push(y),c(f,"INSERT",y,null)}}return a(f),{data:Array.isArray(u)?p:p[0],error:null}},delete:async({from:f,params:u})=>{let d=i(f),h=[];for(let g=d.length-1;g>=0;g--)cl(d[g],u)&&(h.push(d[g]),d.splice(g,1),c(f,"DELETE",null,h[h.length-1]));return a(f),{data:h,error:null}},subscribe:({from:f,on:u},d)=>{o[f]||(o[f]=[]);let h=(g,p,m)=>{u&&u!=="*"&&u!==m.event||d(g,p,m)};return o[f].push(h),()=>{let g=o[f].indexOf(h);g>-1&&o[f].splice(g,1)}}}}});var ao={};P(ao,{createAdapter:()=>AE,default:()=>FE,executeFetch:()=>fi,fetchPlugin:()=>oh,initAdapterAuth:()=>pl,parseDuration:()=>si,queryClient:()=>ME,registerAdapter:()=>EE,resolveDb:()=>P_});var SE,kE,ll,ni,fl,th,vE,CE,EE,AE,P_,si,Ft,I_,oi,TE,li,ii,ai,ul,eh,dl,OE,T_,Zp,D_,$_,Qo,O_,RE,R_,PE,hl,L_,M_,pl,rh,fe,Ce,ci,io,Ve,vr,IE,DE,$E,Qp,LE,fi,ME,oh,FE,Cr=F(()=>{"use strict";R();SE=["select","rpc","insert","update","upsert","delete","subscribe"],kE={rest:()=>Promise.resolve().then(()=>(v_(),k_)),local:()=>Promise.resolve().then(()=>(A_(),E_))},ll=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),ni=(()=>{if(typeof globalThis<"u"&&globalThis[ll])return globalThis[ll];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,ll,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[ll]}catch{}return t})(),fl=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),th=(()=>{if(typeof globalThis<"u"&&globalThis[fl])return globalThis[fl];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,fl,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[fl]}catch{}return t})(),vE=5e3,CE=t=>new Promise(e=>{if(ni[t])return e(ni[t]);let r=th[t]||=[],o=!1,n=()=>{o||(o=!0,e(ni[t]||null))};r.push(n),setTimeout(n,vE)}),EE=(t,e)=>{ni[t]=e;let r=th[t];if(r&&r.length){th[t]=[];for(let o of r)o()}},AE=t=>{let e={};for(let r of SE)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},P_=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...r}=t,o=typeof e=="string"?e:typeof t=="string"?t:null;if(!o)return null;let n=ni[o]||kE[o];if(!n&&(n=await CE(o),!n))throw new Error(`Unknown db adapter: "${o}". Use registerAdapter() for adapters with optional deps.`);let s=await n();if(!s||typeof s.setup!="function")throw new Error(`Adapter "${o}" loader returned a module without a setup() function. Got keys: [${Object.keys(s||{}).join(", ")}]. Likely a bundler chunk-resolution issue.`);return s.setup(r)},si=t=>{if(!t)return 0;if(typeof t=="number")return t;let e=t.match(/^(\d+)(ms|s|m|h)$/);if(!e)return 0;let r=parseInt(e[1]),o=e[2];return o==="ms"?r:o==="s"?r*1e3:o==="m"?r*6e4:o==="h"?r*36e5:0},Ft=new Map,I_=new Map,oi=new Map,TE=(t,e,r)=>{if(t.cache?.key)return t.cache.key;let o=PE(t.params),n=r?`${r}:`:"",s=`${t.from}:${t.method}:${n}${JSON.stringify(o||"")}`;return e?`${s}:${e}`:s},li=t=>Ft.get(t)||null,ii=(t,e,r)=>{let o=Ft.get(t),n={data:e,error:r,time:Date.now(),stale:!1};Ft.set(t,n);let s=I_.get(t);if(s)for(let i of s)A(i)&&i(n);return n},ai=t=>{if(t){let e=Ft.get(t);e&&(e.stale=!0);return}for(let[,e]of Ft)e.stale=!0},ul=t=>{if(t){Ft.delete(t);return}Ft.clear()},eh=t=>!t&&t!==!1?{staleTime:6e4,gcTime:3e5}:t===!1?null:t===!0?{staleTime:6e4,gcTime:3e5}:typeof t=="number"?{staleTime:t,gcTime:Math.max(t*5,3e5)}:w(t)?{staleTime:si(t),gcTime:3e5}:{staleTime:si(t.stale||t.staleTime)||6e4,gcTime:si(t.gc||t.gcTime||t.expire)||3e5,key:t.key},dl=null,OE=()=>{dl||(dl=setInterval(()=>{let t=Date.now();for(let[e,r]of Ft){let o=I_.get(e);!(o&&o.size>0)&&t-r.time>(r.gcTime||3e5)&&Ft.delete(e)}},3e4),dl.unref&&dl.unref())};OE();T_=3,Zp=t=>Math.min(1e3*2**t,3e4),D_=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:T_,delay:Zp}:typeof e=="number"?{count:e,delay:Zp}:{count:e.count??T_,delay:A(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:Zp}},$_=async(t,e)=>{let{count:r,delay:o}=e,n;for(let s=0;s<=r;s++)try{let i=await t();if(i?.error){if(n=i.error,s<r){let a=A(o)?o(s,n):o;await new Promise(c=>setTimeout(c,a));continue}return i}return i}catch(i){if(n=i,s<r){let a=A(o)?o(s,i):o;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:n}},Qo={focus:new Set,online:new Set},O_=!1,RE=()=>{if(O_||typeof window>"u")return;O_=!0;let t=()=>{for(let r of Qo.focus)r()},e=()=>{for(let r of Qo.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},R_=(t,e)=>{let r=e.__ref;if(t===!0)return{from:r.__state||e.key,method:"select",query:!0,on:"create"};if(w(t))return{from:t,method:"select",query:!0,on:"create"};if(S(t)){let o={...t};return o.from=o.from||r.__state||e.key,o.method=o.method||"select",o.on=o.on||"create",o.query===void 0&&(o.query=!0),o}return null},PE=t=>(!t||A(t),t),hl=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},L_=(t,e)=>{let o=(t?.state?.root||e?.state?.root)?.__fetchScope;return o?String(o):void 0},M_=(t,e,r)=>{let o;if(!t)o=void 0;else if(A(t))o=t(e,e.state);else{o={};for(let n in t){let s=t[n];o[n]=A(s)?s(e,e.state):s}}return o},pl=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let r=(o,n)=>{let s=e.state?.root;s?.update&&s.update({auth:{user:o,session:n,loading:!1}})};try{let o=await t.getSession();r(o?.user||null,o)}catch(o){console.warn("[fetch] Failed to restore auth session:",o.message)}t.onAuthStateChange&&t.onAuthStateChange((o,n)=>{r(n?.user||null,n)})},rh=async(t,e)=>{if(A(t.select))return t.auth!==!1&&await pl(t,e),t;if(t.__resolved)return t.auth!==!1&&await pl(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=P_(t);let r=await t.__resolving;return delete t.__resolving,r?(r.auth=t.auth,r.url=t.url,r.key=t.key,t.__resolved=r,e.fetch=r,t.auth!==!1&&await pl(r,e),r):null},fe=(t,e,...r)=>{let o=A(t[e])?t[e]:null;o&&o.call(t,...r,t,t.state,t.context)},Ce=(t,e,r,...o)=>{let n=t&&A(t[r])?t[r]:null;n&&n.call(e,...o,e,e.state,e.context)},ci=t=>{let e={},r=t.node;if(!r)return e;if(r.tagName==="FORM"){let n=new FormData(r);for(let[s,i]of n.entries())e[s]=i;return e}let o=r.querySelectorAll("input, textarea, select");for(let n=0;n<o.length;n++){let s=o[n],i=s.name||s.getAttribute("name");i&&(s.type==="checkbox"?e[i]=s.checked:s.type==="file"?e[i]=s.files:e[i]=s.value)}return e},io=(t,e,r,o={})=>{let n=r&&r.startsWith("~/"),s=n&&t.state?.root||t.state;if(s?.update)if(n){let i=r.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&i in e?s.update(e,{preventFetch:!0,...o}):s.update({[i]:e},{preventFetch:!0,...o})}else{let i=r?{[r]:e}:e;s.update(i,{preventFetch:!0,...o})}},Ve=(t,e)=>{let r=t?.__ref;r&&(r.__fetchStatus=e,r.__fetching=e.isFetching,r.__fetchError=e.error)},vr=async(t,e,r,o={})=>{let n=r?.fetch;if(!n||!e||!e.__ref||t.enabled===!1||A(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||A(t.skip)&&t.skip(e,e.state))return;let s=await rh(n,r);if(!s||!e.__ref)return;let i=e.__ref,{from:a,method:c,query:l,params:f,cache:u,transform:d,single:h,auth:g,fields:p,as:m,limit:b,offset:_,order:y,headers:x,baseUrl:k,page:E,cursor:O,getNextPageParam:$,getPreviousPageParam:D,infinite:I,placeholderData:H,initialData:V,select:rt,keepPreviousData:at}=t,G=w(rt)?rt:void 0;if(l&&A(e.getQuery)){let nt=e.getQuery(s.name||"paths");nt&&(G=nt.select||nt.length&&nt.join(",")||G)}let K=M_(f,e,r),lt=eh(u),Vt=D_(t),W=hl(e,r),wt=L_(e,r),L=W?`:${W}`:"",ot=wt?`${wt}:`:"",U=lt?u?.key||`${a}:${c}:${ot}${JSON.stringify(K||"")}${I?":infinite":""}${E?":p"+JSON.stringify(E):""}${L}`:null;if(!i.__fetchInitialized&&U&&(i.__fetchInitialized=!0,V!==void 0)){let nt=A(V)?V():V;ii(U,nt,null)}if((c==="select"||c==="rpc")&&U&&lt){let nt=li(U);if(nt&&!nt.error){let M=Date.now()-nt.time,ht=nt.stale||M>(lt.staleTime||0),q=nt.data;if(A(rt)&&(q=rt(q,e,e.state)),d&&(q=d(q,e,e.state)),io(e,q,m),!ht){Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(H!==void 0){let M=A(H)?H(e,e.state):H;M!==void 0&&io(e,M,m)}}if(U&&oi.has(U)&&!o.force){let nt=oi.get(U);try{let M=await Promise.race([nt,new Promise((ht,q)=>setTimeout(()=>q("DEDUP_TIMEOUT"),15e3))]);if(M?.data!==void 0){let ht=M.data;A(rt)&&(ht=rt(ht,e,e.state)),d&&(ht=d(ht,e,e.state)),io(e,ht,m),fe(e,"onFetchComplete",ht),Ce(t,e,"onFetchComplete",ht)}}catch{}return}let Y=!li(U)?.data;Ve(e,{isFetching:!0,isLoading:Y,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),fe(e,"onFetchStart"),Ce(t,e,"onFetchStart");let j=r?.analyze?.emitNetwork,pt=j?typeof performance<"u"?performance.now():Date.now():0;j&&j({phase:"start",mode:"query",from:a,method:c,cacheKey:U,lang:W});let Ye=$_(async()=>{if(g!==!1&&s.auth!==!1&&s.getSession){let q=await s.getSession();if(g===!0&&!q){let Lt={message:"Not authenticated"};return Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:Lt,status:"error",fetchStatus:"idle"}),fe(e,"onFetchError",Lt),Ce(t,e,"onFetchError",Lt),{data:null,error:Lt}}}let nt=s[c];if(!A(nt))return{data:null,error:{message:`Method "${c}" not found on adapter`}};let M={from:a,select:G,params:K,single:h,limit:b,offset:_,order:y,headers:x,baseUrl:k},ht=hl(e,r);if(ht&&(M.headers={...M.headers,"Accept-Language":ht}),E!==void 0){if(S(E))E.offset!==void 0&&(M.offset=E.offset),E.limit!==void 0&&(M.limit=E.limit),E.cursor!==void 0&&(M.params={...M.params,cursor:E.cursor});else if(typeof E=="number"){let q=t.pageSize||b||20;M.offset=(E-1)*q,M.limit=q}}if(O!==void 0&&(M.params={...M.params,cursor:O}),c==="insert"||c==="update"||c==="upsert"){let q;if(p===!0||t.on==="submit")q=ci(e);else if(T(p)){let Lt=ci(e);q={};for(let Yu of p)q[Yu]=Lt[Yu]}else e.state?.parse?q=e.state.parse():S(e.state)&&(q={...e.state});d&&(q=d(q,e,e.state)),M.data=q}if(c==="rpc"){let q=K;if(t.on==="submit"){let Lt=ci(e);q=t.transformParams?t.transformParams(Lt,e,e.state):Lt}M.params=q}if(c==="subscribe"){let q=s.subscribe({from:a,params:K,on:t.subscribeOn},(Lt,Yu,tI)=>{io(e,Lt,m),fe(e,"onFetchComplete",Lt),Ce(t,e,"onFetchComplete",Lt)});return i.__unsubscribe=q,{data:null,error:null,subscribed:!0}}return nt(M)},Vt);U&&oi.set(U,Ye);try{let nt=await Ye;if(nt?.subscribed)return;let{data:M,error:ht}=nt||{};if(ht){U&&ii(U,null,ht),Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:ht,status:"error",fetchStatus:"idle"}),fe(e,"onFetchError",ht),Ce(t,e,"onFetchError",ht),j&&j({phase:"error",mode:"query",from:a,method:c,cacheKey:U,error:ht.message||ht,durationMs:(typeof performance<"u"?performance.now():Date.now())-pt});return}if(M!==void 0){if((c==="select"||c==="rpc")&&U){let Lt=ii(U,M,null);Lt.gcTime=lt?.gcTime||3e5}let q=M;I&&T(M)&&(i.__pages||(i.__pages=[]),o.direction==="previous"?i.__pages.unshift(M):i.__pages.push(M),q=i.__pages.flat(),$&&(i.__nextPageParam=$(M,i.__pages),i.__hasNextPage=i.__nextPageParam!=null),D&&(i.__prevPageParam=D(M,i.__pages),i.__hasPreviousPage=i.__prevPageParam!=null)),A(rt)&&(q=rt(q,e,e.state)),d&&(q=d(q,e,e.state)),(!at||q!==void 0)&&io(e,q,m),Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),fe(e,"onFetchComplete",q),Ce(t,e,"onFetchComplete",q),j&&j({phase:"success",mode:"query",ok:!0,from:a,method:c,cacheKey:U,durationMs:(typeof performance<"u"?performance.now():Date.now())-pt})}}catch(nt){Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:nt,status:"error",fetchStatus:"idle"}),fe(e,"onFetchError",nt),Ce(t,e,"onFetchError",nt),j&&j({phase:"error",mode:"query",from:a,method:c,cacheKey:U,error:nt.message||String(nt),durationMs:(typeof performance<"u"?performance.now():Date.now())-pt})}finally{U&&oi.delete(U)}},IE=(t,e,r)=>{let o=t.on,n=e.__ref;n.__fetchListeners||(n.__fetchListeners=[]);let s=t.__runner||vr;if(o==="submit"){let i=c=>{c.preventDefault(),s(t,e,r)},a=e.node;a&&(a.addEventListener("submit",i),n.__fetchListeners.push(()=>a.removeEventListener("submit",i)))}else if(o==="click"){let i=()=>s(t,e,r),a=e.node;a&&(a.addEventListener("click",i),n.__fetchListeners.push(()=>a.removeEventListener("click",i)))}else o==="stateChange"&&(n.__fetchOnStateChange=()=>s(t,e,r))},DE=(t,e,r)=>{let o=e.__ref;o.__fetchCleanups||(o.__fetchCleanups=[]),RE();let n=t.refetchInterval;if(n){let s=typeof n=="number"?n:si(n);if(s>0){let i=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&vr(t,e,r,{force:!0})},s);o.__fetchCleanups.push(()=>clearInterval(i))}}if(t.refetchOnWindowFocus!==!1){let s=()=>{let i=hl(e,r),a=L_(e,r),c=TE(t,i,a),l=li(c),f=eh(t.cache);(!l||l.stale||Date.now()-l.time>(f?.staleTime||0))&&vr(t,e,r,{force:!0})};Qo.focus.add(s),o.__fetchCleanups.push(()=>Qo.focus.delete(s))}if(t.refetchOnReconnect!==!1){let s=()=>vr(t,e,r,{force:!0});Qo.online.add(s),o.__fetchCleanups.push(()=>Qo.online.delete(s))}},$E=(t,e,r)=>{if(!e.optimistic)return null;let o=t.__ref,n=e.as,s=t.state?.parse?t.state.parse():S(t.state)?{...t.state}:t.state;o.__optimisticSnapshot=s;let i=A(e.optimistic)?e.optimistic(r,s,t):e.optimistic;return i!==void 0&&io(t,i,n),s},Qp=(t,e)=>{let r=t.__ref,o=r.__optimisticSnapshot;o!==void 0&&(io(t,o,e.as),delete r.__optimisticSnapshot)},LE=async(t,e,r)=>{let o=r?.fetch;if(!o)return;let n=await rh(o,r);if(!n)return;let s=e.__ref,{method:i,from:a,fields:c,transform:l,as:f,on:u,auth:d,headers:h,baseUrl:g,invalidates:p,optimistic:m,onMutate:b,onSuccess:_,onError:y,onSettled:x}=t,k;if(c===!0||u==="submit")k=ci(e);else if(T(c)){let D=ci(e);k={};for(let I of c)k[I]=D[I]}else e.state?.parse?k=e.state.parse():S(e.state)&&(k={...e.state});l&&(k=l(k,e,e.state)),A(b)&&b(k,e,e.state);let E=m?$E(e,t,k):null;s.__fetching=!0,Ve(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),fe(e,"onFetchStart"),Ce(t,e,"onFetchStart");let O=r?.analyze?.emitNetwork,$=O?typeof performance<"u"?performance.now():Date.now():0;O&&O({phase:"start",mode:"mutation",from:a,method:i});try{if(d!==!1&&n.auth!==!1&&n.getSession){let K=await n.getSession();if(d===!0&&!K){E!==void 0&&Qp(e,t);let lt={message:"Not authenticated"};fe(e,"onFetchError",lt),Ce(t,e,"onFetchError",lt);return}}let D=n[i];if(!A(D))return;let I={from:a,data:k,headers:h,baseUrl:g};t.params&&(I.params=M_(t.params,e,r));let H=hl(e,r);H&&(I.headers={...I.headers,"Accept-Language":H});let V=D_(t),rt=await $_(()=>D(I),V),{data:at,error:G}=rt||{};if(G){E!==void 0&&Qp(e,t),Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:G,status:"error",fetchStatus:"idle"}),fe(e,"onFetchError",G),A(y)&&y(G,k,e),A(x)&&x(null,G,k,e),O&&O({phase:"error",mode:"mutation",from:a,method:i,error:G.message||String(G),durationMs:(typeof performance<"u"?performance.now():Date.now())-$});return}if(delete s.__optimisticSnapshot,at!==void 0){let K=f?{[f]:at}:at;e.state?.update&&e.state.update(K,{preventFetch:!0})}if(Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),fe(e,"onFetchComplete",at),Ce(t,e,"onFetchComplete",at),A(_)&&_(at,k,e),A(x)&&x(at,null,k,e),O&&O({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-$}),p){let K=T(p)?p:[p];for(let lt of K)if(lt===!0||lt==="*")for(let[Vt]of Ft)Vt.startsWith(a+":")&&ai(Vt);else ai(lt)}}catch(D){E!==void 0&&Qp(e,t),Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:D,status:"error",fetchStatus:"idle"}),fe(e,"onFetchError",D),Ce(t,e,"onFetchError",D),A(y)&&y(D,k,e),A(x)&&x(null,D,k,e),O&&O({phase:"error",mode:"mutation",from:a,method:i,error:D.message||String(D),durationMs:(typeof performance<"u"?performance.now():Date.now())-$})}finally{s.__fetching=!1}},fi=(t,e,r,o)=>{if(!t||!o?.fetch)return;let s=ut(t,e);if(!s)return;let i=T(s)?s.map(c=>R_(ut(c,e),e)).filter(Boolean):[R_(s,e)].filter(Boolean);for(let c of i){let l=c.method==="insert"||c.method==="update"||c.method==="upsert"||c.method==="delete",f=l?LE:vr;c.on==="create"?f(c,e,o):Promise.resolve().then(()=>{IE({...c,__runner:f},e,o)}),!l&&c.on==="create"&&(c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&DE(c,e,o)}let a=e.__ref;a.refetch=c=>{for(let l of i)vr(l,e,o,{force:!0,...c})},a.fetchNextPage=()=>{let c=i[0];if(!c||!c.infinite)return;let l=a.__nextPageParam;if(l==null)return;let f={...c,cursor:l};vr(f,e,o,{direction:"next",force:!0})},a.fetchPreviousPage=()=>{let c=i[0];if(!c||!c.infinite)return;let l=a.__prevPageParam;if(l==null)return;let f={...c,cursor:l};vr(f,e,o,{direction:"previous",force:!0})}},ME={invalidateQueries:t=>{if(!t){ai();return}if(w(t))for(let[e]of Ft)(e.startsWith(t)||e.includes(t))&&ai(e);else if(T(t)){let e=t.join(":");for(let[r]of Ft)r.includes(e)&&ai(r)}},removeQueries:t=>{if(!t){ul();return}if(w(t))for(let[e]of Ft)(e.startsWith(t)||e.includes(t))&&ul(e)},getQueryData:t=>li(t)?.data??void 0,setQueryData:(t,e)=>{let r=li(t),o=A(e)?e(r?.data):e;ii(t,o,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let o=await rh(r,e);if(!o)return;let n=t.cache?.key||`${t.from}:${t.method||"select"}:${JSON.stringify(t.params||"")}`,s=o[t.method||"select"];if(!A(s))return;let i=await s({from:t.from,params:t.params,limit:t.limit,offset:t.offset,order:t.order,single:t.single});if(i?.data!==void 0&&!i?.error){let a=ii(n,i.data,null);a.gcTime=eh(t.cache)?.gcTime||3e5}return i},getCache:()=>Ft,clear:()=>ul(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of Ft)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||ul(r))}},oh={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||oi.clear(),fi(e,t,t.state,t.context))}},FE=fi});function di(t){let e=this,{__ref:r}=e,o=[].concat(t),n=r.root[o[0]];if(!o||!o.length)return console.log(o,"on",e.key,"is undefined");for(;n.key===o[0]&&(o.shift(),!!o.length);)if(n=n[o[0]],!n)return;return n}function sh(t){let e=this,{parent:r}=e;if(A(t))return r.state&&t(r,r.state,r.context)?r:r.parent?r.lookup(t):void 0;if(e[t])return e[t];for(;r.param!==t;){if(r[t])return r[t];if(r=r.parent,!r)return}return r}function ih(t){let e=this,{__ref:r}=e,o=r?.__children;if(o)for(let n=0;n<o.length;n++){let s=o[n],i=e[s];if(s===t)return i;if(A(t)){let c=t(i,i.state,i.context);if(i.state&&c)return i}let a=i?.lookdown?.(t);if(a)return a}}function ah(t,e=[]){let r=this,{__ref:o}=r,n=o?.__children;if(n){for(let s=0;s<n.length;s++){let i=n[s],a=r[i];if(i===t)e.push(a);else if(A(t)){let c=t(a,a.state,a.context);a.state&&c&&e.push(a)}a?.lookdownAll?.(t,e)}return e.length?e:void 0}}function gl(t={}){let e=this;if(e.node?.style){for(let r in t){let o=t[r],n=e[r];if(S(o)&&n)gl.call(n,o);else if(o!=null){let s=r.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),i=String(o).replace(/\s*!important\s*$/,"");e.node.style.setProperty(s,i,"important")}}return e}}function N_(t){let e=this;if(kr("beforeRemove",e,t)===!1)return e;A(e.node.remove)?e.node.remove():wr()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=Cs(e.parent.__ref.__children,e.key)),kr("remove",e,t)}function ch(t){return this[t]}function lh(t,e){let r=this;if(t)return r.update(t,e),r}function fh(t){return t?this.__ref&&this.__ref[t]:this.__ref}function pi(){return this.getRef("__children").map(e=>this[e])}function hi(){return this.getRef().path}function mi(t){let e=null,r=o=>o.__element&&o.root?.isRootState;if(!this)e=F_();else if(r(this))e=this.root;else if(this.__ref&&this.__ref.path){let o=this.state&&r(this.state),n=A(this.state)&&this.parent.state&&r(this.parent.state);(o||n)&&(e=this.state.root||this.parent.state.root)}return e||(e=F_()),t?e?.[t]:e}function yi(t){let e=this.getRootState()?.__element;return e&&Object.keys(e).length>0&&t?e[t]:e}function bi(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function _i(t){let e=this.getRoot()?.context;return t?e[t]:e}function xi(t){let e=this.context;return t?e[t]:e}function ml(){let t=this,e=[];for(let r in t)!Object.prototype.hasOwnProperty.call(t,r)||_r.has(r)&&!Rs.has(r)||e.push(r);return e}function yl(t=[]){let e=this,r={},o=ml.call(e),n=o.includes("children"),s=t.length?new Set(t):null;for(let i=0;i<o.length;i++){let a=o[i];if(s&&s.has(a)||!Object.prototype.hasOwnProperty.call(e,a)||n&&a==="content")continue;let c=e[a];if(a==="state"){if(e.__ref&&!e.__ref.__hasRootState)continue;let l=A(c&&c.parse)?c.parse():c;r[a]=A(l)?l:JSON.parse(JSON.stringify(l||{}))}else if(a==="scope"){if(e.__ref&&!e.__ref.__hasRootScope)continue;r[a]=JSON.parse(JSON.stringify(c||{}))}else if(a==="props"){let{__element:l,update:f,...u}=e[a];r[a]=u}else bt(c)&&Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=c)}return r}function ui(t=[],e=new WeakSet){let r=this;if(e.has(r))return;e.add(r);let o=yl.call(r,t),n=t.length?new Set(t):null;for(let s in o){if(n&&n.has(s)||!Object.prototype.hasOwnProperty.call(r,s))continue;let i=o[s];Array.isArray(i)?o[s]=i.map(a=>z(a)?ui.call(a,t,e):a):z(i)&&(o[s]=ui.call(i,t,e))}return o}function tn(...t){if(Er!=="test"&&Er!=="development")return;let e=this,{__ref:r}=e;return console.groupCollapsed(e.key),t.length?t.forEach(o=>console.log(`%c${o}:
21
- `,"font-weight: bold",e[o])):(console.log(r.path),e.keys().forEach(n=>console.log(`%c${n}:`,"font-weight: bold",e[n]))),console.log(e),console.groupEnd(e.key),e}function dh(...t){(Er==="test"||Er==="development")&&console.log(...t)}function wi(...t){(Er==="test"||Er==="development")&&console.warn(...t)}function co(...t){if(Er==="test"||Er==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&tn.call(this),new Error(...t)}}function Si(){let t=this,{key:e,parent:r}=t,{__children:o}=r.__ref,n=o.indexOf(e),s=o[n+1];return r[s]}function ki(t){let e=t||this,{key:r,parent:o}=e,{__children:n}=o.__ref;if(!n)return;let s=n.indexOf(r);return o[n[s-1]]}function vi(t={}){let e=this;e.data||(e.data={}),e.data.varCaches||(e.data.varCaches={});let r=e.data.varCaches,o={},n;for(let s in t)t[s]!==r[s]&&(n=!0,o[s]=t[s]);return{changed:s=>{if(!n)return;let i=s(o,ft(r));for(let a in o)r[a]=o[a];return i},timeout:(s,i)=>{if(!n)return;let a=setTimeout(()=>{s(o),clearTimeout(a)},i)}}}function ph(t,...e){let r=this.context,o=r.utils?.[t]||r.functions?.[t]||r.methods?.[t]||r.snippets?.[t];if(o)try{let n=o.call(this,...e);return n&&typeof n.then=="function"&&n.catch(s=>{co.call(this,s)}),n}catch(n){if(co.call(this,n),r?.strictMode)throw n}}async function Ci(){let t=this,e=t.context?.fetch;if(!e)return null;if(typeof e.select=="function"){if(!e.__authInitialized&&e.getSession){let{initAdapterAuth:n}=await Promise.resolve().then(()=>(Cr(),ao));await n(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:n}=await Promise.resolve().then(()=>(Cr(),ao));await n(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let r=Promise.resolve().then(()=>(Cr(),ao)).then(({resolveDb:n})=>n(e));e.__resolving=r;let o=await r;if(e.__resolved=o,t.context.fetch=o,delete e.__resolving,o?.getSession){let{initAdapterAuth:n}=await Promise.resolve().then(()=>(Cr(),ao));await n(o,t.context)}return o}function Ei(t){let e=this,r=t||ri.useStateQuery||e.context?.useStateQuery;if(!r)return null;let o={};if(nh(e,o),r===!0)return o;let n=HE[r];return n?n(o):o}function hh(t,e){return!!(Wo.has(t)||e?.context?.methods?.[t])}var Er,j_,gi,F_,uh,nh,NE,B_,jE,BE,UE,VE,zE,HE,U_=F(()=>{"use strict";Yp();qo();Ot();tr();ip();Ho();Jp();Er="production";j_=null,gi=t=>{j_=t||null},F_=()=>j_||null;uh=(t,e,r,o)=>Object.defineProperty(t,e,{get:r,set:o});nh=(t,e)=>{let r=t.__ref;if(!r)return;let o=r.__state;o&&typeof o=="string"&&NE(e,o);let n=r.__children;if(n)for(let a=0;a<n.length;a++){let c=t[n[a]];c&&c.__ref&&nh(c,e)}let s=r.contentElementKey||"content",i=t[s];i&&i.__ref&&nh(i,e)},NE=(t,e)=>{let o=e.replaceAll("../","").replaceAll("~/","").split("/"),n=t;for(let s=0;s<o.length;s++){let i=o[s];s===o.length-1?n[i]||(n[i]=!0):(n[i]===!0&&(n[i]={}),n[i]||(n[i]={}),n=n[i])}},B_=(t,e=0)=>{let r=" ".repeat(e),o=Object.entries(t);return o.length?o.map(([s,i])=>i===!0?`${r}${s}`:`${r}${s} {
22
- ${B_(i,e+1)}
20
+ return (${c}); })`)(e)}catch{try{e[a]=v.eval(`(${c})`)}catch{e[a]=c}}}for(let[i,a]of r)if(!o(i))try{e[i]=v.eval(`(${a})`)}catch{e[i]=a}return e},zd=(t,e={verbose:!0})=>{try{return t?v.eval("("+t+")"):{}}catch(r){e.verbose&&console.warn(r)}},Wd=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),Oc=t=>{for(let e in t)return!1;return!0},qd=t=>S(t)&&Oc(t),Kd=()=>Object.create(null),Fs=(t,e,r={})=>{let o=r.exclude||[],n=r.preventUnderscore;for(let s in e)o.includes(s)||!n&&oo(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},no=(t,e,r=[])=>{let o=r instanceof Set;for(let n in e)oo(n)||n==="constructor"||n==="prototype"||(o?r.has(n):r.includes(n))||(t[n]=e[n]);return t},qt=(t,e,r={},o=new WeakMap)=>{if(!H(t)||!H(e)||zt(t)||zt(e))return e;if(o.has(t))return o.get(t);o.set(t,t);let n=r.exclude,s=n?n instanceof Set?n:new Set(n):null,i=!r.preventForce;for(let a in e){if(!Object.prototype.hasOwnProperty.call(e,a)||s&&s.has(a)||i&&oo(a)||a==="constructor"||a==="prototype")continue;let c=t[a],l=e[a];zt(l)?t[a]=l:H(c)&&H(l)?t[a]=qt(c,l,r,o):l!==void 0&&(t[a]=l)}return t},Rc=(t,e,r=new Set)=>{if(typeof t!="object"||typeof e!="object"||t===null||e===null)return t===e;if(r.has(t)||r.has(e))return!0;r.add(t),r.add(e);let o=Object.keys(t),n=Object.keys(e);if(o.length!==n.length)return!1;for(let s=0;s<o.length;s++){let i=o[s];if(!Object.prototype.hasOwnProperty.call(e,i)||!Rc(t[i],e[i],r))return!1}return!0},gE=new Set(["node","__ref"]),Gd=(t,e,r=gE)=>{if(t===e)return!0;if(!H(t)||!H(e)||zt(t)||zt(e))return t===e;let o=r instanceof Set?r:new Set(r),n=new WeakSet;function s(i,a){if(n.has(a))return!0;n.add(a);for(let c in a){if(!Object.prototype.hasOwnProperty.call(a,c)||o.has(c))continue;if(!Object.prototype.hasOwnProperty.call(i,c))return!1;let l=a[c],f=i[c];if(zt(l)||zt(f)){if(l!==f)return!1}else if(H(l)&&H(f)){if(!s(f,l))return!1}else if(l!==f)return!1}return!0}return s(t,e)},Yd=(t,e)=>{if(e==null)return t;if(Wt(e)("string","number"))delete t[e];else if(T(e))for(let r=0;r<e.length;r++)delete t[e[r]];else throw new Error("Invalid input: props must be a string or an array of strings");return t},Pc=t=>{if(t===null||typeof t!="object")return t;let e=Object.create(null);for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=Pc(t[r]));return e},Xd=(t,e)=>{if(t.length===0)return e;let r={},o=r;for(let n=0;n<t.length;n++)n===t.length-1&&e?o[t[n]]=e:(o[t[n]]={},o=o[t[n]]);return r},Jd=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let n=0;n<e.length-1;n++){if(r[e[n]]===void 0)return;r=r[e[n]]}let o=e[e.length-1];r&&Object.prototype.hasOwnProperty.call(r,o)&&delete r[o]},Zd=(t,e,r)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let o=t;for(let n=0;n<e.length-1;n++)(!o[e[n]]||typeof o[e[n]]!="object")&&(o[e[n]]={}),o=o[e[n]];return o[e[e.length-1]]=r,t},Qd=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let o=0;o<e.length;o++){if(r==null)return;r=r[e[o]]}return r},tp=t=>{let r=[],o=0;for(let n=0;n<t.length;n++)if(r.length<2)r.push(t[n]);else if(t[n]===r[n%2]?o++:(r=[t[n-1],t[n]],o=1),o>=20)return(Zb==="test"||Zb==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",r),!0},ep=t=>{let e=new WeakSet;function r(o){if(o&&typeof o=="object"){if(e.has(o))return!0;e.add(o);for(let n in o)if(Object.prototype.hasOwnProperty.call(o,n)&&r(o[n]))return console.log(o,"cycle at "+n),!0}return!1}return r(t)},rp=(t,e)=>{let r=e instanceof Set?e:new Set(e),o={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&!r.has(n)&&(o[n]=t[n]);return o}});var Ns,js,Bs,Ic=F(()=>{"use strict";tr();Ns=(function(){let t=0;function e(){return t++,t}return e})(),js=Ns,Bs=(t,e,r)=>(ut(r,t)||r||t.key||Ns()).toString()});var ve,op,wr,Dc,np,sp,ip,Sr,ap,so,Pt,cp=F(()=>{"use strict";ve="production",op=ve,wr=(t=ve)=>t==="production",Dc=(t=ve)=>t==="testing"||t==="test",np=Dc,sp=(t=ve)=>t==="staging",ip=(t=ve)=>t==="local",Sr=(t=ve)=>t==="development"||t==="dev"||t==="local",ap=(t,e=ve)=>e[t],so=(t=ve)=>!wr(t),Pt=t=>{let e=t&&"env"in t?t.env:typeof process<"u"&&process.env?"production":void 0;if(e&&e!=="production")return!0;let r=t&&"hostname"in t?t.hostname:typeof location<"u"?location.hostname:void 0;return typeof r=="string"&&r?r==="localhost"||r==="127.0.0.1"||r.endsWith(".localhost"):!1}});function Us(t,e,r){let o;return function(){let n=this,s=arguments,i=function(){o=null,r||t.apply(n,s)},a=r&&!o;clearTimeout(o),o=setTimeout(i,e),a&&t.apply(n,s)}}function dp(t,e=window){let r=function(){return t.apply(e,arguments)};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r}var lp,fp,mE,up,Go,Yo,At,Xo=F(()=>{"use strict";lp=(t,e,r=300)=>{let o;return(...n)=>{clearTimeout(o),o=setTimeout(()=>{e.apply(t,n)},r)}},fp=t=>{let e={};return(...r)=>{let o=r[0];if(o in e)return e[o];{let n=t(o);return e[o]=n,n}}},mE=/^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/,up=t=>mE.test(t),Go=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let r of e)if(r.resolveHandler)return!0;return!1},Yo=(t,e)=>{if(typeof t=="function")return t;let r=e?.context?.plugins;if(!r)return t;for(let o of r)if(o.resolveHandler){let n=o.resolveHandler(t,e);if(typeof n=="function")return n}return t},At=(t,e,...r)=>{let o=e?.context?.plugins;if(!o)return!1;let n=!1;for(let s of o)typeof s[t]=="function"&&(s[t](e,...r),n=!0);return n}});var pp,c_=F(()=>{"use strict";Ot();tr();pp=(t,e)=>{let{__ref:r}=t,o=t.if;if(A(o)){let n;try{n=o(t,t.state,t.context)}catch(s){typeof console<"u"&&console.warn("[DOMQL] if condition error:",s),delete r.__if;return}n?r.__if=!0:delete r.__if}else o!=null&&typeof o=="object"?ut(o,t)?r.__if=!0:delete r.__if:r.__if=!0}});var hp,gp,l_=F(()=>{"use strict";hp=(t,...e)=>{t&&e.map(r=>console.log(r))},gp=(t,e,...r)=>{t&&(console.group(e),r.map(o=>console.log(o)),console.groupEnd(e))}});function xp(t){let e;try{if(!window.localStorage)return;e=window.localStorage.getItem(t)}catch{return}if(e!==null)try{return JSON.parse(e)}catch{return}}function wp(t,e){if(e!=null)try{if(!window.localStorage)return;let r=typeof e=="object"?JSON.stringify(e):e;window.localStorage.setItem(t,r)}catch{}}var mp,yp,bp,_p,f_=F(()=>{"use strict";Ot();ws();mp=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),yp=(t,e,r=365)=>{if(Tt(Q)||Tt(Q.cookie))return;let o=new Date;o.setTime(o.getTime()+r*24*60*60*1e3);let n=`expires=${o.toUTCString()}`;Q.cookie=`${t}=${e};${n};path=/`},bp=t=>{if(Tt(Q)||Tt(Q.cookie))return;let e=`${t}=`,o=decodeURIComponent(Q.cookie).split(";");for(let n=0;n<o.length;n++){let s=o[n];for(;s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return""},_p=t=>{Tt(Q)||Tt(Q.cookie)||(Q.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var Jo,u_,Sp,kp=F(()=>{"use strict";Jo={root:["body","html"],head:["title","base","meta","style","noscript","script"],body:new Set(["string","style","fragment","a","abbr","acronym","address","applet","area","article","aside","audio","b","basefont","bdi","bdo","big","blockquote","br","button","canvas","caption","center","cite","code","search","col","colgroup","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","hgroup","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","template","hgroup","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr","svg","path","circle","ellipse","line","polygon","polyline","rect","g","defs","symbol","use","text","tspan","image","clipPath","mask","pattern","marker","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","feBlend","feColorMatrix","feFlood","feComposite","foreignObject"])},u_=new Set(["svg","path","circle","ellipse","line","polygon","polyline","rect","g","defs","symbol","use","text","tspan","image","clipPath","mask","pattern","marker","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","feBlend","feColorMatrix","feFlood","feComposite","foreignObject"]),Sp=t=>Jo.body.has(t)});var vp,d_,Zo,zs,Kt,Cp,$c,Ws,Ep,qs,Lc,Mc,Ks,Fc,Qo,yE,je,p_,Vs,Gs,Ap,Hs,Tp,Op,Nc,jc,Bc,Uc,Vc,Hc,h_,zc=F(()=>{"use strict";Wo();Rp();tr();Ot();vp="production",d_=t=>t.sourcemap!==!1&&vp!=="production",Zo=t=>{if(t.includes("+"))return t.split("+").filter(Be);if(t.includes("_")){let[e]=t.split("_");return[e]}if(t.includes(".")&&!Be(t.split(".")[1])){let[e]=t.split(".");return[e]}return[t]},zs=(t,e,r)=>{let o=[],n=Zo(r);n&&(o=[...n]);let s=t.extends;return s&&(o=T(s)?[...o,...s]:[...o,s]),o},Kt=(t,e)=>{let{__ref:r}=e,{__extends:o}=r;if(!t)return o;let n=e.variant,s=e.context;if(n&&s?.components&&!Array.isArray(t)&&typeof t=="string"){let i=`${t}.${n}`;s.components[i]&&(t=i)}return o.includes(t)||(o=Array.isArray(t)?[...o,...t]:[...o,t],r.__extends=o),o},Cp=(t,e)=>{if(!t)return e;let{extends:r}=e,o=T(r)?r:[r],n=T(t)?t:[t];return{...e,extends:Ho(n,o)}},$c=()=>Math.random().toString(36).substring(2),Ws={},Ep={},qs=t=>Ws[t.__hash],Lc=(t,e)=>{let r=$c();return w(t)||(t.__hash=r),r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(Ws[r]=e),e},Mc=(t,e)=>t.__hash?e.concat(qs(t)):Lc(t,e),Ks=(t,e,r,o=new Set,n,s)=>{for(let i of t)T(i)?Ks(i,e,r,o,n,s):Qo(i,e,r,o,n,void 0,s);return e},Fc=(t,e,r,o=new Set,n,s,i)=>{let a=t.extends,c={...t};delete c.extends;let l=!1;for(let f in c){l=!0;break}return l&&(e.push(c),n&&n.push(s)),a&&Qo(a,e,r,o,n,s,i),e},Qo=(t,e,r,o=new Set,n,s,i)=>{if(!t||o.has(t))return e;if(T(t))return Ks(t,e,r,o,n,i);let a=s;return w(t)?(a=t,t=Gs(t,r)):i&&S(t)&&i.has(t)&&(a=i.get(t)),o.add(t),t?.extends?Fc(t,e,r,o,n,a,i):t&&(e.push(t),n&&n.push(a)),e},yE=new Set(["parent","node","__ref","__proto__","extends","childExtends","childExtendsRecursive"]),je=(t,e,r,o,n)=>{e=ft(e);for(let s in e){if(yE.has(s))continue;let i=t[s],a=e[s];if(a!==void 0&&Object.prototype.hasOwnProperty.call(e,s)&&s!=="__proto__"&&s!=="constructor"&&s!=="prototype"){if(i===void 0)t[s]=a,r&&o?S(a)&&!T(a)?(r[s]=r[s]||{},p_(r[s],a,o)):r[s]=o:r&&n?.[s]&&(r[s]=n[s]);else if(S(i)&&S(a)){let c=r?r[s]=r[s]||{}:void 0,l=n?.[s];Be(s)?t[s]=je(i,a,c,o,l):je(i,a,c,o,l)}if(s==="extends"||s==="childExtends"||s==="childExtendsRecursive"){if(T(i)&&T(a))t[s]=i.concat(a);else if(T(i)&&S(a)){let c=je({},i);t[s]=je(c,a)}}}}return t},p_=(t,e,r,o)=>{if(o||(o=new WeakSet),!o.has(e)){o.add(e);for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n)||n==="__proto__"||n==="constructor"||n==="prototype")continue;let s=e[n];S(s)&&!T(s)?(t[n]=t[n]||{},p_(t[n],s,r,o)):t[n]=r}}},Vs=(t,e,r)=>t.reduce((o,n,s)=>{let i=ft(n),a=r?r[s]:void 0;return je(o,i,e,a)},{}),Gs=(t,e,r={},o)=>{let n=e?.components||r.components,s=e?.pages||r.pages;if(w(t)){let i=n&&(n[t+"."+o]||n[t]||n["smbls."+t]),a=s&&t.charCodeAt(0)===47&&s[t];if(i)return i;if(a)return a;r.verbose&&(vp==="test"||vp==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},Ap=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),Hs=(t,e,r,o)=>{if(!t)return[];if(t.__hash)return qs(t)||[];let s=Qo(t,[],e,new Set,r,void 0,o);return r?s:Mc(t,s)},Tp=(t,e)=>{if(!t)return e;let r=T(t)?t:[t];return Ho(r,e)},Op=t=>{let e=[];function r(o){for(let n in o)Object.prototype.hasOwnProperty.call(o,n)&&(Be(n)&&e.push(n),n==="extends"&&(typeof o[n]=="string"?e.push(o[n]):Array.isArray(o[n])&&(e=e.concat(o[n]))),typeof o[n]=="object"&&o[n]!==null&&r(o[n]))}return r(t),e},Nc=(t,e,r={})=>{let{__ref:o}=t,n=t.context||e.context,s=t.variant;if(t.extends)if(Array.isArray(t.extends)&&t.extends.length>0){let[i,...a]=t.extends;if(typeof i=="string"&&s&&n?.components){let c=`${i}.${s}`;n.components[c]?Kt([c,...a],t):Kt(t.extends,t)}else Kt(t.extends,t)}else if(typeof t.extends=="string"&&s&&n?.components){let i=`${t.extends}.${s}`;n.components[i]?Kt(i,t):Kt(t.extends,t)}else Kt(t.extends,t);return jc(t,e,r),Bc(t,e,r),Uc(t,e,r),t.component&&Kt(ut(t.component,t),t),n.defaultExtends&&Kt(n.defaultExtends,t),zo(o.__extends)},jc=(t,e,r={})=>{let{__ref:o}=t;return r.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&Kt(e.childProps.extends,t),o.__extends},Bc=(t,e,r={})=>{let{__ref:o}=t,n=r.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!n&&s&&Kt(s,t),o.__extends},Uc=(t,e,r={})=>{let{__ref:o}=t,n=e.childExtendsRecursive,s=r.ignoreChildExtendsRecursive||t.ignoreChildExtendsRecursive,i=t.key==="__text";return n&&!i&&!s&&Kt(n,t),o.__extends},Vc=(t,e,r={})=>{let{__ref:o}=t,n=t.context||e.context,s=t.variant,i=d_(r),a=i?[...o.__extends]:null,c=zo(o.__extends.map((l,f)=>Gs(l,n,r,f===0&&s)));if(i){let l=new WeakMap;for(let d=0;d<c.length;d++){let h=c[d],g=a[d];h&&S(h)&&w(g)&&l.set(h,g)}let f=[],u=Hs(c,n,f,l);o.__extendsStack=u,o.__extendsNames=f}else{let l=Hs(c,n);o.__extendsStack=l}return o.__extendsStack},Hc=(t,e,r={})=>{let{__ref:o}=t,{__extendsStack:n}=o;if(d_(r)){let s={},i=o.__extendsNames||[],a=Vs(n,s,i),c={};je(t,a,c,void 0,s),o.__sourcemap=c}else{let s=Vs(n);je(t,s)}return t},h_=(t,e,r={})=>(Nc(t,e,r),Vc(t,e,r),Hc(t,e,r),t)});function Pp(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function Ip(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function Dp(t,e,r){let{context:o}=e||{},[n]=Zo(r),s=r||n;return o?.components?.[s]||o?.pages?.[s]}var Be,Rp=F(()=>{"use strict";zc();Ot();Be=t=>{if(!w(t)||!t.length)return!1;let e=t.charCodeAt(0);return e>=65&&e<=90}});function g_(t,e){let{props:r,on:o}=e,n=eo(t.split("on")[1]),s=o[n],i=r[t];A(s)?o[n]=(...a)=>{if(s(...a)!==!1&&A(i))return i(...a)}:o[n]=i}var m_=F(()=>{"use strict";Rs();Ot()});function Wc(t,e={}){let r=e.cachedKeys||[];for(let o in t){let n=t[o];if(o.length>2&&o.charCodeAt(0)===111&&o.charCodeAt(1)===110&&o[2]===o[2].toUpperCase()&&(A(n)||n!=null&&Go(this.context))){let g=eo(o.slice(2));t.on&&(t.on[g]=n),delete t[o];continue}if(o==="childProps"){t.props[o]=n,delete t[o],r.push(o);continue}let a=this.define?.[o],c=this.context?.define?.[o],l=S(a)||A(a),f=S(c)||A(c);if(l||f)continue;let u=o.charAt(0);if(b_.has(u)){t.props[o]=n,delete t[o],r.push(o);continue}let d=$p.test(o)||y_.test(o)||_E(n),h=_r.has(o);!d&&!h&&(o in t.props||(t.props[o]=n),delete t[o],r.push(o))}return t}function qc(t=this,e){let r=e.cachedKeys||[];for(let o in t.props){let n=t.props[o],s=o.length>2&&o.charCodeAt(0)===111&&o.charCodeAt(1)===110,i=A(n)||n!=null&&Go(this.context);if(s&&i){g_(o,t),delete t.props[o];continue}if(r.includes(o)||o==="childProps")continue;let a=o.charAt(0);if(b_.has(a))continue;let c=this.define?.[o],l=this.context?.define?.[o],f=S(c)||A(c),u=S(l)||A(l),d=$p.test(o)||y_.test(o),h=_r.has(o);(d||h||f||u)&&(t[o]===void 0||n===null)&&(t[o]=n,t.props&&delete t.props[o])}return t}function Kc(t=this){let e=[];return Wc.call(this,t,{cachedKeys:e}),qc.call(this,t,{cachedKeys:e}),t}function Lp(t={}){return t.on||(t.on={}),t.props||(t.props={}),Kc.call(this,t)}function Fp(t,e){this.__element.update({props:t},e)}function Qs(t){let e={update:Fp.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var $p,y_,b_,bE,_E,Js,Ys,Mp,Zs,ti,ei,Gc,Xs,Np,jp,Bp=F(()=>{"use strict";Ko();m_();tr();Ot();Rs();Xo();$p=/^[A-Z]/,y_=/^\d+$/,b_=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),bE=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),_E=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if(bE.has(e)||$p.test(e))return!0;return!1},Js=(t,e,r)=>{let{props:o,__ref:n}=t;if(n.__propsStack=[],o)n.__initialProps=o;else return{};return H(o)?{...o}:(n.__propsStack.push(o),{})};Ys=t=>Wt(t)("string","number")?{inheritedString:t}:t,Mp=(t,e)=>!t||!e.length?!1:e.includes(t),Zs=(t,e)=>{let{__ref:r}=t,o=r.__propsStack||[],n=e.props;if(!n)return o;let s=n[t.key],i=n.childProps||e.childProps,a=t.props?.ignoreChildProps;if(i&&!a){let c=Ys(i);o.unshift(c)}if(s){let c=Ys(s);o.unshift(c)}return o};ti=t=>{let e=new Set;return t.filter(r=>!r||xr.has(r)||e.has(r)?!1:(e.add(r),!0))},ei=(t,e,r)=>(e.props=t.reduce((o,n)=>{if(xr.has(n))return o;for(;A(n);)n=ut(n,e);return st(o,ft(n,{exclude:xr}))},{}),Qs(e),e.props),Gc=(t,e)=>{let{props:r,__ref:o}=t,n=o.__propsStack||[];if(e?.props&&(n=[...Zs(t,e)]),S(r)?n.push(r):r==="inherit"&&e?.props?n.push(e.props):r&&n.push(r),T(o.__extendsStack))for(let s=0;s<o.__extendsStack.length;s++){let i=o.__extendsStack[s];i.props&&i.props!==r&&n.push(i.props)}return o.__propsStack=ti(n),o.__propsStack},Xs=(t,e)=>{let{__ref:r}=t,o=Gc(t,e);o.length?ei(o,t):(r.__propsStack=[],t.props={})},Np=function(t,e,r){let{__ref:o}=t;if(o.__if)Xs(t,e);else try{Xs(t,e)}catch(n){t.context?.designSystem?.verbose&&console.warn("initProps error at",o.path?.join("."),n),t.props={},o.__propsStack=[]}return Qs(t),t},jp=(t,e,r)=>{let{__ref:o}=e,s=[...o.__propsStack||[]],i=Zs(e,r);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),o.__propsStack=ti(s),o.__propsStack.length&&ei(o.__propsStack,e),e}});var __,Yc,Xc,Jc,Zc,Up,Qc,tl,el,Vp,x_=F(()=>{"use strict";zc();Ic();ks();Bp();kp();Ot();__="production",Yc=(t,e,r)=>{let o=e.childExtends&&e.childExtends.tag,n=e.childProps&&e.childProps.tag,s=Jo.body.has(r)&&r;return{text:t,tag:o||n||s||"string"}},Xc=(t,e,r)=>{if(t===void 0)return(__==="test"||__==="development")&&console.warn(r,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:Wt(t)("string","number")?Yc(t,e,r):A(t)?{props:t}:t},Jc=(t,e)=>{let r={};return r.origin=t,r.parent=e,r},Zc=(t,e,r,o,n)=>{if(!e)return n;if(Qe(e)){let s={key:":root",node:e};return n[`${r}_parent`]=s,s}return e},Up=(t,e)=>{let{__ref:r}=t,{__ref:o}=e,n=e&&e.key===":root";r?.root||(r.root=n?t:o?.root)},Qc=(t,e,r)=>{let{__ref:o}=e;return o||(o=e.ref={}),o.path||(o.path=[]),o.path.concat(r)},tl=(t,e,r,o,n)=>(o.context&&!n.context&&!t.context&&(n.context=o.context),o.context||e.context||n.context||t.context),el=(t,e,r)=>{let o=Jc(t,e);return t.__ref=o,o.__defineCache||(o.__defineCache={}),o.__exec||(o.__exec={}),o.__execProps||(o.__execProps={}),o.__class||(o.__class={}),o.__classNames||(o.__classNames={}),o.__attr||(o.__attr={}),o.__changes||(o.__changes=[]),o.__children||(o.__children=[]),o.__extends=zs(t,e,r),o.path=Qc(t,e,r),o},Vp=(t,e,r,o,n)=>{let i=t?.__hash?{extends:[t]}:Xc(t,e,r);if(!i)return;let a=Zc(i,e,r,o,n),c=Bs(i,a,r);el(i,a,c);let l=Js(i,a,c),f=tl(i,a,c,o,n),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var Hp,rl,ol,nl,sl,zp,il,Wp,qp,Kp,Gp,w_,ri,er,Ue,S_=F(()=>{"use strict";Wo();Ko();tr();Ot();Hp=t=>{let{state:e,props:r,__ref:o}=t,n=r?.state||e;return Wt(n)("string","number")?(o.__state=n,{value:n}):n===!0?(o.__state=t.key,{}):n?(o.__hasRootState=!0,n):!1},rl=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},ol=(t,e)=>{if(!t.includes("../"))return;let o=t.split("../").length-1;for(let n=0;n<o;n++){if(!e.parent)return null;e=e.parent}return e},nl=(t,e,r={})=>{let o=w(t)?t.split("/"):[t],n=o.length-1;for(let s=0;s<n;s++){let i=o[s],a=o[s+1];if(i==="__proto__"||a==="__proto__")return;let c=e[i];c||(c=e[i]={}),c[a]||(c[a]={}),t=a,e=c}return r.returnParent?e:e[t]},sl=(t,e,r={})=>{let n=t.__ref.__state;if(!il(t))return;let s=rl(n,e.state),i=e.state;if(s)i=s,n=n.replaceAll("~/","");else{let a=ol(n,e.state);a&&(i=a,n=n.replaceAll("../",""))}if(i)return nl(n,i,r)},zp=(t,e)=>{let r=t.__ref,o=sl(t,e);if(o===void 0)return t.state;if(Wt(o)("object","array"))return ft(o);if(Wt(o)("string","number","boolean"))return r.__stateType=typeof o,{value:o};console.warn(r.__state,"is not present. Replacing with",{})},il=t=>{let{__ref:e}=t,r=e?.__state;return!!(r&&Wt(r)("number","string","boolean"))},Wp=function(t){return H(t)?!!(t.update&&t.parse&&t.clean&&t.create&&t.parent&&t.destroy&&t.rootUpdate&&t.parentUpdate&&t.keys&&t.values&&t.toggle&&t.replace&&t.quietUpdate&&t.quietReplace&&t.add&&t.apply&&t.applyReplace&&t.setByPath&&t.setPathCollection&&t.removeByPath&&t.removePathCollection&&t.getByPath&&t.applyFunction&&t.__element&&t.__children):!1},qp=(t,e)=>{if(!t)return e||{};let r=t.split("/"),o={},n=o,s=r.length-1;for(let i=0;i<=s;i++)n[r[i]]=i===s?e||{}:{},n=n[r[i]];return o},Kp=(t,e)=>{let{__element:r}=e,o=r?.state;if(!o)return;let n=ft(o,ro),s={[t.key]:n},i=S(o.__depends)?{...o.__depends,...s}:s;return Array.isArray(o)?As(o,{...Object.getPrototypeOf(o),__depends:i}):Object.setPrototypeOf(o,{...Object.getPrototypeOf(o),__depends:i}),n},Gp=(t,e,r={})=>{let{overwrite:o}=r;if(!o)return;let n=o==="shallow";if(o==="merge"){st(t,e,ro);return}(n?no:qt)(t,e,ro)},w_="__polyglotSeededKeys",ri=t=>{if(!S(t))return new Set;let e=t[w_];if(!(e instanceof Set)){e=new Set;try{Object.defineProperty(t,w_,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},er=(t,e,r)=>ri(t).has(e)?!0:!S(r)||r[e]===void 0,Ue=(t,e)=>(ri(t).add(e),e)});var xE,Yp,k_=F(()=>{"use strict";xE=(t,e)=>{let r=e;for(;r;){if(r===t)return!0;r=Object.getPrototypeOf(r)}return!1},Yp=(t,e)=>{let{__ref:r}=t,o=t.context||e.context||r.root?.context;o&&!o.globalScope&&(o.globalScope={});let n=e.scope||r.root?.scope,s=o?.globalScope;if(!t.scope)n?t.scope=n:s?t.scope=Object.create(s):t.scope={};else if(typeof t.scope=="object"&&t.scope!==null&&Object.getPrototypeOf(t.scope)===Object.prototype){let i=n||s;i&&!xE(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var v_,al,kr,cl,Xp,Jp=F(()=>{"use strict";Ot();Xo();v_=(t,e)=>{let r="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[r]},al=(t,e,r,o,n)=>{if(t=Yo(t,e),!!A(t))try{let s=t.call(e,e,r||e.state,o||e.context,n);return s&&typeof s.then=="function"&&s.catch(i=>{e.error=i,i instanceof ReferenceError?console.warn("[DOMQL] Async event warning:",i.message):console.error("[DOMQL] Async event error:",i)}),s}catch(s){if(e.error=s,s instanceof ReferenceError?console.warn("[DOMQL] Event handler warning:",s.message):console.error("[DOMQL] Event handler error:",s),e.context?.strictMode)throw s}},kr=(t,e,r)=>{if(!e)throw new Error("Element is required");At(t,e,r);let o=v_(t,e);if(o){let{state:n,context:s}=e;return al(o,e,n,s,r)}},cl=(t,e,r,o,n,s)=>{if(t=Yo(t,r),!!A(t))try{let i=t.call(r,e,r,o||r.state,n||r.context,s);return i&&typeof i.then=="function"&&i.catch(a=>{r.error=a,console.error("[DOMQL] Async event update error:",a)}),i}catch(i){if(r.error=i,console.error("[DOMQL] Event update error:",i),r.context?.strictMode)throw i}},Xp=(t,e,r,o)=>{At(t,r,e,o);let n=v_(t,r);if(n){let{state:s,context:i}=r;return cl(n,e,r,s,i,o)}}});var Zp,oi,Qp=F(()=>{"use strict";Zp={},oi={}});var E_={};P(E_,{restAdapter:()=>C_,setup:()=>SE});var wE,rr,SE,C_,A_=F(()=>{"use strict";wE=(t,e,r)=>{let o=e&&!e.startsWith("/")?"/":"",n=new URL(`${t}${o}${e}`);if(r)for(let s in r){let i=r[s];i!=null&&n.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return n.toString()},rr=async(t,e)=>{let r=await globalThis.fetch(t,e),o=r.headers.get("content-type"),n=o&&o.includes("json")?await r.json():await r.text();return{data:n,error:r.ok?null:n?.message||n?.error||r.statusText,status:r.status}},SE=async({url:t,headers:e,auth:r,fetchOptions:o})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return C_(t,e,r,o)},C_=(t,e={},r,o={})=>{let n=r?.token||null,s=f=>{let u={...e,...f};return n&&(u.Authorization=`Bearer ${n}`),u},i=f=>({...s(f),"Content-Type":"application/json"}),a=f=>({...o,...f}),c=(f,u)=>{let d=u||t;if(f&&(f.startsWith("http://")||f.startsWith("https://")))return f;let h=f&&!f.startsWith("/")?"/":"";return`${d}${h}${f||""}`};return{name:"rest",setToken:f=>{n=f},getSession:async()=>{if(!r?.sessionUrl)return n?{token:n}:null;let f=await rr(c(r.sessionUrl,r.baseUrl),a({headers:s()}));return f.error?null:f.data},signIn:async f=>{if(!r?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let u=await rr(c(r.signInUrl,r.baseUrl),a({method:"POST",headers:i(),body:JSON.stringify(f)}));return u.data?.token&&(n=u.data.token),u},signOut:async()=>(r?.signOutUrl&&await rr(c(r.signOutUrl,r.baseUrl),a({method:"POST",headers:s()})),n=null,{error:null}),select:({from:f,params:u,select:d,limit:h,offset:g,order:p,single:m,headers:b,baseUrl:_})=>{let y={...u};return d&&(y.select=d),h&&(y.limit=h),g&&(y.offset=g),m&&(y.single=!0),p&&(typeof p=="string"?y.order=p:Array.isArray(p)?y.order=p.map(x=>`${x.by}:${x.asc===!1?"desc":"asc"}`).join(","):p.by&&(y.order=`${p.by}:${p.asc===!1?"desc":"asc"}`)),rr(wE(_||t,f||"",y),a({headers:s(b)}))},rpc:({from:f,params:u,headers:d,baseUrl:h})=>rr(c(`rpc/${f}`,h),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),insert:({from:f,data:u,headers:d,baseUrl:h})=>rr(c(f,h),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),update:({from:f,data:u,params:d,method:h,headers:g,baseUrl:p})=>{let m=d?.id||u?.id,b=m?`${f}/${m}`:f;return rr(c(b,p),a({method:h||"PATCH",headers:i(g),body:JSON.stringify(u)}))},upsert:({from:f,data:u,params:d,method:h,headers:g,baseUrl:p})=>{let m=d?.id||u?.id,b=m?`${f}/${m}`:f;return rr(c(b,p),a({method:h||"PUT",headers:i(g),body:JSON.stringify(u)}))},delete:({from:f,params:u,headers:d,baseUrl:h})=>{let g=u?.id,p=g?`${f}/${g}`:f;return rr(c(p,h),a({method:"DELETE",headers:s(d)}))}}}});var O_={};P(O_,{localAdapter:()=>T_,setup:()=>vE});var ll,kE,vE,T_,R_=F(()=>{"use strict";ll=(t,e)=>{if(!e)return!0;for(let r in e){let o=e[r];if(o===null){if(t[r]!==null&&t[r]!==void 0)return!1}else if(Array.isArray(o)){if(!o.includes(t[r]))return!1}else if(typeof o=="object"){for(let n in o)if(n==="gt"&&!(t[r]>o[n])||n==="gte"&&!(t[r]>=o[n])||n==="lt"&&!(t[r]<o[n])||n==="lte"&&!(t[r]<=o[n])||n==="neq"&&t[r]===o[n]||n==="like"&&!String(t[r]).includes(o[n]))return!1}else if(t[r]!==o)return!1}return!0},kE=(t,{order:e,limit:r,offset:o,single:n})=>{let s=[...t];if(e){let i=typeof e=="string"?e:e.by,a=e.asc!==!1;s.sort((c,l)=>c[i]<l[i]?a?-1:1:c[i]>l[i]?a?1:-1:0)}return o&&(s=s.slice(o)),r&&(s=s.slice(0,r)),n?{data:s[0]||null,error:null}:{data:s,error:null}},vE=async({data:t,...e})=>T_(t,e),T_=(t={},e={})=>{let r={},o={},n=e.persist!==!1&&typeof localStorage<"u",s=e.prefix||"smbls_db_",i=f=>{if(!r[f])if(n)try{let u=localStorage.getItem(s+f);r[f]=u?JSON.parse(u):t[f]||[]}catch{r[f]=t[f]||[]}else r[f]=t[f]||[];return r[f]},a=f=>{if(n)try{localStorage.setItem(s+f,JSON.stringify(r[f]))}catch{}},c=(f,u,d,h)=>{let g=o[f];if(g)for(let p of g)p(d,h,{event:u,table:f})},l=Date.now();return{name:"local",store:r,select:async({from:f,params:u,...d})=>{let g=i(f).filter(p=>ll(p,u));return kE(g,d)},insert:async({from:f,data:u})=>{let d=i(f),g=(Array.isArray(u)?u:[u]).map(p=>{let m={id:p.id||++l,...p};return d.push(m),m});a(f);for(let p of g)c(f,"INSERT",p,null);return{data:Array.isArray(u)?g:g[0],error:null}},update:async({from:f,data:u,params:d})=>{let h=i(f),g=[];for(let p=0;p<h.length;p++)if(ll(h[p],d)){let m={...h[p]};Object.assign(h[p],u),g.push(h[p]),c(f,"UPDATE",h[p],m)}return a(f),{data:g,error:null}},upsert:async({from:f,data:u,params:d})=>{let h=i(f),g=Array.isArray(u)?u:[u],p=[];for(let m of g){let b=d||(m.id!==void 0?{id:m.id}:null),_=b?h.findIndex(y=>ll(y,b)):-1;if(_>-1){let y={...h[_]};Object.assign(h[_],m),p.push(h[_]),c(f,"UPDATE",h[_],y)}else{let y={id:m.id||++l,...m};h.push(y),p.push(y),c(f,"INSERT",y,null)}}return a(f),{data:Array.isArray(u)?p:p[0],error:null}},delete:async({from:f,params:u})=>{let d=i(f),h=[];for(let g=d.length-1;g>=0;g--)ll(d[g],u)&&(h.push(d[g]),d.splice(g,1),c(f,"DELETE",null,h[h.length-1]));return a(f),{data:h,error:null}},subscribe:({from:f,on:u},d)=>{o[f]||(o[f]=[]);let h=(g,p,m)=>{u&&u!=="*"&&u!==m.event||d(g,p,m)};return o[f].push(h),()=>{let g=o[f].indexOf(h);g>-1&&o[f].splice(g,1)}}}}});var ao={};P(ao,{createAdapter:()=>RE,default:()=>BE,executeFetch:()=>ui,fetchPlugin:()=>sh,initAdapterAuth:()=>hl,parseDuration:()=>ii,queryClient:()=>jE,registerAdapter:()=>OE,resolveDb:()=>$_});var CE,EE,fl,si,ul,rh,AE,TE,OE,RE,$_,ii,Nt,L_,ni,PE,fi,ai,ci,dl,oh,pl,IE,P_,th,M_,F_,tn,I_,DE,D_,$E,gl,N_,j_,hl,nh,fe,Ce,li,io,Ve,vr,LE,ME,FE,eh,NE,ui,jE,sh,BE,Cr=F(()=>{"use strict";R();CE=["select","rpc","insert","update","upsert","delete","subscribe"],EE={rest:()=>Promise.resolve().then(()=>(A_(),E_)),local:()=>Promise.resolve().then(()=>(R_(),O_))},fl=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),si=(()=>{if(typeof globalThis<"u"&&globalThis[fl])return globalThis[fl];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,fl,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[fl]}catch{}return t})(),ul=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),rh=(()=>{if(typeof globalThis<"u"&&globalThis[ul])return globalThis[ul];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,ul,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[ul]}catch{}return t})(),AE=5e3,TE=t=>new Promise(e=>{if(si[t])return e(si[t]);let r=rh[t]||=[],o=!1,n=()=>{o||(o=!0,e(si[t]||null))};r.push(n),setTimeout(n,AE)}),OE=(t,e)=>{si[t]=e;let r=rh[t];if(r&&r.length){rh[t]=[];for(let o of r)o()}},RE=t=>{let e={};for(let r of CE)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},$_=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...r}=t,o=typeof e=="string"?e:typeof t=="string"?t:null;if(!o)return null;let n=si[o]||EE[o];if(!n&&(n=await TE(o),!n))throw new Error(`Unknown db adapter: "${o}". Use registerAdapter() for adapters with optional deps.`);let s=await n();if(!s||typeof s.setup!="function")throw new Error(`Adapter "${o}" loader returned a module without a setup() function. Got keys: [${Object.keys(s||{}).join(", ")}]. Likely a bundler chunk-resolution issue.`);return s.setup(r)},ii=t=>{if(!t)return 0;if(typeof t=="number")return t;let e=t.match(/^(\d+)(ms|s|m|h)$/);if(!e)return 0;let r=parseInt(e[1]),o=e[2];return o==="ms"?r:o==="s"?r*1e3:o==="m"?r*6e4:o==="h"?r*36e5:0},Nt=new Map,L_=new Map,ni=new Map,PE=(t,e,r)=>{if(t.cache?.key)return t.cache.key;let o=$E(t.params),n=r?`${r}:`:"",s=`${t.from}:${t.method}:${n}${JSON.stringify(o||"")}`;return e?`${s}:${e}`:s},fi=t=>Nt.get(t)||null,ai=(t,e,r)=>{let o=Nt.get(t),n={data:e,error:r,time:Date.now(),stale:!1};Nt.set(t,n);let s=L_.get(t);if(s)for(let i of s)A(i)&&i(n);return n},ci=t=>{if(t){let e=Nt.get(t);e&&(e.stale=!0);return}for(let[,e]of Nt)e.stale=!0},dl=t=>{if(t){Nt.delete(t);return}Nt.clear()},oh=t=>!t&&t!==!1?{staleTime:6e4,gcTime:3e5}:t===!1?null:t===!0?{staleTime:6e4,gcTime:3e5}:typeof t=="number"?{staleTime:t,gcTime:Math.max(t*5,3e5)}:w(t)?{staleTime:ii(t),gcTime:3e5}:{staleTime:ii(t.stale||t.staleTime)||6e4,gcTime:ii(t.gc||t.gcTime||t.expire)||3e5,key:t.key},pl=null,IE=()=>{pl||(pl=setInterval(()=>{let t=Date.now();for(let[e,r]of Nt){let o=L_.get(e);!(o&&o.size>0)&&t-r.time>(r.gcTime||3e5)&&Nt.delete(e)}},3e4),pl.unref&&pl.unref())};IE();P_=3,th=t=>Math.min(1e3*2**t,3e4),M_=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:P_,delay:th}:typeof e=="number"?{count:e,delay:th}:{count:e.count??P_,delay:A(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:th}},F_=async(t,e)=>{let{count:r,delay:o}=e,n;for(let s=0;s<=r;s++)try{let i=await t();if(i?.error){if(n=i.error,s<r){let a=A(o)?o(s,n):o;await new Promise(c=>setTimeout(c,a));continue}return i}return i}catch(i){if(n=i,s<r){let a=A(o)?o(s,i):o;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:n}},tn={focus:new Set,online:new Set},I_=!1,DE=()=>{if(I_||typeof window>"u")return;I_=!0;let t=()=>{for(let r of tn.focus)r()},e=()=>{for(let r of tn.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},D_=(t,e)=>{let r=e.__ref;if(t===!0)return{from:r.__state||e.key,method:"select",query:!0,on:"create"};if(w(t))return{from:t,method:"select",query:!0,on:"create"};if(S(t)){let o={...t};return o.from=o.from||r.__state||e.key,o.method=o.method||"select",o.on=o.on||"create",o.query===void 0&&(o.query=!0),o}return null},$E=t=>(!t||A(t),t),gl=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},N_=(t,e)=>{let o=(t?.state?.root||e?.state?.root)?.__fetchScope;return o?String(o):void 0},j_=(t,e,r)=>{let o;if(!t)o=void 0;else if(A(t))o=t(e,e.state);else{o={};for(let n in t){let s=t[n];o[n]=A(s)?s(e,e.state):s}}return o},hl=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let r=(o,n)=>{let s=e.state?.root;s?.update&&s.update({auth:{user:o,session:n,loading:!1}})};try{let o=await t.getSession();r(o?.user||null,o)}catch(o){console.warn("[fetch] Failed to restore auth session:",o.message)}t.onAuthStateChange&&t.onAuthStateChange((o,n)=>{r(n?.user||null,n)})},nh=async(t,e)=>{if(A(t.select))return t.auth!==!1&&await hl(t,e),t;if(t.__resolved)return t.auth!==!1&&await hl(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=$_(t);let r=await t.__resolving;return delete t.__resolving,r?(r.auth=t.auth,r.url=t.url,r.key=t.key,t.__resolved=r,e.fetch=r,t.auth!==!1&&await hl(r,e),r):null},fe=(t,e,...r)=>{let o=A(t[e])?t[e]:null;o&&o.call(t,...r,t,t.state,t.context)},Ce=(t,e,r,...o)=>{let n=t&&A(t[r])?t[r]:null;n&&n.call(e,...o,e,e.state,e.context)},li=t=>{let e={},r=t.node;if(!r)return e;if(r.tagName==="FORM"){let n=new FormData(r);for(let[s,i]of n.entries())e[s]=i;return e}let o=r.querySelectorAll("input, textarea, select");for(let n=0;n<o.length;n++){let s=o[n],i=s.name||s.getAttribute("name");i&&(s.type==="checkbox"?e[i]=s.checked:s.type==="file"?e[i]=s.files:e[i]=s.value)}return e},io=(t,e,r,o={})=>{let n=r&&r.startsWith("~/"),s=n&&t.state?.root||t.state;if(s?.update)if(n){let i=r.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&i in e?s.update(e,{preventFetch:!0,...o}):s.update({[i]:e},{preventFetch:!0,...o})}else{let i=r?{[r]:e}:e;s.update(i,{preventFetch:!0,...o})}},Ve=(t,e)=>{let r=t?.__ref;r&&(r.__fetchStatus=e,r.__fetching=e.isFetching,r.__fetchError=e.error)},vr=async(t,e,r,o={})=>{let n=r?.fetch;if(!n||!e||!e.__ref||t.enabled===!1||A(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||A(t.skip)&&t.skip(e,e.state))return;let s=await nh(n,r);if(!s||!e.__ref)return;let i=e.__ref,{from:a,method:c,query:l,params:f,cache:u,transform:d,single:h,auth:g,fields:p,as:m,limit:b,offset:_,order:y,headers:x,baseUrl:k,page:E,cursor:O,getNextPageParam:$,getPreviousPageParam:D,infinite:I,placeholderData:z,initialData:V,select:rt,keepPreviousData:at}=t,G=w(rt)?rt:void 0;if(l&&A(e.getQuery)){let nt=e.getQuery(s.name||"paths");nt&&(G=nt.select||nt.length&&nt.join(",")||G)}let K=j_(f,e,r),lt=oh(u),Vt=M_(t),W=gl(e,r),wt=N_(e,r),L=W?`:${W}`:"",ot=wt?`${wt}:`:"",U=lt?u?.key||`${a}:${c}:${ot}${JSON.stringify(K||"")}${I?":infinite":""}${E?":p"+JSON.stringify(E):""}${L}`:null;if(!i.__fetchInitialized&&U&&(i.__fetchInitialized=!0,V!==void 0)){let nt=A(V)?V():V;ai(U,nt,null)}if((c==="select"||c==="rpc")&&U&&lt){let nt=fi(U);if(nt&&!nt.error){let M=Date.now()-nt.time,ht=nt.stale||M>(lt.staleTime||0),q=nt.data;if(A(rt)&&(q=rt(q,e,e.state)),d&&(q=d(q,e,e.state)),io(e,q,m),!ht){Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(z!==void 0){let M=A(z)?z(e,e.state):z;M!==void 0&&io(e,M,m)}}if(U&&ni.has(U)&&!o.force){let nt=ni.get(U);try{let M=await Promise.race([nt,new Promise((ht,q)=>setTimeout(()=>q("DEDUP_TIMEOUT"),15e3))]);if(M?.data!==void 0){let ht=M.data;A(rt)&&(ht=rt(ht,e,e.state)),d&&(ht=d(ht,e,e.state)),io(e,ht,m),fe(e,"onFetchComplete",ht),Ce(t,e,"onFetchComplete",ht)}}catch{}return}let Y=!fi(U)?.data;Ve(e,{isFetching:!0,isLoading:Y,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),fe(e,"onFetchStart"),Ce(t,e,"onFetchStart");let j=r?.analyze?.emitNetwork,pt=j?typeof performance<"u"?performance.now():Date.now():0;j&&j({phase:"start",mode:"query",from:a,method:c,cacheKey:U,lang:W});let Ye=F_(async()=>{if(g!==!1&&s.auth!==!1&&s.getSession){let q=await s.getSession();if(g===!0&&!q){let Mt={message:"Not authenticated"};return Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:Mt,status:"error",fetchStatus:"idle"}),fe(e,"onFetchError",Mt),Ce(t,e,"onFetchError",Mt),{data:null,error:Mt}}}let nt=s[c];if(!A(nt))return{data:null,error:{message:`Method "${c}" not found on adapter`}};let M={from:a,select:G,params:K,single:h,limit:b,offset:_,order:y,headers:x,baseUrl:k},ht=gl(e,r);if(ht&&(M.headers={...M.headers,"Accept-Language":ht}),E!==void 0){if(S(E))E.offset!==void 0&&(M.offset=E.offset),E.limit!==void 0&&(M.limit=E.limit),E.cursor!==void 0&&(M.params={...M.params,cursor:E.cursor});else if(typeof E=="number"){let q=t.pageSize||b||20;M.offset=(E-1)*q,M.limit=q}}if(O!==void 0&&(M.params={...M.params,cursor:O}),c==="insert"||c==="update"||c==="upsert"){let q;if(p===!0||t.on==="submit")q=li(e);else if(T(p)){let Mt=li(e);q={};for(let Ju of p)q[Ju]=Mt[Ju]}else e.state?.parse?q=e.state.parse():S(e.state)&&(q={...e.state});d&&(q=d(q,e,e.state)),M.data=q}if(c==="rpc"){let q=K;if(t.on==="submit"){let Mt=li(e);q=t.transformParams?t.transformParams(Mt,e,e.state):Mt}M.params=q}if(c==="subscribe"){let q=s.subscribe({from:a,params:K,on:t.subscribeOn},(Mt,Ju,rI)=>{io(e,Mt,m),fe(e,"onFetchComplete",Mt),Ce(t,e,"onFetchComplete",Mt)});return i.__unsubscribe=q,{data:null,error:null,subscribed:!0}}return nt(M)},Vt);U&&ni.set(U,Ye);try{let nt=await Ye;if(nt?.subscribed)return;let{data:M,error:ht}=nt||{};if(ht){U&&ai(U,null,ht),Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:ht,status:"error",fetchStatus:"idle"}),fe(e,"onFetchError",ht),Ce(t,e,"onFetchError",ht),j&&j({phase:"error",mode:"query",from:a,method:c,cacheKey:U,error:ht.message||ht,durationMs:(typeof performance<"u"?performance.now():Date.now())-pt});return}if(M!==void 0){if((c==="select"||c==="rpc")&&U){let Mt=ai(U,M,null);Mt.gcTime=lt?.gcTime||3e5}let q=M;I&&T(M)&&(i.__pages||(i.__pages=[]),o.direction==="previous"?i.__pages.unshift(M):i.__pages.push(M),q=i.__pages.flat(),$&&(i.__nextPageParam=$(M,i.__pages),i.__hasNextPage=i.__nextPageParam!=null),D&&(i.__prevPageParam=D(M,i.__pages),i.__hasPreviousPage=i.__prevPageParam!=null)),A(rt)&&(q=rt(q,e,e.state)),d&&(q=d(q,e,e.state)),(!at||q!==void 0)&&io(e,q,m),Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),fe(e,"onFetchComplete",q),Ce(t,e,"onFetchComplete",q),j&&j({phase:"success",mode:"query",ok:!0,from:a,method:c,cacheKey:U,durationMs:(typeof performance<"u"?performance.now():Date.now())-pt})}}catch(nt){Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:nt,status:"error",fetchStatus:"idle"}),fe(e,"onFetchError",nt),Ce(t,e,"onFetchError",nt),j&&j({phase:"error",mode:"query",from:a,method:c,cacheKey:U,error:nt.message||String(nt),durationMs:(typeof performance<"u"?performance.now():Date.now())-pt})}finally{U&&ni.delete(U)}},LE=(t,e,r)=>{let o=t.on,n=e.__ref;n.__fetchListeners||(n.__fetchListeners=[]);let s=t.__runner||vr;if(o==="submit"){let i=c=>{c.preventDefault(),s(t,e,r)},a=e.node;a&&(a.addEventListener("submit",i),n.__fetchListeners.push(()=>a.removeEventListener("submit",i)))}else if(o==="click"){let i=()=>s(t,e,r),a=e.node;a&&(a.addEventListener("click",i),n.__fetchListeners.push(()=>a.removeEventListener("click",i)))}else o==="stateChange"&&(n.__fetchOnStateChange=()=>s(t,e,r))},ME=(t,e,r)=>{let o=e.__ref;o.__fetchCleanups||(o.__fetchCleanups=[]),DE();let n=t.refetchInterval;if(n){let s=typeof n=="number"?n:ii(n);if(s>0){let i=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&vr(t,e,r,{force:!0})},s);o.__fetchCleanups.push(()=>clearInterval(i))}}if(t.refetchOnWindowFocus!==!1){let s=()=>{let i=gl(e,r),a=N_(e,r),c=PE(t,i,a),l=fi(c),f=oh(t.cache);(!l||l.stale||Date.now()-l.time>(f?.staleTime||0))&&vr(t,e,r,{force:!0})};tn.focus.add(s),o.__fetchCleanups.push(()=>tn.focus.delete(s))}if(t.refetchOnReconnect!==!1){let s=()=>vr(t,e,r,{force:!0});tn.online.add(s),o.__fetchCleanups.push(()=>tn.online.delete(s))}},FE=(t,e,r)=>{if(!e.optimistic)return null;let o=t.__ref,n=e.as,s=t.state?.parse?t.state.parse():S(t.state)?{...t.state}:t.state;o.__optimisticSnapshot=s;let i=A(e.optimistic)?e.optimistic(r,s,t):e.optimistic;return i!==void 0&&io(t,i,n),s},eh=(t,e)=>{let r=t.__ref,o=r.__optimisticSnapshot;o!==void 0&&(io(t,o,e.as),delete r.__optimisticSnapshot)},NE=async(t,e,r)=>{let o=r?.fetch;if(!o)return;let n=await nh(o,r);if(!n)return;let s=e.__ref,{method:i,from:a,fields:c,transform:l,as:f,on:u,auth:d,headers:h,baseUrl:g,invalidates:p,optimistic:m,onMutate:b,onSuccess:_,onError:y,onSettled:x}=t,k;if(c===!0||u==="submit")k=li(e);else if(T(c)){let D=li(e);k={};for(let I of c)k[I]=D[I]}else e.state?.parse?k=e.state.parse():S(e.state)&&(k={...e.state});l&&(k=l(k,e,e.state)),A(b)&&b(k,e,e.state);let E=m?FE(e,t,k):null;s.__fetching=!0,Ve(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),fe(e,"onFetchStart"),Ce(t,e,"onFetchStart");let O=r?.analyze?.emitNetwork,$=O?typeof performance<"u"?performance.now():Date.now():0;O&&O({phase:"start",mode:"mutation",from:a,method:i});try{if(d!==!1&&n.auth!==!1&&n.getSession){let K=await n.getSession();if(d===!0&&!K){E!==void 0&&eh(e,t);let lt={message:"Not authenticated"};fe(e,"onFetchError",lt),Ce(t,e,"onFetchError",lt);return}}let D=n[i];if(!A(D))return;let I={from:a,data:k,headers:h,baseUrl:g};t.params&&(I.params=j_(t.params,e,r));let z=gl(e,r);z&&(I.headers={...I.headers,"Accept-Language":z});let V=M_(t),rt=await F_(()=>D(I),V),{data:at,error:G}=rt||{};if(G){E!==void 0&&eh(e,t),Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:G,status:"error",fetchStatus:"idle"}),fe(e,"onFetchError",G),A(y)&&y(G,k,e),A(x)&&x(null,G,k,e),O&&O({phase:"error",mode:"mutation",from:a,method:i,error:G.message||String(G),durationMs:(typeof performance<"u"?performance.now():Date.now())-$});return}if(delete s.__optimisticSnapshot,at!==void 0){let K=f?{[f]:at}:at;e.state?.update&&e.state.update(K,{preventFetch:!0})}if(Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),fe(e,"onFetchComplete",at),Ce(t,e,"onFetchComplete",at),A(_)&&_(at,k,e),A(x)&&x(at,null,k,e),O&&O({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-$}),p){let K=T(p)?p:[p];for(let lt of K)if(lt===!0||lt==="*")for(let[Vt]of Nt)Vt.startsWith(a+":")&&ci(Vt);else ci(lt)}}catch(D){E!==void 0&&eh(e,t),Ve(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:D,status:"error",fetchStatus:"idle"}),fe(e,"onFetchError",D),Ce(t,e,"onFetchError",D),A(y)&&y(D,k,e),A(x)&&x(null,D,k,e),O&&O({phase:"error",mode:"mutation",from:a,method:i,error:D.message||String(D),durationMs:(typeof performance<"u"?performance.now():Date.now())-$})}finally{s.__fetching=!1}},ui=(t,e,r,o)=>{if(!t||!o?.fetch)return;let s=ut(t,e);if(!s)return;let i=T(s)?s.map(c=>D_(ut(c,e),e)).filter(Boolean):[D_(s,e)].filter(Boolean);for(let c of i){let l=c.method==="insert"||c.method==="update"||c.method==="upsert"||c.method==="delete",f=l?NE:vr;c.on==="create"?f(c,e,o):Promise.resolve().then(()=>{LE({...c,__runner:f},e,o)}),!l&&c.on==="create"&&(c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&ME(c,e,o)}let a=e.__ref;a.refetch=c=>{for(let l of i)vr(l,e,o,{force:!0,...c})},a.fetchNextPage=()=>{let c=i[0];if(!c||!c.infinite)return;let l=a.__nextPageParam;if(l==null)return;let f={...c,cursor:l};vr(f,e,o,{direction:"next",force:!0})},a.fetchPreviousPage=()=>{let c=i[0];if(!c||!c.infinite)return;let l=a.__prevPageParam;if(l==null)return;let f={...c,cursor:l};vr(f,e,o,{direction:"previous",force:!0})}},jE={invalidateQueries:t=>{if(!t){ci();return}if(w(t))for(let[e]of Nt)(e.startsWith(t)||e.includes(t))&&ci(e);else if(T(t)){let e=t.join(":");for(let[r]of Nt)r.includes(e)&&ci(r)}},removeQueries:t=>{if(!t){dl();return}if(w(t))for(let[e]of Nt)(e.startsWith(t)||e.includes(t))&&dl(e)},getQueryData:t=>fi(t)?.data??void 0,setQueryData:(t,e)=>{let r=fi(t),o=A(e)?e(r?.data):e;ai(t,o,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let o=await nh(r,e);if(!o)return;let n=t.cache?.key||`${t.from}:${t.method||"select"}:${JSON.stringify(t.params||"")}`,s=o[t.method||"select"];if(!A(s))return;let i=await s({from:t.from,params:t.params,limit:t.limit,offset:t.offset,order:t.order,single:t.single});if(i?.data!==void 0&&!i?.error){let a=ai(n,i.data,null);a.gcTime=oh(t.cache)?.gcTime||3e5}return i},getCache:()=>Nt,clear:()=>dl(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of Nt)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||dl(r))}},sh={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||ni.clear(),ui(e,t,t.state,t.context))}},BE=ui});function pi(t){let e=this,{__ref:r}=e,o=[].concat(t),n=r.root[o[0]];if(!o||!o.length)return console.log(o,"on",e.key,"is undefined");for(;n.key===o[0]&&(o.shift(),!!o.length);)if(n=n[o[0]],!n)return;return n}function ah(t){let e=this,{parent:r}=e;if(A(t))return r.state&&t(r,r.state,r.context)?r:r.parent?r.lookup(t):void 0;if(e[t])return e[t];for(;r.param!==t;){if(r[t])return r[t];if(r=r.parent,!r)return}return r}function ch(t){let e=this,{__ref:r}=e,o=r?.__children;if(o)for(let n=0;n<o.length;n++){let s=o[n],i=e[s];if(s===t)return i;if(A(t)){let c=t(i,i.state,i.context);if(i.state&&c)return i}let a=i?.lookdown?.(t);if(a)return a}}function lh(t,e=[]){let r=this,{__ref:o}=r,n=o?.__children;if(n){for(let s=0;s<n.length;s++){let i=n[s],a=r[i];if(i===t)e.push(a);else if(A(t)){let c=t(a,a.state,a.context);a.state&&c&&e.push(a)}a?.lookdownAll?.(t,e)}return e.length?e:void 0}}function ml(t={}){let e=this;if(e.node?.style){for(let r in t){let o=t[r],n=e[r];if(S(o)&&n)ml.call(n,o);else if(o!=null){let s=r.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),i=String(o).replace(/\s*!important\s*$/,"");e.node.style.setProperty(s,i,"important")}}return e}}function U_(t){let e=this;if(kr("beforeRemove",e,t)===!1)return e;A(e.node.remove)?e.node.remove():wr()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=Es(e.parent.__ref.__children,e.key)),kr("remove",e,t)}function fh(t){return this[t]}function uh(t,e){let r=this;if(t)return r.update(t,e),r}function dh(t){return t?this.__ref&&this.__ref[t]:this.__ref}function hi(){return this.getRef("__children").map(e=>this[e])}function gi(){return this.getRef().path}function yi(t){let e=null,r=o=>o.__element&&o.root?.isRootState;if(!this)e=B_();else if(r(this))e=this.root;else if(this.__ref&&this.__ref.path){let o=this.state&&r(this.state),n=A(this.state)&&this.parent.state&&r(this.parent.state);(o||n)&&(e=this.state.root||this.parent.state.root)}return e||(e=B_()),t?e?.[t]:e}function bi(t){let e=this.getRootState()?.__element;return e&&Object.keys(e).length>0&&t?e[t]:e}function _i(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function xi(t){let e=this.getRoot()?.context;return t?e[t]:e}function wi(t){let e=this.context;return t?e[t]:e}function yl(){let t=this,e=[];for(let r in t)!Object.prototype.hasOwnProperty.call(t,r)||_r.has(r)&&!Ps.has(r)||e.push(r);return e}function bl(t=[]){let e=this,r={},o=yl.call(e),n=o.includes("children"),s=t.length?new Set(t):null;for(let i=0;i<o.length;i++){let a=o[i];if(s&&s.has(a)||!Object.prototype.hasOwnProperty.call(e,a)||n&&a==="content")continue;let c=e[a];if(a==="state"){if(e.__ref&&!e.__ref.__hasRootState)continue;let l=A(c&&c.parse)?c.parse():c;r[a]=A(l)?l:JSON.parse(JSON.stringify(l||{}))}else if(a==="scope"){if(e.__ref&&!e.__ref.__hasRootScope)continue;r[a]=JSON.parse(JSON.stringify(c||{}))}else if(a==="props"){let{__element:l,update:f,...u}=e[a];r[a]=u}else bt(c)&&Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=c)}return r}function di(t=[],e=new WeakSet){let r=this;if(e.has(r))return;e.add(r);let o=bl.call(r,t),n=t.length?new Set(t):null;for(let s in o){if(n&&n.has(s)||!Object.prototype.hasOwnProperty.call(r,s))continue;let i=o[s];Array.isArray(i)?o[s]=i.map(a=>H(a)?di.call(a,t,e):a):H(i)&&(o[s]=di.call(i,t,e))}return o}function en(...t){if(Er!=="test"&&Er!=="development")return;let e=this,{__ref:r}=e;return console.groupCollapsed(e.key),t.length?t.forEach(o=>console.log(`%c${o}:
21
+ `,"font-weight: bold",e[o])):(console.log(r.path),e.keys().forEach(n=>console.log(`%c${n}:`,"font-weight: bold",e[n]))),console.log(e),console.groupEnd(e.key),e}function hh(...t){(Er==="test"||Er==="development")&&console.log(...t)}function Si(...t){(Er==="test"||Er==="development")&&console.warn(...t)}function co(...t){if(Er==="test"||Er==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&en.call(this),new Error(...t)}}function ki(){let t=this,{key:e,parent:r}=t,{__children:o}=r.__ref,n=o.indexOf(e),s=o[n+1];return r[s]}function vi(t){let e=t||this,{key:r,parent:o}=e,{__children:n}=o.__ref;if(!n)return;let s=n.indexOf(r);return o[n[s-1]]}function Ci(t={}){let e=this;e.data||(e.data={}),e.data.varCaches||(e.data.varCaches={});let r=e.data.varCaches,o={},n;for(let s in t)t[s]!==r[s]&&(n=!0,o[s]=t[s]);return{changed:s=>{if(!n)return;let i=s(o,ft(r));for(let a in o)r[a]=o[a];return i},timeout:(s,i)=>{if(!n)return;let a=setTimeout(()=>{s(o),clearTimeout(a)},i)}}}function gh(t,...e){let r=this.context,o=r.utils?.[t]||r.functions?.[t]||r.methods?.[t]||r.snippets?.[t];if(o)try{let n=o.call(this,...e);return n&&typeof n.then=="function"&&n.catch(s=>{co.call(this,s)}),n}catch(n){if(co.call(this,n),r?.strictMode)throw n}}async function Ei(){let t=this,e=t.context?.fetch;if(!e)return null;if(typeof e.select=="function"){if(!e.__authInitialized&&e.getSession){let{initAdapterAuth:n}=await Promise.resolve().then(()=>(Cr(),ao));await n(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:n}=await Promise.resolve().then(()=>(Cr(),ao));await n(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let r=Promise.resolve().then(()=>(Cr(),ao)).then(({resolveDb:n})=>n(e));e.__resolving=r;let o=await r;if(e.__resolved=o,t.context.fetch=o,delete e.__resolving,o?.getSession){let{initAdapterAuth:n}=await Promise.resolve().then(()=>(Cr(),ao));await n(o,t.context)}return o}function Ai(t){let e=this,r=t||oi.useStateQuery||e.context?.useStateQuery;if(!r)return null;let o={};if(ih(e,o),r===!0)return o;let n=KE[r];return n?n(o):o}function mh(t,e){return!!(qo.has(t)||e?.context?.methods?.[t])}var Er,V_,mi,B_,ph,ih,UE,H_,VE,HE,zE,WE,qE,KE,z_=F(()=>{"use strict";Jp();Ko();Ot();tr();cp();Wo();Qp();Er="production";V_=null,mi=t=>{V_=t||null},B_=()=>V_||null;ph=(t,e,r,o)=>Object.defineProperty(t,e,{get:r,set:o});ih=(t,e)=>{let r=t.__ref;if(!r)return;let o=r.__state;o&&typeof o=="string"&&UE(e,o);let n=r.__children;if(n)for(let a=0;a<n.length;a++){let c=t[n[a]];c&&c.__ref&&ih(c,e)}let s=r.contentElementKey||"content",i=t[s];i&&i.__ref&&ih(i,e)},UE=(t,e)=>{let o=e.replaceAll("../","").replaceAll("~/","").split("/"),n=t;for(let s=0;s<o.length;s++){let i=o[s];s===o.length-1?n[i]||(n[i]=!0):(n[i]===!0&&(n[i]={}),n[i]||(n[i]={}),n=n[i])}},H_=(t,e=0)=>{let r=" ".repeat(e),o=Object.entries(t);return o.length?o.map(([s,i])=>i===!0?`${r}${s}`:`${r}${s} {
22
+ ${H_(i,e+1)}
23
23
  ${r}}`).join(`
24
- `):""},jE=t=>`{
25
- ${B_(t,1)}
26
- }`,BE=t=>{let e={fields:{},include:[]},r=(o,n)=>{let s=[];for(let i in o)if(o[i]===!0)s.push(i);else{let a=n?`${n}.${i}`:i;e.include.push(a),r(o[i],a)}s.length&&(e.fields[n||"_root"]=s)};return r(t,""),e},UE=t=>{let e=s=>{let i=[],a=[];for(let c in s)if(s[c]===!0)i.push(c);else{let l=e(s[c]),f=[];l.select&&f.push(`$select=${l.select}`),l.expand&&f.push(`$expand=${l.expand}`),a.push(f.length?`${c}(${f.join(";")})`:c)}return{select:i.length?i.join(","):"",expand:a.length?a.join(","):""}},{select:r,expand:o}=e(t),n=[];return r&&n.push(`$select=${r}`),o&&n.push(`$expand=${o}`),n.join("&")},VE=(t,e)=>{let r=[],o=[],n=new Set,s=(f,u,d)=>{n.add(u),d&&o.push(`LEFT JOIN ${u} ON ${u}.${d}_id = ${d}.id`);for(let h in f)f[h]===!0?r.push(`${u}.${h}`):s(f[h],h,u)},i=Object.keys(t);i.length===1&&t[i[0]]!==!0?s(t[i[0]],i[0],null):s(t,"_root",null);let a=[...n][0]||"_root",c=r.length?r.join(", "):"*",l=o.length?`
24
+ `):""},VE=t=>`{
25
+ ${H_(t,1)}
26
+ }`,HE=t=>{let e={fields:{},include:[]},r=(o,n)=>{let s=[];for(let i in o)if(o[i]===!0)s.push(i);else{let a=n?`${n}.${i}`:i;e.include.push(a),r(o[i],a)}s.length&&(e.fields[n||"_root"]=s)};return r(t,""),e},zE=t=>{let e=s=>{let i=[],a=[];for(let c in s)if(s[c]===!0)i.push(c);else{let l=e(s[c]),f=[];l.select&&f.push(`$select=${l.select}`),l.expand&&f.push(`$expand=${l.expand}`),a.push(f.length?`${c}(${f.join(";")})`:c)}return{select:i.length?i.join(","):"",expand:a.length?a.join(","):""}},{select:r,expand:o}=e(t),n=[];return r&&n.push(`$select=${r}`),o&&n.push(`$expand=${o}`),n.join("&")},WE=(t,e)=>{let r=[],o=[],n=new Set,s=(f,u,d)=>{n.add(u),d&&o.push(`LEFT JOIN ${u} ON ${u}.${d}_id = ${d}.id`);for(let h in f)f[h]===!0?r.push(`${u}.${h}`):s(f[h],h,u)},i=Object.keys(t);i.length===1&&t[i[0]]!==!0?s(t[i[0]],i[0],null):s(t,"_root",null);let a=[...n][0]||"_root",c=r.length?r.join(", "):"*",l=o.length?`
27
27
  `+o.join(`
28
28
  `):"";return`SELECT ${c}
29
- FROM ${a}${l}`},zE=t=>{let e=[],r=(o,n)=>{for(let s in o){let i=n?`${n}/${s}`:s;o[s]===!0?e.push(i):r(o[s],i)}};return r(t,""),e},HE={graphql:jE,"json-api":BE,odata:UE,sql:VE,paths:zE}});var WE,gh,V_=F(()=>{"use strict";Pc();WE={snapshotId:Ns},gh=(t,e)=>{let r=t.__ref,{currentSnapshot:o,calleeElement:n}=e;if(!n||n===t){let a=WE.snapshotId();return r.__currentSnapshot=a,[a,t]}let i=n.__ref.__currentSnapshot;return o<i?[i,n,!0]:[i,n]}});var bl,mh,z_=F(()=>{bl=new Set(["__proto__","constructor","prototype","_id","__v","id","createdAt","updatedAt","schema"]),mh=t=>typeof t=="string"&&bl.has(t)});async function yh(t){if(document.fullscreenElement)await document.exitFullscreen();else try{await(this.node||document).requestFullscreen()}catch(e){console.warn(`Error attempting to enable fullscreen mode: ${e.message} (${e.name})`)}}var H_=F(()=>{"use strict"});var en,rn,Ai,ue,Ar,on,Ti,Ee,_l,qE,lo,KE,nn,sn,bh,W_=F(()=>{"use strict";en=t=>t!=="latest"?`@${t}`:"",rn=t=>t?`/${t}`:"",Ai=t=>{let e=typeof t=="string"?t.replace(/\/+$/,""):"";if(!e)return{name:"",subpath:""};let r=e.split("/"),o=e.startsWith("@")?2:1;return{name:r.slice(0,o).join("/"),subpath:r.slice(o).join("/")}},ue={skypack:{url:"https://cdn.skypack.dev",formatUrl:(t,e,r)=>`${ue.skypack.url}/${t}${en(e)}${rn(r)}`},esmsh:{url:"https://esm.sh",formatUrl:(t,e,r)=>`${ue.esmsh.url}/${t}${en(e)}${rn(r)}`},unpkg:{url:"https://unpkg.com",formatUrl:(t,e,r)=>`${ue.unpkg.url}/${t}${en(e)}${rn(r)}?module`},jsdelivr:{url:"https://cdn.jsdelivr.net/npm",formatUrl:(t,e,r)=>`${ue.jsdelivr.url}/${t}${en(e)}${rn(r)}/+esm`},symbols:{url:"https://pkg.symbo.ls",formatUrl:(t,e,r)=>`${ue.symbols.url}/${t}${en(e)}${rn(r)}/+esm`}},Ar={"esm.sh":"esmsh",unpkg:"unpkg",skypack:"skypack",jsdelivr:"jsdelivr","pkg.symbo.ls":"symbols"},on=(t={})=>{let{packageManager:e}=t;return Ar[e]||null},Ti=t=>{if(typeof t!="string")return t;let e=t.trim().match(/^[\^~](\d.*)$/);return e?e[1]:t},Ee=(t,e="latest",r="esmsh")=>{let o=ue[r]||ue.esmsh,{name:n,subpath:s}=Ai(t);return o.formatUrl(n||t,Ti(e),s)},_l=(t,e="latest",r="esmsh")=>{let o=ue[r]||ue.esmsh,n=Ti(e),{name:s,subpath:i}=Ai(t);return`${o.url}/${s||t}${en(n)}${rn(i)}/`},qE=/^node:|^@symbo-ls\//,lo=t=>typeof t=="string"&&qE.test(t),KE=/[<>…]/,nn=t=>typeof t=="string"&&KE.test(t),sn=t=>!!t&&typeof t=="object"&&!Array.isArray(t),bh=(t,e="skypack",r={})=>{let o=t.dependencies;if(!sn(o))return"";let n=Object.keys(o);if(!n.length)return"";let s=r.pin||{},i={};for(let f of n){if(lo(f)||nn(f))continue;let u=s[f]||o[f]||"latest";i[f]=Ee(f,u,e),f.endsWith("/")||(i[f+"/"]=_l(f,u,e))}if(!Object.keys(i).length)return"";let a='<script type="importmap">',c="<\/script>",l=`{
29
+ FROM ${a}${l}`},qE=t=>{let e=[],r=(o,n)=>{for(let s in o){let i=n?`${n}/${s}`:s;o[s]===!0?e.push(i):r(o[s],i)}};return r(t,""),e},KE={graphql:VE,"json-api":HE,odata:zE,sql:WE,paths:qE}});var GE,yh,W_=F(()=>{"use strict";Ic();GE={snapshotId:js},yh=(t,e)=>{let r=t.__ref,{currentSnapshot:o,calleeElement:n}=e;if(!n||n===t){let a=GE.snapshotId();return r.__currentSnapshot=a,[a,t]}let i=n.__ref.__currentSnapshot;return o<i?[i,n,!0]:[i,n]}});var _l,bh,q_=F(()=>{_l=new Set(["__proto__","constructor","prototype","_id","__v","id","createdAt","updatedAt","schema"]),bh=t=>typeof t=="string"&&_l.has(t)});async function _h(t){if(document.fullscreenElement)await document.exitFullscreen();else try{await(this.node||document).requestFullscreen()}catch(e){console.warn(`Error attempting to enable fullscreen mode: ${e.message} (${e.name})`)}}var K_=F(()=>{"use strict"});var rn,on,Ti,ue,Ar,nn,Oi,Ee,xl,YE,lo,XE,sn,an,xh,G_=F(()=>{"use strict";rn=t=>t!=="latest"?`@${t}`:"",on=t=>t?`/${t}`:"",Ti=t=>{let e=typeof t=="string"?t.replace(/\/+$/,""):"";if(!e)return{name:"",subpath:""};let r=e.split("/"),o=e.startsWith("@")?2:1;return{name:r.slice(0,o).join("/"),subpath:r.slice(o).join("/")}},ue={skypack:{url:"https://cdn.skypack.dev",formatUrl:(t,e,r)=>`${ue.skypack.url}/${t}${rn(e)}${on(r)}`},esmsh:{url:"https://esm.sh",formatUrl:(t,e,r)=>`${ue.esmsh.url}/${t}${rn(e)}${on(r)}`},unpkg:{url:"https://unpkg.com",formatUrl:(t,e,r)=>`${ue.unpkg.url}/${t}${rn(e)}${on(r)}?module`},jsdelivr:{url:"https://cdn.jsdelivr.net/npm",formatUrl:(t,e,r)=>`${ue.jsdelivr.url}/${t}${rn(e)}${on(r)}/+esm`},symbols:{url:"https://pkg.symbo.ls",formatUrl:(t,e,r)=>`${ue.symbols.url}/${t}${rn(e)}${on(r)}/+esm`}},Ar={"esm.sh":"esmsh",unpkg:"unpkg",skypack:"skypack",jsdelivr:"jsdelivr","pkg.symbo.ls":"symbols"},nn=(t={})=>{let{packageManager:e}=t;return Ar[e]||null},Oi=t=>{if(typeof t!="string")return t;let e=t.trim().match(/^[\^~](\d.*)$/);return e?e[1]:t},Ee=(t,e="latest",r="esmsh")=>{let o=ue[r]||ue.esmsh,{name:n,subpath:s}=Ti(t);return o.formatUrl(n||t,Oi(e),s)},xl=(t,e="latest",r="esmsh")=>{let o=ue[r]||ue.esmsh,n=Oi(e),{name:s,subpath:i}=Ti(t);return`${o.url}/${s||t}${rn(n)}${on(i)}/`},YE=/^node:|^@symbo-ls\//,lo=t=>typeof t=="string"&&YE.test(t),XE=/[<>…]/,sn=t=>typeof t=="string"&&XE.test(t),an=t=>!!t&&typeof t=="object"&&!Array.isArray(t),xh=(t,e="skypack",r={})=>{let o=t.dependencies;if(!an(o))return"";let n=Object.keys(o);if(!n.length)return"";let s=r.pin||{},i={};for(let f of n){if(lo(f)||sn(f))continue;let u=s[f]||o[f]||"latest";i[f]=Ee(f,u,e),f.endsWith("/")||(i[f+"/"]=xl(f,u,e))}if(!Object.keys(i).length)return"";let a='<script type="importmap">',c="<\/script>",l=`{
30
30
  "imports": ${JSON.stringify(i,null,2)}
31
- }`;return`${a}${l}${c}`}});var _h,q_=F(()=>{"use strict";_h=t=>{if(!t)return"";let e=new Date(t),r=new Intl.DateTimeFormat("en",{year:"numeric"}).format(e),o=new Intl.DateTimeFormat("en",{month:"short"}).format(e);return`${new Intl.DateTimeFormat("en",{day:"2-digit"}).format(e)} ${o}, ${r}`}});var xh,K_=F(()=>{"use strict";xh=(t,e)=>{let r=setTimeout(()=>{let{props:o}=t;if(!e.clientHeight){let{node:{clientHeight:n}}=t;n&&(e.clientHeight=n)}if(e.active){if(o.height==="auto")return;t.update({height:e.clientHeight},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});let n=setTimeout(()=>{t.update({height:"auto"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0}),clearTimeout(n)},450)}else t.update({height:"0"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});clearTimeout(r)})}});var wh,G_=F(()=>{"use strict";wh=function(e){let r=[0,1];for(let o=2;o<=e;o++)r[o]=r[o-1]+r[o-2];return r[e]}});var Sh,Y_=F(()=>{"use strict";Sh=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function an(t,e={}){let{window:r=globalThis}=e,{document:o=r.document}=e;return new Promise((n,s)=>{let i=o.querySelector(`script[src="${t}"]`);if(i)return n(i);let a=o.createElement("script");a.src=t,a.async=e.async===!0,a.type=e.type||"text/javascript",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,n(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load script: ${t}`))},o.head.appendChild(a)})}async function Th(t,e={}){let{window:r=globalThis}=e,{document:o=r.document}=e;return new Promise((n,s)=>{let i=o.querySelector(`link[href="${t}"]`);if(i)return n(i);let a=o.createElement("link");a.href=t,a.rel=e.rel||"stylesheet",a.type="text/css",a.media=e.media||"all",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,n(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load stylesheet: ${t}`))},o.head.appendChild(a)})}var kh,vh,Ch,Eh,Ah,X_=F(()=>{"use strict";kh=(t,e=!1,r=document,o="text/javascript")=>new Promise((n,s)=>{try{let i=r.createElement("script");i.type=o,i.async=e,i.src=t,i.addEventListener("load",a=>{n({status:!0})}),i.addEventListener("error",a=>{s(new Error({status:!1,message:`Failed to load the script ${t}`}))}),r.body.appendChild(i)}catch(i){s(i)}}),vh=(t,e=document,r="text/javascript")=>new Promise((o,n)=>{let s=e.createElement("script");s.type=r,s.src=t;let i=e.createElement("div");i.style.cssText="position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(255,255,255,0.8);z-index:9999;",e.body.appendChild(i),s.onload=()=>{console.log(`Successfully loaded: ${t}`),e.body.removeChild(i),o()},s.onerror=()=>{e.body.removeChild(i),n(new Error(`Failed to load: ${t}`))},e.body.appendChild(s)}),Ch=(t,e=document,r,o="text/javascript")=>{let n=new window.XMLHttpRequest;if(n.open("GET",t,!1),n.send(),n.status===200){let s=e.createElement("script");s.type=o,s.text=n.responseText,e.body.appendChild(s),typeof r=="function"&&r()}else throw new Error(`Failed to load the script ${t}`)},Eh=(t,e=!1,r=document,o="text/javascript")=>new Promise((n,s)=>{try{let i=r.createElement("link");i.rel="stylesheet",i.href=t,i.addEventListener("load",a=>{n({status:!0})}),r.head.appendChild(i)}catch(i){s(i)}}),Ah=(t,e=!1,r=document,o="text/javascript",n="smbls-script")=>{try{let s=r.createElement("script");s.type=o,s.async=e,s.id=n,s.innerHTML=t,r.body.appendChild(s)}catch(s){console.warn(s)}}});function JE(t,e){if(!e||typeof e!="object")return t;let r=n=>{if(!XE(n))return n;let s=e[n];return s?.src?s.src:n},o={...t};for(let[n,s]of Object.entries(o))typeof s=="string"?o[n]=r(s):Array.isArray(s)&&(o[n]=s.map(i=>typeof i=="string"?r(i):i));return o}function xl(t,e){if(!t||!e)return;let r=e.split("."),o=t;for(let n of r){if(o==null||typeof o!="object")return;o=o[n]}return o}function ZE(t,e,r){let n=(e.config||e.settings||{}).polyglot||e.polyglot,s=r?.lang||n?.defaultLang||"en",a=(n?.translations||{})[s]||{},c=r?.state||{},l={...t};for(let[f,u]of Object.entries(l))typeof u!="string"||!u.includes("{{")||(l[f]=u.replace(/\{\{\s*([^|{}]+?)\s*(?:\|\s*(\w+)\s*)?\}\}/g,(d,h,g)=>{let p=h.trim();if(g==="polyglot")return a[p]??xl(a,p)??d;if(g==="getLocalStateLang")return xl(c,p+s)??d;let m=xl(c,p);return m!==void 0?m:a[p]??xl(a,p)??d}));return l}function J_(t){let e={...t};for(let[r,o]of Object.entries(e))if(typeof o=="function"){let n=o.toString(),s=n.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | getLocalStateLang }}`;continue}let i=n.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(i){e[r]=`{{ ${i[1]} | polyglot }}`;continue}let a=n.match(/s\.(\w+(?:\.\w+)+)/);if(a){e[r]=`{{ ${a[1]} }}`;continue}delete e[r]}else if(typeof o=="string"){let n=o.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(n){e[r]=`{{ ${n[1]} | getLocalStateLang }}`;continue}let s=o.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | polyglot }}`;continue}if(o.includes("=>")&&o.includes("s.")){let i=o.match(/s\.(\w+(?:\.\w+)+)/);if(i){e[r]=`{{ ${i[1]} }}`;continue}}}return e}function Rh(t,e,r,{isProduction:o=!1,channel:n="production"}={}){let s=t.pages?.[e],i=S(s?.state)&&s?.state,a=s?.metadata||s?.helmet||i||{},c=J_(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=J_(f),d={};if(t.integrations?.seo?d={...t.integrations.seo,...u,...c}:Object.keys(u).length?d={...u,...c}:d={...c},!d.title){let p=t.name||t.key;p?o?d.title=p:n==="development"?d.title=`${p} / dev:symbo.ls`:n==="staging"?d.title=`${p} / staging:symbo.ls`:d.title=`${p} / symbo.ls`:d.title="Symbols demo"}d=ZE(d,t,r),d.title&&(l.has("title")||!d["og:title"])&&(l.has("og:title")||(d["og:title"]=d.title)),d.description&&(l.has("description")||!d["og:description"])&&(l.has("og:description")||(d["og:description"]=d.description)),d.title&&!d["twitter:title"]&&(d["twitter:title"]=d.title),d.description&&!d["twitter:description"]&&(d["twitter:description"]=d.description);let h=r?.actualPathname||e;if(d["og:url"]||d.url){let p=(d["og:url"]||d.url||"").replace(/\/$/,"");if(p&&h&&h!=="/"){let m=h.startsWith("/")?h:"/"+h;d["og:url"]=p+m}}d=JE(d,t.files);let g=t.name||t.app?.metadata?.title||t.app?.name||"";for(let[p,m]of Object.entries(d))if(typeof m=="string"&&m.includes("{{")){let b=m.replace(/\{\{[^}]*\}\}/g,"").trim();b?d[p]=b:p==="title"?d[p]=g:delete d[p]}return d}var Rt,GE,cn,YE,wl,Oh,XE,Z_=F(()=>{"use strict";Ot();Rt=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,r=>e[r])},GE=t=>Object.entries(t||{}).filter(([e,r])=>r!==void 0).map(([e,r])=>`${e}="${Rt(r)}"`).join(" "),cn=t=>{let e=5381,r=String(t);for(let o=0;o<r.length;o++)e=(e*33^r.charCodeAt(o))>>>0;return e.toString(36)},YE=new Set(["jsonLd","styles","scripts"]),wl=t=>{let e=[];if(Array.isArray(t.jsonLd))for(let r of t.jsonLd){if(r==null)continue;let o=typeof r=="string"?r:JSON.stringify(r),n=String(o).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${cn(o)}">${n}<\/script>`)}if(Array.isArray(t.styles))for(let r of t.styles){if(r==null||!String(r).trim())continue;let o=String(r).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${cn(o)}">${o}</style>`)}if(Array.isArray(t.scripts))for(let r of t.scripts){if(!r)continue;let o=typeof r=="string",n=o?r:r.src;if(!n&&!r.body)continue;let s=[];n&&s.push(`src="${Rt(n)}"`),o||(r.type&&s.push(`type="${Rt(r.type)}"`),r.async&&s.push("async"),r.defer&&s.push("defer"),r.integrity&&s.push(`integrity="${Rt(r.integrity)}"`),r.crossorigin&&s.push(`crossorigin="${Rt(r.crossorigin)}"`),r.referrerpolicy&&s.push(`referrerpolicy="${Rt(r.referrerpolicy)}"`),r.nomodule&&s.push("nomodule"));let i=` data-smbls-script="${Rt(n||cn(r.body||""))}"`;if(!o&&r.body){let a=String(r.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${s.join(" ")}${i}>${a}<\/script>`)}else e.push(`<script ${s.join(" ")}${i}><\/script>`)}return e},Oh=(t,e)=>{e||(t={...t,robots:"noindex"});let r=Object.entries(t).reduce((o,[n,s])=>{if(!s&&s!==0&&s!==!1||YE.has(n))return o;if(n==="title")return o.push(`<title>${Rt(s)}</title>`),o;if(n==="canonical")return o.push(`<link rel="canonical" href="${Rt(s)}">`),o;if(n==="manifest")return o.push(`<link rel="manifest" href="${Rt(s)}">`),o;if(n==="favicon"||n==="favicons"||n==="icon"||n==="icons")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="string")o.push(`<link rel="icon" href="${Rt(f)}">`);else if(typeof f=="object"){let u=GE(f);/rel=/.test(u)?o.push(`<link ${u}>`):o.push(`<link rel="icon" ${u}>`)}}),o;if(n==="alternate")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).filter(([d,h])=>h!==void 0).map(([d,h])=>`${d}="${Rt(h)}"`).join(" ");o.push(`<link rel="alternate" ${u}>`)}}),o;let i=(l,f,u="name")=>{if(typeof f=="string"||typeof f=="number"||typeof f=="boolean")o.push(`<meta ${u}="${Rt(l)}" content="${Rt(f)}">`);else if(Array.isArray(f))f.forEach(d=>{if(typeof d=="string"||typeof d=="number"||typeof d=="boolean")o.push(`<meta ${u}="${Rt(l)}" content="${Rt(d)}">`);else if(typeof d=="object"){let h=Object.entries(d).filter(([g,p])=>p!==void 0).map(([g,p])=>`${g}="${Rt(p)}"`).join(" ");o.push(`<meta ${h}>`)}});else if(typeof f=="object"){let d=Object.entries(f).filter(([h,g])=>g!==void 0).map(([h,g])=>`${h}="${Rt(g)}"`).join(" ");o.push(`<meta ${d}>`)}};if(n.startsWith("http-equiv:")){let l=n.replace("http-equiv:","");return i(l,s,"http-equiv"),o}if(n.startsWith("itemprop:")){let l=n.replace("itemprop:","");return i(l,s,"itemprop"),o}let c=["og:","twitter:","fb:","article:","profile:","book:","business:","music:","product:","video:","DC:","DCTERMS:"].find(l=>n.startsWith(l));if(c){let l=n.replace(c,"");return i(`${c.replace(":","")}:${l}`,s,c==="twitter:"||c==="DC:"||c==="DCTERMS:"?"name":"property"),o}if(n.startsWith("apple:")||n.startsWith("msapplication:")){let l=n.startsWith("apple:")?"apple-":"msapplication-",f=n.replace(/^apple:|^msapplication:/,"");return i(`${l}${f}`,s,"name"),o}return i(n,s),o},['<meta charset="UTF-8">','<meta name="viewport" content="width=device-width, initial-scale=1">']);return r.push(...wl(t)),r.join(`
32
- `)},XE=t=>typeof t=="string"&&t.length>0&&!t.startsWith("/")&&!t.startsWith("http")});var Sl,Ph,Q_=F(()=>{"use strict";Ot();Sl=(t,e)=>(T(e)?e:Object.values(e)).reduce((r,o)=>Math.abs(o-t)<Math.abs(r-t)?o:r),Ph=(t,e)=>(t=parseFloat(t),S(e)&&(e=Object.values(e)),Sl(t,e))});function ln(t){let e=String(t||"").trim();if(!e)return{owner:tx,key:"",full:""};let r=null,o=e;if(e.includes("/")){let s=e.indexOf("/");r=e.slice(0,s),o=e.slice(s+1)}o=o.replace(/\.symbo\.ls$/iu,""),r||(r=tx);let n=o?`${r}/${o}`:"";return{owner:r,key:o,full:n}}async function kl(t,e={}){if((e.provider||"kv")==="api")return rx(t,e);let o=await iA(t,e);return o||rx(t,e)}async function iA(t,e={}){let r=e.kvBaseUrl||QE,o=e.env||"production",n=`${r}/kv/${encodeURIComponent(t)}?env=${o}`;try{let s=await fetch(n,{method:"GET"});return s.ok&&(await s.json())?.value||null}catch{return null}}async function rx(t,e={}){let r=e.apiBaseUrl||tA,{key:o}=ln(t);try{let n=`${r}/core/projects/libraries/available?search=${encodeURIComponent(o)}&limit=10`,s=await fetch(n,{method:"GET"});if(!s.ok)return null;let i=await s.json(),c=(i?.items||i?.data||(Array.isArray(i)?i:[])).find(h=>{let{key:g}=ln(h?.key);return g.toLowerCase()===o.toLowerCase()});if(!c?.id&&!c?._id)return null;let l=c.id||c._id,f=`${r}/core/projects/${encodeURIComponent(l)}/data?branch=main`,u=await fetch(f,{method:"GET"});if(!u.ok)return null;let d=await u.json();return d?.data||d||null}catch{return null}}async function ox(t,e={}){if(S(t))return t;if(w(t)){let{full:r}=ln(t);if(!r)return null;try{let o=await kl(r,e);return o||console.warn(`[smbls] Shared library "${r}" not found`),o}catch(o){return console.warn(`[smbls] Failed to fetch shared library "${r}":`,o.message),null}}return null}async function Dh(t,e={}){return!t||!t.length?[]:(await Promise.all(t.map(async o=>{if(Pi(o)){let n=await ox(nA(o),e);return n?{library:n,ignoreList:o.ignoreList}:null}return ox(o,e)}))).filter(Boolean)}var tx,QE,tA,Oi,nx,eA,rA,ex,oA,Ri,Ih,Pi,nA,sA,Ii,sx=F(()=>{"use strict";Ot();tx="system",QE="https://smbls-kv.nika-980.workers.dev",tA="https://api.symbols.app";Oi=(t,e,r,o)=>{for(let n in e){let s=o?`${o}/${n}`:n;r&&r.has(s)||(n in t?S(t[n])&&S(e[n])&&Oi(t[n],e[n],r,s):t[n]=e[n])}},nx=(t,e,r)=>{if(!S(t)||!e.size)return t;let o=`${r}/`,n=!1;for(let i of e)if(i.startsWith(o)){n=!0;break}if(!n)return t;let s={};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=`${r}/${i}`;e.has(a)||(s[i]=nx(t[i],e,a))}return s},eA=new Set,rA=new Set(["components","pages","functions","snippets","methods"]),ex=(t,e)=>e===""&&rA.has(t),oA=t=>t.replace(/\.js$/iu,""),Ri=t=>{let e=new Set;if(!Array.isArray(t))return e;for(let r of t){if(!w(r))continue;let o=r.split("/").map(n=>oA(n.trim())).filter(Boolean).join("/");o&&e.add(o)}return e},Ih=(t,e={})=>({library:t,ignoreList:Array.isArray(e.ignoreList)?e.ignoreList:[]}),Pi=t=>S(t)&&Array.isArray(t.ignoreList)&&("library"in t||"key"in t||"name"in t),nA=t=>t.library!==void 0?t.library:t.key??t.name,sA=(t,e,r)=>{let o=Ri(e.sharedLibIgnore);e.sharePages===!1&&o.add("pages");let n=o.size?new Set([...r,...o]):r;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&!(s==="sharePages"||s==="sharedLibIgnore")&&!n.has(s))if(S(e[s])&&S(t[s]))if(s==="designSystem")Oi(t[s],e[s],n,s);else for(let i in e[s])n.has(`${s}/${i}`)||(i in t[s]?ex(s,t[s][i])&&!ex(s,e[s][i])&&(t[s][i]=e[s][i]):t[s][i]=e[s][i]);else s in t||(t[s]=nx(e[s],n,s))},Ii=(t,e)=>{if(!(!e||!e.length))for(let r=0;r<e.length;r++){let o=e[r],n=eA;Pi(o)&&(n=Ri(o.ignoreList),o=o.library),S(o)&&sA(t,o,n)}}});var $h,Lh,Mh,Di,Fh,$i,Nh,fo,ix=F(()=>{"use strict";Ot();$h=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},Lh=async t=>{try{let e=new Blob([t],{type:"text/javascript"}),r=new window.ClipboardItem({"text/plain":e});await navigator.clipboard.write([r]),console.log("JavaScript code copied to clipboard as text/javascript")}catch(e){console.error("Failed to copy JavaScript code: ",e)}},Mh=t=>t.replace(/[^a-zA-Z0-9_]/g,""),Di=t=>(typeof t!="string"&&(t=String(t||"")),t.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,r){return r===0?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")),Fh=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),$i=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),Nh=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},fo=t=>{if(T(t))return t;if(w(t))return t.split(" ");if(S(t))return Object.values(t);if(Fe(t))return[t]}});var jh,ax=F(()=>{"use strict";jh=()=>{let t=document.styleSheets[0],e="";if(t)try{let r=t.cssRules||t.rules;for(let o=0;o<r.length;o++)e+=r[o].cssText}catch(r){console.error("Unable to access CSS rules. This may be due to CORS restrictions:",r)}else console.log("No stylesheets found in document.styleSheets[0].");return e}});var Gt,fn,Li,Mi,cx=F(()=>{"use strict";Gt=t=>{let e=t&&t.src;if(!e||typeof e!="string")return null;let r=t.context;if(!r)return null;let o=r.assets&&r.assets[e]||r.files&&r.files[e];return o?typeof o=="string"?{src:o,type:null,variants:null}:typeof o=="object"&&typeof o.src=="string"?o:null:null},fn=(t,{keepOneX:e=!0}={})=>{if(!Array.isArray(t)||!t.length)return"";let r=t.some(n=>typeof n.width=="number"),o=[];for(let n of t)r&&typeof n.width=="number"?o.push(`${n.src} ${n.width}w`):r||(n.scale===1&&e?o.push(n.src):n.scale&&n.scale!==1&&o.push(`${n.src} ${n.scale}x`));return o.join(", ")},Li=t=>{if(!t||!Array.isArray(t.variants))return"";let e=t.variants.filter(r=>r.format===t.type);return fn(e,{keepOneX:!1})},Mi=(t,e)=>{if(!t||typeof t!="object"||typeof t.src!="string")return[];if(!Array.isArray(t.variants)||!t.variants.length)return[{tag:"img",attr:{src:t.src,alt:e||""}}];let r=new Map;for(let a of t.variants)r.has(a.format)||r.set(a.format,[]),r.get(a.format).push(a);let o=[];for(let[a,c]of r)a!==t.type&&o.push({tag:"source",attr:{type:a,srcset:fn(c,{keepOneX:!0})}});let n=r.get(t.type)||[],s=fn(n,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...o,{tag:"img",attr:i}]}});var vl={};P(vl,{CDN_PROVIDERS:()=>ue,DOMQL_EVENTS:()=>jd,DOMQ_PROPERTIES:()=>_r,ENV:()=>ep,HTML_TAGS:()=>Xo,METHODS:()=>Wo,METHODS_EXL:()=>Ps,NODE_ENV:()=>ve,OPTIONS:()=>ri,PACKAGE_MANAGER_TO_CDN:()=>Ar,PARSED_DOMQ_PROPERTIES:()=>Rs,PROPS_METHODS:()=>xr,STATE_METHODS:()=>ro,STATE_PROPERTIES:()=>Nd,SVG_TAGS:()=>c_,TYPES:()=>ks,UNIVERSAL_RESERVED_KEYS:()=>bl,addCaching:()=>tl,addContext:()=>Qc,addExtend:()=>Ep,addExtends:()=>Kt,addItemAfterEveryElement:()=>Cd,addProtoToArray:()=>Es,addRef:()=>Xc,applyDependentState:()=>Wp,applyEvent:()=>il,applyEventUpdate:()=>al,applyExtends:()=>u_,applyProps:()=>Ys,arrayContainsOtherArray:()=>bd,arraysEqual:()=>Ad,arrayzeValue:()=>fo,buildImgSrcset:()=>Li,buildSourcesAndImg:()=>Mi,cache:()=>Xp,call:()=>ph,captureSnapshot:()=>gh,checkForStateTypes:()=>Up,checkIfInherits:()=>sl,checkIfStringIsInArray:()=>Rd,clone:()=>Ud,cloneAndMergeArrayExtend:()=>Us,cloneFunction:()=>fp,concatAddExtends:()=>kp,copyJavaScriptToClipboard:()=>Lh,copyStringToClipboard:()=>$h,createBasedOnType:()=>Yc,createElement:()=>Bp,createElementExtends:()=>Fc,createExtends:()=>zs,createExtendsFromKeys:()=>Jo,createExtendsStack:()=>Uc,createIfConditionFlag:()=>up,createInheritedState:()=>Vp,createKey:()=>js,createNestedObject:()=>Gd,createNestedObjectByKeyPath:()=>Hp,createObjectWithoutPrototype:()=>Rc,createParent:()=>Jc,createPath:()=>Zc,createProps:()=>Xs,createPropsStack:()=>Kc,createRoot:()=>jp,createScope:()=>Kp,createSnapshotId:()=>Ns,customDecodeURIComponent:()=>Fd,customEncodeURIComponent:()=>Md,cutArrayAfterValue:()=>kd,cutArrayBeforeValue:()=>Sd,debounce:()=>Bs,debounceOnContext:()=>ap,decodeNewlines:()=>Ld,deepClone:()=>ft,deepContains:()=>qd,deepDefaults:()=>Oi,deepDestringifyFunctions:()=>le,deepExtend:()=>Mc,deepMerge:()=>st,deepMergeExtends:()=>je,deepStringifyFunctions:()=>Ds,defineSetter:()=>uh,destringifyGlobalScope:()=>Ls,detectHeightOnInit:()=>xh,detectInfiniteLoop:()=>Zd,document:()=>Q,encodeNewlines:()=>$d,error:()=>co,excludeKeysFromObject:()=>tp,exec:()=>ut,extendCachedRegistry:()=>vp,extendStackRegistry:()=>Hs,extractArrayExtend:()=>qs,fetchLibraryData:()=>kl,fibonacciNumberByIndex:()=>wh,filterArrays:()=>Td,filterArraysFast:()=>Od,finalizeExtends:()=>Vc,findClosestNumber:()=>Sl,findClosestNumberInFactory:()=>Ph,findInheritedState:()=>nl,findKeyPosition:()=>Id,flattenExtend:()=>Zo,formatDate:()=>_h,generateHash:()=>Dc,generateHeadArrayTags:()=>wl,generateKey:()=>Fs,generateMetaTags:()=>Oh,get:()=>ch,getCDNDirUrl:()=>_l,getCDNUrl:()=>Ee,getCapitalCaseKeys:()=>Op,getCdnProviderFromConfig:()=>on,getChildStateInKey:()=>ol,getChildren:()=>pi,getContext:()=>xi,getCookie:()=>mp,getDB:()=>Ci,getEmotionStylesheet:()=>jh,getExtendsInElement:()=>Ap,getExtendsStack:()=>Vs,getExtendsStackRegistry:()=>Lc,getFrequencyInArray:()=>_d,getHashedExtend:()=>Ws,getImportMapScript:()=>bh,getInObjectByPath:()=>Jd,getLocalStorage:()=>bp,getNev:()=>sp,getPageMetadata:()=>Rh,getParentStateInKey:()=>rl,getPath:()=>hi,getQuery:()=>Ei,getRef:()=>fh,getRoot:()=>yi,getRootContext:()=>_i,getRootData:()=>bi,getRootState:()=>mi,getRootStateInKey:()=>el,getSpreadChildren:()=>Rp,global:()=>gd,hasFunction:()=>Ne,hasHandlerPlugin:()=>Ko,hasOwnProperty:()=>zd,hashContent:()=>cn,inheritChildExtends:()=>jc,inheritChildPropsExtends:()=>Nc,inheritParentProps:()=>Js,inheritRecursiveChildExtends:()=>Bc,initProps:()=>Mp,is:()=>Wt,isArray:()=>T,isBoolean:()=>Cc,isContextComponent:()=>Pp,isCyclic:()=>Qd,isDOMNode:()=>Ht,isDate:()=>Ac,isDefined:()=>bt,isDevelopment:()=>Sr,isEmpty:()=>Tc,isEmptyObject:()=>Hd,isEqualDeep:()=>Oc,isFunction:()=>A,isHtmlElement:()=>ws,isLocal:()=>np,isLoudDevRuntime:()=>Pt,isMalformedDependency:()=>nn,isMethod:()=>hh,isMobile:()=>hp,isNode:()=>Qe,isNot:()=>yd,isNotProduction:()=>so,isNull:()=>Ec,isNumber:()=>Fe,isObject:()=>S,isObjectLike:()=>z,isPhoto:()=>Sh,isPolyglotWritableKey:()=>er,isProduction:()=>wr,isStaging:()=>op,isState:()=>zp,isString:()=>w,isStringFunction:()=>lp,isTest:()=>Ic,isTesting:()=>rp,isUndefined:()=>Tt,isUniversallyReservedKey:()=>mh,isUnresolvableDependency:()=>lo,isValidDependencyMap:()=>sn,isValidHtmlTag:()=>xp,isWrappedLibrary:()=>Pi,joinArrays:()=>Vo,jointStacks:()=>Cp,keys:()=>ml,loadCssFile:()=>Eh,loadJavascript:()=>Ah,loadJavascriptFile:()=>kh,loadJavascriptFileEmbedSync:()=>Ch,loadJavascriptFileSync:()=>vh,loadRemoteCSS:()=>Th,loadRemoteScript:()=>an,log:()=>dh,logGroupIf:()=>pp,logIf:()=>dp,lookdown:()=>ih,lookdownAll:()=>ah,lookup:()=>sh,lowercaseFirstLetter:()=>eo,makeObjectWithoutPrototype:()=>Wd,map:()=>Bd,mapStringsWithContextComponents:()=>Ks,markPolyglotSeeded:()=>Ue,matchesComponentNaming:()=>Be,memoize:()=>cp,merge:()=>gt,mergeSharedLibraries:()=>Ii,nextElement:()=>Si,normalizeIgnoreList:()=>Ri,normalizeLibraryKey:()=>ln,objectToString:()=>$s,objectizeStringProperty:()=>Gs,overwrite:()=>Ms,overwriteDeep:()=>qt,overwriteShallow:()=>no,overwriteState:()=>qp,parse:()=>yl,parseDeep:()=>ui,pickupElementFromProps:()=>Wc,pickupPropsFromElement:()=>Hc,polyglotSeededKeys:()=>ei,previousElement:()=>ki,propExists:()=>$p,propertizeElement:()=>qc,propertizeUpdate:()=>Dp,remove:()=>N_,removeChars:()=>Mh,removeCookie:()=>yp,removeDuplicateProps:()=>Qs,removeDuplicatesInArray:()=>zo,removeFromArray:()=>xd,removeFromObject:()=>Kd,removeNestedKeyByPath:()=>Yd,removeValueFromArray:()=>Cs,removeValueFromArrayAll:()=>vd,reorderArrayByValues:()=>Ed,replaceLiteralsWithObjectFields:()=>to,replaceOctalEscapeSequences:()=>Dd,resolveAsset:()=>Gt,resolveHandler:()=>Go,resolveSharedLibraries:()=>Dh,returnValueAsText:()=>Gc,runPluginHook:()=>At,self:()=>md,setActiveRootState:()=>gi,setCookie:()=>gp,setHashedExtend:()=>$c,setInObjectByPath:()=>Xd,setLocalStorage:()=>_p,setNodeStyles:()=>gl,setProps:()=>lh,setPropsPrototype:()=>Zs,sharedLibrary:()=>Ih,splitPackageSpecifier:()=>Ai,spotByPath:()=>di,srcsetFor:()=>fn,stringIncludesAny:()=>Ts,stringToObject:()=>Vd,stripVersionRangePrefix:()=>Ti,swapItemsInArray:()=>wd,syncProps:()=>ti,toCamelCase:()=>Di,toDashCase:()=>$i,toDescriptionCase:()=>Nh,toTitleCase:()=>Fh,toggleFullscreen:()=>yh,triggerEventOn:()=>kr,triggerEventOnUpdate:()=>Gp,trimStringFromSymbols:()=>Pd,unstackArrayOfObjects:()=>vs,update:()=>Lp,updateProps:()=>Fp,variables:()=>vi,verbose:()=>tn,warn:()=>wi,window:()=>v});var R=F(()=>{"use strict";Pc();ip();Ot();tr();Yo();Ho();Ss();s_();i_();Os();xs();a_();wp();Tp();Np();zc();y_();__();qo();x_();U_();Jp();V_();Yp();z_();H_();W_();q_();K_();G_();Y_();X_();Z_();Q_();sx();ix();ax();cx()});var Hv=Xu((uV,zv)=>{var ss=1e3,is=ss*60,as=is*60,Do=as*24,tP=Do*7,eP=Do*365.25;zv.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return rP(t);if(r==="number"&&isFinite(t))return e.long?nP(t):oP(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function rP(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),o=(e[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return r*eP;case"weeks":case"week":case"w":return r*tP;case"days":case"day":case"d":return r*Do;case"hours":case"hour":case"hrs":case"hr":case"h":return r*as;case"minutes":case"minute":case"mins":case"min":case"m":return r*is;case"seconds":case"second":case"secs":case"sec":case"s":return r*ss;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function oP(t){var e=Math.abs(t);return e>=Do?Math.round(t/Do)+"d":e>=as?Math.round(t/as)+"h":e>=is?Math.round(t/is)+"m":e>=ss?Math.round(t/ss)+"s":t+"ms"}function nP(t){var e=Math.abs(t);return e>=Do?xu(t,e,Do,"day"):e>=as?xu(t,e,as,"hour"):e>=is?xu(t,e,is,"minute"):e>=ss?xu(t,e,ss,"second"):t+" ms"}function xu(t,e,r,o){var n=e>=r*1.5;return Math.round(t/r)+" "+o+(n?"s":"")}});var qv=Xu((dV,Wv)=>{function sP(t){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=n,r.enabled=a,r.humanize=Hv(),r.destroy=l,Object.keys(t).forEach(f=>{r[f]=t[f]}),r.names=[],r.skips=[],r.formatters={};function e(f){let u=0;for(let d=0;d<f.length;d++)u=(u<<5)-u+f.charCodeAt(d),u|=0;return r.colors[Math.abs(u)%r.colors.length]}r.selectColor=e;function r(f){let u,d=null,h,g;function p(...m){if(!p.enabled)return;let b=p,_=Number(new Date),y=_-(u||_);b.diff=y,b.prev=u,b.curr=_,u=_,m[0]=r.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let x=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(E,O)=>{if(E==="%%")return"%";x++;let $=r.formatters[O];if(typeof $=="function"){let D=m[x];E=$.call(b,D),m.splice(x,1),x--}return E}),r.formatArgs.call(b,m),(b.log||r.log).apply(b,m)}return p.namespace=f,p.useColors=r.useColors(),p.color=r.selectColor(f),p.extend=o,p.destroy=r.destroy,Object.defineProperty(p,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,g=r.enabled(f)),g),set:m=>{d=m}}),typeof r.init=="function"&&r.init(p),p}function o(f,u){let d=r(this.namespace+(typeof u>"u"?":":u)+f);return d.log=this.log,d}function n(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];let u=(typeof f=="string"?f:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of u)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function s(f,u){let d=0,h=0,g=-1,p=0;for(;d<f.length;)if(h<u.length&&(u[h]===f[d]||u[h]==="*"))u[h]==="*"?(g=h,p=d,h++):(d++,h++);else if(g!==-1)h=g+1,p++,d=p;else return!1;for(;h<u.length&&u[h]==="*";)h++;return h===u.length}function i(){let f=[...r.names,...r.skips.map(u=>"-"+u)].join(",");return r.enable(""),f}function a(f){for(let u of r.skips)if(s(f,u))return!1;for(let u of r.names)if(s(f,u))return!0;return!1}function c(f){return f instanceof Error?f.stack||f.message:f}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Wv.exports=sP});var Kv=Xu((Qt,wu)=>{Qt.formatArgs=aP;Qt.save=cP;Qt.load=lP;Qt.useColors=iP;Qt.storage=fP();Qt.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Qt.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function iP(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function aP(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+wu.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(r++,n==="%c"&&(o=r))}),t.splice(o,0,e)}Qt.log=console.debug||console.log||(()=>{});function cP(t){try{t?Qt.storage.setItem("debug",t):Qt.storage.removeItem("debug")}catch{}}function lP(){let t;try{t=Qt.storage.getItem("debug")||Qt.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function fP(){try{return localStorage}catch{}}wu.exports=qv()(Qt);var{formatters:uP}=wu.exports;uP.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Lb={};P(Lb,{ANIMATION_PROPS:()=>Jg,ARIA_ROLES:()=>gT,ATTR_TRANSFORMS:()=>qg,BLOCK_PROPS:()=>Zg,CDN_PROVIDERS:()=>ue,CONFIG:()=>mo,CONFIG_MERGE_EXL:()=>ee,CSS_NAMED_COLOR_HEX:()=>Cl,CSS_NATIVE_COLOR_REGEX:()=>te,CSS_PROPS_REGISTRY:()=>xt,CSS_UNITS:()=>Uo,DEFAULT_CONFIG:()=>Pa,DEFAULT_CSS_PROPERTIES_LIST:()=>vt,DELEGATED_EVENTS:()=>In,DESIGN_SYSTEM_OPTIONS:()=>Ey,DOMQL_EVENTS:()=>jd,DOMQ_PROPERTIES:()=>_r,DOM_EVENTS:()=>Xx,ENV:()=>ep,FACTORY:()=>he,FLEX_PROPS:()=>sm,FONT_PROPS:()=>Qg,GRID_PROPS:()=>im,HOST_REGISTERED_PACKAGES:()=>Qk,HTML_ATTRIBUTES:()=>bf,HTML_TAGS:()=>Xo,LIFECYCLE_EVENTS:()=>Mr,METHODS:()=>Wo,METHODS_EXL:()=>Ps,MISC_PROPS:()=>tm,MIXINS:()=>hf,NODE_ENV:()=>ve,OPTIONS:()=>ri,PACKAGE_MANAGER_TO_CDN:()=>Ar,PARSED_DOMQ_PROPERTIES:()=>Rs,POSITION_PROPS:()=>em,PROPS_METHODS:()=>xr,REGISTRY:()=>jt,RESERVED_STORE_METHODS:()=>qb,ROUTER_OPTIONS:()=>Uf,SIGNAL_ENGINE_KEY:()=>jo,SIGNAL_INSTANCES_KEY:()=>Fo,STANDARD_SCHEME_QUERIES:()=>Gl,STATE_PROPERTIES:()=>Nd,STORE_METHOD_NAMES:()=>Wb,SVG_TAGS:()=>Rn,THEME_PROPS:()=>nm,TIMING_PROPS:()=>ka,TYPES:()=>ks,UNIVERSAL_RESERVED_KEYS:()=>bl,VALUE_TRANSFORMERS:()=>nf,VERSION:()=>Gb,__resetSignalEngine:()=>dd,__resetSignalInstances:()=>ud,__resetStateShadowWarnings:()=>Kb,activateConfig:()=>px,addCaching:()=>tl,addContext:()=>Qc,addDelegatedEvent:()=>wa,addExtend:()=>Ep,addExtends:()=>Kt,addItemAfterEveryElement:()=>Cd,addMethods:()=>Nn,addProtoToArray:()=>Es,addRef:()=>Xc,animation:()=>fg,appendSVGSprite:()=>ga,appendSvgIconsSprite:()=>xo,applyAttrTransforms:()=>Gg,applyCSS:()=>_y,applyDependentState:()=>Wp,applyDocument:()=>ha,applyEvent:()=>il,applyEventUpdate:()=>al,applyExtends:()=>$n,applyHeadings:()=>Zl,applyInitialState:()=>Af,applyMediaSequenceVars:()=>Or,applyProps:()=>Ys,applyReset:()=>ma,applySequenceGlobalVars:()=>Zi,applySequenceVars:()=>ir,applySpacingSequence:()=>ea,applyStateMethods:()=>ae,applyTimingSequence:()=>pa,applyTrueProps:()=>cm,applyTypographySequence:()=>fa,arrayContainsOtherArray:()=>bd,arraysEqual:()=>Ad,arrayzeValue:()=>fo,assertEmitIntegrity:()=>Mg,batch:()=>wc,breakpoints:()=>cg,buildImgSrcset:()=>Li,buildSourcesAndImg:()=>Mi,buildThemeVarStyles:()=>qn,cache:()=>Xp,cacheNode:()=>Lr,call:()=>ph,callStateMethod:()=>Ca,camelToAttr:()=>Nr,camelToLowerAttr:()=>Jx,captureSnapshot:()=>gh,changeGlobalTheme:()=>sf,changeLightness:()=>Wh,checkAttributeByTagName:()=>jr,checkEventFunctions:()=>Kg,checkForStateTypes:()=>Up,checkIfBoxSize:()=>ta,checkIfInherits:()=>sl,checkIfStringIsInArray:()=>Rd,class:()=>gg,clone:()=>Ud,cloneAndMergeArrayExtend:()=>Us,cloneFunction:()=>fp,color:()=>eg,colorStringToRgbaArray:()=>de,components:()=>Hn,compositeOverBackdrop:()=>po,concatAddExtends:()=>kp,contrastRatio:()=>pn,convertSvgToSymbol:()=>Qi,copyJavaScriptToClipboard:()=>Lh,copyStringToClipboard:()=>$h,create:()=>$b,createAsync:()=>JP,createBasedOnType:()=>Yc,createComputed:()=>Vb,createConfig:()=>Wi,createDefine:()=>nk,createEffect:()=>Z,createElement:()=>Bp,createElementExtends:()=>Fc,createExtends:()=>zs,createExtendsFromKeys:()=>Jo,createExtendsStack:()=>Uc,createHTMLNode:()=>On,createIfConditionFlag:()=>up,createInheritedState:()=>Vp,createKey:()=>js,createNestedObject:()=>Gd,createNestedObjectByKeyPath:()=>Hp,createObjectWithoutPrototype:()=>Rc,createParent:()=>Jc,createPath:()=>Zc,createProps:()=>Xs,createPropsStack:()=>Kc,createRoot:()=>jp,createScope:()=>Kp,createScopeStore:()=>kc,createSignal:()=>bs,createSkeleton:()=>QP,createSnapshotId:()=>Ns,createState:()=>pm,createStore:()=>Xe,createSync:()=>ZP,css:()=>_e,cssMediaVars:()=>zl,cssVars:()=>Vl,customDecodeURIComponent:()=>Fd,customEncodeURIComponent:()=>Md,cutArrayAfterValue:()=>kd,cutArrayBeforeValue:()=>Sd,debounce:()=>Bs,debounceOnContext:()=>ap,decodeNewlines:()=>Ld,deepClone:()=>ft,deepContains:()=>qd,deepDefaults:()=>Oi,deepDestringifyFunctions:()=>le,deepExtend:()=>Mc,deepMerge:()=>st,deepMergeExtends:()=>je,deepStringifyFunctions:()=>Ds,defaultDefine:()=>Gn,defineResolvedThemeSignal:()=>bn,defineSetter:()=>uh,defineThemeSignal:()=>yn,destringifyGlobalScope:()=>Ls,destroy:()=>Fa,detectHeightOnInit:()=>xh,detectInfiniteLoop:()=>Zd,detectTag:()=>$r,devices:()=>lg,dispose:()=>Br,encodeNewlines:()=>$d,error:()=>co,excludeKeysFromObject:()=>tp,exec:()=>ut,executeAttr:()=>_T,exetuteClassPerComponent:()=>YT,extendCachedRegistry:()=>vp,extendStackRegistry:()=>Hs,extractArrayExtend:()=>qs,extractConditionalAttrs:()=>ST,fetchLibraryData:()=>kl,fibonacciNumberByIndex:()=>wh,filterArrays:()=>Td,filterArraysFast:()=>Od,filterAttributesByTagName:()=>bT,finalizeExtends:()=>Vc,findClosestNumber:()=>Sl,findClosestNumberInFactory:()=>Ph,findHeadingLetter:()=>Kl,findHeadings:()=>Ji,findInheritedState:()=>nl,findKeyPosition:()=>Id,flattenExtend:()=>Zo,font:()=>Yh,fontFace:()=>Zh,fontFamily:()=>Xh,fontFamilyTypes:()=>Jh,formatDate:()=>_h,generateHash:()=>Dc,generateHeadArrayTags:()=>wl,generateKey:()=>Fs,generateMetaTags:()=>Oh,generateSequence:()=>Yt,generateSequencePosition:()=>xg,generateSprite:()=>_n,generateSubSequence:()=>Yi,get:()=>ch,getActiveConfig:()=>C,getActiveDocument:()=>uf,getActiveLang:()=>Xn,getCDNDirUrl:()=>_l,getCDNUrl:()=>Ee,getCacheSize:()=>Ng,getCapitalCaseKeys:()=>Op,getCdnProviderFromConfig:()=>on,getChildStateInKey:()=>ol,getChildren:()=>pi,getColor:()=>et,getColorShade:()=>Rl,getContext:()=>xi,getCookie:()=>mp,getDB:()=>Ci,getDefaultOrFirstKey:()=>ho,getEmitStats:()=>df,getEmotionStylesheet:()=>jh,getExtendsInElement:()=>Ap,getExtendsStack:()=>Vs,getExtendsStackRegistry:()=>Lc,getFnPrefixAndValue:()=>sr,getFontFace:()=>Kh,getFontFaceEach:()=>go,getFontFaceEachString:()=>Nl,getFontFaceString:()=>Ui,getFontFamily:()=>la,getFontFormat:()=>Ml,getFontSizeByKey:()=>ua,getFrequencyInArray:()=>_d,getHashedExtend:()=>Ws,getImportMapScript:()=>bh,getInObjectByPath:()=>Jd,getLanguages:()=>Ba,getLocalStateLang:()=>Wa,getLocalStorage:()=>bp,getMediaColor:()=>It,getMediaTheme:()=>me,getNev:()=>sp,getObserver:()=>Sc,getPageMetadata:()=>Rh,getParentStateInKey:()=>rl,getPath:()=>hi,getQuery:()=>Ei,getRef:()=>fh,getResolvedThemeSignal:()=>dx,getRgbTone:()=>ze,getRoot:()=>yi,getRootContext:()=>_i,getRootData:()=>bi,getRootState:()=>mi,getRootStateInKey:()=>el,getSafeInk:()=>Yl,getSafeInkInfo:()=>kg,getSequenceValue:()=>Xi,getSequenceValueBySymbols:()=>ql,getSequenceValuePropertyPair:()=>We,getShadow:()=>oa,getShapeByKey:()=>da,getSignals:()=>Hb,getSpacingBasedOnRatio:()=>Te,getSpacingByKey:()=>St,getSpreadChildren:()=>Rp,getSubratio:()=>Gi,getSubratioDifference:()=>Ki,getSystemGlobalTheme:()=>xe,getTheme:()=>sa,getThemeSignal:()=>ux,getTimingByKey:()=>oe,getTimingFunction:()=>ye,global:()=>gd,gradient:()=>rg,grid:()=>hg,hasFunction:()=>Ne,hasHandlerPlugin:()=>Ko,hasOwnProperty:()=>zd,hashContent:()=>cn,hexToRgb:()=>Uh,hexToRgbArray:()=>El,hexToRgba:()=>zh,hslToRgb:()=>Ol,icons:()=>sg,inheritChildExtends:()=>jc,inheritChildPropsExtends:()=>Nc,inheritParentProps:()=>Js,inheritRecursiveChildExtends:()=>Bc,init:()=>ur,initPolyglot:()=>Hf,initProps:()=>Mp,injectGlobal:()=>kt,is:()=>Wt,isArray:()=>T,isBoolean:()=>Cc,isCSSVar:()=>mt,isContextComponent:()=>Pp,isCyclic:()=>Qd,isDOMNode:()=>Ht,isDate:()=>Ac,isDefined:()=>bt,isDevelopment:()=>Sr,isDomDocument:()=>Je,isEmpty:()=>Tc,isEmptyObject:()=>Hd,isEnumeratedTrueFalseAttr:()=>cr,isEqualDeep:()=>Oc,isFunction:()=>A,isGoogleFontsUrl:()=>hn,isHostObject:()=>Ze,isHtmlElement:()=>ws,isLocal:()=>np,isLoudDevRuntime:()=>Pt,isMalformedDependency:()=>nn,isMethod:()=>hh,isMobile:()=>hp,isNode:()=>Qe,isNot:()=>yd,isNotProduction:()=>so,isNull:()=>Ec,isNumber:()=>Fe,isObject:()=>S,isObjectLike:()=>z,isPhoto:()=>Sh,isPolyglotWritableKey:()=>er,isProduction:()=>wr,isRawUnitValue:()=>_s,isResolvedColor:()=>Ae,isScalingUnit:()=>Qr,isStaging:()=>op,isState:()=>zp,isStore:()=>yt,isString:()=>w,isStringFunction:()=>lp,isSvgTag:()=>Pn,isTest:()=>Ic,isTesting:()=>rp,isTracking:()=>gm,isUndefined:()=>Tt,isUniversallyReservedKey:()=>mh,isUnresolvableDependency:()=>lo,isValidDependencyMap:()=>sn,isValidHtmlTag:()=>xp,isValidTag:()=>Tn,isWasmLoaded:()=>H0,isWrappedLibrary:()=>Pi,isWritableFamilyBucket:()=>hd,joinArrays:()=>Vo,jointStacks:()=>Cp,keyframes:()=>An,keys:()=>ml,linearChannelToSrgb:()=>Dl,loadCssFile:()=>Eh,loadJavascript:()=>Ah,loadJavascriptFile:()=>kh,loadJavascriptFileEmbedSync:()=>Ch,loadJavascriptFileSync:()=>vh,loadRemoteCSS:()=>Th,loadRemoteScript:()=>an,loadTranslations:()=>Va,loadWasm:()=>z0,log:()=>dh,logGroupIf:()=>pp,logIf:()=>dp,lookdown:()=>ih,lookdownAll:()=>ah,lookup:()=>sh,lowercaseFirstLetter:()=>eo,makeObjectWithoutPrototype:()=>Wd,map:()=>Bd,mapStringsWithContextComponents:()=>Ks,markPolyglotSeeded:()=>Ue,matchesComponentNaming:()=>Be,media:()=>Qh,memoize:()=>cp,merge:()=>gt,mergeSharedLibraries:()=>Ii,mixTwoColors:()=>Bh,mixTwoRgb:()=>Hh,mixTwoRgba:()=>Pl,nextElement:()=>Si,normalizeIgnoreList:()=>Ri,normalizeLibraryKey:()=>ln,numToLetterMap:()=>He,objectToString:()=>$s,objectizeStringProperty:()=>Gs,oklabToLinearSrgb:()=>$l,oklabToOklch:()=>Ni,oklchToGamutSafeSrgb:()=>ji,oklchToOklab:()=>Ll,opacify:()=>dn,overwrite:()=>Ms,overwriteDeep:()=>qt,overwriteShallow:()=>no,overwriteState:()=>qp,parkHostObject:()=>br,parse:()=>yl,parseColorToken:()=>Nt,parseDeep:()=>ui,pickupElementFromProps:()=>Wc,pickupPropsFromElement:()=>Hc,polyglotFunctions:()=>ec,polyglotPlugin:()=>Jn,polyglotSeededKeys:()=>ei,popConfig:()=>tt,popStaticCssPass:()=>om,previousElement:()=>ki,propExists:()=>$p,propertizeElement:()=>qc,propertizeUpdate:()=>Dp,pushConfig:()=>it,pushStaticCssPass:()=>rm,refreshContextProto:()=>Sf,registerEvent:()=>Dn,registerHostPackages:()=>tv,registerSignalInstance:()=>No,reinit:()=>by,relativeLuminance:()=>uo,remove:()=>Fn,removeChars:()=>Mh,removeCookie:()=>yp,removeDelegatedEvent:()=>Sa,removeDuplicateProps:()=>Qs,removeDuplicatesInArray:()=>zo,removeFromArray:()=>xd,removeFromObject:()=>Kd,removeNestedKeyByPath:()=>Yd,removeValueFromArray:()=>Cs,removeValueFromArrayAll:()=>vd,reorderArrayByValues:()=>Ed,replaceLiteralsWithObjectFields:()=>to,replaceOctalEscapeSequences:()=>Dd,resetEmitStats:()=>Lg,resolveAsset:()=>Gt,resolveBorderValue:()=>re,resolveColorRgb:()=>yo,resolveColorsInGradient:()=>ba,resolveConfigDocument:()=>Bo,resolveFileSource:()=>Wg,resolveFileUrl:()=>pe,resolveHandler:()=>Go,resolvePropValue:()=>Fr,resolveShadowValue:()=>bo,resolveSharedLibraries:()=>Dh,returnSubThemeOrDefault:()=>qh,returnValueAsText:()=>Gc,rgbArrayToHex:()=>Al,rgbToHSL:()=>Tl,rgbToHex:()=>Vh,runPluginHook:()=>At,runThroughMedia:()=>Jl,scratchDefaultConfig:()=>mn,scratchSystem:()=>kn,scratchUtils:()=>Rr,self:()=>md,semanticIcons:()=>ig,sequence:()=>nr,serializeAttrValue:()=>Ke,set:()=>wo,setActiveConfig:()=>Hl,setActiveDocument:()=>$g,setActiveRootState:()=>gi,setAdaptiveSchemeVar:()=>Ir,setClass:()=>rO,setClassname:()=>XT,setColor:()=>Pr,setCookie:()=>gp,setCssEngineHook:()=>jf,setCustomFont:()=>Bi,setCustomFontMedia:()=>Tr,setEach:()=>Rg,setFont:()=>ca,setFontFamily:()=>wn,setFontImport:()=>gn,setGradient:()=>xn,setHashedExtend:()=>$c,setInCustomFontMedia:()=>Fl,setInObjectByPath:()=>Xd,setLang:()=>za,setLocalStorage:()=>_p,setMediaTheme:()=>aa,setNodeStyles:()=>gl,setObserver:()=>zb,setProps:()=>lh,setPropsPrototype:()=>Zs,setSVG:()=>Sn,setScalingVar:()=>qi,setShadow:()=>Dr,setSubScalingVar:()=>Wl,setSvgIcon:()=>_o,setTheme:()=>ia,setValue:()=>Og,setVariables:()=>wg,setWasmEngine:()=>xa,shadow:()=>ng,shape:()=>bg,sharedLibrary:()=>Ih,sizes:()=>yg,spacing:()=>tg,splitPackageSpecifier:()=>Ai,splitSpacedValue:()=>ra,splitTopLevelCommas:()=>or,splitTransition:()=>of,spotByPath:()=>di,srcsetFor:()=>fn,srgbChannelToLinear:()=>Il,srgbToOklab:()=>Fi,stringIncludesAny:()=>Ts,stringToObject:()=>Vd,stripVersionRangePrefix:()=>Ti,svg:()=>ug,svgData:()=>dg,swapItemsInArray:()=>wd,syncProps:()=>ti,templates:()=>pg,theme:()=>og,timing:()=>ag,toCamel:()=>Hi,toCamelCase:()=>Di,toDashCase:()=>$i,toDescriptionCase:()=>Nh,toLinearChannel:()=>un,toTitleCase:()=>Fh,toggleFullscreen:()=>yh,transformBackgroundImage:()=>ef,transformBorder:()=>qe,transformBorderRadius:()=>ar,transformBoxShadow:()=>ya,transformClassname:()=>iw,transformDuration:()=>_a,transformShadow:()=>tf,transformSize:()=>_t,transformSizeRatio:()=>N,transformTextStroke:()=>Ql,transformTransition:()=>Tg,transformersByPrefix:()=>lm,transfromGap:()=>rf,translate:()=>Ua,triggerEventOn:()=>kr,triggerEventOnUpdate:()=>Gp,trimStringFromSymbols:()=>Pd,typography:()=>Vi,unit:()=>Gh,unstackArrayOfObjects:()=>vs,update:()=>Ln,updateProps:()=>Fp,updateVars:()=>eO,upsertTranslation:()=>Ha,useCssInProps:()=>ie,useHostState:()=>hm,usePropsAsCSS:()=>nw,useSelectorsAsCSS:()=>sw,variables:()=>vi,vars:()=>mg,verbose:()=>tn,warn:()=>wi,warnStateKeyShadowsMethod:()=>vc,window:()=>v,wrapHoverRule:()=>Oe});module.exports=BC(Lb);var pd={};P(pd,{RESERVED_STORE_METHODS:()=>qb,SIGNAL_ENGINE_KEY:()=>jo,SIGNAL_INSTANCES_KEY:()=>Fo,STORE_METHOD_NAMES:()=>Wb,VERSION:()=>Gb,__resetSignalEngine:()=>dd,__resetSignalInstances:()=>ud,__resetStateShadowWarnings:()=>Kb,batch:()=>wc,createComputed:()=>Vb,createEffect:()=>Z,createScopeStore:()=>kc,createSignal:()=>bs,createStore:()=>Xe,getObserver:()=>Sc,getSignals:()=>Hb,isStore:()=>yt,registerSignalInstance:()=>No,setObserver:()=>zb,warnStateKeyShadowsMethod:()=>vc});var od={};P(od,{WRITE_JOURNAL:()=>hs,batch:()=>ms,createComputed:()=>VC,createEffect:()=>zC,createSignal:()=>Le,getObserver:()=>ed,journalWrite:()=>gs,setObserver:()=>UC});var zt=null,hc=0,gc=[],ed=()=>zt,UC=t=>{zt=t},mc=0,Ju=[];function Le(t){let e=new Set;function r(){return zt&&(e.add(zt),zt._sources.add(s)),t}function o(i){i!==t&&(t=i,YC(e))}function n(){return t}let s={get:r,set:o,peek:n,_subscribers:e,_type:"signal"};return s}function VC(t){let e,r=!0,o=new Set,n={_sources:new Set,_type:"computed",_subscribers:o,_execute(){td(n);let s=zt;zt=n;try{e=t(),r=!1}finally{zt=s}},_notify(){r=!0,o.size>0&&Bb(o)},get(){return zt&&(o.add(zt),zt._sources.add(n)),r&&n._execute(),e},peek(){return r&&n._execute(),e}};return n._execute(),n}var ke=new Set,Zu=!1,hs=[];function gs(t){hs.push(t),hs.length>32&&hs.shift()}function zC(t,e){let r=e?.depth??0,o={_sources:new Set,_type:"effect",_depth:r,_label:e?.label,_disposed:!1,_subscribers:new Set,_execute(){if(o._disposed)return;td(o);let n=zt;zt=o;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{zt=n}},_notify(){o._disposed||(hc>0?gc.push(o):mc>0?Ju.push(o):rd(o))},dispose(){o._disposed=!0,td(o)}};return o._execute(),o}function ms(t){hc++;try{t()}finally{hc--,hc===0&&GC()}}var Qu=!1,Fb=1e3,HC=8,WC=256,qC=4;function Nb(){return typeof performance<"u"?performance.now():Date.now()}function rd(t){ke.add(t),!Qu&&(Zu||(Zu=!0,queueMicrotask(jb)))}var Mo=[];function KC(){if(ke.size===1){let[e]=ke;return ke.clear(),e._disposed?0:(e._execute(),1)}Mo.length=0;for(let e of ke)Mo.push(e);ke.clear(),Mo.sort((e,r)=>e._depth-r._depth);let t=0;for(let e=0;e<Mo.length;e++){let r=Mo[e];r._disposed||(r._execute(),t++)}return Mo.length=0,t}function jb(t=0,e=0){if(Zu=!1,ke.size===0)return;Qu=!0;let r=Nb(),o=!1;try{for(;ke.size>0;){if(++t>Fb){let n=new Map;for(let c of ke){let l=c._label;if(typeof l=="function")try{l=l()}catch{l="<label error>"}if(l=l||"<unlabeled>",n.set(l,(n.get(l)||0)+1),n.size>=12)break}let s=[...n.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", "),i=new Map;for(let c of hs)i.set(c,(i.get(c)||0)+1);let a=[...i.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", ");console.error("[smbls] reactive effect cascade exceeded",Fb,"passes in a single flush \u2014 breaking to avoid hanging the thread.","This usually means an effect (or an onUpdate/subscribeTo handler","it calls into) unconditionally writes back a signal it depends on.","Still queued at break (the loop participants):",s||"<queue empty>","\u2014 last notifying store writes:",a||"<none recorded>"),ke.clear();break}if(e+=KC(),ke.size>0&&(e>=WC||t>=qC)&&Nb()-r>HC){o=!0,setTimeout(()=>jb(t,e),0);break}}}finally{o||(Qu=!1)}}function GC(){for(let t=0;t<gc.length;t++)rd(gc[t]);gc.length=0}function Bb(t){mc++;try{for(let e of t)e._notify()}finally{if(mc--,mc===0&&Ju.length>0){let e=Ju.splice(0);for(let r=0;r<e.length;r++)rd(e[r])}}}function YC(t){Bb(t)}function td(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var fd={};P(fd,{RESERVED_STORE_METHODS:()=>ys,STORE_METHOD_NAMES:()=>ld,__resetStateShadowWarnings:()=>XC,createScopeStore:()=>tE,createStore:()=>yc,getSignals:()=>QC,isStore:()=>ZC,warnStateKeyShadowsMethod:()=>cd});var Me=Symbol("store"),bc=Symbol("signals"),ld=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],ys=new Set(ld),ad=new Set,nd=(t,e)=>t?t+"."+e:String(e);function cd(t,e){let r=(e||"")+"::"+t;if(ad.has(r))return;ad.add(r);let o=e?`state.${e}`:"state",n=`[smbls/state] "${t}" is a reserved store-method name and was written as DATA at ${o}.${t}. The value is preserved and readable \u2014 data wins over the method \u2014 but "${o}.${t}(\u2026)" no longer reaches the store method on this node. Use "${o}.$${t}(\u2026)" for the method, or rename the data key. Reserved: ${ld.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(n)}function XC(){ad.clear()}var sd=t=>!t||typeof t!="object"||Array.isArray(t)||t[Me]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!_c(t),JC=12,_c=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function xc(t,e,r){if(t===e)return!0;if(r>JC)return!1;if(Array.isArray(t)||Array.isArray(e)){if(!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!xc(t[o],e[o],r+1))return!1;return!0}if(_c(t)&&_c(e)){let o=Object.keys(t),n=Object.keys(e);if(o.length!==n.length)return!1;for(let s of o)if(!Object.prototype.hasOwnProperty.call(e,s)||!xc(t[s],e[s],r+1))return!1;return!0}return!1}function yc(t,e,r,o){r===void 0&&(r=0),o===void 0&&(o="");let n={},s={},i=e&&e.maxDepth||8;if(t&&typeof t=="object")for(let _ in t){if(_==="__proto__"||!Object.prototype.hasOwnProperty.call(t,_))continue;if(_.startsWith("__")){s[_]=t[_];continue}ys.has(_)&&cd(_,o);let y=t[_];r<i&&y&&typeof y=="object"&&!sd(y)?(s[_]=y,n[_]=Le(yc(y,e,r+1,nd(o,_)))):(s[_]=y,n[_]=Le(y))}let a=new Proxy(s,{get(_,y){if(y===Me)return!0;if(y===bc)return n;if(y==="__raw")return _;if(y==="$update")return c;if(y==="$parse")return f;if(y==="$clean")return u;if(y==="$keys")return d;if(y==="$values")return h;if(y==="$replace")return g;if(y==="$add")return p;if(y==="$remove")return m;if(y==="$destroy")return b;if(y==="$quietUpdate")return l;if(ys.has(y)&&!Object.prototype.hasOwnProperty.call(n,y))switch(y){case"update":return c;case"parse":return f;case"clean":return u;case"keys":return d;case"values":return h;case"replace":return g;case"add":return p;case"remove":return m;case"destroy":return b;case"quietUpdate":return l}if(y==="__element")return _.__element;if(y==="parent")return _.parent;if(y==="root")return _.root;if(Object.prototype.hasOwnProperty.call(n,y)){let k=n[y].get();if(k!==void 0||!(y!=="root"&&_.root&&_.root!==a))return k}if(_[y]!==void 0)return _[y];let x=typeof y=="string"&&!y.startsWith("__")&&y!=="then"&&y!=="constructor"&&ed()!=null;if(y!=="root"&&_.root&&_.root!==a){let k=_.root[y];return k===void 0&&x&&!Object.prototype.hasOwnProperty.call(n,y)?(n[y]=Le(void 0),n[y].get()):k}if(x)return n[y]=Le(void 0),n[y].get()},set(_,y,x){if(y==="__proto__")return!1;if(y==="__element"||y==="parent"||y==="root"||typeof y=="string"&&y.startsWith("__")&&!Object.prototype.hasOwnProperty.call(n,y))return _[y]=x,!0;ys.has(y)&&cd(y,o);let k=nd(o,y);if(Object.prototype.hasOwnProperty.call(n,y))if(x&&typeof x=="object"&&!sd(x)){if(x===_[y])return!0;let E=n[y].peek(),O=E&&E[Me]?E.$parse():E;if(xc(x,O,0))return!0;_[y]=x,gs(k),n[y].set(yc(x,e,r+1,k))}else{if(Array.isArray(x)&&x!==_[y]&&Array.isArray(n[y].peek())&&xc(x,n[y].peek(),0))return!0;n[y].peek()!==x&&gs(k),_[y]=x,n[y].set(x)}else _[y]=x,x&&typeof x=="object"&&!sd(x)?n[y]=Le(yc(x,e,r+1,k)):n[y]=Le(x);return!0},has(_,y){return typeof y=="string"&&y.charCodeAt(0)===36&&ys.has(y.slice(1))?!0:y in n||y in _},ownKeys(_){return Object.keys(n)},getOwnPropertyDescriptor(_,y){return y in n?{enumerable:!0,configurable:!0,value:n[y].peek()}:Object.getOwnPropertyDescriptor(_,y)},deleteProperty(_,y){return n[y]&&(n[y].peek()!==void 0&&gs(nd(o,y)),n[y].set(void 0),delete n[y]),delete _[y],!0}});function c(_,y){ms(()=>{for(let k in _)k!=="__proto__"&&(a[k]=_[k])});let x=s.__element;return x&&x.onUpdate&&!y?.quiet&&x.onUpdate(x,a,x.context),a}function l(_){return c(_,{quiet:!0})}function f(_){if(_||(_=new Set),_.has(a))return"[Circular]";_.add(a);let y={};for(let x in n){if(x==="parent"||x==="root"||x.startsWith("__"))continue;let k=n[x].peek();k&&k[Me]?y[x]=k.$parse(_):y[x]=k}return y}function u(){return ms(()=>{for(let _ in n)delete a[_]}),a}function d(){return Object.keys(n)}function h(){return Object.keys(n).map(_=>n[_].peek())}function g(_){return ms(()=>{for(let y in n)y in _||delete a[y];for(let y in _)y!=="__proto__"&&(a[y]=_[y])}),a}function p(_,y){let x=Object.prototype.hasOwnProperty.call(n,_)?n[_].peek():s[_];if(Array.isArray(x))return a[_]=[...x,y],a;if(x&&typeof x=="object"&&!Array.isArray(x)){if(_c(y))x[Me]?x.$update(y):a[_]={...x,...y};else{let k=String(Object.keys(x).length);x[Me]?x.$update({[k]:y}):a[_]={...x,[k]:y}}return a}return a[_]=y,a}function m(_){return delete a[_],a}function b(){u(),s.__element=null,s.parent=null}return a}function ZC(t){return t&&t[Me]===!0}function QC(t){return t[bc]}function tE(t,e){let r={},o={};if(t&&typeof t=="object")for(let i in t)o[i]=t[i],r[i]=Le(t[i]);let n=i=>{if(Object.prototype.hasOwnProperty.call(r,i))return r;let a=e;for(;a;){let c=a[bc];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[Me]?a[id]:null}return null};return new Proxy(o,{get(i,a){return a===Me?!0:a===bc?r:a===id?e:a==="__raw"?i:Object.prototype.hasOwnProperty.call(r,a)?r[a].get():e&&a!=="then"&&a!=="constructor"?e[a]:i[a]},set(i,a,c){let l=n(a);return l?(l===r&&(i[a]=c),l[a].set(c),!0):(i[a]=c,r[a]=Le(c),!0)},has(i,a){if(a in r||a in i)return!0;let c=e;for(;c;){if(a in c)return!0;c=c[Me]?c[id]:null}return!1},ownKeys(){return Object.keys(r)},getOwnPropertyDescriptor(i,a){return a in r?{enumerable:!0,configurable:!0,value:r[a].peek()}:Object.getOwnPropertyDescriptor(i,a)}})}var id=Symbol("scope.parent");var Zr="3.14.781";var Fo="__SMBLS_SIGNAL_INSTANCES__",No=(t,e,r)=>{let o=e||(typeof globalThis<"u"?globalThis:null);if(!o)return null;let n=o[Fo]||(o[Fo]={versions:[],engines:0,reported:!1});return typeof n.engines!="number"&&(n.engines=n.versions.length),n.versions.push(t||Zr),r||n.engines++,n.engines>1&&!n.reported&&(n.reported=!0,console.error("[smbls] duplicate @symbo.ls/signal instance \u2014",n.engines,"copies of the reactive engine are loaded on this page:",n.versions.join(", ")+".","Each copy keeps its own observer and effect queue, so an effect created","by one copy never re-fires from another copy's store writes, and one","copy's cascade breaker cannot see the other's queue.","Copies of the SAME version adopt a single engine automatically, so","this means the versions above DIFFER: a fossil copy is resolving beside","the current one. That is a dependency-graph fault, not an application","bug \u2014 align the version wherever @symbo.ls/signal is imported, then","regenerate the lockfile so exactly one version resolves.")),n},ud=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[Fo]};var jo="__SMBLS_SIGNAL_ENGINE__",Ub=(t,e,r)=>{let o=e||Zr,n=r||(typeof globalThis<"u"?globalThis:null);if(!n)return t;let s=n[jo];return s&&s.engine&&s.version===o?(No(o,n,!0),s.engine):(s||(n[jo]={version:o,engine:t}),No(o,n,!1),t)},dd=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[jo]};var Mt=Ub({...od,...fd,VERSION:Zr},Zr),bs=Mt.createSignal,Vb=Mt.createComputed,Z=Mt.createEffect,wc=Mt.batch,Sc=Mt.getObserver,zb=Mt.setObserver,Xe=Mt.createStore,kc=Mt.createScopeStore,yt=Mt.isStore,Hb=Mt.getSignals,Wb=Mt.STORE_METHOD_NAMES,qb=Mt.RESERVED_STORE_METHODS,vc=Mt.warnStateKeyShadowsMethod,Kb=Mt.__resetStateShadowWarnings,Gb=Mt.VERSION;var jg={};P(jg,{assertEmitIntegrity:()=>Mg,css:()=>_e,getActiveDocument:()=>uf,getCacheSize:()=>Ng,getEmitStats:()=>df,injectGlobal:()=>kt,keyframes:()=>An,reset:()=>Bx,resetEmitStats:()=>Lg,setActiveDocument:()=>$g,setWasmEngine:()=>xa,wrapHoverRule:()=>Oe});var Pg={};P(Pg,{CONFIG:()=>mo,CONFIG_MERGE_EXL:()=>ee,CSS_NAMED_COLOR_HEX:()=>Cl,CSS_NATIVE_COLOR_REGEX:()=>te,CSS_UNITS:()=>Uo,FACTORY:()=>he,STANDARD_SCHEME_QUERIES:()=>Gl,VALUE_TRANSFORMERS:()=>nf,activateConfig:()=>px,animation:()=>fg,appendSVGSprite:()=>ga,appendSvgIconsSprite:()=>xo,applyDocument:()=>ha,applyHeadings:()=>Zl,applyMediaSequenceVars:()=>Or,applyReset:()=>ma,applySequenceGlobalVars:()=>Zi,applySequenceVars:()=>ir,applySpacingSequence:()=>ea,applyTimingSequence:()=>pa,applyTypographySequence:()=>fa,breakpoints:()=>cg,changeGlobalTheme:()=>sf,changeLightness:()=>Wh,checkIfBoxSize:()=>ta,class:()=>gg,color:()=>eg,colorStringToRgbaArray:()=>de,compositeOverBackdrop:()=>po,contrastRatio:()=>pn,convertSvgToSymbol:()=>Qi,createConfig:()=>Wi,cssMediaVars:()=>zl,cssVars:()=>Vl,defineResolvedThemeSignal:()=>bn,defineThemeSignal:()=>yn,devices:()=>lg,document:()=>lx,findHeadingLetter:()=>Kl,findHeadings:()=>Ji,font:()=>Yh,fontFace:()=>Zh,fontFamily:()=>Xh,fontFamilyTypes:()=>Jh,generateSequence:()=>Yt,generateSequencePosition:()=>xg,generateSprite:()=>_n,generateSubSequence:()=>Yi,getActiveConfig:()=>C,getColor:()=>et,getColorShade:()=>Rl,getDefaultOrFirstKey:()=>ho,getFnPrefixAndValue:()=>sr,getFontFace:()=>Kh,getFontFaceEach:()=>go,getFontFaceEachString:()=>Nl,getFontFaceString:()=>Ui,getFontFamily:()=>la,getFontFormat:()=>Ml,getFontSizeByKey:()=>ua,getMediaColor:()=>It,getMediaTheme:()=>me,getResolvedThemeSignal:()=>dx,getRgbTone:()=>ze,getSafeInk:()=>Yl,getSafeInkInfo:()=>kg,getSequenceValue:()=>Xi,getSequenceValueBySymbols:()=>ql,getSequenceValuePropertyPair:()=>We,getShadow:()=>oa,getShapeByKey:()=>da,getSpacingBasedOnRatio:()=>Te,getSpacingByKey:()=>St,getSubratio:()=>Gi,getSubratioDifference:()=>Ki,getTheme:()=>sa,getThemeSignal:()=>ux,getTimingByKey:()=>oe,getTimingFunction:()=>ye,gradient:()=>rg,grid:()=>hg,hexToRgb:()=>Uh,hexToRgbArray:()=>El,hexToRgba:()=>zh,hslToRgb:()=>Ol,icons:()=>sg,isCSSVar:()=>mt,isDomDocument:()=>Je,isGoogleFontsUrl:()=>hn,isHostObject:()=>Ze,isRawUnitValue:()=>_s,isResolvedColor:()=>Ae,isScalingUnit:()=>Qr,isWritableFamilyBucket:()=>hd,linearChannelToSrgb:()=>Dl,media:()=>Qh,mixTwoColors:()=>Bh,mixTwoRgb:()=>Hh,mixTwoRgba:()=>Pl,numToLetterMap:()=>He,oklabToLinearSrgb:()=>$l,oklabToOklch:()=>Ni,oklchToGamutSafeSrgb:()=>ji,oklchToOklab:()=>Ll,opacify:()=>dn,parkHostObject:()=>br,parseColorToken:()=>Nt,popConfig:()=>tt,pushConfig:()=>it,relativeLuminance:()=>uo,reset:()=>fx,resolveBorderValue:()=>re,resolveColorRgb:()=>yo,resolveColorsInGradient:()=>ba,resolveConfigDocument:()=>Bo,resolveFileUrl:()=>pe,resolveShadowValue:()=>bo,returnSubThemeOrDefault:()=>qh,rgbArrayToHex:()=>Al,rgbToHSL:()=>Tl,rgbToHex:()=>Vh,runThroughMedia:()=>Jl,scratchDefaultConfig:()=>mn,scratchSystem:()=>kn,scratchUtils:()=>Rr,semanticIcons:()=>ig,sequence:()=>nr,set:()=>wo,setActiveConfig:()=>Hl,setAdaptiveSchemeVar:()=>Ir,setColor:()=>Pr,setCustomFont:()=>Bi,setCustomFontMedia:()=>Tr,setEach:()=>Rg,setFont:()=>ca,setFontFamily:()=>wn,setFontImport:()=>gn,setGradient:()=>xn,setInCustomFontMedia:()=>Fl,setMediaTheme:()=>aa,setSVG:()=>Sn,setScalingVar:()=>qi,setShadow:()=>Dr,setSubScalingVar:()=>Wl,setSvgIcon:()=>_o,setTheme:()=>ia,setValue:()=>Og,setVariables:()=>wg,shadow:()=>ng,shape:()=>bg,sizes:()=>yg,spacing:()=>tg,splitSpacedValue:()=>ra,splitTopLevelCommas:()=>or,splitTransition:()=>of,srgbChannelToLinear:()=>Il,srgbToOklab:()=>Fi,svg:()=>ug,svgData:()=>dg,templates:()=>pg,theme:()=>og,timing:()=>ag,toCamel:()=>Hi,toLinearChannel:()=>un,transformBackgroundImage:()=>ef,transformBorder:()=>qe,transformBorderRadius:()=>ar,transformBoxShadow:()=>ya,transformDuration:()=>_a,transformShadow:()=>tf,transformSize:()=>_t,transformSizeRatio:()=>N,transformTextStroke:()=>Ql,transformTransition:()=>Tg,transfromGap:()=>rf,typography:()=>Vi,unit:()=>Gh,vars:()=>mg});var Rr={};P(Rr,{CSS_NAMED_COLOR_HEX:()=>Cl,CSS_NATIVE_COLOR_REGEX:()=>te,CSS_UNITS:()=>Uo,applyMediaSequenceVars:()=>Or,applySequenceGlobalVars:()=>Zi,applySequenceVars:()=>ir,changeLightness:()=>Wh,colorStringToRgbaArray:()=>de,compositeOverBackdrop:()=>po,contrastRatio:()=>pn,convertSvgToSymbol:()=>Qi,findHeadingLetter:()=>Kl,findHeadings:()=>Ji,generateSequence:()=>Yt,generateSequencePosition:()=>xg,generateSprite:()=>_n,generateSubSequence:()=>Yi,getColorShade:()=>Rl,getDefaultOrFirstKey:()=>ho,getFnPrefixAndValue:()=>sr,getFontFace:()=>Kh,getFontFaceEach:()=>go,getFontFaceEachString:()=>Nl,getFontFaceString:()=>Ui,getFontFormat:()=>Ml,getRgbTone:()=>ze,getSequenceValue:()=>Xi,getSequenceValueBySymbols:()=>ql,getSequenceValuePropertyPair:()=>We,getSubratio:()=>Gi,getSubratioDifference:()=>Ki,hexToRgb:()=>Uh,hexToRgbArray:()=>El,hexToRgba:()=>zh,hslToRgb:()=>Ol,isCSSVar:()=>mt,isDomDocument:()=>Je,isGoogleFontsUrl:()=>hn,isHostObject:()=>Ze,isRawUnitValue:()=>_s,isResolvedColor:()=>Ae,isScalingUnit:()=>Qr,isWritableFamilyBucket:()=>hd,linearChannelToSrgb:()=>Dl,mixTwoColors:()=>Bh,mixTwoRgb:()=>Hh,mixTwoRgba:()=>Pl,numToLetterMap:()=>He,oklabToLinearSrgb:()=>$l,oklabToOklch:()=>Ni,oklchToGamutSafeSrgb:()=>ji,oklchToOklab:()=>Ll,opacify:()=>dn,parkHostObject:()=>br,parseColorToken:()=>Nt,relativeLuminance:()=>uo,resolveConfigDocument:()=>Bo,resolveFileUrl:()=>pe,returnSubThemeOrDefault:()=>qh,rgbArrayToHex:()=>Al,rgbToHSL:()=>Tl,rgbToHex:()=>Vh,setCustomFont:()=>Bi,setCustomFontMedia:()=>Tr,setFontImport:()=>gn,setInCustomFontMedia:()=>Fl,setScalingVar:()=>qi,setSubScalingVar:()=>Wl,setVariables:()=>wg,splitTopLevelCommas:()=>or,srgbChannelToLinear:()=>Il,srgbToOklab:()=>Fi,toLinearChannel:()=>un});var Je=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0),Ze=t=>{if(t===null||typeof t!="object")return!1;let e=Object.prototype.toString.call(t);return!!(e!=="[object Object]"&&e!=="[object Array]"||typeof t.nodeType=="number"||t.defaultView||t.window===t||t.self===t)},hd=t=>t!==null&&typeof t=="object"&&!Ze(t),br=(t,e,r)=>{if(!t)return;if(Je(r)){t.__domDocument||(t.__domDocument=r);return}let o=`__host_${e}`;t[o]||(t[o]=r)},Bo=t=>t?Je(t.__domDocument)?t.__domDocument:Je(t.document)?t.document:null:null;var Qr=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",Uo=["px","cm","mm","in","pt","pc","em","rem","ex","cap","ch","ic","lh","rlh","%","vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax","deg","rad","grad","turn","s","ms","dpi","dpcm","dppx","fr","auto"],eE=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),rE=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${Uo.filter(t=>t!=="auto").map(eE).join("|")})$`),_s=t=>rE.test(String(t).trim());R();var Cl={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},de=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=Cl[t.toLowerCase()];if(e&&(t=e),t[0]==="#")return t.length<7&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(t.length>4?t[4]+t[4]:"")),[parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16),parseInt(t.substr(5,2),16),t.length>7?parseInt(t.substr(7,2),16)/255:1];if(t.indexOf("rgb")===-1&&Q&&v){let r=Q.body.appendChild(Q.createElement("fictum")),o="rgb(1, 2, 3)";if(r.style.color=o,r.style.color!==o){Q.body.removeChild(r);return}if(r.style.color=t,r.style.color===o||r.style.color==="")return Q.body.removeChild(r),[0,0,0,0];t=v.getComputedStyle(r).color,Q.body.removeChild(r)}return t.indexOf("rgb")===0?(t.indexOf("rgba")===-1&&(t=`${t}, 1`),t.match(/[\.\d]+/g).map(r=>+r)):[0,0,0,0]},Bh=(t,e,r=.5)=>(t=de(t),e=de(e),Pl(t,e,r)),Uh=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${r},${o},${n})`},El=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[r,o,n]},Vh=(t,e,r)=>"#"+(1<<24|t<<16|e<<8|r).toString(16).slice(1),Al=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1),zh=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${r},${o},${n},${e})`},Hh=(t,e,r=.5)=>{let o=[];for(let n=0;n<3;n++)o[n]=~~(t[n]+(e[n]-t[n])*r);return`rgb(${o})`},Wh=(t,e)=>{let[r,o,n]=e,s=Math.max(0,Math.min(100,n+parseFloat(t)));return[r,o,s]},Tl=(t,e,r)=>{let o=Math.max(t,e,r),n=o-Math.min(t,e,r),s=1-Math.abs(o+o-n-1),i=n&&(o==t?(e-r)/n:o==e?2+(r-t)/n:4+(t-e)/n);return[60*(i<0?i+6:i),s?n/s:0,(o+o-n)/2]},Ol=(t,e,r,o=e*Math.min(r,1-r),n=(s,i=(s+t/30)%12)=>r-o*Math.max(Math.min(i-3,9-i,1),-1))=>[n(0),n(8),n(4)],Rl=(t,e)=>{let r=parseInt(t,16),o=(r>>16)+e;o>255?o=255:o<0&&(o=0);let n=(r>>8&255)+e;n>255?n=255:n<0&&(n=0);let s=(r&255)+e;return s>255?s=255:s<0&&(s=0),((s|n<<8|o<<16)+16777216).toString(16).slice(1)},Pl=(t,e,r=.5)=>{let o=[];for(let n=0;n<4;n++){let s=n===3?i=>i:Math.round;o[n]=s(t[n]+(e[n]-t[n])*r)}return`rgba(${o})`},dn=(t,e)=>{let r=de(t);if(!r){so()&&console.warn(t+" color is not rgba");return}return r[3]=e,`rgba(${r})`},mt=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,te=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,aA=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,Nt=t=>{if(!w(t))return null;if(te.test(t))return{passthrough:t};if(mt(t))return{cssVar:t};let e=t.match(aA);if(!e)return null;let[,r,o,n]=e,s=o!==void 0?`0.${o}`:void 0,i=n&&n[0]==="="?n.slice(1):n;return{name:r,alpha:s,tone:i}},Ae=t=>w(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),or=t=>{let e=[],r="",o=0;for(let n of t){if(n==="("?o+=1:n===")"&&o>0&&(o-=1),n===","&&o===0){e.push(r),r="";continue}r+=n}return(r.length||!e.length)&&e.push(r),e},un=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),uo=t=>.2126*un(t[0])+.7152*un(t[1])+.0722*un(t[2]),pn=(t,e)=>{let r=uo(t)+.05,o=uo(e)+.05;return r>o?r/o:o/r},Il=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),Dl=t=>(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*255,Fi=([t,e,r])=>{let[o,n,s]=[t,e,r].map(Il),i=.4122214708*o+.5363325363*n+.0514459929*s,a=.2119034982*o+.6806995451*n+.1073969566*s,c=.0883024619*o+.2817188376*n+.6299787005*s,l=Math.cbrt(i),f=Math.cbrt(a),u=Math.cbrt(c);return[.2104542553*l+.793617785*f-.0040720468*u,1.9779984951*l-2.428592205*f+.4505937099*u,.0259040371*l+.7827717662*f-.808675766*u]},$l=([t,e,r])=>{let o=t+.3963377774*e+.2158037573*r,n=t-.1055613458*e-.0638541728*r,s=t-.0894841775*e-1.291485548*r,i=o**3,a=n**3,c=s**3;return[4.0767416621*i-3.3077115913*a+.2309699292*c,-1.2684380046*i+2.6097574011*a-.3413193965*c,-.0041960863*i-.7034186147*a+1.707614701*c]},Ni=([t,e,r])=>{let o=Math.atan2(r,e)*180/Math.PI;return o<0&&(o+=360),[t,Math.sqrt(e*e+r*r),o]},Ll=([t,e,r])=>{let o=r*Math.PI/180;return[t,e*Math.cos(o),e*Math.sin(o)]},ji=(t,e,r,o=24)=>{let n=a=>$l(Ll([t,a,r])),s=a=>a.every(c=>c>=-1e-4&&c<=1.0001),i=n(e);if(!s(i)){let a=0,c=e;for(let l=0;l<o;l++){let f=(a+c)/2;s(n(f))?a=f:c=f}i=n(a)}return i.map(a=>Dl(Math.max(0,Math.min(1,a))))},po=(t,e=1,r=[255,255,255])=>e>=1?t:t.map((o,n)=>o*e+r[n]*(1-e)),ze=(t,e)=>{w(t)&&t.includes("rgb")&&(t=de(t).join(", ")),w(t)&&(t=t.split(",").map(n=>parseFloat(n.trim()))),Fe(e)&&(e+="");let r=Al(t),o=e.slice(0,1);if(o==="-"||o==="+"){let n=Rl(r,parseFloat(e));return El(n).join(", ")}else{let[n,s,i]=t,[a,c]=Tl(n/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return Ol(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var qh=(t,e)=>{if(t)return t.themes&&t.themes[e]?t.themes[e]:t[e]?[t,t[e]]:t};var pe=(t,e)=>{if(!t||!e)return null;try{return new URL(t),null}catch{}let r=e[t];return r?r.content&&r.content.src:null},ho=(t,e)=>{if(t[e])return t[e].value;let r=()=>Object.keys(t).find(n=>n!=="default"&&t[n]&&t[n].value&&!t[n].isSystemFallback);if(t.default){let n=t[t.default];if(n&&n.isSystemFallback){let s=r();if(s)return t[s].value}if(n)return n.value}let o=r()||Object.keys(t).find(n=>n!=="default"&&t[n]&&t[n].value);return o&&t[o]&&t[o].value},Ml=t=>{if(typeof t!="string"||!t)return null;let e=t.split(/[#?]/)[0].split(".").pop().trim();return["woff2","woff","ttf","otf","eot"].includes(e)?e:null},hn=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),gn=t=>`@import url('${t}');`,Fl=t=>`@font-face { ${t} }`,Bi=(t,e,r,o={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=Ml(a),l=c?` format('${c}')`:"";return`url('${a}')${l}`}).join(`,
31
+ }`;return`${a}${l}${c}`}});var wh,Y_=F(()=>{"use strict";wh=t=>{if(!t)return"";let e=new Date(t),r=new Intl.DateTimeFormat("en",{year:"numeric"}).format(e),o=new Intl.DateTimeFormat("en",{month:"short"}).format(e);return`${new Intl.DateTimeFormat("en",{day:"2-digit"}).format(e)} ${o}, ${r}`}});var Sh,X_=F(()=>{"use strict";Sh=(t,e)=>{let r=setTimeout(()=>{let{props:o}=t;if(!e.clientHeight){let{node:{clientHeight:n}}=t;n&&(e.clientHeight=n)}if(e.active){if(o.height==="auto")return;t.update({height:e.clientHeight},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});let n=setTimeout(()=>{t.update({height:"auto"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0}),clearTimeout(n)},450)}else t.update({height:"0"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});clearTimeout(r)})}});var kh,J_=F(()=>{"use strict";kh=function(e){let r=[0,1];for(let o=2;o<=e;o++)r[o]=r[o-1]+r[o-2];return r[e]}});var vh,Z_=F(()=>{"use strict";vh=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function cn(t,e={}){let{window:r=globalThis}=e,{document:o=r.document}=e;return new Promise((n,s)=>{let i=o.querySelector(`script[src="${t}"]`);if(i)return n(i);let a=o.createElement("script");a.src=t,a.async=e.async===!0,a.type=e.type||"text/javascript",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,n(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load script: ${t}`))},o.head.appendChild(a)})}async function Rh(t,e={}){let{window:r=globalThis}=e,{document:o=r.document}=e;return new Promise((n,s)=>{let i=o.querySelector(`link[href="${t}"]`);if(i)return n(i);let a=o.createElement("link");a.href=t,a.rel=e.rel||"stylesheet",a.type="text/css",a.media=e.media||"all",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,n(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load stylesheet: ${t}`))},o.head.appendChild(a)})}var Ch,Eh,Ah,Th,Oh,Q_=F(()=>{"use strict";Ch=(t,e=!1,r=document,o="text/javascript")=>new Promise((n,s)=>{try{let i=r.createElement("script");i.type=o,i.async=e,i.src=t,i.addEventListener("load",a=>{n({status:!0})}),i.addEventListener("error",a=>{s(new Error({status:!1,message:`Failed to load the script ${t}`}))}),r.body.appendChild(i)}catch(i){s(i)}}),Eh=(t,e=document,r="text/javascript")=>new Promise((o,n)=>{let s=e.createElement("script");s.type=r,s.src=t;let i=e.createElement("div");i.style.cssText="position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(255,255,255,0.8);z-index:9999;",e.body.appendChild(i),s.onload=()=>{console.log(`Successfully loaded: ${t}`),e.body.removeChild(i),o()},s.onerror=()=>{e.body.removeChild(i),n(new Error(`Failed to load: ${t}`))},e.body.appendChild(s)}),Ah=(t,e=document,r,o="text/javascript")=>{let n=new window.XMLHttpRequest;if(n.open("GET",t,!1),n.send(),n.status===200){let s=e.createElement("script");s.type=o,s.text=n.responseText,e.body.appendChild(s),typeof r=="function"&&r()}else throw new Error(`Failed to load the script ${t}`)},Th=(t,e=!1,r=document,o="text/javascript")=>new Promise((n,s)=>{try{let i=r.createElement("link");i.rel="stylesheet",i.href=t,i.addEventListener("load",a=>{n({status:!0})}),r.head.appendChild(i)}catch(i){s(i)}}),Oh=(t,e=!1,r=document,o="text/javascript",n="smbls-script")=>{try{let s=r.createElement("script");s.type=o,s.async=e,s.id=n,s.innerHTML=t,r.body.appendChild(s)}catch(s){console.warn(s)}}});function tA(t,e){if(!e||typeof e!="object")return t;let r=n=>{if(!QE(n))return n;let s=e[n];return s?.src?s.src:n},o={...t};for(let[n,s]of Object.entries(o))typeof s=="string"?o[n]=r(s):Array.isArray(s)&&(o[n]=s.map(i=>typeof i=="string"?r(i):i));return o}function wl(t,e){if(!t||!e)return;let r=e.split("."),o=t;for(let n of r){if(o==null||typeof o!="object")return;o=o[n]}return o}function eA(t,e,r){let n=(e.config||e.settings||{}).polyglot||e.polyglot,s=r?.lang||n?.defaultLang||"en",a=(n?.translations||{})[s]||{},c=r?.state||{},l={...t};for(let[f,u]of Object.entries(l))typeof u!="string"||!u.includes("{{")||(l[f]=u.replace(/\{\{\s*([^|{}]+?)\s*(?:\|\s*(\w+)\s*)?\}\}/g,(d,h,g)=>{let p=h.trim();if(g==="polyglot")return a[p]??wl(a,p)??d;if(g==="getLocalStateLang")return wl(c,p+s)??d;let m=wl(c,p);return m!==void 0?m:a[p]??wl(a,p)??d}));return l}function tx(t){let e={...t};for(let[r,o]of Object.entries(e))if(typeof o=="function"){let n=o.toString(),s=n.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | getLocalStateLang }}`;continue}let i=n.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(i){e[r]=`{{ ${i[1]} | polyglot }}`;continue}let a=n.match(/s\.(\w+(?:\.\w+)+)/);if(a){e[r]=`{{ ${a[1]} }}`;continue}delete e[r]}else if(typeof o=="string"){let n=o.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(n){e[r]=`{{ ${n[1]} | getLocalStateLang }}`;continue}let s=o.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | polyglot }}`;continue}if(o.includes("=>")&&o.includes("s.")){let i=o.match(/s\.(\w+(?:\.\w+)+)/);if(i){e[r]=`{{ ${i[1]} }}`;continue}}}return e}function Ih(t,e,r,{isProduction:o=!1,channel:n="production"}={}){let s=t.pages?.[e],i=S(s?.state)&&s?.state,a=s?.metadata||s?.helmet||i||{},c=tx(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=tx(f),d={};if(t.integrations?.seo?d={...t.integrations.seo,...u,...c}:Object.keys(u).length?d={...u,...c}:d={...c},!d.title){let p=t.name||t.key;p?o?d.title=p:n==="development"?d.title=`${p} / dev:symbo.ls`:n==="staging"?d.title=`${p} / staging:symbo.ls`:d.title=`${p} / symbo.ls`:d.title="Symbols demo"}d=eA(d,t,r),d.title&&(l.has("title")||!d["og:title"])&&(l.has("og:title")||(d["og:title"]=d.title)),d.description&&(l.has("description")||!d["og:description"])&&(l.has("og:description")||(d["og:description"]=d.description)),d.title&&!d["twitter:title"]&&(d["twitter:title"]=d.title),d.description&&!d["twitter:description"]&&(d["twitter:description"]=d.description);let h=r?.actualPathname||e;if(d["og:url"]||d.url){let p=(d["og:url"]||d.url||"").replace(/\/$/,"");if(p&&h&&h!=="/"){let m=h.startsWith("/")?h:"/"+h;d["og:url"]=p+m}}d=tA(d,t.files);let g=t.name||t.app?.metadata?.title||t.app?.name||"";for(let[p,m]of Object.entries(d))if(typeof m=="string"&&m.includes("{{")){let b=m.replace(/\{\{[^}]*\}\}/g,"").trim();b?d[p]=b:p==="title"?d[p]=g:delete d[p]}return d}var Rt,JE,ln,ZE,Sl,Ph,QE,ex=F(()=>{"use strict";Ot();Rt=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,r=>e[r])},JE=t=>Object.entries(t||{}).filter(([e,r])=>r!==void 0).map(([e,r])=>`${e}="${Rt(r)}"`).join(" "),ln=t=>{let e=5381,r=String(t);for(let o=0;o<r.length;o++)e=(e*33^r.charCodeAt(o))>>>0;return e.toString(36)},ZE=new Set(["jsonLd","styles","scripts"]),Sl=t=>{let e=[];if(Array.isArray(t.jsonLd))for(let r of t.jsonLd){if(r==null)continue;let o=typeof r=="string"?r:JSON.stringify(r),n=String(o).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${ln(o)}">${n}<\/script>`)}if(Array.isArray(t.styles))for(let r of t.styles){if(r==null||!String(r).trim())continue;let o=String(r).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${ln(o)}">${o}</style>`)}if(Array.isArray(t.scripts))for(let r of t.scripts){if(!r)continue;let o=typeof r=="string",n=o?r:r.src;if(!n&&!r.body)continue;let s=[];n&&s.push(`src="${Rt(n)}"`),o||(r.type&&s.push(`type="${Rt(r.type)}"`),r.async&&s.push("async"),r.defer&&s.push("defer"),r.integrity&&s.push(`integrity="${Rt(r.integrity)}"`),r.crossorigin&&s.push(`crossorigin="${Rt(r.crossorigin)}"`),r.referrerpolicy&&s.push(`referrerpolicy="${Rt(r.referrerpolicy)}"`),r.nomodule&&s.push("nomodule"));let i=` data-smbls-script="${Rt(n||ln(r.body||""))}"`;if(!o&&r.body){let a=String(r.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${s.join(" ")}${i}>${a}<\/script>`)}else e.push(`<script ${s.join(" ")}${i}><\/script>`)}return e},Ph=(t,e)=>{e||(t={...t,robots:"noindex"});let r=Object.entries(t).reduce((o,[n,s])=>{if(!s&&s!==0&&s!==!1||ZE.has(n))return o;if(n==="title")return o.push(`<title>${Rt(s)}</title>`),o;if(n==="canonical")return o.push(`<link rel="canonical" href="${Rt(s)}">`),o;if(n==="manifest")return o.push(`<link rel="manifest" href="${Rt(s)}">`),o;if(n==="favicon"||n==="favicons"||n==="icon"||n==="icons")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="string")o.push(`<link rel="icon" href="${Rt(f)}">`);else if(typeof f=="object"){let u=JE(f);/rel=/.test(u)?o.push(`<link ${u}>`):o.push(`<link rel="icon" ${u}>`)}}),o;if(n==="alternate")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).filter(([d,h])=>h!==void 0).map(([d,h])=>`${d}="${Rt(h)}"`).join(" ");o.push(`<link rel="alternate" ${u}>`)}}),o;let i=(l,f,u="name")=>{if(typeof f=="string"||typeof f=="number"||typeof f=="boolean")o.push(`<meta ${u}="${Rt(l)}" content="${Rt(f)}">`);else if(Array.isArray(f))f.forEach(d=>{if(typeof d=="string"||typeof d=="number"||typeof d=="boolean")o.push(`<meta ${u}="${Rt(l)}" content="${Rt(d)}">`);else if(typeof d=="object"){let h=Object.entries(d).filter(([g,p])=>p!==void 0).map(([g,p])=>`${g}="${Rt(p)}"`).join(" ");o.push(`<meta ${h}>`)}});else if(typeof f=="object"){let d=Object.entries(f).filter(([h,g])=>g!==void 0).map(([h,g])=>`${h}="${Rt(g)}"`).join(" ");o.push(`<meta ${d}>`)}};if(n.startsWith("http-equiv:")){let l=n.replace("http-equiv:","");return i(l,s,"http-equiv"),o}if(n.startsWith("itemprop:")){let l=n.replace("itemprop:","");return i(l,s,"itemprop"),o}let c=["og:","twitter:","fb:","article:","profile:","book:","business:","music:","product:","video:","DC:","DCTERMS:"].find(l=>n.startsWith(l));if(c){let l=n.replace(c,"");return i(`${c.replace(":","")}:${l}`,s,c==="twitter:"||c==="DC:"||c==="DCTERMS:"?"name":"property"),o}if(n.startsWith("apple:")||n.startsWith("msapplication:")){let l=n.startsWith("apple:")?"apple-":"msapplication-",f=n.replace(/^apple:|^msapplication:/,"");return i(`${l}${f}`,s,"name"),o}return i(n,s),o},['<meta charset="UTF-8">','<meta name="viewport" content="width=device-width, initial-scale=1">']);return r.push(...Sl(t)),r.join(`
32
+ `)},QE=t=>typeof t=="string"&&t.length>0&&!t.startsWith("/")&&!t.startsWith("http")});var kl,Dh,rx=F(()=>{"use strict";Ot();kl=(t,e)=>(T(e)?e:Object.values(e)).reduce((r,o)=>Math.abs(o-t)<Math.abs(r-t)?o:r),Dh=(t,e)=>(t=parseFloat(t),S(e)&&(e=Object.values(e)),kl(t,e))});function fn(t){let e=String(t||"").trim();if(!e)return{owner:ox,key:"",full:""};let r=null,o=e;if(e.includes("/")){let s=e.indexOf("/");r=e.slice(0,s),o=e.slice(s+1)}o=o.replace(/\.symbo\.ls$/iu,""),r||(r=ox);let n=o?`${r}/${o}`:"";return{owner:r,key:o,full:n}}async function vl(t,e={}){if((e.provider||"kv")==="api")return sx(t,e);let o=await lA(t,e);return o||sx(t,e)}async function lA(t,e={}){let r=e.kvBaseUrl||rA,o=e.env||"production",n=`${r}/kv/${encodeURIComponent(t)}?env=${o}`;try{let s=await fetch(n,{method:"GET"});return s.ok&&(await s.json())?.value||null}catch{return null}}async function sx(t,e={}){let r=e.apiBaseUrl||oA,{key:o}=fn(t);try{let n=`${r}/core/projects/libraries/available?search=${encodeURIComponent(o)}&limit=10`,s=await fetch(n,{method:"GET"});if(!s.ok)return null;let i=await s.json(),c=(i?.items||i?.data||(Array.isArray(i)?i:[])).find(h=>{let{key:g}=fn(h?.key);return g.toLowerCase()===o.toLowerCase()});if(!c?.id&&!c?._id)return null;let l=c.id||c._id,f=`${r}/core/projects/${encodeURIComponent(l)}/data?branch=main`,u=await fetch(f,{method:"GET"});if(!u.ok)return null;let d=await u.json();return d?.data||d||null}catch{return null}}async function ix(t,e={}){if(S(t))return t;if(w(t)){let{full:r}=fn(t);if(!r)return null;try{let o=await vl(r,e);return o||console.warn(`[smbls] Shared library "${r}" not found`),o}catch(o){return console.warn(`[smbls] Failed to fetch shared library "${r}":`,o.message),null}}return null}async function Lh(t,e={}){return!t||!t.length?[]:(await Promise.all(t.map(async o=>{if(Ii(o)){let n=await ix(aA(o),e);return n?{library:n,ignoreList:o.ignoreList}:null}return ix(o,e)}))).filter(Boolean)}var ox,rA,oA,Ri,ax,nA,sA,nx,iA,Pi,$h,Ii,aA,cA,Di,cx=F(()=>{"use strict";Ot();ox="system",rA="https://smbls-kv.nika-980.workers.dev",oA="https://api.symbols.app";Ri=(t,e,r,o)=>{for(let n in e){let s=o?`${o}/${n}`:n;r&&r.has(s)||(n in t?S(t[n])&&S(e[n])&&Ri(t[n],e[n],r,s):t[n]=e[n])}},ax=(t,e,r)=>{if(!S(t)||!e.size)return t;let o=`${r}/`,n=!1;for(let i of e)if(i.startsWith(o)){n=!0;break}if(!n)return t;let s={};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=`${r}/${i}`;e.has(a)||(s[i]=ax(t[i],e,a))}return s},nA=new Set,sA=new Set(["components","pages","functions","snippets","methods"]),nx=(t,e)=>e===""&&sA.has(t),iA=t=>t.replace(/\.js$/iu,""),Pi=t=>{let e=new Set;if(!Array.isArray(t))return e;for(let r of t){if(!w(r))continue;let o=r.split("/").map(n=>iA(n.trim())).filter(Boolean).join("/");o&&e.add(o)}return e},$h=(t,e={})=>({library:t,ignoreList:Array.isArray(e.ignoreList)?e.ignoreList:[]}),Ii=t=>S(t)&&Array.isArray(t.ignoreList)&&("library"in t||"key"in t||"name"in t),aA=t=>t.library!==void 0?t.library:t.key??t.name,cA=(t,e,r)=>{let o=Pi(e.sharedLibIgnore);e.sharePages===!1&&o.add("pages");let n=o.size?new Set([...r,...o]):r;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&!(s==="sharePages"||s==="sharedLibIgnore")&&!n.has(s))if(S(e[s])&&S(t[s]))if(s==="designSystem")Ri(t[s],e[s],n,s);else for(let i in e[s])n.has(`${s}/${i}`)||(i in t[s]?nx(s,t[s][i])&&!nx(s,e[s][i])&&(t[s][i]=e[s][i]):t[s][i]=e[s][i]);else s in t||(t[s]=ax(e[s],n,s))},Di=(t,e)=>{if(!(!e||!e.length))for(let r=0;r<e.length;r++){let o=e[r],n=nA;Ii(o)&&(n=Pi(o.ignoreList),o=o.library),S(o)&&cA(t,o,n)}}});var Mh,Fh,Nh,$i,jh,Li,Bh,fo,lx=F(()=>{"use strict";Ot();Mh=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},Fh=async t=>{try{let e=new Blob([t],{type:"text/javascript"}),r=new window.ClipboardItem({"text/plain":e});await navigator.clipboard.write([r]),console.log("JavaScript code copied to clipboard as text/javascript")}catch(e){console.error("Failed to copy JavaScript code: ",e)}},Nh=t=>t.replace(/[^a-zA-Z0-9_]/g,""),$i=t=>(typeof t!="string"&&(t=String(t||"")),t.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,r){return r===0?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")),jh=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),Li=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),Bh=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},fo=t=>{if(T(t))return t;if(w(t))return t.split(" ");if(S(t))return Object.values(t);if(Fe(t))return[t]}});var Uh,fx=F(()=>{"use strict";Uh=()=>{let t=document.styleSheets[0],e="";if(t)try{let r=t.cssRules||t.rules;for(let o=0;o<r.length;o++)e+=r[o].cssText}catch(r){console.error("Unable to access CSS rules. This may be due to CORS restrictions:",r)}else console.log("No stylesheets found in document.styleSheets[0].");return e}});var Gt,un,Mi,Fi,ux=F(()=>{"use strict";Gt=t=>{let e=t&&t.src;if(!e||typeof e!="string")return null;let r=t.context;if(!r)return null;let o=r.assets&&r.assets[e]||r.files&&r.files[e];return o?typeof o=="string"?{src:o,type:null,variants:null}:typeof o=="object"&&typeof o.src=="string"?o:null:null},un=(t,{keepOneX:e=!0}={})=>{if(!Array.isArray(t)||!t.length)return"";let r=t.some(n=>typeof n.width=="number"),o=[];for(let n of t)r&&typeof n.width=="number"?o.push(`${n.src} ${n.width}w`):r||(n.scale===1&&e?o.push(n.src):n.scale&&n.scale!==1&&o.push(`${n.src} ${n.scale}x`));return o.join(", ")},Mi=t=>{if(!t||!Array.isArray(t.variants))return"";let e=t.variants.filter(r=>r.format===t.type);return un(e,{keepOneX:!1})},Fi=(t,e)=>{if(!t||typeof t!="object"||typeof t.src!="string")return[];if(!Array.isArray(t.variants)||!t.variants.length)return[{tag:"img",attr:{src:t.src,alt:e||""}}];let r=new Map;for(let a of t.variants)r.has(a.format)||r.set(a.format,[]),r.get(a.format).push(a);let o=[];for(let[a,c]of r)a!==t.type&&o.push({tag:"source",attr:{type:a,srcset:un(c,{keepOneX:!0})}});let n=r.get(t.type)||[],s=un(n,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...o,{tag:"img",attr:i}]}});var Cl={};P(Cl,{CDN_PROVIDERS:()=>ue,DOMQL_EVENTS:()=>Ud,DOMQ_PROPERTIES:()=>_r,ENV:()=>op,HTML_TAGS:()=>Jo,METHODS:()=>qo,METHODS_EXL:()=>Is,NODE_ENV:()=>ve,OPTIONS:()=>oi,PACKAGE_MANAGER_TO_CDN:()=>Ar,PARSED_DOMQ_PROPERTIES:()=>Ps,PROPS_METHODS:()=>xr,STATE_METHODS:()=>ro,STATE_PROPERTIES:()=>Bd,SVG_TAGS:()=>u_,TYPES:()=>vs,UNIVERSAL_RESERVED_KEYS:()=>_l,addCaching:()=>el,addContext:()=>tl,addExtend:()=>Tp,addExtends:()=>Kt,addItemAfterEveryElement:()=>Ad,addProtoToArray:()=>As,addRef:()=>Jc,applyDependentState:()=>Kp,applyEvent:()=>al,applyEventUpdate:()=>cl,applyExtends:()=>h_,applyProps:()=>Xs,arrayContainsOtherArray:()=>xd,arraysEqual:()=>Od,arrayzeValue:()=>fo,buildImgSrcset:()=>Mi,buildSourcesAndImg:()=>Fi,cache:()=>Zp,call:()=>gh,captureSnapshot:()=>yh,checkForStateTypes:()=>Hp,checkIfInherits:()=>il,checkIfStringIsInArray:()=>Id,clone:()=>Hd,cloneAndMergeArrayExtend:()=>Vs,cloneFunction:()=>dp,concatAddExtends:()=>Cp,copyJavaScriptToClipboard:()=>Fh,copyStringToClipboard:()=>Mh,createBasedOnType:()=>Xc,createElement:()=>Vp,createElementExtends:()=>Nc,createExtends:()=>zs,createExtendsFromKeys:()=>Zo,createExtendsStack:()=>Vc,createIfConditionFlag:()=>pp,createInheritedState:()=>zp,createKey:()=>Bs,createNestedObject:()=>Xd,createNestedObjectByKeyPath:()=>qp,createObjectWithoutPrototype:()=>Pc,createParent:()=>Zc,createPath:()=>Qc,createProps:()=>Js,createPropsStack:()=>Gc,createRoot:()=>Up,createScope:()=>Yp,createSnapshotId:()=>js,customDecodeURIComponent:()=>jd,customEncodeURIComponent:()=>Nd,cutArrayAfterValue:()=>Cd,cutArrayBeforeValue:()=>vd,debounce:()=>Us,debounceOnContext:()=>lp,decodeNewlines:()=>Fd,deepClone:()=>ft,deepContains:()=>Gd,deepDefaults:()=>Ri,deepDestringifyFunctions:()=>le,deepExtend:()=>Fc,deepMerge:()=>st,deepMergeExtends:()=>je,deepStringifyFunctions:()=>$s,defineSetter:()=>ph,destringifyGlobalScope:()=>Ms,detectHeightOnInit:()=>Sh,detectInfiniteLoop:()=>tp,document:()=>Q,encodeNewlines:()=>Md,error:()=>co,excludeKeysFromObject:()=>rp,exec:()=>ut,extendCachedRegistry:()=>Ep,extendStackRegistry:()=>Ws,extractArrayExtend:()=>Ks,fetchLibraryData:()=>vl,fibonacciNumberByIndex:()=>kh,filterArrays:()=>Rd,filterArraysFast:()=>Pd,finalizeExtends:()=>Hc,findClosestNumber:()=>kl,findClosestNumberInFactory:()=>Dh,findInheritedState:()=>sl,findKeyPosition:()=>$d,flattenExtend:()=>Qo,formatDate:()=>wh,generateHash:()=>$c,generateHeadArrayTags:()=>Sl,generateKey:()=>Ns,generateMetaTags:()=>Ph,get:()=>fh,getCDNDirUrl:()=>xl,getCDNUrl:()=>Ee,getCapitalCaseKeys:()=>Pp,getCdnProviderFromConfig:()=>nn,getChildStateInKey:()=>nl,getChildren:()=>hi,getContext:()=>wi,getCookie:()=>bp,getDB:()=>Ei,getEmotionStylesheet:()=>Uh,getExtendsInElement:()=>Op,getExtendsStack:()=>Hs,getExtendsStackRegistry:()=>Mc,getFrequencyInArray:()=>wd,getHashedExtend:()=>qs,getImportMapScript:()=>xh,getInObjectByPath:()=>Qd,getLocalStorage:()=>xp,getNev:()=>ap,getPageMetadata:()=>Ih,getParentStateInKey:()=>ol,getPath:()=>gi,getQuery:()=>Ai,getRef:()=>dh,getRoot:()=>bi,getRootContext:()=>xi,getRootData:()=>_i,getRootState:()=>yi,getRootStateInKey:()=>rl,getSpreadChildren:()=>Ip,global:()=>yd,hasFunction:()=>Ne,hasHandlerPlugin:()=>Go,hasOwnProperty:()=>Wd,hashContent:()=>ln,inheritChildExtends:()=>Bc,inheritChildPropsExtends:()=>jc,inheritParentProps:()=>Zs,inheritRecursiveChildExtends:()=>Uc,initProps:()=>Np,is:()=>Wt,isArray:()=>T,isBoolean:()=>Ec,isContextComponent:()=>Dp,isCyclic:()=>ep,isDOMNode:()=>zt,isDate:()=>Tc,isDefined:()=>bt,isDevelopment:()=>Sr,isEmpty:()=>Oc,isEmptyObject:()=>qd,isEqualDeep:()=>Rc,isFunction:()=>A,isHtmlElement:()=>Ss,isLocal:()=>ip,isLoudDevRuntime:()=>Pt,isMalformedDependency:()=>sn,isMethod:()=>mh,isMobile:()=>mp,isNode:()=>Qe,isNot:()=>_d,isNotProduction:()=>so,isNull:()=>Ac,isNumber:()=>Fe,isObject:()=>S,isObjectLike:()=>H,isPhoto:()=>vh,isPolyglotWritableKey:()=>er,isProduction:()=>wr,isStaging:()=>sp,isState:()=>Wp,isString:()=>w,isStringFunction:()=>up,isTest:()=>Dc,isTesting:()=>np,isUndefined:()=>Tt,isUniversallyReservedKey:()=>bh,isUnresolvableDependency:()=>lo,isValidDependencyMap:()=>an,isValidHtmlTag:()=>Sp,isWrappedLibrary:()=>Ii,joinArrays:()=>Ho,jointStacks:()=>Ap,keys:()=>yl,loadCssFile:()=>Th,loadJavascript:()=>Oh,loadJavascriptFile:()=>Ch,loadJavascriptFileEmbedSync:()=>Ah,loadJavascriptFileSync:()=>Eh,loadRemoteCSS:()=>Rh,loadRemoteScript:()=>cn,log:()=>hh,logGroupIf:()=>gp,logIf:()=>hp,lookdown:()=>ch,lookdownAll:()=>lh,lookup:()=>ah,lowercaseFirstLetter:()=>eo,makeObjectWithoutPrototype:()=>Kd,map:()=>Vd,mapStringsWithContextComponents:()=>Gs,markPolyglotSeeded:()=>Ue,matchesComponentNaming:()=>Be,memoize:()=>fp,merge:()=>gt,mergeSharedLibraries:()=>Di,nextElement:()=>ki,normalizeIgnoreList:()=>Pi,normalizeLibraryKey:()=>fn,objectToString:()=>Ls,objectizeStringProperty:()=>Ys,overwrite:()=>Fs,overwriteDeep:()=>qt,overwriteShallow:()=>no,overwriteState:()=>Gp,parse:()=>bl,parseDeep:()=>di,pickupElementFromProps:()=>qc,pickupPropsFromElement:()=>Wc,polyglotSeededKeys:()=>ri,previousElement:()=>vi,propExists:()=>Mp,propertizeElement:()=>Kc,propertizeUpdate:()=>Lp,remove:()=>U_,removeChars:()=>Nh,removeCookie:()=>_p,removeDuplicateProps:()=>ti,removeDuplicatesInArray:()=>zo,removeFromArray:()=>Sd,removeFromObject:()=>Yd,removeNestedKeyByPath:()=>Jd,removeValueFromArray:()=>Es,removeValueFromArrayAll:()=>Ed,reorderArrayByValues:()=>Td,replaceLiteralsWithObjectFields:()=>to,replaceOctalEscapeSequences:()=>Ld,resolveAsset:()=>Gt,resolveHandler:()=>Yo,resolveSharedLibraries:()=>Lh,returnValueAsText:()=>Yc,runPluginHook:()=>At,self:()=>bd,setActiveRootState:()=>mi,setCookie:()=>yp,setHashedExtend:()=>Lc,setInObjectByPath:()=>Zd,setLocalStorage:()=>wp,setNodeStyles:()=>ml,setProps:()=>uh,setPropsPrototype:()=>Qs,sharedLibrary:()=>$h,splitPackageSpecifier:()=>Ti,spotByPath:()=>pi,srcsetFor:()=>un,stringIncludesAny:()=>Os,stringToObject:()=>zd,stripVersionRangePrefix:()=>Oi,swapItemsInArray:()=>kd,syncProps:()=>ei,toCamelCase:()=>$i,toDashCase:()=>Li,toDescriptionCase:()=>Bh,toTitleCase:()=>jh,toggleFullscreen:()=>_h,triggerEventOn:()=>kr,triggerEventOnUpdate:()=>Xp,trimStringFromSymbols:()=>Dd,unstackArrayOfObjects:()=>Cs,update:()=>Fp,updateProps:()=>jp,variables:()=>Ci,verbose:()=>en,warn:()=>Si,window:()=>v});var R=F(()=>{"use strict";Ic();cp();Ot();tr();Xo();Wo();ks();c_();l_();Rs();ws();f_();kp();Rp();Bp();zc();x_();S_();Ko();k_();z_();Qp();W_();Jp();q_();K_();G_();Y_();X_();J_();Z_();Q_();ex();rx();cx();lx();fx();ux()});var Kv=Zu((pV,qv)=>{var is=1e3,as=is*60,cs=as*60,$o=cs*24,rP=$o*7,oP=$o*365.25;qv.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return nP(t);if(r==="number"&&isFinite(t))return e.long?iP(t):sP(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function nP(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),o=(e[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return r*oP;case"weeks":case"week":case"w":return r*rP;case"days":case"day":case"d":return r*$o;case"hours":case"hour":case"hrs":case"hr":case"h":return r*cs;case"minutes":case"minute":case"mins":case"min":case"m":return r*as;case"seconds":case"second":case"secs":case"sec":case"s":return r*is;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function sP(t){var e=Math.abs(t);return e>=$o?Math.round(t/$o)+"d":e>=cs?Math.round(t/cs)+"h":e>=as?Math.round(t/as)+"m":e>=is?Math.round(t/is)+"s":t+"ms"}function iP(t){var e=Math.abs(t);return e>=$o?Su(t,e,$o,"day"):e>=cs?Su(t,e,cs,"hour"):e>=as?Su(t,e,as,"minute"):e>=is?Su(t,e,is,"second"):t+" ms"}function Su(t,e,r,o){var n=e>=r*1.5;return Math.round(t/r)+" "+o+(n?"s":"")}});var Yv=Zu((hV,Gv)=>{function aP(t){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=n,r.enabled=a,r.humanize=Kv(),r.destroy=l,Object.keys(t).forEach(f=>{r[f]=t[f]}),r.names=[],r.skips=[],r.formatters={};function e(f){let u=0;for(let d=0;d<f.length;d++)u=(u<<5)-u+f.charCodeAt(d),u|=0;return r.colors[Math.abs(u)%r.colors.length]}r.selectColor=e;function r(f){let u,d=null,h,g;function p(...m){if(!p.enabled)return;let b=p,_=Number(new Date),y=_-(u||_);b.diff=y,b.prev=u,b.curr=_,u=_,m[0]=r.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let x=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(E,O)=>{if(E==="%%")return"%";x++;let $=r.formatters[O];if(typeof $=="function"){let D=m[x];E=$.call(b,D),m.splice(x,1),x--}return E}),r.formatArgs.call(b,m),(b.log||r.log).apply(b,m)}return p.namespace=f,p.useColors=r.useColors(),p.color=r.selectColor(f),p.extend=o,p.destroy=r.destroy,Object.defineProperty(p,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,g=r.enabled(f)),g),set:m=>{d=m}}),typeof r.init=="function"&&r.init(p),p}function o(f,u){let d=r(this.namespace+(typeof u>"u"?":":u)+f);return d.log=this.log,d}function n(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];let u=(typeof f=="string"?f:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of u)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function s(f,u){let d=0,h=0,g=-1,p=0;for(;d<f.length;)if(h<u.length&&(u[h]===f[d]||u[h]==="*"))u[h]==="*"?(g=h,p=d,h++):(d++,h++);else if(g!==-1)h=g+1,p++,d=p;else return!1;for(;h<u.length&&u[h]==="*";)h++;return h===u.length}function i(){let f=[...r.names,...r.skips.map(u=>"-"+u)].join(",");return r.enable(""),f}function a(f){for(let u of r.skips)if(s(f,u))return!1;for(let u of r.names)if(s(f,u))return!0;return!1}function c(f){return f instanceof Error?f.stack||f.message:f}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Gv.exports=aP});var Xv=Zu((Qt,ku)=>{Qt.formatArgs=lP;Qt.save=fP;Qt.load=uP;Qt.useColors=cP;Qt.storage=dP();Qt.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Qt.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function cP(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function lP(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+ku.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(r++,n==="%c"&&(o=r))}),t.splice(o,0,e)}Qt.log=console.debug||console.log||(()=>{});function fP(t){try{t?Qt.storage.setItem("debug",t):Qt.storage.removeItem("debug")}catch{}}function uP(){let t;try{t=Qt.storage.getItem("debug")||Qt.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function dP(){try{return localStorage}catch{}}ku.exports=Yv()(Qt);var{formatters:pP}=ku.exports;pP.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Nb={};P(Nb,{ANIMATION_PROPS:()=>tm,ARIA_ROLES:()=>yT,ATTR_TRANSFORMS:()=>Yg,BLOCK_PROPS:()=>em,CDN_PROVIDERS:()=>ue,CONFIG:()=>mo,CONFIG_MERGE_EXL:()=>ee,CSS_NAMED_COLOR_HEX:()=>El,CSS_NATIVE_COLOR_REGEX:()=>te,CSS_PROPS_REGISTRY:()=>xt,CSS_UNITS:()=>Vo,DEFAULT_CONFIG:()=>Ia,DEFAULT_CSS_PROPERTIES_LIST:()=>vt,DELEGATED_EVENTS:()=>Dn,DESIGN_SYSTEM_OPTIONS:()=>Oy,DOMQL_EVENTS:()=>Ud,DOMQ_PROPERTIES:()=>_r,DOM_EVENTS:()=>Qx,ENV:()=>op,FACTORY:()=>he,FLEX_PROPS:()=>cm,FONT_PROPS:()=>rm,GRID_PROPS:()=>lm,HOST_REGISTERED_PACKAGES:()=>rv,HTML_ATTRIBUTES:()=>xf,HTML_TAGS:()=>Jo,LIFECYCLE_EVENTS:()=>Mr,METHODS:()=>qo,METHODS_EXL:()=>Is,MISC_PROPS:()=>om,MIXINS:()=>mf,NODE_ENV:()=>ve,OPTIONS:()=>oi,PACKAGE_MANAGER_TO_CDN:()=>Ar,PARSED_DOMQ_PROPERTIES:()=>Ps,POSITION_PROPS:()=>nm,PROPS_METHODS:()=>xr,REGISTRY:()=>jt,RESERVED_STORE_METHODS:()=>Yb,ROUTER_OPTIONS:()=>Hf,SIGNAL_ENGINE_KEY:()=>Bo,SIGNAL_INSTANCES_KEY:()=>No,STANDARD_SCHEME_QUERIES:()=>Xl,STATE_PROPERTIES:()=>Bd,STORE_METHOD_NAMES:()=>Gb,SVG_TAGS:()=>Pn,THEME_PROPS:()=>am,TIMING_PROPS:()=>va,TYPES:()=>vs,UNIVERSAL_RESERVED_KEYS:()=>_l,VALUE_TRANSFORMERS:()=>af,VERSION:()=>Jb,__resetSignalEngine:()=>hd,__resetSignalInstances:()=>pd,__resetStateShadowWarnings:()=>Xb,activateConfig:()=>mx,addCaching:()=>el,addContext:()=>tl,addDelegatedEvent:()=>Sa,addExtend:()=>Tp,addExtends:()=>Kt,addItemAfterEveryElement:()=>Ad,addMethods:()=>jn,addProtoToArray:()=>As,addRef:()=>Jc,animation:()=>dg,appendSVGSprite:()=>ma,appendSvgIconsSprite:()=>wo,applyAttrTransforms:()=>Jg,applyCSS:()=>Sy,applyDependentState:()=>Kp,applyDocument:()=>ga,applyEvent:()=>al,applyEventUpdate:()=>cl,applyExtends:()=>Ln,applyHeadings:()=>tf,applyInitialState:()=>Of,applyMediaSequenceVars:()=>Or,applyProps:()=>Xs,applyReset:()=>ya,applySequenceGlobalVars:()=>Qi,applySequenceVars:()=>ir,applySpacingSequence:()=>ra,applyStateMethods:()=>ae,applyTimingSequence:()=>ha,applyTrueProps:()=>um,applyTypographySequence:()=>ua,arrayContainsOtherArray:()=>xd,arraysEqual:()=>Od,arrayzeValue:()=>fo,assertEmitIntegrity:()=>jg,batch:()=>Sc,breakpoints:()=>fg,buildImgSrcset:()=>Mi,buildSourcesAndImg:()=>Fi,buildThemeVarStyles:()=>Kn,cache:()=>Zp,cacheNode:()=>Lr,call:()=>gh,callStateMethod:()=>Ea,camelToAttr:()=>Nr,camelToLowerAttr:()=>tw,captureSnapshot:()=>yh,changeGlobalTheme:()=>cf,changeLightness:()=>Kh,checkAttributeByTagName:()=>jr,checkEventFunctions:()=>Xg,checkForStateTypes:()=>Hp,checkIfBoxSize:()=>ea,checkIfInherits:()=>il,checkIfStringIsInArray:()=>Id,class:()=>yg,clone:()=>Hd,cloneAndMergeArrayExtend:()=>Vs,cloneFunction:()=>dp,color:()=>og,colorStringToRgbaArray:()=>de,components:()=>Wn,compositeOverBackdrop:()=>po,concatAddExtends:()=>Cp,contrastRatio:()=>hn,convertSvgToSymbol:()=>ta,copyJavaScriptToClipboard:()=>Fh,copyStringToClipboard:()=>Mh,create:()=>Fb,createAsync:()=>QP,createBasedOnType:()=>Xc,createComputed:()=>Wb,createConfig:()=>qi,createDefine:()=>ak,createEffect:()=>Z,createElement:()=>Vp,createElementExtends:()=>Nc,createExtends:()=>zs,createExtendsFromKeys:()=>Zo,createExtendsStack:()=>Vc,createHTMLNode:()=>Rn,createIfConditionFlag:()=>pp,createInheritedState:()=>zp,createKey:()=>Bs,createNestedObject:()=>Xd,createNestedObjectByKeyPath:()=>qp,createObjectWithoutPrototype:()=>Pc,createParent:()=>Zc,createPath:()=>Qc,createProps:()=>Js,createPropsStack:()=>Gc,createRoot:()=>Up,createScope:()=>Yp,createScopeStore:()=>vc,createSignal:()=>_s,createSkeleton:()=>eI,createSnapshotId:()=>js,createState:()=>mm,createStore:()=>Xe,createSync:()=>tI,css:()=>_e,cssMediaVars:()=>zl,cssVars:()=>Hl,customDecodeURIComponent:()=>jd,customEncodeURIComponent:()=>Nd,cutArrayAfterValue:()=>Cd,cutArrayBeforeValue:()=>vd,debounce:()=>Us,debounceOnContext:()=>lp,decodeNewlines:()=>Fd,deepClone:()=>ft,deepContains:()=>Gd,deepDefaults:()=>Ri,deepDestringifyFunctions:()=>le,deepExtend:()=>Fc,deepMerge:()=>st,deepMergeExtends:()=>je,deepStringifyFunctions:()=>$s,defaultDefine:()=>Yn,defineResolvedThemeSignal:()=>_n,defineSetter:()=>ph,defineThemeSignal:()=>bn,destringifyGlobalScope:()=>Ms,destroy:()=>Na,detectHeightOnInit:()=>Sh,detectInfiniteLoop:()=>tp,detectTag:()=>$r,devices:()=>ug,dispose:()=>Br,encodeNewlines:()=>Md,error:()=>co,excludeKeysFromObject:()=>rp,exec:()=>ut,executeAttr:()=>wT,exetuteClassPerComponent:()=>JT,extendCachedRegistry:()=>Ep,extendStackRegistry:()=>Ws,extractArrayExtend:()=>Ks,extractConditionalAttrs:()=>vT,fetchLibraryData:()=>vl,fibonacciNumberByIndex:()=>kh,filterArrays:()=>Rd,filterArraysFast:()=>Pd,filterAttributesByTagName:()=>xT,finalizeExtends:()=>Hc,findClosestNumber:()=>kl,findClosestNumberInFactory:()=>Dh,findHeadingLetter:()=>Gl,findHeadings:()=>Zi,findInheritedState:()=>sl,findKeyPosition:()=>$d,flattenExtend:()=>Qo,font:()=>Jh,fontFace:()=>tg,fontFamily:()=>Zh,fontFamilyTypes:()=>Qh,formatDate:()=>wh,generateHash:()=>$c,generateHeadArrayTags:()=>Sl,generateKey:()=>Ns,generateMetaTags:()=>Ph,generateSequence:()=>Yt,generateSequencePosition:()=>Sg,generateSprite:()=>xn,generateSubSequence:()=>Xi,get:()=>fh,getActiveConfig:()=>C,getActiveDocument:()=>pf,getActiveLang:()=>Jn,getCDNDirUrl:()=>xl,getCDNUrl:()=>Ee,getCacheSize:()=>Ug,getCapitalCaseKeys:()=>Pp,getCdnProviderFromConfig:()=>nn,getChildStateInKey:()=>nl,getChildren:()=>hi,getColor:()=>et,getColorShade:()=>Pl,getContext:()=>wi,getCookie:()=>bp,getDB:()=>Ei,getDefaultOrFirstKey:()=>ho,getEmitStats:()=>hf,getEmotionStylesheet:()=>Uh,getExtendsInElement:()=>Op,getExtendsStack:()=>Hs,getExtendsStackRegistry:()=>Mc,getFnPrefixAndValue:()=>sr,getFontFace:()=>Yh,getFontFaceEach:()=>go,getFontFaceEachString:()=>jl,getFontFaceString:()=>Vi,getFontFamily:()=>fa,getFontFormat:()=>Fl,getFontSizeByKey:()=>da,getFrequencyInArray:()=>wd,getHashedExtend:()=>qs,getImportMapScript:()=>xh,getInObjectByPath:()=>Qd,getLanguages:()=>Ua,getLocalStateLang:()=>qa,getLocalStorage:()=>xp,getMediaColor:()=>It,getMediaTheme:()=>me,getNev:()=>ap,getObserver:()=>kc,getPageMetadata:()=>Ih,getParentStateInKey:()=>ol,getPath:()=>gi,getQuery:()=>Ai,getRef:()=>dh,getResolvedThemeSignal:()=>gx,getRgbTone:()=>He,getRoot:()=>bi,getRootContext:()=>xi,getRootData:()=>_i,getRootState:()=>yi,getRootStateInKey:()=>rl,getSafeInk:()=>Jl,getSafeInkInfo:()=>Eg,getSequenceValue:()=>Ji,getSequenceValueBySymbols:()=>Kl,getSequenceValuePropertyPair:()=>We,getShadow:()=>na,getShapeByKey:()=>pa,getSignals:()=>Kb,getSpacingBasedOnRatio:()=>Te,getSpacingByKey:()=>St,getSpreadChildren:()=>Ip,getSubratio:()=>Yi,getSubratioDifference:()=>Gi,getSystemGlobalTheme:()=>xe,getTheme:()=>ia,getThemeSignal:()=>hx,getTimingByKey:()=>oe,getTimingFunction:()=>ye,global:()=>yd,gradient:()=>ng,grid:()=>mg,hasFunction:()=>Ne,hasHandlerPlugin:()=>Go,hasOwnProperty:()=>Wd,hashContent:()=>ln,hexToRgb:()=>Hh,hexToRgbArray:()=>Al,hexToRgba:()=>Wh,hslToRgb:()=>Rl,icons:()=>ag,inheritChildExtends:()=>Bc,inheritChildPropsExtends:()=>jc,inheritParentProps:()=>Zs,inheritRecursiveChildExtends:()=>Uc,init:()=>ur,initPolyglot:()=>qf,initProps:()=>Np,injectGlobal:()=>kt,is:()=>Wt,isArray:()=>T,isBoolean:()=>Ec,isCSSVar:()=>mt,isContextComponent:()=>Dp,isCyclic:()=>ep,isDOMNode:()=>zt,isDate:()=>Tc,isDefined:()=>bt,isDevelopment:()=>Sr,isDomDocument:()=>Je,isEmpty:()=>Oc,isEmptyObject:()=>qd,isEnumeratedTrueFalseAttr:()=>cr,isEqualDeep:()=>Rc,isFunction:()=>A,isGoogleFontsUrl:()=>gn,isHostObject:()=>Ze,isHtmlElement:()=>Ss,isLocal:()=>ip,isLoudDevRuntime:()=>Pt,isMalformedDependency:()=>sn,isMethod:()=>mh,isMobile:()=>mp,isNode:()=>Qe,isNot:()=>_d,isNotProduction:()=>so,isNull:()=>Ac,isNumber:()=>Fe,isObject:()=>S,isObjectLike:()=>H,isPhoto:()=>vh,isPolyglotWritableKey:()=>er,isProduction:()=>wr,isRawUnitValue:()=>xs,isResolvedColor:()=>Ae,isScalingUnit:()=>Qr,isStaging:()=>sp,isState:()=>Wp,isStore:()=>yt,isString:()=>w,isStringFunction:()=>up,isSvgTag:()=>In,isTest:()=>Dc,isTesting:()=>np,isTracking:()=>bm,isUndefined:()=>Tt,isUniversallyReservedKey:()=>bh,isUnresolvableDependency:()=>lo,isValidDependencyMap:()=>an,isValidHtmlTag:()=>Sp,isValidTag:()=>On,isWasmLoaded:()=>K0,isWrappedLibrary:()=>Ii,isWritableFamilyBucket:()=>md,joinArrays:()=>Ho,jointStacks:()=>Ap,keyframes:()=>Tn,keys:()=>yl,linearChannelToSrgb:()=>$l,loadCssFile:()=>Th,loadJavascript:()=>Oh,loadJavascriptFile:()=>Ch,loadJavascriptFileEmbedSync:()=>Ah,loadJavascriptFileSync:()=>Eh,loadRemoteCSS:()=>Rh,loadRemoteScript:()=>cn,loadTranslations:()=>Ha,loadWasm:()=>q0,log:()=>hh,logGroupIf:()=>gp,logIf:()=>hp,lookdown:()=>ch,lookdownAll:()=>lh,lookup:()=>ah,lowercaseFirstLetter:()=>eo,makeObjectWithoutPrototype:()=>Kd,map:()=>Vd,mapStringsWithContextComponents:()=>Gs,markPolyglotSeeded:()=>Ue,matchesComponentNaming:()=>Be,media:()=>eg,memoize:()=>fp,merge:()=>gt,mergeSharedLibraries:()=>Di,mixTwoColors:()=>Vh,mixTwoRgb:()=>qh,mixTwoRgba:()=>Il,nextElement:()=>ki,normalizeIgnoreList:()=>Pi,normalizeLibraryKey:()=>fn,numToLetterMap:()=>ze,objectToString:()=>Ls,objectizeStringProperty:()=>Ys,oklabToLinearSrgb:()=>Ll,oklabToOklch:()=>ji,oklchToGamutSafeSrgb:()=>Bi,oklchToOklab:()=>Ml,opacify:()=>pn,overwrite:()=>Fs,overwriteDeep:()=>qt,overwriteShallow:()=>no,overwriteState:()=>Gp,parkHostObject:()=>br,parse:()=>bl,parseColorToken:()=>Lt,parseDeep:()=>di,pickupElementFromProps:()=>qc,pickupPropsFromElement:()=>Wc,polyglotFunctions:()=>rc,polyglotPlugin:()=>Zn,polyglotSeededKeys:()=>ri,popConfig:()=>tt,popStaticCssPass:()=>im,previousElement:()=>vi,propExists:()=>Mp,propertizeElement:()=>Kc,propertizeUpdate:()=>Lp,pushConfig:()=>it,pushStaticCssPass:()=>sm,quietColorProbe:()=>yo,refreshContextProto:()=>vf,registerEvent:()=>$n,registerHostPackages:()=>ov,registerSignalInstance:()=>jo,reinit:()=>wy,relativeLuminance:()=>uo,remove:()=>Nn,removeChars:()=>Nh,removeCookie:()=>_p,removeDelegatedEvent:()=>ka,removeDuplicateProps:()=>ti,removeDuplicatesInArray:()=>zo,removeFromArray:()=>Sd,removeFromObject:()=>Yd,removeNestedKeyByPath:()=>Jd,removeValueFromArray:()=>Es,removeValueFromArrayAll:()=>Ed,reorderArrayByValues:()=>Td,replaceLiteralsWithObjectFields:()=>to,replaceOctalEscapeSequences:()=>Ld,resetEmitStats:()=>Ng,resolveAsset:()=>Gt,resolveBorderValue:()=>re,resolveColorRgb:()=>bo,resolveColorsInGradient:()=>_a,resolveConfigDocument:()=>Uo,resolveFileSource:()=>Gg,resolveFileUrl:()=>pe,resolveHandler:()=>Yo,resolvePropValue:()=>Fr,resolveShadowValue:()=>_o,resolveSharedLibraries:()=>Lh,returnSubThemeOrDefault:()=>Gh,returnValueAsText:()=>Yc,rgbArrayToHex:()=>Tl,rgbToHSL:()=>Ol,rgbToHex:()=>zh,runPluginHook:()=>At,runThroughMedia:()=>Ql,scratchDefaultConfig:()=>yn,scratchSystem:()=>vn,scratchUtils:()=>Rr,self:()=>bd,semanticIcons:()=>cg,sequence:()=>nr,serializeAttrValue:()=>Ke,set:()=>So,setActiveConfig:()=>Wl,setActiveDocument:()=>Fg,setActiveRootState:()=>mi,setAdaptiveSchemeVar:()=>Ir,setClass:()=>nO,setClassname:()=>ZT,setColor:()=>Pr,setCookie:()=>yp,setCssEngineHook:()=>Uf,setCustomFont:()=>Ui,setCustomFontMedia:()=>Tr,setEach:()=>Dg,setFont:()=>la,setFontFamily:()=>Sn,setFontImport:()=>mn,setGradient:()=>wn,setHashedExtend:()=>Lc,setInCustomFontMedia:()=>Nl,setInObjectByPath:()=>Zd,setLang:()=>za,setLocalStorage:()=>wp,setMediaTheme:()=>ca,setNodeStyles:()=>ml,setObserver:()=>qb,setProps:()=>uh,setPropsPrototype:()=>Qs,setSVG:()=>kn,setScalingVar:()=>Ki,setShadow:()=>Dr,setSubScalingVar:()=>ql,setSvgIcon:()=>xo,setTheme:()=>aa,setValue:()=>Ig,setVariables:()=>kg,setWasmEngine:()=>wa,shadow:()=>ig,shape:()=>xg,sharedLibrary:()=>$h,sizes:()=>_g,spacing:()=>rg,splitPackageSpecifier:()=>Ti,splitSpacedValue:()=>oa,splitTopLevelCommas:()=>or,splitTransition:()=>sf,spotByPath:()=>pi,srcsetFor:()=>un,srgbChannelToLinear:()=>Dl,srgbToOklab:()=>Ni,stringIncludesAny:()=>Os,stringToObject:()=>zd,stripVersionRangePrefix:()=>Oi,svg:()=>pg,svgData:()=>hg,swapItemsInArray:()=>kd,syncProps:()=>ei,templates:()=>gg,theme:()=>sg,timing:()=>lg,toCamel:()=>Wi,toCamelCase:()=>$i,toDashCase:()=>Li,toDescriptionCase:()=>Bh,toLinearChannel:()=>dn,toTitleCase:()=>jh,toggleFullscreen:()=>_h,transformBackgroundImage:()=>of,transformBorder:()=>qe,transformBorderRadius:()=>ar,transformBoxShadow:()=>ba,transformClassname:()=>lw,transformDuration:()=>xa,transformShadow:()=>rf,transformSize:()=>_t,transformSizeRatio:()=>N,transformTextStroke:()=>ef,transformTransition:()=>Pg,transformersByPrefix:()=>dm,transfromGap:()=>nf,translate:()=>Va,triggerEventOn:()=>kr,triggerEventOnUpdate:()=>Xp,trimStringFromSymbols:()=>Dd,typography:()=>Hi,unit:()=>Xh,unstackArrayOfObjects:()=>Cs,update:()=>Mn,updateProps:()=>jp,updateVars:()=>oO,upsertTranslation:()=>Wa,useCssInProps:()=>ie,useHostState:()=>ym,usePropsAsCSS:()=>aw,useSelectorsAsCSS:()=>cw,variables:()=>Ci,vars:()=>bg,verbose:()=>en,warn:()=>Si,warnStateKeyShadowsMethod:()=>Cc,window:()=>v,wrapHoverRule:()=>Oe});module.exports=HC(Nb);var gd={};P(gd,{RESERVED_STORE_METHODS:()=>Yb,SIGNAL_ENGINE_KEY:()=>Bo,SIGNAL_INSTANCES_KEY:()=>No,STORE_METHOD_NAMES:()=>Gb,VERSION:()=>Jb,__resetSignalEngine:()=>hd,__resetSignalInstances:()=>pd,__resetStateShadowWarnings:()=>Xb,batch:()=>Sc,createComputed:()=>Wb,createEffect:()=>Z,createScopeStore:()=>vc,createSignal:()=>_s,createStore:()=>Xe,getObserver:()=>kc,getSignals:()=>Kb,isStore:()=>yt,registerSignalInstance:()=>jo,setObserver:()=>qb,warnStateKeyShadowsMethod:()=>Cc});var sd={};P(sd,{WRITE_JOURNAL:()=>gs,batch:()=>ys,createComputed:()=>WC,createEffect:()=>qC,createSignal:()=>Le,getObserver:()=>od,journalWrite:()=>ms,setObserver:()=>zC});var Ht=null,gc=0,mc=[],od=()=>Ht,zC=t=>{Ht=t},yc=0,Qu=[];function Le(t){let e=new Set;function r(){return Ht&&(e.add(Ht),Ht._sources.add(s)),t}function o(i){i!==t&&(t=i,ZC(e))}function n(){return t}let s={get:r,set:o,peek:n,_subscribers:e,_type:"signal"};return s}function WC(t){let e,r=!0,o=new Set,n={_sources:new Set,_type:"computed",_subscribers:o,_execute(){rd(n);let s=Ht;Ht=n;try{e=t(),r=!1}finally{Ht=s}},_notify(){r=!0,o.size>0&&Hb(o)},get(){return Ht&&(o.add(Ht),Ht._sources.add(n)),r&&n._execute(),e},peek(){return r&&n._execute(),e}};return n._execute(),n}var ke=new Set,td=!1,gs=[];function ms(t){gs.push(t),gs.length>32&&gs.shift()}function qC(t,e){let r=e?.depth??0,o={_sources:new Set,_type:"effect",_depth:r,_label:e?.label,_disposed:!1,_subscribers:new Set,_execute(){if(o._disposed)return;rd(o);let n=Ht;Ht=o;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{Ht=n}},_notify(){o._disposed||(gc>0?mc.push(o):yc>0?Qu.push(o):nd(o))},dispose(){o._disposed=!0,rd(o)}};return o._execute(),o}function ys(t){gc++;try{t()}finally{gc--,gc===0&&JC()}}var ed=!1,Bb=1e3,KC=8,GC=256,YC=4;function Ub(){return typeof performance<"u"?performance.now():Date.now()}function nd(t){ke.add(t),!ed&&(td||(td=!0,queueMicrotask(Vb)))}var Fo=[];function XC(){if(ke.size===1){let[e]=ke;return ke.clear(),e._disposed?0:(e._execute(),1)}Fo.length=0;for(let e of ke)Fo.push(e);ke.clear(),Fo.sort((e,r)=>e._depth-r._depth);let t=0;for(let e=0;e<Fo.length;e++){let r=Fo[e];r._disposed||(r._execute(),t++)}return Fo.length=0,t}function Vb(t=0,e=0){if(td=!1,ke.size===0)return;ed=!0;let r=Ub(),o=!1;try{for(;ke.size>0;){if(++t>Bb){let n=new Map;for(let c of ke){let l=c._label;if(typeof l=="function")try{l=l()}catch{l="<label error>"}if(l=l||"<unlabeled>",n.set(l,(n.get(l)||0)+1),n.size>=12)break}let s=[...n.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", "),i=new Map;for(let c of gs)i.set(c,(i.get(c)||0)+1);let a=[...i.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", ");console.error("[smbls] reactive effect cascade exceeded",Bb,"passes in a single flush \u2014 breaking to avoid hanging the thread.","This usually means an effect (or an onUpdate/subscribeTo handler","it calls into) unconditionally writes back a signal it depends on.","Still queued at break (the loop participants):",s||"<queue empty>","\u2014 last notifying store writes:",a||"<none recorded>"),ke.clear();break}if(e+=XC(),ke.size>0&&(e>=GC||t>=YC)&&Ub()-r>KC){o=!0,setTimeout(()=>Vb(t,e),0);break}}}finally{o||(ed=!1)}}function JC(){for(let t=0;t<mc.length;t++)nd(mc[t]);mc.length=0}function Hb(t){yc++;try{for(let e of t)e._notify()}finally{if(yc--,yc===0&&Qu.length>0){let e=Qu.splice(0);for(let r=0;r<e.length;r++)nd(e[r])}}}function ZC(t){Hb(t)}function rd(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var dd={};P(dd,{RESERVED_STORE_METHODS:()=>bs,STORE_METHOD_NAMES:()=>ud,__resetStateShadowWarnings:()=>QC,createScopeStore:()=>oE,createStore:()=>bc,getSignals:()=>rE,isStore:()=>eE,warnStateKeyShadowsMethod:()=>fd});var Me=Symbol("store"),_c=Symbol("signals"),ud=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],bs=new Set(ud),ld=new Set,id=(t,e)=>t?t+"."+e:String(e);function fd(t,e){let r=(e||"")+"::"+t;if(ld.has(r))return;ld.add(r);let o=e?`state.${e}`:"state",n=`[smbls/state] "${t}" is a reserved store-method name and was written as DATA at ${o}.${t}. The value is preserved and readable \u2014 data wins over the method \u2014 but "${o}.${t}(\u2026)" no longer reaches the store method on this node. Use "${o}.$${t}(\u2026)" for the method, or rename the data key. Reserved: ${ud.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(n)}function QC(){ld.clear()}var ad=t=>!t||typeof t!="object"||Array.isArray(t)||t[Me]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!xc(t),tE=12,xc=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function wc(t,e,r){if(t===e)return!0;if(r>tE)return!1;if(Array.isArray(t)||Array.isArray(e)){if(!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!wc(t[o],e[o],r+1))return!1;return!0}if(xc(t)&&xc(e)){let o=Object.keys(t),n=Object.keys(e);if(o.length!==n.length)return!1;for(let s of o)if(!Object.prototype.hasOwnProperty.call(e,s)||!wc(t[s],e[s],r+1))return!1;return!0}return!1}function bc(t,e,r,o){r===void 0&&(r=0),o===void 0&&(o="");let n={},s={},i=e&&e.maxDepth||8;if(t&&typeof t=="object")for(let _ in t){if(_==="__proto__"||!Object.prototype.hasOwnProperty.call(t,_))continue;if(_.startsWith("__")){s[_]=t[_];continue}bs.has(_)&&fd(_,o);let y=t[_];r<i&&y&&typeof y=="object"&&!ad(y)?(s[_]=y,n[_]=Le(bc(y,e,r+1,id(o,_)))):(s[_]=y,n[_]=Le(y))}let a=new Proxy(s,{get(_,y){if(y===Me)return!0;if(y===_c)return n;if(y==="__raw")return _;if(y==="$update")return c;if(y==="$parse")return f;if(y==="$clean")return u;if(y==="$keys")return d;if(y==="$values")return h;if(y==="$replace")return g;if(y==="$add")return p;if(y==="$remove")return m;if(y==="$destroy")return b;if(y==="$quietUpdate")return l;if(bs.has(y)&&!Object.prototype.hasOwnProperty.call(n,y))switch(y){case"update":return c;case"parse":return f;case"clean":return u;case"keys":return d;case"values":return h;case"replace":return g;case"add":return p;case"remove":return m;case"destroy":return b;case"quietUpdate":return l}if(y==="__element")return _.__element;if(y==="parent")return _.parent;if(y==="root")return _.root;if(Object.prototype.hasOwnProperty.call(n,y)){let k=n[y].get();if(k!==void 0||!(y!=="root"&&_.root&&_.root!==a))return k}if(_[y]!==void 0)return _[y];let x=typeof y=="string"&&!y.startsWith("__")&&y!=="then"&&y!=="constructor"&&od()!=null;if(y!=="root"&&_.root&&_.root!==a){let k=_.root[y];return x&&!Object.prototype.hasOwnProperty.call(n,y)&&(n[y]=Le(void 0),n[y].get()),k}if(x)return n[y]=Le(void 0),n[y].get()},set(_,y,x){if(y==="__proto__")return!1;if(y==="__element"||y==="parent"||y==="root"||typeof y=="string"&&y.startsWith("__")&&!Object.prototype.hasOwnProperty.call(n,y))return _[y]=x,!0;bs.has(y)&&fd(y,o);let k=id(o,y);if(Object.prototype.hasOwnProperty.call(n,y))if(x&&typeof x=="object"&&!ad(x)){if(x===_[y])return!0;let E=n[y].peek(),O=E&&E[Me]?E.$parse():E;if(wc(x,O,0))return!0;_[y]=x,ms(k),n[y].set(bc(x,e,r+1,k))}else{if(Array.isArray(x)&&x!==_[y]&&Array.isArray(n[y].peek())&&wc(x,n[y].peek(),0))return!0;n[y].peek()!==x&&ms(k),_[y]=x,n[y].set(x)}else _[y]=x,x&&typeof x=="object"&&!ad(x)?n[y]=Le(bc(x,e,r+1,k)):n[y]=Le(x);return!0},has(_,y){return typeof y=="string"&&y.charCodeAt(0)===36&&bs.has(y.slice(1))?!0:y in n||y in _},ownKeys(_){return Object.keys(n)},getOwnPropertyDescriptor(_,y){return y in n?{enumerable:!0,configurable:!0,value:n[y].peek()}:Object.getOwnPropertyDescriptor(_,y)},deleteProperty(_,y){return n[y]&&(n[y].peek()!==void 0&&ms(id(o,y)),n[y].set(void 0),delete n[y]),delete _[y],!0}});function c(_,y){ys(()=>{for(let k in _)k!=="__proto__"&&(a[k]=_[k])});let x=s.__element;return x&&x.onUpdate&&!y?.quiet&&x.onUpdate(x,a,x.context),a}function l(_){return c(_,{quiet:!0})}function f(_){if(_||(_=new Set),_.has(a))return"[Circular]";_.add(a);let y={};for(let x in n){if(x==="parent"||x==="root"||x.startsWith("__"))continue;let k=n[x].peek();k&&k[Me]?y[x]=k.$parse(_):y[x]=k}return y}function u(){return ys(()=>{for(let _ in n)delete a[_]}),a}function d(){return Object.keys(n)}function h(){return Object.keys(n).map(_=>n[_].peek())}function g(_){return ys(()=>{for(let y in n)y in _||delete a[y];for(let y in _)y!=="__proto__"&&(a[y]=_[y])}),a}function p(_,y){let x=Object.prototype.hasOwnProperty.call(n,_)?n[_].peek():s[_];if(Array.isArray(x))return a[_]=[...x,y],a;if(x&&typeof x=="object"&&!Array.isArray(x)){if(xc(y))x[Me]?x.$update(y):a[_]={...x,...y};else{let k=String(Object.keys(x).length);x[Me]?x.$update({[k]:y}):a[_]={...x,[k]:y}}return a}return a[_]=y,a}function m(_){return delete a[_],a}function b(){u(),s.__element=null,s.parent=null}return a}function eE(t){return t&&t[Me]===!0}function rE(t){return t[_c]}function oE(t,e){let r={},o={};if(t&&typeof t=="object")for(let i in t)o[i]=t[i],r[i]=Le(t[i]);let n=i=>{if(Object.prototype.hasOwnProperty.call(r,i))return r;let a=e;for(;a;){let c=a[_c];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[Me]?a[cd]:null}return null};return new Proxy(o,{get(i,a){return a===Me?!0:a===_c?r:a===cd?e:a==="__raw"?i:Object.prototype.hasOwnProperty.call(r,a)?r[a].get():e&&a!=="then"&&a!=="constructor"?e[a]:i[a]},set(i,a,c){let l=n(a);return l?(l===r&&(i[a]=c),l[a].set(c),!0):(i[a]=c,r[a]=Le(c),!0)},has(i,a){if(a in r||a in i)return!0;let c=e;for(;c;){if(a in c)return!0;c=c[Me]?c[cd]:null}return!1},ownKeys(){return Object.keys(r)},getOwnPropertyDescriptor(i,a){return a in r?{enumerable:!0,configurable:!0,value:r[a].peek()}:Object.getOwnPropertyDescriptor(i,a)}})}var cd=Symbol("scope.parent");var Zr="3.14.782";var No="__SMBLS_SIGNAL_INSTANCES__",jo=(t,e,r)=>{let o=e||(typeof globalThis<"u"?globalThis:null);if(!o)return null;let n=o[No]||(o[No]={versions:[],engines:0,reported:!1});return typeof n.engines!="number"&&(n.engines=n.versions.length),n.versions.push(t||Zr),r||n.engines++,n.engines>1&&!n.reported&&(n.reported=!0,console.error("[smbls] duplicate @symbo.ls/signal instance \u2014",n.engines,"copies of the reactive engine are loaded on this page:",n.versions.join(", ")+".","Each copy keeps its own observer and effect queue, so an effect created","by one copy never re-fires from another copy's store writes, and one","copy's cascade breaker cannot see the other's queue.","Copies of the SAME version adopt a single engine automatically, so","this means the versions above DIFFER: a fossil copy is resolving beside","the current one. That is a dependency-graph fault, not an application","bug \u2014 align the version wherever @symbo.ls/signal is imported, then","regenerate the lockfile so exactly one version resolves.")),n},pd=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[No]};var Bo="__SMBLS_SIGNAL_ENGINE__",zb=(t,e,r)=>{let o=e||Zr,n=r||(typeof globalThis<"u"?globalThis:null);if(!n)return t;let s=n[Bo];return s&&s.engine&&s.version===o?(jo(o,n,!0),s.engine):(s||(n[Bo]={version:o,engine:t}),jo(o,n,!1),t)},hd=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[Bo]};var Ft=zb({...sd,...dd,VERSION:Zr},Zr),_s=Ft.createSignal,Wb=Ft.createComputed,Z=Ft.createEffect,Sc=Ft.batch,kc=Ft.getObserver,qb=Ft.setObserver,Xe=Ft.createStore,vc=Ft.createScopeStore,yt=Ft.isStore,Kb=Ft.getSignals,Gb=Ft.STORE_METHOD_NAMES,Yb=Ft.RESERVED_STORE_METHODS,Cc=Ft.warnStateKeyShadowsMethod,Xb=Ft.__resetStateShadowWarnings,Jb=Ft.VERSION;var Vg={};P(Vg,{assertEmitIntegrity:()=>jg,css:()=>_e,getActiveDocument:()=>pf,getCacheSize:()=>Ug,getEmitStats:()=>hf,injectGlobal:()=>kt,keyframes:()=>Tn,reset:()=>Hx,resetEmitStats:()=>Ng,setActiveDocument:()=>Fg,setWasmEngine:()=>wa,wrapHoverRule:()=>Oe});var $g={};P($g,{CONFIG:()=>mo,CONFIG_MERGE_EXL:()=>ee,CSS_NAMED_COLOR_HEX:()=>El,CSS_NATIVE_COLOR_REGEX:()=>te,CSS_UNITS:()=>Vo,FACTORY:()=>he,STANDARD_SCHEME_QUERIES:()=>Xl,VALUE_TRANSFORMERS:()=>af,activateConfig:()=>mx,animation:()=>dg,appendSVGSprite:()=>ma,appendSvgIconsSprite:()=>wo,applyDocument:()=>ga,applyHeadings:()=>tf,applyMediaSequenceVars:()=>Or,applyReset:()=>ya,applySequenceGlobalVars:()=>Qi,applySequenceVars:()=>ir,applySpacingSequence:()=>ra,applyTimingSequence:()=>ha,applyTypographySequence:()=>ua,breakpoints:()=>fg,changeGlobalTheme:()=>cf,changeLightness:()=>Kh,checkIfBoxSize:()=>ea,class:()=>yg,color:()=>og,colorStringToRgbaArray:()=>de,compositeOverBackdrop:()=>po,contrastRatio:()=>hn,convertSvgToSymbol:()=>ta,createConfig:()=>qi,cssMediaVars:()=>zl,cssVars:()=>Hl,defineResolvedThemeSignal:()=>_n,defineThemeSignal:()=>bn,devices:()=>ug,document:()=>dx,findHeadingLetter:()=>Gl,findHeadings:()=>Zi,font:()=>Jh,fontFace:()=>tg,fontFamily:()=>Zh,fontFamilyTypes:()=>Qh,generateSequence:()=>Yt,generateSequencePosition:()=>Sg,generateSprite:()=>xn,generateSubSequence:()=>Xi,getActiveConfig:()=>C,getColor:()=>et,getColorShade:()=>Pl,getDefaultOrFirstKey:()=>ho,getFnPrefixAndValue:()=>sr,getFontFace:()=>Yh,getFontFaceEach:()=>go,getFontFaceEachString:()=>jl,getFontFaceString:()=>Vi,getFontFamily:()=>fa,getFontFormat:()=>Fl,getFontSizeByKey:()=>da,getMediaColor:()=>It,getMediaTheme:()=>me,getResolvedThemeSignal:()=>gx,getRgbTone:()=>He,getSafeInk:()=>Jl,getSafeInkInfo:()=>Eg,getSequenceValue:()=>Ji,getSequenceValueBySymbols:()=>Kl,getSequenceValuePropertyPair:()=>We,getShadow:()=>na,getShapeByKey:()=>pa,getSpacingBasedOnRatio:()=>Te,getSpacingByKey:()=>St,getSubratio:()=>Yi,getSubratioDifference:()=>Gi,getTheme:()=>ia,getThemeSignal:()=>hx,getTimingByKey:()=>oe,getTimingFunction:()=>ye,gradient:()=>ng,grid:()=>mg,hexToRgb:()=>Hh,hexToRgbArray:()=>Al,hexToRgba:()=>Wh,hslToRgb:()=>Rl,icons:()=>ag,isCSSVar:()=>mt,isDomDocument:()=>Je,isGoogleFontsUrl:()=>gn,isHostObject:()=>Ze,isRawUnitValue:()=>xs,isResolvedColor:()=>Ae,isScalingUnit:()=>Qr,isWritableFamilyBucket:()=>md,linearChannelToSrgb:()=>$l,media:()=>eg,mixTwoColors:()=>Vh,mixTwoRgb:()=>qh,mixTwoRgba:()=>Il,numToLetterMap:()=>ze,oklabToLinearSrgb:()=>Ll,oklabToOklch:()=>ji,oklchToGamutSafeSrgb:()=>Bi,oklchToOklab:()=>Ml,opacify:()=>pn,parkHostObject:()=>br,parseColorToken:()=>Lt,popConfig:()=>tt,pushConfig:()=>it,quietColorProbe:()=>yo,relativeLuminance:()=>uo,reset:()=>px,resolveBorderValue:()=>re,resolveColorRgb:()=>bo,resolveColorsInGradient:()=>_a,resolveConfigDocument:()=>Uo,resolveFileUrl:()=>pe,resolveShadowValue:()=>_o,returnSubThemeOrDefault:()=>Gh,rgbArrayToHex:()=>Tl,rgbToHSL:()=>Ol,rgbToHex:()=>zh,runThroughMedia:()=>Ql,scratchDefaultConfig:()=>yn,scratchSystem:()=>vn,scratchUtils:()=>Rr,semanticIcons:()=>cg,sequence:()=>nr,set:()=>So,setActiveConfig:()=>Wl,setAdaptiveSchemeVar:()=>Ir,setColor:()=>Pr,setCustomFont:()=>Ui,setCustomFontMedia:()=>Tr,setEach:()=>Dg,setFont:()=>la,setFontFamily:()=>Sn,setFontImport:()=>mn,setGradient:()=>wn,setInCustomFontMedia:()=>Nl,setMediaTheme:()=>ca,setSVG:()=>kn,setScalingVar:()=>Ki,setShadow:()=>Dr,setSubScalingVar:()=>ql,setSvgIcon:()=>xo,setTheme:()=>aa,setValue:()=>Ig,setVariables:()=>kg,shadow:()=>ig,shape:()=>xg,sizes:()=>_g,spacing:()=>rg,splitSpacedValue:()=>oa,splitTopLevelCommas:()=>or,splitTransition:()=>sf,srgbChannelToLinear:()=>Dl,srgbToOklab:()=>Ni,svg:()=>pg,svgData:()=>hg,templates:()=>gg,theme:()=>sg,timing:()=>lg,toCamel:()=>Wi,toLinearChannel:()=>dn,transformBackgroundImage:()=>of,transformBorder:()=>qe,transformBorderRadius:()=>ar,transformBoxShadow:()=>ba,transformDuration:()=>xa,transformShadow:()=>rf,transformSize:()=>_t,transformSizeRatio:()=>N,transformTextStroke:()=>ef,transformTransition:()=>Pg,transfromGap:()=>nf,typography:()=>Hi,unit:()=>Xh,vars:()=>bg});var Rr={};P(Rr,{CSS_NAMED_COLOR_HEX:()=>El,CSS_NATIVE_COLOR_REGEX:()=>te,CSS_UNITS:()=>Vo,applyMediaSequenceVars:()=>Or,applySequenceGlobalVars:()=>Qi,applySequenceVars:()=>ir,changeLightness:()=>Kh,colorStringToRgbaArray:()=>de,compositeOverBackdrop:()=>po,contrastRatio:()=>hn,convertSvgToSymbol:()=>ta,findHeadingLetter:()=>Gl,findHeadings:()=>Zi,generateSequence:()=>Yt,generateSequencePosition:()=>Sg,generateSprite:()=>xn,generateSubSequence:()=>Xi,getColorShade:()=>Pl,getDefaultOrFirstKey:()=>ho,getFnPrefixAndValue:()=>sr,getFontFace:()=>Yh,getFontFaceEach:()=>go,getFontFaceEachString:()=>jl,getFontFaceString:()=>Vi,getFontFormat:()=>Fl,getRgbTone:()=>He,getSequenceValue:()=>Ji,getSequenceValueBySymbols:()=>Kl,getSequenceValuePropertyPair:()=>We,getSubratio:()=>Yi,getSubratioDifference:()=>Gi,hexToRgb:()=>Hh,hexToRgbArray:()=>Al,hexToRgba:()=>Wh,hslToRgb:()=>Rl,isCSSVar:()=>mt,isDomDocument:()=>Je,isGoogleFontsUrl:()=>gn,isHostObject:()=>Ze,isRawUnitValue:()=>xs,isResolvedColor:()=>Ae,isScalingUnit:()=>Qr,isWritableFamilyBucket:()=>md,linearChannelToSrgb:()=>$l,mixTwoColors:()=>Vh,mixTwoRgb:()=>qh,mixTwoRgba:()=>Il,numToLetterMap:()=>ze,oklabToLinearSrgb:()=>Ll,oklabToOklch:()=>ji,oklchToGamutSafeSrgb:()=>Bi,oklchToOklab:()=>Ml,opacify:()=>pn,parkHostObject:()=>br,parseColorToken:()=>Lt,relativeLuminance:()=>uo,resolveConfigDocument:()=>Uo,resolveFileUrl:()=>pe,returnSubThemeOrDefault:()=>Gh,rgbArrayToHex:()=>Tl,rgbToHSL:()=>Ol,rgbToHex:()=>zh,setCustomFont:()=>Ui,setCustomFontMedia:()=>Tr,setFontImport:()=>mn,setInCustomFontMedia:()=>Nl,setScalingVar:()=>Ki,setSubScalingVar:()=>ql,setVariables:()=>kg,splitTopLevelCommas:()=>or,srgbChannelToLinear:()=>Dl,srgbToOklab:()=>Ni,toLinearChannel:()=>dn});var Je=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0),Ze=t=>{if(t===null||typeof t!="object")return!1;let e=Object.prototype.toString.call(t);return!!(e!=="[object Object]"&&e!=="[object Array]"||typeof t.nodeType=="number"||t.defaultView||t.window===t||t.self===t)},md=t=>t!==null&&typeof t=="object"&&!Ze(t),br=(t,e,r)=>{if(!t)return;if(Je(r)){t.__domDocument||(t.__domDocument=r);return}let o=`__host_${e}`;t[o]||(t[o]=r)},Uo=t=>t?Je(t.__domDocument)?t.__domDocument:Je(t.document)?t.document:null:null;var Qr=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",Vo=["px","cm","mm","in","pt","pc","em","rem","ex","cap","ch","ic","lh","rlh","%","vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax","deg","rad","grad","turn","s","ms","dpi","dpcm","dppx","fr","auto"],nE=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),sE=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${Vo.filter(t=>t!=="auto").map(nE).join("|")})$`),xs=t=>sE.test(String(t).trim());R();var El={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},de=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=El[t.toLowerCase()];if(e&&(t=e),t[0]==="#")return t.length<7&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(t.length>4?t[4]+t[4]:"")),[parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16),parseInt(t.substr(5,2),16),t.length>7?parseInt(t.substr(7,2),16)/255:1];if(t.indexOf("rgb")===-1&&Q&&v){let r=Q.body.appendChild(Q.createElement("fictum")),o="rgb(1, 2, 3)";if(r.style.color=o,r.style.color!==o){Q.body.removeChild(r);return}if(r.style.color=t,r.style.color===o||r.style.color==="")return Q.body.removeChild(r),[0,0,0,0];t=v.getComputedStyle(r).color,Q.body.removeChild(r)}return t.indexOf("rgb")===0?(t.indexOf("rgba")===-1&&(t=`${t}, 1`),t.match(/[\.\d]+/g).map(r=>+r)):[0,0,0,0]},Vh=(t,e,r=.5)=>(t=de(t),e=de(e),Il(t,e,r)),Hh=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${r},${o},${n})`},Al=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[r,o,n]},zh=(t,e,r)=>"#"+(1<<24|t<<16|e<<8|r).toString(16).slice(1),Tl=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1),Wh=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${r},${o},${n},${e})`},qh=(t,e,r=.5)=>{let o=[];for(let n=0;n<3;n++)o[n]=~~(t[n]+(e[n]-t[n])*r);return`rgb(${o})`},Kh=(t,e)=>{let[r,o,n]=e,s=Math.max(0,Math.min(100,n+parseFloat(t)));return[r,o,s]},Ol=(t,e,r)=>{let o=Math.max(t,e,r),n=o-Math.min(t,e,r),s=1-Math.abs(o+o-n-1),i=n&&(o==t?(e-r)/n:o==e?2+(r-t)/n:4+(t-e)/n);return[60*(i<0?i+6:i),s?n/s:0,(o+o-n)/2]},Rl=(t,e,r,o=e*Math.min(r,1-r),n=(s,i=(s+t/30)%12)=>r-o*Math.max(Math.min(i-3,9-i,1),-1))=>[n(0),n(8),n(4)],Pl=(t,e)=>{let r=parseInt(t,16),o=(r>>16)+e;o>255?o=255:o<0&&(o=0);let n=(r>>8&255)+e;n>255?n=255:n<0&&(n=0);let s=(r&255)+e;return s>255?s=255:s<0&&(s=0),((s|n<<8|o<<16)+16777216).toString(16).slice(1)},Il=(t,e,r=.5)=>{let o=[];for(let n=0;n<4;n++){let s=n===3?i=>i:Math.round;o[n]=s(t[n]+(e[n]-t[n])*r)}return`rgba(${o})`},pn=(t,e)=>{let r=de(t);if(!r){so()&&console.warn(t+" color is not rgba");return}return r[3]=e,`rgba(${r})`},mt=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,te=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,fA=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,Lt=t=>{if(!w(t))return null;if(te.test(t))return{passthrough:t};if(mt(t))return{cssVar:t};let e=t.match(fA);if(!e)return null;let[,r,o,n]=e,s=o!==void 0?`0.${o}`:void 0,i=n&&n[0]==="="?n.slice(1):n;return{name:r,alpha:s,tone:i}},Ae=t=>w(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),or=t=>{let e=[],r="",o=0;for(let n of t){if(n==="("?o+=1:n===")"&&o>0&&(o-=1),n===","&&o===0){e.push(r),r="";continue}r+=n}return(r.length||!e.length)&&e.push(r),e},dn=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),uo=t=>.2126*dn(t[0])+.7152*dn(t[1])+.0722*dn(t[2]),hn=(t,e)=>{let r=uo(t)+.05,o=uo(e)+.05;return r>o?r/o:o/r},Dl=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),$l=t=>(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*255,Ni=([t,e,r])=>{let[o,n,s]=[t,e,r].map(Dl),i=.4122214708*o+.5363325363*n+.0514459929*s,a=.2119034982*o+.6806995451*n+.1073969566*s,c=.0883024619*o+.2817188376*n+.6299787005*s,l=Math.cbrt(i),f=Math.cbrt(a),u=Math.cbrt(c);return[.2104542553*l+.793617785*f-.0040720468*u,1.9779984951*l-2.428592205*f+.4505937099*u,.0259040371*l+.7827717662*f-.808675766*u]},Ll=([t,e,r])=>{let o=t+.3963377774*e+.2158037573*r,n=t-.1055613458*e-.0638541728*r,s=t-.0894841775*e-1.291485548*r,i=o**3,a=n**3,c=s**3;return[4.0767416621*i-3.3077115913*a+.2309699292*c,-1.2684380046*i+2.6097574011*a-.3413193965*c,-.0041960863*i-.7034186147*a+1.707614701*c]},ji=([t,e,r])=>{let o=Math.atan2(r,e)*180/Math.PI;return o<0&&(o+=360),[t,Math.sqrt(e*e+r*r),o]},Ml=([t,e,r])=>{let o=r*Math.PI/180;return[t,e*Math.cos(o),e*Math.sin(o)]},Bi=(t,e,r,o=24)=>{let n=a=>Ll(Ml([t,a,r])),s=a=>a.every(c=>c>=-1e-4&&c<=1.0001),i=n(e);if(!s(i)){let a=0,c=e;for(let l=0;l<o;l++){let f=(a+c)/2;s(n(f))?a=f:c=f}i=n(a)}return i.map(a=>$l(Math.max(0,Math.min(1,a))))},po=(t,e=1,r=[255,255,255])=>e>=1?t:t.map((o,n)=>o*e+r[n]*(1-e)),He=(t,e)=>{w(t)&&t.includes("rgb")&&(t=de(t).join(", ")),w(t)&&(t=t.split(",").map(n=>parseFloat(n.trim()))),Fe(e)&&(e+="");let r=Tl(t),o=e.slice(0,1);if(o==="-"||o==="+"){let n=Pl(r,parseFloat(e));return Al(n).join(", ")}else{let[n,s,i]=t,[a,c]=Ol(n/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return Rl(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var Gh=(t,e)=>{if(t)return t.themes&&t.themes[e]?t.themes[e]:t[e]?[t,t[e]]:t};var pe=(t,e)=>{if(!t||!e)return null;try{return new URL(t),null}catch{}let r=e[t];return r?r.content&&r.content.src:null},ho=(t,e)=>{if(t[e])return t[e].value;let r=()=>Object.keys(t).find(n=>n!=="default"&&t[n]&&t[n].value&&!t[n].isSystemFallback);if(t.default){let n=t[t.default];if(n&&n.isSystemFallback){let s=r();if(s)return t[s].value}if(n)return n.value}let o=r()||Object.keys(t).find(n=>n!=="default"&&t[n]&&t[n].value);return o&&t[o]&&t[o].value},Fl=t=>{if(typeof t!="string"||!t)return null;let e=t.split(/[#?]/)[0].split(".").pop().trim();return["woff2","woff","ttf","otf","eot"].includes(e)?e:null},gn=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),mn=t=>`@import url('${t}');`,Nl=t=>`@font-face { ${t} }`,Ui=(t,e,r,o={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=Fl(a),l=c?` format('${c}')`:"";return`url('${a}')${l}`}).join(`,
33
33
  `);return`
34
34
  font-family: '${t}';
35
35
  font-style: ${o.fontStyle||"normal"};${r?`
36
36
  font-weight: ${r};`:""}${o.fontStretch?`
37
37
  font-stretch: ${o.fontStretch};`:""}${o.fontDisplay?`
38
38
  font-display: ${o.fontDisplay};`:""}
39
- src: ${i};`},Tr=(t,e,r,o)=>`@font-face {${Bi(t,e,r,o)}
40
- }`,go=(t,e,r)=>Object.keys(e).map(n=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l}=e[n],f=Array.isArray(s)?s.map(u=>pe(u,r)||u):pe(s,r)||s;return Bi(t,f,i,{fontStyle:a,fontDisplay:c,fontStretch:l})}),Kh=t=>Object.keys(t).map(r=>go(r,t[r].value)),Nl=(t,e,r)=>{if(e&&e.isVariable){let s=pe(e.url,r)||e.url;return hn(s)?gn(s):Tr(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap"})}if(e[0])return go(t,e,r).map(Fl);let n=Array.isArray(e.url)?e.url.map(s=>pe(s,r)||s):pe(e.url,r)||e.url;return Tr(t,n,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch})},Ui=(t,e)=>Object.keys(t).map(o=>Nl(o,t[o].value,e));R();R();R();R();var mn={};P(mn,{animation:()=>fg,breakpoints:()=>cg,class:()=>gg,color:()=>eg,devices:()=>lg,document:()=>lx,font:()=>Yh,fontFace:()=>Zh,fontFamily:()=>Xh,fontFamilyTypes:()=>Jh,gradient:()=>rg,grid:()=>hg,icons:()=>sg,media:()=>Qh,reset:()=>fx,semanticIcons:()=>ig,sequence:()=>nr,shadow:()=>ng,shape:()=>bg,sizes:()=>yg,spacing:()=>tg,svg:()=>ug,svgData:()=>dg,templates:()=>pg,theme:()=>og,timing:()=>ag,typography:()=>Vi,unit:()=>Gh,vars:()=>mg});var nr={"minor-second":1.067,"major-second":1.125,"minor-third":1.2,"major-third":1.25,"perfect-fourth":1.333,"augmented-fourth":1.414,"perfect-fifth":1.5,"minor-sixth":1.6,phi:1.618,"major-sixth":1.667,"square-root-3":1.732,"minor-seventh":1.778,"major-seventh":1.875,octave:2,"square-root-5":2.23,"major-tenth":2.5,"major-eleventh":2.667,"major-twelfth":3,pi:3.14,"double-octave":4};var Gh={default:"em"};var cA={browserDefault:16,base:16,type:"font-size",ratio:nr["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},Vi=cA;var Yh={};var Xh={},Jh={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},Zh={};var Qh={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var lA={base:Vi.base,type:"spacing",ratio:nr.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},tg=lA;var eg={},rg={};var og={};var ng={};var sg={},ig={};var fA={default:150,base:150,type:"timing",ratio:nr["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},ag=fA;var lx={};var cg={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},lg={screenXXL:[2560,1440],screenXL:[2240,1260],screenL:[1920,1024],screenM:[1680,1024],screenS:[1440,720],tabletL:[1366,926],tabletM:[1280,768],tabletS:[1024,768],mobileL:[768,375],mobileM:[560,768],mobileS:[480,768],mobileXS:[375,768]};var fg={};var ug={},dg={};var pg={};var uA={},hg=uA;var gg={};var fx={},mg={},yg={},bg={};var Vl={},zl={},ee=new Set,jl=mn,Bl={},Hi=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in jl){let e=t.toLowerCase();Bl[e]=jl[t];let r=Hi(e);r!==e&&(Bl[r]=jl[t]),e!==t&&(Bl[t]=jl[t])}var mo={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:Vl,cssMediaVars:zl,CSS_VARS:Vl,CSS_MEDIA_VARS:zl,_scratchConfig:!0,...Bl},yn=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return bt(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let r=bt(e)?e:t.globalTheme,o=bs(bt(r)?r:"auto");return Object.defineProperty(t,"globalTheme",{get(){return o.get()},set(n){o.set(n)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"__globalThemeSignal",{value:o,enumerable:!1,configurable:!0,writable:!0}),o},ux=t=>t?yn(t):null,bn=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return bt(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let r=bt(e)?e:t.resolvedTheme,o=bs(bt(r)?r:null);return Object.defineProperty(t,"resolvedTheme",{get(){return o.get()},set(n){o.set(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"__resolvedThemeSignal",{value:o,enumerable:!1,configurable:!0,writable:!0}),o},dx=t=>t?bn(t):null;yn(mo);bn(mo);var Ul=ft(mo),he={active:"0",0:mo},px=t=>(bt(t)&&(he.active=t),he[t||he.active]),zi=[],it=t=>{t&&t._scratchConfig&&zi.push(t)},tt=()=>{zi.pop()},C=t=>zi.length?zi[zi.length-1]:he[t||he.active]||mo,Hl=t=>{if(S(t))return he.active="1",he[1]=st(t,ft(Ul),ee),yn(he[1]),bn(he[1]),t},dA=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],pA=["useVariable","globalTheme","verbose"],hA=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],gA=t=>{for(let e of hA){let r;for(let o of e){let n=t[o];S(n)&&(r=r?st(n,r,ee):n)}if(r)for(let o of e)S(t[o])&&(t[o]=r)}},Wi=(t,e,{cleanBase:r=!1}={})=>{let o=r?null:C(),n=ft(!r&&o&&o._scratchConfig?o:Ul);for(let i of dA)delete n[i];for(let i of pA)Object.prototype.hasOwnProperty.call(Ul,i)?n[i]=Ul[i]:delete n[i];let s=st(e||{},n,ee);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s._scratchConfig=!0,gA(s),yn(s),bn(s),t&&(he[t]=s),s};var He={"-6":"U","-5":"V","-4":"W","-3":"X","-2":"Y","-1":"Z",0:"A",1:"B",2:"C",3:"D",4:"E",5:"F",6:"G",7:"H",8:"I",9:"J",10:"K",11:"L",12:"M",13:"N",14:"O",15:"P",16:"Q",17:"R",18:"S",19:"T"},_g=(t,e)=>{let{key:r,variable:o,value:n,scaling:s,index:i,scalingVariable:a}=t;e.sequence[r]={key:r,decimal:~~(n*100)/100,val:~~n,scaling:s,index:i,scalingVariable:a,variable:o},e.scales[r]=s;let c=hx.has(e.unit)?"rem":e.unit;e.vars[o]=s+c},sr=t=>{if(!t.includes("("))return t;let e=t.split("(")[0],r=t.slice(t.indexOf("(")+1,t.lastIndexOf(")"));return[e,r]},hx=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),qi=(t,e)=>{let{base:r,type:o,unit:n}=e,s=hx.has(n)?"rem":n,i=(Qr(s)?1:r)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(o&&o.replace(".","-")),l=`${c}-ratio`;if(t>0){let f=He[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=He[t+1],u=Math.abs(t),d=Math.pow(gx,2*u),h=He[u];return h?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${h}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},Wl=(t,e,r,o)=>{let{type:n}=o,i=t===2&&e.length===2?t+1:t,l=`${"--"+(o.varPrefix?o.varPrefix+"-":"")+(n&&n.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${l+i}))`},Ki=(t,e)=>{let o=(t*e-t)/1.618,n=t*e-o,s=t+o,i=(n+s)/2;return[n,i,s]},Gi=(t,e)=>Ki(t,e).map(r=>r/t),Yi=(t,e)=>{let{key:r,base:o,value:n,ratio:s,variable:i,index:a}=t,l=~~(n*s)-~~n,f,[u,d,h]=Ki(n,s);l>16?f=[u,d,h]:f=[u,h],f.forEach((g,p)=>{let m=~~(g/o*1e3)/1e3,b=i+(p+1),_=a+(p+1)/10,y=Wl(p+1,f,i,e),x={key:r+(p+1),variable:b,value:g,scaling:m,scalingVariable:y,index:_};_g(x,e)})},gx=1.618,mA=(t,e,r)=>{if(t>=0)return e*Math.pow(r,t);let o=Math.abs(t),n=e*Math.pow(r,t),s=e*Math.pow(r,o)/Math.pow(gx,2*o);return Math.max(n,s)},Yt=t=>{let{type:e,base:r,ratio:o,range:n,subSequence:s}=t,i=Math.abs(n[0])+Math.abs(n[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=n[1]-l,u=He[f],d=mA(f,r,o),h=~~(d/r*100)/100,g=c+u,p=qi(f,t),m={key:u,variable:g,value:d,base:r,scaling:h,scalingVariable:p,ratio:o,index:f};_g(m,t),s&&Yi(m,t)}return t},xg=(t,e=0)=>{let{type:r,base:o,ratio:n,subSequence:s}=t,i=w(e)?e:He[e],a=w(e)?Object.entries(He).find(([,m])=>m===e)?.[0]:e;if(!i)return console.warn(`Position ${e} is out of range in numToLetterMap`),null;let c={sequence:{},scales:{},vars:{},...t},l=o*Math.pow(n,a),f=~~(l/o*100)/100,h="--"+(t.varPrefix?t.varPrefix+"-":"")+(r&&r.replace(".","-"))+"-"+i,g=qi(a,t),p={key:i,variable:h,value:l,base:o,scaling:f,scalingVariable:g,ratio:n,index:a};return _g(p,c),s&&Yi(p,c),c},Xi=(t="A",e)=>{let r=C(),{unit:o}=r;if(w(t)&&mt(t))return`var(${t})`;if(w(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(w(t)){let y=r.sizes;if(y){let x=y[t]||y[t.toLowerCase()];if(x!==void 0)return t.slice(0,1)==="-"?`calc(${x} * -1)`:x}}let{sequence:n,unit:s=o.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(_s(t)||!c||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(t))return t;let d=`--${e.varPrefix?e.varPrefix+"-":""}${$i(e.type.replace(".","-"))}-`,h=t.toUpperCase(),g=h.slice(0,1)==="-"?"-":"",p=g?h.slice(1):h,m="";p.includes("_")&&(m="_"+p.split("_")[1].toLowerCase(),p=p.split("_")[0]);let b=y=>a.test(y)?`var(${d}${y}${m})`:y;if(p.includes("+")){let[y,x]=p.split("+"),k=`${b(y)} + ${b(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(p.includes("*")){let[y,x]=p.split("*"),k=`${b(y)} * ${b(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(p.includes("-")){let[y,x]=p.split("-"),k=`${b(y)} - ${b(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}if(!n[p]&&p.length===2&&(r.verbose&&console.warn(p,"- value is not found because `subSequence` is set to false"),p=p.slice(0,1)),i||r.useVariable){let y=`var(${d}${p}${m})`;return g?`calc(${y} * -1)`:y}let _=n?n[p]:null;if(!_){if(console.warn("can't find",n,p),Pt())throw new Error(`[smbls] Unresolvable design-system token "${t}"`+(e.type?` for sequence "${e.type}"`:"")+" \u2014 not a registered `sizes` name and not a valid spacing/typography/timing sequence letter. The CSS property using it would silently be dropped in production. Register the token in `designSystem/sizes.js` (or the relevant sequence family) or fix the typo.");return}return s==="ms"||s==="s"?g+_.val+s:g+_.scaling+s},ql=(t,e)=>{if(!["+","-","*","/",","].filter(s=>t.includes(s+" ")).length)return t;let o=/(\s+-\s+|\s*[+*/,]\s*)/;return t.split(o).map(s=>{let i=s.trim();return!i||["+","-","*","/",","].includes(i)?s:Xi(i,e)}).join("")},We=(t,e,r,o)=>{if(typeof t!="string")return C().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!o&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let s=sr(t);o=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=ql(t,r):t=Xi(t,r),{[e]:o?`${o}(${t})`:t}},Kl=(t,e)=>He[t-e],Ji=t=>{let{h1Matches:e,sequence:r}=t;return new Array(6).fill(null).map((o,n)=>{let s=Kl(e,n);return r[s]})};R();var wg=(t,e)=>{let r=C(),{cssVars:o}=r;z(t.value)||(o[t.var]=t.value)},Zi=(t,e,r)=>{let o=C(),{unit:n}=o,s=e.unit||n.default,{base:i,ratio:a,type:c}=e,f="--"+(e.varPrefix?e.varPrefix+"-":"")+(c&&c.replace(".","-"));t[`${f}-base`]=i,t[`${f}-unit`]=s;let u=`${f}-ratio`;t[u]=a;let[d,h,g]=Gi(i,a);t[`${f}-sub-ratio-1`]=`calc(var(${f}-ratio) * ${d/a})`,t[`${f}-sub-ratio-2`]=`calc(var(${f}-ratio) * ${h/a})`,t[`${f}-sub-ratio-3`]=`calc(var(${f}-ratio) * ${g/a})`},mx=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),ir=(t,e={})=>{let r=C(),{unit:o,timing:n,cssVars:s}=r,i=t.unit||o.default,a=mx.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||Zi(s,t,e);for(let u in l){let d=l[u],h=(t.type===n.type?l[u].val:f[u])+a;if(!c){s[d.variable+"_default"]=h,s[d.variable]=d.scalingVariable;continue}e.useDefault===!1?s[d.variable]=h:(s[d.variable+"_default"]=h,s[d.variable]=`var(${d.variable+"_default"})`)}},Or=(t,e,r={})=>{let o=C(),{unit:n,media:s,cssVars:i}=o,a=e.slice(1),c=t[e],l=c.unit||t.unit||n.default,f=mx.has(l)?"rem":l,{mediaRegenerate:u}=t,{sequence:d,scales:h}=c,g=s[a];if(!g&&o.verbose&&console.warn("Can't find media query ",g),!u){let p=i[`@media ${g}`];p||(p=i[`@media ${g}`]={}),Zi(p,c,r);let m=t.unit||n.default;if(f!==m&&d)for(let b in d){let _=d[b],y=h[b]+f;p[_.variable+"_default"]=y,p[_.variable]=y}return}for(let p in d){let m=d[p],b=(Qr(f)?h[p]:d[p].val)+f;!g&&o.verbose&&console.warn("Can't find query ",g);let _=i[`@media ${g}`];_||(_=i[`@media ${g}`]={}),_[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=b}};R();var bx=so(),_n=t=>{let e=C(),r="";for(let o in t)e.__svgCache[o]||(e.__svgCache[o]=!0,r+=t[o]);return r},yA=t=>{let e=t&&(t.default||t);if(!w(e))return bx&&console.warn("parseRootAttributes:",e,"is not a string"),{};let r=e.match(/<svg\s+(.*?)>/);if(!r||!r[1])return{};let n=r[1].match(/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|\s*\/?[>"']))+.)["']?/gm);return n?n.reduce((s,i)=>{let[a,c]=i.split("=");return s[a]=c.replace(/['"]/g,""),s},{}):{}},bA=(t,e)=>{let r=[];if(t.replace(/id="([^"]*)"/g,(n,s)=>(r.push(s),n)),!r.length)return t;let o=t;for(let n of r){let s=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${e}-${n}`;o=o.replace(new RegExp(`id="${s}"`,"g"),`id="${i}"`).replace(new RegExp(`url\\(#${s}\\)`,"g"),`url(#${i})`).replace(new RegExp(`xlink:href="#${s}"`,"g"),`xlink:href="#${i}"`).replace(new RegExp(`href="#${s}"`,"g"),`href="#${i}"`)}return o},yx=new Set,Qi=(t,e)=>{let r=e&&e.default?e.default:e;if(!w(r))return bx&&!yx.has(t)&&(yx.add(t),console.warn("convertSvgToSymbol:",t,"is not a string")),"";e=r;let o=e.match(/^<symbol\b[^>]*\bid="([^"]*)"/);if(o){let u=o[1];return u===t?e:e.replace(`id="${u}"`,`id="${t}"`)}let n=yA(e),{width:s,height:i}=n,a=n.viewBox||`0 0 ${s||24} ${i||24}`,f=bA(e,t).replace("<svg",`<symbol id="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="${a}"`);return f=f.replace(/width="[^"]*"/,""),f=f.replace(/height="[^"]*"/,""),f=f.replace("</svg","</symbol"),f=wA(f),f},_A="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",xA=new RegExp(`<(${_A})\\b([^>]*?)\\s*/>`,"g"),wA=t=>t.replace(xA,"<$1$2></$1>");var kn={};P(kn,{STANDARD_SCHEME_QUERIES:()=>Gl,appendSVGSprite:()=>ga,appendSvgIconsSprite:()=>xo,applyDocument:()=>ha,applyHeadings:()=>Zl,applyReset:()=>ma,applySpacingSequence:()=>ea,applyTimingSequence:()=>pa,applyTypographySequence:()=>fa,checkIfBoxSize:()=>ta,getColor:()=>et,getFontFamily:()=>la,getFontSizeByKey:()=>ua,getMediaColor:()=>It,getMediaTheme:()=>me,getSafeInk:()=>Yl,getSafeInkInfo:()=>kg,getShadow:()=>oa,getShapeByKey:()=>da,getSpacingBasedOnRatio:()=>Te,getSpacingByKey:()=>St,getTheme:()=>sa,getTimingByKey:()=>oe,getTimingFunction:()=>ye,resolveBorderValue:()=>re,resolveColorRgb:()=>yo,resolveShadowValue:()=>bo,runThroughMedia:()=>Jl,setAdaptiveSchemeVar:()=>Ir,setColor:()=>Pr,setFont:()=>ca,setFontFamily:()=>wn,setGradient:()=>xn,setMediaTheme:()=>aa,setSVG:()=>Sn,setShadow:()=>Dr,setSvgIcon:()=>_o,setTheme:()=>ia,splitSpacedValue:()=>ra});R();var Gl={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},ge=new Set,SA=new Set(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"]),_x=new Set,kA=t=>{if(!t)return!1;let{color:e,gradient:r}=t;return!!(S(e)&&Object.keys(e).length||S(r)&&Object.keys(r).length)},xx=new Set,vA=(t,e)=>{if(!w(t)||t.indexOf(" ")===-1)return null;let r=t.replace(/\s+/g,""),o=Nt(r);if(!o||o.passthrough||o.cssVar)return null;let{color:n,gradient:s}=e;return!n[o.name]&&!s[o.name]?null:r},Sg=(t,e,r)=>{let o=vA(t,r);if(o){if(!xx.has(t)){xx.add(t);let s=r&&r.name?` (design system \`${r.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` has a space before its alpha/tone modifier${s} \u2014 did you mean \`${o}\`? The space form never resolves, so the atomic class it mints carries no CSS value and paints invisibly. Dropped rather than shipped invisible.`)}return}let n=w(e)?e.toLowerCase():"";if(!SA.has(n)||!kA(r))return t;if(!_x.has(n)){_x.add(n);let s=r&&r.name?` (design system \`${r.name}\`)`:"";console.warn(`[scratch] color \`${t}\` is a CSS named colour that is not in the palette${s}. Dropped rather than emitted as a raw browser colour, which renders theme-blind and can be unreadable ("looks designed", so it ships unnoticed). Define it in designSystem/color.js or use a palette token.`)}},et=(t,e,r)=>{let o=r||C();if(!w(t)){o.verbose&&console.warn(t,"- type for color is not valid");return}if(mt(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let n,s,i;if(T(t))[n,s,i]=t;else{let u=Nt(t);if(!u){let{color:d,gradient:h}=o,g=h[t]||d[t];return g?(e&&g[e]&&(g=g[e]),o.useVariable?`var(${g.var})`:g.value):Sg(t,t,o)}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;n=u.name,s=u.alpha,i=u.tone}let{color:a,gradient:c}=o,l=a[n]||c[n];if(!l)return Sg(t,n,o);if(e)if(l[e]!==void 0)l=l[e];else if(T(l)){let u=e.charCodeAt(0)===64?e.slice(1):e;u==="dark"?l=l[1]!==void 0?l[1]:l[0]:(u!=="light"&&o.verbose&&console.warn(t," - array-form color tokens only support light/dark; falling back to the light slot for scheme",e),l=l[0])}else o.verbose&&console.warn(t," - does not have ",e);if(w(l)){if(ge.has(n))return l;ge.add(n);try{return et(l,null,r)}finally{ge.delete(n)}}let f=l.rgb;if(!f){let u=o.useVariable?`var(${l.var})`:l.value;if((s||i)&&u){let d=s!==void 0?s:1;if(!i)return`rgb(from ${u} r g b / ${d})`;if(i.charCodeAt(0)===43||i.charCodeAt(0)===45){let g=parseFloat(i),p=g<0?"-":"+",m=Math.abs(g);return`rgb(from ${u} calc(r ${p} ${m}) calc(g ${p} ${m}) calc(b ${p} ${m}) / ${d})`}return`hsl(from ${u} h s ${i}% / ${d})`}return u}return i&&!l[i]&&(f=ze(f,i),l[i]={rgb:f,var:`${l.var}-${i}`}),l[i]&&(f=l[i].rgb),s?`rgba(${f}, ${s})`:i?`rgba(${f}, 1)`:o.useVariable?`var(${l.var})`:`rgb(${f})`},wx=t=>{let e=de(t);return!e||e.length<3||e[0]===0&&e[1]===0&&e[2]===0&&e[3]===0&&t.toLowerCase()!=="transparent"?null:{rgb:[e[0],e[1],e[2]],alpha:e[3]!==void 0?e[3]:1}},CA=(t,e)=>{if(!e)return t;let r=t.rgb;if(e.tone){let n=ze(r,e.tone);r=w(n)?n.split(",").map(s=>parseFloat(s.trim())):n}let o=e.alpha!==void 0?parseFloat(e.alpha):t.alpha;return{rgb:r,alpha:o}},yo=(t,e,r)=>{let o=e||C();if(!w(t))return null;let n=Nt(t);if(n){if(n.passthrough){let d=de(n.passthrough);return d&&d.length>=3?{rgb:[d[0],d[1],d[2]],alpha:d[3]!==void 0?d[3]:1}:null}if(n.cssVar)return null}let s=n?n.name:t,{color:i,gradient:a}=o,c=i[s]||a[s];if(!c)return wx(t);if(w(c)){let d;if(ge.has(s))d=wx(c);else{ge.add(s);try{d=yo(c,o,r)}finally{ge.delete(s)}}return d?CA(d,n):null}if(c.rgb===void 0&&S(c)){let d=`@${r||"light"}`;c=c[d]!==void 0?c[d]:c["@light"]}if(!c||c.rgb===void 0)return null;let l=c.rgb;n&&n.tone&&(l=ze(l,n.tone));let f=w(l)?l.split(",").map(d=>parseFloat(d.trim())):l,u=n&&n.alpha!==void 0?parseFloat(n.alpha):c.alpha!==void 0?c.alpha:1;return{rgb:f,alpha:u}},It=(t,e,r)=>{let o=r||C();if(e||(e=o.globalTheme==="auto"?null:o.globalTheme),!w(t)){o.verbose&&console.warn(t,"- type for color is not valid");return}if(mt(t))return`var(${t})`;let n,s,i;if(T(t))n=t[0];else{let u=Nt(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;n=u.name,s=u.alpha,i=u.tone}else n=t}let{color:a,gradient:c}=o,l=a[n]||c[n],f=S(l);if(f&&l.value)return et(t,`@${e}`,r);if(f){if(o.useVariable&&l.var)return s||i?et(t,null,r):`var(${l.var})`;if(e)return et(t,`@${e}`,r);{let u={},d=o.scopeSelector||":root",h=d===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${d}:not([data-theme])`;for(let g in l){if(g.charCodeAt(0)!==64)continue;let p=g.slice(1),m=et(t,g,r);if(m!==void 0&&(u[`[data-theme="${p}"] &`]=m,p==="light"||p==="dark")){let b=o.media&&o.media[p]||Gl[p];if(!b)continue;let _="@media "+(b==="print"?`${b}`:`screen and ${b}`);u[_]={[`${h} &`]:m}}}return u}}else return Sg(t,n,o)},Ir=(t,e,r,o)=>{let s=`--${o.varPrefix?o.varPrefix+"-":""}${e}-${r}`,i,a={};for(let c in t){if(c.charCodeAt(0)!==64)continue;let l=c.slice(1),f=t[c],u=f&&(f.value||f);!u||typeof u!="string"||(a[l]=u,(l==="light"||i===void 0)&&(i=u))}if(i!==void 0){o.cssVars[s]=i,o.cssMediaVars||(o.cssMediaVars={});for(let c in a){let l=`[data-theme="${c}"]`;if(o.cssMediaVars[l]||(o.cssMediaVars[l]={}),o.cssMediaVars[l][s]=a[c],c==="light"||c==="dark"){let f=`@media (prefers-color-scheme: ${c})`;o.cssMediaVars[f]||(o.cssMediaVars[f]={}),o.cssMediaVars[f][s]=a[c]}}return t.var=s,s}},Pr=(t,e,r)=>{let o=C();if(S(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0))return o.useVariable&&t.var&&(o.cssVars[t.var]=t.value),t;if(w(t)&&mt(t)){let p=t.slice(2);if(t=et(p),!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let m=p.split(" "),b=o.color[m[0]];if(b&&!b.value&&!b.rgb&&(w(b)||T(b)||S(b))&&!ge.has(m[0])){ge.add(m[0]);try{o.color[m[0]]=Pr(b,m[0])}finally{ge.delete(m[0])}b=o.color[m[0]]}if(b&&b.value){let _=b.rgb,y=m[1]!==void 0?m[1]:"1",x=m[2];x&&(_=ze(_,x)),t=`rgba(${_}, ${y})`}else{let _=m[2],y=m[1]!==void 0?m[1]:"1";if(_)try{let x=de(m[0]);x&&x.length>=3?t=`rgba(${ze(x.slice(0,3).join(", "),_)}, ${y})`:t=m[0]}catch{t=m[0]}else t=m[0]}}}if(T(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),S(t)){let p={};for(let m in t)m!=="var"&&(p[m]=Pr(t[m],e,m.slice(0,1)==="@"?m.slice(1):m));return o.useVariable&&Ir(p,"color",e,o),p}let s=`--${o.varPrefix?o.varPrefix+"-":""}color-${e}`+(r?`-${r}`:""),i=t.value||t;if(w(i)&&!i.includes("(")&&!i.startsWith("#")){let p=Nt(i);if(p&&p.name&&!p.passthrough&&!p.cssVar){let m=o.color[p.name];if(m&&!m.value&&!m.rgb&&(w(m)||T(m)||S(m))&&!ge.has(p.name)){ge.add(p.name);try{o.color[p.name]=Pr(m,p.name)}finally{ge.delete(p.name)}}let b=o.color[p.name];if(b&&b.rgb){let _=b.rgb;p.tone&&(_=ze(_,p.tone));let y=p.alpha!==void 0?parseFloat(p.alpha):b.alpha!==void 0?b.alpha:1;i=`rgba(${_}, ${y})`}}}let a=de(i),[c,l,f,u=1]=a,d=parseFloat(u.toFixed(2)),h=`${c}, ${l}, ${f}`,g=`rgba(${h}, ${d})`;return o.useVariable&&(o.cssVars[s]=g),{var:s,rgb:h,alpha:d,value:g}},xn=(t,e,r)=>{let o=C();if(S(t)&&t.value!==void 0&&t.var!==void 0)return o.useVariable&&(o.cssVars[t.var]=t.value),t;if(w(t)&&mt(t)&&(t=et(t.slice(2))),T(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),S(t)){let i={};for(let a in t)a!=="var"&&(i[a]=xn(t[a],e,a.slice(0,1)==="@"?a.slice(1):a));return o.useVariable&&Ir(i,"gradient",e,o),i}let s=`--${o.varPrefix?o.varPrefix+"-":""}gradient-${e}`+(r?`-${r}`:"");return o.useVariable&&(o.cssVars[s]=t.value||t),{var:s,value:t.value||t}};R();var Yl=(t,e,r={},o)=>{let n=o||C(),{min:s=4.5,large:i=!1,scheme:a,meta:c=!1,maxIterations:l=15}=r,f=i?3:s,u=a||(n.globalTheme&&n.globalTheme!=="auto"?n.globalTheme:"light"),d=w(e)?e:String(e),h=Nt(t),g=h&&!h.passthrough&&!h.cssVar?h.name:null,p=(Y,j)=>c?{value:Y,...j}:Y;if(g){let Y=n.color[`${g}Safe`];if(Y){let j=`${d}@${u}`,pt=Y[j]!==void 0?Y[j]:Y[d];if(pt!==void 0){let Et=pt&&pt.rgb!==void 0?n.useVariable&&pt.var?`var(${pt.var})`:pt.value:et(pt,null,n);return p(Et,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=et(t,u?`@${u}`:null,n),b=yo(t,n,u),_=yo(e,n,u);if(!b||!_)return n.verbose&&console.warn("getSafeInk: could not resolve",t,e,"\u2014 returning hue unchanged"),p(m,{ratio:null,deviation:0,derived:!1,overridden:!1,unresolved:!0});let y=po(_.rgb,_.alpha),x=po(b.rgb,b.alpha,y),k=pn(x,y);if(k>=f-.02)return p(m,{ratio:k,deviation:0,derived:!1,overridden:!1});let[E,O,$]=Fi(b.rgb),[,D,I]=Ni([E,O,$]),H=uo(y)>.5,V=H?E:1-E,rt=Y=>{let j=H?E-Y:E+Y,pt=Math.max(0,Math.min(1,j));return{rgb:ji(pt,D,I),L:pt}},at=Y=>{let{rgb:j}=rt(Y),pt=po(j.map(Et=>Math.round(Et)),b.alpha,y);return pn(pt,y)},G=0,K=V,lt=at(K)>=f;if(lt)for(let Y=0;Y<l;Y++){let j=(G+K)/2;at(j)>=f?K=j:G=j}else G=K;let{rgb:Vt,L:W}=rt(K),wt=Vt.map(Y=>Math.round(Y)),L=at(K),ot=b.alpha<1?`rgba(${wt.join(", ")}, ${b.alpha})`:`rgb(${wt.join(", ")})`,U=Math.abs(W-E)*100;return p(ot,{rgb:wt,ratio:L,startRatio:k,deviation:U,derived:!0,overridden:!1,reachable:lt})},kg=(t,e,r={},o)=>Yl(t,e,{...r,meta:!0},o);R();R();var EA=t=>{let r=C().spacing||{},o=parseFloat(t.spacingRatio),n={...r,ratio:Number.isFinite(o)?o:r.ratio,sequence:{},scales:{}};return Yt(n),n},AA=t=>{for(let e in t){let r=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:n,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;gt(r,{type:n,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),Yt(r),Or(t,e)}},ta=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),o=e.includes("border")||e.includes("outline");return r&&!o},ea=()=>{let t=C(),{spacing:e}=t;Yt(e),ir(e),AA(e)},TA=t=>{let e=C(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:Yt(t)},St=(t,e="padding",r,o)=>{let n=TA(r);if(w(t)){if(!o&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!o&&t.includes("(")){let i=sr(t);o=i[0],t=i[1]}}let s=o?[t]:fo(t);if(T(s)){if(s.length>1){let i="";e==="borderWidth"&&(e="border",i="Width");let a={2:["Block","Inline"],3:["BlockStart","Inline","BlockEnd"],4:["BlockStart","InlineEnd","BlockEnd","InlineStart"]},c=(l,f)=>We(s[f],e+l+i,n,o);return a[s.length].map((l,f)=>c(l,f))}return We(t,e,n,o)}},Te=(t,e,r,o)=>{let n=C(),{spacing:s}=n,i=r||t[e];if(!o&&w(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!o&&w(i)&&i.includes("(")){let a=sr(i);o=a[0],i=a[1]}if(t.spacingRatio){let a=EA(t);return St(i,e,a,o)}return St(i,e,s,o)},ra=t=>{let e=r=>{let o=["+","-","*","/"].includes(r),n=Uo.some(i=>t.includes(i));return o||n?r:r.length<3&&/[A-Z]/.test(r)?r+"_default":r};return t.split(",").map(r=>r.trim()).map(e).join(",").split(" ").map(e).join(" ")};R();var bo=(t,e,r)=>!w(t)||te.test(t)?t:or(t).map(o=>(o=o.trim(),o.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(n.startsWith("--"))return`var(${n})`;let s=et(n,e);if(Ae(s))return s;if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em"||n==="inset"||n==="none")return n;r&&r(n);let i=St(n,"shadow");return i&&i.shadow?i.shadow:n}).join(" "))).join(", "),Dr=(t,e,r,o)=>{let n=C();if(T(t)){let a={"@light":Dr(t[0],e,"light"),"@dark":Dr(t[1],e,"dark")};return n.useVariable&&Ir(a,"shadow",e,n),a}if(S(t)){let a={};for(let c in t)a[c]=Dr(t[c],e,c.startsWith("@")?c.slice(1):c);return n.useVariable&&Ir(a,"shadow",e,n),a}w(t)&&!te.test(t)&&(t=bo(t));let i=`--${n.varPrefix?n.varPrefix+"-":""}shadow-${e}`+(r?`-${r}`:"");return n.useVariable&&(n.cssVars[i]=t),{var:i,value:t}},oa=(t,e)=>{let r=C();if(e||(e=r.globalTheme==="auto"?null:r.globalTheme),!w(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(mt(t))return`var(${t})`;let[o]=T(t)?t:t.split(" "),s=r.shadow[o],i=S(s);if(!s)return r.verbose&&console.warn("Can't find color ",o),t;if(e){let a=s["@"+e]||s[e];if(a)return a.value!==void 0?a.value:a;r.verbose&&console.warn(t," - does not have ",e)}if(i&&s.value)return s.value;if(i){let a={};for(let c in s){if(c.charCodeAt(0)!==64)continue;let l=r.media[c.slice(1)];if(!l)continue;let f="@media "+(l==="print"?`${l}`:`screen and ${l}`),u=s[c],d=u&&(u.value!==void 0?u.value:u);d!==void 0&&(a[f]=d)}return a}return r.verbose&&console.warn("Can't find color",t),t};var OA=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),RA=t=>OA.has(t),re=(t,e,r)=>{if(t==null)return;let o=t+"";if(te.test(o))return o;let n=o.trim();return n==="none"||n==="0"||n==="initial"||n==="inherit"||n==="unset"?o:o.split(/\s+/).map(s=>{if(s=s.trim(),!s)return"";if(mt(s))return`var(${s})`;if(RA(s)||/^\d/.test(s)||s==="0")return s;let i=et(s,e);if(Ae(i))return i;r&&r(s);let a=St(s,"border");return a&&a.border?a.border:s}).join(" ")};R();var PA=new Set(["black","white","red","green","blue","yellow","orange","purple","pink","brown","gray","grey","cyan","magenta","lime","olive","navy","teal","aqua","maroon","silver","fuchsia","transparent","currentColor","currentcolor","inherit","initial","unset","none","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","rebeccapurple"]),Sx=["color","Color","background","Background","fill","Fill","stroke","Stroke"],IA=t=>{for(let e=0;e<Sx.length;e++)if(t.includes(Sx[e]))return!0;return!1},DA={boxShadow:bo,textShadow:bo,border:re,borderTop:re,borderRight:re,borderBottom:re,borderLeft:re,outline:re,columnRule:re},$A=t=>{if(!t)return!1;let e=Nt(t);return!e||!e.name||e.passthrough||e.cssVar?!1:e.alpha!==void 0||e.tone!==void 0},kx=new Set,LA=(t,e,r,o,n,s)=>{if(!Pt())return;let i=`${t}::${e}::${r||""}::${o}`;kx.has(i)||(kx.add(i),console.warn(`[smbls/scratch] theme param "${e}" on "${t}"`+(r?` (${r})`:"")+` did not fully resolve: "${o}" -> "${n}" still contains the unresolved token "${s}". This is not valid CSS \u2014 the browser will drop the whole declaration. Register "${s}" as a design-system color token or fix the typo.`))},Cx=(t,e,r,o)=>{let n=DA[e];if(!n)return et(r,o);let s=null,i=n(r,o,a=>{!s&&$A(a)&&(s=a)});return s&&LA(t,e,o,r,i,s),i},Xl=t=>{let e={},{state:r,media:o,helpers:n,...s}=t;return Object.keys(s).map(a=>{let l=["color","Color","background","border"].some(f=>a.includes(f));return e[a]=l?et(t[a]):t[a]}),e},na=t=>(t.value||(t.value=Xl(t)),t.value),sa=(t,e)=>{let r=C();if(r.useVariable)return me(t,e);let o=r.theme;if(w(t)){let[n,s]=t.split(" "),i=o[n];if(i){if(!s&&!e)return na(i);t=[n,s||e]}}if(z(t)&&t[1]){let n=t[0],s=t[1],{helpers:i,media:a,state:c}=o[n];if(a&&a[s])return na(a[s]);if(i&&i[s])return na(i[s]);if(c&&c[s])return na(c[s])}else if(S(t))return Xl(t)},MA=(t,e,r)=>{if(S(e))t.variants.inverse.value=Xl(e);else if(e===!0){let{color:o,background:n}=r;t.variants.inverse={value:{color:n,background:o}}}},FA=(t,e,r,o)=>{let n=sa(r);o[`&:${e}`]=n,S(r)&&!r.value&&(r.value=n)},NA=(t,e)=>{let{state:r}=t;return r?(Object.keys(r).map(n=>{let s=r[n];return FA(t,n,s,e),t}),t):void 0},jA=(t,e,r,o)=>{let n=sa(r);o[`@media (prefers-color-scheme: ${e})`]=n,S(r)&&!r.value&&(r.value=n)},BA=(t,e)=>{let{media:r}=t;return r?(Object.keys(r).map(n=>{let s=r[n];return(n==="dark"||n==="light")&&jA(t,n,s,e),n==="inverse"&&MA(t,s,e),t}),t):void 0},UA=(t,e)=>{let r=C(),{helpers:o}=t;return o?(Object.keys(o).map(s=>{let i=o[s];return w(i)?o[s]=r.theme[i]:na(o[s]),t}),t):void 0},ia=(t,e)=>{let r=C();if(r.useVariable)return aa(t,e);let{state:o,media:n,helpers:s}=t,i=Xl(t,e),c=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}`;return NA(t,i),BA(t,i),UA(t,i),{var:c,value:i,state:o,media:n,helpers:s}};var vg=(t,e,r)=>{let{cssVars:o}=r;r.cssMediaVars||(r.cssMediaVars={});let n=r.cssMediaVars,s=r.globalTheme!==void 0?r.globalTheme:"auto",i={},a=new Set;for(let l in t)if(t[l])for(let f of Object.keys(t[l]))a.add(f);let c=new Set;for(let l of a){let f=l.slice(0,1);if(!(f==="@"||f==="."||f===":")&&IA(l))for(let u in t){if(c.has(u))continue;let d=t[u]?.[l];if(d===void 0)continue;let h=et(d,`@${u}`);h!==void 0&&w(h)&&/^[a-z][a-zA-Z]+$/.test(h)&&!PA.has(h)&&c.add(u)}}for(let l of a){let f=l.slice(0,1),u=Object.values(t).some(d=>z(d?.[l]));if(f==="."&&u){let d=l.slice(1),h={};for(let g in t)z(t[g]?.[l])&&(h[g]=t[g][l]);i[l]=vg(h,`${e}-${d}`,r)}else if(f===":"&&u){let d=l.replace(/^:+/,""),h={};for(let g in t)z(t[g]?.[l])&&(h[g]=t[g][l]);i[l]=vg(h,`${e}-${d}`,r)}else if(f!=="@"&&f!=="."&&f!==":"){let h=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}-${l}`,g=s&&s!=="auto"?String(s).replace(/^'|'$/g,""):null,p;for(let m in t){if(c.has(m))continue;let b=t[m]?.[l];if(b===void 0)continue;let _=Cx(e,l,b,`@${m}`);if(_===void 0)continue;(g&&m===g||!g&&(m==="light"||p===void 0))&&(p=_);let y=`[data-theme="${m}"]`;if(n[y]||(n[y]={}),n[y][h]=_,m==="dark"||m==="light"){let x=`@media (prefers-color-scheme: ${m})`;n[x]||(n[x]={}),n[x][h]=_}}p!==void 0&&(o[h]=p),i[l]=`var(${h})`,i[`.${l}`]={[l]:i[l]}}}return(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color}),i},aa=(t,e,r,o)=>{let n=C(),{cssVars:s}=n,i={value:t},a=!r&&!o;if(z(t)){if(a&&n.useVariable){let c={};for(let l in t)l.startsWith("@")&&z(t[l])&&(c[l.slice(1)]=t[l]);if(Object.keys(c).length){let l=vg(c,e,n);Object.assign(i,l)}}for(let c in t){let l=c.slice(0,1),f=t[c];if(l==="@"||l===":"||l==="."){let u=l==="@"&&c;i[c]=aa(f,e,c,o||u)}else if(!a){let u=Cx(e,c,f,o),d=[...new Set([o,r].filter(m=>m).map(m=>m.slice(1)))],h=d.length?"-"+d.join("-"):"",p=`--${n.varPrefix?n.varPrefix+"-":""}theme-${e}${h}-${c}`;n.useVariable?(n.useThemeSuffixedVars&&(s[p]=u),i[c]=`var(${p})`):i[c]=u,i[`.${c}`]={[c]:i[c]}}}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(w(t)&&mt(t)){let l=n.theme[t.slice(2)];return me(l,o)}return i},Cg=t=>{let e=C(),r={};for(let o in t){let n=o.slice(0,1);if(z(t[o])){if(n==="@")continue;n===":"?r[`&${o}`]=Cg(t[o]):n==="."&&(r[`&${o}`]=Cg(t[o]))}else r[o]=t[o]}return r},Ex=(t,e)=>{let r=e.shift();return t[r]?Ex(t[r],e):t},vx=(t,e)=>T(e)?Ex(t,e):w(e)&&t[e]?t[e]:t;var me=(t,e)=>{let r=C();if(w(t)&&mt(t)&&(t=me(t.slice(2))),!t||!w(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[o,...n]=T(t)?t:t.split(" "),s=r.theme[o];return s&&n.length?s=vx(s,n):s&&e&&(s=vx(s,e)),Cg(s)};R();R();var ca=(t,e)=>{let r=C(),o=`--font-${e}`;if(!t||T(t)&&!t[0])return;let n;if(t.isVariable){let s=pe(t.url,r.files)||t.url;hn(s)?n=gn(s):n=Tr(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap"})}else if(t[0])n=go(e,t,r.files);else{let s=Array.isArray(t.url)?t.url.map(i=>pe(i,r.files)||i):pe(t.url,r.files)||t.url;n=Tr(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch})}return{var:o,value:t,fontFace:n}},la=(t,e)=>{let r=C(),{fontFamily:o}=r;return ho(e||o,t)},wn=(t,e)=>{let r=C(),{fontFamily:o,fontFamilyTypes:n}=r,{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!o.default)&&(o.default=e),S(s)&&(s=fo(s));let a=`--font-family-${e}`,c=`${s.join(", ")}, ${n[i]}`;return{var:a,value:c,arr:s,type:i,isSystemFallback:!!t.isSystemFallback}};R();var Jl=t=>{let e=C(),{typography:r,media:o}=e;for(let n in t){let s=n.slice(0,1)==="@",i=t[n];if(!s)continue;let{mediaRegenerate:a}=t,c=n.slice(1),{type:l,base:f,ratio:u,range:d,subSequence:h,h1Matches:g,unit:p}=t;gt(i,{type:l,base:f,ratio:u,range:d,subSequence:h,h1Matches:g,unit:p});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),b=i.unit||p,_=!i.unit&&m.has(p)?"rem":b,y=o[c],x="@media "+(y==="print"?`${y}`:`screen and ${y}`);if(r.templates[x]={fontSize:i.base/r.browserDefault+_},!a){gt(i,{sequence:{},scales:{},vars:{}}),Yt(i),Or(t,n);continue}gt(i,{sequence:{},scales:{},templates:{},vars:{}}),Yt(i),Or(t,n)}},Zl=t=>{let e=C();if(t.h1Matches){let r=t.unit,o=Ji(t),{templates:n}=t;for(let s in o){let i=`h${parseInt(s)+1}`,a=n[i];n[i]={fontSize:e.useVariable?`var(${o[s]?.variable})`:`${o[s]?.scaling}${r}`,margin:a?a.margin:0,lineHeight:a?a.lineHeight:t.lineHeight,letterSpacing:a?a.letterSpacing:t.letterSpacing,fontWeight:a?a.fontWeight:900-s*100}}}},fa=()=>{let t=C(),{typography:e}=t;Yt(e),Zl(e),ir(e),Jl(e)},ua=t=>{let e=C(),{typography:r}=e;return We(t,"fontSize",r)};R();var da=t=>{if(!w(t))return;let r=C().shape;if(r)return r[t]!==void 0?r[t]:r[t.toLowerCase()]};R();var pa=()=>{let t=C(),{timing:e}=t;Yt(e),ir(e)},ye=t=>{let e=C(),{timing:r}=e;return r[t]||r[Di(t)]||t},oe=(t,e="timing")=>{let r=C(),{timing:o}=r;return We(t,e,o)};R();var ha=()=>{let t=C(),{fontFamily:e,theme:r,typography:o}=t,n=t.document;return Ze(n)?(br(t,"document",n),n=t.document={}):n||(n=t.document={}),gt(n,{theme:r.document,fontFamily:ho(e),fontSize:o.base,lineHeight:o.lineHeight})};R();var Ag={document:Q},Sn=(t,e)=>{let r=C();if(!t){r.verbose&&console.warn("setSVG: val is not defined",e);return}return r.useSvgSprite?Qi(e,t):t},ga=(t,e=Ag)=>{let r=C(),o=Object.keys(t).length?{}:r.svg;for(let n in t)o[n]=t[n];Tx(o,e)},_o=(t,e)=>{let r=C();return r.useIconSprite&&!r.semanticIcons?.[e]?Sn(t,e):t},xo=(t,e=Ag)=>{let r=C(),o=Object.keys(t).length?{}:r.icons;for(let n in t)o[n]=t[n];Tx(o,e)},Eg=(t,e={isRoot:!0})=>{if(!t||!t.createElementNS)return;let r=t.createElementNS("http://www.w3.org/2000/svg","svg");return e.isRoot&&(r.setAttribute("aria-hidden","true"),r.setAttribute("width","0"),r.setAttribute("height","0"),r.setAttribute("style","position:absolute"),r.setAttribute("id","svgSprite")),r},VA=(t,e)=>{let r=typeof DOMParser<"u"?DOMParser:null;if(r){let o=`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,s=new r().parseFromString(o,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},Ax=(t,e,r)=>{for(;e.firstChild;){let o=e.firstChild;r.appendChild(t.importNode(o,!0)),o.remove()}},Tx=(t,e=Ag)=>{let r=C(),o=e.document||Q;if(!o||!o.documentElement)return r.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),_n(t);let n=o.querySelector("#svgSprite"),s=_n(t),i=`<svg aria-hidden="true" width="0" height="0" style="position:absolute" id="svgSprite">${s}</svg>`,a=VA(o,s);if(n)if(a)Ax(o,a,n);else if(o.body.insertAdjacentHTML)n.insertAdjacentHTML("beforeend",s);else{let c=Eg(o,{isRoot:!1});c.innerHTML=s,n.append(...c.children)}else if(a){let c=Eg(o);c&&c.nodeType&&(Ax(o,a,c),o.body.prepend(c))}else if(o.body.insertAdjacentHTML)o.body.insertAdjacentHTML("afterbegin",i);else{let c=Eg(o);c&&c.nodeType&&(c.innerHTML=s,o.body.prepend(c))}};R();var ma=(t={})=>{let e=C(),r=e.typography||{},o=e.document||{},n=S(e.reset)?e.reset:e.reset={};if(n[":root"]){let c=n,l=r.templates||{};c.body={...e.useDocumentTheme?me("document"):{},...l.body},c.h1=l.h1,c.h2=l.h2,c.h3=l.h3,c.h4=l.h4,c.h5=l.h5,c.h6=l.h6}let{body:s,...i}=r.templates||{},a=e.useDocumentTheme?me("document"):{};if(n.html&&qt(n.html,a),r.unit){let c=e.media||{};for(let l in r){if(l.charAt(0)!=="@")continue;let f=r[l];if(!f||f.unit===r.unit||!f.unit)continue;let u=f.unit,d=f.base||r.base,h=f.browserDefault||r.browserDefault,g=l.slice(1),p=c[g];if(!p)continue;let m="@media "+(p==="print"?p:"screen and "+p);n[m]||(n[m]={}),n[m].html||(n[m].html={}),n[m].html.fontSize=d/h+u}}return st(gt(n,t),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",...a,fontSize:r.unit?r.base/r.browserDefault+r.unit:r.browserDefault+"px",fontFamily:o.fontFamily,lineHeight:o.lineHeight},body:{boxSizing:"border-box",height:"100%",margin:0,fontFamily:o.fontFamily,fontSize:r.unit?"1"+e.unit.default:r.base/r.browserDefault+e.unit.default,...i,...s},a:{color:"currentColor"},button:{color:"inherit",font:"inherit",background:"transparent",border:"none",cursor:"pointer",appearance:"none",WebkitAppearance:"none"},"input, select, textarea":{color:"inherit",font:"inherit"},fieldset:{border:0,padding:0,margin:0}},ee)};R();var zA=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),qe=t=>re(t),Ql=t=>te.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(mt(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=et(e);return Ae(r)?r:e}).join(" "),tf=(t,e)=>oa(t,e),ya=(t,e)=>te.test(t)?t:or(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(mt(o))return`var(${o})`;if(o==="inset"||o==="none")return o;let n=et(o);if(Ae(n)){let i=It(o,e);return S(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(o)||o==="0"||o.includes("px")||o.slice(-2)==="em")return o;let s=St(o,"shadow");return s&&s.shadow?s.shadow:o}).join(" "):"")).join(", "),ba=(t,e)=>{let r=t.indexOf("(");if(r===-1)return t;let o=t.slice(0,r+1),n=t.slice(r+1,t.lastIndexOf(")")),s=")",a=or(n).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||zA.has(f)||f==="transparent"||te.test(f))return f;let u=et(f);return Ae(u)?u:f}).join(" ")));return o+a.join(", ")+s},ef=(t,e)=>{let r=C();return or(t).map(o=>{let n=o.trim();if(mt(n))return`var(${n})`;if(/^var\(/.test(n)||n.includes("url"))return n;if(r.gradient?.[n]){let s=It(n,e);if(w(s))return s;if(S(s)){for(let i in s)if(w(s[i]))return s[i]}return n}return n.includes("gradient")?ba(n,e):n.includes("/")||n.startsWith("http")||n.includes(".")&&!Nt(n)?`url(${n})`:n}).join(", ")},rf=t=>w(t)&&t.split(" ").map(e=>St(e,"gap").gap).join(" "),Tg=t=>{let e=t.split(" ");return e.length?e.map(r=>mt(r)?`var(${r})`:r.length<3||r.includes("ms")?oe(r).timing||r:ye(r)?ye(r):r).join(" "):t},_a=(t,e,r)=>{if(w(t))return t.split(",").map(o=>oe(o).timing||o).join(",")},of=t=>{let e=t.split(",");if(e.length)return e.map(Tg).join(",")};function _t(t,e,r={},o={}){let n=ut.call(this,e||r[t]);if(n==null)return;let s;if(w(n)){if(/^(?:env|var)\(/.test(n.trim()))return{[t]:n};if(n.includes("(")){let c=sr(n);s=c[0],n=c[1]}let i=r.scaleBoxSize,a=ta(t);!i&&a&&!o.ratio&&(n=ra(n))}return o.ratio?Te(r,t,n,s):St(n,t,void 0,s)}var N=(t,e=null,r)=>_t(t,e,r,{ratio:!0}),ar=(t,e,r,o="borderRadius")=>{if(w(t))return{[o]:t.split(" ").map(n=>{let s=da(n);return s!==void 0?s:Te(e,r,n)[r]}).join(" ")}};R();var vn="__smblsThemeRootOwner",Cn=t=>{let e=t&&t.__prefersListener,r=t&&t.__prefersMq;if(e&&r)try{typeof r.removeEventListener=="function"?r.removeEventListener("change",e):typeof r.removeListener=="function"&&r.removeListener(e)}catch{try{r.removeListener(e)}catch{}}t&&(t.__prefersListener=null,t.__prefersMq=null)},Ox=(t,e,r)=>{if(!(!t||!e)){Cn(t),t.__prefersListener=r,t.__prefersMq=e;try{e.addEventListener("change",r)}catch{e.addListener(r)}}},HA=(t,e)=>{let r=C(),{cssVars:o}=r,n=e.startsWith("--")?e:`--${e}`;return o[n]=t,t},Xt=t=>t,nf={color:Pr,gradient:xn,font:ca,fontFamily:wn,fontfamily:wn,theme:ia,icons:_o,semanticIcons:Xt,semanticicons:Xt,svg:Sn,svgData:Xt,typography:Xt,shadow:Dr,spacing:Xt,media:Xt,grid:Xt,class:Xt,timing:Xt,reset:Xt,unit:Xt,animation:Xt,vars:HA,sizes:Xt,shape:Xt},WA=(t,e,r,o)=>{br(t,r,e);let n={};for(let s of o)t[s]===e&&(t[s]=n);return t.verbose&&console.warn("[scratch] design-system family",r,"resolved to a host object; parked it and allocated a plain bucket"),n},Og=(t,e,r)=>{let o=C(),n=Hi(t),s=n.toLowerCase(),i=o[n]||o[s]||o[t],a=Ze(i)?WA(o,i,s,[n,s,t]):i,c=nf[n]||nf[s];if(c)try{let l=c(e,r);return a&&(a[r]=l),a}catch(l){o.verbose&&console.warn("Error setting",s,"value",e,r,l)}if(!c){let l=a||(o[s]={});return l[r]=e,l}o.verbose&&console.warn("Can not find",s,"method in scratch")},Rg=(t,e)=>{let r=C(),o=t.toLowerCase();return Ze(e)?(br(r,o,e),r.verbose&&console.warn("[scratch] ignoring host object passed as the",o,"design-system family"),r[o]||r[t]):e==null?(r.verbose&&console.warn("[scratch] skipping empty design-system family",o),r[o]||r[t]):(Object.keys(e).sort((s,i)=>{let a=S(e[s])||T(e[s])?1:0,c=S(e[i])||T(e[i])?1:0;return a-c}).forEach(s=>{try{return Og(o,e[s],s)}catch(i){r.verbose&&console.warn("Error setting",o,"value",e[s],s,i)}}),r[o]||r[t])},sf=(t,e)=>{let r=e||C();r.globalTheme=t;let n=Bo(r)||(typeof document<"u"?document:null),s=n&&n.defaultView||(typeof window<"u"?window:null);if(n){let a=r.themeRoot||n.documentElement,c=t&&t!=="auto";if(a[vn]=r,c)Cn(r),a.setAttribute("data-theme",t),r.resolvedTheme=t,t==="dark"||t==="light"?a.style.colorScheme=t:a.style.colorScheme="light dark";else if(s&&s.matchMedia){let l=u=>{let d=u.matches?"dark":"light";a.setAttribute("data-theme",d),r.resolvedTheme=d},f=s.matchMedia("(prefers-color-scheme: dark)");l(f),a.style.colorScheme="light dark",Ox(r,f,l)}else Cn(r),a.setAttribute("data-theme","light"),r.resolvedTheme="light",a.style.colorScheme="light"}let i=r.varPrefix?`--${r.varPrefix}-theme-`:"--theme-";for(let a in r.cssVars)a.startsWith(i)&&delete r.cssVars[a];for(let a in r.cssMediaVars)delete r.cssMediaVars[a];if(n&&r.cssVars){let a=r.scopeSelector||":root",c=n.styleSheets;for(let l=0;l<c.length;l++)try{let f=c[l].cssRules;for(let u=0;u<f.length;u++)if(f[u].selectorText===a){for(let d in r.cssVars)f[u].style.setProperty(d,r.cssVars[d]);return r}}catch{}}return r},qA={},wo=(t,e=qA)=>{let r=e.config||C(),{version:o,verbose:n,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:c,useIconSprite:l,globalTheme:f,themeRoot:u,useDocumentTheme:d,useDefaultConfig:h,semanticIcons:g,hoverMedia:p,files:m,assets:b,..._}=t;e.newConfig&&(r=Hl(e.newConfig)),Je(_.document)&&(r.__domDocument=_.document,delete _.document),Je(r.document)&&(r.__domDocument||(r.__domDocument=r.document),r.document={}),m!==void 0&&(r.files=m),b!==void 0&&(r.assets=b),n!==void 0&&(r.verbose=n),s!==void 0&&(r.useVariable=s),i!==void 0&&(r.useReset=i),c!==void 0&&(r.useFontImport=c),a!==void 0&&(r.useSvgSprite=a),l!==void 0&&(r.useIconSprite=l),d!==void 0&&(r.useDocumentTheme=d),f!==void 0&&(r.globalTheme=f),u!==void 0&&(r.themeRoot=u),t.useThemeSuffixedVars!==void 0&&(r.useThemeSuffixedVars=t.useThemeSuffixedVars),h!==void 0&&(r.useDefaultConfig=h),g!==void 0&&(r.semanticIcons=g),p!==void 0&&(r.hoverMedia=p),r.verbose&&console.log(r);let x=Bo(r)||(typeof document<"u"?document:null),k=x&&x.defaultView||(typeof window<"u"?window:null),E=x&&(r.themeRoot||x.documentElement);if(E&&typeof E.setAttribute=="function")if(r.globalTheme&&r.globalTheme!=="auto")Cn(r),E.setAttribute("data-theme",r.globalTheme),r.resolvedTheme=r.globalTheme,E[vn]=r,r.globalTheme==="dark"||r.globalTheme==="light"?E.style.colorScheme=r.globalTheme:E.style.colorScheme="light dark";else if(E[vn]&&E[vn]!==r&&E.hasAttribute("data-theme"))Cn(r),r.resolvedTheme=E.getAttribute("data-theme");else if(k&&k.matchMedia){let H=rt=>{let at=rt.matches?"dark":"light";E.setAttribute("data-theme",at),r.resolvedTheme=at},V=k.matchMedia("(prefers-color-scheme: dark)");H(V),E.style.colorScheme="light dark",E[vn]=r,Ox(r,V,H)}else Cn(r),E.setAttribute("data-theme","light"),r.resolvedTheme="light",E.style.colorScheme="light",E[vn]=r;r.__svgCache||(r.__svgCache={});let O=Object.keys(_).filter(I=>!I.startsWith("__")),$=new Set(O);if(O.forEach(I=>{let H=I.toLowerCase();H!==I&&$.has(H)&&st(_[H],_[I],ee)}),O.map(I=>{let H=I.toLowerCase();if(!(H!==I&&$.has(H)))return Rg(I,_[I])}),r.varPrefix&&(r.typography&&(r.typography.varPrefix=r.varPrefix),r.spacing&&(r.spacing.varPrefix=r.varPrefix),r.timing&&(r.timing.varPrefix=r.varPrefix)),_.typography)try{fa()}catch(I){r.verbose&&console.warn("Error applying typography sequence",I)}if(_.spacing)try{ea()}catch(I){r.verbose&&console.warn("Error applying spacing sequence",I)}if(_.timing)try{pa()}catch(I){r.verbose&&console.warn("Error applying timing sequence",I)}ha();let D=ma();return D&&(r.reset=D),r};var So=new Map,Fx=null,Dg=null,KA=null;function xa(t){t.batchAtomicCss&&(Dg=t.batchAtomicCss),t.compoundCssClass&&(KA=t.compoundCssClass)}var GA=new Set,Px=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function $g(t){try{let e=C();e&&(e.__domDocument=t)}catch{}t&&GA.add(t)}function uf(){try{let t=C();if(t){if(Px(t.__domDocument))return t.__domDocument;if(Px(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var Jt={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};function df(){return{...Jt}}function Lg(){for(let t in Jt)Jt[t]=0;lf=!1}var lf=!1,cf=(t,e)=>`${t} ${e}${t===1?"":"s"}`;function YA(t){let e=Date.parse(t);if(!isFinite(e))return"";let r=Math.floor((Date.now()-e)/864e5);return r<1?" (today)":` (${cf(r,"day")} ago)`}function XA(){try{let t=pf();return t&&t.cssRules?t.cssRules.length:-1}catch{return-1}}function JA(t,e){if(lf)return!1;lf=!0;let r="n/a \u2014 running from src/ (unbuilt), so no dist is in play",o="this IS the source",n="@symbo.ls/css";return console.error(`[@symbo.ls/css] CSS EMIT FAILURE (${t}) \u2014 the engine emitted ${cf(Jt.variable,"variable rule")} and ${cf(Jt.atomic,"atomic rule")}, while the design system held ${cf(e,"CSS variable")}.
39
+ src: ${i};`},Tr=(t,e,r,o)=>`@font-face {${Ui(t,e,r,o)}
40
+ }`,go=(t,e,r)=>Object.keys(e).map(n=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l}=e[n],f=Array.isArray(s)?s.map(u=>pe(u,r)||u):pe(s,r)||s;return Ui(t,f,i,{fontStyle:a,fontDisplay:c,fontStretch:l})}),Yh=t=>Object.keys(t).map(r=>go(r,t[r].value)),jl=(t,e,r)=>{if(e&&e.isVariable){let s=pe(e.url,r)||e.url;return gn(s)?mn(s):Tr(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap"})}if(e[0])return go(t,e,r).map(Nl);let n=Array.isArray(e.url)?e.url.map(s=>pe(s,r)||s):pe(e.url,r)||e.url;return Tr(t,n,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch})},Vi=(t,e)=>Object.keys(t).map(o=>jl(o,t[o].value,e));R();R();R();R();var yn={};P(yn,{animation:()=>dg,breakpoints:()=>fg,class:()=>yg,color:()=>og,devices:()=>ug,document:()=>dx,font:()=>Jh,fontFace:()=>tg,fontFamily:()=>Zh,fontFamilyTypes:()=>Qh,gradient:()=>ng,grid:()=>mg,icons:()=>ag,media:()=>eg,reset:()=>px,semanticIcons:()=>cg,sequence:()=>nr,shadow:()=>ig,shape:()=>xg,sizes:()=>_g,spacing:()=>rg,svg:()=>pg,svgData:()=>hg,templates:()=>gg,theme:()=>sg,timing:()=>lg,typography:()=>Hi,unit:()=>Xh,vars:()=>bg});var nr={"minor-second":1.067,"major-second":1.125,"minor-third":1.2,"major-third":1.25,"perfect-fourth":1.333,"augmented-fourth":1.414,"perfect-fifth":1.5,"minor-sixth":1.6,phi:1.618,"major-sixth":1.667,"square-root-3":1.732,"minor-seventh":1.778,"major-seventh":1.875,octave:2,"square-root-5":2.23,"major-tenth":2.5,"major-eleventh":2.667,"major-twelfth":3,pi:3.14,"double-octave":4};var Xh={default:"em"};var uA={browserDefault:16,base:16,type:"font-size",ratio:nr["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},Hi=uA;var Jh={};var Zh={},Qh={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},tg={};var eg={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var dA={base:Hi.base,type:"spacing",ratio:nr.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},rg=dA;var og={},ng={};var sg={};var ig={};var ag={},cg={};var pA={default:150,base:150,type:"timing",ratio:nr["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},lg=pA;var dx={};var fg={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},ug={screenXXL:[2560,1440],screenXL:[2240,1260],screenL:[1920,1024],screenM:[1680,1024],screenS:[1440,720],tabletL:[1366,926],tabletM:[1280,768],tabletS:[1024,768],mobileL:[768,375],mobileM:[560,768],mobileS:[480,768],mobileXS:[375,768]};var dg={};var pg={},hg={};var gg={};var hA={},mg=hA;var yg={};var px={},bg={},_g={},xg={};var Hl={},zl={},ee=new Set,Bl=yn,Ul={},Wi=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in Bl){let e=t.toLowerCase();Ul[e]=Bl[t];let r=Wi(e);r!==e&&(Ul[r]=Bl[t]),e!==t&&(Ul[t]=Bl[t])}var mo={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:Hl,cssMediaVars:zl,CSS_VARS:Hl,CSS_MEDIA_VARS:zl,_scratchConfig:!0,...Ul},bn=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return bt(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let r=bt(e)?e:t.globalTheme,o=_s(bt(r)?r:"auto");return Object.defineProperty(t,"globalTheme",{get(){return o.get()},set(n){o.set(n)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"__globalThemeSignal",{value:o,enumerable:!1,configurable:!0,writable:!0}),o},hx=t=>t?bn(t):null,_n=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return bt(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let r=bt(e)?e:t.resolvedTheme,o=_s(bt(r)?r:null);return Object.defineProperty(t,"resolvedTheme",{get(){return o.get()},set(n){o.set(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"__resolvedThemeSignal",{value:o,enumerable:!1,configurable:!0,writable:!0}),o},gx=t=>t?_n(t):null;bn(mo);_n(mo);var Vl=ft(mo),he={active:"0",0:mo},mx=t=>(bt(t)&&(he.active=t),he[t||he.active]),zi=[],it=t=>{t&&t._scratchConfig&&zi.push(t)},tt=()=>{zi.pop()},C=t=>zi.length?zi[zi.length-1]:he[t||he.active]||mo,Wl=t=>{if(S(t))return he.active="1",he[1]=st(t,ft(Vl),ee),bn(he[1]),_n(he[1]),t},gA=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],mA=["useVariable","globalTheme","verbose"],yA=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],bA=t=>{for(let e of yA){let r;for(let o of e){let n=t[o];S(n)&&(r=r?st(n,r,ee):n)}if(r)for(let o of e)S(t[o])&&(t[o]=r)}},qi=(t,e,{cleanBase:r=!1}={})=>{let o=r?null:C(),n=ft(!r&&o&&o._scratchConfig?o:Vl);for(let i of gA)delete n[i];for(let i of mA)Object.prototype.hasOwnProperty.call(Vl,i)?n[i]=Vl[i]:delete n[i];let s=st(e||{},n,ee);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s._scratchConfig=!0,bA(s),bn(s),_n(s),t&&(he[t]=s),s};var ze={"-6":"U","-5":"V","-4":"W","-3":"X","-2":"Y","-1":"Z",0:"A",1:"B",2:"C",3:"D",4:"E",5:"F",6:"G",7:"H",8:"I",9:"J",10:"K",11:"L",12:"M",13:"N",14:"O",15:"P",16:"Q",17:"R",18:"S",19:"T"},wg=(t,e)=>{let{key:r,variable:o,value:n,scaling:s,index:i,scalingVariable:a}=t;e.sequence[r]={key:r,decimal:~~(n*100)/100,val:~~n,scaling:s,index:i,scalingVariable:a,variable:o},e.scales[r]=s;let c=yx.has(e.unit)?"rem":e.unit;e.vars[o]=s+c},sr=t=>{if(!t.includes("("))return t;let e=t.split("(")[0],r=t.slice(t.indexOf("(")+1,t.lastIndexOf(")"));return[e,r]},yx=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Ki=(t,e)=>{let{base:r,type:o,unit:n}=e,s=yx.has(n)?"rem":n,i=(Qr(s)?1:r)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(o&&o.replace(".","-")),l=`${c}-ratio`;if(t>0){let f=ze[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=ze[t+1],u=Math.abs(t),d=Math.pow(bx,2*u),h=ze[u];return h?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${h}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},ql=(t,e,r,o)=>{let{type:n}=o,i=t===2&&e.length===2?t+1:t,l=`${"--"+(o.varPrefix?o.varPrefix+"-":"")+(n&&n.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${l+i}))`},Gi=(t,e)=>{let o=(t*e-t)/1.618,n=t*e-o,s=t+o,i=(n+s)/2;return[n,i,s]},Yi=(t,e)=>Gi(t,e).map(r=>r/t),Xi=(t,e)=>{let{key:r,base:o,value:n,ratio:s,variable:i,index:a}=t,l=~~(n*s)-~~n,f,[u,d,h]=Gi(n,s);l>16?f=[u,d,h]:f=[u,h],f.forEach((g,p)=>{let m=~~(g/o*1e3)/1e3,b=i+(p+1),_=a+(p+1)/10,y=ql(p+1,f,i,e),x={key:r+(p+1),variable:b,value:g,scaling:m,scalingVariable:y,index:_};wg(x,e)})},bx=1.618,_A=(t,e,r)=>{if(t>=0)return e*Math.pow(r,t);let o=Math.abs(t),n=e*Math.pow(r,t),s=e*Math.pow(r,o)/Math.pow(bx,2*o);return Math.max(n,s)},Yt=t=>{let{type:e,base:r,ratio:o,range:n,subSequence:s}=t,i=Math.abs(n[0])+Math.abs(n[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=n[1]-l,u=ze[f],d=_A(f,r,o),h=~~(d/r*100)/100,g=c+u,p=Ki(f,t),m={key:u,variable:g,value:d,base:r,scaling:h,scalingVariable:p,ratio:o,index:f};wg(m,t),s&&Xi(m,t)}return t},Sg=(t,e=0)=>{let{type:r,base:o,ratio:n,subSequence:s}=t,i=w(e)?e:ze[e],a=w(e)?Object.entries(ze).find(([,m])=>m===e)?.[0]:e;if(!i)return console.warn(`Position ${e} is out of range in numToLetterMap`),null;let c={sequence:{},scales:{},vars:{},...t},l=o*Math.pow(n,a),f=~~(l/o*100)/100,h="--"+(t.varPrefix?t.varPrefix+"-":"")+(r&&r.replace(".","-"))+"-"+i,g=Ki(a,t),p={key:i,variable:h,value:l,base:o,scaling:f,scalingVariable:g,ratio:n,index:a};return wg(p,c),s&&Xi(p,c),c},Ji=(t="A",e)=>{let r=C(),{unit:o}=r;if(w(t)&&mt(t))return`var(${t})`;if(w(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(w(t)){let y=r.sizes;if(y){let x=y[t]||y[t.toLowerCase()];if(x!==void 0)return t.slice(0,1)==="-"?`calc(${x} * -1)`:x}}let{sequence:n,unit:s=o.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(xs(t)||!c||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(t))return t;let d=`--${e.varPrefix?e.varPrefix+"-":""}${Li(e.type.replace(".","-"))}-`,h=t.toUpperCase(),g=h.slice(0,1)==="-"?"-":"",p=g?h.slice(1):h,m="";p.includes("_")&&(m="_"+p.split("_")[1].toLowerCase(),p=p.split("_")[0]);let b=y=>a.test(y)?`var(${d}${y}${m})`:y;if(p.includes("+")){let[y,x]=p.split("+"),k=`${b(y)} + ${b(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(p.includes("*")){let[y,x]=p.split("*"),k=`${b(y)} * ${b(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(p.includes("-")){let[y,x]=p.split("-"),k=`${b(y)} - ${b(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}if(!n[p]&&p.length===2&&(r.verbose&&console.warn(p,"- value is not found because `subSequence` is set to false"),p=p.slice(0,1)),i||r.useVariable){let y=`var(${d}${p}${m})`;return g?`calc(${y} * -1)`:y}let _=n?n[p]:null;if(!_){if(console.warn("can't find",n,p),Pt())throw new Error(`[smbls] Unresolvable design-system token "${t}"`+(e.type?` for sequence "${e.type}"`:"")+" \u2014 not a registered `sizes` name and not a valid spacing/typography/timing sequence letter. The CSS property using it would silently be dropped in production. Register the token in `designSystem/sizes.js` (or the relevant sequence family) or fix the typo.");return}return s==="ms"||s==="s"?g+_.val+s:g+_.scaling+s},Kl=(t,e)=>{if(!["+","-","*","/",","].filter(s=>t.includes(s+" ")).length)return t;let o=/(\s+-\s+|\s*[+*/,]\s*)/;return t.split(o).map(s=>{let i=s.trim();return!i||["+","-","*","/",","].includes(i)?s:Ji(i,e)}).join("")},We=(t,e,r,o)=>{if(typeof t!="string")return C().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!o&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let s=sr(t);o=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=Kl(t,r):t=Ji(t,r),{[e]:o?`${o}(${t})`:t}},Gl=(t,e)=>ze[t-e],Zi=t=>{let{h1Matches:e,sequence:r}=t;return new Array(6).fill(null).map((o,n)=>{let s=Gl(e,n);return r[s]})};R();var kg=(t,e)=>{let r=C(),{cssVars:o}=r;H(t.value)||(o[t.var]=t.value)},Qi=(t,e,r)=>{let o=C(),{unit:n}=o,s=e.unit||n.default,{base:i,ratio:a,type:c}=e,f="--"+(e.varPrefix?e.varPrefix+"-":"")+(c&&c.replace(".","-"));t[`${f}-base`]=i,t[`${f}-unit`]=s;let u=`${f}-ratio`;t[u]=a;let[d,h,g]=Yi(i,a);t[`${f}-sub-ratio-1`]=`calc(var(${f}-ratio) * ${d/a})`,t[`${f}-sub-ratio-2`]=`calc(var(${f}-ratio) * ${h/a})`,t[`${f}-sub-ratio-3`]=`calc(var(${f}-ratio) * ${g/a})`},_x=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),ir=(t,e={})=>{let r=C(),{unit:o,timing:n,cssVars:s}=r,i=t.unit||o.default,a=_x.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||Qi(s,t,e);for(let u in l){let d=l[u],h=(t.type===n.type?l[u].val:f[u])+a;if(!c){s[d.variable+"_default"]=h,s[d.variable]=d.scalingVariable;continue}e.useDefault===!1?s[d.variable]=h:(s[d.variable+"_default"]=h,s[d.variable]=`var(${d.variable+"_default"})`)}},Or=(t,e,r={})=>{let o=C(),{unit:n,media:s,cssVars:i}=o,a=e.slice(1),c=t[e],l=c.unit||t.unit||n.default,f=_x.has(l)?"rem":l,{mediaRegenerate:u}=t,{sequence:d,scales:h}=c,g=s[a];if(!g&&o.verbose&&console.warn("Can't find media query ",g),!u){let p=i[`@media ${g}`];p||(p=i[`@media ${g}`]={}),Qi(p,c,r);let m=t.unit||n.default;if(f!==m&&d)for(let b in d){let _=d[b],y=h[b]+f;p[_.variable+"_default"]=y,p[_.variable]=y}return}for(let p in d){let m=d[p],b=(Qr(f)?h[p]:d[p].val)+f;!g&&o.verbose&&console.warn("Can't find query ",g);let _=i[`@media ${g}`];_||(_=i[`@media ${g}`]={}),_[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=b}};R();var wx=so(),xn=t=>{let e=C(),r="";for(let o in t)e.__svgCache[o]||(e.__svgCache[o]=!0,r+=t[o]);return r},xA=t=>{let e=t&&(t.default||t);if(!w(e))return wx&&console.warn("parseRootAttributes:",e,"is not a string"),{};let r=e.match(/<svg\s+(.*?)>/);if(!r||!r[1])return{};let n=r[1].match(/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|\s*\/?[>"']))+.)["']?/gm);return n?n.reduce((s,i)=>{let[a,c]=i.split("=");return s[a]=c.replace(/['"]/g,""),s},{}):{}},wA=(t,e)=>{let r=[];if(t.replace(/id="([^"]*)"/g,(n,s)=>(r.push(s),n)),!r.length)return t;let o=t;for(let n of r){let s=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${e}-${n}`;o=o.replace(new RegExp(`id="${s}"`,"g"),`id="${i}"`).replace(new RegExp(`url\\(#${s}\\)`,"g"),`url(#${i})`).replace(new RegExp(`xlink:href="#${s}"`,"g"),`xlink:href="#${i}"`).replace(new RegExp(`href="#${s}"`,"g"),`href="#${i}"`)}return o},xx=new Set,ta=(t,e)=>{let r=e&&e.default?e.default:e;if(!w(r))return wx&&!xx.has(t)&&(xx.add(t),console.warn("convertSvgToSymbol:",t,"is not a string")),"";e=r;let o=e.match(/^<symbol\b[^>]*\bid="([^"]*)"/);if(o){let u=o[1];return u===t?e:e.replace(`id="${u}"`,`id="${t}"`)}let n=xA(e),{width:s,height:i}=n,a=n.viewBox||`0 0 ${s||24} ${i||24}`,f=wA(e,t).replace("<svg",`<symbol id="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="${a}"`);return f=f.replace(/width="[^"]*"/,""),f=f.replace(/height="[^"]*"/,""),f=f.replace("</svg","</symbol"),f=vA(f),f},SA="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",kA=new RegExp(`<(${SA})\\b([^>]*?)\\s*/>`,"g"),vA=t=>t.replace(kA,"<$1$2></$1>");var vn={};P(vn,{STANDARD_SCHEME_QUERIES:()=>Xl,appendSVGSprite:()=>ma,appendSvgIconsSprite:()=>wo,applyDocument:()=>ga,applyHeadings:()=>tf,applyReset:()=>ya,applySpacingSequence:()=>ra,applyTimingSequence:()=>ha,applyTypographySequence:()=>ua,checkIfBoxSize:()=>ea,getColor:()=>et,getFontFamily:()=>fa,getFontSizeByKey:()=>da,getMediaColor:()=>It,getMediaTheme:()=>me,getSafeInk:()=>Jl,getSafeInkInfo:()=>Eg,getShadow:()=>na,getShapeByKey:()=>pa,getSpacingBasedOnRatio:()=>Te,getSpacingByKey:()=>St,getTheme:()=>ia,getTimingByKey:()=>oe,getTimingFunction:()=>ye,quietColorProbe:()=>yo,resolveBorderValue:()=>re,resolveColorRgb:()=>bo,resolveShadowValue:()=>_o,runThroughMedia:()=>Ql,setAdaptiveSchemeVar:()=>Ir,setColor:()=>Pr,setFont:()=>la,setFontFamily:()=>Sn,setGradient:()=>wn,setMediaTheme:()=>ca,setSVG:()=>kn,setShadow:()=>Dr,setSvgIcon:()=>xo,setTheme:()=>aa,splitSpacedValue:()=>oa});R();var Xl={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},ge=new Set,CA=new Set(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"]),Yl=new Set,Sx=t=>{if(!t)return!1;let{color:e,gradient:r}=t;return!!(S(e)&&Object.keys(e).length||S(r)&&Object.keys(r).length)},kx=new Set,vg=0,yo=t=>{vg++;try{return t()}finally{vg--}},EA=(t,e)=>{if(!w(t)||t.indexOf(" ")===-1)return null;let r=t.replace(/\s+/g,""),o=Lt(r);if(!o||o.passthrough||o.cssVar)return null;let{color:n,gradient:s}=e;return!n[o.name]&&!s[o.name]?null:r},Cg=(t,e,r)=>{let o=EA(t,r);if(o){if(!kx.has(t)){kx.add(t);let i=r&&r.name?` (design system \`${r.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` has a space before its alpha/tone modifier${i} \u2014 did you mean \`${o}\`? The space form never resolves, so the atomic class it mints carries no CSS value and paints invisibly. Dropped rather than shipped invisible.`)}return}let n=Lt(t);if(n&&n.name&&!n.passthrough&&!n.cssVar&&(n.alpha!==void 0||n.tone!==void 0)&&Sx(r)&&!r.color[n.name]&&!r.gradient[n.name]){if(!vg&&!Yl.has(t)){Yl.add(t);let i=r&&r.name?` (design system \`${r.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` does not resolve${i} \u2014 \`${n.name}\` is not in the palette. Dropped rather than emitted as a raw value, which is invalid CSS the browser discards silently. Define it in designSystem/color.js or use a palette token.`)}return}let s=w(e)?e.toLowerCase():"";if(!CA.has(s)||!Sx(r))return t;if(!Yl.has(s)){Yl.add(s);let i=r&&r.name?` (design system \`${r.name}\`)`:"";console.warn(`[scratch] color \`${t}\` is a CSS named colour that is not in the palette${i}. Dropped rather than emitted as a raw browser colour, which renders theme-blind and can be unreadable ("looks designed", so it ships unnoticed). Define it in designSystem/color.js or use a palette token.`)}},et=(t,e,r)=>{let o=r||C();if(!w(t)){o.verbose&&console.warn(t,"- type for color is not valid");return}if(mt(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let n,s,i;if(T(t))[n,s,i]=t;else{let u=Lt(t);if(!u){let{color:d,gradient:h}=o,g=h[t]||d[t];return g?(e&&g[e]&&(g=g[e]),o.useVariable?`var(${g.var})`:g.value):Cg(t,t,o)}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;n=u.name,s=u.alpha,i=u.tone}let{color:a,gradient:c}=o,l=a[n]||c[n];if(!l)return Cg(t,n,o);if(e)if(l[e]!==void 0)l=l[e];else if(T(l)){let u=e.charCodeAt(0)===64?e.slice(1):e;u==="dark"?l=l[1]!==void 0?l[1]:l[0]:(u!=="light"&&o.verbose&&console.warn(t," - array-form color tokens only support light/dark; falling back to the light slot for scheme",e),l=l[0])}else o.verbose&&console.warn(t," - does not have ",e);if(w(l)){if(ge.has(n))return l;ge.add(n);try{return et(l,null,r)}finally{ge.delete(n)}}let f=l.rgb;if(!f){let u=o.useVariable?`var(${l.var})`:l.value;if((s||i)&&u){let d=s!==void 0?s:1;if(!i)return`rgb(from ${u} r g b / ${d})`;if(i.charCodeAt(0)===43||i.charCodeAt(0)===45){let g=parseFloat(i),p=g<0?"-":"+",m=Math.abs(g);return`rgb(from ${u} calc(r ${p} ${m}) calc(g ${p} ${m}) calc(b ${p} ${m}) / ${d})`}return`hsl(from ${u} h s ${i}% / ${d})`}return u}return i&&!l[i]&&(f=He(f,i),l[i]={rgb:f,var:`${l.var}-${i}`}),l[i]&&(f=l[i].rgb),s?`rgba(${f}, ${s})`:i?`rgba(${f}, ${l.alpha!==void 0?l.alpha:1})`:o.useVariable?`var(${l.var})`:l.value!==void 0?l.value:`rgb(${f})`},vx=t=>{let e=de(t);return!e||e.length<3||e[0]===0&&e[1]===0&&e[2]===0&&e[3]===0&&t.toLowerCase()!=="transparent"?null:{rgb:[e[0],e[1],e[2]],alpha:e[3]!==void 0?e[3]:1}},AA=(t,e)=>{if(!e)return t;let r=t.rgb;if(e.tone){let n=He(r,e.tone);r=w(n)?n.split(",").map(s=>parseFloat(s.trim())):n}let o=e.alpha!==void 0?parseFloat(e.alpha):t.alpha;return{rgb:r,alpha:o}},bo=(t,e,r)=>{let o=e||C();if(!w(t))return null;let n=Lt(t);if(n){if(n.passthrough){let d=de(n.passthrough);return d&&d.length>=3?{rgb:[d[0],d[1],d[2]],alpha:d[3]!==void 0?d[3]:1}:null}if(n.cssVar)return null}let s=n?n.name:t,{color:i,gradient:a}=o,c=i[s]||a[s];if(!c)return vx(t);if(w(c)){let d;if(ge.has(s))d=vx(c);else{ge.add(s);try{d=bo(c,o,r)}finally{ge.delete(s)}}return d?AA(d,n):null}if(c.rgb===void 0&&S(c)){let d=`@${r||"light"}`;c=c[d]!==void 0?c[d]:c["@light"]}if(!c||c.rgb===void 0)return null;let l=c.rgb;n&&n.tone&&(l=He(l,n.tone));let f=w(l)?l.split(",").map(d=>parseFloat(d.trim())):l,u=n&&n.alpha!==void 0?parseFloat(n.alpha):c.alpha!==void 0?c.alpha:1;return{rgb:f,alpha:u}},It=(t,e,r)=>{let o=r||C();if(e||(e=o.globalTheme==="auto"?null:o.globalTheme),!w(t)){o.verbose&&console.warn(t,"- type for color is not valid");return}if(mt(t))return`var(${t})`;let n,s,i;if(T(t))n=t[0];else{let u=Lt(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;n=u.name,s=u.alpha,i=u.tone}else n=t}let{color:a,gradient:c}=o,l=a[n]||c[n],f=S(l);if(f&&l.value)return et(t,`@${e}`,r);if(f){if(o.useVariable&&l.var)return s||i?et(t,null,r):`var(${l.var})`;if(e)return et(t,`@${e}`,r);{let u={},d=o.scopeSelector||":root",h=d===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${d}:not([data-theme])`;for(let g in l){if(g.charCodeAt(0)!==64)continue;let p=g.slice(1),m=et(t,g,r);if(m!==void 0&&(u[`[data-theme="${p}"] &`]=m,p==="light"||p==="dark")){let b=o.media&&o.media[p]||Xl[p];if(!b)continue;let _="@media "+(b==="print"?`${b}`:`screen and ${b}`);u[_]={[`${h} &`]:m}}}return u}}else return Cg(t,n,o)},Ir=(t,e,r,o)=>{let s=`--${o.varPrefix?o.varPrefix+"-":""}${e}-${r}`,i,a={};for(let c in t){if(c.charCodeAt(0)!==64)continue;let l=c.slice(1),f=t[c],u=f&&(f.value||f);!u||typeof u!="string"||(a[l]=u,(l==="light"||i===void 0)&&(i=u))}if(i!==void 0){o.cssVars[s]=i,o.cssMediaVars||(o.cssMediaVars={});for(let c in a){let l=`[data-theme="${c}"]`;if(o.cssMediaVars[l]||(o.cssMediaVars[l]={}),o.cssMediaVars[l][s]=a[c],c==="light"||c==="dark"){let f=`@media (prefers-color-scheme: ${c})`;o.cssMediaVars[f]||(o.cssMediaVars[f]={}),o.cssMediaVars[f][s]=a[c]}}return t.var=s,s}},Pr=(t,e,r)=>{let o=C();if(S(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0))return o.useVariable&&t.var&&(o.cssVars[t.var]=t.value),t;if(w(t)&&mt(t)){let p=t.slice(2);if(t=et(p),!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let m=p.split(" "),b=o.color[m[0]];if(b&&!b.value&&!b.rgb&&(w(b)||T(b)||S(b))&&!ge.has(m[0])){ge.add(m[0]);try{o.color[m[0]]=Pr(b,m[0])}finally{ge.delete(m[0])}b=o.color[m[0]]}if(b&&b.value){let _=b.rgb,y=m[1]!==void 0?m[1]:"1",x=m[2];x&&(_=He(_,x)),t=`rgba(${_}, ${y})`}else{let _=m[2],y=m[1]!==void 0?m[1]:"1";if(_)try{let x=de(m[0]);x&&x.length>=3?t=`rgba(${He(x.slice(0,3).join(", "),_)}, ${y})`:t=m[0]}catch{t=m[0]}else t=m[0]}}}if(T(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),S(t)){let p={};for(let m in t)m!=="var"&&(p[m]=Pr(t[m],e,m.slice(0,1)==="@"?m.slice(1):m));return o.useVariable&&Ir(p,"color",e,o),p}let s=`--${o.varPrefix?o.varPrefix+"-":""}color-${e}`+(r?`-${r}`:""),i=t.value||t;if(w(i)&&!i.includes("(")&&!i.startsWith("#")){let p=Lt(i);if(p&&p.name&&!p.passthrough&&!p.cssVar){let m=o.color[p.name];if(m&&!m.value&&!m.rgb&&(w(m)||T(m)||S(m))&&!ge.has(p.name)){ge.add(p.name);try{o.color[p.name]=Pr(m,p.name)}finally{ge.delete(p.name)}}let b=o.color[p.name];if(b&&b.rgb){let _=b.rgb;p.tone&&(_=He(_,p.tone));let y=p.alpha!==void 0?parseFloat(p.alpha):b.alpha!==void 0?b.alpha:1;i=`rgba(${_}, ${y})`}}}let a=de(i),[c,l,f,u=1]=a,d=parseFloat(u.toFixed(2)),h=`${c}, ${l}, ${f}`,g=`rgba(${h}, ${d})`;return o.useVariable&&(o.cssVars[s]=g),{var:s,rgb:h,alpha:d,value:g}},wn=(t,e,r)=>{let o=C();if(S(t)&&t.value!==void 0&&t.var!==void 0)return o.useVariable&&(o.cssVars[t.var]=t.value),t;if(w(t)&&mt(t)&&(t=et(t.slice(2))),T(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),S(t)){let i={};for(let a in t)a!=="var"&&(i[a]=wn(t[a],e,a.slice(0,1)==="@"?a.slice(1):a));return o.useVariable&&Ir(i,"gradient",e,o),i}let s=`--${o.varPrefix?o.varPrefix+"-":""}gradient-${e}`+(r?`-${r}`:"");return o.useVariable&&(o.cssVars[s]=t.value||t),{var:s,value:t.value||t}};R();var Jl=(t,e,r={},o)=>{let n=o||C(),{min:s=4.5,large:i=!1,scheme:a,meta:c=!1,maxIterations:l=15}=r,f=i?3:s,u=a||(n.globalTheme&&n.globalTheme!=="auto"?n.globalTheme:"light"),d=w(e)?e:String(e),h=Lt(t),g=h&&!h.passthrough&&!h.cssVar?h.name:null,p=(Y,j)=>c?{value:Y,...j}:Y;if(g){let Y=n.color[`${g}Safe`];if(Y){let j=`${d}@${u}`,pt=Y[j]!==void 0?Y[j]:Y[d];if(pt!==void 0){let Et=pt&&pt.rgb!==void 0?n.useVariable&&pt.var?`var(${pt.var})`:pt.value:et(pt,null,n);return p(Et,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=et(t,u?`@${u}`:null,n),b=bo(t,n,u),_=bo(e,n,u);if(!b||!_)return n.verbose&&console.warn("getSafeInk: could not resolve",t,e,"\u2014 returning hue unchanged"),p(m,{ratio:null,deviation:0,derived:!1,overridden:!1,unresolved:!0});let y=po(_.rgb,_.alpha),x=po(b.rgb,b.alpha,y),k=hn(x,y);if(k>=f-.02)return p(m,{ratio:k,deviation:0,derived:!1,overridden:!1});let[E,O,$]=Ni(b.rgb),[,D,I]=ji([E,O,$]),z=uo(y)>.5,V=z?E:1-E,rt=Y=>{let j=z?E-Y:E+Y,pt=Math.max(0,Math.min(1,j));return{rgb:Bi(pt,D,I),L:pt}},at=Y=>{let{rgb:j}=rt(Y),pt=po(j.map(Et=>Math.round(Et)),b.alpha,y);return hn(pt,y)},G=0,K=V,lt=at(K)>=f;if(lt)for(let Y=0;Y<l;Y++){let j=(G+K)/2;at(j)>=f?K=j:G=j}else G=K;let{rgb:Vt,L:W}=rt(K),wt=Vt.map(Y=>Math.round(Y)),L=at(K),ot=b.alpha<1?`rgba(${wt.join(", ")}, ${b.alpha})`:`rgb(${wt.join(", ")})`,U=Math.abs(W-E)*100;return p(ot,{rgb:wt,ratio:L,startRatio:k,deviation:U,derived:!0,overridden:!1,reachable:lt})},Eg=(t,e,r={},o)=>Jl(t,e,{...r,meta:!0},o);R();R();var TA=t=>{let r=C().spacing||{},o=parseFloat(t.spacingRatio),n={...r,ratio:Number.isFinite(o)?o:r.ratio,sequence:{},scales:{}};return Yt(n),n},OA=t=>{for(let e in t){let r=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:n,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;gt(r,{type:n,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),Yt(r),Or(t,e)}},ea=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),o=e.includes("border")||e.includes("outline");return r&&!o},ra=()=>{let t=C(),{spacing:e}=t;Yt(e),ir(e),OA(e)},RA=t=>{let e=C(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:Yt(t)},St=(t,e="padding",r,o)=>{let n=RA(r);if(w(t)){if(!o&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!o&&t.includes("(")){let i=sr(t);o=i[0],t=i[1]}}let s=o?[t]:fo(t);if(T(s)){if(s.length>1){let i="";e==="borderWidth"&&(e="border",i="Width");let a={2:["Block","Inline"],3:["BlockStart","Inline","BlockEnd"],4:["BlockStart","InlineEnd","BlockEnd","InlineStart"]},c=(l,f)=>We(s[f],e+l+i,n,o);return a[s.length].map((l,f)=>c(l,f))}return We(t,e,n,o)}},Te=(t,e,r,o)=>{let n=C(),{spacing:s}=n,i=r||t[e];if(!o&&w(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!o&&w(i)&&i.includes("(")){let a=sr(i);o=a[0],i=a[1]}if(t.spacingRatio){let a=TA(t);return St(i,e,a,o)}return St(i,e,s,o)},oa=t=>{let e=r=>{let o=["+","-","*","/"].includes(r),n=Vo.some(i=>t.includes(i));return o||n?r:r.length<3&&/[A-Z]/.test(r)?r+"_default":r};return t.split(",").map(r=>r.trim()).map(e).join(",").split(" ").map(e).join(" ")};R();var _o=(t,e,r)=>!w(t)||te.test(t)?t:or(t).map(o=>(o=o.trim(),o.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(n.startsWith("--"))return`var(${n})`;let s=yo(()=>et(n,e));if(Ae(s))return s;if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em"||n==="inset"||n==="none")return n;r&&r(n);let i=St(n,"shadow");return i&&i.shadow?i.shadow:n}).join(" "))).join(", "),Dr=(t,e,r,o)=>{let n=C();if(T(t)){let a={"@light":Dr(t[0],e,"light"),"@dark":Dr(t[1],e,"dark")};return n.useVariable&&Ir(a,"shadow",e,n),a}if(S(t)){let a={};for(let c in t)a[c]=Dr(t[c],e,c.startsWith("@")?c.slice(1):c);return n.useVariable&&Ir(a,"shadow",e,n),a}w(t)&&!te.test(t)&&(t=_o(t));let i=`--${n.varPrefix?n.varPrefix+"-":""}shadow-${e}`+(r?`-${r}`:"");return n.useVariable&&(n.cssVars[i]=t),{var:i,value:t}},na=(t,e)=>{let r=C();if(e||(e=r.globalTheme==="auto"?null:r.globalTheme),!w(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(mt(t))return`var(${t})`;let[o]=T(t)?t:t.split(" "),s=r.shadow[o],i=S(s);if(!s)return r.verbose&&console.warn("Can't find color ",o),t;if(e){let a=s["@"+e]||s[e];if(a)return a.value!==void 0?a.value:a;r.verbose&&console.warn(t," - does not have ",e)}if(i&&s.value)return s.value;if(i){let a={};for(let c in s){if(c.charCodeAt(0)!==64)continue;let l=r.media[c.slice(1)];if(!l)continue;let f="@media "+(l==="print"?`${l}`:`screen and ${l}`),u=s[c],d=u&&(u.value!==void 0?u.value:u);d!==void 0&&(a[f]=d)}return a}return r.verbose&&console.warn("Can't find color",t),t};var PA=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),IA=t=>PA.has(t),re=(t,e,r)=>{if(t==null)return;let o=t+"";if(te.test(o))return o;let n=o.trim();return n==="none"||n==="0"||n==="initial"||n==="inherit"||n==="unset"?o:o.split(/\s+/).map(s=>{if(s=s.trim(),!s)return"";if(mt(s))return`var(${s})`;if(IA(s)||/^\d/.test(s)||s==="0")return s;let i=yo(()=>et(s,e));if(Ae(i))return i;r&&r(s);let a=St(s,"border");return a&&a.border?a.border:s}).join(" ")};R();var DA=new Set(["black","white","red","green","blue","yellow","orange","purple","pink","brown","gray","grey","cyan","magenta","lime","olive","navy","teal","aqua","maroon","silver","fuchsia","transparent","currentColor","currentcolor","inherit","initial","unset","none","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","rebeccapurple"]),Cx=["color","Color","background","Background","fill","Fill","stroke","Stroke"],$A=t=>{for(let e=0;e<Cx.length;e++)if(t.includes(Cx[e]))return!0;return!1},LA={boxShadow:_o,textShadow:_o,border:re,borderTop:re,borderRight:re,borderBottom:re,borderLeft:re,outline:re,columnRule:re},MA=t=>{if(!t)return!1;let e=Lt(t);return!e||!e.name||e.passthrough||e.cssVar?!1:e.alpha!==void 0||e.tone!==void 0},Ex=new Set,FA=(t,e,r,o,n,s)=>{if(!Pt())return;let i=`${t}::${e}::${r||""}::${o}`;Ex.has(i)||(Ex.add(i),console.warn(`[smbls/scratch] theme param "${e}" on "${t}"`+(r?` (${r})`:"")+` did not fully resolve: "${o}" -> "${n}" still contains the unresolved token "${s}". This is not valid CSS \u2014 the browser will drop the whole declaration. Register "${s}" as a design-system color token or fix the typo.`))},Tx=(t,e,r,o)=>{let n=LA[e];if(!n)return et(r,o);let s=null,i=n(r,o,a=>{!s&&MA(a)&&(s=a)});return s&&FA(t,e,o,r,i,s),i},Zl=t=>{let e={},{state:r,media:o,helpers:n,...s}=t;return Object.keys(s).map(a=>{let l=["color","Color","background","border"].some(f=>a.includes(f));return e[a]=l?et(t[a]):t[a]}),e},sa=t=>(t.value||(t.value=Zl(t)),t.value),ia=(t,e)=>{let r=C();if(r.useVariable)return me(t,e);let o=r.theme;if(w(t)){let[n,s]=t.split(" "),i=o[n];if(i){if(!s&&!e)return sa(i);t=[n,s||e]}}if(H(t)&&t[1]){let n=t[0],s=t[1],{helpers:i,media:a,state:c}=o[n];if(a&&a[s])return sa(a[s]);if(i&&i[s])return sa(i[s]);if(c&&c[s])return sa(c[s])}else if(S(t))return Zl(t)},NA=(t,e,r)=>{if(S(e))t.variants.inverse.value=Zl(e);else if(e===!0){let{color:o,background:n}=r;t.variants.inverse={value:{color:n,background:o}}}},jA=(t,e,r,o)=>{let n=ia(r);o[`&:${e}`]=n,S(r)&&!r.value&&(r.value=n)},BA=(t,e)=>{let{state:r}=t;return r?(Object.keys(r).map(n=>{let s=r[n];return jA(t,n,s,e),t}),t):void 0},UA=(t,e,r,o)=>{let n=ia(r);o[`@media (prefers-color-scheme: ${e})`]=n,S(r)&&!r.value&&(r.value=n)},VA=(t,e)=>{let{media:r}=t;return r?(Object.keys(r).map(n=>{let s=r[n];return(n==="dark"||n==="light")&&UA(t,n,s,e),n==="inverse"&&NA(t,s,e),t}),t):void 0},HA=(t,e)=>{let r=C(),{helpers:o}=t;return o?(Object.keys(o).map(s=>{let i=o[s];return w(i)?o[s]=r.theme[i]:sa(o[s]),t}),t):void 0},aa=(t,e)=>{let r=C();if(r.useVariable)return ca(t,e);let{state:o,media:n,helpers:s}=t,i=Zl(t,e),c=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}`;return BA(t,i),VA(t,i),HA(t,i),{var:c,value:i,state:o,media:n,helpers:s}};var Ag=(t,e,r)=>{let{cssVars:o}=r;r.cssMediaVars||(r.cssMediaVars={});let n=r.cssMediaVars,s=r.globalTheme!==void 0?r.globalTheme:"auto",i={},a=new Set;for(let l in t)if(t[l])for(let f of Object.keys(t[l]))a.add(f);let c=new Set;for(let l of a){let f=l.slice(0,1);if(!(f==="@"||f==="."||f===":")&&$A(l))for(let u in t){if(c.has(u))continue;let d=t[u]?.[l];if(d===void 0)continue;let h=et(d,`@${u}`);h!==void 0&&w(h)&&/^[a-z][a-zA-Z]+$/.test(h)&&!DA.has(h)&&c.add(u)}}for(let l of a){let f=l.slice(0,1),u=Object.values(t).some(d=>H(d?.[l]));if(f==="."&&u){let d=l.slice(1),h={};for(let g in t)H(t[g]?.[l])&&(h[g]=t[g][l]);i[l]=Ag(h,`${e}-${d}`,r)}else if(f===":"&&u){let d=l.replace(/^:+/,""),h={};for(let g in t)H(t[g]?.[l])&&(h[g]=t[g][l]);i[l]=Ag(h,`${e}-${d}`,r)}else if(f!=="@"&&f!=="."&&f!==":"){let h=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}-${l}`,g=s&&s!=="auto"?String(s).replace(/^'|'$/g,""):null,p;for(let m in t){if(c.has(m))continue;let b=t[m]?.[l];if(b===void 0)continue;let _=Tx(e,l,b,`@${m}`);if(_===void 0)continue;(g&&m===g||!g&&(m==="light"||p===void 0))&&(p=_);let y=`[data-theme="${m}"]`;if(n[y]||(n[y]={}),n[y][h]=_,m==="dark"||m==="light"){let x=`@media (prefers-color-scheme: ${m})`;n[x]||(n[x]={}),n[x][h]=_}}p!==void 0&&(o[h]=p),i[l]=`var(${h})`,i[`.${l}`]={[l]:i[l]}}}return(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color}),i},ca=(t,e,r,o)=>{let n=C(),{cssVars:s}=n,i={value:t},a=!r&&!o;if(H(t)){if(a&&n.useVariable){let c={};for(let l in t)l.startsWith("@")&&H(t[l])&&(c[l.slice(1)]=t[l]);if(Object.keys(c).length){let l=Ag(c,e,n);Object.assign(i,l)}}for(let c in t){let l=c.slice(0,1),f=t[c];if(l==="@"||l===":"||l==="."){let u=l==="@"&&c;i[c]=ca(f,e,c,o||u)}else if(!a){let u=Tx(e,c,f,o),d=[...new Set([o,r].filter(m=>m).map(m=>m.slice(1)))],h=d.length?"-"+d.join("-"):"",p=`--${n.varPrefix?n.varPrefix+"-":""}theme-${e}${h}-${c}`;n.useVariable?(n.useThemeSuffixedVars&&(s[p]=u),i[c]=`var(${p})`):i[c]=u,i[`.${c}`]={[c]:i[c]}}}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(w(t)&&mt(t)){let l=n.theme[t.slice(2)];return me(l,o)}return i},Tg=t=>{let e=C(),r={};for(let o in t){let n=o.slice(0,1);if(H(t[o])){if(n==="@")continue;n===":"?r[`&${o}`]=Tg(t[o]):n==="."&&(r[`&${o}`]=Tg(t[o]))}else r[o]=t[o]}return r},Ox=(t,e)=>{let r=e.shift();return t[r]?Ox(t[r],e):t},Ax=(t,e)=>T(e)?Ox(t,e):w(e)&&t[e]?t[e]:t;var me=(t,e)=>{let r=C();if(w(t)&&mt(t)&&(t=me(t.slice(2))),!t||!w(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[o,...n]=T(t)?t:t.split(" "),s=r.theme[o];return s&&n.length?s=Ax(s,n):s&&e&&(s=Ax(s,e)),Tg(s)};R();R();var la=(t,e)=>{let r=C(),o=`--font-${e}`;if(!t||T(t)&&!t[0])return;let n;if(t.isVariable){let s=pe(t.url,r.files)||t.url;gn(s)?n=mn(s):n=Tr(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap"})}else if(t[0])n=go(e,t,r.files);else{let s=Array.isArray(t.url)?t.url.map(i=>pe(i,r.files)||i):pe(t.url,r.files)||t.url;n=Tr(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch})}return{var:o,value:t,fontFace:n}},fa=(t,e)=>{let r=C(),{fontFamily:o}=r;return ho(e||o,t)},Sn=(t,e)=>{let r=C(),{fontFamily:o,fontFamilyTypes:n}=r,{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!o.default)&&(o.default=e),S(s)&&(s=fo(s));let a=`--font-family-${e}`,c=`${s.join(", ")}, ${n[i]}`;return{var:a,value:c,arr:s,type:i,isSystemFallback:!!t.isSystemFallback}};R();var Ql=t=>{let e=C(),{typography:r,media:o}=e;for(let n in t){let s=n.slice(0,1)==="@",i=t[n];if(!s)continue;let{mediaRegenerate:a}=t,c=n.slice(1),{type:l,base:f,ratio:u,range:d,subSequence:h,h1Matches:g,unit:p}=t;gt(i,{type:l,base:f,ratio:u,range:d,subSequence:h,h1Matches:g,unit:p});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),b=i.unit||p,_=!i.unit&&m.has(p)?"rem":b,y=o[c],x="@media "+(y==="print"?`${y}`:`screen and ${y}`);if(r.templates[x]={fontSize:i.base/r.browserDefault+_},!a){gt(i,{sequence:{},scales:{},vars:{}}),Yt(i),Or(t,n);continue}gt(i,{sequence:{},scales:{},templates:{},vars:{}}),Yt(i),Or(t,n)}},tf=t=>{let e=C();if(t.h1Matches){let r=t.unit,o=Zi(t),{templates:n}=t;for(let s in o){let i=`h${parseInt(s)+1}`,a=n[i];n[i]={fontSize:e.useVariable?`var(${o[s]?.variable})`:`${o[s]?.scaling}${r}`,margin:a?a.margin:0,lineHeight:a?a.lineHeight:t.lineHeight,letterSpacing:a?a.letterSpacing:t.letterSpacing,fontWeight:a?a.fontWeight:900-s*100}}}},ua=()=>{let t=C(),{typography:e}=t;Yt(e),tf(e),ir(e),Ql(e)},da=t=>{let e=C(),{typography:r}=e;return We(t,"fontSize",r)};R();var pa=t=>{if(!w(t))return;let r=C().shape;if(r)return r[t]!==void 0?r[t]:r[t.toLowerCase()]};R();var ha=()=>{let t=C(),{timing:e}=t;Yt(e),ir(e)},ye=t=>{let e=C(),{timing:r}=e;return r[t]||r[$i(t)]||t},oe=(t,e="timing")=>{let r=C(),{timing:o}=r;return We(t,e,o)};R();var ga=()=>{let t=C(),{fontFamily:e,theme:r,typography:o}=t,n=t.document;return Ze(n)?(br(t,"document",n),n=t.document={}):n||(n=t.document={}),gt(n,{theme:r.document,fontFamily:ho(e),fontSize:o.base,lineHeight:o.lineHeight})};R();var Rg={document:Q},kn=(t,e)=>{let r=C();if(!t){r.verbose&&console.warn("setSVG: val is not defined",e);return}return r.useSvgSprite?ta(e,t):t},ma=(t,e=Rg)=>{let r=C(),o=Object.keys(t).length?{}:r.svg;for(let n in t)o[n]=t[n];Px(o,e)},xo=(t,e)=>{let r=C();return r.useIconSprite&&!r.semanticIcons?.[e]?kn(t,e):t},wo=(t,e=Rg)=>{let r=C(),o=Object.keys(t).length?{}:r.icons;for(let n in t)o[n]=t[n];Px(o,e)},Og=(t,e={isRoot:!0})=>{if(!t||!t.createElementNS)return;let r=t.createElementNS("http://www.w3.org/2000/svg","svg");return e.isRoot&&(r.setAttribute("aria-hidden","true"),r.setAttribute("width","0"),r.setAttribute("height","0"),r.setAttribute("style","position:absolute"),r.setAttribute("id","svgSprite")),r},zA=(t,e)=>{let r=typeof DOMParser<"u"?DOMParser:null;if(r){let o=`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,s=new r().parseFromString(o,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},Rx=(t,e,r)=>{for(;e.firstChild;){let o=e.firstChild;r.appendChild(t.importNode(o,!0)),o.remove()}},Px=(t,e=Rg)=>{let r=C(),o=e.document||Q;if(!o||!o.documentElement)return r.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),xn(t);let n=o.querySelector("#svgSprite"),s=xn(t),i=`<svg aria-hidden="true" width="0" height="0" style="position:absolute" id="svgSprite">${s}</svg>`,a=zA(o,s);if(n)if(a)Rx(o,a,n);else if(o.body.insertAdjacentHTML)n.insertAdjacentHTML("beforeend",s);else{let c=Og(o,{isRoot:!1});c.innerHTML=s,n.append(...c.children)}else if(a){let c=Og(o);c&&c.nodeType&&(Rx(o,a,c),o.body.prepend(c))}else if(o.body.insertAdjacentHTML)o.body.insertAdjacentHTML("afterbegin",i);else{let c=Og(o);c&&c.nodeType&&(c.innerHTML=s,o.body.prepend(c))}};R();var ya=(t={})=>{let e=C(),r=e.typography||{},o=e.document||{},n=S(e.reset)?e.reset:e.reset={};if(n[":root"]){let c=n,l=r.templates||{};c.body={...e.useDocumentTheme?me("document"):{},...l.body},c.h1=l.h1,c.h2=l.h2,c.h3=l.h3,c.h4=l.h4,c.h5=l.h5,c.h6=l.h6}let{body:s,...i}=r.templates||{},a=e.useDocumentTheme?me("document"):{};if(n.html&&qt(n.html,a),r.unit){let c=e.media||{};for(let l in r){if(l.charAt(0)!=="@")continue;let f=r[l];if(!f||f.unit===r.unit||!f.unit)continue;let u=f.unit,d=f.base||r.base,h=f.browserDefault||r.browserDefault,g=l.slice(1),p=c[g];if(!p)continue;let m="@media "+(p==="print"?p:"screen and "+p);n[m]||(n[m]={}),n[m].html||(n[m].html={}),n[m].html.fontSize=d/h+u}}return st(gt(n,t),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",...a,fontSize:r.unit?r.base/r.browserDefault+r.unit:r.browserDefault+"px",fontFamily:o.fontFamily,lineHeight:o.lineHeight},body:{boxSizing:"border-box",height:"100%",margin:0,fontFamily:o.fontFamily,fontSize:r.unit?"1"+e.unit.default:r.base/r.browserDefault+e.unit.default,...i,...s},a:{color:"currentColor"},button:{color:"inherit",font:"inherit",background:"transparent",border:"none",cursor:"pointer",appearance:"none",WebkitAppearance:"none"},"input, select, textarea":{color:"inherit",font:"inherit"},fieldset:{border:0,padding:0,margin:0}},ee)};R();var WA=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),qe=t=>re(t),ef=t=>te.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(mt(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=et(e);return Ae(r)?r:e}).join(" "),rf=(t,e)=>na(t,e),ba=(t,e)=>te.test(t)?t:or(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(mt(o))return`var(${o})`;if(o==="inset"||o==="none")return o;let n=et(o);if(Ae(n)){let i=It(o,e);return S(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(o)||o==="0"||o.includes("px")||o.slice(-2)==="em")return o;let s=St(o,"shadow");return s&&s.shadow?s.shadow:o}).join(" "):"")).join(", "),_a=(t,e)=>{let r=t.indexOf("(");if(r===-1)return t;let o=t.slice(0,r+1),n=t.slice(r+1,t.lastIndexOf(")")),s=")",a=or(n).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||WA.has(f)||f==="transparent"||te.test(f))return f;let u=et(f);return Ae(u)?u:f}).join(" ")));return o+a.join(", ")+s},of=(t,e)=>{let r=C();return or(t).map(o=>{let n=o.trim();if(mt(n))return`var(${n})`;if(/^var\(/.test(n)||n.includes("url"))return n;if(r.gradient?.[n]){let s=It(n,e);if(w(s))return s;if(S(s)){for(let i in s)if(w(s[i]))return s[i]}return n}return n.includes("gradient")?_a(n,e):n.includes("/")||n.startsWith("http")||n.includes(".")&&!Lt(n)?`url(${n})`:n}).join(", ")},nf=t=>w(t)&&t.split(" ").map(e=>St(e,"gap").gap).join(" "),Pg=t=>{let e=t.split(" ");return e.length?e.map(r=>mt(r)?`var(${r})`:r.length<3||r.includes("ms")?oe(r).timing||r:ye(r)?ye(r):r).join(" "):t},xa=(t,e,r)=>{if(w(t))return t.split(",").map(o=>oe(o).timing||o).join(",")},sf=t=>{let e=t.split(",");if(e.length)return e.map(Pg).join(",")};function _t(t,e,r={},o={}){let n=ut.call(this,e||r[t]);if(n==null)return;let s;if(w(n)){if(/^(?:env|var)\(/.test(n.trim()))return{[t]:n};if(n.includes("(")){let c=sr(n);s=c[0],n=c[1]}let i=r.scaleBoxSize,a=ea(t);!i&&a&&!o.ratio&&(n=oa(n))}return o.ratio?Te(r,t,n,s):St(n,t,void 0,s)}var N=(t,e=null,r)=>_t(t,e,r,{ratio:!0}),ar=(t,e,r,o="borderRadius")=>{if(w(t))return{[o]:t.split(" ").map(n=>{let s=pa(n);return s!==void 0?s:Te(e,r,n)[r]}).join(" ")}};R();var Cn="__smblsThemeRootOwner",En=t=>{let e=t&&t.__prefersListener,r=t&&t.__prefersMq;if(e&&r)try{typeof r.removeEventListener=="function"?r.removeEventListener("change",e):typeof r.removeListener=="function"&&r.removeListener(e)}catch{try{r.removeListener(e)}catch{}}t&&(t.__prefersListener=null,t.__prefersMq=null)},Ix=(t,e,r)=>{if(!(!t||!e)){En(t),t.__prefersListener=r,t.__prefersMq=e;try{e.addEventListener("change",r)}catch{e.addListener(r)}}},qA=(t,e)=>{let r=C(),{cssVars:o}=r,n=e.startsWith("--")?e:`--${e}`;return o[n]=t,t},Xt=t=>t,af={color:Pr,gradient:wn,font:la,fontFamily:Sn,fontfamily:Sn,theme:aa,icons:xo,semanticIcons:Xt,semanticicons:Xt,svg:kn,svgData:Xt,typography:Xt,shadow:Dr,spacing:Xt,media:Xt,grid:Xt,class:Xt,timing:Xt,reset:Xt,unit:Xt,animation:Xt,vars:qA,sizes:Xt,shape:Xt},KA=(t,e,r,o)=>{br(t,r,e);let n={};for(let s of o)t[s]===e&&(t[s]=n);return t.verbose&&console.warn("[scratch] design-system family",r,"resolved to a host object; parked it and allocated a plain bucket"),n},Ig=(t,e,r)=>{let o=C(),n=Wi(t),s=n.toLowerCase(),i=o[n]||o[s]||o[t],a=Ze(i)?KA(o,i,s,[n,s,t]):i,c=af[n]||af[s];if(c)try{let l=c(e,r);return a&&(a[r]=l),a}catch(l){o.verbose&&console.warn("Error setting",s,"value",e,r,l)}if(!c){let l=a||(o[s]={});return l[r]=e,l}o.verbose&&console.warn("Can not find",s,"method in scratch")},Dg=(t,e)=>{let r=C(),o=t.toLowerCase();return Ze(e)?(br(r,o,e),r.verbose&&console.warn("[scratch] ignoring host object passed as the",o,"design-system family"),r[o]||r[t]):e==null?(r.verbose&&console.warn("[scratch] skipping empty design-system family",o),r[o]||r[t]):(Object.keys(e).sort((s,i)=>{let a=S(e[s])||T(e[s])?1:0,c=S(e[i])||T(e[i])?1:0;return a-c}).forEach(s=>{try{return Ig(o,e[s],s)}catch(i){r.verbose&&console.warn("Error setting",o,"value",e[s],s,i)}}),r[o]||r[t])},cf=(t,e)=>{let r=e||C();r.globalTheme=t;let n=Uo(r)||(typeof document<"u"?document:null),s=n&&n.defaultView||(typeof window<"u"?window:null);if(n){let a=r.themeRoot||n.documentElement,c=t&&t!=="auto";if(a[Cn]=r,c)En(r),a.setAttribute("data-theme",t),r.resolvedTheme=t,t==="dark"||t==="light"?a.style.colorScheme=t:a.style.colorScheme="light dark";else if(s&&s.matchMedia){let l=u=>{let d=u.matches?"dark":"light";a.setAttribute("data-theme",d),r.resolvedTheme=d},f=s.matchMedia("(prefers-color-scheme: dark)");l(f),a.style.colorScheme="light dark",Ix(r,f,l)}else En(r),a.setAttribute("data-theme","light"),r.resolvedTheme="light",a.style.colorScheme="light"}let i=r.varPrefix?`--${r.varPrefix}-theme-`:"--theme-";for(let a in r.cssVars)a.startsWith(i)&&delete r.cssVars[a];for(let a in r.cssMediaVars)delete r.cssMediaVars[a];if(n&&r.cssVars){let a=r.scopeSelector||":root",c=n.styleSheets;for(let l=0;l<c.length;l++)try{let f=c[l].cssRules;for(let u=0;u<f.length;u++)if(f[u].selectorText===a){for(let d in r.cssVars)f[u].style.setProperty(d,r.cssVars[d]);return r}}catch{}}return r},GA={},So=(t,e=GA)=>{let r=e.config||C(),{version:o,verbose:n,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:c,useIconSprite:l,globalTheme:f,themeRoot:u,useDocumentTheme:d,useDefaultConfig:h,semanticIcons:g,hoverMedia:p,files:m,assets:b,..._}=t;e.newConfig&&(r=Wl(e.newConfig)),Je(_.document)&&(r.__domDocument=_.document,delete _.document),Je(r.document)&&(r.__domDocument||(r.__domDocument=r.document),r.document={}),m!==void 0&&(r.files=m),b!==void 0&&(r.assets=b),n!==void 0&&(r.verbose=n),s!==void 0&&(r.useVariable=s),i!==void 0&&(r.useReset=i),c!==void 0&&(r.useFontImport=c),a!==void 0&&(r.useSvgSprite=a),l!==void 0&&(r.useIconSprite=l),d!==void 0&&(r.useDocumentTheme=d),f!==void 0&&(r.globalTheme=f),u!==void 0&&(r.themeRoot=u),t.useThemeSuffixedVars!==void 0&&(r.useThemeSuffixedVars=t.useThemeSuffixedVars),h!==void 0&&(r.useDefaultConfig=h),g!==void 0&&(r.semanticIcons=g),p!==void 0&&(r.hoverMedia=p),r.verbose&&console.log(r);let x=Uo(r)||(typeof document<"u"?document:null),k=x&&x.defaultView||(typeof window<"u"?window:null),E=x&&(r.themeRoot||x.documentElement);if(E&&typeof E.setAttribute=="function")if(r.globalTheme&&r.globalTheme!=="auto")En(r),E.setAttribute("data-theme",r.globalTheme),r.resolvedTheme=r.globalTheme,E[Cn]=r,r.globalTheme==="dark"||r.globalTheme==="light"?E.style.colorScheme=r.globalTheme:E.style.colorScheme="light dark";else if(E[Cn]&&E[Cn]!==r&&E.hasAttribute("data-theme"))En(r),r.resolvedTheme=E.getAttribute("data-theme");else if(k&&k.matchMedia){let z=rt=>{let at=rt.matches?"dark":"light";E.setAttribute("data-theme",at),r.resolvedTheme=at},V=k.matchMedia("(prefers-color-scheme: dark)");z(V),E.style.colorScheme="light dark",E[Cn]=r,Ix(r,V,z)}else En(r),E.setAttribute("data-theme","light"),r.resolvedTheme="light",E.style.colorScheme="light",E[Cn]=r;r.__svgCache||(r.__svgCache={});let O=Object.keys(_).filter(I=>!I.startsWith("__")),$=new Set(O);if(O.forEach(I=>{let z=I.toLowerCase();z!==I&&$.has(z)&&st(_[z],_[I],ee)}),O.map(I=>{let z=I.toLowerCase();if(!(z!==I&&$.has(z)))return Dg(I,_[I])}),r.varPrefix&&(r.typography&&(r.typography.varPrefix=r.varPrefix),r.spacing&&(r.spacing.varPrefix=r.varPrefix),r.timing&&(r.timing.varPrefix=r.varPrefix)),_.typography)try{ua()}catch(I){r.verbose&&console.warn("Error applying typography sequence",I)}if(_.spacing)try{ra()}catch(I){r.verbose&&console.warn("Error applying spacing sequence",I)}if(_.timing)try{ha()}catch(I){r.verbose&&console.warn("Error applying timing sequence",I)}ga();let D=ya();return D&&(r.reset=D),r};var ko=new Map,Bx=null,Mg=null,YA=null;function wa(t){t.batchAtomicCss&&(Mg=t.batchAtomicCss),t.compoundCssClass&&(YA=t.compoundCssClass)}var XA=new Set,$x=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function Fg(t){try{let e=C();e&&(e.__domDocument=t)}catch{}t&&XA.add(t)}function pf(){try{let t=C();if(t){if($x(t.__domDocument))return t.__domDocument;if($x(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var Jt={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};function hf(){return{...Jt}}function Ng(){for(let t in Jt)Jt[t]=0;uf=!1}var uf=!1,ff=(t,e)=>`${t} ${e}${t===1?"":"s"}`;function JA(t){let e=Date.parse(t);if(!isFinite(e))return"";let r=Math.floor((Date.now()-e)/864e5);return r<1?" (today)":` (${ff(r,"day")} ago)`}function ZA(){try{let t=gf();return t&&t.cssRules?t.cssRules.length:-1}catch{return-1}}function QA(t,e){if(uf)return!1;uf=!0;let r="n/a \u2014 running from src/ (unbuilt), so no dist is in play",o="this IS the source",n="@symbo.ls/css";return console.error(`[@symbo.ls/css] CSS EMIT FAILURE (${t}) \u2014 the engine emitted ${ff(Jt.variable,"variable rule")} and ${ff(Jt.atomic,"atomic rule")}, while the design system held ${ff(e,"CSS variable")}.
41
41
  The document will render UNSTYLED and nothing else will report an error.
42
42
  This is what a STALE dist/ looks like: an obsolete emitter against a current design system.
43
43
  package : ${n}
44
44
  built : ${r}
45
45
  source : ${o}
46
46
  emitted : ${JSON.stringify(Jt)}
47
- sheet : style[data-smbls] currently holds ${XA()} rule(s)
47
+ sheet : style[data-smbls] currently holds ${ZA()} rule(s)
48
48
  FIX : cd smbls && npm run check:stale # every package whose src is newer than its dist
49
49
  then rebuild the listed packages and clear the app's .parcel-cache
50
- Do NOT trust any browser measurement taken on this page until that reads clean.`),!0}function Nx(){try{let t=C(),e=t&&(t.CSS_VARS||t.cssVars);return e?Object.keys(e).length:0}catch{return 0}}function Ix(t){lf||Jt.variable>0||Jt.atomic>0||jx(Math.max(t,Nx()))}function Mg(t){let e=t&&(t.CSS_VARS||t.cssVars);return jx(e?Object.keys(e).length:Nx())}function jx(t){let e=df();if(t===0)return{ok:!0,reason:"no-design-system",stats:e,varCount:t};if(!pf())return{ok:!0,reason:"no-sheet",stats:e,varCount:t};if(e.variable>0||e.atomic>0)return{ok:!0,reason:null,stats:e,varCount:t};let r=e.invalid>0?"every rule was rejected as malformed":"no rule was ever produced";return JA(r,t),{ok:!1,reason:r,stats:e,varCount:t}}var ZA={display:"d",position:"pos",padding:"p",paddingTop:"pt",paddingRight:"pr",paddingBottom:"pb",paddingLeft:"pl",margin:"m",marginTop:"mt",marginRight:"mr",marginBottom:"mb",marginLeft:"ml",width:"w",height:"h",minWidth:"mnw",minHeight:"mnh",maxWidth:"mxw",maxHeight:"mxh",top:"t",right:"r",bottom:"b",left:"l",flex:"fx",flexDirection:"fxd",flexWrap:"fxw",flexGrow:"fxg",flexShrink:"fxs",flexBasis:"fxb",justifyContent:"jc",alignItems:"ai",alignSelf:"as",alignContent:"ac",gap:"g",rowGap:"rg",columnGap:"cg",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",gridColumn:"gc",gridRow:"gr",overflow:"of",overflowX:"ofx",overflowY:"ofy",fontSize:"fs",fontWeight:"fw",fontFamily:"ff",fontStyle:"fst",lineHeight:"lh",letterSpacing:"ls",textAlign:"ta",textDecoration:"td",textTransform:"tt",color:"c",background:"bg",backgroundColor:"bgc",backgroundImage:"bgi",border:"bd",borderRadius:"br",borderColor:"bdc",borderWidth:"bdw",borderStyle:"bds",boxShadow:"bxsh",opacity:"op",zIndex:"z",cursor:"cur",transition:"tr",transform:"tf",animation:"an",visibility:"vis",whiteSpace:"ws",wordBreak:"wb",objectFit:"obj",pointerEvents:"pe",userSelect:"us",boxSizing:"bxz",outline:"ol",listStyle:"lis",textOverflow:"txo",verticalAlign:"va",float:"fl",clear:"cl",content:"cnt",backdropFilter:"bdf",filter:"flt",resize:"rsz",appearance:"apr",fill:"fil",stroke:"stk"};function ko(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function ff(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e.toString(36)}function QA(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():ff(e)}var tT={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select"};function En(t,e){let r=tT[t];return r?`${t}:${e};${r}:${e};`:`${t}:${e};`}var eT="@media (hover: hover)",rT=/(?:^|[^\\]):hover(?![\w-])/;function Fg(){try{let t=C();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function Oe(t,e,r){return r===!1||!rT.test(e)||r===void 0&&!Fg()?t:`${eT}{${t}}`}function Dx(t,e,r){let o=(r?r+"":"")+t+":"+e,n=So.get(o),s=n?null:ko(t);if(!n){let c=ZA[t]||ff(t),l=QA(e);n=r?`_${r}_${c}-${l}`:`_${c}-${l}`,So.set(o,n)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return n;let i=s||ko(t),a=`.${n}{${En(i,e)}}`;return be(a,void 0,"atomic"),n}var $x=new WeakMap,Lx=new WeakMap;function be(t,e,r){let o=pf(e);if(!o)return Jt.dropped++,"dropped";let n=$x.get(o);if(n||(n=new Set,$x.set(o,n)),n.has(t))return Jt.duplicate++,Jt[r||"global"]++,"duplicate";let s=Lx.get(o);if(s&&s.has(t))return Jt.invalid++,"invalid";try{o.insertRule(t,o.cssRules.length)}catch{return s||(s=new Set,Lx.set(o,s)),s.add(t),Jt.invalid++,"invalid"}return n.add(t),Jt[r||"global"]++,"inserted"}var Mx=new WeakMap;function pf(t){let e=t||uf();if(!e||!e.head)return null;let r=Mx.get(e);if(r&&r.ownerNode&&r.ownerNode.parentNode===e.head)return r;let o=e.head.querySelector("style[data-smbls]");o||(o=e.createElement("style"),o.setAttribute("data-smbls",""),e.head.appendChild(o));let n=o.sheet;return Mx.set(e,n),Fx=n,n}var oT=8;function _e(t,e,r){if(!t||typeof t!="object")return"";let o=null,n=0,s=[],i=[];for(let c in t){let l=t[c];l==null||l===!1||l===""||(typeof l=="object"?i.push([c,l]):Dg?(o||(o=[]),o.push(c,String(l)),n++):s.push(Dx(c,String(l),r)))}if(o&&n>=oT){let c=o.join("\0"),l=Dg(c),f=l.indexOf("\0"),u=l.substring(0,f),d=l.substring(f+1);if(d){let h=d.split(`
51
- `);for(let g=0;g<h.length;g++)h[g]&&be(h[g],void 0,"atomic")}s.push(u)}else if(o)for(let c=0;c<o.length;c+=2)s.push(Dx(o[c],o[c+1],r));let a=[];for(let c=0;c<i.length;c++)a.push(iT(i[c][0],i[c][1],r));return s.concat(a).join(" ").trim()}var Ig=new Map,nT=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function sT(t){return typeof t!="string"||!t||t.startsWith("@media")||t.startsWith("@supports")?!1:t.split(",").every(e=>nT.test(e.trim()))}function iT(t,e,r){let o=JSON.stringify(e),n=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,s=n&&Fg(),i=(r?r+"":"")+t+o+(n&&!s?"rawhover":""),a=So.get(i);if(a){let b=Ig.get(a);if(b)for(let _=0;_<b.length;_++)be(b[_],void 0,"atomic");return a}a=r?`_${r}_c${ff(i)}`:`_c${ff(i)}`;let c=`.${a}`,l=sT(t)?`.${a}.${a}`:c,f="",u=[],d=b=>typeof b=="string"&&(b.indexOf("{")!==-1||b.indexOf("}")!==-1),h=(b,_)=>{let y="";for(let x in _){let k=_[x];if(k!=null)if(typeof k=="object")h([...b,x],k);else{if(d(k))continue;y+=En(ko(x),k)}}y&&(b.length===0?f+=y:u.push({chain:b,body:y}))};h([],e);let g=b=>{let _=b.length===1?l:c;if(!b.length)return _;let y=b[0].split(",").map(x=>x.trim()).map(x=>x.includes("&")?x.replace(/&/g,_):x.startsWith(":")?`${_}${x}`:`${_} ${x}`);for(let x=1;x<b.length;x++){let k=b[x].split(",").map(O=>O.trim()),E=[];for(let O of y)for(let $ of k)$.includes("&")?E.push($.replace(/&/g,O)):$.startsWith(":")?E.push(O+$):E.push(O+" "+$);y=E}return y.join(", ")},p=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(f){let b=`${t}{${c}{${f}}}`;p.push(b),be(b,void 0,"atomic")}for(let b of u){let _=g(b.chain),y=Oe(`${t}{${_}{${b.body}}}`,_,s);p.push(y),be(y,void 0,"atomic")}return Ig.set(a,p),So.set(i,a),a}let m=g([t]);if(f){let b=Oe(`${m}{${f}}`,m,s);p.push(b),be(b,void 0,"atomic")}for(let b of u){let _=g([t,...b.chain]),y=Oe(`${_}{${b.body}}`,_,s);p.push(y),be(y,void 0,"atomic")}return Ig.set(a,p),So.set(i,a),a}function kt(t){if(t==null||typeof t!="string"&&typeof t!="object")return;if(pf(),typeof t=="string"){let s=t.indexOf("--")!==-1;be(t,void 0,s?"variable":"global"),s&&Ix(1);return}let e=Fg(),r=0,o=Object.keys(t),n=s=>{let i=s.match(/max-width:\s*(\d+)/);return i?parseInt(i[1]):0};o.sort((s,i)=>{let a=s.startsWith("@media"),c=i.startsWith("@media");return!a&&!c?0:a?c?n(i)-n(s):1:-1});for(let s of o){let i=t[s];if(s.startsWith("@media")||s.startsWith("@supports"))for(let a in i){let c=i[a];if(typeof c=="object"&&c!==null){let l="",f=0;for(let u in c){let d=u.charCodeAt(0)===45&&u.charCodeAt(1)===45;d&&f++;let h=d?u:ko(u);l+=En(h,c[u])}r+=f,be(Oe(`${s}{${a}{${l}}}`,a,e),void 0,f?"variable":"global")}else{let l=a.charCodeAt(0)===45&&a.charCodeAt(1)===45;l&&r++;let f=l?a:ko(a);be(`${s}{${En(f,c)}}`,void 0,l?"variable":"global")}}else{let a="",c=!1,l=0;for(let f in i){let u=i[f];if(typeof u=="object"&&u!==null)c=!0;else{let d=f.charCodeAt(0)===45&&f.charCodeAt(1)===45;d&&l++;let h=d?f:ko(f);a+=En(h,u)}}if(r+=l,a&&be(Oe(`${s}{${a}}`,s,e),void 0,l?"variable":"global"),c){let f=[],u=[];for(let d in i)typeof i[d]=="object"&&i[d]!==null&&(d.startsWith("@media")||d.startsWith("@supports")?f.push(d):u.push(d));f.sort((d,h)=>{let g=p=>{let m=p.match(/max-width:\s*(\d+)/);return m?parseInt(m[1]):0};return g(h)-g(d)});for(let d of u)kt({[`${s} ${d}`]:i[d]});for(let d of f)kt({[d]:{[s]:i[d]}})}}}r>0&&Ix(r)}function An(t,e){let r="";for(let o in e){let n="";for(let s in e[o])n+=En(ko(s),e[o][s]);r+=`${o}{${n}}`}return be(`@keyframes ${t}{${r}}`,void 0,"keyframes"),t}function Bx(){So.clear(),Fx=null}function Ng(){return So.size}R();var Om={};P(Om,{DELEGATED_EVENTS:()=>In,LIFECYCLE_EVENTS:()=>Mr,MIXINS:()=>hf,NON_BUBBLING_EVENTS:()=>gf,REGISTRY:()=>jt,SVG_TAGS:()=>Rn,addDelegatedEvent:()=>wa,addMethods:()=>Nn,applyExtends:()=>$n,cacheNode:()=>Lr,create:()=>ne,createHTMLNode:()=>On,detectTag:()=>$r,dispose:()=>Br,flushMounts:()=>Oa,globalEventKeyInfo:()=>mf,isSvgTag:()=>Pn,isValidTag:()=>Tn,refreshContextProto:()=>Sf,registerEvent:()=>Dn,registerGlobalEvent:()=>yf,remove:()=>Fn,removeDelegatedEvent:()=>Sa,update:()=>Ln});var Bg="http://www.w3.org/2000/svg",Rn=new Set(["svg","path","circle","ellipse","line","polyline","polygon","rect","g","defs","use","symbol","clipPath","mask","pattern","image","text","tspan","textPath","marker","linearGradient","radialGradient","stop","filter","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","animate","animateMotion","animateTransform","set","foreignObject","desc","title","metadata"]),aT=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","string","fragment","shadow"]);function Tn(t){return aT.has(t)||Rn.has(t)}function Pn(t){return Rn.has(t)}function $r(t){let{tag:e,key:r}=t;if(typeof e=="function")try{e=e(t,t.state,t.context)}catch(s){e=void 0,typeof console<"u"&&console.error&&console.error(`[smbls] \`tag:\` factory threw on "${r||"<anon>"}" \u2014 falling back to key-based tag detection:`,s?.message||s)}if(e===!0&&(e=r),typeof e=="string"&&Tn(e))return e;if(!r||typeof r!="string")return"div";let o=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]),n=r.toLowerCase();return n.includes(".")&&(n=n.split(".")[0]),n.includes("_")&&(n=n.split("_")[0]),Tn(n)&&!o.has(n)?n:"div"}var Ux={};function On(t,e){let r=e?.context?.document||globalThis.document;if(!r)return null;if(t==="string")return r.createTextNode(e?.text||"");if(t==="fragment")return r.createDocumentFragment();if(Pn(t)){let o=e?.parent;if(t==="svg"||o?.node?.namespaceURI===Bg)return r.createElementNS(Bg,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Lr(t){let e=t.tag=$r(t),o=Pn(e)&&(e==="svg"||t.parent?.node?.namespaceURI===Bg)?"svg:"+e:e,n=t?.context?.document||globalThis.document,s=Ux[o];if(s||(s=Ux[o]=On(e,t)),!s)return null;let i=n&&s.ownerDocument!==n?On(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var jt=new Set(["extends","children","content","childrenAs","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","autoGrow","__name","__ref","__hash","__text","parent","node"]),hf={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},Mr=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","mounted","contentUpdate","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","beforeRemove","remove"]),gf=new Set(["load","error","abort","scroll","canplay","canplaythrough","ended","pause","play","playing","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","durationchange","loadeddata","loadedmetadata","progress","emptied","resize"]),Ug=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),In=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","pointerdown","pointerup","pointermove","pointerenter","pointerleave","pointerover","pointerout","touchstart","touchend","touchmove","keydown","keyup","keypress","input","change","submit","reset","focus","blur","focusin","focusout","wheel","contextmenu","drag","dragstart","dragend","dragenter","dragleave","dragover","drop"]);var zg=new WeakMap,cT={passive:!0},lT={passive:!0,capture:!0},Hg=(t,e)=>Ug.has(t)?e?lT:cT:e||!1;function zx(t){let e=zg.get(t);return e||(e={handlers:new Map,installed:new Set},zg.set(t,e)),e}function fT(t,e){let r=zx(e);if(r.installed.has(t))return;r.installed.add(t);let o=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave",n=t==="mouseenter"||t==="mouseleave";e.addEventListener(t,s=>{let i=s.target;for(;i&&i!==e;){let a=r.handlers.get(t);if(a){let c=a.get(i);if(c){if(n&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(c(s),s.cancelBubble)return}}i=i.parentNode}},Hg(t,o))}function wa(t,e,r,o){o||(o=e.ownerDocument?.documentElement||e.getRootNode());let n=zx(o);fT(t,o),n.handlers.has(t)||n.handlers.set(t,new WeakMap),n.handlers.get(t).set(e,r)}function Sa(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let o=zg.get(r);if(!o)return;let n=o.handlers.get(t);n&&n.delete(e)}function Vx(t){return In.has(t)&&!Mr.has(t)}function Hx(t,e){let{context:r}=t,o=r?.designSystem;return n=>{o&&it(o);try{let s=e.call(t,n,t,t.state,r);if(s&&typeof s.then=="function"){s.catch(i=>{t.error=i,console.error("[DOMQL] Async event error:",i)}).finally(()=>{o&&tt()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),r?.strictMode)throw s}o&&tt()}}function Dn(t,e,r){let{node:o,context:n}=e;if(!o)return;let s=Hx(e,r),i=gf.has(t);if(!i&&Vx(t)){let a=n?.rootNode||o.ownerDocument?.documentElement;wa(t,o,s,a)}else o.addEventListener(t,s,Hg(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!i&&Vx(t)){let a=n?.rootNode||o.ownerDocument?.documentElement;Sa(t,o,a)}else o.removeEventListener(t,s,Hg(t,!1))})}var Vg=[["onDocument","document"],["onWindow","window"]];function mf(t){if(typeof t!="string")return null;for(let e=0;e<Vg.length;e++){let r=Vg[e][0];if(t.length<=r.length||!t.startsWith(r))continue;let o=t.charCodeAt(r.length);if(!(o<65||o>90))return{target:Vg[e][1],eventName:t.slice(r.length).toLowerCase()}}return null}var uT=/^[A-Za-z_$][\w$]*$/;function dT(t,e,r){let o=e,n=!1,s,i=!1;if(e&&typeof e=="object"&&typeof e!="function"&&(o=e.handler,n=!!e.capture,i=!!e.once,typeof e.passive=="boolean"&&(s=e.passive)),typeof o=="string"&&uT.test(o)){let a=o;o=function(l){return t.call(a,l)}}return typeof o!="function"?null:(s===void 0&&(s=Ug.has(r)),{handler:o,capture:n,passive:s,once:i})}function pT(t,e){let r=t.node?.ownerDocument||t.context?.document||(typeof document<"u"?document:null);if(!r||typeof r.addEventListener!="function")return null;if(e==="document")return r;let o=r.defaultView||(typeof window<"u"?window:null);return o&&typeof o.addEventListener=="function"?o:null}function hT(t){let e=t.node;if(!e)return!1;let r=e.nodeType===11?t.__ref?.__fragmentAnchor:e;return r?r.isConnected!==!1:!1}function yf(t,e,r){let o=e.__ref;if(!o)return;let n=dT(e,r,t.eventName);if(!n)return;let s=pT(e,t.target);if(!s)return;o.__globalEvents||(o.__globalEvents=new Map);let i=t.target+":"+t.eventName+":"+(n.capture?1:0);if(o.__globalEvents.has(i))return;let a=Hx(e,n.handler),c=f=>{hT(e)&&a(f)},l={capture:n.capture,passive:n.passive,once:n.once};s.addEventListener(t.eventName,c,l),o.__globalEvents.set(i,{target:s,eventName:t.eventName,listener:c,options:l}),o.__eventCleanup||(o.__eventCleanup=[]),o.__eventCleanup.push(()=>{s.removeEventListener(t.eventName,c,l),o.__globalEvents&&o.__globalEvents.delete(i)})}function Wx(t){let e=[];return t.extends&&(Array.isArray(t.extends)?e.push(...t.extends):e.push(t.extends)),t.extend&&(Array.isArray(t.extend)?e.push(...t.extend):e.push(t.extend)),e}function $n(t,e,r){let o=Wx(e);if(!o.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<o.length;i++){let a=qx(o[i],s);a&&a!==e&&Kx(t,a,r,new Set([e]))}}function qx(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(n=>n.trim()),o=e[r[0]]||e[`smbls.${r[0]}`];for(let n=1;n<r.length&&o;n++)o=o[r[n]];return o||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function Kx(t,e,r,o=new Set){if(o.has(e))return;o.add(e);let n=Wx(e);if(n.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<n.length;a++){let c=qx(n[a],i);c&&Kx(t,c,r,o)}}for(let s in e){if(s==="extends"||s==="extend")continue;let i=e[s];t[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[s]={...i}:t[s]=i:typeof t[s]=="object"&&typeof i=="object"&&!Array.isArray(t[s])&&!Array.isArray(i)&&t[s]!==null&&i!==null?t[s]=Gx(t[s],i):t[s]=i}}function Gx(t,e){let r={...t};for(let o in e){let n=r[o],s=e[o];n&&s&&typeof n=="object"&&typeof s=="object"&&!Array.isArray(n)&&!Array.isArray(s)&&typeof n!="function"&&typeof s!="function"?r[o]=Gx(n,s):r[o]=s}return r}Yo();R();var gT=["alert","alertdialog","application","article","banner","button","cell","checkbox","columnheader","combobox","complementary","contentinfo","definition","dialog","directory","document","feed","figure","form","grid","gridcell","group","heading","img","link","list","listbox","listitem","log","main","marquee","math","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","navigation","none","note","option","presentation","progressbar","radio","radiogroup","region","row","rowgroup","rowheader","scrollbar","search","searchbox","separator","slider","spinbutton","status","switch","tab","table","tablist","tabpanel","term","textbox","timer","toolbar","tooltip","tree","treegrid","treeitem"],bf={default:["accesskey","autofocus","class","contenteditable","contextmenu","dir","draggable","hidden","id","lang","part","placeholder","slot","spellcheck","style","tabindex","title","translate","inert","radiogroup","role","about","datatype","inlist","prefix","property","resource","typeof","vocab","autocapitalize","autocorrect","autosave","color","itemprop","itemscope","itemtype","itemid","itemref","results","security","unselectable","is"],a:["accesskey","charset","coords","download","href","hreflang","name","rel","rev","shape","target","type"],aria:["aria-activedescendant","aria-atomic","aria-autocomplete","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],anchor:["download","href","hreflang","media","ping","rel","target","type","referrerpolicy"],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],area:["alt","coords","download","href","hreflang","media","referrerpolicy","rel","shape","target","ping"],base:["href","target"],blockquote:["cite"],button:["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","type","value"],canvas:["height","width"],col:["span","width"],colgroup:["span"],data:["value"],details:["open"],del:["cite","datetime"],dialog:["open"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],form:["acceptcharset","action","autocomplete","enctype","method","name","novalidate","target","rel"],html:["manifest"],iframe:["allow","allowfullscreen","allowtransparency","frameborder","height","loading","marginheight","marginwidth","mozallowfullscreen","name","referrerpolicy","sandbox","scrolling","seamless","src","srcdoc","webkitallowfullscreen","width"],img:["alt","crossorigin","decoding","height","ismap","loading","referrerpolicy","sizes","src","srcset","usemap","width"],ins:["cite","datetime"],input:["accept","alt","autocomplete","capture","checked","crossorigin","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","indeterminate","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","type","value","width"],keygen:["challenge","disabled","form","keytype","keyparams","name"],label:["form","for"],li:["value"],link:["as","crossorigin","href","hreflang","integrity","media","imagesrcset","imagesizes","referrerpolicy","rel","sizes","type","charset"],map:["name"],menu:["type"],media:["autoplay","controls","currenttime","defaultmuted","defaultplaybackrate","loop","mediagroup","muted","playsinline","preload","src","volume"],meta:["charset","content","http-equiv","name","media"],meter:["form","high","low","max","min","optimum","value"],quote:["cite"],object:["classid","data","form","height","name","type","usemap","width","wmode"],ol:["reversed","start","type"],optgroup:["disabled","label"],option:["disabled","label","selected","value"],output:["form","for","name"],param:["name","value"],progress:["max","value"],slot:["name"],script:["async","charset","crossorigin","defer","integrity","nomodule","nonce","referrerpolicy","src","type"],select:["autocomplete","disabled","form","multiple","name","required","size","value","onchange"],source:["height","media","sizes","src","srcset","type","width"],style:["media","nonce","scoped","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],textarea:["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","value","wrap"],td:["align","colspan","headers","rowspan","scope","abbr","height","width","valign"],th:["align","colspan","headers","rowspan","scope","abbr"],time:["datetime"],track:["default","kind","label","src","srclang"],video:["autoplay","controls","crossorigin","disablepictureinpicture","disableremoteplayback","height","loop","muted","playsinline","poster","preload","src","width"],svg:["className","class","color","height","id","lang","max","media","method","min","name","style","target","type","width","role","tabindex","crossorigin","accent-height","accumulate","additive","alignment-baseline","allowReorder","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","clip","clip-path","clipPathUnits","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","focusable","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","href","horiz-adv-x","horiz-origin-x","ideographic","image-rendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","markerHeight","marker-mid","marker-start","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","paint-order","panose-1","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","surfaceScale","systemLanguage","tableValues","targetX","targetY","text-anchor","text-decoration","textLength","text-rendering","to","transform","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","values","vector-effect","version","vert-adv-y","vert-origin-x","vert-origin-y","v-hanging","v-ideographic","viewBox","viewTarget","visibility","v-mathematical","widths","word-spacing","writing-mode","x1","x2","x","xChannelSelector","x-height","xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xmlns","xmlns:xlink","xml:space","y1","y2","y","yChannelSelector","z","zoomAndPan"]},Xx=["oncopy","oncut","onpaste","oncompositionend","oncompositionstart","oncompositionupdate","onfocus","onfocusin","onfocusout","onblur","onchange","onbeforeinput","oninput","onreset","onsubmit","oninvalid","onformdata","onload","onerror","ontoggle","onkeydown","onkeypress","onkeyup","onabort","oncanplay","oncanplaythrough","oncuechange","ondurationchange","onemptied","onencrypted","onended","onloadeddata","onloadedmetadata","onloadstart","onpause","onplay","onplaying","onprogress","onratechange","onseeked","onseeking","onstalled","onsuspend","ontimeupdate","onvolumechange","onwaiting","onauxclick","onclick","oncontextmenu","ondblclick","ondrag","ondragend","ondragenter","ondragexit","ondragleave","ondragover","ondragstart","ondrop","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onselect","onselectionchange","onselectstart","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ongotpointercapture","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onlostpointercapture","onscroll","onresize","onwheel","onanimationstart","onanimationend","onanimationiteration","ontransitionstart","ontransitionrun","ontransitionend","ontransitioncancel","onoutrostart","onoutroend","onintrostart","onintroend","onmessage","onmessageerror","onvisibilitychange","oncancel","onclose","onfullscreenchange","onfullscreenerror"],Nr=t=>t.startsWith("aria")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"aria-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):t.startsWith("data")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"data-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):Jx(t),mT=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate"]),Jx=t=>mT.has(t)?t.toLowerCase():null,yT=new Set(["draggable","contenteditable","spellcheck","autocorrect"]),cr=t=>typeof t=="string"&&(yT.has(t)||t.startsWith("aria-")),Ke=(t,e)=>e!==!0&&e!==!1?e:cr(t)?e?"true":"false":e===!0?"":e,jr=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Nr(e)||bf.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(bf,t)?bf[t].includes(e):!1,Kg=t=>{if(!w(t))return!1;let e=t.toLowerCase();return Xx.includes(e)},bT=(t,e,r)=>{let o={};for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(r&&n in r)continue;if(n==="aria"&&e[n]&&typeof e[n]=="object"){for(let a in e[n])bt(e[n][a])&&(o["aria-"+a]=e[n][a]);continue}if(n==="data"&&e[n]&&typeof e[n]=="object"){for(let a in e[n])if(bt(e[n][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());o["data-"+c]=e[n][a]}continue}let s=jr(t,n),i=Kg(n);if(bt(e[n])&&(s||i)){let a=Nr(n)||n;o[a]=e[n]}}return o},_T=(t,e)=>{let r={};if(t.attr)for(let o in t.attr)r[o]=t.attr[o](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let n=t.aria[o];typeof n=="function"&&(r["aria-"+o]=n(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let o in t.data){let n=t.data[o];if(typeof n=="function"){let s=o.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());r["data-"+s]=n(e,e.state,e.context)}}return r},Fr=(t,e)=>{let r=t.call("exec",e,t);if(r)return w(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},Wg=(t,e)=>{let r=(t.preSrc||"")+(Fr(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:o}=t;if(!o.files&&!o.assets)return r;if(r.startsWith("/assets/")){let n=r.slice(8),s=o.assets&&(o.assets[r]||o.assets[n]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let n=r.slice(7),s=o.files&&(o.files[r]||o.files[n]);return s&&s.content?s.content.src:r}if(o.assets){let n=o.assets[r];if(n&&n.content)return n.content.src}if(o.files){let n=o.files[r];if(n&&n.content)return n.content.src}return r},qg={src:t=>Wg(t,t.src),href:t=>Fr(t,t.href),action:t=>Fr(t,t.action),poster:t=>Wg(t,t.poster),data:t=>Fr(t,t.data)},Gg=t=>{let e=t.tag||"div",r={};for(let o in qg)if(t[o]!==void 0&&jr(e,o)){let n=qg[o](t);n!==void 0&&(r[o]=n)}return r},Yx=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},xT=(t,e,r)=>{if(t==="$"){let n=Yx(e,r);return n===void 0&&(n=!!r[e]),n}let o=r[e]===!0||r.state[e];if(!o){let n=Yx(e,r);n!==void 0&&(o=n)}return t==="."?!!o:!o},wT=new Set(["$",".","!"]),ST=(t,e,r)=>{let o={},n=(s,i,a,c)=>{let l=i;o[s]=f=>{if(xT(a,c,f))return A(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!wT.has(i))continue;let a=t[s];if(!a||typeof a!="object")continue;let c=s.slice(1);for(let l in a){if(r&&l in r)continue;if(l==="aria"&&a[l]&&typeof a[l]=="object"){for(let h in a[l])n("aria-"+h,a[l][h],i,c);continue}if(l==="data"&&a[l]&&typeof a[l]=="object"){for(let h in a[l]){let g=h.replace(/([A-Z])/g,p=>"-"+p.toLowerCase());n("data-"+g,a[l][h],i,c)}continue}let f=jr(e,l),u=Kg(l);if(!f&&!u)continue;let d=Nr(l)||l;n(d,a[l],i,c)}}return o};function Ln(t={},e={}){let r=this,o=r.__ref;if(!o)return;if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof r.onBeforeUpdate=="function"&&Yg(o))try{let s=r.onBeforeUpdate(r,r.state,r.context,e);if(s&&typeof s.then=="function")s.then(()=>lr(o,!1),i=>{lr(o,!0),r.context?.plugins?.length&&At("error",r,{hook:"onBeforeUpdate",error:i})||console.error("[DOMQL] onBeforeUpdate error:",i)});else if(lr(o,!1),s===!1)return r}catch(s){throw lr(o,!0),s}let n=!t||Object.keys(t).length===0;if(wc(()=>{if(t.state&&yt(r.state)&&r.state.$update(t.state),t.text!==void 0&&(r.text=t.text,!o.__exec.text&&r.node&&Mn(r,t.text??"")),t.html!==void 0&&(r.html=t.html,!o.__exec.html&&r.node&&(r.node.innerHTML=t.html)),t.style&&r.node?.style){if(!o.__exec.style)for(let s in t.style){let i=t.style[s];if(i==null)continue;let a=s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=String(i).replace(/\s*!important\s*$/,"");r.node.style.setProperty(a,c,"important")}r.style||(r.style={}),Object.assign(r.style,t.style)}if(t.attr&&r.node?.setAttribute){for(let s in t.attr){let i=t.attr[s];i==null||i===!1&&!cr(s)?r.node.removeAttribute(s):typeof i!="function"&&typeof i!="object"&&r.node.setAttribute(s,Ke(s,i))}r.attr||(r.attr={}),Object.assign(r.attr,t.attr)}if(t.data&&r.node?.dataset){for(let s in t.data)r.node.dataset[s]=t.data[s];r.data||(r.data={}),Object.assign(r.data,t.data)}for(let s in t){if(jt.has(s)||s==="state")continue;let i=t[s],a=r[s];if(a&&a.__ref&&typeof a.update=="function")a.update(i,e);else if(typeof i=="object"&&i!==null){let c=s.charCodeAt(0);c>=65&&c<=90&&ne(i,r,s,e)}else s!=="text"&&s!=="html"&&s!=="style"&&s!=="attr"&&s!=="data"&&(r[s]=i)}}),r.node&&n&&o.__effects&&o.__effects.length)for(let s=0;s<o.__effects.length;s++){let i=o.__effects[s];i&&!i._disposed&&!i._isSubscribeToEffect&&typeof i._execute=="function"&&i._execute()}else if(r.node&&o.__conditionalRunners)for(let s of o.__conditionalRunners)s();return At("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}function Br(t){if(!t)return;let e=t.__ref;if(!e)return;try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(o){console.error("[smbls] onBeforeRemove error:",o)}if(e.__effects){for(let o=0;o<e.__effects.length;o++)e.__effects[o].dispose();e.__effects.length=0}if(e.__eventCleanup){for(let o=0;o<e.__eventCleanup.length;o++)e.__eventCleanup[o]();e.__eventCleanup.length=0}if(e.__children){let o=e.__children.slice();e.__children.length=0;for(let n=0;n<o.length;n++){let s=t[o[n]];s&&s.__ref&&Br(s)}}t.node?.parentNode?t.node.remove():t.tag==="fragment"&&e.__fragmentAnchor?.parentNode&&e.__fragmentAnchor.remove();let r=t.state?.$destroy||t.state?.destroy;if(typeof r=="function"&&t.state.__element===t&&r.call(t.state),t.parent?.__ref?.__children){let o=t.parent.__ref.__children.indexOf(t.key);o!==-1&&t.parent.__ref.__children.splice(o,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(o){console.error("[smbls] onRemove error:",o)}t.node=null,t.parent=null,t.__ref=null}function Fn(){Br(this)}R();R();R();var kT=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],vT=["none","forwards","backwards","both"],CT=["normal","reverse","alternate","alternate-reverse"],ET=["running","paused"],AT=t=>/^[\d.]+m?s$/.test(t),TT=/^(?:translate(?:3d|x|y|z)?\((?:\s*0[a-z%]*\s*,?)+\)|scale(?:3d|x|y|z)?\((?:\s*1(?:\.0+)?\s*,?)+\)|rotate(?:3d|x|y|z)?\((?:\s*0[a-z%]*\s*,?)+\)|skew(?:x|y)?\((?:\s*0[a-z%]*\s*,?)+\)|matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\))$/,OT=t=>{let e=String(t).trim().toLowerCase();if(e===""||e==="none"||e==="initial"||e==="unset")return!0;let r=e.match(/[a-z0-9]+\([^()]*\)/g);return!r||r.join("").replace(/\s+/g,"")!==e.replace(/\s+/g,"")?!1:r.every(o=>TT.test(o.replace(/\s+/g,"")))},Zx=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),RT={transform:OT,translate:Zx,rotate:t=>Zx(t)||/^\s*(?:[xyz]\s+)?0(?:deg|rad|turn|grad)?\s*$/.test(String(t).toLowerCase()),scale:t=>/^(none|initial|unset)$/.test(String(t).trim().toLowerCase())||/^(?:\s*1(?:\.0+)?)+\s*$/.test(String(t)),opacity:t=>/^(initial|unset)$/.test(String(t).trim().toLowerCase())||Number(t)===1},PT=t=>{let e=String(t).trim().toLowerCase();if(e==="from")return 0;if(e==="to")return 100;let r=e.match(/^(\d+(?:\.\d+)?)%$/);return r?Number(r[1]):null},IT=t=>{if(!S(t))return null;let e=null,r=-1;for(let o in t){let n=PT(o);n==null||!S(t[o])||n>=r&&(r=n,e=t[o])}return e},DT=t=>{let e=IT(t);if(!e)return!1;let r=Object.keys(e);if(!r.length)return!1;for(let o of r){let n=RT[o];if(!n)return!1;let s=e[o];if(s==null||typeof s=="object"||typeof s=="function"||!n(s))return!1}return!0},$T=(t,e)=>{if(S(t))return t;let{animation:r}=e.context&&e.context.designSystem||{},o=r&&r[t];return S(o)?o:null},LT=["reverse","alternate","alternate-reverse"],Qx=(t,e,r)=>{let o=r||e.animationDirection;return o&&LT.includes(String(o))?"both":DT($T(t,e))?"backwards":"both"},MT=0,tw=new Map,Xg=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(S(t)){let n=JSON.stringify(t),s=tw.get(n);if(s)return s;let i=`smbls-anim-${MT++}`,a=An(i,t);return tw.set(n,a),a}let o=r&&r[t];return S(o)?An(t,o):t},FT=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},o=t.split(/\s+/),n=null,s=[],i=null,a=null,c=null,l=null,f=null;for(let u of o)r&&r[u]?n=u:AT(u)?s.push(u):kT.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):CT.includes(u)?c=u:vT.includes(u)?l=u:ET.includes(u)?f=u:n||(n=u);return{name:n,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},Jg={animation:(t,e)=>{if(w(t)&&t.includes(" ")){let r=FT(t,e);return{animationName:Xg(r.name||t,e),animationDuration:r.durations[0]||oe(e.animationDuration||"A").timing,animationDelay:r.durations[1]||oe(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||ye(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||Qx(r.name||t,e,r.direction),animationIterationCount:r.iterationCount!=null?r.iterationCount:e.animationIterationCount||1,animationPlayState:r.playState||e.animationPlayState,animationDirection:r.direction||e.animationDirection}}return{animationName:Xg(t,e),animationDuration:oe(e.animationDuration||"A").timing,animationDelay:oe(e.animationDelay||"0s").timing,animationTimingFunction:ye(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||Qx(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:Xg(t,e)}),animationDuration:t=>({animationDuration:oe(t).timing}),animationDelay:t=>({animationDelay:oe(t).timing}),animationTimingFunction:t=>({animationTimingFunction:ye(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};R();var Zg={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>N("height",t,e),width:(t,e)=>N("width",t,e),boxSizing:t=>Tt(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("height",e),..._t("width",r||e)}},inlineSize:(t,e)=>N("inlineSize",t,e),blockSize:(t,e)=>N("blockSize",t,e),minWidth:(t,e)=>N("minWidth",t,e),maxWidth:(t,e)=>N("maxWidth",t,e),widthRange:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("minWidth",e),..._t("maxWidth",r||e)}},minHeight:(t,e)=>N("minHeight",t,e),maxHeight:(t,e)=>N("maxHeight",t,e),heightRange:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("minHeight",e),..._t("maxHeight",r||e)}},size:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...N("inlineSize",e),...N("blockSize",r||e)}},minBlockSize:(t,e)=>N("minBlockSize",t,e),minInlineSize:(t,e)=>N("minInlineSize",t,e),maxBlockSize:(t,e)=>N("maxBlockSize",t,e),maxInlineSize:(t,e)=>N("maxInlineSize",t,e),minSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("minInlineSize",e),..._t("minBlockSize",r||e)}},maxSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("maxInlineSize",e),..._t("maxBlockSize",r||e)}},borderWidth:(t,e)=>N("borderWidth",t,e),borderTopWidth:(t,e)=>N("borderTopWidth",t,e),borderRightWidth:(t,e)=>N("borderRightWidth",t,e),borderBottomWidth:(t,e)=>N("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>N("borderLeftWidth",t,e),padding:(t,e)=>N("padding",t,e),scrollPadding:(t,e)=>N("scrollPadding",t,e),paddingInline:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("paddingInlineStart",e),..._t("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("paddingBlockStart",e),..._t("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>N("paddingBlockStart",t,e),paddingBottom:(t,e)=>N("paddingBlockEnd",t,e),paddingLeft:(t,e)=>N("paddingInlineStart",t,e),paddingRight:(t,e)=>N("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>N("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>N("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>N("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>N("paddingInlineEnd",t,e),margin:(t,e)=>N("margin",t,e),marginInline:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("marginInlineStart",e),..._t("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!w(e.marginBlock))return;let[r,o]=e.marginBlock.split(" ");return{..._t("marginBlockStart",r),..._t("marginBlockEnd",o||r)}},marginTop:(t,e)=>N("marginBlockStart",t,e),marginBottom:(t,e)=>N("marginBlockEnd",t,e),marginLeft:(t,e)=>N("marginInlineStart",t,e),marginRight:(t,e)=>N("marginInlineEnd",t,e),marginInlineStart:(t,e)=>N("marginInlineStart",t,e),marginInlineEnd:(t,e)=>N("marginInlineEnd",t,e),marginBlockStart:(t,e)=>N("marginBlockStart",t,e),marginBlockEnd:(t,e)=>N("marginBlockEnd",t,e),gap:t=>({gap:rf(t)}),columnGap:(t,e)=>Te(e,"columnGap",t),rowGap:(t,e)=>Te(e,"rowGap",t),flexWrap:t=>({display:"flex",flexWrap:t}),flexFlow:(t,e)=>{let r=e.reverse;if(!w(t))return;let[o,n]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(o="row"),(t.startsWith("y")||t==="column")&&(o="column"),{display:"flex",flexFlow:(o||"")+(!o.includes("-reverse")&&r?"-reverse":"")+" "+(n||"")}},flexAlign:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>ar(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>ar(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>ar(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>ar(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>ar(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>ar(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var Qg={fontSize:t=>ua(t)||t,fontFamily:t=>({fontFamily:la(t)||t}),fontWeight:t=>({fontWeight:t,fontVariationSettings:'"wght" '+t}),lineClamp:t=>{if(t!=null)return t==="none"?{WebkitLineClamp:"none",lineClamp:"none"}:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:String(t),lineClamp:String(t),overflow:"hidden"}}};var tm={overflow:t=>({overflow:t}),cursor:(t,e,r,o)=>{if(!t)return;let n=o.assets&&o.assets[t];if(n&&n.content)t=`url(${n.content.src})`;else{let s=o.files&&o.files[t];s&&s.content&&(t=`url(${s.content.src})`)}return{cursor:t}},opacity:t=>t!=null?{opacity:String(t)}:void 0,visibility:t=>t!=null?{visibility:t}:void 0,pointerEvents:t=>t!=null?{pointerEvents:t}:void 0};var em={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>St(r,"k").k).join(" ")}},left:t=>St(t,"left"),top:t=>St(t,"top"),right:t=>St(t,"right"),bottom:t=>St(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>St(r,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>St(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};R();var _f=0,rm=()=>{_f++},om=()=>{_f>0&&_f--},xe=({context:t,state:e})=>{let r=t?.designSystem,o=e?.root?.globalTheme||r?.globalTheme;return o&&o!=="auto"?o:_f>0?null:r&&r.resolvedTheme||null},se=(t,e)=>{if(e==null||e==="")return;if(!S(e))return{[t]:e};let r={},o=!1;for(let n in e){let s=e[n];if(!(s==null||s==="")){if(S(s)){let i=se(t,s);i&&(r[n]=i,o=!0);continue}r[n]={[t]:s},o=!0}}return o?r:void 0},nm={theme:(t,e)=>{if(t)return e.themeModifier?me(t,`@${e.themeModifier}`):me(t)},color:(t,e)=>{let r=xe(e);if(t)return se("color",It(t,r))},background:(t,e)=>{let r=xe(e);if(t)return w(t)&&t.includes("gradient")&&t.includes("(")?{background:ba(t,r)}:se("background",It(t,r))},backgroundColor:(t,e)=>{let r=xe(e);if(t)return se("backgroundColor",It(t,r))},backgroundImage:(t,e,r,o)=>{let n=xe(e);if(!t)return;let s=o.assets&&o.assets[t];if(s&&s.content)t=s.content.src;else{let i=o.files&&o.files[t];i&&i.content&&(t=i.content.src)}return se("backgroundImage",ef(t,n))},textStroke:t=>({WebkitTextStroke:Ql(t)}),outline:t=>({outline:qe(t)}),outlineOffset:(t,e)=>N("outlineOffset",t,e),border:t=>({border:qe(t)}),borderColor:(t,e)=>{let r=xe(e);if(t)return se("borderColor",It(t,r))},borderTopColor:(t,e)=>{let r=xe(e);if(t)return se("borderTopColor",It(t,r))},borderBottomColor:(t,e)=>{let r=xe(e);if(t)return se("borderBottomColor",It(t,r))},borderLeftColor:(t,e)=>{let r=xe(e);if(t)return se("borderLeftColor",It(t,r))},borderRightColor:(t,e)=>{let r=xe(e);if(t)return se("borderRightColor",It(t,r))},borderLeft:t=>({borderLeft:qe(t)}),borderTop:t=>({borderTop:qe(t)}),borderRight:t=>({borderRight:qe(t)}),borderBottom:t=>({borderBottom:qe(t)}),shadow:(t,e)=>{let r=xe(e);if(t)return se("boxShadow",tf(t,r))},boxShadow:(t,e)=>{if(!w(t))return;let[r,o]=t.split("!importan"),n=xe(e),s=o?" !important":"",i=ya(r.trim(),n);return w(i)?{boxShadow:i+s}:se("boxShadow",i)},textShadow:(t,{context:e})=>se("textShadow",ya(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:qe(t)})};var ka={transition:t=>({transition:of(t)}),transitionDuration:t=>({transitionDuration:_a(t)}),transitionDelay:t=>({transitionDelay:_a(t)}),transitionTimingFunction:t=>({transitionTimingFunction:ye(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};R();var sm={flow:(t,e)=>{let r=e.reverse;if(!w(t))return;let[o,n]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(o="row"),(t.startsWith("y")||t==="column")&&(o="column"),{display:"flex",flexFlow:(o||"")+(!o.includes("-reverse")&&r?"-reverse":"")+" "+(n||"")}},wrap:(t,e)=>({display:"flex",flexWrap:t}),align:(t,e)=>{let[r,o]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:o}}};var im={area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:t}),templateColumns:t=>({gridTemplateColumns:t}),autoColumns:t=>({gridAutoColumns:t}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:t}),templateRows:t=>({gridTemplateRows:t}),autoRows:t=>({gridAutoRows:t}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var xt={...Jg,...Zg,...Qg,...tm,...em,...nm,...ka,...sm,...im};var vt=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction","appearance","aspectRatio","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundRepeatX","backgroundRepeatY","backgroundSize","baselineShift","blockSize","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxDecorationBreak","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caretColor","clear","clip","clipPath","color","colorAdjust","colorInterpolation","colorInterpolationFilters","colorRendering","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","content","counterIncrement","counterReset","cursor","direction","display","emptyCells","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantNumeric","fontVariantPosition","fontWeight","fontVariationSettings","fontSynthesis","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","hyphens","imageOrientation","imageRendering","imeMode","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","initialLetter","isolation","justifyContent","justifyItems","justifySelf","left","letterSpacing","lineBreak","lineClamp","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","marginBlock","marginBlockEnd","marginBlockStart","marginInline","marginInlineEnd","marginInlineStart","mask","maskBorder","maskBorderImage","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","maxBlockSize","maxHeight","maxInlineSize","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","objectFit","objectPosition","objectViewBox","offset","offsetDistance","offsetPath","offsetRotate","opacity","order","orientation","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowClip","overflowScrolling","overflowWrap","overflowX","overflowY","overscrollBehavior","overscrollBehaviorX","overscrollBehaviorY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollPadding","scrollSnapAlign","scrollSnapType","scrollbarColor","scrollbarGutter","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","top","touchAction","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);R();var NT=/^-?[A-Z][0-9]?$/,jT=/^[a-z][0-9]?$/,ew=/var\(\s*(--[A-Za-z0-9-]+)/g,BT=t=>{let e=new Set,r=new Set;if(!t||typeof t!="object")return{knownLetters:e,knownVars:r};for(let o in t){let n=t[o];if(!(!n||typeof n!="object")){if(n.sequence&&typeof n.sequence=="object")for(let s in n.sequence)e.add(s);if(n.vars&&typeof n.vars=="object")for(let s in n.vars)r.add(s)}}return{knownLetters:e,knownVars:r}},UT=(t,e)=>{if(!e.size)return[];let r=t.split(/[(),\s]+/).filter(Boolean),o=new Set;for(let n of r){if(!NT.test(n))continue;let s=n.charCodeAt(0)===45?n.slice(1):n;e.has(s)&&o.add(n)}return[...o]},VT=(t,e)=>{if(!e.size)return[];let r=[];ew.lastIndex=0;let o;for(;o=ew.exec(t);){let n=o[1];if(e.has(n))continue;let s=n.lastIndexOf("-");if(s===-1)continue;let i=n.slice(s+1);if(!jT.test(i))continue;let a=n.slice(0,s+1)+i.toUpperCase();a!==n&&e.has(a)&&r.push({varName:n,corrected:a})}return r},xf=new Set,rw=(t,e,r)=>{if(!Pt()||!w(e)||!e)return;let o;try{o=C()}catch{return}let{knownLetters:n,knownVars:s}=BT(o);if(!n.size&&!s.size)return;let i=UT(e,n),a=VT(e,s);if(!i.length&&!a.length)return;let c=r?.__ref?.path?r.__ref.path.join("."):r?.key||"?";for(let l of i){let f=`${c}::${t}::bare::${l}::${e}`;xf.has(f)||(xf.add(f),console.warn(`[smbls/css-in-props] "${t}" on <${c}> looks like it contains an un-wrapped design-system token ("${l}") \u2014 "${t}" has no registered resolver, so its value is forwarded to the browser untouched. A bare letter token there is invalid CSS, so the browser drops the ENTIRE "${t}" declaration (not just this argument). Wrap it in var(--<family>-${l.replace("-","")}) (or calc(-1 * var(--<family>-${l.replace("-","")})) for a negative). Value: "${e}"`))}for(let{varName:l,corrected:f}of a){let u=`${c}::${t}::case::${l}::${e}`;xf.has(u)||(xf.add(u),console.warn(`[smbls/css-in-props] "${t}" on <${c}> references ${l}, which the active design system never emits. CSS custom-property names are case-sensitive \u2014 the real variable is ${f}, so this reference silently never resolves. Value: "${e}"`))}};R();var zT=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,HT=(t,e,r)=>{let{context:o}=r;if(!o.designSystem?.media)return;let n=t.slice(1),s=o.designSystem.media[n],i=ie(e,r);if(!s)return{[t]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match(zT),c=a?a[1]||a[2]:n,l={[`${s} &`]:i};if(c==="dark"||c==="light"){let f=o.designSystem?.scopeSelector||":root",u=f===":root"?":root:not([data-theme])":`${f}:not([data-theme])`;l[`@media (prefers-color-scheme: ${c})`]={[`${u} &`]:i}}return l},ow=(t,e,r)=>({[t]:ie(e,r)}),va=(t,e,r)=>{let o=`&${t}`,n=ie(e,r);if(t.includes(",")&&n){let s={},i={};for(let a in n)typeof n[a]=="object"&&n[a]!==null?i[a]=n[a]:s[a]=n[a];if(Object.keys(i).length){let a=o.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[o]=s);for(let l in i){let f=a.map(u=>`${u} ${l}`).join(", ");c[f]=i[l]}return c}}return{[o]:n}},am=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},WT=(t,e,r)=>{let o=t.slice(1),n=am(o,r);if(n===void 0&&(n=!!r[o]),!!n)return ie(e,r)},qT=(t,e,r)=>({[t]:e}),KT=(t,e,r)=>{let o=t.slice(1),n=r[o]===!0||r.state?.[o];if(!n)if(typeof r[o]=="function")try{n=r[o](r,r.state,r.context)}catch{}else{let s=am(o,r);s!==void 0&&(n=s)}if(n)return ie(e,r)},GT=(t,e,r)=>{let o=t.slice(1),n=r[o]===!0||r.state?.[o];if(!n)if(typeof r[o]=="function")try{n=r[o](r,r.state,r.context)}catch{}else{let s=am(o,r);s!==void 0&&(n=s)}if(!n)return ie(e,r)},cm=(t,e)=>ie(t,e),lm={"@":HT,":":va,"[":va,"*":va,"+":va,"~":va,"&":ow,">":ow,$:WT,"-":qT,".":KT,"!":GT};var wf=wr(),nw=(t,e,r)=>{let o=e?.context?.designSystem;o&&it(o);try{let n={},s={},i=(a,c)=>{if(r.unpack){n={...n,...c};return}n[a]=c};for(let a in t){let c=t[a];if(c!==null)if(a==="class"&&e.call("isString",t.class)){let l=c.split(" ");if(l.length){let f=e.context.designSystem.class,u=l.reduce((d,h)=>gt(d,f[h]),{});n.designSystemClass=u}}else if(a==="true"){let l=ut(c,e);gt(n,cm(l,e))}else if(e.classlist[a]){let l=e.classlist[a],f=A(l)?l(e,e.state,e.context):l;f&&i(a,f),!wf&&S(n[a])&&(n[a].label=a)}else if(xt[a]){let l=ut(c,e);if(l===null)continue;T(l)&&(l=l.reduce((u,d)=>gt(u,d),{}));let f=xt[a](l,e,e.state,e.context);T(f)&&(f=f.reduce((u,d)=>gt(u,d),{})),f&&i(a,f),!wf&&S(n[a])&&(n[a].label=a)}else if(vt.has(a)){let l=ut(c,e);if(l===null)continue;typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),wf||rw(a,l,e),i(a,{[a]:l}),!wf&&S(n[a])&&(n[a].label=a)}else s[a]=c}return[n,s]}finally{o&&tt()}},sw=(t,e)=>{let r={};for(let o in t){let n=lm[o.slice(0,1)];if(n){let s=n(o,t[o],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]&&typeof r[i]=="object"&&typeof s[i]=="object"?qt(r[i],s[i]):r[i]=s[i])}}return r},ie=(t,e,r={unpack:!0})=>{let[o,n]=nw(t,e,r),s=sw(n,e),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return Ms(o,s);o._selectors=s}return o},YT=(t,e)=>{let r={};if(t.class)for(let o in t.class)r[o]=t.class[o](e);return r};R();var iw=t=>{if(S(t))return ie(t,t)},XT=(t,e)=>{let r=iw(t);return typeof e=="function"?e(r):_e(r)};R();function um(t,e,r){let o=t?.context?.analyze;if(!o||!o.emit||e==="warn"&&!o.shouldCapture("warnings")||e==="error"&&!o.shouldCapture("errors"))return;let n=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");o.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:e==="error"?"error":"warning",level:e,hook:e==="error"?"el.error":"el.warn",element:{key:t.key!=null?String(t.key):null,name:t.__name||null,tag:t.tag||null},message:n||null,args:r})}var aw=new Set;function JT(t,e,r){let o=String(e);if(aw.has(o))return;aw.add(o);let n=t?.__ref?.path,s=Array.isArray(n)&&n.length?n.join("."):t?.key!=null?String(t.key):"(unknown element)",i=r!=null?`resolves to a non-function (${typeof r}) \u2014 it cannot be called`:"is not registered in context.methods, context.functions, or context.utils, and is not an element method",a=`[smbls] el.call('${o}') at <${s}>: "${o}" ${i}. Returning undefined (unchanged behavior) \u2014 check the name for typos or register the function on the project. Warned once per name; repeat misses are silent.`;um(t,"error",[a]),console.error(a)}function ZT(...t){return um(this,"warn",t),wi.apply(this,t)}function QT(...t){return um(this,"error",t),co.apply(this,t)}var cw={update:Ln,remove:Fn,getDB:Ci,getQuery:Ei,getRootData:bi,getChildren:pi,getPath:hi,nextElement:Si,previousElement:ki,verbose:tn,warn:ZT,error:QT,variables:vi,spotByPath:di,set(t,e){let r=this.__ref;if(r){if(r.__setLocked){r.__setQueued={content:t,options:e};return}r.__setLocked=!0}try{if(this.removeContent(),t!=null){let o=this.context?.__create;o&&o(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(r){r.__setLocked=!1;let o=r.__setQueued;o&&(r.__setQueued=null,this.set(o.content,o.options))}}},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,o=this.key,n=this.parse();return this.remove(),e(n,r,o,t)},lookup(t){let e=this.parent;for(;e;){if(typeof t=="function"){if(t(e))return e}else if(typeof t=="string"){if(e.key===t)return e;if(e[t]&&e[t].__ref)return e[t]}e=e.parent}return null},lookdown(t){let e=this.__ref;if(!e?.__children)return null;for(let r of e.__children){let o=this[r];if(!o)continue;if(typeof t=="function"){if(t(o))return o}else if(typeof t=="string"&&o.key===t)return o;let n=o.lookdown?.(t);if(n)return n}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let o of r.__children){let n=this[o];n&&(typeof t=="function"?t(n)&&e.push(n):typeof t=="string"&&n.key===t&&e.push(n),n.lookdownAll?.(t,e))}return e},getRef(){return this.__ref},getRoot:yi,getRootState:mi,getRootContext:_i,getContext:xi,parse(t){let e={},r=t?new Set(t):null,o=this.__ref?.__exec;for(let n in this)if(!(n==="parent"||n==="node"||n==="__ref")&&!r?.has(n)){if(o&&o[n]!==void 0){e[n]=o[n];continue}typeof this[n]!="function"&&(e[n]=this[n])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let o of r.__children)this[o]?.parseDeep&&(e[o]=this[o].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let r of t)e[r]=this[r];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(let e in t){let r=t[e];if(r==null)continue;let o=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),n=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(o,n,"important")}},call(t,...e){let r=this.context,o=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof o=="function")return o.call(this,...e);Pt()&&JT(this,t,o)},removeContent(){let t=this.__ref;if(!t?.__children)return;let e=this.content;if(e?.remove){e.remove(),delete this.content;let r=t.__children.indexOf("content");r!==-1&&t.__children.splice(r,1)}e?.node?.parentNode&&e.node.parentNode.removeChild(e.node)}},fm=new WeakMap;function t1(t){if(!t)return cw;let e=fm.get(t);if(e)return e;e=Object.create(cw);let r=t.methods;if(r)for(let o in r)e[o]=r[o];return fm.set(t,e),e}function Nn(t){let e=t1(t.context);Object.setPrototypeOf(t,e)}function Sf(t){if(!t)return!1;let e=fm.get(t);if(!e)return!1;let r=t.methods;if(!r)return!1;for(let o in r)e[o]=r[o];return!0}var kf=[],vf=!1,Ur=0;function Cf(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function lw(t){let e=typeof globalThis<"u"?globalThis.scheduler:null;if(e&&typeof e.yield=="function"){e.yield().then(t,t);return}if(typeof MessageChannel=="function"){let r=new MessageChannel;r.port1.onmessage=()=>{r.port1.close(),t()},r.port2.postMessage(0);return}setTimeout(t,0)}function fw(){return Ur?Cf()-Ur>=50:!1}var jn=0;function uw(){jn===0&&!Ur&&(Ur=Cf()),jn++}function dw(){jn>0&&jn--,jn===0&&!vf&&(Ur=0)}function pw(t){kf.push(t),vf||(vf=!0,lw(hw))}function hw(){for(Ur=Cf();kf.length;){let t=kf.shift();try{t()}catch(e){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",e?.message||e)}if(Cf()-Ur>=50)break}if(kf.length){lw(hw);return}vf=!1,Ur=0,jn=0}R();Yo();var mm={};P(mm,{STATE_METHODS:()=>gw,applyInitialState:()=>Af,applyStateMethods:()=>ae,callStateMethod:()=>Ca,createState:()=>pm,isTracking:()=>gm,useHostState:()=>hm});var gw=new Set(["update","parse","clean","destroy","create","add","toggle","remove","set","replace","setByPath","setPathCollection","removeByPath","removePathCollection","getByPath","reset","apply","applyReplace","applyFunction","quietUpdate","quietReplace","rootUpdate","parentUpdate","keys","values","__element","__children","parent","root"]),Ef=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},Re=(t,e,r,{onlyIfAbsent:o}={})=>{Ef(t,"$"+e,r),!(o&&Object.prototype.hasOwnProperty.call(t,e))&&Ef(t,e,r)},Ca=(t,e,...r)=>{if(!t)return;let o=t["$"+e];if(typeof o=="function")return o.apply(t,r);let n=t[e];if(typeof n=="function")return n.apply(t,r)},ae=(t,e)=>{if(yt(e)){let n=e.__raw||e;Re(n,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),Re(n,"set",function(s,i={}){return e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,i),e},{onlyIfAbsent:!0}),Re(n,"setByPath",function(s,i,a={}){let c=s.split("."),l=e;for(let f=0;f<c.length-1;f++)l[c[f]]===void 0&&(l[c[f]]={}),l=l[c[f]];return l[c[c.length-1]]=i,e}),Re(n,"getByPath",function(s){let i=s.split("."),a=e;for(let c=0;c<i.length;c++){if(a==null)return;a=a[i[c]]}return a}),Re(n,"removeByPath",function(s,i={}){let a=s.split("."),c=e;for(let l=0;l<a.length-1;l++){if(c==null)return e;c=c[a[l]]}return c&&delete c[a[a.length-1]],e}),Re(n,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),Re(n,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),Re(n,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),Re(n,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&yt(a.parent);)a=a.parent;return Ca(a,"update",s,i)}),Re(n,"parentUpdate",function(s,i={}){if(e.parent)return Ca(e.parent,"update",s,i)}),Re(n,"quietReplace",function(s,i={}){return e.$replace(s,{quiet:!0,...i})}),Object.getOwnPropertyDescriptor(n,"root")||Object.defineProperty(n,"root",{get:function(){let s=e,i=yt(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,yt(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]},o={update(n){if(!n||typeof n!="object")return e;for(let s in n)e[s]=n[s];return e},apply(n){if(typeof n!="function")return e;let s=n(e);return s?e.$update(s):e},parse(){return{...e}},toggle(n){return e[n]=!e[n],e},set(n){if(!n||typeof n!="object")return e;r();for(let s in n)e[s]=n[s];return e},replace(n){return e.$set(n)},clean(){return r(),e}};for(let n in o)if(Ef(e,"$"+n,o[n]),typeof e[n]!="function"){if(Object.prototype.hasOwnProperty.call(e,n)){vc(n,"");continue}Ef(e,n,o[n])}};var pm=function(t,e,r){return t.state=Af(t,e,r),t.state},Af=function(t,e,r){let{__ref:o}=t,n=t.state;if(n==null||n===!1){let s=e?.state||{};return ae(t,s),s}if(typeof n=="string")return o&&(o.__state=n),o.__stateType="string",e1(n,t,e);if(typeof n=="number"||typeof n=="boolean"){o&&(o.__state=n,o.__stateType=typeof n,o.__hasRootState=!0);let s=Xe({value:n});return s.__element=t,e?.state&&(s.parent=e.state),ae(t,s),s}if(typeof n=="function"&&(n=n(t,e?.state)||{}),typeof n=="object"&&!yt(n)){o&&(o.__hasRootState=!0),n.isRootState&&o&&(o.__hasRootState=!0);let s=Xe({...n});if(s.__element=t,!Object.getOwnPropertyDescriptor(s,"root")){let i=e?.state?.root||e?.state||s;Object.defineProperty(s,"root",{get:()=>i,enumerable:!1,configurable:!0})}return e?.state&&(s.parent=e.state,e.state.__children&&(e.state.__children[t.key]=s)),ae(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,r),s}return yt(n)?(n.__element=t,n):e?.state||{}};function dm(t,e){if(!e)return t;let r=e.split("/"),o=t;for(let n of r){if(o==null)return{};o=o[n]}return o??{}}function e1(t,e,r){if(!r?.state)return{};if(t===".")return r.state;if(t.startsWith("../")){let n=t.slice(3),s=r.state?.parent;return n&&s?dm(s,n):s??r.state??{}}if(t.startsWith("~/")){let n=r.state;for(;n?.parent;)n=n.parent;let s=t.slice(2);return s?dm(n,s):n??{}}let o=dm(r.state,t);if(o&&typeof o=="object"&&!yt(o)&&!Object.getOwnPropertyDescriptor(o,"root")){let n=r.state?.root||r.state;Object.defineProperty(o,"root",{get:()=>n,enumerable:!1,configurable:!0})}return o}var hm=(t,e)=>{if(!t)return yw;let r=o1(t,e);return!r||!r.state?yw:s1(r.state)},gm=()=>Sc()!=null,r1=128;function o1(t,e){let r=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,o=t,n=null;for(let s=0;s<r1&&o;s++){if(r(o)&&o.state)return o;if(o.state&&!n&&(n=o),!o.parent||o.parent===o)break;o=o.parent}return n}var n1={get(t,e){return t[e]}},mw=new WeakMap,s1=t=>{let e=mw.get(t);return e||(e=new Proxy(t,n1),mw.set(t,e)),e},yw=new Proxy(Object.create(null),{get(){},has(){return!1}});var Tf="3.14.781";var bw="__SMBLS_ELEMENT_ID_ENGINE__",_w=(t,e,r)=>{let o=e||Tf,n=r||(typeof globalThis<"u"?globalThis:null);if(!n)return t;let s=n[bw];return s&&s.engine&&s.version===o?s.engine:(s||(n[bw]={version:o,engine:t}),t)};var Aw=_w({uniqId:1,scopedStyleId:0},Tf),Aa=[],xm=!1;function xw(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function i1(){return typeof document<"u"&&document.visibilityState==="hidden"}var a1=250;function Tw(){if(!xm){if(xm=!0,typeof requestAnimationFrame!="function"){setTimeout(Oa,0);return}i1()?setTimeout(Oa,a1):requestAnimationFrame(Oa)}}var c1=300,l1=15e4;function Oa(){if(xm=!1,!Aa.length)return;let t=Aa.splice(0,Aa.length);for(let e=0;e<t.length;e++){let r=t[e];if(r.node){if(!r.node.isConnected){let o=r.__ref||(r.__ref={});o.__mountAttempts=(o.__mountAttempts||0)+1,o.__mountFirstAttemptAt==null&&(o.__mountFirstAttemptAt=xw());let n=xw()-o.__mountFirstAttemptAt;o.__mountAttempts<=c1&&n<l1?(Aa.push(r),Tw()):console.warn("[DOMQL] onMounted dropped after",o.__mountAttempts,"attempts /",n,"ms \u2014 node never connected:",r.key||r.tag||r);continue}fr("Mounted",r,r.__ref?.__mountOptions||{})}}}function Ow(t,e){typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,Aa.push(t),Tw())}function ww(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&At("contentUpdate",t,e);let r=t.context?.designSystem;r&&it(r);try{t.onContentUpdate(t,t.state,t.context,e)}catch(o){if(t.context?.plugins?.length&&At("error",t,{hook:"onContentUpdate",error:o})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',o),t.context?.strictMode)throw o}finally{r&&tt()}}function Un(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function f1(t){return t.charAt(2).toLowerCase()+t.slice(3)}function u1(t){return t.toLowerCase()}function wm(t){let e=t.charCodeAt(0);return e===58||e===64||e===38}function Ta(t,e){let r={...t};for(let o in e){let n=r[o],s=e[o];n&&s&&typeof n=="object"&&typeof s=="object"&&!Array.isArray(n)&&!Array.isArray(s)&&typeof n!="function"&&typeof s!="function"?r[o]=Ta(n,s):r[o]=s}return r}function ne(t,e,r,o={},n){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});let s=Object.create(null);s.key=r||t.key||`_${Aw.uniqId++}`,s.parent=e||null,s.context=t.context||e?.context||o.context||{},s.context.__create||(s.context.__create=ne);let i=s.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||s,path:e?.__ref?.path?[...e.__ref.path,s.key]:[s.key],origin:t};if(r&&!t.extends&&!t.extend){let p=r.indexOf("_");if(p>0){let m=r.substring(0,p),b=s.context?.components;b&&(b[m]||b["smbls."+m])?t={...t,extends:m}:b&&Pt()&&/^[A-Z]\w*_\d+$/.test(r)&&console.warn(`[smbls] auto-extend: key "${r}" looks like a multi-instance (${m}_N) but neither "${m}" nor "smbls.${m}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}$n(s,t,o);let a=new Set(["childProps","attr","style","scope","data"]),c=s.props&&typeof s.props=="object"?s.props:null;for(let p in t){if(p==="parent"||p==="node"||p==="__ref"||p==="extends"||p==="context"||p==="props")continue;let m=t[p],b=s[p],_=b&&m&&typeof b=="object"&&typeof m=="object"&&!Array.isArray(b)&&!Array.isArray(m)&&typeof b!="function"&&typeof m!="function";_&&p.charCodeAt(0)>=65&&p.charCodeAt(0)<=90?s[p]=Ta(b,m):_&&a.has(p)?s[p]={...b,...m}:_&&wm(p)?s[p]=Ta(b,m):s[p]=m}function l(p){for(let m in p){let b=p[m],_=s[m],y=_&&b&&typeof _=="object"&&typeof b=="object"&&!Array.isArray(_)&&!Array.isArray(b)&&typeof _!="function"&&typeof b!="function";y&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?s[m]=Ta(_,b):y&&a.has(m)?s[m]={..._,...b}:y&&wm(m)?s[m]=Ta(_,b):s[m]=b}}c&&l(c),t.props&&typeof t.props=="object"&&l(t.props),t.data!==void 0&&(s.data=t.data),t.classlist!==void 0&&(s.classlist=t.classlist),t.text!==void 0&&(s.text=t.text),t.html!==void 0&&(s.html=t.html);let f=s.scope&&typeof s.scope=="object"?s.scope:null,u=e?.scope,d=s.context&&typeof s.context.globalScope=="object"&&s.context.globalScope||null,h=u||d||null;if(t.scope!==void 0||f){let p={};f&&Object.assign(p,f),t.scope!==void 0&&Object.assign(p,t.scope),s.scope=kc(p,h)}else h&&(s.scope=h);if(t.if!==void 0&&(s.if=t.if),Nn(s),d1(s,e,t),s.if!=null){let p;if(typeof s.if=="function")try{p=s.if(s,s.state,s.context)}catch(m){if(p=!1,i.__ifError=m,typeof console<"u"&&console.warn){let b=s.key||s.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${b} \u2014 treating as false:`,m?.message||m)}}else p=s.if;i.__if=!!p}if(i.__if)typeof s.if=="function"&&(i.__ifInitialized=!0);else return e&&(e[s.key]=s),typeof s.if=="function"&&Iw(s,i,s.if),s;s.tag||(s.tag=$r(s)),fr("Init",s,o);let g=s.node=Lr(s);if(!g)return s;if(s.tag==="fragment"){let m=(s.context?.document||globalThis.document).createComment("");g.appendChild(m),i.__fragmentAnchor=m}fr("AttachNode",s,o),g.setAttribute&&s.key&&g.setAttribute("data-key",s.key),e&&(e[s.key]=s,e.__ref?.__children&&(e.__ref.__children.includes(s.key)||e.__ref.__children.push(s.key))),g.setAttribute&&s.context?.scopeSelector&&s.context.scopeSelector!==":root"&&s.context.key&&s.key===s.context.key&&g.setAttribute("data-smbls-app",s.context.key),s.id&&g.setAttribute&&(g.id=s.id),Mw(s,o),Pw(s),Sm(s),$w(s),A1(s);try{Fw(s,o)}catch(p){if(typeof console<"u"&&console.error){let m=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${m}:`,p?.message||p,p?.stack?`
50
+ Do NOT trust any browser measurement taken on this page until that reads clean.`),!0}function Ux(){try{let t=C(),e=t&&(t.CSS_VARS||t.cssVars);return e?Object.keys(e).length:0}catch{return 0}}function Lx(t){uf||Jt.variable>0||Jt.atomic>0||Vx(Math.max(t,Ux()))}function jg(t){let e=t&&(t.CSS_VARS||t.cssVars);return Vx(e?Object.keys(e).length:Ux())}function Vx(t){let e=hf();if(t===0)return{ok:!0,reason:"no-design-system",stats:e,varCount:t};if(!gf())return{ok:!0,reason:"no-sheet",stats:e,varCount:t};if(e.variable>0||e.atomic>0)return{ok:!0,reason:null,stats:e,varCount:t};let r=e.invalid>0?"every rule was rejected as malformed":"no rule was ever produced";return QA(r,t),{ok:!1,reason:r,stats:e,varCount:t}}var tT={display:"d",position:"pos",padding:"p",paddingTop:"pt",paddingRight:"pr",paddingBottom:"pb",paddingLeft:"pl",margin:"m",marginTop:"mt",marginRight:"mr",marginBottom:"mb",marginLeft:"ml",width:"w",height:"h",minWidth:"mnw",minHeight:"mnh",maxWidth:"mxw",maxHeight:"mxh",top:"t",right:"r",bottom:"b",left:"l",flex:"fx",flexDirection:"fxd",flexWrap:"fxw",flexGrow:"fxg",flexShrink:"fxs",flexBasis:"fxb",justifyContent:"jc",alignItems:"ai",alignSelf:"as",alignContent:"ac",gap:"g",rowGap:"rg",columnGap:"cg",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",gridColumn:"gc",gridRow:"gr",overflow:"of",overflowX:"ofx",overflowY:"ofy",fontSize:"fs",fontWeight:"fw",fontFamily:"ff",fontStyle:"fst",lineHeight:"lh",letterSpacing:"ls",textAlign:"ta",textDecoration:"td",textTransform:"tt",color:"c",background:"bg",backgroundColor:"bgc",backgroundImage:"bgi",border:"bd",borderRadius:"br",borderColor:"bdc",borderWidth:"bdw",borderStyle:"bds",boxShadow:"bxsh",opacity:"op",zIndex:"z",cursor:"cur",transition:"tr",transform:"tf",animation:"an",visibility:"vis",whiteSpace:"ws",wordBreak:"wb",objectFit:"obj",pointerEvents:"pe",userSelect:"us",boxSizing:"bxz",outline:"ol",listStyle:"lis",textOverflow:"txo",verticalAlign:"va",float:"fl",clear:"cl",content:"cnt",backdropFilter:"bdf",filter:"flt",resize:"rsz",appearance:"apr",fill:"fil",stroke:"stk"};function vo(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function df(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e.toString(36)}function eT(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():df(e)}var rT={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select"};function An(t,e){let r=rT[t];return r?`${t}:${e};${r}:${e};`:`${t}:${e};`}var oT="@media (hover: hover)",nT=/(?:^|[^\\]):hover(?![\w-])/;function Bg(){try{let t=C();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function Oe(t,e,r){return r===!1||!nT.test(e)||r===void 0&&!Bg()?t:`${oT}{${t}}`}function Mx(t,e,r){let o=(r?r+"":"")+t+":"+e,n=ko.get(o),s=n?null:vo(t);if(!n){let c=tT[t]||df(t),l=eT(e);n=r?`_${r}_${c}-${l}`:`_${c}-${l}`,ko.set(o,n)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return n;let i=s||vo(t),a=`.${n}{${An(i,e)}}`;return be(a,void 0,"atomic"),n}var Fx=new WeakMap,Nx=new WeakMap;function be(t,e,r){let o=gf(e);if(!o)return Jt.dropped++,"dropped";let n=Fx.get(o);if(n||(n=new Set,Fx.set(o,n)),n.has(t))return Jt.duplicate++,Jt[r||"global"]++,"duplicate";let s=Nx.get(o);if(s&&s.has(t))return Jt.invalid++,"invalid";try{o.insertRule(t,o.cssRules.length)}catch{return s||(s=new Set,Nx.set(o,s)),s.add(t),Jt.invalid++,"invalid"}return n.add(t),Jt[r||"global"]++,"inserted"}var jx=new WeakMap;function gf(t){let e=t||pf();if(!e||!e.head)return null;let r=jx.get(e);if(r&&r.ownerNode&&r.ownerNode.parentNode===e.head)return r;let o=e.head.querySelector("style[data-smbls]");o||(o=e.createElement("style"),o.setAttribute("data-smbls",""),e.head.appendChild(o));let n=o.sheet;return jx.set(e,n),Bx=n,n}var sT=8;function _e(t,e,r){if(!t||typeof t!="object")return"";let o=null,n=0,s=[],i=[];for(let c in t){let l=t[c];l==null||l===!1||l===""||(typeof l=="object"?i.push([c,l]):Mg?(o||(o=[]),o.push(c,String(l)),n++):s.push(Mx(c,String(l),r)))}if(o&&n>=sT){let c=o.join("\0"),l=Mg(c),f=l.indexOf("\0"),u=l.substring(0,f),d=l.substring(f+1);if(d){let h=d.split(`
51
+ `);for(let g=0;g<h.length;g++)h[g]&&be(h[g],void 0,"atomic")}s.push(u)}else if(o)for(let c=0;c<o.length;c+=2)s.push(Mx(o[c],o[c+1],r));let a=[];for(let c=0;c<i.length;c++)a.push(cT(i[c][0],i[c][1],r));return s.concat(a).join(" ").trim()}var Lg=new Map,iT=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function aT(t){return typeof t!="string"||!t||t.startsWith("@media")||t.startsWith("@supports")?!1:t.split(",").every(e=>iT.test(e.trim()))}function cT(t,e,r){let o=JSON.stringify(e),n=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,s=n&&Bg(),i=(r?r+"":"")+t+o+(n&&!s?"rawhover":""),a=ko.get(i);if(a){let b=Lg.get(a);if(b)for(let _=0;_<b.length;_++)be(b[_],void 0,"atomic");return a}a=r?`_${r}_c${df(i)}`:`_c${df(i)}`;let c=`.${a}`,l=aT(t)?`.${a}.${a}`:c,f="",u=[],d=b=>typeof b=="string"&&(b.indexOf("{")!==-1||b.indexOf("}")!==-1),h=(b,_)=>{let y="";for(let x in _){let k=_[x];if(k!=null)if(typeof k=="object")h([...b,x],k);else{if(d(k))continue;y+=An(vo(x),k)}}y&&(b.length===0?f+=y:u.push({chain:b,body:y}))};h([],e);let g=b=>{let _=b.length===1?l:c;if(!b.length)return _;let y=b[0].split(",").map(x=>x.trim()).map(x=>x.includes("&")?x.replace(/&/g,_):x.startsWith(":")?`${_}${x}`:`${_} ${x}`);for(let x=1;x<b.length;x++){let k=b[x].split(",").map(O=>O.trim()),E=[];for(let O of y)for(let $ of k)$.includes("&")?E.push($.replace(/&/g,O)):$.startsWith(":")?E.push(O+$):E.push(O+" "+$);y=E}return y.join(", ")},p=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(f){let b=`${t}{${c}{${f}}}`;p.push(b),be(b,void 0,"atomic")}for(let b of u){let _=g(b.chain),y=Oe(`${t}{${_}{${b.body}}}`,_,s);p.push(y),be(y,void 0,"atomic")}return Lg.set(a,p),ko.set(i,a),a}let m=g([t]);if(f){let b=Oe(`${m}{${f}}`,m,s);p.push(b),be(b,void 0,"atomic")}for(let b of u){let _=g([t,...b.chain]),y=Oe(`${_}{${b.body}}`,_,s);p.push(y),be(y,void 0,"atomic")}return Lg.set(a,p),ko.set(i,a),a}function kt(t){if(t==null||typeof t!="string"&&typeof t!="object")return;if(gf(),typeof t=="string"){let s=t.indexOf("--")!==-1;be(t,void 0,s?"variable":"global"),s&&Lx(1);return}let e=Bg(),r=0,o=Object.keys(t),n=s=>{let i=s.match(/max-width:\s*(\d+)/);return i?parseInt(i[1]):0};o.sort((s,i)=>{let a=s.startsWith("@media"),c=i.startsWith("@media");return!a&&!c?0:a?c?n(i)-n(s):1:-1});for(let s of o){let i=t[s];if(s.startsWith("@media")||s.startsWith("@supports"))for(let a in i){let c=i[a];if(typeof c=="object"&&c!==null){let l="",f=0;for(let u in c){let d=u.charCodeAt(0)===45&&u.charCodeAt(1)===45;d&&f++;let h=d?u:vo(u);l+=An(h,c[u])}r+=f,be(Oe(`${s}{${a}{${l}}}`,a,e),void 0,f?"variable":"global")}else{let l=a.charCodeAt(0)===45&&a.charCodeAt(1)===45;l&&r++;let f=l?a:vo(a);be(`${s}{${An(f,c)}}`,void 0,l?"variable":"global")}}else{let a="",c=!1,l=0;for(let f in i){let u=i[f];if(typeof u=="object"&&u!==null)c=!0;else{let d=f.charCodeAt(0)===45&&f.charCodeAt(1)===45;d&&l++;let h=d?f:vo(f);a+=An(h,u)}}if(r+=l,a&&be(Oe(`${s}{${a}}`,s,e),void 0,l?"variable":"global"),c){let f=[],u=[];for(let d in i)typeof i[d]=="object"&&i[d]!==null&&(d.startsWith("@media")||d.startsWith("@supports")?f.push(d):u.push(d));f.sort((d,h)=>{let g=p=>{let m=p.match(/max-width:\s*(\d+)/);return m?parseInt(m[1]):0};return g(h)-g(d)});for(let d of u)kt({[`${s} ${d}`]:i[d]});for(let d of f)kt({[d]:{[s]:i[d]}})}}}r>0&&Lx(r)}function Tn(t,e){let r="";for(let o in e){let n="";for(let s in e[o])n+=An(vo(s),e[o][s]);r+=`${o}{${n}}`}return be(`@keyframes ${t}{${r}}`,void 0,"keyframes"),t}function Hx(){ko.clear(),Bx=null}function Ug(){return ko.size}R();var Im={};P(Im,{DELEGATED_EVENTS:()=>Dn,LIFECYCLE_EVENTS:()=>Mr,MIXINS:()=>mf,NON_BUBBLING_EVENTS:()=>yf,REGISTRY:()=>jt,SVG_TAGS:()=>Pn,addDelegatedEvent:()=>Sa,addMethods:()=>jn,applyExtends:()=>Ln,cacheNode:()=>Lr,create:()=>ne,createHTMLNode:()=>Rn,detectTag:()=>$r,dispose:()=>Br,flushMounts:()=>Ra,globalEventKeyInfo:()=>bf,isSvgTag:()=>In,isValidTag:()=>On,refreshContextProto:()=>vf,registerEvent:()=>$n,registerGlobalEvent:()=>_f,remove:()=>Nn,removeDelegatedEvent:()=>ka,update:()=>Mn});var Hg="http://www.w3.org/2000/svg",Pn=new Set(["svg","path","circle","ellipse","line","polyline","polygon","rect","g","defs","use","symbol","clipPath","mask","pattern","image","text","tspan","textPath","marker","linearGradient","radialGradient","stop","filter","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","animate","animateMotion","animateTransform","set","foreignObject","desc","title","metadata"]),lT=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","string","fragment","shadow"]);function On(t){return lT.has(t)||Pn.has(t)}function In(t){return Pn.has(t)}function $r(t){let{tag:e,key:r}=t;if(typeof e=="function")try{e=e(t,t.state,t.context)}catch(s){e=void 0,typeof console<"u"&&console.error&&console.error(`[smbls] \`tag:\` factory threw on "${r||"<anon>"}" \u2014 falling back to key-based tag detection:`,s?.message||s)}if(e===!0&&(e=r),typeof e=="string"&&On(e))return e;if(!r||typeof r!="string")return"div";let o=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]),n=r.toLowerCase();return n.includes(".")&&(n=n.split(".")[0]),n.includes("_")&&(n=n.split("_")[0]),On(n)&&!o.has(n)?n:"div"}var zx={};function Rn(t,e){let r=e?.context?.document||globalThis.document;if(!r)return null;if(t==="string")return r.createTextNode(e?.text||"");if(t==="fragment")return r.createDocumentFragment();if(In(t)){let o=e?.parent;if(t==="svg"||o?.node?.namespaceURI===Hg)return r.createElementNS(Hg,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Lr(t){let e=t.tag=$r(t),o=In(e)&&(e==="svg"||t.parent?.node?.namespaceURI===Hg)?"svg:"+e:e,n=t?.context?.document||globalThis.document,s=zx[o];if(s||(s=zx[o]=Rn(e,t)),!s)return null;let i=n&&s.ownerDocument!==n?Rn(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var jt=new Set(["extends","children","content","childrenAs","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","autoGrow","__name","__ref","__hash","__text","parent","node"]),mf={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},Mr=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","mounted","contentUpdate","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","beforeRemove","remove"]),yf=new Set(["load","error","abort","scroll","canplay","canplaythrough","ended","pause","play","playing","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","durationchange","loadeddata","loadedmetadata","progress","emptied","resize"]),zg=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),Dn=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","pointerdown","pointerup","pointermove","pointerenter","pointerleave","pointerover","pointerout","touchstart","touchend","touchmove","keydown","keyup","keypress","input","change","submit","reset","focus","blur","focusin","focusout","wheel","contextmenu","drag","dragstart","dragend","dragenter","dragleave","dragover","drop"]);var qg=new WeakMap,fT={passive:!0},uT={passive:!0,capture:!0},Kg=(t,e)=>zg.has(t)?e?uT:fT:e||!1;function qx(t){let e=qg.get(t);return e||(e={handlers:new Map,installed:new Set},qg.set(t,e)),e}function dT(t,e){let r=qx(e);if(r.installed.has(t))return;r.installed.add(t);let o=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave",n=t==="mouseenter"||t==="mouseleave";e.addEventListener(t,s=>{let i=s.target;for(;i&&i!==e;){let a=r.handlers.get(t);if(a){let c=a.get(i);if(c){if(n&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(c(s),s.cancelBubble)return}}i=i.parentNode}},Kg(t,o))}function Sa(t,e,r,o){o||(o=e.ownerDocument?.documentElement||e.getRootNode());let n=qx(o);dT(t,o),n.handlers.has(t)||n.handlers.set(t,new WeakMap),n.handlers.get(t).set(e,r)}function ka(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let o=qg.get(r);if(!o)return;let n=o.handlers.get(t);n&&n.delete(e)}function Wx(t){return Dn.has(t)&&!Mr.has(t)}function Kx(t,e){let{context:r}=t,o=r?.designSystem;return n=>{o&&it(o);try{let s=e.call(t,n,t,t.state,r);if(s&&typeof s.then=="function"){s.catch(i=>{t.error=i,console.error("[DOMQL] Async event error:",i)}).finally(()=>{o&&tt()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),r?.strictMode)throw s}o&&tt()}}function $n(t,e,r){let{node:o,context:n}=e;if(!o)return;let s=Kx(e,r),i=yf.has(t);if(!i&&Wx(t)){let a=n?.rootNode||o.ownerDocument?.documentElement;Sa(t,o,s,a)}else o.addEventListener(t,s,Kg(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!i&&Wx(t)){let a=n?.rootNode||o.ownerDocument?.documentElement;ka(t,o,a)}else o.removeEventListener(t,s,Kg(t,!1))})}var Wg=[["onDocument","document"],["onWindow","window"]];function bf(t){if(typeof t!="string")return null;for(let e=0;e<Wg.length;e++){let r=Wg[e][0];if(t.length<=r.length||!t.startsWith(r))continue;let o=t.charCodeAt(r.length);if(!(o<65||o>90))return{target:Wg[e][1],eventName:t.slice(r.length).toLowerCase()}}return null}var pT=/^[A-Za-z_$][\w$]*$/;function hT(t,e,r){let o=e,n=!1,s,i=!1;if(e&&typeof e=="object"&&typeof e!="function"&&(o=e.handler,n=!!e.capture,i=!!e.once,typeof e.passive=="boolean"&&(s=e.passive)),typeof o=="string"&&pT.test(o)){let a=o;o=function(l){return t.call(a,l)}}return typeof o!="function"?null:(s===void 0&&(s=zg.has(r)),{handler:o,capture:n,passive:s,once:i})}function gT(t,e){let r=t.node?.ownerDocument||t.context?.document||(typeof document<"u"?document:null);if(!r||typeof r.addEventListener!="function")return null;if(e==="document")return r;let o=r.defaultView||(typeof window<"u"?window:null);return o&&typeof o.addEventListener=="function"?o:null}function mT(t){let e=t.node;if(!e)return!1;let r=e.nodeType===11?t.__ref?.__fragmentAnchor:e;return r?r.isConnected!==!1:!1}function _f(t,e,r){let o=e.__ref;if(!o)return;let n=hT(e,r,t.eventName);if(!n)return;let s=gT(e,t.target);if(!s)return;o.__globalEvents||(o.__globalEvents=new Map);let i=t.target+":"+t.eventName+":"+(n.capture?1:0);if(o.__globalEvents.has(i))return;let a=Kx(e,n.handler),c=f=>{mT(e)&&a(f)},l={capture:n.capture,passive:n.passive,once:n.once};s.addEventListener(t.eventName,c,l),o.__globalEvents.set(i,{target:s,eventName:t.eventName,listener:c,options:l}),o.__eventCleanup||(o.__eventCleanup=[]),o.__eventCleanup.push(()=>{s.removeEventListener(t.eventName,c,l),o.__globalEvents&&o.__globalEvents.delete(i)})}function Gx(t){let e=[];return t.extends&&(Array.isArray(t.extends)?e.push(...t.extends):e.push(t.extends)),t.extend&&(Array.isArray(t.extend)?e.push(...t.extend):e.push(t.extend)),e}function Ln(t,e,r){let o=Gx(e);if(!o.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<o.length;i++){let a=Yx(o[i],s);a&&a!==e&&Xx(t,a,r,new Set([e]))}}function Yx(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(n=>n.trim()),o=e[r[0]]||e[`smbls.${r[0]}`];for(let n=1;n<r.length&&o;n++)o=o[r[n]];return o||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function Xx(t,e,r,o=new Set){if(o.has(e))return;o.add(e);let n=Gx(e);if(n.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<n.length;a++){let c=Yx(n[a],i);c&&Xx(t,c,r,o)}}for(let s in e){if(s==="extends"||s==="extend")continue;let i=e[s];t[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[s]={...i}:t[s]=i:typeof t[s]=="object"&&typeof i=="object"&&!Array.isArray(t[s])&&!Array.isArray(i)&&t[s]!==null&&i!==null?t[s]=Jx(t[s],i):t[s]=i}}function Jx(t,e){let r={...t};for(let o in e){let n=r[o],s=e[o];n&&s&&typeof n=="object"&&typeof s=="object"&&!Array.isArray(n)&&!Array.isArray(s)&&typeof n!="function"&&typeof s!="function"?r[o]=Jx(n,s):r[o]=s}return r}Xo();R();var yT=["alert","alertdialog","application","article","banner","button","cell","checkbox","columnheader","combobox","complementary","contentinfo","definition","dialog","directory","document","feed","figure","form","grid","gridcell","group","heading","img","link","list","listbox","listitem","log","main","marquee","math","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","navigation","none","note","option","presentation","progressbar","radio","radiogroup","region","row","rowgroup","rowheader","scrollbar","search","searchbox","separator","slider","spinbutton","status","switch","tab","table","tablist","tabpanel","term","textbox","timer","toolbar","tooltip","tree","treegrid","treeitem"],xf={default:["accesskey","autofocus","class","contenteditable","contextmenu","dir","draggable","hidden","id","lang","part","placeholder","slot","spellcheck","style","tabindex","title","translate","inert","radiogroup","role","about","datatype","inlist","prefix","property","resource","typeof","vocab","autocapitalize","autocorrect","autosave","color","itemprop","itemscope","itemtype","itemid","itemref","results","security","unselectable","is"],a:["accesskey","charset","coords","download","href","hreflang","name","rel","rev","shape","target","type"],aria:["aria-activedescendant","aria-atomic","aria-autocomplete","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],anchor:["download","href","hreflang","media","ping","rel","target","type","referrerpolicy"],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],area:["alt","coords","download","href","hreflang","media","referrerpolicy","rel","shape","target","ping"],base:["href","target"],blockquote:["cite"],button:["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","type","value"],canvas:["height","width"],col:["span","width"],colgroup:["span"],data:["value"],details:["open"],del:["cite","datetime"],dialog:["open"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],form:["acceptcharset","action","autocomplete","enctype","method","name","novalidate","target","rel"],html:["manifest"],iframe:["allow","allowfullscreen","allowtransparency","frameborder","height","loading","marginheight","marginwidth","mozallowfullscreen","name","referrerpolicy","sandbox","scrolling","seamless","src","srcdoc","webkitallowfullscreen","width"],img:["alt","crossorigin","decoding","height","ismap","loading","referrerpolicy","sizes","src","srcset","usemap","width"],ins:["cite","datetime"],input:["accept","alt","autocomplete","capture","checked","crossorigin","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","indeterminate","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","type","value","width"],keygen:["challenge","disabled","form","keytype","keyparams","name"],label:["form","for"],li:["value"],link:["as","crossorigin","href","hreflang","integrity","media","imagesrcset","imagesizes","referrerpolicy","rel","sizes","type","charset"],map:["name"],menu:["type"],media:["autoplay","controls","currenttime","defaultmuted","defaultplaybackrate","loop","mediagroup","muted","playsinline","preload","src","volume"],meta:["charset","content","http-equiv","name","media"],meter:["form","high","low","max","min","optimum","value"],quote:["cite"],object:["classid","data","form","height","name","type","usemap","width","wmode"],ol:["reversed","start","type"],optgroup:["disabled","label"],option:["disabled","label","selected","value"],output:["form","for","name"],param:["name","value"],progress:["max","value"],slot:["name"],script:["async","charset","crossorigin","defer","integrity","nomodule","nonce","referrerpolicy","src","type"],select:["autocomplete","disabled","form","multiple","name","required","size","value","onchange"],source:["height","media","sizes","src","srcset","type","width"],style:["media","nonce","scoped","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],textarea:["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","value","wrap"],td:["align","colspan","headers","rowspan","scope","abbr","height","width","valign"],th:["align","colspan","headers","rowspan","scope","abbr"],time:["datetime"],track:["default","kind","label","src","srclang"],video:["autoplay","controls","crossorigin","disablepictureinpicture","disableremoteplayback","height","loop","muted","playsinline","poster","preload","src","width"],svg:["className","class","color","height","id","lang","max","media","method","min","name","style","target","type","width","role","tabindex","crossorigin","accent-height","accumulate","additive","alignment-baseline","allowReorder","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","clip","clip-path","clipPathUnits","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","focusable","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","href","horiz-adv-x","horiz-origin-x","ideographic","image-rendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","markerHeight","marker-mid","marker-start","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","paint-order","panose-1","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","surfaceScale","systemLanguage","tableValues","targetX","targetY","text-anchor","text-decoration","textLength","text-rendering","to","transform","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","values","vector-effect","version","vert-adv-y","vert-origin-x","vert-origin-y","v-hanging","v-ideographic","viewBox","viewTarget","visibility","v-mathematical","widths","word-spacing","writing-mode","x1","x2","x","xChannelSelector","x-height","xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xmlns","xmlns:xlink","xml:space","y1","y2","y","yChannelSelector","z","zoomAndPan"]},Qx=["oncopy","oncut","onpaste","oncompositionend","oncompositionstart","oncompositionupdate","onfocus","onfocusin","onfocusout","onblur","onchange","onbeforeinput","oninput","onreset","onsubmit","oninvalid","onformdata","onload","onerror","ontoggle","onkeydown","onkeypress","onkeyup","onabort","oncanplay","oncanplaythrough","oncuechange","ondurationchange","onemptied","onencrypted","onended","onloadeddata","onloadedmetadata","onloadstart","onpause","onplay","onplaying","onprogress","onratechange","onseeked","onseeking","onstalled","onsuspend","ontimeupdate","onvolumechange","onwaiting","onauxclick","onclick","oncontextmenu","ondblclick","ondrag","ondragend","ondragenter","ondragexit","ondragleave","ondragover","ondragstart","ondrop","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onselect","onselectionchange","onselectstart","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ongotpointercapture","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onlostpointercapture","onscroll","onresize","onwheel","onanimationstart","onanimationend","onanimationiteration","ontransitionstart","ontransitionrun","ontransitionend","ontransitioncancel","onoutrostart","onoutroend","onintrostart","onintroend","onmessage","onmessageerror","onvisibilitychange","oncancel","onclose","onfullscreenchange","onfullscreenerror"],Nr=t=>t.startsWith("aria")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"aria-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):t.startsWith("data")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"data-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):tw(t),bT=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate"]),tw=t=>bT.has(t)?t.toLowerCase():null,_T=new Set(["draggable","contenteditable","spellcheck","autocorrect"]),cr=t=>typeof t=="string"&&(_T.has(t)||t.startsWith("aria-")),Ke=(t,e)=>e!==!0&&e!==!1?e:cr(t)?e?"true":"false":e===!0?"":e,jr=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Nr(e)||xf.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(xf,t)?xf[t].includes(e):!1,Xg=t=>{if(!w(t))return!1;let e=t.toLowerCase();return Qx.includes(e)},xT=(t,e,r)=>{let o={};for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(r&&n in r)continue;if(n==="aria"&&e[n]&&typeof e[n]=="object"){for(let a in e[n])bt(e[n][a])&&(o["aria-"+a]=e[n][a]);continue}if(n==="data"&&e[n]&&typeof e[n]=="object"){for(let a in e[n])if(bt(e[n][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());o["data-"+c]=e[n][a]}continue}let s=jr(t,n),i=Xg(n);if(bt(e[n])&&(s||i)){let a=Nr(n)||n;o[a]=e[n]}}return o},wT=(t,e)=>{let r={};if(t.attr)for(let o in t.attr)r[o]=t.attr[o](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let n=t.aria[o];typeof n=="function"&&(r["aria-"+o]=n(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let o in t.data){let n=t.data[o];if(typeof n=="function"){let s=o.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());r["data-"+s]=n(e,e.state,e.context)}}return r},Fr=(t,e)=>{let r=t.call("exec",e,t);if(r)return w(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},Gg=(t,e)=>{let r=(t.preSrc||"")+(Fr(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:o}=t;if(!o.files&&!o.assets)return r;if(r.startsWith("/assets/")){let n=r.slice(8),s=o.assets&&(o.assets[r]||o.assets[n]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let n=r.slice(7),s=o.files&&(o.files[r]||o.files[n]);return s&&s.content?s.content.src:r}if(o.assets){let n=o.assets[r];if(n&&n.content)return n.content.src}if(o.files){let n=o.files[r];if(n&&n.content)return n.content.src}return r},Yg={src:t=>Gg(t,t.src),href:t=>Fr(t,t.href),action:t=>Fr(t,t.action),poster:t=>Gg(t,t.poster),data:t=>Fr(t,t.data)},Jg=t=>{let e=t.tag||"div",r={};for(let o in Yg)if(t[o]!==void 0&&jr(e,o)){let n=Yg[o](t);n!==void 0&&(r[o]=n)}return r},Zx=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},ST=(t,e,r)=>{if(t==="$"){let n=Zx(e,r);return n===void 0&&(n=!!r[e]),n}let o=r[e]===!0||r.state[e];if(!o){let n=Zx(e,r);n!==void 0&&(o=n)}return t==="."?!!o:!o},kT=new Set(["$",".","!"]),vT=(t,e,r)=>{let o={},n=(s,i,a,c)=>{let l=i;o[s]=f=>{if(ST(a,c,f))return A(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!kT.has(i))continue;let a=t[s];if(!a||typeof a!="object")continue;let c=s.slice(1);for(let l in a){if(r&&l in r)continue;if(l==="aria"&&a[l]&&typeof a[l]=="object"){for(let h in a[l])n("aria-"+h,a[l][h],i,c);continue}if(l==="data"&&a[l]&&typeof a[l]=="object"){for(let h in a[l]){let g=h.replace(/([A-Z])/g,p=>"-"+p.toLowerCase());n("data-"+g,a[l][h],i,c)}continue}let f=jr(e,l),u=Xg(l);if(!f&&!u)continue;let d=Nr(l)||l;n(d,a[l],i,c)}}return o};function Mn(t={},e={}){let r=this,o=r.__ref;if(!o)return;if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof r.onBeforeUpdate=="function"&&Zg(o))try{let s=r.onBeforeUpdate(r,r.state,r.context,e);if(s&&typeof s.then=="function")s.then(()=>lr(o,!1),i=>{lr(o,!0),r.context?.plugins?.length&&At("error",r,{hook:"onBeforeUpdate",error:i})||console.error("[DOMQL] onBeforeUpdate error:",i)});else if(lr(o,!1),s===!1)return r}catch(s){throw lr(o,!0),s}let n=!t||Object.keys(t).length===0;if(Sc(()=>{if(t.state&&yt(r.state)&&r.state.$update(t.state),t.text!==void 0&&(r.text=t.text,!o.__exec.text&&r.node&&Fn(r,t.text??"")),t.html!==void 0&&(r.html=t.html,!o.__exec.html&&r.node&&(r.node.innerHTML=t.html)),t.style&&r.node?.style){if(!o.__exec.style)for(let s in t.style){let i=t.style[s];if(i==null)continue;let a=s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=String(i).replace(/\s*!important\s*$/,"");r.node.style.setProperty(a,c,"important")}r.style||(r.style={}),Object.assign(r.style,t.style)}if(t.attr&&r.node?.setAttribute){for(let s in t.attr){let i=t.attr[s];i==null||i===!1&&!cr(s)?r.node.removeAttribute(s):typeof i!="function"&&typeof i!="object"&&r.node.setAttribute(s,Ke(s,i))}r.attr||(r.attr={}),Object.assign(r.attr,t.attr)}if(t.data&&r.node?.dataset){for(let s in t.data)r.node.dataset[s]=t.data[s];r.data||(r.data={}),Object.assign(r.data,t.data)}for(let s in t){if(jt.has(s)||s==="state")continue;let i=t[s],a=r[s];if(a&&a.__ref&&typeof a.update=="function")a.update(i,e);else if(typeof i=="object"&&i!==null){let c=s.charCodeAt(0);c>=65&&c<=90&&ne(i,r,s,e)}else s!=="text"&&s!=="html"&&s!=="style"&&s!=="attr"&&s!=="data"&&(r[s]=i)}}),r.node&&n&&o.__effects&&o.__effects.length)for(let s=0;s<o.__effects.length;s++){let i=o.__effects[s];i&&!i._disposed&&!i._isSubscribeToEffect&&typeof i._execute=="function"&&i._execute()}else if(r.node&&o.__conditionalRunners)for(let s of o.__conditionalRunners)s();return At("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}function Br(t){if(!t)return;let e=t.__ref;if(!e)return;try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(o){console.error("[smbls] onBeforeRemove error:",o)}if(e.__effects){for(let o=0;o<e.__effects.length;o++)e.__effects[o].dispose();e.__effects.length=0}if(e.__eventCleanup){for(let o=0;o<e.__eventCleanup.length;o++)e.__eventCleanup[o]();e.__eventCleanup.length=0}if(e.__children){let o=e.__children.slice();e.__children.length=0;for(let n=0;n<o.length;n++){let s=t[o[n]];s&&s.__ref&&Br(s)}}t.node?.parentNode?t.node.remove():t.tag==="fragment"&&e.__fragmentAnchor?.parentNode&&e.__fragmentAnchor.remove();let r=t.state?.$destroy||t.state?.destroy;if(typeof r=="function"&&t.state.__element===t&&r.call(t.state),t.parent?.__ref?.__children){let o=t.parent.__ref.__children.indexOf(t.key);o!==-1&&t.parent.__ref.__children.splice(o,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(o){console.error("[smbls] onRemove error:",o)}t.node=null,t.parent=null,t.__ref=null}function Nn(){Br(this)}R();R();R();var CT=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],ET=["none","forwards","backwards","both"],AT=["normal","reverse","alternate","alternate-reverse"],TT=["running","paused"],OT=t=>/^[\d.]+m?s$/.test(t),RT=/^(?:translate(?:3d|x|y|z)?\((?:\s*0[a-z%]*\s*,?)+\)|scale(?:3d|x|y|z)?\((?:\s*1(?:\.0+)?\s*,?)+\)|rotate(?:3d|x|y|z)?\((?:\s*0[a-z%]*\s*,?)+\)|skew(?:x|y)?\((?:\s*0[a-z%]*\s*,?)+\)|matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\))$/,PT=t=>{let e=String(t).trim().toLowerCase();if(e===""||e==="none"||e==="initial"||e==="unset")return!0;let r=e.match(/[a-z0-9]+\([^()]*\)/g);return!r||r.join("").replace(/\s+/g,"")!==e.replace(/\s+/g,"")?!1:r.every(o=>RT.test(o.replace(/\s+/g,"")))},ew=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),IT={transform:PT,translate:ew,rotate:t=>ew(t)||/^\s*(?:[xyz]\s+)?0(?:deg|rad|turn|grad)?\s*$/.test(String(t).toLowerCase()),scale:t=>/^(none|initial|unset)$/.test(String(t).trim().toLowerCase())||/^(?:\s*1(?:\.0+)?)+\s*$/.test(String(t)),opacity:t=>/^(initial|unset)$/.test(String(t).trim().toLowerCase())||Number(t)===1},DT=t=>{let e=String(t).trim().toLowerCase();if(e==="from")return 0;if(e==="to")return 100;let r=e.match(/^(\d+(?:\.\d+)?)%$/);return r?Number(r[1]):null},$T=t=>{if(!S(t))return null;let e=null,r=-1;for(let o in t){let n=DT(o);n==null||!S(t[o])||n>=r&&(r=n,e=t[o])}return e},LT=t=>{let e=$T(t);if(!e)return!1;let r=Object.keys(e);if(!r.length)return!1;for(let o of r){let n=IT[o];if(!n)return!1;let s=e[o];if(s==null||typeof s=="object"||typeof s=="function"||!n(s))return!1}return!0},MT=(t,e)=>{if(S(t))return t;let{animation:r}=e.context&&e.context.designSystem||{},o=r&&r[t];return S(o)?o:null},FT=["reverse","alternate","alternate-reverse"],rw=(t,e,r)=>{let o=r||e.animationDirection;return o&&FT.includes(String(o))?"both":LT(MT(t,e))?"backwards":"both"},NT=0,ow=new Map,Qg=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(S(t)){let n=JSON.stringify(t),s=ow.get(n);if(s)return s;let i=`smbls-anim-${NT++}`,a=Tn(i,t);return ow.set(n,a),a}let o=r&&r[t];return S(o)?Tn(t,o):t},jT=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},o=t.split(/\s+/),n=null,s=[],i=null,a=null,c=null,l=null,f=null;for(let u of o)r&&r[u]?n=u:OT(u)?s.push(u):CT.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):AT.includes(u)?c=u:ET.includes(u)?l=u:TT.includes(u)?f=u:n||(n=u);return{name:n,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},tm={animation:(t,e)=>{if(w(t)&&t.includes(" ")){let r=jT(t,e);return{animationName:Qg(r.name||t,e),animationDuration:r.durations[0]||oe(e.animationDuration||"A").timing,animationDelay:r.durations[1]||oe(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||ye(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||rw(r.name||t,e,r.direction),animationIterationCount:r.iterationCount!=null?r.iterationCount:e.animationIterationCount||1,animationPlayState:r.playState||e.animationPlayState,animationDirection:r.direction||e.animationDirection}}return{animationName:Qg(t,e),animationDuration:oe(e.animationDuration||"A").timing,animationDelay:oe(e.animationDelay||"0s").timing,animationTimingFunction:ye(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||rw(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:Qg(t,e)}),animationDuration:t=>({animationDuration:oe(t).timing}),animationDelay:t=>({animationDelay:oe(t).timing}),animationTimingFunction:t=>({animationTimingFunction:ye(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};R();var em={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>N("height",t,e),width:(t,e)=>N("width",t,e),boxSizing:t=>Tt(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("height",e),..._t("width",r||e)}},inlineSize:(t,e)=>N("inlineSize",t,e),blockSize:(t,e)=>N("blockSize",t,e),minWidth:(t,e)=>N("minWidth",t,e),maxWidth:(t,e)=>N("maxWidth",t,e),widthRange:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("minWidth",e),..._t("maxWidth",r||e)}},minHeight:(t,e)=>N("minHeight",t,e),maxHeight:(t,e)=>N("maxHeight",t,e),heightRange:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("minHeight",e),..._t("maxHeight",r||e)}},size:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...N("inlineSize",e),...N("blockSize",r||e)}},minBlockSize:(t,e)=>N("minBlockSize",t,e),minInlineSize:(t,e)=>N("minInlineSize",t,e),maxBlockSize:(t,e)=>N("maxBlockSize",t,e),maxInlineSize:(t,e)=>N("maxInlineSize",t,e),minSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("minInlineSize",e),..._t("minBlockSize",r||e)}},maxSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("maxInlineSize",e),..._t("maxBlockSize",r||e)}},borderWidth:(t,e)=>N("borderWidth",t,e),borderTopWidth:(t,e)=>N("borderTopWidth",t,e),borderRightWidth:(t,e)=>N("borderRightWidth",t,e),borderBottomWidth:(t,e)=>N("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>N("borderLeftWidth",t,e),padding:(t,e)=>N("padding",t,e),scrollPadding:(t,e)=>N("scrollPadding",t,e),paddingInline:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("paddingInlineStart",e),..._t("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("paddingBlockStart",e),..._t("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>N("paddingBlockStart",t,e),paddingBottom:(t,e)=>N("paddingBlockEnd",t,e),paddingLeft:(t,e)=>N("paddingInlineStart",t,e),paddingRight:(t,e)=>N("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>N("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>N("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>N("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>N("paddingInlineEnd",t,e),margin:(t,e)=>N("margin",t,e),marginInline:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("marginInlineStart",e),..._t("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!w(e.marginBlock))return;let[r,o]=e.marginBlock.split(" ");return{..._t("marginBlockStart",r),..._t("marginBlockEnd",o||r)}},marginTop:(t,e)=>N("marginBlockStart",t,e),marginBottom:(t,e)=>N("marginBlockEnd",t,e),marginLeft:(t,e)=>N("marginInlineStart",t,e),marginRight:(t,e)=>N("marginInlineEnd",t,e),marginInlineStart:(t,e)=>N("marginInlineStart",t,e),marginInlineEnd:(t,e)=>N("marginInlineEnd",t,e),marginBlockStart:(t,e)=>N("marginBlockStart",t,e),marginBlockEnd:(t,e)=>N("marginBlockEnd",t,e),gap:t=>({gap:nf(t)}),columnGap:(t,e)=>Te(e,"columnGap",t),rowGap:(t,e)=>Te(e,"rowGap",t),flexWrap:t=>({display:"flex",flexWrap:t}),flexFlow:(t,e)=>{let r=e.reverse;if(!w(t))return;let[o,n]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(o="row"),(t.startsWith("y")||t==="column")&&(o="column"),{display:"flex",flexFlow:(o||"")+(!o.includes("-reverse")&&r?"-reverse":"")+" "+(n||"")}},flexAlign:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>ar(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>ar(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>ar(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>ar(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>ar(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>ar(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var rm={fontSize:t=>da(t)||t,fontFamily:t=>({fontFamily:fa(t)||t}),fontWeight:t=>({fontWeight:t,fontVariationSettings:'"wght" '+t}),lineClamp:t=>{if(t!=null)return t==="none"?{WebkitLineClamp:"none",lineClamp:"none"}:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:String(t),lineClamp:String(t),overflow:"hidden"}}};var om={overflow:t=>({overflow:t}),cursor:(t,e,r,o)=>{if(!t)return;let n=o.assets&&o.assets[t];if(n&&n.content)t=`url(${n.content.src})`;else{let s=o.files&&o.files[t];s&&s.content&&(t=`url(${s.content.src})`)}return{cursor:t}},opacity:t=>t!=null?{opacity:String(t)}:void 0,visibility:t=>t!=null?{visibility:t}:void 0,pointerEvents:t=>t!=null?{pointerEvents:t}:void 0};var nm={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>St(r,"k").k).join(" ")}},left:t=>St(t,"left"),top:t=>St(t,"top"),right:t=>St(t,"right"),bottom:t=>St(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>St(r,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>St(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};R();var wf=0,sm=()=>{wf++},im=()=>{wf>0&&wf--},xe=({context:t,state:e})=>{let r=t?.designSystem,o=e?.root?.globalTheme||r?.globalTheme;return o&&o!=="auto"?o:wf>0?null:r&&r.resolvedTheme||null},se=(t,e)=>{if(e==null||e==="")return;if(!S(e))return{[t]:e};let r={},o=!1;for(let n in e){let s=e[n];if(!(s==null||s==="")){if(S(s)){let i=se(t,s);i&&(r[n]=i,o=!0);continue}r[n]={[t]:s},o=!0}}return o?r:void 0},am={theme:(t,e)=>{if(t)return e.themeModifier?me(t,`@${e.themeModifier}`):me(t)},color:(t,e)=>{let r=xe(e);if(t)return se("color",It(t,r))},background:(t,e)=>{let r=xe(e);if(t)return w(t)&&t.includes("gradient")&&t.includes("(")?{background:_a(t,r)}:se("background",It(t,r))},backgroundColor:(t,e)=>{let r=xe(e);if(t)return se("backgroundColor",It(t,r))},backgroundImage:(t,e,r,o)=>{let n=xe(e);if(!t)return;let s=o.assets&&o.assets[t];if(s&&s.content)t=s.content.src;else{let i=o.files&&o.files[t];i&&i.content&&(t=i.content.src)}return se("backgroundImage",of(t,n))},textStroke:t=>({WebkitTextStroke:ef(t)}),outline:t=>({outline:qe(t)}),outlineOffset:(t,e)=>N("outlineOffset",t,e),border:t=>({border:qe(t)}),borderColor:(t,e)=>{let r=xe(e);if(t)return se("borderColor",It(t,r))},borderTopColor:(t,e)=>{let r=xe(e);if(t)return se("borderTopColor",It(t,r))},borderBottomColor:(t,e)=>{let r=xe(e);if(t)return se("borderBottomColor",It(t,r))},borderLeftColor:(t,e)=>{let r=xe(e);if(t)return se("borderLeftColor",It(t,r))},borderRightColor:(t,e)=>{let r=xe(e);if(t)return se("borderRightColor",It(t,r))},borderLeft:t=>({borderLeft:qe(t)}),borderTop:t=>({borderTop:qe(t)}),borderRight:t=>({borderRight:qe(t)}),borderBottom:t=>({borderBottom:qe(t)}),shadow:(t,e)=>{let r=xe(e);if(t)return se("boxShadow",rf(t,r))},boxShadow:(t,e)=>{if(!w(t))return;let[r,o]=t.split("!importan"),n=xe(e),s=o?" !important":"",i=ba(r.trim(),n);return w(i)?{boxShadow:i+s}:se("boxShadow",i)},textShadow:(t,{context:e})=>se("textShadow",ba(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:qe(t)})};var va={transition:t=>({transition:sf(t)}),transitionDuration:t=>({transitionDuration:xa(t)}),transitionDelay:t=>({transitionDelay:xa(t)}),transitionTimingFunction:t=>({transitionTimingFunction:ye(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};R();var cm={flow:(t,e)=>{let r=e.reverse;if(!w(t))return;let[o,n]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(o="row"),(t.startsWith("y")||t==="column")&&(o="column"),{display:"flex",flexFlow:(o||"")+(!o.includes("-reverse")&&r?"-reverse":"")+" "+(n||"")}},wrap:(t,e)=>({display:"flex",flexWrap:t}),align:(t,e)=>{let[r,o]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:o}}};var lm={area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:t}),templateColumns:t=>({gridTemplateColumns:t}),autoColumns:t=>({gridAutoColumns:t}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:t}),templateRows:t=>({gridTemplateRows:t}),autoRows:t=>({gridAutoRows:t}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var xt={...tm,...em,...rm,...om,...nm,...am,...va,...cm,...lm};var vt=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction","appearance","aspectRatio","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundRepeatX","backgroundRepeatY","backgroundSize","baselineShift","blockSize","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxDecorationBreak","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caretColor","clear","clip","clipPath","color","colorAdjust","colorInterpolation","colorInterpolationFilters","colorRendering","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","content","counterIncrement","counterReset","cursor","direction","display","emptyCells","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantNumeric","fontVariantPosition","fontWeight","fontVariationSettings","fontSynthesis","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","hyphens","imageOrientation","imageRendering","imeMode","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","initialLetter","isolation","justifyContent","justifyItems","justifySelf","left","letterSpacing","lineBreak","lineClamp","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","marginBlock","marginBlockEnd","marginBlockStart","marginInline","marginInlineEnd","marginInlineStart","mask","maskBorder","maskBorderImage","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","maxBlockSize","maxHeight","maxInlineSize","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","objectFit","objectPosition","objectViewBox","offset","offsetDistance","offsetPath","offsetRotate","opacity","order","orientation","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowClip","overflowScrolling","overflowWrap","overflowX","overflowY","overscrollBehavior","overscrollBehaviorX","overscrollBehaviorY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollPadding","scrollSnapAlign","scrollSnapType","scrollbarColor","scrollbarGutter","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","top","touchAction","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);R();var BT=/^-?[A-Z][0-9]?$/,UT=/^[a-z][0-9]?$/,nw=/var\(\s*(--[A-Za-z0-9-]+)/g,VT=t=>{let e=new Set,r=new Set;if(!t||typeof t!="object")return{knownLetters:e,knownVars:r};for(let o in t){let n=t[o];if(!(!n||typeof n!="object")){if(n.sequence&&typeof n.sequence=="object")for(let s in n.sequence)e.add(s);if(n.vars&&typeof n.vars=="object")for(let s in n.vars)r.add(s)}}return{knownLetters:e,knownVars:r}},HT=(t,e)=>{if(!e.size)return[];let r=t.split(/[(),\s]+/).filter(Boolean),o=new Set;for(let n of r){if(!BT.test(n))continue;let s=n.charCodeAt(0)===45?n.slice(1):n;e.has(s)&&o.add(n)}return[...o]},zT=(t,e)=>{if(!e.size)return[];let r=[];nw.lastIndex=0;let o;for(;o=nw.exec(t);){let n=o[1];if(e.has(n))continue;let s=n.lastIndexOf("-");if(s===-1)continue;let i=n.slice(s+1);if(!UT.test(i))continue;let a=n.slice(0,s+1)+i.toUpperCase();a!==n&&e.has(a)&&r.push({varName:n,corrected:a})}return r},Sf=new Set,sw=(t,e,r)=>{if(!Pt()||!w(e)||!e)return;let o;try{o=C()}catch{return}let{knownLetters:n,knownVars:s}=VT(o);if(!n.size&&!s.size)return;let i=HT(e,n),a=zT(e,s);if(!i.length&&!a.length)return;let c=r?.__ref?.path?r.__ref.path.join("."):r?.key||"?";for(let l of i){let f=`${c}::${t}::bare::${l}::${e}`;Sf.has(f)||(Sf.add(f),console.warn(`[smbls/css-in-props] "${t}" on <${c}> looks like it contains an un-wrapped design-system token ("${l}") \u2014 "${t}" has no registered resolver, so its value is forwarded to the browser untouched. A bare letter token there is invalid CSS, so the browser drops the ENTIRE "${t}" declaration (not just this argument). Wrap it in var(--<family>-${l.replace("-","")}) (or calc(-1 * var(--<family>-${l.replace("-","")})) for a negative). Value: "${e}"`))}for(let{varName:l,corrected:f}of a){let u=`${c}::${t}::case::${l}::${e}`;Sf.has(u)||(Sf.add(u),console.warn(`[smbls/css-in-props] "${t}" on <${c}> references ${l}, which the active design system never emits. CSS custom-property names are case-sensitive \u2014 the real variable is ${f}, so this reference silently never resolves. Value: "${e}"`))}};R();var WT=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,qT=(t,e,r)=>{let{context:o}=r;if(!o.designSystem?.media)return;let n=t.slice(1),s=o.designSystem.media[n],i=ie(e,r);if(!s)return{[t]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match(WT),c=a?a[1]||a[2]:n,l={[`${s} &`]:i};if(c==="dark"||c==="light"){let f=o.designSystem?.scopeSelector||":root",u=f===":root"?":root:not([data-theme])":`${f}:not([data-theme])`;l[`@media (prefers-color-scheme: ${c})`]={[`${u} &`]:i}}return l},iw=(t,e,r)=>({[t]:ie(e,r)}),Ca=(t,e,r)=>{let o=`&${t}`,n=ie(e,r);if(t.includes(",")&&n){let s={},i={};for(let a in n)typeof n[a]=="object"&&n[a]!==null?i[a]=n[a]:s[a]=n[a];if(Object.keys(i).length){let a=o.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[o]=s);for(let l in i){let f=a.map(u=>`${u} ${l}`).join(", ");c[f]=i[l]}return c}}return{[o]:n}},fm=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},KT=(t,e,r)=>{let o=t.slice(1),n=fm(o,r);if(n===void 0&&(n=!!r[o]),!!n)return ie(e,r)},GT=(t,e,r)=>({[t]:e}),YT=(t,e,r)=>{let o=t.slice(1),n=r[o]===!0||r.state?.[o];if(!n)if(typeof r[o]=="function")try{n=r[o](r,r.state,r.context)}catch{}else{let s=fm(o,r);s!==void 0&&(n=s)}if(n)return ie(e,r)},XT=(t,e,r)=>{let o=t.slice(1),n=r[o]===!0||r.state?.[o];if(!n)if(typeof r[o]=="function")try{n=r[o](r,r.state,r.context)}catch{}else{let s=fm(o,r);s!==void 0&&(n=s)}if(!n)return ie(e,r)},um=(t,e)=>ie(t,e),dm={"@":qT,":":Ca,"[":Ca,"*":Ca,"+":Ca,"~":Ca,"&":iw,">":iw,$:KT,"-":GT,".":YT,"!":XT};var kf=wr(),aw=(t,e,r)=>{let o=e?.context?.designSystem;o&&it(o);try{let n={},s={},i=(a,c)=>{if(r.unpack){n={...n,...c};return}n[a]=c};for(let a in t){let c=t[a];if(c!==null)if(a==="class"&&e.call("isString",t.class)){let l=c.split(" ");if(l.length){let f=e.context.designSystem.class,u=l.reduce((d,h)=>gt(d,f[h]),{});n.designSystemClass=u}}else if(a==="true"){let l=ut(c,e);gt(n,um(l,e))}else if(e.classlist[a]){let l=e.classlist[a],f=A(l)?l(e,e.state,e.context):l;f&&i(a,f),!kf&&S(n[a])&&(n[a].label=a)}else if(xt[a]){let l=ut(c,e);if(l===null)continue;T(l)&&(l=l.reduce((u,d)=>gt(u,d),{}));let f=xt[a](l,e,e.state,e.context);T(f)&&(f=f.reduce((u,d)=>gt(u,d),{})),f&&i(a,f),!kf&&S(n[a])&&(n[a].label=a)}else if(vt.has(a)){let l=ut(c,e);if(l===null)continue;typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),kf||sw(a,l,e),i(a,{[a]:l}),!kf&&S(n[a])&&(n[a].label=a)}else s[a]=c}return[n,s]}finally{o&&tt()}},cw=(t,e)=>{let r={};for(let o in t){let n=dm[o.slice(0,1)];if(n){let s=n(o,t[o],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]&&typeof r[i]=="object"&&typeof s[i]=="object"?qt(r[i],s[i]):r[i]=s[i])}}return r},ie=(t,e,r={unpack:!0})=>{let[o,n]=aw(t,e,r),s=cw(n,e),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return Fs(o,s);o._selectors=s}return o},JT=(t,e)=>{let r={};if(t.class)for(let o in t.class)r[o]=t.class[o](e);return r};R();var lw=t=>{if(S(t))return ie(t,t)},ZT=(t,e)=>{let r=lw(t);return typeof e=="function"?e(r):_e(r)};R();function hm(t,e,r){let o=t?.context?.analyze;if(!o||!o.emit||e==="warn"&&!o.shouldCapture("warnings")||e==="error"&&!o.shouldCapture("errors"))return;let n=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");o.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:e==="error"?"error":"warning",level:e,hook:e==="error"?"el.error":"el.warn",element:{key:t.key!=null?String(t.key):null,name:t.__name||null,tag:t.tag||null},message:n||null,args:r})}var fw=new Set;function QT(t,e,r){let o=String(e);if(fw.has(o))return;fw.add(o);let n=t?.__ref?.path,s=Array.isArray(n)&&n.length?n.join("."):t?.key!=null?String(t.key):"(unknown element)",i=r!=null?`resolves to a non-function (${typeof r}) \u2014 it cannot be called`:"is not registered in context.methods, context.functions, or context.utils, and is not an element method",a=`[smbls] el.call('${o}') at <${s}>: "${o}" ${i}. Returning undefined (unchanged behavior) \u2014 check the name for typos or register the function on the project. Warned once per name; repeat misses are silent.`;hm(t,"error",[a]),console.error(a)}function t1(...t){return hm(this,"warn",t),Si.apply(this,t)}function e1(...t){return hm(this,"error",t),co.apply(this,t)}var uw={update:Mn,remove:Nn,getDB:Ei,getQuery:Ai,getRootData:_i,getChildren:hi,getPath:gi,nextElement:ki,previousElement:vi,verbose:en,warn:t1,error:e1,variables:Ci,spotByPath:pi,set(t,e){let r=this.__ref;if(r){if(r.__setLocked){r.__setQueued={content:t,options:e};return}r.__setLocked=!0}try{if(this.removeContent(),t!=null){let o=this.context?.__create;o&&o(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(r){r.__setLocked=!1;let o=r.__setQueued;o&&(r.__setQueued=null,this.set(o.content,o.options))}}},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,o=this.key,n=this.parse();return this.remove(),e(n,r,o,t)},lookup(t){let e=this.parent;for(;e;){if(typeof t=="function"){if(t(e))return e}else if(typeof t=="string"){if(e.key===t)return e;if(e[t]&&e[t].__ref)return e[t]}e=e.parent}return null},lookdown(t){let e=this.__ref;if(!e?.__children)return null;for(let r of e.__children){let o=this[r];if(!o)continue;if(typeof t=="function"){if(t(o))return o}else if(typeof t=="string"&&o.key===t)return o;let n=o.lookdown?.(t);if(n)return n}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let o of r.__children){let n=this[o];n&&(typeof t=="function"?t(n)&&e.push(n):typeof t=="string"&&n.key===t&&e.push(n),n.lookdownAll?.(t,e))}return e},getRef(){return this.__ref},getRoot:bi,getRootState:yi,getRootContext:xi,getContext:wi,parse(t){let e={},r=t?new Set(t):null,o=this.__ref?.__exec;for(let n in this)if(!(n==="parent"||n==="node"||n==="__ref")&&!r?.has(n)){if(o&&o[n]!==void 0){e[n]=o[n];continue}typeof this[n]!="function"&&(e[n]=this[n])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let o of r.__children)this[o]?.parseDeep&&(e[o]=this[o].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let r of t)e[r]=this[r];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(let e in t){let r=t[e];if(r==null)continue;let o=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),n=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(o,n,"important")}},call(t,...e){let r=this.context,o=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof o=="function")return o.call(this,...e);Pt()&&QT(this,t,o)},removeContent(){let t=this.__ref;if(!t?.__children)return;let e=this.content;if(e?.remove){e.remove(),delete this.content;let r=t.__children.indexOf("content");r!==-1&&t.__children.splice(r,1)}e?.node?.parentNode&&e.node.parentNode.removeChild(e.node)}},pm=new WeakMap;function r1(t){if(!t)return uw;let e=pm.get(t);if(e)return e;e=Object.create(uw);let r=t.methods;if(r)for(let o in r)e[o]=r[o];return pm.set(t,e),e}function jn(t){let e=r1(t.context);Object.setPrototypeOf(t,e)}function vf(t){if(!t)return!1;let e=pm.get(t);if(!e)return!1;let r=t.methods;if(!r)return!1;for(let o in r)e[o]=r[o];return!0}var Cf=[],Ef=!1,Ur=0;function Af(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function dw(t){let e=typeof globalThis<"u"?globalThis.scheduler:null;if(e&&typeof e.yield=="function"){e.yield().then(t,t);return}if(typeof MessageChannel=="function"){let r=new MessageChannel;r.port1.onmessage=()=>{r.port1.close(),t()},r.port2.postMessage(0);return}setTimeout(t,0)}function pw(){return Ur?Af()-Ur>=50:!1}var Bn=0;function hw(){Bn===0&&!Ur&&(Ur=Af()),Bn++}function gw(){Bn>0&&Bn--,Bn===0&&!Ef&&(Ur=0)}function mw(t){Cf.push(t),Ef||(Ef=!0,dw(yw))}function yw(){for(Ur=Af();Cf.length;){let t=Cf.shift();try{t()}catch(e){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",e?.message||e)}if(Af()-Ur>=50)break}if(Cf.length){dw(yw);return}Ef=!1,Ur=0,Bn=0}R();Xo();var _m={};P(_m,{STATE_METHODS:()=>bw,applyInitialState:()=>Of,applyStateMethods:()=>ae,callStateMethod:()=>Ea,createState:()=>mm,isTracking:()=>bm,useHostState:()=>ym});var bw=new Set(["update","parse","clean","destroy","create","add","toggle","remove","set","replace","setByPath","setPathCollection","removeByPath","removePathCollection","getByPath","reset","apply","applyReplace","applyFunction","quietUpdate","quietReplace","rootUpdate","parentUpdate","keys","values","__element","__children","parent","root"]),Tf=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},Re=(t,e,r,{onlyIfAbsent:o}={})=>{Tf(t,"$"+e,r),!(o&&Object.prototype.hasOwnProperty.call(t,e))&&Tf(t,e,r)},Ea=(t,e,...r)=>{if(!t)return;let o=t["$"+e];if(typeof o=="function")return o.apply(t,r);let n=t[e];if(typeof n=="function")return n.apply(t,r)},ae=(t,e)=>{if(yt(e)){let n=e.__raw||e;Re(n,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),Re(n,"set",function(s,i={}){return e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,i),e},{onlyIfAbsent:!0}),Re(n,"setByPath",function(s,i,a={}){let c=s.split("."),l=e;for(let f=0;f<c.length-1;f++)l[c[f]]===void 0&&(l[c[f]]={}),l=l[c[f]];return l[c[c.length-1]]=i,e}),Re(n,"getByPath",function(s){let i=s.split("."),a=e;for(let c=0;c<i.length;c++){if(a==null)return;a=a[i[c]]}return a}),Re(n,"removeByPath",function(s,i={}){let a=s.split("."),c=e;for(let l=0;l<a.length-1;l++){if(c==null)return e;c=c[a[l]]}return c&&delete c[a[a.length-1]],e}),Re(n,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),Re(n,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),Re(n,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),Re(n,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&yt(a.parent);)a=a.parent;return Ea(a,"update",s,i)}),Re(n,"parentUpdate",function(s,i={}){if(e.parent)return Ea(e.parent,"update",s,i)}),Re(n,"quietReplace",function(s,i={}){return e.$replace(s,{quiet:!0,...i})}),Object.getOwnPropertyDescriptor(n,"root")||Object.defineProperty(n,"root",{get:function(){let s=e,i=yt(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,yt(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]},o={update(n){if(!n||typeof n!="object")return e;for(let s in n)e[s]=n[s];return e},apply(n){if(typeof n!="function")return e;let s=n(e);return s?e.$update(s):e},parse(){return{...e}},toggle(n){return e[n]=!e[n],e},set(n){if(!n||typeof n!="object")return e;r();for(let s in n)e[s]=n[s];return e},replace(n){return e.$set(n)},clean(){return r(),e}};for(let n in o)if(Tf(e,"$"+n,o[n]),typeof e[n]!="function"){if(Object.prototype.hasOwnProperty.call(e,n)){Cc(n,"");continue}Tf(e,n,o[n])}};var mm=function(t,e,r){return t.state=Of(t,e,r),t.state},Of=function(t,e,r){let{__ref:o}=t,n=t.state;if(n==null||n===!1){let s=e?.state||{};return ae(t,s),s}if(typeof n=="string")return o&&(o.__state=n),o.__stateType="string",o1(n,t,e);if(typeof n=="number"||typeof n=="boolean"){o&&(o.__state=n,o.__stateType=typeof n,o.__hasRootState=!0);let s=Xe({value:n});return s.__element=t,e?.state&&(s.parent=e.state),ae(t,s),s}if(typeof n=="function"&&(n=n(t,e?.state)||{}),typeof n=="object"&&!yt(n)){o&&(o.__hasRootState=!0),n.isRootState&&o&&(o.__hasRootState=!0);let s=Xe({...n});if(s.__element=t,!Object.getOwnPropertyDescriptor(s,"root")){let i=e?.state?.root||e?.state||s;Object.defineProperty(s,"root",{get:()=>i,enumerable:!1,configurable:!0})}return e?.state&&(s.parent=e.state,e.state.__children&&(e.state.__children[t.key]=s)),ae(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,r),s}return yt(n)?(n.__element=t,n):e?.state||{}};function gm(t,e){if(!e)return t;let r=e.split("/"),o=t;for(let n of r){if(o==null)return{};o=o[n]}return o??{}}function o1(t,e,r){if(!r?.state)return{};if(t===".")return r.state;if(t.startsWith("../")){let n=t.slice(3),s=r.state?.parent;return n&&s?gm(s,n):s??r.state??{}}if(t.startsWith("~/")){let n=r.state;for(;n?.parent;)n=n.parent;let s=t.slice(2);return s?gm(n,s):n??{}}let o=gm(r.state,t);if(o&&typeof o=="object"&&!yt(o)&&!Object.getOwnPropertyDescriptor(o,"root")){let n=r.state?.root||r.state;Object.defineProperty(o,"root",{get:()=>n,enumerable:!1,configurable:!0})}return o}var ym=(t,e)=>{if(!t)return xw;let r=s1(t,e);return!r||!r.state?xw:a1(r.state)},bm=()=>kc()!=null,n1=128;function s1(t,e){let r=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,o=t,n=null;for(let s=0;s<n1&&o;s++){if(r(o)&&o.state)return o;if(o.state&&!n&&(n=o),!o.parent||o.parent===o)break;o=o.parent}return n}var i1={get(t,e){return t[e]}},_w=new WeakMap,a1=t=>{let e=_w.get(t);return e||(e=new Proxy(t,i1),_w.set(t,e)),e},xw=new Proxy(Object.create(null),{get(){},has(){return!1}});var Rf="3.14.781";var ww="__SMBLS_ELEMENT_ID_ENGINE__",Sw=(t,e,r)=>{let o=e||Rf,n=r||(typeof globalThis<"u"?globalThis:null);if(!n)return t;let s=n[ww];return s&&s.engine&&s.version===o?s.engine:(s||(n[ww]={version:o,engine:t}),t)};var Rw=Sw({uniqId:1,scopedStyleId:0},Rf),Ta=[],km=!1;function kw(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function c1(){return typeof document<"u"&&document.visibilityState==="hidden"}var l1=250;function Pw(){if(!km){if(km=!0,typeof requestAnimationFrame!="function"){setTimeout(Ra,0);return}c1()?setTimeout(Ra,l1):requestAnimationFrame(Ra)}}var f1=300,u1=15e4;function Ra(){if(km=!1,!Ta.length)return;let t=Ta.splice(0,Ta.length);for(let e=0;e<t.length;e++){let r=t[e];if(r.node){if(!r.node.isConnected){let o=r.__ref||(r.__ref={});o.__mountAttempts=(o.__mountAttempts||0)+1,o.__mountFirstAttemptAt==null&&(o.__mountFirstAttemptAt=kw());let n=kw()-o.__mountFirstAttemptAt;o.__mountAttempts<=f1&&n<u1?(Ta.push(r),Pw()):console.warn("[DOMQL] onMounted dropped after",o.__mountAttempts,"attempts /",n,"ms \u2014 node never connected:",r.key||r.tag||r);continue}fr("Mounted",r,r.__ref?.__mountOptions||{})}}}function Iw(t,e){typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,Ta.push(t),Pw())}function vw(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&At("contentUpdate",t,e);let r=t.context?.designSystem;r&&it(r);try{t.onContentUpdate(t,t.state,t.context,e)}catch(o){if(t.context?.plugins?.length&&At("error",t,{hook:"onContentUpdate",error:o})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',o),t.context?.strictMode)throw o}finally{r&&tt()}}function Vn(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function d1(t){return t.charAt(2).toLowerCase()+t.slice(3)}function p1(t){return t.toLowerCase()}function vm(t){let e=t.charCodeAt(0);return e===58||e===64||e===38}function Oa(t,e){let r={...t};for(let o in e){let n=r[o],s=e[o];n&&s&&typeof n=="object"&&typeof s=="object"&&!Array.isArray(n)&&!Array.isArray(s)&&typeof n!="function"&&typeof s!="function"?r[o]=Oa(n,s):r[o]=s}return r}function ne(t,e,r,o={},n){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});let s=Object.create(null);s.key=r||t.key||`_${Rw.uniqId++}`,s.parent=e||null,s.context=t.context||e?.context||o.context||{},s.context.__create||(s.context.__create=ne);let i=s.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||s,path:e?.__ref?.path?[...e.__ref.path,s.key]:[s.key],origin:t};if(r&&!t.extends&&!t.extend){let p=r.indexOf("_");if(p>0){let m=r.substring(0,p),b=s.context?.components;b&&(b[m]||b["smbls."+m])?t={...t,extends:m}:b&&Pt()&&/^[A-Z]\w*_\d+$/.test(r)&&console.warn(`[smbls] auto-extend: key "${r}" looks like a multi-instance (${m}_N) but neither "${m}" nor "smbls.${m}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}Ln(s,t,o);let a=new Set(["childProps","attr","style","scope","data"]),c=s.props&&typeof s.props=="object"?s.props:null;for(let p in t){if(p==="parent"||p==="node"||p==="__ref"||p==="extends"||p==="context"||p==="props")continue;let m=t[p],b=s[p],_=b&&m&&typeof b=="object"&&typeof m=="object"&&!Array.isArray(b)&&!Array.isArray(m)&&typeof b!="function"&&typeof m!="function";_&&p.charCodeAt(0)>=65&&p.charCodeAt(0)<=90?s[p]=Oa(b,m):_&&a.has(p)?s[p]={...b,...m}:_&&vm(p)?s[p]=Oa(b,m):s[p]=m}function l(p){for(let m in p){let b=p[m],_=s[m],y=_&&b&&typeof _=="object"&&typeof b=="object"&&!Array.isArray(_)&&!Array.isArray(b)&&typeof _!="function"&&typeof b!="function";y&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?s[m]=Oa(_,b):y&&a.has(m)?s[m]={..._,...b}:y&&vm(m)?s[m]=Oa(_,b):s[m]=b}}c&&l(c),t.props&&typeof t.props=="object"&&l(t.props),t.data!==void 0&&(s.data=t.data),t.classlist!==void 0&&(s.classlist=t.classlist),t.text!==void 0&&(s.text=t.text),t.html!==void 0&&(s.html=t.html);let f=s.scope&&typeof s.scope=="object"?s.scope:null,u=e?.scope,d=s.context&&typeof s.context.globalScope=="object"&&s.context.globalScope||null,h=u||d||null;if(t.scope!==void 0||f){let p={};f&&Object.assign(p,f),t.scope!==void 0&&Object.assign(p,t.scope),s.scope=vc(p,h)}else h&&(s.scope=h);if(t.if!==void 0&&(s.if=t.if),jn(s),h1(s,e,t),s.if!=null){let p;if(typeof s.if=="function")try{p=s.if(s,s.state,s.context)}catch(m){if(p=!1,i.__ifError=m,typeof console<"u"&&console.warn){let b=s.key||s.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${b} \u2014 treating as false:`,m?.message||m)}}else p=s.if;i.__if=!!p}if(i.__if)typeof s.if=="function"&&(i.__ifInitialized=!0);else return e&&(e[s.key]=s),typeof s.if=="function"&&Lw(s,i,s.if),s;s.tag||(s.tag=$r(s)),fr("Init",s,o);let g=s.node=Lr(s);if(!g)return s;if(s.tag==="fragment"){let m=(s.context?.document||globalThis.document).createComment("");g.appendChild(m),i.__fragmentAnchor=m}fr("AttachNode",s,o),g.setAttribute&&s.key&&g.setAttribute("data-key",s.key),e&&(e[s.key]=s,e.__ref?.__children&&(e.__ref.__children.includes(s.key)||e.__ref.__children.push(s.key))),g.setAttribute&&s.context?.scopeSelector&&s.context.scopeSelector!==":root"&&s.context.key&&s.key===s.context.key&&g.setAttribute("data-smbls-app",s.context.key),s.id&&g.setAttribute&&(g.id=s.id),jw(s,o),$w(s),Cm(s),Fw(s),O1(s);try{Bw(s,o)}catch(p){if(typeof console<"u"&&console.error){let m=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${m}:`,p?.message||p,p?.stack?`
52
52
  `+p.stack.split(`
53
53
  `).slice(0,6).join(`
54
- `):"")}}if(Cm(s,!0),Nw(s,e,n),typeof s.html=="function"&&s.node&&!s.node.innerHTML){let p=s.context?.designSystem;p&&it(p);try{let m=s.html(s,s.state,s.context);m!=null&&typeof m!="function"&&(s.node.innerHTML=m)}catch{}finally{p&&tt()}}if(fr("Create",s,o),fr("Complete",s,o),fr("Render",s,o),fr("RenderRouter",s,o),Ow(s,o),typeof s.onFrame=="function"){let p=s.onFrame,m=s.context?.designSystem,b=()=>{if(s.node){if(s.node.isConnected){m&&it(m);try{p(s,s.state,s.context)}catch(_){console.error("[DOMQL] onFrame error:",_)}finally{m&&tt()}}requestAnimationFrame(b)}};requestAnimationFrame(b)}return s}function d1(t,e,r){let o=!e,n=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=o&&n&&t.context?.state,i=r.state!==void 0&&!s?r.state:t.state&&!yt(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,ae(t,t.state);else if(t.context?.state){let a=t.context.state,c={...a},l=t.context?.polyglot;if(l?.translations){let f=t.context,u=a.lang||l.defaultLang||"en",d=new Set,h=(m,b)=>{d.has(m)||er(f,m,c)&&(c[m]=b,d.add(m),Ue(f,m))},g=l.translations[u];if(g&&typeof g=="object")for(let m in g)h(m,g[m]);let p=new Set(l.languages||[]);for(let m in l.translations)p.has(m)||h(m,l.translations[m])}t.state=yt(c)?c:Xe(c),t.state.__element=t,t.state.root=t.state,ae(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),ae(t,t.state);return}if(typeof i=="string"){if(t.state=Rw(i,e),t.state&&typeof t.state=="object"&&!yt(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}ae(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=yt(a)?a:Xe(a||{})}else yt(i)?t.state=i:t.state=Xe({...i});t.state.__element=t,e?.state?(t.state.parent=e.state,t.state.root=e.state.root||e.state):t.state.root=t.state,ae(t,t.state)}function ym(t,e){if(!e)return t;let r=e.split("/"),o=t;for(let n of r){if(o==null)return{};o=o[n]}return o??{}}function Rw(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let n=t.slice(3);return n?ym(e.state,n):e.state??{}}if(t.startsWith("~/")){let n=e.state?.root||e.state,s=t.slice(2);return s?ym(n,s):n??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=ym(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let o=e.context?.polyglot;if(o?.translations){let n=e.state?.root?.lang||o.defaultLang||"en",s=o.translations[n];if(s?.[t]!==void 0)return s[t];if(o.translations[t]!==void 0)return o.translations[t]}return{}}var p1=new Set(["s","state","ctx","context"]);function h1(t){try{let r=Function.prototype.toString.call(t).match(/^[^(]*\(([^)]*)\)/);return r?r[1].split(",").map(o=>o.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function g1(t){if(typeof t!="function"||t.length!==2)return!1;let e=h1(t);if(e.length<2)return!1;let r=e[1].replace(/[{}[\]]/g,"").trim();return r.length>0&&!p1.has(r)}function m1(t){let e=t.__ref,r=t.tag||"div",o=t.context?.designSystem,n=[],s=Object.keys(t);for(let i=0;i<s.length;i++){let a=s[i];if(typeof t[a]!="function"||jt.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||Un(a)||xt[a]||vt&&vt.has(a)||jr(r,a)||(Pt()&&g1(t[a])&&console.warn(`[smbls] custom prop "${a}"${t.key?` on key "${t.key}"`:""} is a function \u2014 it will be auto-invoked on read and its RETURN VALUE stored, not preserved as a callable reference. If you meant to stash a callback, use el.call('${a}', \u2026) instead of reading el.${a}(\u2026) directly (see RULES.md Rule 8).`),n.push({prop:a,fn:t[a]}))}for(let i=0;i<n.length;i++){let{prop:a,fn:c}=n[i];e.__exec[a]=c,Object.defineProperty(t,a,{get(){o&&it(o);try{return c(t,t.state,t.context)}catch{return}finally{o&&tt()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function y1(t,e){if(!(!Array.isArray(e)||e.length===0))for(let r=0;r<e.length;r++){let o=e[r];try{typeof o=="function"?o(t,t.state,t.context):typeof o=="string"&&t.state?.[o]}catch{}}}function Bt(t,e,r){return!Array.isArray(e)||e.length===0?r:function(...o){return y1(t,e),r.apply(this,o)}}function Ea(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function Ct(t,e){return()=>t.path.join(".")+"::"+e}function Pw(t,e){let r=t.__ref,o=!!(e&&e.skipIfEffect);if(m1(t),typeof t.text=="function"){let s=t.text,i=Bt(t,t.textDeps,s),a=Z(()=>{if(!r.contentManaged)try{let c=i(t,t.state,t.context);t.node&&c!=null&&typeof c!="function"&&typeof c!="object"&&(typeof c=="string"&&c.includes("{{")&&(c=to.call(t,c,t.state)),Mn(t,c))}catch{}},{depth:r.path.length,label:Ct(r,"text")});r.__effects.push(a),r.__exec.text=s}else if(typeof t.text=="string"&&t.text.includes("{{")){let s=t.text,i=Z(()=>{if(r.contentManaged)return;let a=to.call(t,s,t.state);a!=null&&(t.text=a),t.node&&Mn(t,a??"")},{depth:r.path.length,label:Ct(r,"text")});r.__effects.push(i),r.__exec.text=s}for(let s of Object.keys(t))if(typeof t[s]=="function"&&!jt.has(s)&&!Un(s)&&!r.__exec[s]){if(xt[s]){let i=t[s],a=Bt(t,t[s+"Deps"],i),c=s,l,f=Z(()=>{let u=t.context?.designSystem;u&&it(u);try{let d=a(t,t.state,t.context),h=xt[c](d,t,t.state,t.context),g=c==="show"||c==="hide";if(h&&t.node){let p=km(h),m=g&&t.node.style.display!=="none";(p===null||p!==l||m)&&(l=p,Bn(t.node,h))}else if(t.node&&g){l=void 0;let p=r.__explicitDisplay;t.node.style.display=typeof p=="string"?p:""}}finally{u&&tt()}},{depth:r.path.length,label:Ct(r,c)});r.__effects.push(f),r.__exec[s]=i}else if(vt&&vt.has(s)){let i=t[s],a=Bt(t,t[s+"Deps"],i),c=s,l,f=Z(()=>{let u=t.context?.designSystem;u&&it(u);try{let d=a(t,t.state,t.context);if(t.node)if(d!=null){let h=c+":"+String(d);h!==l&&(l=h,Bn(t.node,{[c]:d}))}else l=void 0,t.node.style[c]=""}finally{u&&tt()}},{depth:r.path.length,label:Ct(r,c)});r.__effects.push(f),r.__exec[s]=i}}if(typeof t.html=="function"){let s=t.html,i=Bt(t,t.htmlDeps,s),a=Z(()=>{let c=t.context?.designSystem;c&&it(c);try{let l=i(t,t.state,t.context);t.node&&l!=null&&typeof l!="function"&&(t.node.innerHTML=l)}finally{c&&tt()}},{depth:r.path.length,label:Ct(r,"html")});r.__effects.push(a),r.__exec.html=s}if(typeof t.value=="function"){let s=t.value,i=Bt(t,t.valueDeps,s),a=Z(()=>{try{let c=i(t,t.state,t.context);if(!t.node||!("value"in t.node))return;let l=c==null?"":String(c);if(t.node.value===l)return;let f=typeof document<"u"&&document.activeElement===t.node,u=f&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,d=f&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=l,f&&u!=null&&d!=null)try{t.node.setSelectionRange(u,d)}catch{}}catch{}},{depth:r.path.length,label:Ct(r,"value")});r.__effects.push(a),r.__exec.value=s}if(typeof t.style=="function"){let s=t.style,i=Bt(t,t.styleDeps,s),a,c=Z(()=>{let l=i(t,t.state,t.context),f=km(l);(f===null||f!==a)&&(a=f,Bn(t.node,l))},{depth:r.path.length,label:Ct(r,"style")});r.__effects.push(c),r.__exec.style=s}else if(t.style&&typeof t.style=="object")for(let s in t.style){let i=t.style[s];if(typeof i!="function")continue;let a=Bt(t,Ea(t.styleDeps,s),i),c,l=Z(()=>{try{let f=a(t,t.state,t.context);if(t.node){let u=s+":"+String(f);u!==c&&(c=u,Bn(t.node,{[s]:f}))}}catch{}},{depth:r.path.length,label:Ct(r,"style."+s)});r.__effects.push(l)}if(t.attr&&typeof t.attr=="object"){for(let s in t.attr)if(typeof t.attr[s]=="function"){let i=Bt(t,Ea(t.attrDeps,s),t.attr[s]),a=s,c=Z(()=>{try{let l=i(t,t.state,t.context);t.node?.setAttribute&&(l==null||l===!1&&!cr(a)?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,Ke(a,l)))}catch{}},{depth:r.path.length,label:Ct(r,"attr."+a)});r.__effects.push(c)}}if(t.aria&&typeof t.aria=="object")for(let s in t.aria){if(typeof t.aria[s]!="function")continue;let i=Bt(t,Ea(t.ariaDeps,s),t.aria[s]),a="aria-"+s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=Z(()=>{try{let l=i(t,t.state,t.context);if(!t.node?.setAttribute)return;l==null?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,Ke(a,l))}catch{}},{depth:r.path.length,label:Ct(r,"aria."+s)});r.__effects.push(c)}if(t.data&&typeof t.data=="object")for(let s in t.data){if(typeof t.data[s]!="function")continue;let i=Bt(t,Ea(t.dataDeps,s),t.data[s]),c="data-"+s.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),l=Z(()=>{try{let f=i(t,t.state,t.context);if(!t.node?.setAttribute)return;f==null||f===!1?t.node.removeAttribute(c):typeof f!="function"&&typeof f!="object"&&t.node.setAttribute(c,f===!0?"":f)}catch{}},{depth:r.path.length,label:Ct(r,"data."+s)});r.__effects.push(l)}let n=t.classlist&&typeof t.classlist=="object"&&!Array.isArray(t.classlist)?t.classlist:t.class&&typeof t.class=="object"&&!Array.isArray(t.class)?t.class:null;if(n)for(let s in n){if(typeof n[s]!="function")continue;let i=Bt(t,Ea(t.classDeps,s),n[s]),a=Z(()=>{try{let c=i(t,t.state,t.context);if(!t.node?.classList)return;typeof c=="string"?t.node.classList.add(c):c?t.node.classList.add(s):t.node.classList.remove(s)}catch{}},{depth:r.path.length,label:Ct(r,"class."+s)});r.__effects.push(a)}!o&&typeof t.if=="function"&&Iw(t,r,t.if);for(let s of Object.keys(t)){if(jt.has(s)||typeof t[s]!="function")continue;let i=s.charCodeAt(0);if(i>=65&&i<=90||Un(s))continue;let a=t[s];r.__exec[s]=a;let c=t.tag||"div";if(jr(c,s)&&!xt[s]&&!(vt&&vt.has(s))){let l=Nr(s)||s,f=Bt(t,t[s+"Deps"],a),u=Z(()=>{try{let d=f(t,t.state,t.context);t.node?.setAttribute&&(d==null||d===!1&&!cr(l)?t.node.removeAttribute(l):typeof d!="function"&&typeof d!="object"&&(l==="src"&&"src"in t.node?t.node.src=d:t.node.setAttribute(l,Ke(l,d))))}catch{}},{depth:r.path.length,label:Ct(r,s)});r.__effects.push(u)}}if(x1(t),k1(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let s=t.onStateUpdate,i=t.stateDeps,a=!1,c=[],l=Z(()=>{let f=[];for(let g=0;g<i.length;g++){let p=i[g];try{f[g]=typeof p=="function"?p(t,t.state,t.context):t.state?.[p]}catch{f[g]=void 0}}if(!a){a=!0,c=f;return}let u=f.length!==c.length;for(let g=0;!u&&g<f.length;g++)f[g]!==c[g]&&(u=!0);let d=c;if(c=f,!u)return;let h=t.context?.designSystem;h&&it(h);try{s(t,t.state,t.context,{prev:d,next:f})}catch(g){if(t.context?.plugins?.length&&At("error",t,{hook:"onStateUpdate",error:g})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',g),t.context?.strictMode)throw g}finally{h&&tt()}},{depth:r.path.length,label:Ct(r,"onStateUpdate")});r.__effects.push(l)}S1(t)}function Sw(t){let e=t.parent,r=e?.node;if(!r||!t.node){Nw(t,t.parent);return}let o=null,n=Object.keys(e),s=n.indexOf(t.key);for(let i=s+1;i<n.length;i++){let a=e[n[i]];if(a?.node?.parentNode===r){o=a.node;break}}o?r.insertBefore(t.node,o):r.appendChild(t.node)}function Iw(t,e,r){let o=Bt(t,t.ifDeps,r),n=Z(()=>{let s;try{s=o(t,t.state,t.context)}catch(a){if(s=!1,e.__ifError=a,typeof console<"u"&&console.warn){let c=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${c} \u2014 treating as false:`,a?.message||a)}return}let i=e.__if;if(e.__if=!!s,i&&!e.__if&&t.node)t.node.remove();else if(!i&&e.__if)if(e.__ifInitialized)t.node||(t.node=Lr(t)),t.node&&(t.node.ref=t),Sw(t),Sm(t);else{if(e.__ifInitialized=!0,t.tag||(t.tag=$r(t)),fr("Init",t,{}),t.node||(t.node=Lr(t)),!t.node)return;if(t.parent?.__ref?.__children&&!t.parent.__ref.__children.includes(t.key)&&t.parent.__ref.__children.push(t.key),t.tag==="fragment"&&!e.__fragmentAnchor){let c=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(c),e.__fragmentAnchor=c}fr("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),Mw(t,{}),Pw(t,{skipIfEffect:!0}),Sm(t),$w(t),Fw(t,{}),Sw(t),Ow(t,{})}},{depth:e.path.length,label:Ct(e,"if")});e.__effects.push(n)}function Mn(t,e){let r=t.node;if(!r)return;let o=e==null||typeof e=="object"?"":String(e);if(t.tag==="string"){r.nodeValue!==o&&(r.nodeValue=o);return}let n=t.__ref,s=n?n.__textNode:null;if(s&&s.parentNode!==r&&(s=null),!s){let i=r.firstChild;i&&i.nodeType===3&&(s=i)}s?s.nodeValue!==o&&(s.nodeValue=o):r.firstChild?(s=(r.ownerDocument||t.context?.document||globalThis.document).createTextNode(o),r.insertBefore(s,r.firstChild)):(r.textContent=o,s=r.firstChild&&r.firstChild.nodeType===3?r.firstChild:null),n&&(n.__textNode=s||null)}function Sm(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&Mn(t,t.text),C1(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in e){let r=String(t.value);e.value!==r&&(e.value=r)}if(t.style&&typeof t.style=="object"&&Bn(e,t.style),t.attr&&typeof t.attr=="object")for(let r in t.attr){let o=t.attr[r];typeof o=="function"||typeof o=="object"||o!=null&&(o===!1&&!cr(r)||e.setAttribute&&e.setAttribute(r,Ke(r,o)))}if(t.data&&typeof t.data=="object")for(let r in t.data){let o=t.data[r];typeof o=="function"||typeof o=="object"||o==null||o===!1||e.dataset&&(e.dataset[r]=o===!0?"":o)}if(t.classlist||t.class){let r=t.classlist||t.class;if(typeof r=="string")r.split(" ").forEach(o=>o&&e.classList.add(o));else if(typeof r=="object")for(let o in r){let n=typeof r[o]=="function"?r[o](t,t.state,t.context):r[o];n&&e.classList.add(typeof n=="string"?n:o)}}}}function km(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function Bn(t,e){if(!t||!e||!t.style)return;let r=null;for(let o in e){let n=e[o];if(n!=null){if(o.charAt(0)==="&"&&typeof n=="object"){r||(r={}),r[o]=n;continue}try{let s=String(n),i=o.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),a=s.trim(),c=/\s*!important\s*$/.test(a),l=a.replace(/\s*!important\s*$/,"");t.style.setProperty(i,l,c?"important":"")}catch{}}}r&&b1(t,r)}function b1(t,e){let r=`_ds${Aw.scopedStyleId++}`;t.classList.add(r);let o=t.ownerDocument,n=o.querySelector("style[data-smbls-scoped]");n||(n=o.createElement("style"),n.setAttribute("data-smbls-scoped",""),o.head.appendChild(n));let s="";for(let i in e){let a="."+r,c=i.replace(/&/g,a).split(",").map(f=>{let u=f.trim();return u.includes(a)?u:a+u}).join(", "),l=e[i];if(typeof l=="object"){let f="",u="";for(let d in l){let h=l[d];if(typeof h=="object"){let g=d.includes("&")?c.split(", ").map(m=>d.replace(/&/g,m)).join(", "):c.split(", ").map(m=>`${m} ${d}`).join(", "),p="";for(let m in h)p+=`${m.replace(/[A-Z]/g,b=>"-"+b.toLowerCase())}: ${h[m]};`;u+=Oe(`${g} { ${p} }`,g)+`
54
+ `):"")}}if(Tm(s,!0),Uw(s,e,n),typeof s.html=="function"&&s.node&&!s.node.innerHTML){let p=s.context?.designSystem;p&&it(p);try{let m=s.html(s,s.state,s.context);m!=null&&typeof m!="function"&&(s.node.innerHTML=m)}catch{}finally{p&&tt()}}if(fr("Create",s,o),fr("Complete",s,o),fr("Render",s,o),fr("RenderRouter",s,o),Iw(s,o),typeof s.onFrame=="function"){let p=s.onFrame,m=s.context?.designSystem,b=()=>{if(s.node){if(s.node.isConnected){m&&it(m);try{p(s,s.state,s.context)}catch(_){console.error("[DOMQL] onFrame error:",_)}finally{m&&tt()}}requestAnimationFrame(b)}};requestAnimationFrame(b)}return s}function h1(t,e,r){let o=!e,n=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=o&&n&&t.context?.state,i=r.state!==void 0&&!s?r.state:t.state&&!yt(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,ae(t,t.state);else if(t.context?.state){let a=t.context.state,c={...a},l=t.context?.polyglot;if(l?.translations){let f=t.context,u=a.lang||l.defaultLang||"en",d=new Set,h=(m,b)=>{d.has(m)||er(f,m,c)&&(c[m]=b,d.add(m),Ue(f,m))},g=l.translations[u];if(g&&typeof g=="object")for(let m in g)h(m,g[m]);let p=new Set(l.languages||[]);for(let m in l.translations)p.has(m)||h(m,l.translations[m])}t.state=yt(c)?c:Xe(c),t.state.__element=t,t.state.root=t.state,ae(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),ae(t,t.state);return}if(typeof i=="string"){if(t.state=Dw(i,e),t.state&&typeof t.state=="object"&&!yt(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}ae(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=yt(a)?a:Xe(a||{})}else yt(i)?t.state=i:t.state=Xe({...i});t.state.__element=t,e?.state?(t.state.parent=e.state,t.state.root=e.state.root||e.state):t.state.root=t.state,ae(t,t.state)}function xm(t,e){if(!e)return t;let r=e.split("/"),o=t;for(let n of r){if(o==null)return{};o=o[n]}return o??{}}function Dw(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let n=t.slice(3);return n?xm(e.state,n):e.state??{}}if(t.startsWith("~/")){let n=e.state?.root||e.state,s=t.slice(2);return s?xm(n,s):n??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=xm(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let o=e.context?.polyglot;if(o?.translations){let n=e.state?.root?.lang||o.defaultLang||"en",s=o.translations[n];if(s?.[t]!==void 0)return s[t];if(o.translations[t]!==void 0)return o.translations[t]}return{}}var g1=new Set(["s","state","ctx","context"]);function m1(t){try{let r=Function.prototype.toString.call(t).match(/^[^(]*\(([^)]*)\)/);return r?r[1].split(",").map(o=>o.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function y1(t){if(typeof t!="function"||t.length!==2)return!1;let e=m1(t);if(e.length<2)return!1;let r=e[1].replace(/[{}[\]]/g,"").trim();return r.length>0&&!g1.has(r)}function b1(t){let e=t.__ref,r=t.tag||"div",o=t.context?.designSystem,n=[],s=Object.keys(t);for(let i=0;i<s.length;i++){let a=s[i];if(typeof t[a]!="function"||jt.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||Vn(a)||xt[a]||vt&&vt.has(a)||jr(r,a)||(Pt()&&y1(t[a])&&console.warn(`[smbls] custom prop "${a}"${t.key?` on key "${t.key}"`:""} is a function \u2014 it will be auto-invoked on read and its RETURN VALUE stored, not preserved as a callable reference. If you meant to stash a callback, use el.call('${a}', \u2026) instead of reading el.${a}(\u2026) directly (see RULES.md Rule 8).`),n.push({prop:a,fn:t[a]}))}for(let i=0;i<n.length;i++){let{prop:a,fn:c}=n[i];e.__exec[a]=c,Object.defineProperty(t,a,{get(){o&&it(o);try{return c(t,t.state,t.context)}catch{return}finally{o&&tt()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function _1(t,e){if(!(!Array.isArray(e)||e.length===0))for(let r=0;r<e.length;r++){let o=e[r];try{typeof o=="function"?o(t,t.state,t.context):typeof o=="string"&&t.state?.[o]}catch{}}}function Bt(t,e,r){return!Array.isArray(e)||e.length===0?r:function(...o){return _1(t,e),r.apply(this,o)}}function Aa(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function Ct(t,e){return()=>t.path.join(".")+"::"+e}function $w(t,e){let r=t.__ref,o=!!(e&&e.skipIfEffect);if(b1(t),typeof t.text=="function"){let s=t.text,i=Bt(t,t.textDeps,s),a=Z(()=>{if(!r.contentManaged)try{let c=i(t,t.state,t.context);t.node&&c!=null&&typeof c!="function"&&typeof c!="object"&&(typeof c=="string"&&c.includes("{{")&&(c=to.call(t,c,t.state)),Fn(t,c))}catch{}},{depth:r.path.length,label:Ct(r,"text")});r.__effects.push(a),r.__exec.text=s}else if(typeof t.text=="string"&&t.text.includes("{{")){let s=t.text,i=Z(()=>{if(r.contentManaged)return;let a=to.call(t,s,t.state);a!=null&&(t.text=a),t.node&&Fn(t,a??"")},{depth:r.path.length,label:Ct(r,"text")});r.__effects.push(i),r.__exec.text=s}for(let s of Object.keys(t))if(typeof t[s]=="function"&&!jt.has(s)&&!Vn(s)&&!r.__exec[s]){if(xt[s]){let i=t[s],a=Bt(t,t[s+"Deps"],i),c=s,l,f=Z(()=>{let u=t.context?.designSystem;u&&it(u);try{let d=a(t,t.state,t.context),h=xt[c](d,t,t.state,t.context),g=c==="show"||c==="hide";if(h&&t.node){let p=Em(h),m=g&&t.node.style.display!=="none";(p===null||p!==l||m)&&(l=p,Un(t.node,h))}else if(t.node&&g){l=void 0;let p=r.__explicitDisplay;t.node.style.display=typeof p=="string"?p:""}}finally{u&&tt()}},{depth:r.path.length,label:Ct(r,c)});r.__effects.push(f),r.__exec[s]=i}else if(vt&&vt.has(s)){let i=t[s],a=Bt(t,t[s+"Deps"],i),c=s,l,f=Z(()=>{let u=t.context?.designSystem;u&&it(u);try{let d=a(t,t.state,t.context);if(t.node)if(d!=null){let h=c+":"+String(d);h!==l&&(l=h,Un(t.node,{[c]:d}))}else l=void 0,t.node.style[c]=""}finally{u&&tt()}},{depth:r.path.length,label:Ct(r,c)});r.__effects.push(f),r.__exec[s]=i}}if(typeof t.html=="function"){let s=t.html,i=Bt(t,t.htmlDeps,s),a=Z(()=>{let c=t.context?.designSystem;c&&it(c);try{let l=i(t,t.state,t.context);t.node&&l!=null&&typeof l!="function"&&(t.node.innerHTML=l)}finally{c&&tt()}},{depth:r.path.length,label:Ct(r,"html")});r.__effects.push(a),r.__exec.html=s}if(typeof t.value=="function"){let s=t.value,i=Bt(t,t.valueDeps,s),a=Z(()=>{try{let c=i(t,t.state,t.context);if(!t.node||!("value"in t.node))return;let l=c==null?"":String(c);if(t.node.value===l)return;let f=typeof document<"u"&&document.activeElement===t.node,u=f&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,d=f&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=l,f&&u!=null&&d!=null)try{t.node.setSelectionRange(u,d)}catch{}}catch{}},{depth:r.path.length,label:Ct(r,"value")});r.__effects.push(a),r.__exec.value=s}if(typeof t.style=="function"){let s=t.style,i=Bt(t,t.styleDeps,s),a,c=Z(()=>{let l=i(t,t.state,t.context),f=Em(l);(f===null||f!==a)&&(a=f,Un(t.node,l))},{depth:r.path.length,label:Ct(r,"style")});r.__effects.push(c),r.__exec.style=s}else if(t.style&&typeof t.style=="object")for(let s in t.style){let i=t.style[s];if(typeof i!="function")continue;let a=Bt(t,Aa(t.styleDeps,s),i),c,l=Z(()=>{try{let f=a(t,t.state,t.context);if(t.node){let u=s+":"+String(f);u!==c&&(c=u,Un(t.node,{[s]:f}))}}catch{}},{depth:r.path.length,label:Ct(r,"style."+s)});r.__effects.push(l)}if(t.attr&&typeof t.attr=="object"){for(let s in t.attr)if(typeof t.attr[s]=="function"){let i=Bt(t,Aa(t.attrDeps,s),t.attr[s]),a=s,c=Z(()=>{try{let l=i(t,t.state,t.context);t.node?.setAttribute&&(l==null||l===!1&&!cr(a)?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,Ke(a,l)))}catch{}},{depth:r.path.length,label:Ct(r,"attr."+a)});r.__effects.push(c)}}if(t.aria&&typeof t.aria=="object")for(let s in t.aria){if(typeof t.aria[s]!="function")continue;let i=Bt(t,Aa(t.ariaDeps,s),t.aria[s]),a="aria-"+s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=Z(()=>{try{let l=i(t,t.state,t.context);if(!t.node?.setAttribute)return;l==null?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,Ke(a,l))}catch{}},{depth:r.path.length,label:Ct(r,"aria."+s)});r.__effects.push(c)}if(t.data&&typeof t.data=="object")for(let s in t.data){if(typeof t.data[s]!="function")continue;let i=Bt(t,Aa(t.dataDeps,s),t.data[s]),c="data-"+s.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),l=Z(()=>{try{let f=i(t,t.state,t.context);if(!t.node?.setAttribute)return;f==null||f===!1?t.node.removeAttribute(c):typeof f!="function"&&typeof f!="object"&&t.node.setAttribute(c,f===!0?"":f)}catch{}},{depth:r.path.length,label:Ct(r,"data."+s)});r.__effects.push(l)}let n=t.classlist&&typeof t.classlist=="object"&&!Array.isArray(t.classlist)?t.classlist:t.class&&typeof t.class=="object"&&!Array.isArray(t.class)?t.class:null;if(n)for(let s in n){if(typeof n[s]!="function")continue;let i=Bt(t,Aa(t.classDeps,s),n[s]),a=Z(()=>{try{let c=i(t,t.state,t.context);if(!t.node?.classList)return;typeof c=="string"?t.node.classList.add(c):c?t.node.classList.add(s):t.node.classList.remove(s)}catch{}},{depth:r.path.length,label:Ct(r,"class."+s)});r.__effects.push(a)}!o&&typeof t.if=="function"&&Lw(t,r,t.if);for(let s of Object.keys(t)){if(jt.has(s)||typeof t[s]!="function")continue;let i=s.charCodeAt(0);if(i>=65&&i<=90||Vn(s))continue;let a=t[s];r.__exec[s]=a;let c=t.tag||"div";if(jr(c,s)&&!xt[s]&&!(vt&&vt.has(s))){let l=Nr(s)||s,f=Bt(t,t[s+"Deps"],a),u=Z(()=>{try{let d=f(t,t.state,t.context);t.node?.setAttribute&&(d==null||d===!1&&!cr(l)?t.node.removeAttribute(l):typeof d!="function"&&typeof d!="object"&&(l==="src"&&"src"in t.node?t.node.src=d:t.node.setAttribute(l,Ke(l,d))))}catch{}},{depth:r.path.length,label:Ct(r,s)});r.__effects.push(u)}}if(S1(t),C1(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let s=t.onStateUpdate,i=t.stateDeps,a=!1,c=[],l=Z(()=>{let f=[];for(let g=0;g<i.length;g++){let p=i[g];try{f[g]=typeof p=="function"?p(t,t.state,t.context):t.state?.[p]}catch{f[g]=void 0}}if(!a){a=!0,c=f;return}let u=f.length!==c.length;for(let g=0;!u&&g<f.length;g++)f[g]!==c[g]&&(u=!0);let d=c;if(c=f,!u)return;let h=t.context?.designSystem;h&&it(h);try{s(t,t.state,t.context,{prev:d,next:f})}catch(g){if(t.context?.plugins?.length&&At("error",t,{hook:"onStateUpdate",error:g})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',g),t.context?.strictMode)throw g}finally{h&&tt()}},{depth:r.path.length,label:Ct(r,"onStateUpdate")});r.__effects.push(l)}v1(t)}function Cw(t){let e=t.parent,r=e?.node;if(!r||!t.node){Uw(t,t.parent);return}let o=null,n=Object.keys(e),s=n.indexOf(t.key);for(let i=s+1;i<n.length;i++){let a=e[n[i]];if(a?.node?.parentNode===r){o=a.node;break}}o?r.insertBefore(t.node,o):r.appendChild(t.node)}function Lw(t,e,r){let o=Bt(t,t.ifDeps,r),n=Z(()=>{let s;try{s=o(t,t.state,t.context)}catch(a){if(s=!1,e.__ifError=a,typeof console<"u"&&console.warn){let c=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${c} \u2014 treating as false:`,a?.message||a)}return}let i=e.__if;if(e.__if=!!s,i&&!e.__if&&t.node)t.node.remove();else if(!i&&e.__if)if(e.__ifInitialized)t.node||(t.node=Lr(t)),t.node&&(t.node.ref=t),Cw(t),Cm(t);else{if(e.__ifInitialized=!0,t.tag||(t.tag=$r(t)),fr("Init",t,{}),t.node||(t.node=Lr(t)),!t.node)return;if(t.parent?.__ref?.__children&&!t.parent.__ref.__children.includes(t.key)&&t.parent.__ref.__children.push(t.key),t.tag==="fragment"&&!e.__fragmentAnchor){let c=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(c),e.__fragmentAnchor=c}fr("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),jw(t,{}),$w(t,{skipIfEffect:!0}),Cm(t),Fw(t),Bw(t,{}),Cw(t),Iw(t,{})}},{depth:e.path.length,label:Ct(e,"if")});e.__effects.push(n)}function Fn(t,e){let r=t.node;if(!r)return;let o=e==null||typeof e=="object"?"":String(e);if(t.tag==="string"){r.nodeValue!==o&&(r.nodeValue=o);return}let n=t.__ref,s=n?n.__textNode:null;if(s&&s.parentNode!==r&&(s=null),!s){let i=r.firstChild;i&&i.nodeType===3&&(s=i)}s?s.nodeValue!==o&&(s.nodeValue=o):r.firstChild?(s=(r.ownerDocument||t.context?.document||globalThis.document).createTextNode(o),r.insertBefore(s,r.firstChild)):(r.textContent=o,s=r.firstChild&&r.firstChild.nodeType===3?r.firstChild:null),n&&(n.__textNode=s||null)}function Cm(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&Fn(t,t.text),A1(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in e){let r=String(t.value);e.value!==r&&(e.value=r)}if(t.style&&typeof t.style=="object"&&Un(e,t.style),t.attr&&typeof t.attr=="object")for(let r in t.attr){let o=t.attr[r];typeof o=="function"||typeof o=="object"||o!=null&&(o===!1&&!cr(r)||e.setAttribute&&e.setAttribute(r,Ke(r,o)))}if(t.data&&typeof t.data=="object")for(let r in t.data){let o=t.data[r];typeof o=="function"||typeof o=="object"||o==null||o===!1||e.dataset&&(e.dataset[r]=o===!0?"":o)}if(t.classlist||t.class){let r=t.classlist||t.class;if(typeof r=="string")r.split(" ").forEach(o=>o&&e.classList.add(o));else if(typeof r=="object")for(let o in r){let n=typeof r[o]=="function"?r[o](t,t.state,t.context):r[o];n&&e.classList.add(typeof n=="string"?n:o)}}}}function Em(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function Un(t,e){if(!t||!e||!t.style)return;let r=null;for(let o in e){let n=e[o];if(n!=null){if(o.charAt(0)==="&"&&typeof n=="object"){r||(r={}),r[o]=n;continue}try{let s=String(n),i=o.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),a=s.trim(),c=/\s*!important\s*$/.test(a),l=a.replace(/\s*!important\s*$/,"");t.style.setProperty(i,l,c?"important":"")}catch{}}}r&&x1(t,r)}function x1(t,e){let r=`_ds${Rw.scopedStyleId++}`;t.classList.add(r);let o=t.ownerDocument,n=o.querySelector("style[data-smbls-scoped]");n||(n=o.createElement("style"),n.setAttribute("data-smbls-scoped",""),o.head.appendChild(n));let s="";for(let i in e){let a="."+r,c=i.replace(/&/g,a).split(",").map(f=>{let u=f.trim();return u.includes(a)?u:a+u}).join(", "),l=e[i];if(typeof l=="object"){let f="",u="";for(let d in l){let h=l[d];if(typeof h=="object"){let g=d.includes("&")?c.split(", ").map(m=>d.replace(/&/g,m)).join(", "):c.split(", ").map(m=>`${m} ${d}`).join(", "),p="";for(let m in h)p+=`${m.replace(/[A-Z]/g,b=>"-"+b.toLowerCase())}: ${h[m]};`;u+=Oe(`${g} { ${p} }`,g)+`
55
55
  `}else f+=`${d.replace(/[A-Z]/g,g=>"-"+g.toLowerCase())}: ${h};`}f&&(s+=Oe(`${c} { ${f} }`,c)+`
56
- `),u&&(s+=u)}}s&&(n.textContent+=s)}var kw=new Set;function vw(t){if(!Array.isArray(t))return"";let e=[];for(let r=0;r<t.length;r++)typeof t[r]=="string"&&t[r].length&&e.push(t[r]);return e.sort(),e.join("|")}function _1(t,e,r){let o=vw(r);queueMicrotask(()=>{if(!t.__ref)return;let n;try{n=e(t,t.state,t.context)}catch{return}if(vw(n)===o)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";kw.has(s)||(kw.add(s),console.warn(`[smbls] subscribeTo function at "${s}" resolved to a DIFFERENT key list one microtask after create \u2014 wired [${r.join(", ")||"(none)"}], probed [${Array.isArray(n)?n.join(", "):String(n)}]. subscribeTo's function form is resolved ONCE at element-create time (registerSubscribeToEffects, @symbo.ls/element create.js) \u2014 this element stays wired to the ORIGINAL list for its whole lifetime, so this drift is invisible to the reactive effect and any key only present in the new list will never trigger onUpdate. If the watched key genuinely is not known until later (e.g. a module config that loads after shell boot), route the write through an imperative call instead of subscribeTo \u2014 see functions/moduleOpenBridge.js's moduleOpenPage (workspace repo) for the house pattern.`))})}function x1(t){let e=t.subscribeTo,r=typeof e=="function",o=e;if(r)try{o=e(t,t.state,t.context)}catch{o=null}if(r&&Pt()&&_1(t,e,Array.isArray(o)?o:[]),!Array.isArray(o)||o.length===0)return;let n=t.__ref;for(let s=0;s<o.length;s++){let i=o[s];if(typeof i!="string"||i.length===0)continue;let a=i.split("."),c=a[0],l=a.slice(1),f={value:!1},u=Z(()=>{let d=t.state&&(yt(t.state)?t.state.root:null);if(!d||!yt(d))return;let h=d;h=h[c];for(let p=0;p<l.length&&!(h==null||typeof h!="object");p++)if(yt(h))h=h[l[p]];else break;if(!f.value)return;let g=!1;if(typeof t.onBeforeUpdate=="function"){let p=t.context?.designSystem;p&&it(p);try{if(Yg(n)){let m=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});m&&typeof m.then=="function"?m.then(()=>lr(n,!1),b=>{lr(n,!0),t.context?.plugins?.length&&At("error",t,{hook:"onBeforeUpdate",error:b})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",b)}):(lr(n,!1),m===!1&&(g=!0))}}catch(m){lr(n,!0),t.context?.plugins?.length&&At("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}finally{p&&tt()}}if(!g&&t.node&&n.__effects)for(let p=0;p<n.__effects.length;p++){let m=n.__effects[p];m&&m!==u&&!m._disposed&&!m._isSubscribeToEffect&&typeof m._execute=="function"&&m._execute()}if(!g&&typeof t.onUpdate=="function"){let p=t.context?.designSystem;p&&it(p);try{t.onUpdate(t,t.state,t.context)}catch(m){t.context?.plugins?.length&&At("error",t,{hook:"onUpdate",error:m})||console.error("[DOMQL] subscribeTo onUpdate error:",m)}finally{p&&tt()}}},{depth:n.path.length,label:Ct(n,"subscribeTo("+i+")")});f.value=!0,u._isSubscribeToEffect=!0,n.__effects.push(u)}}function Am(t,e){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&(t==="@dark"||t==="@light"||!e.context?.designSystem?.media?.[t.slice(1)])}var Cw=new Set;function w1(t,e){let r=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",o=r+"::"+t;Cw.has(o)||(Cw.add(o),console.warn(`[smbls/css] "${t}" at ${r} is a CHILD-COMPONENT key nested inside a pseudo/selector block (":hover", "@dark", etc.) \u2014 that is never a valid CSS selector fragment. The rule is DROPPED (not shipped as a dead/never-matching selector). To reveal a child on a parent state, target the child's OWN class from the parent selector instead, e.g. move the declaration onto the child element itself, or use a sibling-selector combinator in a top-level style block.`))}function Vn(t,e,r){let o={},n=new Set,s=(i,a,c)=>{let l=c?new Set(Object.keys(o)):null;if(xt[i]){let f=xt[i](a,e,e.state,e.context);if(f){let u=Array.isArray(f)?f:[f];for(let d of u)d&&Object.assign(o,d)}}else o[i]=a;if(c)for(let f in o)l.has(f)||n.add(f)};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=t[i];if(typeof a=="function"&&(a=a(e,e.state,e.context)),a==null||typeof a=="function")continue;if(typeof a=="object"&&!Array.isArray(a)){if(i==="style"){for(let u in a){let d=a[u];if(typeof d=="function"&&(d=d(e,e.state,e.context)),d==null||typeof d=="function")continue;let h=typeof e[u]=="function"&&(xt[u]||vt&&vt.has(u));s(u,d,h)}continue}if(Am(i,e)){let u=Vn(a,e,!1);Object.keys(u).length&&(o[`[data-theme="${i.slice(1)}"] &`]=u);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(i)){Pt()&&w1(i,e);continue}let l=i;if(i.charCodeAt(0)===64&&!i.startsWith("@media")&&!i.startsWith("@keyframes")){let u=e.context?.designSystem?.media?.[i.slice(1)];u&&(l=`@media ${u}`)}let f=Vn(a,e,!1);Object.keys(f).length&&(o[l]=f);continue}let c=typeof e[i]=="function"&&(xt[i]||vt&&vt.has(i));s(i,a,c)}if(r)for(let i in o)n.add(i);for(let i of n){let a=o[i];typeof a=="string"&&!a.includes("!important")&&(o[i]=a+" !important")}return o}function Tm(t,e){if(e===void 0&&(e=0),e>8)return!1;if(typeof t=="function")return!0;if(t&&typeof t=="object"&&!Array.isArray(t)){for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&Tm(t[r],e+1))return!0}return!1}function Dw(t,e,r){if(!e||typeof e!="object"||Array.isArray(e))return null;if(Am(t,r)){let s=Vn(e,r,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let o=t;if(t.charAt(0)==="@"&&!t.startsWith("@media")&&!t.startsWith("@keyframes")){let s=r.context?.designSystem?.media?.[t.slice(1)];s&&(o=`@media ${s}`)}let n=Vn(e,r,!1);return Object.keys(n).length?{cssProp:o,block:n}:null}function S1(t){let e=t.__ref;for(let r of Object.keys(t)){if(!wm(r))continue;let o=t[r];if(!o||typeof o!="object"||Array.isArray(o)||!Tm(o))continue;let n=null,s,i=Z(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&it(a);let c,l=!1;try{let f=Dw(r,o,t),u=f?km(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=_e({[f.cssProp]:f.block},null,t.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&tt()}if(!(l||!t.node.classList)){if(n)for(let f of n)t.node.classList.remove(f);if(c&&c.length)for(let f of c)t.node.classList.add(f);n=c}},{depth:e.path.length,label:Ct(e,"cssBlock("+r+")")});e.__effects.push(i)}}function k1(t){let e=t.__ref;e.__conditionalRunners=[];let r=new Map;for(let o of Object.keys(t)){let n=o.charAt(0);if(n!=="."&&n!=="!")continue;let s=o.slice(1);if(!s)continue;if(/[:@\s>~+[\]]/.test(s)){if(typeof console<"u"&&console.warn){let u=s.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${o}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${n}\` is read as one prop name. Nest the selector inside instead: \`${n}${u}: { '${s.slice(u.length)}': {...} }\`.`)}continue}let i=t[o];if(!i||typeof i!="object")continue;let a=n==="!",c={lastMatch:!1,appliedKeys:null,appliedClasses:null},l=()=>{let u,d=t[s];if(d===void 0){let p=!!t.state&&s in t.state,m=t.state?t.state[s]:void 0;if(p||m!==void 0)u=m;else{let b=t.context?.cases?.[s];if(b===void 0)return;try{u=typeof b=="function"?b.call(t,t):b}catch(_){u=!1,e.__conditionalError=_,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,_?.message||_)}}}else if(typeof d=="function")try{u=d(t,t.state,t.context)}catch(p){u=!1,e.__conditionalError=p,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,p?.message||p)}else u=d;let h=a?!u:!!u;if(!t.node||h===c.lastMatch)return;c.lastMatch=h;let g=t.context?.designSystem;g&&it(g);try{if(h){let p={},m={},b=!1;for(let y in i){if(!Object.prototype.hasOwnProperty.call(i,y))continue;let x=i[y],k=y.charAt(0);if((k===":"||k==="@"||k==="&")&&x&&typeof x=="object"&&!Array.isArray(x)){if(Am(y,t)){let O=Vn(x,t,!1);Object.keys(O).length&&(m[`[data-theme="${y.slice(1)}"] &`]=O,b=!0)}else{let O=y;if(k==="@"&&!y.startsWith("@media")&&!y.startsWith("@keyframes")){let D=t.context?.designSystem?.media?.[y.slice(1)];D&&(O=`@media ${D}`)}let $=Vn(x,t,!1);Object.keys($).length&&(m[O]=$,b=!0)}continue}let E=typeof x=="function"?x(t,t.state,t.context):x;if(E!=null)if(xt[y]){let O=xt[y](E,t,t.state,t.context);if(O){let $=Array.isArray(O)?O:[O];for(let D of $)D&&Object.assign(p,D)}}else vt&&vt.has(y)&&(p[y]=E)}let _=Object.keys(p);if(_.length){Bn(t.node,p);for(let y of _)r.set(y,o);c.appliedKeys=_}else c.appliedKeys=null;if(b){let y=_e(m,null,t.context?.cssPrefix),x=y?y.split(" ").filter(Boolean):[];if(x.length&&t.node.classList){for(let k of x)t.node.classList.add(k);c.appliedClasses=x}else c.appliedClasses=null}else if(c.appliedClasses){for(let y of c.appliedClasses)t.node.classList.remove(y);c.appliedClasses=null}}else{if(c.appliedKeys){for(let p of c.appliedKeys)r.get(p)===o&&(t.node.style[p]="",r.delete(p));c.appliedKeys=null}if(c.appliedClasses){for(let p of c.appliedClasses)t.node.classList.remove(p);c.appliedClasses=null}}}finally{g&&tt()}};e.__conditionalRunners.push(l);let f=Z(l,{depth:e.path.length,label:Ct(e,"conditional("+o+")")});e.__effects.push(f)}}var bm=new WeakSet;function v1(t){let e=t.ownerDocument;!e||bm.has(e)||(bm.add(e),queueMicrotask(()=>{bm.delete(e);let r=e.body||e.documentElement;r&&r.offsetWidth}))}var _m=new WeakSet,Ew=!1;function C1(t){let{node:e}=t;if(!e)return;if(Ew||(Ew=!0,_e({display:"none"})),_m.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}_m.add(t);let r=t.context?.designSystem;r&&it(r),rm();try{let o={},n=!1;if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&xt.theme){let s=xt.theme(t.theme,t,t.state,t.context);if(s){if(Array.isArray(s))for(let i of s)i&&Object.assign(o,i);else Object.assign(o,s);n=!0}}for(let s of Object.keys(t)){if(typeof t[s]=="function"||jt.has(s)||s==="theme")continue;let i=s.charCodeAt(0);if(!(i>=65&&i<=90)&&!Un(s)){if(xt[s]){let a=t[s],c=xt[s](a,t,t.state,t.context);if(c){if(Array.isArray(c))for(let l of c)l&&Object.assign(o,l);else Object.assign(o,c);n=!0}}else if(vt&&vt.has(s)){let a=t[s];a!=null&&typeof a!="object"&&(o[s]=a,n=!0)}else if(s.charCodeAt(0)===45){let a=t[s];a!=null&&typeof a!="object"&&(o[s]=a,n=!0)}else if(s.charAt(0)==="&"||s.charAt(0)==="@"||s.charAt(0)===":"){let a=t[s];if(a&&typeof a=="object"&&!Array.isArray(a)){if(Tm(a))continue;let c=Dw(s,a,t);c&&(o[c.cssProp]=c.block,n=!0)}}}}if(n){o.display&&String(o.display).includes("!important")&&(e.style.setProperty("display",String(o.display).replace(/\s*!important\s*$/,""),"important"),delete o.display);let s=_e(o,null,t.context?.cssPrefix);if(s&&e.classList){let a=s.split(" ").filter(Boolean),c=!1;for(let l of a)e.classList.add(l),c||(l.charCodeAt(0)===95&&l.charCodeAt(1)===99||l.charCodeAt(0)===95&&l.indexOf("_c",1)!==-1)&&(c=!0);c&&v1(e)}let i=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(i!=null){let a=o.display;if(a&&a!==i)if(i==="none"){let c=[];for(let l of e.classList)l.startsWith("_d-")&&l!=="_d-none"&&c.push(l);for(let l of c)e.classList.remove(l);e.classList.add("_d-none")}else e.style.display==="none"&&(typeof t.hide=="function"||typeof t.show=="function")||(e.style.display=t.display),t.__ref&&(t.__ref.__explicitDisplay=t.display)}}}finally{om(),r&&tt(),_m.delete(t)}}function $w(t){let{node:e}=t;if(!e||!e.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(let n in t.aria){let s=t.aria[n];if(typeof s=="function"||typeof s=="object"||s==null)continue;let i="aria-"+n.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());e.setAttribute(i,Ke(i,s))}let r=Gg(t);for(let n in r){let s=r[n];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(n,s===!0?"":s)}let o=t.tag||"div";for(let n of Object.keys(t)){if(typeof t[n]=="function"||jt.has(n)||n==="on"||r[n]!==void 0)continue;let s=n.charCodeAt(0);if(!(s>=65&&s<=90)&&!Un(n)&&!(xt[n]||vt&&vt.has(n))&&jr(o,n)){let i=t[n];if(i==null||(typeof i=="string"&&i.includes("{{")&&(i=to(i,t,t.state,t.context),t[n]=i),i==null||typeof i=="function"||typeof i=="object")||i===!1&&!cr(Nr(n)||n))continue;let a=Nr(n)||n;e.setAttribute(a,Ke(a,i))}}}function E1(t,e){let r=t.node,o=t.__ref,n=o.__autoGrow;if(!e){if(n&&n.active){try{r.removeEventListener("input",n.resize)}catch{}r.style.height="",n.appliedMax!=null&&r.style.maxHeight===n.appliedMax&&(r.style.maxHeight=""),n.active=!1,n.appliedMax=null,n.lastMeasure=0}return}n||(n=o.__autoGrow={active:!1,appliedMax:null,lastMeasure:0,resize:()=>{if(r.scrollHeight===0&&n.lastMeasure>0)return;r.style.height="auto";let i=r.scrollHeight;r.style.height=i+"px",i>0&&(n.lastMeasure=i)}},o.__eventCleanup||(o.__eventCleanup=[]),o.__eventCleanup.push(()=>{try{r.removeEventListener("input",n.resize)}catch{}})),n.active||(r.addEventListener("input",n.resize),n.active=!0);let s=typeof e=="object"&&e.max!=null?String(e.max):null;s!==n.appliedMax&&(s==null?n.appliedMax!=null&&r.style.maxHeight===n.appliedMax&&(r.style.maxHeight=""):r.style.maxHeight=s,n.appliedMax=s),n.resize()}function A1(t){if(!t.autoGrow)return;let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let r=t.__ref,o=t.autoGrow,n=typeof o=="function"?Bt(t,t.autoGrowDeps,o):null,s=Z(()=>{let i=t.autoGrow,a=i;if(typeof i=="function")try{a=(i===o&&n?n:i)(t,t.state,t.context)}catch{a=null}E1(t,a)},{depth:r.path.length,label:Ct(r,"autoGrow")});r.__effects||(r.__effects=[]),r.__effects.push(s),n&&(r.__exec.autoGrow=o)}var Lw=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function Mw(t,e){for(let r of Object.keys(t)){if(!Un(r)||Lw.has(r))continue;let o=mf(r);if(o){yf(o,t,t[r]);continue}let n=t[r];if(typeof n=="string"&&/^[A-Za-z_$][\w$]*$/.test(n)){let i=n;n=function(c){return t.call(i,c)}}if(typeof n!="function")continue;let s=f1(r);Mr.has(s)||Dn(u1(s),t,n)}T1(t)}function T1(t){let e=t.node;if(!e||!e.addEventListener)return;let r={},o=!1;for(let d of Lw){let h=t[d];typeof h=="function"&&(r[d]=h,o=!0)}if(!o)return;let n=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,s=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600,i=0,a=0,c=0,l=!1,f=d=>{let h=d.touches&&d.touches[0]||d.changedTouches&&d.changedTouches[0];h&&(i=h.clientX,a=h.clientY,c=Date.now(),l=!0)},u=d=>{if(!l)return;l=!1;let h=d.changedTouches&&d.changedTouches[0]||d.touches&&d.touches[0];if(!h)return;let g=h.clientX-i,p=h.clientY-a,m=Date.now()-c;if(m>s)return;let b=Math.abs(g),_=Math.abs(p);if(Math.max(b,_)<n)return;let y;if(b>_*1.2)y=g<0?"left":"right";else if(_>b*1.2)y=p<0?"up":"down";else return;let x="onSwipe"+y.charAt(0).toUpperCase()+y.slice(1),k=r[x],E=r.onSwipe;k&&k.call(t,d,t,t.state,t.context),E&&E.call(t,{direction:y,dx:g,dy:p,dt:m,event:d},t,t.state,t.context)};e.addEventListener("touchstart",f,{passive:!0}),e.addEventListener("touchend",u,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{e.removeEventListener("touchstart",f)}catch{}try{e.removeEventListener("touchend",u)}catch{}})}function Ra(t,e){let r={...t};for(let o in e){let n=r[o],s=e[o];n&&s&&typeof n=="object"&&typeof s=="object"&&!Array.isArray(n)&&!Array.isArray(s)&&typeof n!="function"&&typeof s!="function"?r[o]=Ra(n,s):r[o]=s}return r}function vm(t,e,r){if(!e||!t.node)return;let o=t.childExtends;if(Array.isArray(e)){let n=t.tag==="fragment",s=t.context?.document||globalThis.document,i=n?null:s?.createDocumentFragment();if(!n&&!i)return;let a=t.childProps,c=t.childrenAs;for(let l=0;l<e.length;l++){let f=e[l],u=f;(typeof f=="string"||typeof f=="number")&&(f={text:f});let d=a;if(typeof a=="function")try{d=a(t,f)}catch{d=null}if(c==="state"){let p=u;(typeof u=="string"||typeof u=="number")&&(p={value:u,text:u}),f=d?{...d,state:p}:{state:p}}else d&&(f=Ra(d,f));if(o&&!f.ignoreChildExtends)if(f.extends){let p=Array.isArray(f.extends)?f.extends:[f.extends],m=Array.isArray(o)?o:[o];f={...f,extends:[...m,...p]}}else f={...f,extends:o};let h=f?.key||u&&typeof u=="object"&&u.key||`${l}`,g;try{g=ne(f,t,h,r)}catch(p){if(typeof console<"u"&&console.error){let m=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${h}" failed to construct at ${m} (initial render, skipping this row):`,p?.message||p)}continue}!n&&g?.node&&i.appendChild(g.node)}return n||t.node.appendChild(i),!0}if(typeof e=="string"){let n=Rw(e,t);if(Array.isArray(n))return vm(t,n,r)}if(typeof e=="object")for(let n in e){if(jt.has(n))continue;let s=e[n];if(!(s==null||s===!1)){if((typeof s=="string"||typeof s=="number")&&(s={text:s}),t.childProps&&(s=Ra(t.childProps,s)),o&&!s.ignoreChildExtends)if(s.extends){let i=Array.isArray(s.extends)?s.extends:[s.extends],a=Array.isArray(o)?o:[o];s={...s,extends:[...a,...i]}}else s={...s,extends:o};ne(s,t,n,r)}}}function Cm(t,e){let r=t.node;if(!r||r.tagName!=="SELECT")return;let o=r.options;if(!o||!o.length)return;let n=t.__ref,s=n&&n.__exec&&n.__exec.value,i=typeof s=="function",a=t.value!=null&&typeof t.value!="function";if(i||a){let f;if(i)try{f=s(t,t.state,t.context)}catch{return}else f=t.value;let u=f==null?"":String(f);r.value!==u&&(r.value=u);return}let c=e||!(n&&n.__selectSynced);if(n&&(n.__selectSynced=!0),!c)return;let l=-1;for(let f=0;f<o.length;f++)o[f].defaultSelected&&(l=f);l>=0&&r.selectedIndex!==l&&(r.selectedIndex=l)}function Fw(t,e){let{children:r,content:o}=t,n=t.childExtends;if(typeof r=="function"){let u=r;try{r=u(t,t.state,t.context)}catch(m){if(r=void 0,typeof console<"u"&&console.error){let b=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${b} (initial run, treating as empty):`,m?.message||m)}}t.children=r;let d=t.__ref,h=!1,g=Bt(t,t.childrenDeps,u),p=Z(()=>{let m=h;h=!0;let b;try{b=g(t,t.state,t.context)}catch(D){if(typeof console<"u"&&console.error){let I=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${I}${m?"":" (initial tracking run)"}:`,D?.message||D)}return}if(!m||b===t.children)return;t.children=b;let _=typeof t.onContentUpdate=="function",y=_?[]:null,x=_?[]:null,k=_?[]:null;if(Array.isArray(b)&&t.childrenAs==="state"){let D=t.childProps,I=[],H=new Map;for(let W=0;W<b.length;W++){let wt=b[W],L=D;if(typeof D=="function")try{L=D(t,wt)}catch{L=null}let ot=L&&L.key||wt&&wt.key||`${W}`;I.push(ot),H.set(ot,{rawChild:wt,childProps:L})}let V=new Set(I),rt=d.__children.slice();for(let W of rt)if(!V.has(W)){let wt=t[W];wt?.remove&&wt.remove(),delete t[W],x&&x.push(W)}let at=t.childExtends,G=t.tag==="fragment",K=t.context?.document||globalThis.document,lt=G?null:K?.createDocumentFragment(),Vt=new Set;for(let W of I){let wt=H.get(W),L=wt.rawChild,ot=t[W];if(ot&&ot.state){if(L&&typeof L=="object"){let Et=ot.state,Ye=Et.$replace||Et.replace,nt=Et.$update||Et.update;try{if(typeof Ye=="function")Ye.call(Et,L);else if(typeof nt=="function"){for(let M in Et)if(!(M==="__element"||M==="root"||M==="parent"||M==="update")&&!Object.prototype.hasOwnProperty.call(L,M))try{Et[M]=void 0}catch{}nt.call(Et,L)}else for(let M in L)Et[M]=L[M]}catch(M){if(typeof console<"u"&&console.error){let ht=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${W}" failed to patch at ${ht} (reconcile, keeping its previous data for this pass):`,M?.message||M)}}}k&&k.push(W);continue}let U=L;(typeof L=="string"||typeof L=="number")&&(U={value:L,text:L});let Y=wt.childProps,j=Y?{...Y,state:U}:{state:U};if(at&&!j.ignoreChildExtends)if(j.extends){let Et=Array.isArray(j.extends)?j.extends:[j.extends],Ye=Array.isArray(at)?at:[at];j={...j,extends:[...Ye,...Et]}}else j={...j,extends:at};let pt;try{pt=ne(j,t,W,e)}catch(Et){if(typeof console<"u"&&console.error){let Ye=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${W}" failed to construct at ${Ye} (reconcile, skipping this row):`,Et?.message||Et)}Vt.add(W);continue}!G&&pt?.node&&lt&&lt.appendChild(pt.node),y&&y.push(W)}if(!G&&lt&&lt.childNodes.length&&t.node&&t.node.appendChild(lt),!G&&t.node){let W=null;for(let wt of I){let L=t[wt]?.node;if(!L)continue;let ot=W?W.nextSibling:t.node.firstChild;L!==ot&&t.node.insertBefore(L,ot),W=L}}d.__children=Vt.size?I.filter(W=>!Vt.has(W)):I,_&&(y.length||x.length)&&ww(t,{added:y,removed:x,kept:k}),Cm(t,!1);return}let $=_?[...d.__children]:null;for(let D of[...d.__children]){let I=t[D];I?.remove&&I.remove(),delete t[D]}d.__children=[],vm(t,b,e),Cm(t,!1),_&&ww(t,{added:[...d.__children],removed:$,kept:[]})},{depth:d.path.length,label:Ct(d,"children")});d.__effects.push(p)}let s=vm(t,r,e);if(o!=null&&!(o&&o.__ref)){let u=o;if(typeof u=="string"||typeof u=="number"?u={text:u}:typeof u!="object"&&(u={}),t.childProps&&(u=Ra(t.childProps,u)),n&&!u.ignoreChildExtends)if(u.extends){let d=Array.isArray(u.extends)?u.extends:[u.extends],h=Array.isArray(n)?n:[n];u={...u,extends:[...h,...d]}}else u={...u,extends:n};ne(u,t,"content",e)}if(r&&!s)return;let i=t.context?.components||{};{let u=Object.keys(t);for(let d=0;d<u.length;d++){let h=u[d];if(!h.endsWith("Extends")||typeof t[h]!="string")continue;let g=h.slice(0,-7);if(!g||g.charCodeAt(0)<65||g.charCodeAt(0)>90)continue;let p={extends:t[h]};delete t[h];for(let m=d+1;m<u.length;m++){let b=u[m],_=b.charCodeAt(0);if(_>=65&&_<=90||jt.has(b)||typeof t[b]=="function"&&(b.startsWith("on")||b.startsWith(".")))break;let y=t[b];y!==void 0&&(p[b]=y,delete t[b])}t[g]&&typeof t[g]=="object"?t[g]={...p,...t[g]}:t[g]=p}}let a=e?.mountYield===!0||t.yieldChildren===!0,c=Object.keys(t),l=u=>{if(jt.has(u)||typeof t[u]!="object"||t[u]===null)return;let d=u.charCodeAt(0);if(d<65||d>90)return;let h=t[u];if(!h.__ref){if(!h.extends&&!h.extend){let g=i[u]||i[`smbls.${u}`];g&&(h={...h,extends:g})}if(t.childProps&&(h=Ra(t.childProps,h)),n&&!h.ignoreChildExtends)if(h.extends){let g=Array.isArray(h.extends)?h.extends:[h.extends],p=Array.isArray(n)?n:[n];h={...h,extends:[...p,...g]}}else h={...h,extends:n};ne(h,t,u,e)}};if(!a){for(let u of c)l(u);return}uw();let f=u=>{for(let d=u;d<c.length;d++)if(l(c[d]),d+1<c.length&&fw()){let h=d+1;pw(()=>f(h));return}};f(0),dw()}function Nw(t,e,r){let{node:o}=t;if(!o)return;o.ref=t;let n=e?.tag==="fragment"?e.__ref?.__fragmentAnchor:null;if(n){let i=n.parentNode;if(i){if(r?.position==="before"&&r.node)i.insertBefore(o,r.node);else if(r?.position==="after"&&r.node){let a=r.node.nextSibling;i.insertBefore(o,a||n)}else i.insertBefore(o,n);return}}let s=e?.node||(e?.nodeType?e:null);if(s)if(r?.position==="before"&&r.node)s.insertBefore(o,r.node);else if(r?.position==="after"&&r.node){let i=r.node.nextSibling;i?s.insertBefore(o,i):s.appendChild(o)}else s.appendChild(o)}var Em=3;function Yg(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=Em?!1:(t.__inBeforeUpdate=!0,!0)}function lr(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===Em&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${Em}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function fr(t,e,r){let o=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&At(o,e,r);let n="on"+t,s=e[n];if(typeof s=="function"){let c=t==="Render"?"__inRender":t==="RenderRouter"?"__inRenderRouter":null;if(c){if(e.__ref[c])return!0;e.__ref[c]=!0}let l=e.context?.designSystem;l&&it(l);let f=!!c;try{let u=s(e,e.state,e.context,r);if(u&&typeof u.then=="function"){let d=e.__ref;return u.catch(h=>{e.context?.plugins?.length&&At("error",e,{hook:n,error:h})||console.error(`[DOMQL] Lifecycle "${n}" error:`,h)}).finally(()=>{c&&d&&(d[c]=!1)}),f=!1,!0}if(u===!1)return!1}catch(u){if(e.context?.plugins?.length&&At("error",e,{hook:n,error:u})||console.error(`[DOMQL] Lifecycle "${n}" error:`,u),e.context?.strictMode)throw u}finally{l&&tt(),f&&e.__ref&&(e.__ref[c]=!1)}}return!0}var jw={blue:"#213eb0",green:"#389d34",red:"#e15c55",yellow:"#EDCB38",orange:"#e97c16",transparent:"rgba(0, 0, 0, 0)",black:"black",gray:"#4e4e50",white:"white",title:["--gray 1 -168","--gray 1 +168"],caption:["--gray 1 -68","--gray 1 +68"],paragraph:["--gray 1 -42","--gray 1 +42"],disabled:["--gray 1 -26","--gray 1 +26"],line:["--gray 1 -16","--gray 1 +16"],blueDeep:"#0A5CB8",blueBright:"#47A8FF",accentInk:["blueDeep","blueBright"],greenDeep:"#2A6E28",greenBright:"#7FD07B",successInk:["greenDeep","greenBright"],redDeep:"#A83520",redBright:"#FF8C78",dangerInk:["redDeep","redBright"],orangeDeep:"#94500F",orangeBright:"#F4A45E",warningInk:["orangeDeep","orangeBright"],magentaDeep:"#A100A1",magentaBright:"#FF7AFF",magentaInk:["magentaDeep","magentaBright"]},Bw={"gradient-blue-light":`linear-gradient(to right,
56
+ `),u&&(s+=u)}}s&&(n.textContent+=s)}var Ew=new Set;function Aw(t){if(!Array.isArray(t))return"";let e=[];for(let r=0;r<t.length;r++)typeof t[r]=="string"&&t[r].length&&e.push(t[r]);return e.sort(),e.join("|")}function w1(t,e,r){let o=Aw(r);queueMicrotask(()=>{if(!t.__ref)return;let n;try{n=e(t,t.state,t.context)}catch{return}if(Aw(n)===o)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";Ew.has(s)||(Ew.add(s),console.warn(`[smbls] subscribeTo function at "${s}" resolved to a DIFFERENT key list one microtask after create \u2014 wired [${r.join(", ")||"(none)"}], probed [${Array.isArray(n)?n.join(", "):String(n)}]. subscribeTo's function form is resolved ONCE at element-create time (registerSubscribeToEffects, @symbo.ls/element create.js) \u2014 this element stays wired to the ORIGINAL list for its whole lifetime, so this drift is invisible to the reactive effect and any key only present in the new list will never trigger onUpdate. If the watched key genuinely is not known until later (e.g. a module config that loads after shell boot), route the write through an imperative call instead of subscribeTo \u2014 see functions/moduleOpenBridge.js's moduleOpenPage (workspace repo) for the house pattern.`))})}function S1(t){let e=t.subscribeTo,r=typeof e=="function",o=e;if(r)try{o=e(t,t.state,t.context)}catch{o=null}if(r&&Pt()&&w1(t,e,Array.isArray(o)?o:[]),!Array.isArray(o)||o.length===0)return;let n=t.__ref;for(let s=0;s<o.length;s++){let i=o[s];if(typeof i!="string"||i.length===0)continue;let a=i.split("."),c=a[0],l=a.slice(1),f={value:!1},u=Z(()=>{let d=t.state&&(yt(t.state)?t.state.root:null);if(!d||!yt(d))return;let h=d;h=h[c];for(let p=0;p<l.length&&!(h==null||typeof h!="object");p++)if(yt(h))h=h[l[p]];else break;if(!f.value)return;let g=!1;if(typeof t.onBeforeUpdate=="function"){let p=t.context?.designSystem;p&&it(p);try{if(Zg(n)){let m=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});m&&typeof m.then=="function"?m.then(()=>lr(n,!1),b=>{lr(n,!0),t.context?.plugins?.length&&At("error",t,{hook:"onBeforeUpdate",error:b})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",b)}):(lr(n,!1),m===!1&&(g=!0))}}catch(m){lr(n,!0),t.context?.plugins?.length&&At("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}finally{p&&tt()}}if(!g&&t.node&&n.__effects)for(let p=0;p<n.__effects.length;p++){let m=n.__effects[p];m&&m!==u&&!m._disposed&&!m._isSubscribeToEffect&&typeof m._execute=="function"&&m._execute()}if(!g&&typeof t.onUpdate=="function"){let p=t.context?.designSystem;p&&it(p);try{t.onUpdate(t,t.state,t.context)}catch(m){t.context?.plugins?.length&&At("error",t,{hook:"onUpdate",error:m})||console.error("[DOMQL] subscribeTo onUpdate error:",m)}finally{p&&tt()}}},{depth:n.path.length,label:Ct(n,"subscribeTo("+i+")")});f.value=!0,u._isSubscribeToEffect=!0,n.__effects.push(u)}}function Rm(t,e){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&(t==="@dark"||t==="@light"||!e.context?.designSystem?.media?.[t.slice(1)])}var Tw=new Set;function k1(t,e){let r=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",o=r+"::"+t;Tw.has(o)||(Tw.add(o),console.warn(`[smbls/css] "${t}" at ${r} is a CHILD-COMPONENT key nested inside a pseudo/selector block (":hover", "@dark", etc.) \u2014 that is never a valid CSS selector fragment. The rule is DROPPED (not shipped as a dead/never-matching selector). To reveal a child on a parent state, target the child's OWN class from the parent selector instead, e.g. move the declaration onto the child element itself, or use a sibling-selector combinator in a top-level style block.`))}function Hn(t,e,r){let o={},n=new Set,s=(i,a,c)=>{let l=c?new Set(Object.keys(o)):null;if(xt[i]){let f=xt[i](a,e,e.state,e.context);if(f){let u=Array.isArray(f)?f:[f];for(let d of u)d&&Object.assign(o,d)}}else o[i]=a;if(c)for(let f in o)l.has(f)||n.add(f)};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=t[i];if(typeof a=="function"&&(a=a(e,e.state,e.context)),a==null||typeof a=="function")continue;if(typeof a=="object"&&!Array.isArray(a)){if(i==="style"){for(let u in a){let d=a[u];if(typeof d=="function"&&(d=d(e,e.state,e.context)),d==null||typeof d=="function")continue;let h=typeof e[u]=="function"&&(xt[u]||vt&&vt.has(u));s(u,d,h)}continue}if(Rm(i,e)){let u=Hn(a,e,!1);Object.keys(u).length&&(o[`[data-theme="${i.slice(1)}"] &`]=u);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(i)){Pt()&&k1(i,e);continue}let l=i;if(i.charCodeAt(0)===64&&!i.startsWith("@media")&&!i.startsWith("@keyframes")){let u=e.context?.designSystem?.media?.[i.slice(1)];u&&(l=`@media ${u}`)}let f=Hn(a,e,!1);Object.keys(f).length&&(o[l]=f);continue}let c=typeof e[i]=="function"&&(xt[i]||vt&&vt.has(i));s(i,a,c)}if(r)for(let i in o)n.add(i);for(let i of n){let a=o[i];typeof a=="string"&&!a.includes("!important")&&(o[i]=a+" !important")}return o}function Pm(t,e){if(e===void 0&&(e=0),e>8)return!1;if(typeof t=="function")return!0;if(t&&typeof t=="object"&&!Array.isArray(t)){for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&Pm(t[r],e+1))return!0}return!1}function Mw(t,e,r){if(!e||typeof e!="object"||Array.isArray(e))return null;if(Rm(t,r)){let s=Hn(e,r,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let o=t;if(t.charAt(0)==="@"&&!t.startsWith("@media")&&!t.startsWith("@keyframes")){let s=r.context?.designSystem?.media?.[t.slice(1)];s&&(o=`@media ${s}`)}let n=Hn(e,r,!1);return Object.keys(n).length?{cssProp:o,block:n}:null}function v1(t){let e=t.__ref;for(let r of Object.keys(t)){if(!vm(r))continue;let o=t[r];if(!o||typeof o!="object"||Array.isArray(o)||!Pm(o))continue;let n=null,s,i=Z(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&it(a);let c,l=!1;try{let f=Mw(r,o,t),u=f?Em(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=_e({[f.cssProp]:f.block},null,t.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&tt()}if(!(l||!t.node.classList)){if(n)for(let f of n)t.node.classList.remove(f);if(c&&c.length)for(let f of c)t.node.classList.add(f);n=c}},{depth:e.path.length,label:Ct(e,"cssBlock("+r+")")});e.__effects.push(i)}}function C1(t){let e=t.__ref;e.__conditionalRunners=[];let r=new Map;for(let o of Object.keys(t)){let n=o.charAt(0);if(n!=="."&&n!=="!")continue;let s=o.slice(1);if(!s)continue;if(/[:@\s>~+[\]]/.test(s)){if(typeof console<"u"&&console.warn){let u=s.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${o}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${n}\` is read as one prop name. Nest the selector inside instead: \`${n}${u}: { '${s.slice(u.length)}': {...} }\`.`)}continue}let i=t[o];if(!i||typeof i!="object")continue;let a=n==="!",c={lastMatch:!1,appliedKeys:null,appliedClasses:null},l=()=>{let u,d=t[s];if(d===void 0){let p=!!t.state&&s in t.state,m=t.state?t.state[s]:void 0;if(p||m!==void 0)u=m;else{let b=t.context?.cases?.[s];if(b===void 0)return;try{u=typeof b=="function"?b.call(t,t):b}catch(_){u=!1,e.__conditionalError=_,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,_?.message||_)}}}else if(typeof d=="function")try{u=d(t,t.state,t.context)}catch(p){u=!1,e.__conditionalError=p,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,p?.message||p)}else u=d;let h=a?!u:!!u;if(!t.node||h===c.lastMatch)return;c.lastMatch=h;let g=t.context?.designSystem;g&&it(g);try{if(h){let p={},m={},b=!1;for(let y in i){if(!Object.prototype.hasOwnProperty.call(i,y))continue;let x=i[y],k=y.charAt(0);if((k===":"||k==="@"||k==="&")&&x&&typeof x=="object"&&!Array.isArray(x)){if(Rm(y,t)){let O=Hn(x,t,!1);Object.keys(O).length&&(m[`[data-theme="${y.slice(1)}"] &`]=O,b=!0)}else{let O=y;if(k==="@"&&!y.startsWith("@media")&&!y.startsWith("@keyframes")){let D=t.context?.designSystem?.media?.[y.slice(1)];D&&(O=`@media ${D}`)}let $=Hn(x,t,!1);Object.keys($).length&&(m[O]=$,b=!0)}continue}let E=typeof x=="function"?x(t,t.state,t.context):x;if(E!=null)if(xt[y]){let O=xt[y](E,t,t.state,t.context);if(O){let $=Array.isArray(O)?O:[O];for(let D of $)D&&Object.assign(p,D)}}else vt&&vt.has(y)&&(p[y]=E)}let _=Object.keys(p);if(_.length){Un(t.node,p);for(let y of _)r.set(y,o);c.appliedKeys=_}else c.appliedKeys=null;if(b){let y=_e(m,null,t.context?.cssPrefix),x=y?y.split(" ").filter(Boolean):[];if(x.length&&t.node.classList){for(let k of x)t.node.classList.add(k);c.appliedClasses=x}else c.appliedClasses=null}else if(c.appliedClasses){for(let y of c.appliedClasses)t.node.classList.remove(y);c.appliedClasses=null}}else{if(c.appliedKeys){for(let p of c.appliedKeys)r.get(p)===o&&(t.node.style[p]="",r.delete(p));c.appliedKeys=null}if(c.appliedClasses){for(let p of c.appliedClasses)t.node.classList.remove(p);c.appliedClasses=null}}}finally{g&&tt()}};e.__conditionalRunners.push(l);let f=Z(l,{depth:e.path.length,label:Ct(e,"conditional("+o+")")});e.__effects.push(f)}}var wm=new WeakSet;function E1(t){let e=t.ownerDocument;!e||wm.has(e)||(wm.add(e),queueMicrotask(()=>{wm.delete(e);let r=e.body||e.documentElement;r&&r.offsetWidth}))}var Sm=new WeakSet,Ow=!1;function A1(t){let{node:e}=t;if(!e)return;if(Ow||(Ow=!0,_e({display:"none"})),Sm.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}Sm.add(t);let r=t.context?.designSystem;r&&it(r),sm();try{let o={},n=!1;if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&xt.theme){let s=xt.theme(t.theme,t,t.state,t.context);if(s){if(Array.isArray(s))for(let i of s)i&&Object.assign(o,i);else Object.assign(o,s);n=!0}}for(let s of Object.keys(t)){if(typeof t[s]=="function"||jt.has(s)||s==="theme")continue;let i=s.charCodeAt(0);if(!(i>=65&&i<=90)&&!Vn(s)){if(xt[s]){let a=t[s],c=xt[s](a,t,t.state,t.context);if(c){if(Array.isArray(c))for(let l of c)l&&Object.assign(o,l);else Object.assign(o,c);n=!0}}else if(vt&&vt.has(s)){let a=t[s];a!=null&&typeof a!="object"&&(o[s]=a,n=!0)}else if(s.charCodeAt(0)===45){let a=t[s];a!=null&&typeof a!="object"&&(o[s]=a,n=!0)}else if(s.charAt(0)==="&"||s.charAt(0)==="@"||s.charAt(0)===":"){let a=t[s];if(a&&typeof a=="object"&&!Array.isArray(a)){if(Pm(a))continue;let c=Mw(s,a,t);c&&(o[c.cssProp]=c.block,n=!0)}}}}if(n){o.display&&String(o.display).includes("!important")&&(e.style.setProperty("display",String(o.display).replace(/\s*!important\s*$/,""),"important"),delete o.display);let s=_e(o,null,t.context?.cssPrefix);if(s&&e.classList){let a=s.split(" ").filter(Boolean),c=!1;for(let l of a)e.classList.add(l),c||(l.charCodeAt(0)===95&&l.charCodeAt(1)===99||l.charCodeAt(0)===95&&l.indexOf("_c",1)!==-1)&&(c=!0);c&&E1(e)}let i=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(i!=null){let a=o.display;if(a&&a!==i)if(i==="none"){let c=[];for(let l of e.classList)l.startsWith("_d-")&&l!=="_d-none"&&c.push(l);for(let l of c)e.classList.remove(l);e.classList.add("_d-none")}else e.style.display==="none"&&(typeof t.hide=="function"||typeof t.show=="function")||(e.style.display=t.display),t.__ref&&(t.__ref.__explicitDisplay=t.display)}}}finally{im(),r&&tt(),Sm.delete(t)}}function Fw(t){let{node:e}=t;if(!e||!e.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(let n in t.aria){let s=t.aria[n];if(typeof s=="function"||typeof s=="object"||s==null)continue;let i="aria-"+n.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());e.setAttribute(i,Ke(i,s))}let r=Jg(t);for(let n in r){let s=r[n];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(n,s===!0?"":s)}let o=t.tag||"div";for(let n of Object.keys(t)){if(typeof t[n]=="function"||jt.has(n)||n==="on"||r[n]!==void 0)continue;let s=n.charCodeAt(0);if(!(s>=65&&s<=90)&&!Vn(n)&&!(xt[n]||vt&&vt.has(n))&&jr(o,n)){let i=t[n];if(i==null||(typeof i=="string"&&i.includes("{{")&&(i=to(i,t,t.state,t.context),t[n]=i),i==null||typeof i=="function"||typeof i=="object")||i===!1&&!cr(Nr(n)||n))continue;let a=Nr(n)||n;e.setAttribute(a,Ke(a,i))}}}function T1(t,e){let r=t.node,o=t.__ref,n=o.__autoGrow;if(!e){if(n&&n.active){try{r.removeEventListener("input",n.resize)}catch{}r.style.height="",n.appliedMax!=null&&r.style.maxHeight===n.appliedMax&&(r.style.maxHeight=""),n.active=!1,n.appliedMax=null,n.lastMeasure=0}return}n||(n=o.__autoGrow={active:!1,appliedMax:null,lastMeasure:0,resize:()=>{if(r.scrollHeight===0&&n.lastMeasure>0)return;r.style.height="auto";let i=r.scrollHeight;r.style.height=i+"px",i>0&&(n.lastMeasure=i)}},o.__eventCleanup||(o.__eventCleanup=[]),o.__eventCleanup.push(()=>{try{r.removeEventListener("input",n.resize)}catch{}})),n.active||(r.addEventListener("input",n.resize),n.active=!0);let s=typeof e=="object"&&e.max!=null?String(e.max):null;s!==n.appliedMax&&(s==null?n.appliedMax!=null&&r.style.maxHeight===n.appliedMax&&(r.style.maxHeight=""):r.style.maxHeight=s,n.appliedMax=s),n.resize()}function O1(t){if(!t.autoGrow)return;let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let r=t.__ref,o=t.autoGrow,n=typeof o=="function"?Bt(t,t.autoGrowDeps,o):null,s=Z(()=>{let i=t.autoGrow,a=i;if(typeof i=="function")try{a=(i===o&&n?n:i)(t,t.state,t.context)}catch{a=null}T1(t,a)},{depth:r.path.length,label:Ct(r,"autoGrow")});r.__effects||(r.__effects=[]),r.__effects.push(s),n&&(r.__exec.autoGrow=o)}var Nw=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function jw(t,e){for(let r of Object.keys(t)){if(!Vn(r)||Nw.has(r))continue;let o=bf(r);if(o){_f(o,t,t[r]);continue}let n=t[r];if(typeof n=="string"&&/^[A-Za-z_$][\w$]*$/.test(n)){let i=n;n=function(c){return t.call(i,c)}}if(typeof n!="function")continue;let s=d1(r);Mr.has(s)||$n(p1(s),t,n)}R1(t)}function R1(t){let e=t.node;if(!e||!e.addEventListener)return;let r={},o=!1;for(let d of Nw){let h=t[d];typeof h=="function"&&(r[d]=h,o=!0)}if(!o)return;let n=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,s=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600,i=0,a=0,c=0,l=!1,f=d=>{let h=d.touches&&d.touches[0]||d.changedTouches&&d.changedTouches[0];h&&(i=h.clientX,a=h.clientY,c=Date.now(),l=!0)},u=d=>{if(!l)return;l=!1;let h=d.changedTouches&&d.changedTouches[0]||d.touches&&d.touches[0];if(!h)return;let g=h.clientX-i,p=h.clientY-a,m=Date.now()-c;if(m>s)return;let b=Math.abs(g),_=Math.abs(p);if(Math.max(b,_)<n)return;let y;if(b>_*1.2)y=g<0?"left":"right";else if(_>b*1.2)y=p<0?"up":"down";else return;let x="onSwipe"+y.charAt(0).toUpperCase()+y.slice(1),k=r[x],E=r.onSwipe;k&&k.call(t,d,t,t.state,t.context),E&&E.call(t,{direction:y,dx:g,dy:p,dt:m,event:d},t,t.state,t.context)};e.addEventListener("touchstart",f,{passive:!0}),e.addEventListener("touchend",u,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{e.removeEventListener("touchstart",f)}catch{}try{e.removeEventListener("touchend",u)}catch{}})}function Pa(t,e){let r={...t};for(let o in e){let n=r[o],s=e[o];n&&s&&typeof n=="object"&&typeof s=="object"&&!Array.isArray(n)&&!Array.isArray(s)&&typeof n!="function"&&typeof s!="function"?r[o]=Pa(n,s):r[o]=s}return r}function Am(t,e,r){if(!e||!t.node)return;let o=t.childExtends;if(Array.isArray(e)){let n=t.tag==="fragment",s=t.context?.document||globalThis.document,i=n?null:s?.createDocumentFragment();if(!n&&!i)return;let a=t.childProps,c=t.childrenAs;for(let l=0;l<e.length;l++){let f=e[l],u=f;(typeof f=="string"||typeof f=="number")&&(f={text:f});let d=a;if(typeof a=="function")try{d=a(t,f)}catch{d=null}if(c==="state"){let p=u;(typeof u=="string"||typeof u=="number")&&(p={value:u,text:u}),f=d?{...d,state:p}:{state:p}}else d&&(f=Pa(d,f));if(o&&!f.ignoreChildExtends)if(f.extends){let p=Array.isArray(f.extends)?f.extends:[f.extends],m=Array.isArray(o)?o:[o];f={...f,extends:[...m,...p]}}else f={...f,extends:o};let h=f?.key||u&&typeof u=="object"&&u.key||`${l}`,g;try{g=ne(f,t,h,r)}catch(p){if(typeof console<"u"&&console.error){let m=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${h}" failed to construct at ${m} (initial render, skipping this row):`,p?.message||p)}continue}!n&&g?.node&&i.appendChild(g.node)}return n||t.node.appendChild(i),!0}if(typeof e=="string"){let n=Dw(e,t);if(Array.isArray(n))return Am(t,n,r)}if(typeof e=="object")for(let n in e){if(jt.has(n))continue;let s=e[n];if(!(s==null||s===!1)){if((typeof s=="string"||typeof s=="number")&&(s={text:s}),t.childProps&&(s=Pa(t.childProps,s)),o&&!s.ignoreChildExtends)if(s.extends){let i=Array.isArray(s.extends)?s.extends:[s.extends],a=Array.isArray(o)?o:[o];s={...s,extends:[...a,...i]}}else s={...s,extends:o};ne(s,t,n,r)}}}function Tm(t,e){let r=t.node;if(!r||r.tagName!=="SELECT")return;let o=r.options;if(!o||!o.length)return;let n=t.__ref,s=n&&n.__exec&&n.__exec.value,i=typeof s=="function",a=t.value!=null&&typeof t.value!="function";if(i||a){let f;if(i)try{f=s(t,t.state,t.context)}catch{return}else f=t.value;let u=f==null?"":String(f);r.value!==u&&(r.value=u);return}let c=e||!(n&&n.__selectSynced);if(n&&(n.__selectSynced=!0),!c)return;let l=-1;for(let f=0;f<o.length;f++)o[f].defaultSelected&&(l=f);l>=0&&r.selectedIndex!==l&&(r.selectedIndex=l)}function Bw(t,e){let{children:r,content:o}=t,n=t.childExtends;if(typeof r=="function"){let u=r;try{r=u(t,t.state,t.context)}catch(m){if(r=void 0,typeof console<"u"&&console.error){let b=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${b} (initial run, treating as empty):`,m?.message||m)}}t.children=r;let d=t.__ref,h=!1,g=Bt(t,t.childrenDeps,u),p=Z(()=>{let m=h;h=!0;let b;try{b=g(t,t.state,t.context)}catch(D){if(typeof console<"u"&&console.error){let I=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${I}${m?"":" (initial tracking run)"}:`,D?.message||D)}return}if(!m||b===t.children)return;t.children=b;let _=typeof t.onContentUpdate=="function",y=_?[]:null,x=_?[]:null,k=_?[]:null;if(Array.isArray(b)&&t.childrenAs==="state"){let D=t.childProps,I=[],z=new Map;for(let W=0;W<b.length;W++){let wt=b[W],L=D;if(typeof D=="function")try{L=D(t,wt)}catch{L=null}let ot=L&&L.key||wt&&wt.key||`${W}`;I.push(ot),z.set(ot,{rawChild:wt,childProps:L})}let V=new Set(I),rt=d.__children.slice();for(let W of rt)if(!V.has(W)){let wt=t[W];wt?.remove&&wt.remove(),delete t[W],x&&x.push(W)}let at=t.childExtends,G=t.tag==="fragment",K=t.context?.document||globalThis.document,lt=G?null:K?.createDocumentFragment(),Vt=new Set;for(let W of I){let wt=z.get(W),L=wt.rawChild,ot=t[W];if(ot&&ot.state){if(L&&typeof L=="object"){let Et=ot.state,Ye=Et.$replace||Et.replace,nt=Et.$update||Et.update;try{if(typeof Ye=="function")Ye.call(Et,L);else if(typeof nt=="function"){for(let M in Et)if(!(M==="__element"||M==="root"||M==="parent"||M==="update")&&!Object.prototype.hasOwnProperty.call(L,M))try{Et[M]=void 0}catch{}nt.call(Et,L)}else for(let M in L)Et[M]=L[M]}catch(M){if(typeof console<"u"&&console.error){let ht=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${W}" failed to patch at ${ht} (reconcile, keeping its previous data for this pass):`,M?.message||M)}}}k&&k.push(W);continue}let U=L;(typeof L=="string"||typeof L=="number")&&(U={value:L,text:L});let Y=wt.childProps,j=Y?{...Y,state:U}:{state:U};if(at&&!j.ignoreChildExtends)if(j.extends){let Et=Array.isArray(j.extends)?j.extends:[j.extends],Ye=Array.isArray(at)?at:[at];j={...j,extends:[...Ye,...Et]}}else j={...j,extends:at};let pt;try{pt=ne(j,t,W,e)}catch(Et){if(typeof console<"u"&&console.error){let Ye=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${W}" failed to construct at ${Ye} (reconcile, skipping this row):`,Et?.message||Et)}Vt.add(W);continue}!G&&pt?.node&&lt&&lt.appendChild(pt.node),y&&y.push(W)}if(!G&&lt&&lt.childNodes.length&&t.node&&t.node.appendChild(lt),!G&&t.node){let W=null;for(let wt of I){let L=t[wt]?.node;if(!L)continue;let ot=W?W.nextSibling:t.node.firstChild;L!==ot&&t.node.insertBefore(L,ot),W=L}}d.__children=Vt.size?I.filter(W=>!Vt.has(W)):I,_&&(y.length||x.length)&&vw(t,{added:y,removed:x,kept:k}),Tm(t,!1);return}let $=_?[...d.__children]:null;for(let D of[...d.__children]){let I=t[D];I?.remove&&I.remove(),delete t[D]}d.__children=[],Am(t,b,e),Tm(t,!1),_&&vw(t,{added:[...d.__children],removed:$,kept:[]})},{depth:d.path.length,label:Ct(d,"children")});d.__effects.push(p)}let s=Am(t,r,e);if(o!=null&&!(o&&o.__ref)){let u=o;if(typeof u=="string"||typeof u=="number"?u={text:u}:typeof u!="object"&&(u={}),t.childProps&&(u=Pa(t.childProps,u)),n&&!u.ignoreChildExtends)if(u.extends){let d=Array.isArray(u.extends)?u.extends:[u.extends],h=Array.isArray(n)?n:[n];u={...u,extends:[...h,...d]}}else u={...u,extends:n};ne(u,t,"content",e)}if(r&&!s)return;let i=t.context?.components||{};{let u=Object.keys(t);for(let d=0;d<u.length;d++){let h=u[d];if(!h.endsWith("Extends")||typeof t[h]!="string")continue;let g=h.slice(0,-7);if(!g||g.charCodeAt(0)<65||g.charCodeAt(0)>90)continue;let p={extends:t[h]};delete t[h];for(let m=d+1;m<u.length;m++){let b=u[m],_=b.charCodeAt(0);if(_>=65&&_<=90||jt.has(b)||typeof t[b]=="function"&&(b.startsWith("on")||b.startsWith(".")))break;let y=t[b];y!==void 0&&(p[b]=y,delete t[b])}t[g]&&typeof t[g]=="object"?t[g]={...p,...t[g]}:t[g]=p}}let a=e?.mountYield===!0||t.yieldChildren===!0,c=Object.keys(t),l=u=>{if(jt.has(u)||typeof t[u]!="object"||t[u]===null)return;let d=u.charCodeAt(0);if(d<65||d>90)return;let h=t[u];if(!h.__ref){if(!h.extends&&!h.extend){let g=i[u]||i[`smbls.${u}`];g&&(h={...h,extends:g})}if(t.childProps&&(h=Pa(t.childProps,h)),n&&!h.ignoreChildExtends)if(h.extends){let g=Array.isArray(h.extends)?h.extends:[h.extends],p=Array.isArray(n)?n:[n];h={...h,extends:[...p,...g]}}else h={...h,extends:n};ne(h,t,u,e)}};if(!a){for(let u of c)l(u);return}hw();let f=u=>{for(let d=u;d<c.length;d++)if(l(c[d]),d+1<c.length&&pw()){let h=d+1;mw(()=>f(h));return}};f(0),gw()}function Uw(t,e,r){let{node:o}=t;if(!o)return;o.ref=t;let n=e?.tag==="fragment"?e.__ref?.__fragmentAnchor:null;if(n){let i=n.parentNode;if(i){if(r?.position==="before"&&r.node)i.insertBefore(o,r.node);else if(r?.position==="after"&&r.node){let a=r.node.nextSibling;i.insertBefore(o,a||n)}else i.insertBefore(o,n);return}}let s=e?.node||(e?.nodeType?e:null);if(s)if(r?.position==="before"&&r.node)s.insertBefore(o,r.node);else if(r?.position==="after"&&r.node){let i=r.node.nextSibling;i?s.insertBefore(o,i):s.appendChild(o)}else s.appendChild(o)}var Om=3;function Zg(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=Om?!1:(t.__inBeforeUpdate=!0,!0)}function lr(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===Om&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${Om}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function fr(t,e,r){let o=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&At(o,e,r);let n="on"+t,s=e[n];if(typeof s=="function"){let c=t==="Render"?"__inRender":t==="RenderRouter"?"__inRenderRouter":null;if(c){if(e.__ref[c])return!0;e.__ref[c]=!0}let l=e.context?.designSystem;l&&it(l);let f=!!c;try{let u=s(e,e.state,e.context,r);if(u&&typeof u.then=="function"){let d=e.__ref;return u.catch(h=>{e.context?.plugins?.length&&At("error",e,{hook:n,error:h})||console.error(`[DOMQL] Lifecycle "${n}" error:`,h)}).finally(()=>{c&&d&&(d[c]=!1)}),f=!1,!0}if(u===!1)return!1}catch(u){if(e.context?.plugins?.length&&At("error",e,{hook:n,error:u})||console.error(`[DOMQL] Lifecycle "${n}" error:`,u),e.context?.strictMode)throw u}finally{l&&tt(),f&&e.__ref&&(e.__ref[c]=!1)}}return!0}var Vw={blue:"#213eb0",green:"#389d34",red:"#e15c55",yellow:"#EDCB38",orange:"#e97c16",transparent:"rgba(0, 0, 0, 0)",black:"black",gray:"#4e4e50",white:"white",title:["--gray 1 -168","--gray 1 +168"],caption:["--gray 1 -68","--gray 1 +68"],paragraph:["--gray 1 -42","--gray 1 +42"],disabled:["--gray 1 -26","--gray 1 +26"],line:["--gray 1 -16","--gray 1 +16"],blueDeep:"#0A5CB8",blueBright:"#47A8FF",accentInk:["blueDeep","blueBright"],greenDeep:"#2A6E28",greenBright:"#7FD07B",successInk:["greenDeep","greenBright"],redDeep:"#A83520",redBright:"#FF8C78",dangerInk:["redDeep","redBright"],orangeDeep:"#94500F",orangeBright:"#F4A45E",warningInk:["orangeDeep","orangeBright"],magentaDeep:"#A100A1",magentaBright:"#FF7AFF",magentaInk:["magentaDeep","magentaBright"]},Hw={"gradient-blue-light":`linear-gradient(to right,
57
57
  rgba(4, 116, 242, 1),
58
58
  rgba(0, 48, 103, 1)
59
59
  )`,"gradient-blue-dark":`linear-gradient(to right,
@@ -79,28 +79,28 @@ FROM ${a}${l}`},zE=t=>{let e=[],r=(o,n)=>{for(let s in o){let i=n?`${n}/${s}`:s;
79
79
  #1E54F0 36%,
80
80
  #8B4CCA 69%,
81
81
  #C66894 100%
82
- )`};var O1={primary:{"@dark":{color:"white",background:"blue",".color-only":{color:"blue"},".inactive":{background:"gray+16"},".gradient":{color:"white",background:"gradient-blue"}},"@light":{color:"white",background:"gradient-blue",".color-only":{color:"blue"},".gradient":{color:"white",background:"gradient-colorful"}}},secondary:{"@dark":{color:"white",background:"green",".color-only":{color:"green"}},"@light":{color:"white",background:"green",".color-only":{color:"green"}},".child":"--primary"},tertiary:{"@dark":{color:"white",background:"gray.92+8"},"@light":{background:"gray.1"}},quaternary:{"@light":{color:"white",background:"gradient-light"},"@dark":{color:"white",background:"gradient-dark-active"}},quinary:{"@dark":{color:"gray=90",background:"gradient-light",":hover":{color:"gray=95",background:"gradient-light-active"},":focus":{color:"gray=120",background:"gradient-light-active"},":active":{color:"gray=120",background:"gradient-light-active"},".active":{color:"gray=120",background:"gradient-light-active"}},"@light":{color:"gray3",background:"gradient-dark",":hover":{color:"gray1",background:"gradient-dark-active"},":active":{color:"gray1",background:"gradient-dark-active"},".active":{color:"gray1",background:"gradient-dark-active"}}}},R1={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},P1={field:{"@light":{color:"black",background:"gray.975+144",borderColor:"gray.975+144","::placeholder":{color:"gray-68"}},"@dark":{color:"white",background:"gray.975-52",borderColor:"gray.975-52","::placeholder":{color:"gray+68"}}},label:{"@dark":{color:"white",background:"gray.92+8"},"@light":{background:"gray.1"},".light":{color:"white",background:"gray3"},".dark":{color:"white",background:"black.35"}},card:{"@light":{background:"gray.975+150"},"@dark":{color:"white",background:"gray.975-56"},".child":{color:"white",background:"gray3"},".secondary":{color:"white",background:"gradient-blue-dark",".child":{color:"white",background:"black.35"}}},dialog:{"@dark":{color:"white",background:"gray.92",".helper":{color:"white",background:"black"}},"@light":{color:"currentColor",background:"gray.1"}}},Uw={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...O1,...R1,...P1,none:{color:"none",background:"none"},transparent:{color:"currentColor",background:"transparent"}};var Vw={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var zw={ratio:1.618,subSequence:!0};var Hw={SourceSans:[{url:""}]},Ww={system:{isDefault:!0,isSystemFallback:!0,value:["system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial",'"Noto Sans"','"Liberation Sans"'],type:"sans-serif"}};var qw={symbols:'<svg height="24" width="24"><path d="M13.843 2.7C19.063 2.7 23 6.366 23 11.228c0 3.754-2.862 6.584-6.658 6.584-3.287 0-5.007-2.318-5.007-4.609 0-2.395 1.923-4.344 4.287-4.344.566 0 1.023.12 1.309.223a.212.212 0 01.137.229l-.016.058-.514 1.18a.223.223 0 01-.245.13 2.965 2.965 0 00-.506-.046c-1.245 0-2.258 1.027-2.258 2.288 0 1.33 1.165 2.373 2.651 2.373 2.195 0 3.913-1.777 3.913-4.046 0-3.024-2.294-5.135-5.58-5.135-4.076 0-7.393 3.36-7.393 7.491a7.519 7.519 0 002.871 5.924l-4.96 3.18A12.042 12.042 0 012 14.7c0-6.617 5.313-12 11.843-12z" fill-rule="evenodd"/></svg>',logo:'<svg height="24" width="24"><path d="M13.843 2.7C19.063 2.7 23 6.366 23 11.228c0 3.754-2.862 6.584-6.658 6.584-3.287 0-5.007-2.318-5.007-4.609 0-2.395 1.923-4.344 4.287-4.344.566 0 1.023.12 1.309.223a.212.212 0 01.137.229l-.016.058-.514 1.18a.223.223 0 01-.245.13 2.965 2.965 0 00-.506-.046c-1.245 0-2.258 1.027-2.258 2.288 0 1.33 1.165 2.373 2.651 2.373 2.195 0 3.913-1.777 3.913-4.046 0-3.024-2.294-5.135-5.58-5.135-4.076 0-7.393 3.36-7.393 7.491a7.519 7.519 0 002.871 5.924l-4.96 3.18A12.042 12.042 0 012 14.7c0-6.617 5.313-12 11.843-12z" fill-rule="evenodd"/></svg>',arrowDownCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-circle"><circle cx="12" cy="12" r="10"/><path d="M8 12l4 4 4-4M12 8v8"/></svg>',arrowDownLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-left"><path d="M17 7L7 17M17 17H7V7"/></svg>',arrowDownRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-right"><path d="M7 7l10 10M17 7v10H7"/></svg>',arrowDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down"><path d="M12 5v14M19 12l-7 7-7-7"/></svg>',arrowLeftCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left-circle"><circle cx="12" cy="12" r="10"/><path d="M12 8l-4 4 4 4M16 12H8"/></svg>',arrowLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>',arrowRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><path d="M5 12h14M12 5l7 7-7 7"/></svg>',arrowRightCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right-circle"><circle cx="12" cy="12" r="10"/><path d="M12 16l4-4-4-4M8 12h8"/></svg>',arrowUpCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-circle"><circle cx="12" cy="12" r="10"/><path d="M16 12l-4-4-4 4M12 16V8"/></svg>',arrowUpLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-left"><path d="M17 17L7 7M7 17V7h10"/></svg>',arrowUpRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-right"><path d="M7 17L17 7M7 7h10v10"/></svg>',arrowUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up"><path d="M12 19V5M5 12l7-7 7 7"/></svg>',checkCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check-circle"><path d="M22 11.08V12a10 10 0 11-5.93-9.14"/><path d="M22 4L12 14.01l-3-3"/></svg>',check:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><path d="M20 6L9 17l-5-5"/></svg>',chevronDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><path d="M6 9l6 6 6-6"/></svg>',chevronLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-left"><path d="M15 18l-6-6 6-6"/></svg>',chevronRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><path d="M9 18l6-6-6-6"/></svg>',chevronUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-up"><path d="M18 15l-6-6-6 6"/></svg>',copy:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-copy"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>',eyeOff:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye-off"><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24M1 1l22 22"/></svg>',eye:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>',info:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-info"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4M12 8h.01"/></svg>',lock:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-lock"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0110 0v4"/></svg>',minus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-minus"><path d="M5 12h14"/></svg>',sun:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>',moon:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg>',moreHorizontal:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-horizontal"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>',moreVertical:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-vertical"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>',send:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-send"><path d="M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"/></svg>',smile:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-smile"><circle cx="12" cy="12" r="10"/><path d="M8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01"/></svg>',search:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"/><path d="M21 21l-4.35-4.35"/></svg>',upload:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-upload"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M17 8l-5-5-5 5M12 3v12"/></svg>',video:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-video"><path d="M23 7l-7 5 7 5V7z"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></svg>',x:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><path d="M18 6L6 18M6 6l12 12"/></svg>',star:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>',plus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><path d="M12 5v14M5 12h14"/></svg>'};var Kw={tv:"(min-width: 2780px)",screenL:"(max-width: 1920px)","screenL<":"(min-width: 1920px)",screenM:"(max-width: 1680px)","screenM<":"(min-width: 1680px)",screenS:"(max-width: 1440px)","screenS<":"(min-width: 1440px)",tabletL:"(max-width: 1366px)","tabletL<":"(min-width: 1366px)",tabletM:"(max-width: 1280px)","tabletM<":"(min-width: 1280px)",tabletS:"(max-width: 1024px)","tabletS<":"(min-width: 1024px)",mobileL:"(max-width: 768px)","mobileL<":"(min-width: 768px)",mobileM:"(max-width: 560px)","mobileM<":"(min-width: 560px)",mobileS:"(max-width: 480px)","mobileS<":"(min-width: 480px)",mobileXS:"(max-width: 375px)","mobileXS<":"(min-width: 375px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var Gw={base:150,ratio:1.333,unit:"ms",subSequence:!0};var Yw={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var Pa={version:"0.0.1",color:jw,gradient:Bw,theme:Uw,typography:Vw,spacing:zw,font:Hw,fontFamily:Ww,timing:Gw,icons:qw,media:Kw,sizes:Yw,reset:{html:{},body:{}},animation:{fadeIn:{from:{opacity:0},to:{opacity:1}}},devices:{},class:{},svg:{},grid:{},shape:{}};var Hn={};P(Hn,{A:()=>d0,AssetPicture:()=>pS,Audio:()=>mS,Avatar:()=>A0,B:()=>LS,Block:()=>Xw,Box:()=>Df,Br:()=>jS,Button:()=>g0,ButtonSet:()=>_0,COMPONENTS:()=>vo,Caption:()=>ES,Checkbox:()=>YS,CheckboxHgroup:()=>XS,Circle:()=>fS,CircleButton:()=>y0,Clickable:()=>aS,Data:()=>FS,Dialog:()=>w0,DialogFooter:()=>k0,DialogHeader:()=>S0,Dropdown:()=>O0,DropdownList:()=>R0,DropdownParent:()=>P0,DropdownParentFocus:()=>I0,DropdownSiblingFocus:()=>D0,FileIcon:()=>c0,Flex:()=>Zw,Focusable:()=>cS,FocusableComponent:()=>lS,Footnote:()=>$S,Form:()=>nS,Grid:()=>tS,Gutter:()=>rS,H1:()=>_S,H2:()=>xS,H3:()=>wS,H4:()=>SS,H5:()=>kS,H6:()=>vS,Headline:()=>IS,Hgroup:()=>HS,HgroupButton:()=>qS,HgroupRows:()=>WS,Hoverable:()=>iS,Hr:()=>NS,I:()=>MS,Icon:()=>i0,IconButton:()=>x0,IconText:()=>a0,Iframe:()=>sS,Img:()=>oS,Inline:()=>Jw,InlineFlex:()=>Qw,InlineGrid:()=>eS,Input:()=>KS,Italic:()=>RS,KangorooButton:()=>b0,Li:()=>BS,Link:()=>ny,Notification:()=>$0,NumberInput:()=>GS,Ol:()=>VS,P:()=>CS,Picture:()=>dS,Radio:()=>JS,RadioHgroup:()=>ZS,Range:()=>T0,RouteLink:()=>p0,RouterLink:()=>sy,SHAPES:()=>Pf,Select:()=>h0,Shape:()=>Lm,Span:()=>bS,SquareButton:()=>m0,Strong:()=>AS,Subhead:()=>DS,Svg:()=>hS,Text:()=>yS,Textarea:()=>e0,TextareaWithButton:()=>r0,Theme:()=>uS,Title:()=>PS,Toggle:()=>QS,ToggleHgroup:()=>t0,Tooltip:()=>v0,TooltipHidden:()=>C0,TooltipParent:()=>E0,U:()=>TS,Ul:()=>US,Underline:()=>OS,Video:()=>gS,depth:()=>If,focusableRingEnabled:()=>Of,getSystemGlobalTheme:()=>Ia});var Rm={};P(Rm,{Block:()=>Xw,Flex:()=>Zw,Grid:()=>tS,Gutter:()=>rS,Inline:()=>Jw,InlineFlex:()=>Qw,InlineGrid:()=>eS});var Xw={display:"block"},Jw={display:"inline"},Zw={display:"flex"},Qw={display:"inline-flex"},tS={display:"grid"},eS={display:"inline-grid"},rS={boxSize:"C1"};var Pm={};P(Pm,{Img:()=>oS});R();var oS={tag:"img",attr:{title:t=>t.title||t.alt,alt:t=>t.alt!=null?t.alt:t.title||"",src:t=>{let e=Gt(t);return e&&e.src||t.src},srcset:t=>{let e=Gt(t);return(e?Li(e):"")||t.srcset}}};var Im={};P(Im,{Form:()=>nS});var nS={tag:"form"};var Dm={};P(Dm,{Iframe:()=>sS});var sS={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var $m={};P($m,{Clickable:()=>aS,Focusable:()=>cS,FocusableComponent:()=>lS,Hoverable:()=>iS,focusableRingEnabled:()=>Of});var I1={appearance:"none",cursor:"pointer",fontFamily:"inherit"},iS={transition:"C defaultBezier",transitionProperty:"opacity, transform",opacity:.85,":hover":{opacity:.9,transform:"scale(1.015)"},":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1,transform:"scale(1.015)",":hover":{opacity:1}}},aS={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}};function Of(t){let e=t.context&&t.context.designSystem;return!e||e.focusableRing!==!1}var cS={border:"none",outline:t=>Of(t)?"solid 0 blue.3":"none",":focus-visible":{opacity:1,outline:t=>Of(t)?"solid X blue.3":"none"},attr:{tabIndex:t=>t.tabIndex}},lS={extends:"Focusable",tag:"button",fontSize:"A",type:"button",border:"none",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",fontFamily:"inherit",style:I1};var Nm={};P(Nm,{Picture:()=>dS});var Fm={};P(Fm,{Theme:()=>uS,getSystemGlobalTheme:()=>Ia});var Mm={};P(Mm,{Circle:()=>fS,SHAPES:()=>Pf,Shape:()=>Lm,default:()=>D1,depth:()=>If});R();var we=C(),If={4:{boxShadow:`rgba(0,0,0,.10) 0 2${we.unit.default} 4${we.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${we.unit.default} 6${we.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${we.unit.default} 10${we.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${we.unit.default} 16${we.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${we.unit.default} 26${we.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${we.unit.default} 42${we.unit.default}`}},zn=t=>et(t.shapeDirectionColor)||et(t.borderColor)||et(t.backgroundColor)||et(t.background),Rf=t=>{let e=ka.transition(t.transition,t);return e&&e.transition},Pf={rectangle:{},circle:{borderRadius:"100%"},bubble:{},tv:{borderRadius:"1.15em/2.5em"},tooltip:t=>({position:t.position||"relative","&:before":{content:'""',display:"block",width:"0px",height:"0px",border:".35em solid",borderColor:zn(t),transition:Rf(t),transitionProperty:"border-color",position:"absolute",borderRadius:".15em"}}),tooltipDirection:{top:{"&:before":{top:"0",left:"50%",transform:"translate(-50%, -50%) rotate(45deg)"}},right:{"&:before":{top:"50%",right:"0",transform:"translate(50%, -50%) rotate(45deg)"}},bottom:{"&:before":{bottom:"0",left:"50%",transform:"translate(-50%, 50%) rotate(45deg)"}},left:{"&:before":{top:"50%",left:"0",transform:"translate(-50%, -50%) rotate(45deg)"}}},tag:t=>({position:"relative","&:before":{content:'""',display:"block",background:zn(t),transition:Rf(t),transitionProperty:"background",borderRadius:".25em",position:"absolute",zIndex:"-1",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",height:"73%"}}),tagDirection:{top:{"&:before":{bottom:"100%",left:"50%",transform:"translate(-50%, 50%) rotate(45deg)"}},right:{"&:before":{top:"50%",left:"100%",transform:"translate(-50%, -50%) rotate(45deg)"}},bottom:{"&:before":{top:"100%",left:"50%",transform:"translate(-50%, -50%) rotate(45deg)"}},left:{"&:before":{top:"50%",right:"100%",transform:"translate(50%, -50%) rotate(45deg)"}}},hexagon:t=>({position:"relative","&:before, &:after":{content:'""',display:"block",position:"absolute",zIndex:"-1",borderRadius:".25em",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",height:"73%",background:zn(t),transition:Rf(t),transitionProperty:"background"},"&:before":{left:"0",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"},"&:after":{left:"100%",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}}),chevron:t=>({position:"relative","&:before, &:after":{content:'""',display:"block",position:"absolute",zIndex:"-1",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",transition:Rf(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${zn(t)} 25%, transparent 25%), linear-gradient(315deg, ${zn(t)} 25%, transparent 25%)`},"&:after":{background:zn(t),borderRadius:".25em"}}),chevronDirection:{left:{"&:before":{height:"100%",left:"100%",transform:"translate3d(-1%, -50%, 1px) scale(-1, 1)"},"&:after":{height:"73%",left:"0",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}},right:{"&:before":{height:"100%",left:"0",transform:"translate3d(-99%, -50%, 1px)"},"&:after":{height:"73%",left:"100%",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}}}},Lm={deps:{exec:ut,getSpacingBasedOnRatio:Te,getMediaColor:It},classlist:{shape:t=>t.deps.exec(Pf[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=Pf[t.shape+"Direction"];return t.shape&&e?e[t.shapeDirection||"left"]:null},shapeDirectionColor:t=>{let e={borderColor:t.deps.getMediaColor(t.background||t.backgroundColor)};return t.shapeDirection?e:null}}},fS={round:"100%"},D1=Lm;R();var Ia=({context:t,state:e})=>{let r=e&&e.root,o=r&&r.globalTheme||t.designSystem&&t.designSystem.globalTheme;return o==="auto"?null:o},uS={deps:{depth:If},classlist:{depth:t=>!Tt(t.depth)&&t.deps.depth[t.depth]}};var dS={deps:{getSystemGlobalTheme:Ia},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:Ia},tag:"source",attr:{media:t=>{let{key:e,context:r,deps:o}=t,{media:n}=r.designSystem,s=o.getSystemGlobalTheme(t),i=(t.media||e).slice(1);return i===s?"(min-width: 0px)":i==="dark"||i==="light"?"(max-width: 0px)":n[i]}}},Img:{width:"inherit",ignoreChildExtends:!0,height:"inherit",src:(t,e)=>t.parent?.src||e.src}};var jm={};P(jm,{AssetPicture:()=>pS});R();var pS={tag:"picture",children:t=>{let e=Gt(t);if(e)return Mi(e,t.alt)}};var Bm={};P(Bm,{Svg:()=>hS});var hS={tag:"svg",attr:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},html:t=>{let{context:e}=t;if(t.semanticIcons)return;if(t.html&&typeof t.html!="function")return t.call("exec",t.html,t);let{designSystem:r,utils:o}=e,n=r&&r.svg,s=t.spriteId||r&&r.useSvgSprite,i=t.call("exec",t.src,t),a=d=>`<use xlink:href="#${d}" />`;if(typeof i=="string"){let d=i.match(/^\s*<symbol\b[^>]*\bid="([^"]+)"/);if(d){let h=d[1],g=e.document||(typeof document<"u"?document:null);if(!(g&&typeof g.getElementById=="function"&&g.getElementById(h))){let m=o&&o.scratchSystem&&o.scratchSystem.appendSVGSprite;r&&!r.__svgCache&&(r.__svgCache={}),typeof m=="function"?m({[h]:i},{document:g}):o&&typeof o.init=="function"&&o.init({svg:{[h]:i}},{document:g,emotion:e.emotion})}return a(h)}}if(!s&&i)return i;let c=t.spriteId;if(c)return a(c);if(n&&n[i])return a(i);let l=Symbol.for(i),f=n[l];if(f&&n[f])return a(f);if(!i)return a("");if(typeof i=="string"&&!i.includes("<"))return typeof console<"u"&&console.warn&&console.warn(`[Svg] Unknown sprite symbol "${i}" \u2014 not registered in design-system sprite. Set the icon name to one that exists in designSystem.icons / context.svg, or register the SVG body via utils.init({ svg: { '${i}': '<svg>...</svg>' } }).`),a("");let u=0;for(let d=0;d<i.length;d++)u=(u<<5)-u+i.charCodeAt(d)|0;return f=n[l]=`svg-${(u>>>0).toString(36)}`,o.init({svg:{[f]:i}},{document:e.document,emotion:e.emotion}),a(f)}};var Um={};P(Um,{Video:()=>gS});R();var gS={tag:"video",controls:!0,attr:{src:t=>{let e=Gt(t);return e&&e.src||t.src}},children:t=>{let e=Gt(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(r=>({tag:"source",attr:{src:r.src,type:r.format}}))},childExtends:{tag:"source"}};var Vm={};P(Vm,{Audio:()=>mS});R();var mS={tag:"audio",controls:!0,attr:{src:t=>{let e=Gt(t);return e&&e.src||t.src}},children:t=>{let e=Gt(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(r=>({tag:"source",attr:{src:r.src,type:r.format}}))},childExtends:{tag:"source"}};var zm={};P(zm,{B:()=>LS,Caption:()=>ES,Data:()=>FS,Footnote:()=>$S,H1:()=>_S,H2:()=>xS,H3:()=>wS,H4:()=>SS,H5:()=>kS,H6:()=>vS,Headline:()=>IS,I:()=>MS,Italic:()=>RS,P:()=>CS,Span:()=>bS,Strong:()=>AS,Subhead:()=>DS,Text:()=>yS,Title:()=>PS,U:()=>TS,Underline:()=>OS});var yS={},bS={tag:"span"},_S={tag:"h1"},xS={tag:"h2"},wS={tag:"h3"},SS={tag:"h4"},kS={tag:"h5"},vS={tag:"h6"},CS={tag:"p"},ES={tag:"caption"},AS={tag:"strong",fontWeight:"700"},TS={tag:"u"},OS={tag:"u"},RS={tag:"i"},PS={},IS={tag:"h6",fontSize:"B",fontWeight:500},DS={tag:"span",fontSize:"Z1"},$S={tag:"span",fontSize:"Z"},LS={tag:"b"},MS={tag:"i"},FS={tag:"data"};var Hm={};P(Hm,{Box:()=>Df,Br:()=>jS,Hr:()=>NS,Li:()=>BS,Ol:()=>VS,Ul:()=>US});var $1=t=>{if(!t.context)return;let{props:e,__ref:r}=t,o=ie(e,t,{unpack:!1});r.__class=o},Df={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:$1},NS={tag:"hr",margin:"C1 0"},jS={tag:"br"},BS={tag:"li"},US={tag:"ul",childExtends:{extends:"Li"}},VS={tag:"ol",childExtends:{extends:"Li"}};var Wm={};P(Wm,{Hgroup:()=>HS,HgroupButton:()=>qS,HgroupRows:()=>WS});var zS=t=>{if(t.text!=null||t.html!=null)return!0;for(let e in t){let r=e.charCodeAt(0);if(r>=65&&r<=90)return!0}return!1},HS={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:zS,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:zS,margin:"0",color:"paragraph"}},WS={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},qS={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var qm={};P(qm,{Input:()=>KS});var KS={extends:["Focusable"],tag:"input",border:"none",type:"input",theme:"field",fontSize:"A",round:"C",lineHeight:"1",padding:"Z2 B",attr:{pattern:t=>t.pattern,minLength:t=>t.minlength,maxLength:t=>t.maxlength,name:t=>t.name,autocomplete:t=>t.autocomplete,placeholder:t=>t.placeholder,value:t=>{if(!t.value)return;let e=t.call("exec",t.value,t);return t.call("isString",e)&&e.includes("{{")?t.call("replaceLiteralsWithObjectFields",e):e},checked:t=>t.call("exec",t.checked,t),disabled:t=>t.disabled||null,readonly:t=>t.readonly,required:t=>t.required,type:t=>t.type}};var Km={};P(Km,{NumberInput:()=>GS});var GS={extends:["Flex","Input"],type:"number",boxSize:"C+X",align:"center center",textAlign:"center",round:"Y1",theme:"transparent",border:"solid gray3",borderWidth:"1px",placeholder:"0",fontWeight:"400","::-webkit-inner-spin-button":{appearance:"none"},attr:{step:t=>t.step,min:t=>t.min,max:t=>t.max}};var Gm={};P(Gm,{Checkbox:()=>YS,CheckboxHgroup:()=>XS});var YS={extends:"Focusable",tag:"label",boxSize:"fit-content fit-content",cursor:"pointer",round:"Y",Input:{type:"checkbox",position:"absolute",opacity:"0",width:"1px",height:"1px",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",":checked + div":{theme:"primary"},":checked + div > svg":{transform:"none",opacity:"1"},":focus-visible + div":{outline:"solid X blue.3",outlineOffset:"Z"},attr:{checked:t=>t.call("exec",t.parent.checked)}},Flex:{align:"center center",fontSize:"B1",padding:"V",theme:"field",round:"X2",transition:"background A defaultBezier",Icon:{icon:"check",opacity:"0",transform:"scale(0.9) rotate(-15deg)",transition:"opacity B defaultBezier"}}},XS={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var Ym={};P(Ym,{Radio:()=>JS,RadioHgroup:()=>ZS});var JS={extends:"Checkbox",Input:{type:"radio",":checked + div:after":{opacity:"1"}},Flex:{round:"100%",padding:"Y",":after":{content:'""',display:"block",boxSize:"X+W1",round:"100%",background:"white",opacity:"0",transition:"opacity .15s ease-in-out"},Icon:null}},ZS={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var Xm={};P(Xm,{Toggle:()=>QS,ToggleHgroup:()=>t0});var QS={extends:"Checkbox",Input:{role:"switch",":checked + div":{background:"green2+8",justifyContent:"flex-end"}},Flex:{boxSize:"A1 B1",padding:"- W_default",round:"D",align:"center flex-start",theme:"field",border:"none",transition:"opacity .15s ease",":after":{content:'""',boxSize:"A A",round:"100%",background:"white",boxShadow:"gray.2 1px 1px Z"},Icon:null}},t0={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var Jm={};P(Jm,{Textarea:()=>e0,TextareaWithButton:()=>r0});var e0={tag:"textarea",extends:["Input","Flex"],fontfamily:"Avenir",placeholder:"Leave us a message...",padding:"A",theme:"field",border:"none",minHeight:"E_default",width:"100%",height:"E1_default",fontFamily:"inherit",round:"Z2",lineHeight:1.4,".outlined":{borderWidth:"1px",borderStyle:"solid"}},r0={display:"flex",gap:"Y2",Textarea:{height:"C2+W",minWidth:"H",padding:"A",fontSize:"Z1",round:"Z2",minHeight:"fit-content"},SquareButton:{background:"blue",Icon:{name:"send"}}};var Zm={};P(Zm,{FileIcon:()=>c0,Icon:()=>i0,IconText:()=>a0});var o0=new Set,n0=(t,e)=>{if(!o0.has(t)&&(o0.add(t),typeof console<"u"&&console.warn)){let r=e&&e.__ref&&e.__ref.path,o=r&&r.length?` at <${r.join(".")}>`:"";console.warn(`[Icon] Unknown icon name "${t}"${o} \u2014 not registered in designSystem.icons, rendering the noIcon placeholder. Fix the name or register the icon in the design system.`)}},s0=new WeakMap,L1=t=>{let e=s0.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},s0.set(t,e)),e},M1=(t,e)=>{if(!t)return null;let r=t.default||t;return typeof r=="string"?r.trim()?{[e]:r}:null:typeof r=="object"&&!Array.isArray(r)&&Object.keys(r).length?r:null},F1=(t,e,r)=>{let o=r&&r.context&&r.context.document||(typeof document<"u"?document:null);it(t);try{let n=C();n&&!n.__svgCache&&(n.__svgCache={}),t.__svgCache||(t.__svgCache={});let s={};for(let i in e){let a=_o(e[i],i);a&&(t.icons[i]=a,s[i]=a)}return t.useIconSprite&&o&&Object.keys(s).length&&xo(s,{document:o}),Object.keys(s).length>0}finally{tt()}},N1=(t,e,r,o,n)=>{let s=t&&t.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=L1(s);if(a.failed.has(e))return!1;let c=a.waiting.get(e);if(c||(c=new Set,a.waiting.set(e,c)),c.add(n),a.pending.has(e))return!0;let l=Promise.resolve().then(()=>i(e,t)).then(f=>{let u=M1(f,r);return u?F1(s,u,o):!1}).catch(f=>(typeof console<"u"&&console.error&&console.error(`[Icon] iconsLoader failed for "${e}":`,f),!1)).then(f=>{a.pending.delete(e);let u=a.waiting.get(e);a.waiting.delete(e),f||a.failed.add(e),u&&u.forEach(d=>{try{d(f)}catch(h){console.error("[Icon] repaint error:",h)}})});return a.pending.set(e,l),!0},i0={extends:"Svg",width:"A",height:"A",display:"inline-block",style:{fill:"currentColor","*":{fill:"currentColor"}},onInit:(t,e,r)=>{let{parent:o}=t,{icons:n,useIconSprite:s,verbose:i}=r&&r.designSystem,{toCamelCase:a}=r&&r.utils,c=g=>{let p=g[".isActive"];if(p)return g.call("exec",p.name||p.icon)},l=(g,p,m)=>{let{semanticIcons:b}=m&&m.designSystem,{toCamelCase:_}=m&&m.utils,y=f(g,p),k=_(y).split(/([a-z])([A-Z])/g),E=k[1]?k[0]:y.split(".")[0].split(" ")[0],O=b&&b[E];if(O){let $=y.includes(".")?"sfsymbols."+y.split(".").slice(1).join("."):"sfsymbols";return y=O[$]||O[y.split(".")[0].split(" ")[0]],{tag:"span",semanticIcons:!0,width:"A",height:"A",lineHeight:"1em",":after":{fontSize:"Z",fontWeight:"300",content:`"${y}"`,textAlign:"center",display:"inline-block",style:{color:"currentColor",fontFamily:"'SF Pro Icons', 'SF Pro', 'SF Symbols', 'Segoe UI'"}}}}},f=(g,p)=>{let{key:m}=g,b=g.call("exec",g.name||g.icon||m,g);return g.call("isString",b)&&b.includes("{{")&&(b=g.call("replaceLiteralsWithObjectFields",b)),g.call("isString",b)?b:m},u=t.src,d,h=()=>{let g=f(t,e),p=g;if(g.includes(" ")){let I=g.split(" ");g=I[0]+I.slice(1).map(H=>H.charAt(0).toUpperCase()+H.slice(1)).join("")}let m=a(g),b=m.split(/([a-z])([A-Z])/g),_=l(t,e,r);if(_){Object.assign(t,_);return}let y;t.isActive&&(y=c(t));let x=o[".isActive"];o&&o.isActive&&x&&x.icon&&(y=t.call("exec",x.icon||x.Icon.name||x.Icon.icon,t)),t.call("isString",y)&&y.includes("{{")&&(y=t.call("replaceLiteralsWithObjectFields",y));let k;n[y]&&(k=y),n[m]?k=m:n[b[0]+b[1]]?k=b[0]+b[1]:n[b[0]]?k=b[0]:i&&t.warn("Can't find icon:",g,k);let E=n[k],O=o&&o.src||u;!E&&!O&&(N1(r,p,m,t,H=>{if(!(d&&d._disposed)){if(!H)return n0(p,t);h()}})||n0(p,t));let $=s&&k,D=E||O||n.noIcon;if(!(t.spriteId===$&&t.src===D&&t.node&&t.node.innerHTML)&&(t.spriteId=$,t.src=D,typeof t.html=="function"&&t.node)){let I=t.context&&t.context.designSystem;I&&it(I);try{let H=t.html(t,t.state,t.context);H!=null&&typeof H!="function"&&(t.node.innerHTML=H)}finally{I&&tt()}}};d=Z(h,{depth:t.__ref&&t.__ref.path&&t.__ref.path.length||0}),t.__ref&&(t.__ref.__effects||(t.__ref.__effects=[]),t.__ref.__effects.push(d))},attr:{viewBox:"0 0 24 24","aria-hidden":t=>t.ariaLabel||t.role==="img"?null:"true",focusable:"false"}},a0={display:"flex",align:"center center",lineHeight:1,".reversed":{flow:"row-reverse"},".vertical":{flow:"column"},Icon:{if:t=>{let{parent:e}=t,r=typeof t.icon=="string"&&t.icon;return t.call("exec",r||e.icon||t.name||t.sfSymbols||e.sfSymbols,t)},icon:t=>t.call("exec",t.parent.icon,t.parent)},text:t=>t.text},c0={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var iy={};P(iy,{A:()=>d0,Link:()=>ny,RouteLink:()=>p0,RouterLink:()=>sy});var Da={};P(Da,{default:()=>z1,getActiveRoute:()=>oy,lastLevel:()=>Lf,lastPathname:()=>$f,matchRoute:()=>ty,parseQuery:()=>ey,parseRoutePattern:()=>Qm,router:()=>Ge,runGuards:()=>ry});R();var f0=/^:(.+)/,u0=/^\*$/,l0=new Map,Qm=t=>{let e=l0.get(t);if(e)return e;let r=t.replace(/^\//,"").split("/"),o=[],n=!1;for(let i=0;i<r.length;i++){let a=r[i].match(f0);a?o.push({index:i,name:a[1]}):u0.test(r[i])&&(n=!0)}let s={segments:r,params:o,hasWildcard:n,pattern:t};return l0.set(t,s),s},ty=(t,e,r=0)=>{let n=t.replace(/^\//,"").split("/").filter(Boolean).slice(r),s="/"+(n[0]||"");if(!e)return{key:null,content:null,params:{},routePath:s};let i=null,a=-1,c={};for(let l in e){if(l==="/*")continue;let f=Qm(l),u=j1(n,f);u>a&&(a=u,i=l,c=B1(n,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},j1=(t,e)=>{let{segments:r,hasWildcard:o}=e;if(!o&&r.length!==t.length&&r.length!==1&&r.length>t.length)return-1;let n=0,s=Math.min(r.length,t.length);for(let i=0;i<s;i++)if(r[i]===t[i])n+=3;else if(f0.test(r[i]))n+=1;else if(u0.test(r[i]))n+=.5;else return-1;return n},B1=(t,e)=>{let r={};for(let{index:o,name:n}of e.params)t[o]&&(r[n]=decodeURIComponent(t[o]));return r},ey=t=>{if(!t||t==="?")return{};let e={};return new URLSearchParams(t).forEach((o,n)=>{e[n]!==void 0?(Array.isArray(e[n])||(e[n]=[e[n]]),e[n].push(o)):e[n]=o}),e},ry=async(t,e)=>{if(!t||!t.length)return!0;for(let r of t){let o=await r(e);if(o===!1)return!1;if(typeof o=="string")return o}return!0},oy=(t=0,e)=>{e||(e=typeof v<"u"?v.location.pathname:"/");let o=e.split("/")[t+1];if(o)return`/${o}`},$f,Lf=0,U1=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,V1={level:Lf,pushState:!0,initialRender:!1,scrollToTop:!0,scrollToNode:!1,get scrollNode(){return typeof Q<"u"&&(Q.scrollingElement||Q.documentElement)||null},scrollBody:!1,useFragment:!1,updateState:!0,scrollToOffset:0,contentElementKey:"content",scrollToOptions:{behavior:"smooth"},useParamsMatching:!0},Ge=async(t,e,r={},o={})=>{let n=e||void 0,s=n?.context?.window||v,i=n?.context?.document||Q,a={...V1,...n.context.routerOptions,...o};Lf=a.lastLevel;let c=n.__ref;(a.contentElementKey!=="content"&&a.contentElementKey!==c.contentElementKey||!c.contentElementKey)&&(c.contentElementKey=a.contentElementKey||"content");let l=c.contentElementKey||a.contentElementKey||"content",f=s.location.origin!=="null"?s.location.origin:"http://localhost";t=U1(t);let u=typeof s.URL=="function"?s.URL:typeof globalThis<"u"&&globalThis.URL||URL,d=new u(f+t),{pathname:h,search:g,hash:p}=d,m=ey(g),b=n.node,_=p&&p!==s.location.hash.slice(1),y=h!==$f;$f=h;let x=c.__routerRendered,k,E,O,$;if(a.useParamsMatching){let V=ty(h,n.routes,a.level);k=V.key,E=V.routePath,O=V.content,$=V.params}else{k=oy(a.level,h),E=k;let V=n.routes;O=V?V[k||"/"]||V["/*"]:null,$={}}let D=a.scrollToNode?b:a.scrollNode;if(n.state?.root?.debugging){n.state.root.debugging=!1;return}if(!O){a.onNotFound?a.onNotFound({pathname:h,route:k,element:n}):a.silent||console.warn("[smbls/router] no content matched for path",h,"\u2014 available routes:",Object.keys(n.routes||{}));return}if(a.guards&&a.guards.length){let V={pathname:h,route:k,params:$,query:m,hash:p,element:n,state:r},rt=await ry(a.guards,V);if(rt===!1)return;if(typeof rt=="string")return Ge(rt,e,r,{...o,guards:[]})}if(a.pushState)try{s.history.pushState(r,null,h+(g||"")+(p||""))}catch{}if(y||!_){let V={route:k,routePath:E,hash:p,debugging:!1};Object.keys($).length&&(V.params=$),Object.keys(m).length&&(V.query=m),a.updateState&&n.state.update(V,{preventContentUpdate:!0})}let I=!x||x.content!==O||x.route!==k;if(y||I||a.force===!0){l&&a.removeOldElement&&n[l].remove();let V=n.__ref?.origin?.content,rt={};if(V)for(let G in V){let K=V[G];G==="__ref"||G==="props"||G==="node"||G==="parent"||G==="key"||(typeof K=="string"||typeof K=="number"||typeof K=="boolean"||typeof K=="object"&&K!==null&&!K.node&&!K.__ref)&&(rt[G]=K)}let at={...rt,...typeof O=="object"?O:{extends:O}};a.useFragment&&(at.tag="fragment");try{if(typeof n?.set!="function")return;n.set(at,{contentElementKey:l}),c.__routerRendered={content:O,route:k}}catch(G){console.error("[smbls/router] failed to render route content",h,G)}}if(a.scrollToTop&&D?.scrollTo&&D.scrollTo({...a.scrollToOptions||{},top:0,left:0}),a.scrollToNode&&O[l]?.node?.scrollTo&&O[l].node.scrollTo({...a.scrollToOptions||{},top:0,left:0}),p){let V=i.getElementById(p);if(V&&D?.scrollTo){let rt=V.getBoundingClientRect().top+b.scrollTop-(a.scrollToOffset||0);D.scrollTo({...a.scrollToOptions||{},top:rt,left:0})}}kr("routeChanged",n,a)},z1=Ge;var H1=(t,e,r)=>{let{context:o}=e,{href:n,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",n,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=o,d=e.__ref.root,h=a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")||a.startsWith("sketch:")||a.startsWith("whatsapp:")||a.startsWith("sms:")||a.startsWith("skype:")||a.startsWith("viber:")||a.startsWith("callto:")||a.startsWith("facetime:")||a.startsWith("facetime-audio:")||a.startsWith("geo:")||a.startsWith("maps:");if(a&&!h){t.preventDefault();try{let g=d;if(u&&u.customRouterElement){let p=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let b of p){if(!m||!m[b]){m=null;break}m=m[b]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||Ge)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}},ny={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:t=>Fr(t,t.href)||Fr(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:H1},d0={extends:"Link"},sy={onClick:(t,e,r)=>{let{context:o}=e,{href:n,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",n,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=o,d=e.__ref.root,h=a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")||a.startsWith("sketch:")||a.startsWith("whatsapp:")||a.startsWith("sms:")||a.startsWith("skype:")||a.startsWith("viber:")||a.startsWith("callto:")||a.startsWith("facetime:")||a.startsWith("facetime-audio:")||a.startsWith("geo:")||a.startsWith("maps:");if(a&&!h){t.preventDefault();try{let g=d;if(u&&u.customRouterElement){let p=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let b of p){if(!m||!m[b]){m=null;break}m=m[b]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||Ge)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}}},p0={extends:[ny,sy]};var ay={};P(ay,{Select:()=>h0});var h0={extends:"Focusable",tag:"select",fontSize:"A",border:"none",boxSizing:"border-box",theme:"field",cursor:"pointer",childProps:{tag:"option",attr:{value:t=>t.value,selected:t=>t.selected,disabled:t=>t.disabled}},attr:{name:t=>t.name,disabled:t=>t.disabled,value:t=>{if(!t.value)return;let e=t.call("exec",t.value,t);return t.call("isString",e)&&e.includes("{{")?t.call("replaceLiteralsWithObjectFields",e):e}}};var cy={};P(cy,{Button:()=>g0,ButtonSet:()=>_0,CircleButton:()=>y0,IconButton:()=>x0,KangorooButton:()=>b0,SquareButton:()=>m0});var g0={extends:["IconText","FocusableComponent"],tag:"button",minHeight:"controlH",fontSize:"Z2",type:"button",borderStyle:"none",display:"inline-flex",align:"center center",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",padding:"0 A",fontWeight:"700",fontFamily:"inherit",round:"radiusPill",disabled:t=>t.call("exec",t.disabled)},m0={extends:"Button",fontSize:"A",width:"A",minHeight:"auto",padding:"Z",aspectRatio:"1 / 1",boxSize:"fit-content fit-content",justifyContent:"center",round:"Z2",boxSizing:"content-box"},y0={extends:"SquareButton",round:"C"},b0={extends:"Button",childExtends:"IconText"},_0={tag:"nav",display:"flex",childExtends:"SquareButton"},x0={extends:["SquareButton","ClickableItem"],round:"Z"};var ly={};P(ly,{Dialog:()=>w0,DialogFooter:()=>k0,DialogHeader:()=>S0});var w0={display:"flex",tag:"dialog",flow:"column",border:"0",theme:"dialog",round:"Z2"},S0={extends:"Hgroup",minWidth:"100%",gap:"A",Title:{align:"center space-between",Text:{text:"Title"},SquareButton:{icon:"x",theme:"transparent"}},Paragraph:{color:"caption"}},k0={display:"flex",align:"center flex-end",gap:"X2",margin:"auto - -",padding:"Y2 X2",childExtends:{extends:"Button",textTransform:"uppercase",background:"transparent","@dark":{theme:"primary @dark .color-only"},"@light":{theme:"primary @light .color-only"},"&":{padding:"Z A"},":hover":{theme:"tertiary"},":active":{background:"white.1"}},Cancel:{text:"cancel"},Ok:{text:"ok"}};var fy={};P(fy,{Tooltip:()=>v0,TooltipHidden:()=>C0,TooltipParent:()=>E0});R();var v0={display:"flex",theme:"dialog",background:"black",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>bt(t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"gray12",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"gray6",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},C0={extends:"Tooltip",position:"absolute",pointerEvents:"none",opacity:"0",visibility:"hidden",transition:"C defaultBezier opacity, C defaultBezier visibility, B defaultBezier transform",onInit:t=>{let e=!t.shapeDirection||t.shapeDirection==="top"?{top:"112%",left:"50%",transform:"translate3d(-50%,10%,0)",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="right"?{transform:"translate3d(10%,-50%,0)",left:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="bottom"?{transform:"translate3d(-50%,-10%,0)",bottom:"112%",left:"50%",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="left"?{transform:"translate3d(10%,-50%,0)",right:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:{};Object.assign(t,e)}},E0={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:r}=t,o=e||r;if(!o)return;let n=o&&o[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":n||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var uy={};P(uy,{Avatar:()=>A0});var W1=t=>{let r=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="32" fill="#71718A"/><text x="32" y="42" font-family="system-ui,sans-serif" font-size="28" font-weight="700" text-anchor="middle" fill="#fff">${String(t||"").trim().charAt(0).toUpperCase()||"?"}</text></svg>`;return"data:image/svg+xml;utf8,"+encodeURIComponent(r)},A0={extends:"Img",display:"block",avatarType:"adventurer-neutral",borderRadius:"100%",boxSize:"C+X C+X",src:t=>`https://api.dicebear.com/7.x/${t.avatarType||"initials"}/svg?seed=${t.key||"no-avatar"}`,onError:(t,e)=>{if(!e.node||e.node.__avatarFallbackApplied)return;e.node.__avatarFallbackApplied=!0;let r=e.node.getAttribute("alt")||(e.key!=="no-avatar"?e.key:"");e.node.src=W1(r)},attr:{alt:t=>t.alt!=null?t.alt:t.text?t.call("exec",t.text,t):t.key&&t.key!=="no-avatar"?t.key:""}};var dy={};P(dy,{Range:()=>T0});var T0={tag:"input",appearance:"none",width:"100%",height:"2px",outline:"none",flex:1,onInput:(t,e,r)=>{e.call("isFunction",e.onInput)?e.onInput(t,e,r):r.update({value:parseFloat(e.node.value)})},onChange:(t,e,r)=>{e.call("isFunction",e.onChange)?e.onChange(t,e,r):r.update({value:parseFloat(e.node.value)})},"::-webkit-slider-thumb":{boxSizing:"content-box",width:"8px",height:"8px",borderWidth:"2px",borderStyle:"solid",borderRadius:"100%",opacity:".8",appearance:"none"},"::-webkit-slider-runnable-track":{},"@dark":{background:"white.2","::-webkit-slider-thumb":{background:"#232526",borderColor:dn("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:dn("#fff",.35)}},":focus":{"::-webkit-slider-thumb":{borderColor:"#3C6AC0"}}},"@light":{background:"gray9","::-webkit-slider-thumb":{background:"white",borderColor:"gray9"},":hover":{"::-webkit-slider-thumb":{borderColor:"gray7"}},":focus":{"::-webkit-slider-thumb":{borderColor:"blue"}}},deps:{returnPropertyValue:(t,e,r)=>{let o=t.call("exec",t[e],t);return(t.call("isFunction",o)?o(t,t.state):o!==void 0?o:r!==void 0?r:0)+""}},attr:{type:"range",value:(t,e)=>t.call("exec",e.value||t.value||t.defaultValue,t),min:(t,e)=>t.deps.returnPropertyValue(t,"min",0),max:(t,e)=>t.deps.returnPropertyValue(t,"max",100),step:(t,e)=>t.deps.returnPropertyValue(t,"step",1)}};var py={};P(py,{Dropdown:()=>O0,DropdownList:()=>R0,DropdownParent:()=>P0,DropdownParentFocus:()=>I0,DropdownSiblingFocus:()=>D0});var O0={attr:{dropdown:!0},position:"absolute",top:"100%",left:"0",zIndex:1e3,theme:"quaternary",padding:"Y",round:"Z2",flow:"column",gap:"X",transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},R0={display:"flex",attr:{dropdown:!0},padding:"0 Y",maxHeight:"G",flow:"column",theme:"quaternary",overflow:"hidden auto",style:{listStyleType:"none"},transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",children:t=>t.options||[],childrenAs:"props",".hidden":{transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},childExtends:{extends:"Button",state:{},isActive:({key:t,state:e})=>e.active===t,position:"relative",round:"0",align:"center flex-end",flow:"row-reverse",padding:"Z2 C Z2 Y2",margin:"0",gap:"Y2",theme:"quaternary .child",":hover":{style:{svg:{opacity:"0.5"}}},Icon:{isActive:({key:t,state:e})=>e.active===t,name:"checkmark",opacity:"0.1",".active":{opacity:"1"}},":not(:first-child)":{"@dark":{border:"solid gray4.65"},"@light":{border:"solid gray11"},borderWidth:"1px 0 0"}}},P0={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},I0={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}},Dropdown:{onClick:()=>{document.activeElement?.blur()}}},D0={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& ~ [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}}};var hy={};P(hy,{Notification:()=>$0});var $0={display:"flex",theme:"alert",padding:"Z1 B Z A",round:"A A A Y2",gap:"X2",cursor:"pointer",align:"flex-start center",IconText:{Icon:{name:"info outline"},Text:{":empty":{hide:!0}}},Hgroup:{extends:["Flex","Hgroup"],flow:"y",align:"flex-start",gap:"X2",H:{tag:"h6",margin:"0",fontWeight:"600",lineHeight:"1em",text:"Notification",":empty":{hide:!0}},P:{fontSize:"Z",margin:"0",text:"is not always a distraction",":empty":{hide:!0}}}};var vo=Object.assign({},Rm,Pm,Im,Dm,$m,Nm,jm,Bm,Mm,Um,Vm,Fm,zm,Hm,Wm,qm,Km,Gm,Ym,Xm,Jm,Zm,iy,ay,cy,ly,fy,uy,dy,py,hy);function Mf(t){if(t==null)return 0;if(typeof t!="object")return L0(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let o=0;o<t.length;o++)e=(e^Mf(t[o]))*16777619;return e>>>0}let r=Object.keys(t).sort();for(let o=0;o<r.length;o++)e=(e^L0(r[o]))*16777619,e=(e^Mf(t[r[o]]))*16777619;return e>>>0}function L0(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e}function Ff(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!=typeof e||typeof t!="object")return!1;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!Ff(t[n],e[n]))return!1;return!0}let r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(let n=0;n<r.length;n++){let s=r[n];if(!Object.prototype.hasOwnProperty.call(e,s)||!Ff(t[s],e[s]))return!1}return!0}function gy(t,e){if(e===void 0)return t;if(t===void 0)return e;if(e===null)return null;if(typeof e!="object"||Array.isArray(e))return e;if(typeof t!="object"||Array.isArray(t))return{...e};let r=!1,o={};for(let n in t)if(n in e){let s=gy(t[n],e[n]);o[n]=s,s!==t[n]&&(r=!0)}else o[n]=t[n];for(let n in e)n in t||(o[n]=e[n],r=!0);return r?o:t}function my(t,e,r){if(!e||typeof e!="object")return t;if(!t||typeof t!="object")return e;if(r||(r=new WeakSet),r.has(e))return t;r.add(e);for(let o in e){let n=e[o];n&&typeof n=="object"&&!Array.isArray(n)&&t[o]&&typeof t[o]=="object"&&!Array.isArray(t[o])?my(t[o],n,r):t[o]=n}return t}function Vr(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e.toString(36)}function Wn(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function $a(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Vr(e)}function M0(t){return t.split(`
82
+ )`};var P1={primary:{"@dark":{color:"white",background:"blue",".color-only":{color:"blue"},".inactive":{background:"gray+16"},".gradient":{color:"white",background:"gradient-blue"}},"@light":{color:"white",background:"gradient-blue",".color-only":{color:"blue"},".gradient":{color:"white",background:"gradient-colorful"}}},secondary:{"@dark":{color:"white",background:"green",".color-only":{color:"green"}},"@light":{color:"white",background:"green",".color-only":{color:"green"}},".child":"--primary"},tertiary:{"@dark":{color:"white",background:"gray.92+8"},"@light":{background:"gray.1"}},quaternary:{"@light":{color:"white",background:"gradient-light"},"@dark":{color:"white",background:"gradient-dark-active"}},quinary:{"@dark":{color:"gray=90",background:"gradient-light",":hover":{color:"gray=95",background:"gradient-light-active"},":focus":{color:"gray=120",background:"gradient-light-active"},":active":{color:"gray=120",background:"gradient-light-active"},".active":{color:"gray=120",background:"gradient-light-active"}},"@light":{color:"gray3",background:"gradient-dark",":hover":{color:"gray1",background:"gradient-dark-active"},":active":{color:"gray1",background:"gradient-dark-active"},".active":{color:"gray1",background:"gradient-dark-active"}}}},I1={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},D1={field:{"@light":{color:"black",background:"gray.975+144",borderColor:"gray.975+144","::placeholder":{color:"gray-68"}},"@dark":{color:"white",background:"gray.975-52",borderColor:"gray.975-52","::placeholder":{color:"gray+68"}}},label:{"@dark":{color:"white",background:"gray.92+8"},"@light":{background:"gray.1"},".light":{color:"white",background:"gray3"},".dark":{color:"white",background:"black.35"}},card:{"@light":{background:"gray.975+150"},"@dark":{color:"white",background:"gray.975-56"},".child":{color:"white",background:"gray3"},".secondary":{color:"white",background:"gradient-blue-dark",".child":{color:"white",background:"black.35"}}},dialog:{"@dark":{color:"white",background:"gray.92",".helper":{color:"white",background:"black"}},"@light":{color:"currentColor",background:"gray.1"}}},zw={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...P1,...I1,...D1,none:{color:"none",background:"none"},transparent:{color:"currentColor",background:"transparent"}};var Ww={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var qw={ratio:1.618,subSequence:!0};var Kw={SourceSans:[{url:""}]},Gw={system:{isDefault:!0,isSystemFallback:!0,value:["system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial",'"Noto Sans"','"Liberation Sans"'],type:"sans-serif"}};var Yw={symbols:'<svg height="24" width="24"><path d="M13.843 2.7C19.063 2.7 23 6.366 23 11.228c0 3.754-2.862 6.584-6.658 6.584-3.287 0-5.007-2.318-5.007-4.609 0-2.395 1.923-4.344 4.287-4.344.566 0 1.023.12 1.309.223a.212.212 0 01.137.229l-.016.058-.514 1.18a.223.223 0 01-.245.13 2.965 2.965 0 00-.506-.046c-1.245 0-2.258 1.027-2.258 2.288 0 1.33 1.165 2.373 2.651 2.373 2.195 0 3.913-1.777 3.913-4.046 0-3.024-2.294-5.135-5.58-5.135-4.076 0-7.393 3.36-7.393 7.491a7.519 7.519 0 002.871 5.924l-4.96 3.18A12.042 12.042 0 012 14.7c0-6.617 5.313-12 11.843-12z" fill-rule="evenodd"/></svg>',logo:'<svg height="24" width="24"><path d="M13.843 2.7C19.063 2.7 23 6.366 23 11.228c0 3.754-2.862 6.584-6.658 6.584-3.287 0-5.007-2.318-5.007-4.609 0-2.395 1.923-4.344 4.287-4.344.566 0 1.023.12 1.309.223a.212.212 0 01.137.229l-.016.058-.514 1.18a.223.223 0 01-.245.13 2.965 2.965 0 00-.506-.046c-1.245 0-2.258 1.027-2.258 2.288 0 1.33 1.165 2.373 2.651 2.373 2.195 0 3.913-1.777 3.913-4.046 0-3.024-2.294-5.135-5.58-5.135-4.076 0-7.393 3.36-7.393 7.491a7.519 7.519 0 002.871 5.924l-4.96 3.18A12.042 12.042 0 012 14.7c0-6.617 5.313-12 11.843-12z" fill-rule="evenodd"/></svg>',arrowDownCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-circle"><circle cx="12" cy="12" r="10"/><path d="M8 12l4 4 4-4M12 8v8"/></svg>',arrowDownLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-left"><path d="M17 7L7 17M17 17H7V7"/></svg>',arrowDownRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-right"><path d="M7 7l10 10M17 7v10H7"/></svg>',arrowDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down"><path d="M12 5v14M19 12l-7 7-7-7"/></svg>',arrowLeftCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left-circle"><circle cx="12" cy="12" r="10"/><path d="M12 8l-4 4 4 4M16 12H8"/></svg>',arrowLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>',arrowRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><path d="M5 12h14M12 5l7 7-7 7"/></svg>',arrowRightCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right-circle"><circle cx="12" cy="12" r="10"/><path d="M12 16l4-4-4-4M8 12h8"/></svg>',arrowUpCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-circle"><circle cx="12" cy="12" r="10"/><path d="M16 12l-4-4-4 4M12 16V8"/></svg>',arrowUpLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-left"><path d="M17 17L7 7M7 17V7h10"/></svg>',arrowUpRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-right"><path d="M7 17L17 7M7 7h10v10"/></svg>',arrowUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up"><path d="M12 19V5M5 12l7-7 7 7"/></svg>',checkCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check-circle"><path d="M22 11.08V12a10 10 0 11-5.93-9.14"/><path d="M22 4L12 14.01l-3-3"/></svg>',check:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><path d="M20 6L9 17l-5-5"/></svg>',chevronDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><path d="M6 9l6 6 6-6"/></svg>',chevronLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-left"><path d="M15 18l-6-6 6-6"/></svg>',chevronRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><path d="M9 18l6-6-6-6"/></svg>',chevronUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-up"><path d="M18 15l-6-6-6 6"/></svg>',copy:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-copy"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>',eyeOff:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye-off"><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24M1 1l22 22"/></svg>',eye:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>',info:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-info"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4M12 8h.01"/></svg>',lock:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-lock"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0110 0v4"/></svg>',minus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-minus"><path d="M5 12h14"/></svg>',sun:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>',moon:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg>',moreHorizontal:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-horizontal"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>',moreVertical:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-vertical"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>',send:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-send"><path d="M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"/></svg>',smile:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-smile"><circle cx="12" cy="12" r="10"/><path d="M8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01"/></svg>',search:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"/><path d="M21 21l-4.35-4.35"/></svg>',upload:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-upload"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M17 8l-5-5-5 5M12 3v12"/></svg>',video:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-video"><path d="M23 7l-7 5 7 5V7z"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></svg>',x:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><path d="M18 6L6 18M6 6l12 12"/></svg>',star:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>',plus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><path d="M12 5v14M5 12h14"/></svg>'};var Xw={tv:"(min-width: 2780px)",screenL:"(max-width: 1920px)","screenL<":"(min-width: 1920px)",screenM:"(max-width: 1680px)","screenM<":"(min-width: 1680px)",screenS:"(max-width: 1440px)","screenS<":"(min-width: 1440px)",tabletL:"(max-width: 1366px)","tabletL<":"(min-width: 1366px)",tabletM:"(max-width: 1280px)","tabletM<":"(min-width: 1280px)",tabletS:"(max-width: 1024px)","tabletS<":"(min-width: 1024px)",mobileL:"(max-width: 768px)","mobileL<":"(min-width: 768px)",mobileM:"(max-width: 560px)","mobileM<":"(min-width: 560px)",mobileS:"(max-width: 480px)","mobileS<":"(min-width: 480px)",mobileXS:"(max-width: 375px)","mobileXS<":"(min-width: 375px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var Jw={base:150,ratio:1.333,unit:"ms",subSequence:!0};var Zw={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var Ia={version:"0.0.1",color:Vw,gradient:Hw,theme:zw,typography:Ww,spacing:qw,font:Kw,fontFamily:Gw,timing:Jw,icons:Yw,media:Xw,sizes:Zw,reset:{html:{},body:{}},animation:{fadeIn:{from:{opacity:0},to:{opacity:1}}},devices:{},class:{},svg:{},grid:{},shape:{}};var Wn={};P(Wn,{A:()=>g0,AssetPicture:()=>mS,Audio:()=>_S,Avatar:()=>R0,B:()=>NS,Block:()=>Qw,Box:()=>Lf,Br:()=>VS,Button:()=>b0,ButtonSet:()=>S0,COMPONENTS:()=>Co,Caption:()=>OS,Checkbox:()=>ZS,CheckboxHgroup:()=>QS,Circle:()=>pS,CircleButton:()=>x0,Clickable:()=>fS,Data:()=>BS,Dialog:()=>v0,DialogFooter:()=>E0,DialogHeader:()=>C0,Dropdown:()=>I0,DropdownList:()=>D0,DropdownParent:()=>$0,DropdownParentFocus:()=>L0,DropdownSiblingFocus:()=>M0,FileIcon:()=>u0,Flex:()=>eS,Focusable:()=>uS,FocusableComponent:()=>dS,Footnote:()=>FS,Form:()=>aS,Grid:()=>oS,Gutter:()=>sS,H1:()=>SS,H2:()=>kS,H3:()=>vS,H4:()=>CS,H5:()=>ES,H6:()=>AS,Headline:()=>LS,Hgroup:()=>KS,HgroupButton:()=>YS,HgroupRows:()=>GS,Hoverable:()=>lS,Hr:()=>US,I:()=>jS,Icon:()=>l0,IconButton:()=>k0,IconText:()=>f0,Iframe:()=>cS,Img:()=>iS,Inline:()=>tS,InlineFlex:()=>rS,InlineGrid:()=>nS,Input:()=>XS,Italic:()=>DS,KangorooButton:()=>w0,Li:()=>HS,Link:()=>ay,Notification:()=>F0,NumberInput:()=>JS,Ol:()=>WS,P:()=>TS,Picture:()=>gS,Radio:()=>t0,RadioHgroup:()=>e0,Range:()=>P0,RouteLink:()=>m0,RouterLink:()=>cy,SHAPES:()=>Df,Select:()=>y0,Shape:()=>Nm,Span:()=>wS,SquareButton:()=>_0,Strong:()=>RS,Subhead:()=>MS,Svg:()=>yS,Text:()=>xS,Textarea:()=>n0,TextareaWithButton:()=>s0,Theme:()=>hS,Title:()=>$S,Toggle:()=>r0,ToggleHgroup:()=>o0,Tooltip:()=>A0,TooltipHidden:()=>T0,TooltipParent:()=>O0,U:()=>PS,Ul:()=>zS,Underline:()=>IS,Video:()=>bS,depth:()=>$f,focusableRingEnabled:()=>Pf,getSystemGlobalTheme:()=>Da});var Dm={};P(Dm,{Block:()=>Qw,Flex:()=>eS,Grid:()=>oS,Gutter:()=>sS,Inline:()=>tS,InlineFlex:()=>rS,InlineGrid:()=>nS});var Qw={display:"block"},tS={display:"inline"},eS={display:"flex"},rS={display:"inline-flex"},oS={display:"grid"},nS={display:"inline-grid"},sS={boxSize:"C1"};var $m={};P($m,{Img:()=>iS});R();var iS={tag:"img",attr:{title:t=>t.title||t.alt,alt:t=>t.alt!=null?t.alt:t.title||"",src:t=>{let e=Gt(t);return e&&e.src||t.src},srcset:t=>{let e=Gt(t);return(e?Mi(e):"")||t.srcset}}};var Lm={};P(Lm,{Form:()=>aS});var aS={tag:"form"};var Mm={};P(Mm,{Iframe:()=>cS});var cS={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var Fm={};P(Fm,{Clickable:()=>fS,Focusable:()=>uS,FocusableComponent:()=>dS,Hoverable:()=>lS,focusableRingEnabled:()=>Pf});var $1={appearance:"none",cursor:"pointer",fontFamily:"inherit"},lS={transition:"C defaultBezier",transitionProperty:"opacity, transform",opacity:.85,":hover":{opacity:.9,transform:"scale(1.015)"},":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1,transform:"scale(1.015)",":hover":{opacity:1}}},fS={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}};function Pf(t){let e=t.context&&t.context.designSystem;return!e||e.focusableRing!==!1}var uS={border:"none",outline:t=>Pf(t)?"solid 0 blue.3":"none",":focus-visible":{opacity:1,outline:t=>Pf(t)?"solid X blue.3":"none"},attr:{tabIndex:t=>t.tabIndex}},dS={extends:"Focusable",tag:"button",fontSize:"A",type:"button",border:"none",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",fontFamily:"inherit",style:$1};var Um={};P(Um,{Picture:()=>gS});var Bm={};P(Bm,{Theme:()=>hS,getSystemGlobalTheme:()=>Da});var jm={};P(jm,{Circle:()=>pS,SHAPES:()=>Df,Shape:()=>Nm,default:()=>L1,depth:()=>$f});R();var we=C(),$f={4:{boxShadow:`rgba(0,0,0,.10) 0 2${we.unit.default} 4${we.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${we.unit.default} 6${we.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${we.unit.default} 10${we.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${we.unit.default} 16${we.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${we.unit.default} 26${we.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${we.unit.default} 42${we.unit.default}`}},zn=t=>et(t.shapeDirectionColor)||et(t.borderColor)||et(t.backgroundColor)||et(t.background),If=t=>{let e=va.transition(t.transition,t);return e&&e.transition},Df={rectangle:{},circle:{borderRadius:"100%"},bubble:{},tv:{borderRadius:"1.15em/2.5em"},tooltip:t=>({position:t.position||"relative","&:before":{content:'""',display:"block",width:"0px",height:"0px",border:".35em solid",borderColor:zn(t),transition:If(t),transitionProperty:"border-color",position:"absolute",borderRadius:".15em"}}),tooltipDirection:{top:{"&:before":{top:"0",left:"50%",transform:"translate(-50%, -50%) rotate(45deg)"}},right:{"&:before":{top:"50%",right:"0",transform:"translate(50%, -50%) rotate(45deg)"}},bottom:{"&:before":{bottom:"0",left:"50%",transform:"translate(-50%, 50%) rotate(45deg)"}},left:{"&:before":{top:"50%",left:"0",transform:"translate(-50%, -50%) rotate(45deg)"}}},tag:t=>({position:"relative","&:before":{content:'""',display:"block",background:zn(t),transition:If(t),transitionProperty:"background",borderRadius:".25em",position:"absolute",zIndex:"-1",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",height:"73%"}}),tagDirection:{top:{"&:before":{bottom:"100%",left:"50%",transform:"translate(-50%, 50%) rotate(45deg)"}},right:{"&:before":{top:"50%",left:"100%",transform:"translate(-50%, -50%) rotate(45deg)"}},bottom:{"&:before":{top:"100%",left:"50%",transform:"translate(-50%, -50%) rotate(45deg)"}},left:{"&:before":{top:"50%",right:"100%",transform:"translate(50%, -50%) rotate(45deg)"}}},hexagon:t=>({position:"relative","&:before, &:after":{content:'""',display:"block",position:"absolute",zIndex:"-1",borderRadius:".25em",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",height:"73%",background:zn(t),transition:If(t),transitionProperty:"background"},"&:before":{left:"0",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"},"&:after":{left:"100%",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}}),chevron:t=>({position:"relative","&:before, &:after":{content:'""',display:"block",position:"absolute",zIndex:"-1",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",transition:If(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${zn(t)} 25%, transparent 25%), linear-gradient(315deg, ${zn(t)} 25%, transparent 25%)`},"&:after":{background:zn(t),borderRadius:".25em"}}),chevronDirection:{left:{"&:before":{height:"100%",left:"100%",transform:"translate3d(-1%, -50%, 1px) scale(-1, 1)"},"&:after":{height:"73%",left:"0",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}},right:{"&:before":{height:"100%",left:"0",transform:"translate3d(-99%, -50%, 1px)"},"&:after":{height:"73%",left:"100%",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}}}},Nm={deps:{exec:ut,getSpacingBasedOnRatio:Te,getMediaColor:It},classlist:{shape:t=>t.deps.exec(Df[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=Df[t.shape+"Direction"];return t.shape&&e?e[t.shapeDirection||"left"]:null},shapeDirectionColor:t=>{let e={borderColor:t.deps.getMediaColor(t.background||t.backgroundColor)};return t.shapeDirection?e:null}}},pS={round:"100%"},L1=Nm;R();var Da=({context:t,state:e})=>{let r=e&&e.root,o=r&&r.globalTheme||t.designSystem&&t.designSystem.globalTheme;return o==="auto"?null:o},hS={deps:{depth:$f},classlist:{depth:t=>!Tt(t.depth)&&t.deps.depth[t.depth]}};var gS={deps:{getSystemGlobalTheme:Da},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:Da},tag:"source",attr:{media:t=>{let{key:e,context:r,deps:o}=t,{media:n}=r.designSystem,s=o.getSystemGlobalTheme(t),i=(t.media||e).slice(1);return i===s?"(min-width: 0px)":i==="dark"||i==="light"?"(max-width: 0px)":n[i]}}},Img:{width:"inherit",ignoreChildExtends:!0,height:"inherit",src:(t,e)=>t.parent?.src||e.src}};var Vm={};P(Vm,{AssetPicture:()=>mS});R();var mS={tag:"picture",children:t=>{let e=Gt(t);if(e)return Fi(e,t.alt)}};var Hm={};P(Hm,{Svg:()=>yS});var yS={tag:"svg",attr:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},html:t=>{let{context:e}=t;if(t.semanticIcons)return;if(t.html&&typeof t.html!="function")return t.call("exec",t.html,t);let{designSystem:r,utils:o}=e,n=r&&r.svg,s=t.spriteId||r&&r.useSvgSprite,i=t.call("exec",t.src,t),a=d=>`<use xlink:href="#${d}" />`;if(typeof i=="string"){let d=i.match(/^\s*<symbol\b[^>]*\bid="([^"]+)"/);if(d){let h=d[1],g=e.document||(typeof document<"u"?document:null);if(!(g&&typeof g.getElementById=="function"&&g.getElementById(h))){let m=o&&o.scratchSystem&&o.scratchSystem.appendSVGSprite;r&&!r.__svgCache&&(r.__svgCache={}),typeof m=="function"?m({[h]:i},{document:g}):o&&typeof o.init=="function"&&o.init({svg:{[h]:i}},{document:g,emotion:e.emotion})}return a(h)}}if(!s&&i)return i;let c=t.spriteId;if(c)return a(c);if(n&&n[i])return a(i);let l=Symbol.for(i),f=n[l];if(f&&n[f])return a(f);if(!i)return a("");if(typeof i=="string"&&!i.includes("<"))return typeof console<"u"&&console.warn&&console.warn(`[Svg] Unknown sprite symbol "${i}" \u2014 not registered in design-system sprite. Set the icon name to one that exists in designSystem.icons / context.svg, or register the SVG body via utils.init({ svg: { '${i}': '<svg>...</svg>' } }).`),a("");let u=0;for(let d=0;d<i.length;d++)u=(u<<5)-u+i.charCodeAt(d)|0;return f=n[l]=`svg-${(u>>>0).toString(36)}`,o.init({svg:{[f]:i}},{document:e.document,emotion:e.emotion}),a(f)}};var zm={};P(zm,{Video:()=>bS});R();var bS={tag:"video",controls:!0,attr:{src:t=>{let e=Gt(t);return e&&e.src||t.src}},children:t=>{let e=Gt(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(r=>({tag:"source",attr:{src:r.src,type:r.format}}))},childExtends:{tag:"source"}};var Wm={};P(Wm,{Audio:()=>_S});R();var _S={tag:"audio",controls:!0,attr:{src:t=>{let e=Gt(t);return e&&e.src||t.src}},children:t=>{let e=Gt(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(r=>({tag:"source",attr:{src:r.src,type:r.format}}))},childExtends:{tag:"source"}};var qm={};P(qm,{B:()=>NS,Caption:()=>OS,Data:()=>BS,Footnote:()=>FS,H1:()=>SS,H2:()=>kS,H3:()=>vS,H4:()=>CS,H5:()=>ES,H6:()=>AS,Headline:()=>LS,I:()=>jS,Italic:()=>DS,P:()=>TS,Span:()=>wS,Strong:()=>RS,Subhead:()=>MS,Text:()=>xS,Title:()=>$S,U:()=>PS,Underline:()=>IS});var xS={},wS={tag:"span"},SS={tag:"h1"},kS={tag:"h2"},vS={tag:"h3"},CS={tag:"h4"},ES={tag:"h5"},AS={tag:"h6"},TS={tag:"p"},OS={tag:"caption"},RS={tag:"strong",fontWeight:"700"},PS={tag:"u"},IS={tag:"u"},DS={tag:"i"},$S={},LS={tag:"h6",fontSize:"B",fontWeight:500},MS={tag:"span",fontSize:"Z1"},FS={tag:"span",fontSize:"Z"},NS={tag:"b"},jS={tag:"i"},BS={tag:"data"};var Km={};P(Km,{Box:()=>Lf,Br:()=>VS,Hr:()=>US,Li:()=>HS,Ol:()=>WS,Ul:()=>zS});var M1=t=>{if(!t.context)return;let{props:e,__ref:r}=t,o=ie(e,t,{unpack:!1});r.__class=o},Lf={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:M1},US={tag:"hr",margin:"C1 0"},VS={tag:"br"},HS={tag:"li"},zS={tag:"ul",childExtends:{extends:"Li"}},WS={tag:"ol",childExtends:{extends:"Li"}};var Gm={};P(Gm,{Hgroup:()=>KS,HgroupButton:()=>YS,HgroupRows:()=>GS});var qS=t=>{if(t.text!=null||t.html!=null)return!0;for(let e in t){let r=e.charCodeAt(0);if(r>=65&&r<=90)return!0}return!1},KS={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:qS,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:qS,margin:"0",color:"paragraph"}},GS={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},YS={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var Ym={};P(Ym,{Input:()=>XS});var XS={extends:["Focusable"],tag:"input",border:"none",type:"input",theme:"field",fontSize:"A",round:"C",lineHeight:"1",padding:"Z2 B",attr:{pattern:t=>t.pattern,minLength:t=>t.minlength,maxLength:t=>t.maxlength,name:t=>t.name,autocomplete:t=>t.autocomplete,placeholder:t=>t.placeholder,value:t=>{if(!t.value)return;let e=t.call("exec",t.value,t);return t.call("isString",e)&&e.includes("{{")?t.call("replaceLiteralsWithObjectFields",e):e},checked:t=>t.call("exec",t.checked,t),disabled:t=>t.disabled||null,readonly:t=>t.readonly,required:t=>t.required,type:t=>t.type}};var Xm={};P(Xm,{NumberInput:()=>JS});var JS={extends:["Flex","Input"],type:"number",boxSize:"C+X",align:"center center",textAlign:"center",round:"Y1",theme:"transparent",border:"solid gray3",borderWidth:"1px",placeholder:"0",fontWeight:"400","::-webkit-inner-spin-button":{appearance:"none"},attr:{step:t=>t.step,min:t=>t.min,max:t=>t.max}};var Jm={};P(Jm,{Checkbox:()=>ZS,CheckboxHgroup:()=>QS});var ZS={extends:"Focusable",tag:"label",boxSize:"fit-content fit-content",cursor:"pointer",round:"Y",Input:{type:"checkbox",position:"absolute",opacity:"0",width:"1px",height:"1px",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",":checked + div":{theme:"primary"},":checked + div > svg":{transform:"none",opacity:"1"},":focus-visible + div":{outline:"solid X blue.3",outlineOffset:"Z"},attr:{checked:t=>t.call("exec",t.parent.checked)}},Flex:{align:"center center",fontSize:"B1",padding:"V",theme:"field",round:"X2",transition:"background A defaultBezier",Icon:{icon:"check",opacity:"0",transform:"scale(0.9) rotate(-15deg)",transition:"opacity B defaultBezier"}}},QS={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var Zm={};P(Zm,{Radio:()=>t0,RadioHgroup:()=>e0});var t0={extends:"Checkbox",Input:{type:"radio",":checked + div:after":{opacity:"1"}},Flex:{round:"100%",padding:"Y",":after":{content:'""',display:"block",boxSize:"X+W1",round:"100%",background:"white",opacity:"0",transition:"opacity .15s ease-in-out"},Icon:null}},e0={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var Qm={};P(Qm,{Toggle:()=>r0,ToggleHgroup:()=>o0});var r0={extends:"Checkbox",Input:{role:"switch",":checked + div":{background:"green2+8",justifyContent:"flex-end"}},Flex:{boxSize:"A1 B1",padding:"- W_default",round:"D",align:"center flex-start",theme:"field",border:"none",transition:"opacity .15s ease",":after":{content:'""',boxSize:"A A",round:"100%",background:"white",boxShadow:"gray.2 1px 1px Z"},Icon:null}},o0={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var ty={};P(ty,{Textarea:()=>n0,TextareaWithButton:()=>s0});var n0={tag:"textarea",extends:["Input","Flex"],fontfamily:"Avenir",placeholder:"Leave us a message...",padding:"A",theme:"field",border:"none",minHeight:"E_default",width:"100%",height:"E1_default",fontFamily:"inherit",round:"Z2",lineHeight:1.4,".outlined":{borderWidth:"1px",borderStyle:"solid"}},s0={display:"flex",gap:"Y2",Textarea:{height:"C2+W",minWidth:"H",padding:"A",fontSize:"Z1",round:"Z2",minHeight:"fit-content"},SquareButton:{background:"blue",Icon:{name:"send"}}};var ey={};P(ey,{FileIcon:()=>u0,Icon:()=>l0,IconText:()=>f0});var i0=new Set,a0=(t,e)=>{if(!i0.has(t)&&(i0.add(t),typeof console<"u"&&console.warn)){let r=e&&e.__ref&&e.__ref.path,o=r&&r.length?` at <${r.join(".")}>`:"";console.warn(`[Icon] Unknown icon name "${t}"${o} \u2014 not registered in designSystem.icons, rendering the noIcon placeholder. Fix the name or register the icon in the design system.`)}},c0=new WeakMap,F1=t=>{let e=c0.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},c0.set(t,e)),e},N1=(t,e)=>{if(!t)return null;let r=t.default||t;return typeof r=="string"?r.trim()?{[e]:r}:null:typeof r=="object"&&!Array.isArray(r)&&Object.keys(r).length?r:null},j1=(t,e,r)=>{let o=r&&r.context&&r.context.document||(typeof document<"u"?document:null);it(t);try{let n=C();n&&!n.__svgCache&&(n.__svgCache={}),t.__svgCache||(t.__svgCache={});let s={};for(let i in e){let a=xo(e[i],i);a&&(t.icons[i]=a,s[i]=a)}return t.useIconSprite&&o&&Object.keys(s).length&&wo(s,{document:o}),Object.keys(s).length>0}finally{tt()}},B1=(t,e,r,o,n)=>{let s=t&&t.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=F1(s);if(a.failed.has(e))return!1;let c=a.waiting.get(e);if(c||(c=new Set,a.waiting.set(e,c)),c.add(n),a.pending.has(e))return!0;let l=Promise.resolve().then(()=>i(e,t)).then(f=>{let u=N1(f,r);return u?j1(s,u,o):!1}).catch(f=>(typeof console<"u"&&console.error&&console.error(`[Icon] iconsLoader failed for "${e}":`,f),!1)).then(f=>{a.pending.delete(e);let u=a.waiting.get(e);a.waiting.delete(e),f||a.failed.add(e),u&&u.forEach(d=>{try{d(f)}catch(h){console.error("[Icon] repaint error:",h)}})});return a.pending.set(e,l),!0},l0={extends:"Svg",width:"A",height:"A",display:"inline-block",style:{fill:"currentColor","*":{fill:"currentColor"}},onInit:(t,e,r)=>{let{parent:o}=t,{icons:n,useIconSprite:s,verbose:i}=r&&r.designSystem,{toCamelCase:a}=r&&r.utils,c=g=>{let p=g[".isActive"];if(p)return g.call("exec",p.name||p.icon)},l=(g,p,m)=>{let{semanticIcons:b}=m&&m.designSystem,{toCamelCase:_}=m&&m.utils,y=f(g,p),k=_(y).split(/([a-z])([A-Z])/g),E=k[1]?k[0]:y.split(".")[0].split(" ")[0],O=b&&b[E];if(O){let $=y.includes(".")?"sfsymbols."+y.split(".").slice(1).join("."):"sfsymbols";return y=O[$]||O[y.split(".")[0].split(" ")[0]],{tag:"span",semanticIcons:!0,width:"A",height:"A",lineHeight:"1em",":after":{fontSize:"Z",fontWeight:"300",content:`"${y}"`,textAlign:"center",display:"inline-block",style:{color:"currentColor",fontFamily:"'SF Pro Icons', 'SF Pro', 'SF Symbols', 'Segoe UI'"}}}}},f=(g,p)=>{let{key:m}=g,b=g.call("exec",g.name||g.icon||m,g);return g.call("isString",b)&&b.includes("{{")&&(b=g.call("replaceLiteralsWithObjectFields",b)),g.call("isString",b)?b:m},u=t.src,d,h=()=>{let g=f(t,e),p=g;if(g.includes(" ")){let I=g.split(" ");g=I[0]+I.slice(1).map(z=>z.charAt(0).toUpperCase()+z.slice(1)).join("")}let m=a(g),b=m.split(/([a-z])([A-Z])/g),_=l(t,e,r);if(_){Object.assign(t,_);return}let y;t.isActive&&(y=c(t));let x=o[".isActive"];o&&o.isActive&&x&&x.icon&&(y=t.call("exec",x.icon||x.Icon.name||x.Icon.icon,t)),t.call("isString",y)&&y.includes("{{")&&(y=t.call("replaceLiteralsWithObjectFields",y));let k;n[y]&&(k=y),n[m]?k=m:n[b[0]+b[1]]?k=b[0]+b[1]:n[b[0]]?k=b[0]:i&&t.warn("Can't find icon:",g,k);let E=n[k],O=o&&o.src||u;!E&&!O&&(B1(r,p,m,t,z=>{if(!(d&&d._disposed)){if(!z)return a0(p,t);h()}})||a0(p,t));let $=s&&k,D=E||O||n.noIcon;if(!(t.spriteId===$&&t.src===D&&t.node&&t.node.innerHTML)&&(t.spriteId=$,t.src=D,typeof t.html=="function"&&t.node)){let I=t.context&&t.context.designSystem;I&&it(I);try{let z=t.html(t,t.state,t.context);z!=null&&typeof z!="function"&&(t.node.innerHTML=z)}finally{I&&tt()}}};d=Z(h,{depth:t.__ref&&t.__ref.path&&t.__ref.path.length||0}),t.__ref&&(t.__ref.__effects||(t.__ref.__effects=[]),t.__ref.__effects.push(d))},attr:{viewBox:"0 0 24 24","aria-hidden":t=>t.ariaLabel||t.role==="img"?null:"true",focusable:"false"}},f0={display:"flex",align:"center center",lineHeight:1,".reversed":{flow:"row-reverse"},".vertical":{flow:"column"},Icon:{if:t=>{let{parent:e}=t,r=typeof t.icon=="string"&&t.icon;return t.call("exec",r||e.icon||t.name||t.sfSymbols||e.sfSymbols,t)},icon:t=>t.call("exec",t.parent.icon,t.parent)},text:t=>t.text},u0={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var ly={};P(ly,{A:()=>g0,Link:()=>ay,RouteLink:()=>m0,RouterLink:()=>cy});var $a={};P($a,{default:()=>W1,getActiveRoute:()=>iy,lastLevel:()=>Ff,lastPathname:()=>Mf,matchRoute:()=>oy,parseQuery:()=>ny,parseRoutePattern:()=>ry,router:()=>Ge,runGuards:()=>sy});R();var p0=/^:(.+)/,h0=/^\*$/,d0=new Map,ry=t=>{let e=d0.get(t);if(e)return e;let r=t.replace(/^\//,"").split("/"),o=[],n=!1;for(let i=0;i<r.length;i++){let a=r[i].match(p0);a?o.push({index:i,name:a[1]}):h0.test(r[i])&&(n=!0)}let s={segments:r,params:o,hasWildcard:n,pattern:t};return d0.set(t,s),s},oy=(t,e,r=0)=>{let n=t.replace(/^\//,"").split("/").filter(Boolean).slice(r),s="/"+(n[0]||"");if(!e)return{key:null,content:null,params:{},routePath:s};let i=null,a=-1,c={};for(let l in e){if(l==="/*")continue;let f=ry(l),u=U1(n,f);u>a&&(a=u,i=l,c=V1(n,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},U1=(t,e)=>{let{segments:r,hasWildcard:o}=e;if(!o&&r.length!==t.length&&r.length!==1&&r.length>t.length)return-1;let n=0,s=Math.min(r.length,t.length);for(let i=0;i<s;i++)if(r[i]===t[i])n+=3;else if(p0.test(r[i]))n+=1;else if(h0.test(r[i]))n+=.5;else return-1;return n},V1=(t,e)=>{let r={};for(let{index:o,name:n}of e.params)t[o]&&(r[n]=decodeURIComponent(t[o]));return r},ny=t=>{if(!t||t==="?")return{};let e={};return new URLSearchParams(t).forEach((o,n)=>{e[n]!==void 0?(Array.isArray(e[n])||(e[n]=[e[n]]),e[n].push(o)):e[n]=o}),e},sy=async(t,e)=>{if(!t||!t.length)return!0;for(let r of t){let o=await r(e);if(o===!1)return!1;if(typeof o=="string")return o}return!0},iy=(t=0,e)=>{e||(e=typeof v<"u"?v.location.pathname:"/");let o=e.split("/")[t+1];if(o)return`/${o}`},Mf,Ff=0,H1=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,z1={level:Ff,pushState:!0,initialRender:!1,scrollToTop:!0,scrollToNode:!1,get scrollNode(){return typeof Q<"u"&&(Q.scrollingElement||Q.documentElement)||null},scrollBody:!1,useFragment:!1,updateState:!0,scrollToOffset:0,contentElementKey:"content",scrollToOptions:{behavior:"smooth"},useParamsMatching:!0},Ge=async(t,e,r={},o={})=>{let n=e||void 0,s=n?.context?.window||v,i=n?.context?.document||Q,a={...z1,...n.context.routerOptions,...o};Ff=a.lastLevel;let c=n.__ref;(a.contentElementKey!=="content"&&a.contentElementKey!==c.contentElementKey||!c.contentElementKey)&&(c.contentElementKey=a.contentElementKey||"content");let l=c.contentElementKey||a.contentElementKey||"content",f=s.location.origin!=="null"?s.location.origin:"http://localhost";t=H1(t);let u=typeof s.URL=="function"?s.URL:typeof globalThis<"u"&&globalThis.URL||URL,d=new u(f+t),{pathname:h,search:g,hash:p}=d,m=ny(g),b=n.node,_=p&&p!==s.location.hash.slice(1),y=h!==Mf;Mf=h;let x=c.__routerRendered,k,E,O,$;if(a.useParamsMatching){let V=oy(h,n.routes,a.level);k=V.key,E=V.routePath,O=V.content,$=V.params}else{k=iy(a.level,h),E=k;let V=n.routes;O=V?V[k||"/"]||V["/*"]:null,$={}}let D=a.scrollToNode?b:a.scrollNode;if(n.state?.root?.debugging){n.state.root.debugging=!1;return}if(!O){a.onNotFound?a.onNotFound({pathname:h,route:k,element:n}):a.silent||console.warn("[smbls/router] no content matched for path",h,"\u2014 available routes:",Object.keys(n.routes||{}));return}if(a.guards&&a.guards.length){let V={pathname:h,route:k,params:$,query:m,hash:p,element:n,state:r},rt=await sy(a.guards,V);if(rt===!1)return;if(typeof rt=="string")return Ge(rt,e,r,{...o,guards:[]})}if(a.pushState)try{s.history.pushState(r,null,h+(g||"")+(p||""))}catch{}if(y||!_){let V={route:k,routePath:E,hash:p,debugging:!1};Object.keys($).length&&(V.params=$),Object.keys(m).length&&(V.query=m),a.updateState&&n.state.update(V,{preventContentUpdate:!0})}let I=!x||x.content!==O||x.route!==k;if(y||I||a.force===!0){l&&a.removeOldElement&&n[l].remove();let V=n.__ref?.origin?.content,rt={};if(V)for(let G in V){let K=V[G];G==="__ref"||G==="props"||G==="node"||G==="parent"||G==="key"||(typeof K=="string"||typeof K=="number"||typeof K=="boolean"||typeof K=="object"&&K!==null&&!K.node&&!K.__ref)&&(rt[G]=K)}let at={...rt,...typeof O=="object"?O:{extends:O}};a.useFragment&&(at.tag="fragment");try{if(typeof n?.set!="function")return;n.set(at,{contentElementKey:l}),c.__routerRendered={content:O,route:k}}catch(G){console.error("[smbls/router] failed to render route content",h,G)}}if(a.scrollToTop&&D?.scrollTo&&D.scrollTo({...a.scrollToOptions||{},top:0,left:0}),a.scrollToNode&&O[l]?.node?.scrollTo&&O[l].node.scrollTo({...a.scrollToOptions||{},top:0,left:0}),p){let V=i.getElementById(p);if(V&&D?.scrollTo){let rt=V.getBoundingClientRect().top+b.scrollTop-(a.scrollToOffset||0);D.scrollTo({...a.scrollToOptions||{},top:rt,left:0})}}kr("routeChanged",n,a)},W1=Ge;var q1=(t,e,r)=>{let{context:o}=e,{href:n,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",n,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=o,d=e.__ref.root,h=a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")||a.startsWith("sketch:")||a.startsWith("whatsapp:")||a.startsWith("sms:")||a.startsWith("skype:")||a.startsWith("viber:")||a.startsWith("callto:")||a.startsWith("facetime:")||a.startsWith("facetime-audio:")||a.startsWith("geo:")||a.startsWith("maps:");if(a&&!h){t.preventDefault();try{let g=d;if(u&&u.customRouterElement){let p=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let b of p){if(!m||!m[b]){m=null;break}m=m[b]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||Ge)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}},ay={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:t=>Fr(t,t.href)||Fr(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:q1},g0={extends:"Link"},cy={onClick:(t,e,r)=>{let{context:o}=e,{href:n,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",n,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=o,d=e.__ref.root,h=a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")||a.startsWith("sketch:")||a.startsWith("whatsapp:")||a.startsWith("sms:")||a.startsWith("skype:")||a.startsWith("viber:")||a.startsWith("callto:")||a.startsWith("facetime:")||a.startsWith("facetime-audio:")||a.startsWith("geo:")||a.startsWith("maps:");if(a&&!h){t.preventDefault();try{let g=d;if(u&&u.customRouterElement){let p=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let b of p){if(!m||!m[b]){m=null;break}m=m[b]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||Ge)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}}},m0={extends:[ay,cy]};var fy={};P(fy,{Select:()=>y0});var y0={extends:"Focusable",tag:"select",fontSize:"A",border:"none",boxSizing:"border-box",theme:"field",cursor:"pointer",childProps:{tag:"option",attr:{value:t=>t.value,selected:t=>t.selected,disabled:t=>t.disabled}},attr:{name:t=>t.name,disabled:t=>t.disabled,value:t=>{if(!t.value)return;let e=t.call("exec",t.value,t);return t.call("isString",e)&&e.includes("{{")?t.call("replaceLiteralsWithObjectFields",e):e}}};var uy={};P(uy,{Button:()=>b0,ButtonSet:()=>S0,CircleButton:()=>x0,IconButton:()=>k0,KangorooButton:()=>w0,SquareButton:()=>_0});var b0={extends:["IconText","FocusableComponent"],tag:"button",minHeight:"controlH",fontSize:"Z2",type:"button",borderStyle:"none",display:"inline-flex",align:"center center",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",padding:"0 A",fontWeight:"700",fontFamily:"inherit",round:"radiusPill",disabled:t=>t.call("exec",t.disabled)},_0={extends:"Button",fontSize:"A",width:"A",minHeight:"auto",padding:"Z",aspectRatio:"1 / 1",boxSize:"fit-content fit-content",justifyContent:"center",round:"Z2",boxSizing:"content-box"},x0={extends:"SquareButton",round:"C"},w0={extends:"Button",childExtends:"IconText"},S0={tag:"nav",display:"flex",childExtends:"SquareButton"},k0={extends:["SquareButton","ClickableItem"],round:"Z"};var dy={};P(dy,{Dialog:()=>v0,DialogFooter:()=>E0,DialogHeader:()=>C0});var v0={display:"flex",tag:"dialog",flow:"column",border:"0",theme:"dialog",round:"Z2"},C0={extends:"Hgroup",minWidth:"100%",gap:"A",Title:{align:"center space-between",Text:{text:"Title"},SquareButton:{icon:"x",theme:"transparent"}},Paragraph:{color:"caption"}},E0={display:"flex",align:"center flex-end",gap:"X2",margin:"auto - -",padding:"Y2 X2",childExtends:{extends:"Button",textTransform:"uppercase",background:"transparent","@dark":{theme:"primary @dark .color-only"},"@light":{theme:"primary @light .color-only"},"&":{padding:"Z A"},":hover":{theme:"tertiary"},":active":{background:"white.1"}},Cancel:{text:"cancel"},Ok:{text:"ok"}};var py={};P(py,{Tooltip:()=>A0,TooltipHidden:()=>T0,TooltipParent:()=>O0});R();var A0={display:"flex",theme:"dialog",background:"black",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>bt(t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"gray12",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"gray6",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},T0={extends:"Tooltip",position:"absolute",pointerEvents:"none",opacity:"0",visibility:"hidden",transition:"C defaultBezier opacity, C defaultBezier visibility, B defaultBezier transform",onInit:t=>{let e=!t.shapeDirection||t.shapeDirection==="top"?{top:"112%",left:"50%",transform:"translate3d(-50%,10%,0)",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="right"?{transform:"translate3d(10%,-50%,0)",left:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="bottom"?{transform:"translate3d(-50%,-10%,0)",bottom:"112%",left:"50%",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="left"?{transform:"translate3d(10%,-50%,0)",right:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:{};Object.assign(t,e)}},O0={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:r}=t,o=e||r;if(!o)return;let n=o&&o[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":n||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var hy={};P(hy,{Avatar:()=>R0});var K1=t=>{let r=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="32" fill="#71718A"/><text x="32" y="42" font-family="system-ui,sans-serif" font-size="28" font-weight="700" text-anchor="middle" fill="#fff">${String(t||"").trim().charAt(0).toUpperCase()||"?"}</text></svg>`;return"data:image/svg+xml;utf8,"+encodeURIComponent(r)},R0={extends:"Img",display:"block",avatarType:"adventurer-neutral",borderRadius:"100%",boxSize:"C+X C+X",src:t=>`https://api.dicebear.com/7.x/${t.avatarType||"initials"}/svg?seed=${t.key||"no-avatar"}`,onError:(t,e)=>{if(!e.node||e.node.__avatarFallbackApplied)return;e.node.__avatarFallbackApplied=!0;let r=e.node.getAttribute("alt")||(e.key!=="no-avatar"?e.key:"");e.node.src=K1(r)},attr:{alt:t=>t.alt!=null?t.alt:t.text?t.call("exec",t.text,t):t.key&&t.key!=="no-avatar"?t.key:""}};var gy={};P(gy,{Range:()=>P0});var P0={tag:"input",appearance:"none",width:"100%",height:"2px",outline:"none",flex:1,onInput:(t,e,r)=>{e.call("isFunction",e.onInput)?e.onInput(t,e,r):r.update({value:parseFloat(e.node.value)})},onChange:(t,e,r)=>{e.call("isFunction",e.onChange)?e.onChange(t,e,r):r.update({value:parseFloat(e.node.value)})},"::-webkit-slider-thumb":{boxSizing:"content-box",width:"8px",height:"8px",borderWidth:"2px",borderStyle:"solid",borderRadius:"100%",opacity:".8",appearance:"none"},"::-webkit-slider-runnable-track":{},"@dark":{background:"white.2","::-webkit-slider-thumb":{background:"#232526",borderColor:pn("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:pn("#fff",.35)}},":focus":{"::-webkit-slider-thumb":{borderColor:"#3C6AC0"}}},"@light":{background:"gray9","::-webkit-slider-thumb":{background:"white",borderColor:"gray9"},":hover":{"::-webkit-slider-thumb":{borderColor:"gray7"}},":focus":{"::-webkit-slider-thumb":{borderColor:"blue"}}},deps:{returnPropertyValue:(t,e,r)=>{let o=t.call("exec",t[e],t);return(t.call("isFunction",o)?o(t,t.state):o!==void 0?o:r!==void 0?r:0)+""}},attr:{type:"range",value:(t,e)=>t.call("exec",e.value||t.value||t.defaultValue,t),min:(t,e)=>t.deps.returnPropertyValue(t,"min",0),max:(t,e)=>t.deps.returnPropertyValue(t,"max",100),step:(t,e)=>t.deps.returnPropertyValue(t,"step",1)}};var my={};P(my,{Dropdown:()=>I0,DropdownList:()=>D0,DropdownParent:()=>$0,DropdownParentFocus:()=>L0,DropdownSiblingFocus:()=>M0});var I0={attr:{dropdown:!0},position:"absolute",top:"100%",left:"0",zIndex:1e3,theme:"quaternary",padding:"Y",round:"Z2",flow:"column",gap:"X",transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},D0={display:"flex",attr:{dropdown:!0},padding:"0 Y",maxHeight:"G",flow:"column",theme:"quaternary",overflow:"hidden auto",style:{listStyleType:"none"},transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",children:t=>t.options||[],childrenAs:"props",".hidden":{transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},childExtends:{extends:"Button",state:{},isActive:({key:t,state:e})=>e.active===t,position:"relative",round:"0",align:"center flex-end",flow:"row-reverse",padding:"Z2 C Z2 Y2",margin:"0",gap:"Y2",theme:"quaternary .child",":hover":{style:{svg:{opacity:"0.5"}}},Icon:{isActive:({key:t,state:e})=>e.active===t,name:"checkmark",opacity:"0.1",".active":{opacity:"1"}},":not(:first-child)":{"@dark":{border:"solid gray4.65"},"@light":{border:"solid gray11"},borderWidth:"1px 0 0"}}},$0={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},L0={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}},Dropdown:{onClick:()=>{document.activeElement?.blur()}}},M0={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& ~ [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}}};var yy={};P(yy,{Notification:()=>F0});var F0={display:"flex",theme:"alert",padding:"Z1 B Z A",round:"A A A Y2",gap:"X2",cursor:"pointer",align:"flex-start center",IconText:{Icon:{name:"info outline"},Text:{":empty":{hide:!0}}},Hgroup:{extends:["Flex","Hgroup"],flow:"y",align:"flex-start",gap:"X2",H:{tag:"h6",margin:"0",fontWeight:"600",lineHeight:"1em",text:"Notification",":empty":{hide:!0}},P:{fontSize:"Z",margin:"0",text:"is not always a distraction",":empty":{hide:!0}}}};var Co=Object.assign({},Dm,$m,Lm,Mm,Fm,Um,Vm,Hm,jm,zm,Wm,Bm,qm,Km,Gm,Ym,Xm,Jm,Zm,Qm,ty,ey,ly,fy,uy,dy,py,hy,gy,my,yy);function Nf(t){if(t==null)return 0;if(typeof t!="object")return N0(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let o=0;o<t.length;o++)e=(e^Nf(t[o]))*16777619;return e>>>0}let r=Object.keys(t).sort();for(let o=0;o<r.length;o++)e=(e^N0(r[o]))*16777619,e=(e^Nf(t[r[o]]))*16777619;return e>>>0}function N0(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e}function jf(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!=typeof e||typeof t!="object")return!1;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!jf(t[n],e[n]))return!1;return!0}let r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(let n=0;n<r.length;n++){let s=r[n];if(!Object.prototype.hasOwnProperty.call(e,s)||!jf(t[s],e[s]))return!1}return!0}function by(t,e){if(e===void 0)return t;if(t===void 0)return e;if(e===null)return null;if(typeof e!="object"||Array.isArray(e))return e;if(typeof t!="object"||Array.isArray(t))return{...e};let r=!1,o={};for(let n in t)if(n in e){let s=by(t[n],e[n]);o[n]=s,s!==t[n]&&(r=!0)}else o[n]=t[n];for(let n in e)n in t||(o[n]=e[n],r=!0);return r?o:t}function _y(t,e,r){if(!e||typeof e!="object")return t;if(!t||typeof t!="object")return e;if(r||(r=new WeakSet),r.has(e))return t;r.add(e);for(let o in e){let n=e[o];n&&typeof n=="object"&&!Array.isArray(n)&&t[o]&&typeof t[o]=="object"&&!Array.isArray(t[o])?_y(t[o],n,r):t[o]=n}return t}function Vr(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e.toString(36)}function qn(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function La(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Vr(e)}function j0(t){return t.split(`
83
83
  `).map(Vr).join(`
84
- `)}var F0={display:"d",position:"pos",padding:"p",paddingTop:"pt",paddingRight:"pr",paddingBottom:"pb",paddingLeft:"pl",paddingBlock:"pbl",paddingInline:"pin",margin:"m",marginTop:"mt",marginRight:"mr",marginBottom:"mb",marginLeft:"ml",marginBlock:"mbl",marginInline:"min",width:"w",height:"h",minWidth:"mnw",minHeight:"mnh",maxWidth:"mxw",maxHeight:"mxh",top:"t",right:"r",bottom:"b",left:"l",flex:"fx",flexDirection:"fxd",flexWrap:"fxw",flexGrow:"fxg",flexShrink:"fxs",flexBasis:"fxb",justifyContent:"jc",alignItems:"ai",alignSelf:"as",alignContent:"ac",gap:"g",rowGap:"rg",columnGap:"cg",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",gridColumn:"gc",gridRow:"gr",overflow:"of",overflowX:"ofx",overflowY:"ofy",fontSize:"fs",fontWeight:"fw",fontFamily:"ff",fontStyle:"fst",lineHeight:"lh",letterSpacing:"ls",textAlign:"ta",textDecoration:"td",textTransform:"tt",color:"c",background:"bg",backgroundColor:"bgc",backgroundImage:"bgi",border:"bd",borderRadius:"br",borderColor:"bdc",borderWidth:"bdw",borderStyle:"bds",boxShadow:"bxsh",opacity:"op",zIndex:"z",cursor:"cur",transition:"tr",transform:"tf",animation:"an",visibility:"vis",whiteSpace:"ws",wordBreak:"wb",objectFit:"obj",pointerEvents:"pe",userSelect:"us",boxSizing:"bxz",outline:"ol",listStyle:"lis",textOverflow:"txo",verticalAlign:"va",float:"fl",clear:"cl",content:"cnt",backdropFilter:"bdf",filter:"flt",resize:"rsz",appearance:"apr",fill:"fil",stroke:"stk",scrollBehavior:"sb",inset:"ins"};function N0(t,e){let r=F0[t]||Vr(t),o=$a(e),n=`_${r}-${o}`,s=Wn(t),i=Y1[s],a=i?`${s}: ${e};${i}: ${e}`:`${s}: ${e}`,c=`.${n}{${a}}`;return`${n}
85
- ${c}`}var Y1={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select"},X1="@media (hover: hover)",J1=/(?:^|[^\\]):hover(?![\w-])/,j0=t=>typeof t=="string"&&(t.indexOf("{")!==-1||t.indexOf("}")!==-1);function B0(t){let e=t.split("\0"),r=[],o=[];for(let n=0;n+1<e.length;n+=2){let s=e[n],i=e[n+1];if(!i||j0(i))continue;let a=F0[s]||Vr(s),c=$a(i),l=`_${a}-${c}`,f=Wn(s);r.push(l),o.push(`.${l}{${f}:${i}}`)}return r.join(" ")+"\0"+o.join(`
86
- `)}function U0(t,e,r){let o=t+e,n=`_c${Vr(o)}`,s=e.split("\0"),i="";for(let l=0;l+1<s.length;l+=2){let f=s[l],u=s[l+1];u&&(j0(u)||(i+=`${Wn(f)}:${u};`))}let a,c;if(t.startsWith("@media"))c=`.${n}`,a=`${t}{${c}{${i}}}`;else if(t.startsWith(":")||t.startsWith("&")){let l=t.startsWith("&")?t.slice(1):t;c=`.${n}${l}`,a=`${c}{${i}}`}else t.includes("&")?(c=t.replace("&",`.${n}`),a=`${c}{${i}}`):(c=`.${n} ${t}`,a=`${c}{${i}}`);return r!==!1&&J1.test(c)&&(a=`${X1}{${a}}`),`${n}
87
- ${a}`}var yy=null;function jf(t){yy=t}var Pe={structuralHash:Mf,deepEqual:Ff,mergeStructural:gy,overwriteDeep:my,shortHash:Vr,toKebab:Wn,sanitizeValue:$a,batchShortHash:M0,atomicCssClass:N0,batchAtomicCss:B0,compoundCssClass:U0},V0=!1,Nf=null;function z0(t){return Nf||(Nf=import(t||"@symbo.ls/wasm/pkg").then(e=>(e.structuralHash&&(Pe.structuralHash=e.structuralHash),e.deepEqual&&(Pe.deepEqual=e.deepEqual),e.mergeStructural&&(Pe.mergeStructural=e.mergeStructural),e.overwriteDeep&&(Pe.overwriteDeep=e.overwriteDeep),e.shortHash&&(Pe.shortHash=e.shortHash),e.toKebab&&(Pe.toKebab=e.toKebab),e.sanitizeValue&&(Pe.sanitizeValue=e.sanitizeValue),e.batchShortHash&&(Pe.batchShortHash=e.batchShortHash),e.atomicCssClass&&(Pe.atomicCssClass=e.atomicCssClass),e.batchAtomicCss&&(Pe.batchAtomicCss=e.batchAtomicCss),e.compoundCssClass&&(Pe.compoundCssClass=e.compoundCssClass),V0=!0,yy&&e.batchAtomicCss&&yy({batchAtomicCss:e.batchAtomicCss,compoundCssClass:e.compoundCssClass}),!0)).catch(e=>(console.debug("[smbls] WASM not available, using JS fallbacks:",e.message),!1)),Nf)}function H0(){return V0}R();var La={};P(La,{CDN_PROVIDERS:()=>ue,DOMQL_EVENTS:()=>jd,DOMQ_PROPERTIES:()=>_r,ENV:()=>ep,HTML_TAGS:()=>Xo,METHODS:()=>Wo,METHODS_EXL:()=>Ps,NODE_ENV:()=>ve,OPTIONS:()=>ri,PACKAGE_MANAGER_TO_CDN:()=>Ar,PARSED_DOMQ_PROPERTIES:()=>Rs,PROPS_METHODS:()=>xr,STATE_METHODS:()=>ro,STATE_PROPERTIES:()=>Nd,SVG_TAGS:()=>c_,TYPES:()=>ks,UNIVERSAL_RESERVED_KEYS:()=>bl,addCaching:()=>tl,addContext:()=>Qc,addExtend:()=>Ep,addExtends:()=>Kt,addItemAfterEveryElement:()=>Cd,addProtoToArray:()=>Es,addRef:()=>Xc,applyCSS:()=>_y,applyDependentState:()=>Wp,applyEvent:()=>il,applyEventUpdate:()=>al,applyExtends:()=>u_,applyProps:()=>Ys,arrayContainsOtherArray:()=>bd,arraysEqual:()=>Ad,arrayzeValue:()=>fo,buildImgSrcset:()=>Li,buildSourcesAndImg:()=>Mi,cache:()=>Xp,call:()=>ph,captureSnapshot:()=>gh,checkForStateTypes:()=>Up,checkIfInherits:()=>sl,checkIfStringIsInArray:()=>Rd,clone:()=>Ud,cloneAndMergeArrayExtend:()=>Us,cloneFunction:()=>fp,concatAddExtends:()=>kp,copyJavaScriptToClipboard:()=>Lh,copyStringToClipboard:()=>$h,createBasedOnType:()=>Yc,createElement:()=>Bp,createElementExtends:()=>Fc,createExtends:()=>zs,createExtendsFromKeys:()=>Jo,createExtendsStack:()=>Uc,createIfConditionFlag:()=>up,createInheritedState:()=>Vp,createKey:()=>js,createNestedObject:()=>Gd,createNestedObjectByKeyPath:()=>Hp,createObjectWithoutPrototype:()=>Rc,createParent:()=>Jc,createPath:()=>Zc,createProps:()=>Xs,createPropsStack:()=>Kc,createRoot:()=>jp,createScope:()=>Kp,createSnapshotId:()=>Ns,customDecodeURIComponent:()=>Fd,customEncodeURIComponent:()=>Md,cutArrayAfterValue:()=>kd,cutArrayBeforeValue:()=>Sd,debounce:()=>Bs,debounceOnContext:()=>ap,decodeNewlines:()=>Ld,deepClone:()=>ft,deepContains:()=>qd,deepDefaults:()=>Oi,deepDestringifyFunctions:()=>le,deepExtend:()=>Mc,deepMerge:()=>st,deepMergeExtends:()=>je,deepStringifyFunctions:()=>Ds,defineSetter:()=>uh,destringifyGlobalScope:()=>Ls,detectHeightOnInit:()=>xh,detectInfiniteLoop:()=>Zd,document:()=>Q,encodeNewlines:()=>$d,error:()=>co,excludeKeysFromObject:()=>tp,exec:()=>ut,extendCachedRegistry:()=>vp,extendStackRegistry:()=>Hs,extractArrayExtend:()=>qs,fetchLibraryData:()=>kl,fibonacciNumberByIndex:()=>wh,filterArrays:()=>Td,filterArraysFast:()=>Od,finalizeExtends:()=>Vc,findClosestNumber:()=>Sl,findClosestNumberInFactory:()=>Ph,findInheritedState:()=>nl,findKeyPosition:()=>Id,flattenExtend:()=>Zo,formatDate:()=>_h,generateHash:()=>Dc,generateHeadArrayTags:()=>wl,generateKey:()=>Fs,generateMetaTags:()=>Oh,get:()=>ch,getActiveRoute:()=>oy,getCDNDirUrl:()=>_l,getCDNUrl:()=>Ee,getCapitalCaseKeys:()=>Op,getCdnProviderFromConfig:()=>on,getChildStateInKey:()=>ol,getChildren:()=>pi,getContext:()=>xi,getCookie:()=>mp,getDB:()=>Ci,getEmotionStylesheet:()=>jh,getExtendsInElement:()=>Ap,getExtendsStack:()=>Vs,getExtendsStackRegistry:()=>Lc,getFrequencyInArray:()=>_d,getHashedExtend:()=>Ws,getImportMapScript:()=>bh,getInObjectByPath:()=>Jd,getLocalStorage:()=>bp,getNev:()=>sp,getPageMetadata:()=>Rh,getParentStateInKey:()=>rl,getPath:()=>hi,getQuery:()=>Ei,getRef:()=>fh,getRoot:()=>yi,getRootContext:()=>_i,getRootData:()=>bi,getRootState:()=>mi,getRootStateInKey:()=>el,getSpreadChildren:()=>Rp,global:()=>gd,hasFunction:()=>Ne,hasHandlerPlugin:()=>Ko,hasOwnProperty:()=>zd,hashContent:()=>cn,inheritChildExtends:()=>jc,inheritChildPropsExtends:()=>Nc,inheritParentProps:()=>Js,inheritRecursiveChildExtends:()=>Bc,init:()=>ur,initProps:()=>Mp,is:()=>Wt,isArray:()=>T,isBoolean:()=>Cc,isContextComponent:()=>Pp,isCyclic:()=>Qd,isDOMNode:()=>Ht,isDate:()=>Ac,isDefined:()=>bt,isDevelopment:()=>Sr,isEmpty:()=>Tc,isEmptyObject:()=>Hd,isEqualDeep:()=>Oc,isFunction:()=>A,isHtmlElement:()=>ws,isLocal:()=>np,isLoudDevRuntime:()=>Pt,isMalformedDependency:()=>nn,isMethod:()=>hh,isMobile:()=>hp,isNode:()=>Qe,isNot:()=>yd,isNotProduction:()=>so,isNull:()=>Ec,isNumber:()=>Fe,isObject:()=>S,isObjectLike:()=>z,isPhoto:()=>Sh,isPolyglotWritableKey:()=>er,isProduction:()=>wr,isStaging:()=>op,isState:()=>zp,isString:()=>w,isStringFunction:()=>lp,isTest:()=>Ic,isTesting:()=>rp,isUndefined:()=>Tt,isUniversallyReservedKey:()=>mh,isUnresolvableDependency:()=>lo,isValidDependencyMap:()=>sn,isValidHtmlTag:()=>xp,isWrappedLibrary:()=>Pi,joinArrays:()=>Vo,jointStacks:()=>Cp,keys:()=>ml,lastLevel:()=>Lf,lastPathname:()=>$f,loadCssFile:()=>Eh,loadJavascript:()=>Ah,loadJavascriptFile:()=>kh,loadJavascriptFileEmbedSync:()=>Ch,loadJavascriptFileSync:()=>vh,loadRemoteCSS:()=>Th,loadRemoteScript:()=>an,log:()=>dh,logGroupIf:()=>pp,logIf:()=>dp,lookdown:()=>ih,lookdownAll:()=>ah,lookup:()=>sh,lowercaseFirstLetter:()=>eo,makeObjectWithoutPrototype:()=>Wd,map:()=>Bd,mapStringsWithContextComponents:()=>Ks,markPolyglotSeeded:()=>Ue,matchRoute:()=>ty,matchesComponentNaming:()=>Be,memoize:()=>cp,merge:()=>gt,mergeSharedLibraries:()=>Ii,nextElement:()=>Si,normalizeIgnoreList:()=>Ri,normalizeLibraryKey:()=>ln,objectToString:()=>$s,objectizeStringProperty:()=>Gs,overwrite:()=>Ms,overwriteDeep:()=>qt,overwriteShallow:()=>no,overwriteState:()=>qp,parse:()=>yl,parseDeep:()=>ui,parseQuery:()=>ey,parseRoutePattern:()=>Qm,pickupElementFromProps:()=>Wc,pickupPropsFromElement:()=>Hc,polyglotSeededKeys:()=>ei,previousElement:()=>ki,propExists:()=>$p,propertizeElement:()=>qc,propertizeUpdate:()=>Dp,reinit:()=>by,remove:()=>N_,removeChars:()=>Mh,removeCookie:()=>yp,removeDuplicateProps:()=>Qs,removeDuplicatesInArray:()=>zo,removeFromArray:()=>xd,removeFromObject:()=>Kd,removeNestedKeyByPath:()=>Yd,removeValueFromArray:()=>Cs,removeValueFromArrayAll:()=>vd,reorderArrayByValues:()=>Ed,replaceLiteralsWithObjectFields:()=>to,replaceOctalEscapeSequences:()=>Dd,resolveAsset:()=>Gt,resolveHandler:()=>Go,resolveSharedLibraries:()=>Dh,returnValueAsText:()=>Gc,router:()=>Ge,runGuards:()=>ry,runPluginHook:()=>At,scratchSystem:()=>kn,scratchUtils:()=>Rr,self:()=>md,set:()=>wo,setActiveRootState:()=>gi,setCookie:()=>gp,setHashedExtend:()=>$c,setInObjectByPath:()=>Xd,setLocalStorage:()=>_p,setNodeStyles:()=>gl,setProps:()=>lh,setPropsPrototype:()=>Zs,sharedLibrary:()=>Ih,splitPackageSpecifier:()=>Ai,spotByPath:()=>di,srcsetFor:()=>fn,stringIncludesAny:()=>Ts,stringToObject:()=>Vd,stripVersionRangePrefix:()=>Ti,swapItemsInArray:()=>wd,syncProps:()=>ti,toCamelCase:()=>Di,toDashCase:()=>$i,toDescriptionCase:()=>Nh,toTitleCase:()=>Fh,toggleFullscreen:()=>yh,triggerEventOn:()=>kr,triggerEventOnUpdate:()=>Gp,trimStringFromSymbols:()=>Pd,unstackArrayOfObjects:()=>vs,update:()=>Lp,updateProps:()=>Fp,variables:()=>vi,verbose:()=>tn,warn:()=>wi,window:()=>v});R();R();var Q1=C(),W0=(t=Q1,e)=>{let r=S(e.localFile)?e.localFile:{},o=ft(r.designSystem||{});return st(t,o,ee)},tO={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},qn=(t,e)=>{let r=!e||e===":root",o={};for(let n in t)if(n.startsWith("@media")){let s=r?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`;o[n]={[s]:t[n]}}else r?o[n]=t[n]:o[`${e}${n}, ${n} ${e}`]=t[n];return o},ur=(t,e=tO)=>{let r=W0(t||{},e),o=e.scopeSelector||":root",n=e.globalTheme;if(typeof window<"u"&&window.location){let p=new URLSearchParams(window.location.search).get("globalTheme");p&&(n=p)}let s=wo({verbose:e.verbose,useReset:e.useReset,useFontImport:e.useFontImport,useVariable:e.useVariable,useSvgSprite:e.useSvgSprite,useDocumentTheme:e.useDocumentTheme,useIconSprite:e.useIconSprite,useDefaultConfig:e.useDefaultConfig,globalTheme:n,themeRoot:e.themeRoot,files:e.files,assets:e.assets,...r},{newConfig:e.newConfig,config:e.config});s&&(s.scopeSelector=o);let i=Ui(s.font,s.files),a=s.useReset,c=s.useVariable,l=s.useFontImport,f=s.useSvgSprite,u=t.svg,d=s.useIconSprite,h=t.icons;l&&kt(i),c&&(kt({[o]:s.CSS_VARS}),s.CSS_MEDIA_VARS&&kt(qn(s.CSS_MEDIA_VARS,o))),a&&kt(s.reset);let g=s.animation;if(g){let p={};for(let m in g)p[`@keyframes ${m}`]=g[m];kt(p)}return(u||f)&&ga(s.svg,{document:e.document}),(h||d)&&xo(s.icons,{document:e.document}),s},Bf={},by=(t,e=Bf)=>{let r=W0(t||{},e),o=e.scopeSelector||":root",n=wo({verbose:!1,...r});return e.preventInject||(kt({[o]:n.CSS_VARS}),n.CSS_MEDIA_VARS&&kt(qn(n.CSS_MEDIA_VARS,o)),kt(n.reset)),n},_y=(t,e=Bf)=>{kt(t)},eO=(t,e=Bf)=>{let r=e.scopeSelector||":root";kt({[r]:t.CSS_VARS}),t.CSS_MEDIA_VARS&&kt(qn(t.CSS_MEDIA_VARS,r))};var rO=(t,e=Bf)=>{};R();var q0=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,oO=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},xy={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},Ma=(t,e)=>{if(!e)return t;let r=Array.isArray(e)?e:e.split("."),o=t;for(let n of r){if(!o||!o[n])return null;o=o[n]}return o},K0=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=xy:e.router=gt(e.router||{},xy);let r=e.router,o=async(s,i)=>{let a=s.context?.window||v,c=oO(r);if(!c){if(!a.location)return;let{pathname:f,search:u,hash:d}=a.location;f=q0(f),c=f+u+d}let l=s;if(r.customRouterElement){let f=Ma(s,r.customRouterElement);f&&(l=f,s.routes&&(l.routes=s.routes))}l.routes&&await Ge(c,l,{},{initialRender:!0,pushState:!1})},n=!Tt(t.onRenderRouter);return r&&r.initRouter&&!n&&(t.onRenderRouter=o),nO(e,r),r},wy=(t,e)=>{if(e.router===!1)return;let r=e.router||xy;if(!r.popState)return;let o=e.utils&&e.utils.router?e.utils.router:Ge,n=e.window||v,s=async i=>{let{pathname:a,search:c,hash:l}=n.location;a=q0(a);let f=a+c+l,u=t;if(r.customRouterElement){let d=Ma(t,r.customRouterElement);d&&(u=d,t.routes&&(u.routes=t.routes))}await u.call("router",f,u,{},{pushState:!1,scrollToTop:!1,level:0,event:i})};n.addEventListener("popstate",s),e.__teardowns=e.__teardowns||[],e.__teardowns.push(()=>n.removeEventListener("popstate",s))},nO=(t,e)=>{let{components:r}=t;if(e&&e.injectRouterInLinkComponent)return st(r.Link||r["smbls.Link"],r.RouterLink||r["smbls.RouterLink"])};R();var Sy=v&&v.location?v.location.host.includes("dev."):Sr(),G0=Sy?"http://localhost:8080/get":"https://api.symbols.app/get",sO={endpoint:G0},Y0=async(t,e=sO)=>{let r=e.endpoint||G0,o=e.serviceRoute?T(e.serviceRoute)?e.serviceRoute.map(s=>s.toLowerCase()+"=true").join("&"):e.serviceRoute:"",n;try{return n=await globalThis.fetch(r+"/?"+o,{method:"GET",headers:{"Content-Type":"application/json","X-AppKey":t,"X-Metadata":e.metadata}}),await n.json()}catch(s){if(A(e.onError))return e.onError(s);console.error(s)}},iO=async(t,e)=>{let{editor:r}=e;if(r&&r.remote){let o=await Y0(t,r),n=Sy||e.isDevelopment?le(o):le(o.releases[0]);r.serviceRoute?T(r.serviceRoute)?r.serviceRoute.forEach(s=>{qt(e[s],n[s.toLowerCase()])}):qt(e[r.serviceRoute],n):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{qt(e[s],n[s.toLowerCase()])})}return e},aO=async(t,e,r)=>{let{editor:o}=e;if(o&&o.remote){let n=await Y0(t,o),s=Sy||e.isDevelopment?le(n):le(n.releases[0]);r(s)}},X0=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await iO(t,e)}catch(r){console.error(r)}},J0=(t,e,r,o)=>{if(e&&r.editor)try{r.editor.async&&aO(e,r,o||(n=>{let s=n.designSystem;S(s)&&r.utils.init(s),S(n.state)&&t.state.set(n.state)}))}catch(n){console.error(n)}};var Fa=t=>{if(!t||t.__destroyed)return!1;let e=t.context;if(!e)return t.__destroyed=!0,!1;if(Array.isArray(e.__teardowns)){for(let r of e.__teardowns)try{r()}catch(o){console.error("[smbls] destroy teardown error:",o)}e.__teardowns.length=0}try{Br(t)}catch(r){console.error("[smbls] dispose error:",r)}if(e.fetch&&e.fetch.__resolved&&delete e.fetch.__resolved,e.fetch&&e.fetch.__resolving&&delete e.fetch.__resolving,e.db&&e.db.__resolved&&delete e.db.__resolved,e.db&&e.db.__resolving&&delete e.db.__resolving,e.analyze?.destroy)try{e.analyze.destroy()}catch(r){console.error("[analyze] destroy error:",r)}return t.__destroyed=!0,!0};var Cy={};P(Cy,{Helmet:()=>tk,applyMetadata:()=>Kn,default:()=>pO,extractMetadata:()=>fO,generateHeadHtml:()=>dO,helmetPlugin:()=>vy,resolveMetadata:()=>zr});R();var cO={title:{tag:"title"},description:{tag:"meta",attr:"name",key:"description"},keywords:{tag:"meta",attr:"name",key:"keywords"},robots:{tag:"meta",attr:"name",key:"robots"},author:{tag:"meta",attr:"name",key:"author"},canonical:{tag:"link",attr:"rel",key:"canonical",valueAttr:"href"},image:{tag:"meta",attr:"property",key:"og:image"},url:{tag:"meta",attr:"property",key:"og:url"},siteName:{tag:"meta",attr:"property",key:"og:site_name"},type:{tag:"meta",attr:"property",key:"og:type"},locale:{tag:"meta",attr:"property",key:"og:locale"},"og:title":{tag:"meta",attr:"property",key:"og:title"},"og:description":{tag:"meta",attr:"property",key:"og:description"},"og:image":{tag:"meta",attr:"property",key:"og:image"},"og:url":{tag:"meta",attr:"property",key:"og:url"},"og:type":{tag:"meta",attr:"property",key:"og:type"},"og:site_name":{tag:"meta",attr:"property",key:"og:site_name"},"og:locale":{tag:"meta",attr:"property",key:"og:locale"},"twitter:card":{tag:"meta",attr:"name",key:"twitter:card"},"twitter:title":{tag:"meta",attr:"name",key:"twitter:title"},"twitter:description":{tag:"meta",attr:"name",key:"twitter:description"},"twitter:image":{tag:"meta",attr:"name",key:"twitter:image"},"twitter:site":{tag:"meta",attr:"name",key:"twitter:site"},"theme-color":{tag:"meta",attr:"name",key:"theme-color"}},lO=t=>{if(t.tag==="link")return`link[${t.attr}="${t.key}"]`;if(t.tag&&!t.attr&&!t.key)return t.tag;if(t.tag&&t.attr&&t.key)return`${t.tag}[${t.attr}="${t.key}"]`},Z0=t=>le({v:t}).v,Q0=(t,e,r,o)=>{try{return ut(t,e,r)}catch(n){console.warn(`[helmet] metadata factory for "${o}" threw; treating as unset:`,n&&n.message||n);return}},zr=(t,e,r)=>{if(!t)return{};let o=t;w(o)&&Ne(o)&&(o=Z0(o));let n=A(o)?Q0(o,e,r,"metadata"):S(o)?{...o}:{};if(!S(n))return{};for(let s in n){let i=n[s];w(i)&&Ne(i)&&(i=Z0(i)),A(i)?i=Q0(i,e,r,s):w(i)&&Ne(i)&&(i=void 0),w(i)&&i.includes("{{")&&e?.call&&(i=e.call("replaceLiteralsWithObjectFields",i,r)),n[s]=i}return n},fO=(t,e="/",r,o)=>{let s=(t.pages||{})[e],i={};if(t.integrations?.seo&&(i={...t.integrations.seo}),t.app?.metadata){let c=zr(t.app.metadata,r,o);i={...i,...c}}let a=new Set;if(s){let c=s.metadata||s.helmet||{},l=zr(c,r,o);for(let f in l)a.add(f);i={...i,...l},!i.title&&s.state?.title&&(i.title=s.state.title,a.add("title")),!i.description&&s.state?.description&&(i.description=s.state.description,a.add("description"))}if(i.title||(i.title=t.name||"Symbols"),i.title&&(a.has("title")||!i["og:title"])&&(a.has("og:title")||(i["og:title"]=i.title)),i.description&&(a.has("description")||!i["og:description"])&&(a.has("og:description")||(i["og:description"]=i.description)),i.title&&!i["twitter:title"]&&(i["twitter:title"]=i.title),i.description&&!i["twitter:description"]&&(i["twitter:description"]=i.description),i["og:url"]||i.url){let c=(i["og:url"]||i.url||"").replace(/\/$/,"");if(c&&e&&e!=="/"){let l=e.startsWith("/")?e:"/"+e;i["og:url"]=c+l}}if(t.files)for(let c in i){let l=i[c];if(typeof l=="string"&&l.length>0&&!l.startsWith("/")&&!l.startsWith("http")){let f=t.files[l];f?.src&&(i[c]=f.src)}}return i},uO=(t,e)=>{let r=e.createElement(t.tag);return t.attr&&r.setAttribute(t.attr,t.key),(e.head||e.querySelector("head")).appendChild(r),r},Na=t=>{let e=5381,r=String(t);for(let o=0;o<r.length;o++)e=(e*33^r.charCodeAt(o))>>>0;return e.toString(36)},ky=(t,e,r,o)=>{let n=t.head||t.querySelector("head");if(!n)return;let s=new Map;for(let a of n.querySelectorAll(`[${e}]`))s.set(a.getAttribute(e),a);let i=new Set;for(let a of r)i.add(a);for(let[a,c]of s)i.has(a)||c.remove();for(let a of r){if(s.has(a))continue;let c=o(a);c&&(c.setAttribute(e,a),n.appendChild(c))}},Kn=(t,e)=>{if(!(!S(t)||!e)){for(let r in t){let o=t[r];if(o==null||r==="jsonLd"||r==="styles"||r==="scripts")continue;let n=cO[r];if(!n)continue;let s=lO(n),i=e.querySelector(s)||uO(n,e);i&&(r==="title"?i.textContent=o:n.valueAttr?i.setAttribute(n.valueAttr,o):i.setAttribute("content",o))}if(Array.isArray(t.jsonLd)){let o=t.jsonLd.filter(s=>s!=null).map(s=>w(s)?s:JSON.stringify(s)),n=o.map(Na);ky(e,"data-smbls-jsonld",n,s=>{let i=n.indexOf(s),a=e.createElement("script");return a.setAttribute("type","application/ld+json"),a.textContent=o[i],a})}if(Array.isArray(t.styles)){let r=t.styles.filter(n=>n!=null&&String(n).trim()),o=r.map(Na);ky(e,"data-smbls-style",o,n=>{let s=o.indexOf(n),i=e.createElement("style");return i.textContent=String(r[s]),i})}if(Array.isArray(t.scripts)){let r=t.scripts.filter(n=>n&&(w(n)?n.trim():n.src)),o=r.map(n=>w(n)?n:String(n.src));ky(e,"data-smbls-script",o,n=>{let s=o.indexOf(n),i=r[s],a=e.createElement("script");return w(i)?a.setAttribute("src",i):(i.src&&a.setAttribute("src",i.src),i.type&&a.setAttribute("type",i.type),i.async&&(a.async=!0),i.defer&&(a.defer=!0),i.integrity&&a.setAttribute("integrity",i.integrity),i.crossorigin&&a.setAttribute("crossorigin",i.crossorigin),i.referrerpolicy&&a.setAttribute("referrerpolicy",i.referrerpolicy),i.nomodule&&(a.noModule=!0),i.body&&(a.textContent=String(i.body))),a})}}},ct=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,r=>e[r])},dO=t=>{let e=['<meta charset="UTF-8">'],r=new Set(["charset","jsonLd","styles","scripts"]),o=!1;for(let[n,s]of Object.entries(t)){if(!s&&s!==0&&s!==!1||r.has(n)||typeof s=="function")continue;if(n==="title"){e.push(`<title>${ct(s)}</title>`);continue}if(n==="viewport"){o||(e.push(`<meta name="viewport" content="${ct(s)}">`),o=!0);continue}if(n==="canonical"){e.push(`<link rel="canonical" href="${ct(s)}">`);continue}if(n==="icon"||n==="favicon"){let f=ct(s),u=f.endsWith(".svg")?' type="image/svg+xml"':f.endsWith(".png")?' type="image/png"':"";e.push(`<link rel="icon" href="${f}"${u}>`);continue}if(n==="favicons"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${ct(h)}"`).join(" ");e.push(`<link rel="icon" ${u}>`)}else typeof f=="string"&&e.push(`<link rel="icon" href="${ct(f)}">`)});continue}if(n==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${ct(h)}"`).join(" ");e.push(`<link rel="alternate" ${u}>`)}});continue}let i=["og:","article:","product:","fb:","profile:","book:","business:","music:","video:"],a=["twitter:","DC:","DCTERMS:"],c=i.some(f=>n.startsWith(f)),l=a.some(f=>n.startsWith(f));if(n.startsWith("http-equiv:")){let f=n.replace("http-equiv:","");e.push(`<meta http-equiv="${ct(f)}" content="${ct(s)}">`)}else if(n.startsWith("itemprop:")){let f=n.replace("itemprop:","");e.push(`<meta itemprop="${ct(f)}" content="${ct(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>e.push(`<meta property="${ct(n)}" content="${ct(f)}">`)):e.push(`<meta property="${ct(n)}" content="${ct(s)}">`):l?e.push(`<meta name="${ct(n)}" content="${ct(s)}">`):Array.isArray(s)?s.forEach(f=>e.push(`<meta name="${ct(n)}" content="${ct(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.push(`<meta name="${ct(n)}" content="${ct(s)}">`)}if(o||e.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),Array.isArray(t.jsonLd))for(let n of t.jsonLd){if(n==null)continue;let s=typeof n=="string"?n:JSON.stringify(n),i=String(s).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${Na(s)}">${i}<\/script>`)}if(Array.isArray(t.styles))for(let n of t.styles){if(n==null||!String(n).trim())continue;let s=String(n).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${Na(s)}">${s}</style>`)}if(Array.isArray(t.scripts))for(let n of t.scripts){if(!n)continue;let s=typeof n=="string",i=s?n:n.src;if(!i&&!(n&&n.body))continue;let a=[];i&&a.push(`src="${ct(i)}"`),s||(n.type&&a.push(`type="${ct(n.type)}"`),n.async&&a.push("async"),n.defer&&a.push("defer"),n.integrity&&a.push(`integrity="${ct(n.integrity)}"`),n.crossorigin&&a.push(`crossorigin="${ct(n.crossorigin)}"`),n.referrerpolicy&&a.push(`referrerpolicy="${ct(n.referrerpolicy)}"`),n.nomodule&&a.push("nomodule"));let c=` data-smbls-script="${ct(i||Na(n.body||""))}"`;if(!s&&n.body){let l=String(n.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${a.join(" ")}${c}>${l}<\/script>`)}else e.push(`<script ${a.join(" ")}${c}><\/script>`)}return e.join(`
88
- `)},tk={define:{metadata:(t,e,r)=>{let o=e.context?.document||typeof document<"u"&&document;if(!o)return;let n=Z(()=>{let s=zr(t,e,e.state);Kn(s,o);let i=e.state?.root;S(i)&&(i.$helmet=s)});e.__ref?.__effects&&e.__ref.__effects.push(n)}}},vy={name:"helmet",create(t){if(!t.metadata)return;let e=t.context?.document||typeof document<"u"&&document;if(!e)return;let r=Z(()=>{let o=t.metadata;if(!o)return;let n=zr(o,t,t.state);Kn(n,e)});t.__ref?.__effects&&t.__ref.__effects.push(r)},update(t){let e=t.metadata;if(!e)return;let r=t.context?.document||typeof document<"u"&&document;if(!r)return;let o=zr(e,t,t.state);Kn(o,r)}},pO=tk;Cr();var ek=(t,e,r,o)=>{t&&fi(t,e,r,o)},rk=(t,e,r)=>{if(!t)return;let o=e.context?.document||typeof document<"u"&&document;if(!o)return;let n=zr(t,e,r);Kn(n,o)},ok=async(t,e)=>{if(!t)return;let r={tag:"fragment",...t},o=async()=>{await e.set(r,{preventDefineUpdate:"$router"})};return e.lazyLoad?window.requestAnimationFrame(o):await o(),r},Gn={routes:t=>t,metadata:rk,fetch:ek,$router:ok},nk=(t={})=>{let e={routes:r=>r};return t.metadata!==!1&&(e.metadata=rk),t.fetch!==!1&&(e.fetch=ek),t.router!==!1&&(e.$router=ok),e};var Ey={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},Uf={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},Vf={...Ey,router:Uf},hO={state:{},pages:{},components:{},router:Uf,define:Gn},Hr=hO;R();R();var sk=(t,e)=>z(t.extends)?t.extends:[];R();var Ay={};P(Ay,{default:()=>yO,getActiveLang:()=>Xn,getLanguages:()=>Ba,getLocalStateLang:()=>Wa,initPolyglot:()=>Hf,loadTranslations:()=>Va,polyglotPlugin:()=>Jn,setLang:()=>za,translate:()=>Ua,upsertTranslation:()=>Ha});R();var ak="smbls_lang",gO="smbls_t_",mO="smbls_tv_",Yn={get(t){try{return window?.localStorage.getItem(t)}catch{return null}},set(t,e){try{window?.localStorage.setItem(t,e)}catch(r){console.warn("[polyglot] localStorage unavailable:",r.message)}},remove(t){try{window?.localStorage.removeItem(t)}catch(e){console.warn("[polyglot] localStorage unavailable:",e.message)}}},ja={};function Xn(){let t=this?.context,e=t?.polyglot;return(this?.state?.root||t?.state?.root)?.lang||e?.defaultLang||"en"}function Ba(){let t=this?.context?.polyglot;return t?t.languages?t.languages:t.translations?Object.keys(t.translations):[]:[]}var zf=(t,e)=>{if(!t||!e)return;if(t[e]!==void 0)return t[e];if(e.indexOf(".")===-1)return;let r=e.split("."),o=t;for(let n=0;n<r.length;n++){if(o==null)return;o=o[r[n]]}return o},ik=(t,e,r)=>{let o=e.lastIndexOf(".");if(o===-1)return t[e+"_"+r];let n=zf(t,e.substring(0,o));if(n!=null)return n[e.substring(o+1)+"_"+r]};function Ua(t,e){if(!t)return"";let r=this?.context,o=r?.polyglot,n=e||this.call("getActiveLang"),s=this?.state;if(s){let l=ik(s,t,n);if(l!==void 0)return l}if(o?.translations){let l=o.translations[n];if(l){let f=zf(l,t);if(f!==void 0)return f}}let a=(s?.root||r?.state?.root)?.translations;if(a){let l=a[n];if(l){let f=zf(l,t);if(f!==void 0)return f}}let c=o?.defaultLang||"en";if(s){let l=ik(s,t,c);if(l!==void 0)return l}if(o?.translations){let l=o.translations[c];if(l){let f=zf(l,t);if(f!==void 0)return f}}return t}async function Va(t){let e=this?.context,r=e?.polyglot,o=this?.state?.root||e?.state?.root;if(!r||!o)return;let n=r.storagePrefix||gO,s=r.storageVersionPrefix||(r.storagePrefix?r.storagePrefix.replace(/_$/,"v_"):mO);if(r.translations&&r.translations[t]&&!r.fetch||!r.fetch||r._fetchFailed?.[t])return;if(!o.translations?.[t]){let c=Yn.get(n+t);if(c)try{let l=JSON.parse(c),f={translations:{...o.translations||{}}};f.translations[t]=l,o.update&&o.update(f)}catch(l){console.warn("[polyglot] Failed to apply language update:",l.message)}}let i=(r.storagePrefix||"smbls")+":"+t;if(ja[i])return ja[i];let a=this;return ja[i]=(async()=>{try{let c=r.fetch,l=parseInt(Yn.get(s+t),10)||0,f,u,d;if(A(c)){let g=await c(t,l,a);if(!g||g.changed===!1)return;f=g.translations||g.data||g,u=g.version||0,d=!0}else if(S(c)){let g=a.getDB||(()=>e.fetch),p=A(g)?await g.call(a):e.fetch;if(!p)return;let m=c.rpc||c.from||"get_translations_if_changed",b={p_lang:t,p_cached_version:l,...c.params||{}},_=await p.rpc({from:m,params:b});if(_.error)throw r._fetchFailed||(r._fetchFailed={}),r._fetchFailed[t]=!0,_.error;let y=_.data;if(!y||!y.changed)return;f=y.translations||{},u=y.version||0,d=!0}else return;if(!d||!f)return;Yn.set(n+t,JSON.stringify(f)),u&&Yn.set(s+t,String(u));let h={translations:{...o.translations||{}}};h.translations[t]=f,o.update&&o.update(h)}catch(c){if(r.verbose!==!1){let l=c?.message||c?.details||(typeof c=="object"?JSON.stringify(c):String(c));console.warn("[polyglot] Failed to load translations for",t,"-",l)}}finally{delete ja[i]}})(),ja[i]}async function za(t){let e=this?.context,r=e?.polyglot,o=this?.state?.root||e?.state?.root;if(!o||this.call("getActiveLang")===t)return;let n=r?.storageLangKey||ak;Yn.set(n,t),r?.fetch&&await this.call("loadTranslations",t),e?.state&&(e.state.lang=t);let s=r?.translations?.[t],i={lang:t},a=l=>er(e,l,o);if(s&&typeof s=="object")for(let l in s){if(!a(l))continue;let f=s[l];(Array.isArray(f)||typeof f=="string"||typeof f=="number")&&(i[l]=f)}o.update&&o.update(i);for(let l in i)l!=="lang"&&Ue(e,l);if(s&&typeof s=="object")for(let l in s){if(!a(l))continue;let f=s[l];if(f&&typeof f=="object"&&!Array.isArray(f)&&o[l]&&typeof o[l]=="object"&&!Array.isArray(o[l])){for(let u in f)o[l][u]=f[u];Ue(e,l)}}let c=this?.context?.document||globalThis.document;if(c&&s){let l=c.querySelectorAll("[data-key]");for(let f of l){let u=f.ref;if(!u)continue;let d=u.__ref?.__exec?.text;if(typeof d=="string"&&d.includes("{{"))try{let h=u.call("replaceLiteralsWithObjectFields",d,u.state);h!=null&&f.textContent!==h&&(f.textContent=h)}catch{}}}}async function Ha(t,e,r){let o=this?.context,n=o?.polyglot,s=this?.state?.root||o?.state?.root;if(s?.translations?.[e]&&(s.translations[e][t]=r),n?.translations?.[e]&&(n.translations[e][t]=r),n?.fetch&&S(n.fetch)){let i=this.getDB||(()=>o.fetch),a=A(i)?await i.call(this):o.fetch;if(!a)return;let c=n.fetch.table||"translations",l=await a.upsert({from:c,data:{key:t,lang:e,text:r}});if(l?.error)throw l.error;return l.data}}async function Hf(){let t=this?.context,e=t?.polyglot;if(!e)return;let r=this?.state?.root||t?.state?.root;if(!r)return;let o=e.storageLangKey||ak,s=Yn.get(o)||e.defaultLang||r.lang||"en";r.update&&r.lang!==s&&r.update({lang:s}),e.fetch&&!(e.translations&&e.translations[s])&&await this.call("loadTranslations",s)}function Wa(t){try{let e=this?.context?.polyglot,o=(this?.state?.root||this?.context?.state?.root)?.lang||e?.defaultLang||"en",n=this?.state;if(!n)return"";let s=t.lastIndexOf(".");if(s===-1)return n[t+o]??"";let i=t.substring(0,s).split("."),a=n;for(let c=0;c<i.length;c++){if(a==null)return"";a=a[i[c]]}return a==null?"":a[t.substring(s+1)+o]??""}catch{return""}}var Jn={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,Hf.call(t))}},yO=Jn;Cr();var Oy={};P(Oy,{SYSTEM_METRICS:()=>qa,capsizeHandler:()=>Ty,capsizePlugin:()=>qf,computeCapsize:()=>ck,default:()=>bO,resolveFontSizePx:()=>lk,resolveMetrics:()=>fk});var qa={arial:{capHeight:716,ascent:1854,descent:-434,lineGap:67,unitsPerEm:2048},helvetica:{capHeight:714,ascent:770,descent:-230,lineGap:0,unitsPerEm:1e3},"helvetica neue":{capHeight:714,ascent:952,descent:-213,lineGap:28,unitsPerEm:1e3},georgia:{capHeight:1419,ascent:1878,descent:-449,lineGap:0,unitsPerEm:2048},"times new roman":{capHeight:1356,ascent:1825,descent:-443,lineGap:87,unitsPerEm:2048},"courier new":{capHeight:1170,ascent:1705,descent:-615,lineGap:0,unitsPerEm:2048},verdana:{capHeight:1489,ascent:2059,descent:-430,lineGap:0,unitsPerEm:2048},roboto:{capHeight:1456,ascent:1900,descent:-500,lineGap:0,unitsPerEm:2048},"open sans":{capHeight:1462,ascent:2189,descent:-600,lineGap:0,unitsPerEm:2048},inter:{capHeight:1490,ascent:2048,descent:-512,lineGap:0,unitsPerEm:2048},lato:{capHeight:1434,ascent:1974,descent:-426,lineGap:0,unitsPerEm:2e3},"source sans":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},"source sans pro":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},"source sans 3":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},montserrat:{capHeight:700,ascent:968,descent:-251,lineGap:0,unitsPerEm:1e3},poppins:{capHeight:700,ascent:1050,descent:-350,lineGap:100,unitsPerEm:1e3},raleway:{capHeight:710,ascent:1e3,descent:-250,lineGap:0,unitsPerEm:1e3},"dm sans":{capHeight:700,ascent:992,descent:-312,lineGap:0,unitsPerEm:1e3},nunito:{capHeight:705,ascent:1011,descent:-353,lineGap:0,unitsPerEm:1e3},"work sans":{capHeight:684,ascent:930,descent:-243,lineGap:0,unitsPerEm:1e3},manrope:{capHeight:708,ascent:980,descent:-300,lineGap:0,unitsPerEm:1e3},"ibm plex sans":{capHeight:698,ascent:1025,descent:-275,lineGap:0,unitsPerEm:1e3},"plus jakarta sans":{capHeight:720,ascent:1060,descent:-300,lineGap:0,unitsPerEm:1e3}},Wf=t=>parseFloat(t.toFixed(4)),ck=(t,e,r)=>{let{ascent:o,descent:n,lineGap:s,unitsPerEm:i,capHeight:a}=e,c=Math.abs(n),l=o+c+s,f=r!==void 0?r:l/i*t,u=f/t,d=l/i,h=(o-a+s/2)/i-(u-d)/2,g=(c+s/2)/i-(u-d)/2;return{fontSize:`${Wf(t/16)}rem`,lineHeight:`${Wf(f)}px`,capHeightTrim:`${Wf(-h)}em`,baselineTrim:`${Wf(-g)}em`}},lk=(t,e)=>{if(typeof t=="number")return t;let r=e?.designSystem;if(!r)return null;let{typography:o}=r;if(o?.sequence){let s=String(t).toUpperCase(),i=o.sequence[s];if(i)return i.decimal||i.val}let n=parseFloat(t);return isNaN(n)?null:typeof t=="string"&&t.endsWith("rem")?n*(r.typography?.browserDefault||16):n},fk=(t,e)=>{let o=e?.designSystem?.font_family||{};if(t){let s=o[t];if(s?.metrics)return s.metrics;let i=String(t).toLowerCase().replace(/['"]/g,"").trim();if(qa[i])return qa[i]}let n=o.default||Object.keys(o)[0];if(n){let s=o[n];if(s?.metrics)return s.metrics;if(s?.value&&Array.isArray(s.value))for(let i of s.value){let a=i.toLowerCase().replace(/['"]/g,"").trim();if(qa[a])return qa[a]}}return null},Ty=(t,e,r,o)=>{if(!t)return;let n=lk(e.fontSize,o);if(!n)return;let s=fk(e.fontFamily,o);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=ck(n,s,i),f={};return e.lineHeight||(f.lineHeight=a),f["::before"]={content:'""',marginBottom:c,display:"table"},f["::after"]={content:'""',marginTop:l,display:"table"},f},qf={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},bO=qf;var My={};P(My,{PRESERVE_VALUE_KEYS:()=>$t,SKIP_INLINE_KEYS:()=>Wr,abbrToProp:()=>Dt,decode:()=>gk,encode:()=>dk,expand:()=>Eo,isComponentKey:()=>Ie,isSelectorKey:()=>De,parse:()=>Ao,parseFurther:()=>Oo,propToAbbr:()=>Se,shorten:()=>Ka,shorthandPlugin:()=>Ga,stringify:()=>Co,stringifyFurther:()=>To});var Se={attr:"at",childExtends:"cex",childExtendsRecursive:"cexr",childProps:"cp",children:"ch",childrenAs:"cha",class:"cl",content:"cnt",context:"ctx",data:"dt",extends:"ext",hide:"hd",html:"htm",if:"if",ignoreChildExtends:"icex",key:"ky",query:"qy",routes:"rt",scope:"scp",show:"shw",state:"st",style:"sy",tag:"tg",text:"tx",align:"aln",boxSize:"bsz",flow:"fl",heightRange:"hr",horizontalInset:"hi",round:"rnd",shadow:"shd",size:"sz",templateColumns:"tcol",verticalInset:"vi",widthRange:"wr",wrap:"wrp",aspectRatio:"ar",blockSize:"bks",boxSizing:"bxs",height:"h",inlineSize:"ins",margin:"m",marginBottom:"mb",marginLeft:"ml",marginRight:"mr",marginTop:"mt",maxBlockSize:"mxbs",maxHeight:"mxh",maxInlineSize:"mxis",maxWidth:"mxw",minBlockSize:"mnbs",minHeight:"mnh",minInlineSize:"mnis",minWidth:"mnw",padding:"p",paddingBottom:"pb",paddingInline:"pil",paddingLeft:"pl",paddingRight:"pr",paddingTop:"pt",width:"w",alignContent:"ac",alignItems:"ai",alignSelf:"as",flex:"fx",flexBasis:"fxb",flexDirection:"fxd",flexFlow:"fxf",flexGrow:"fxg",flexShrink:"fxs",flexWrap:"fxw",gap:"g",justifyContent:"jc",justifyItems:"ji",justifySelf:"js",order:"od",placeContent:"pcn",placeItems:"pit",placeSelf:"psl",rowGap:"rg",columnGap:"cg",gridArea:"ga",gridAutoColumns:"gac",gridAutoFlow:"gaf",gridAutoRows:"gar",gridColumn:"gc",gridColumnEnd:"gce",gridColumnStart:"gcs",gridRow:"gr",gridRowEnd:"gre",gridRowStart:"grs",gridTemplateAreas:"gta",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",bottom:"bot",float:"flt",inset:"ist",left:"lft",position:"pos",right:"rgt",top:"tp",zIndex:"zi",clear:"clr",contain:"ctn",cursor:"cur",display:"d",opacity:"op",overflow:"ov",overflowX:"ovx",overflowY:"ovy",pointerEvents:"pe",resize:"rsz",userSelect:"us",visibility:"vis",background:"bg",backgroundAttachment:"bga",backgroundBlendMode:"bgbm",backgroundClip:"bgcl",backgroundColor:"bgc",backgroundImage:"bgi",backgroundOrigin:"bgo",backgroundPosition:"bgp",backgroundPositionX:"bgpx",backgroundPositionY:"bgpy",backgroundRepeat:"bgr",backgroundRepeatX:"bgrx",backgroundRepeatY:"bgry",backgroundSize:"bgs",color:"c",theme:"thm",themeModifier:"thmm",border:"bd",borderBottom:"bdb",borderBottomLeftRadius:"bdblr",borderBottomRightRadius:"bdbrr",borderCollapse:"bdcl",borderColor:"bdc",borderImage:"bdi",borderImageOutset:"bdio",borderImageRepeat:"bdir",borderImageSlice:"bdis",borderImageSource:"bdisrc",borderImageWidth:"bdiw",borderLeft:"bdl",borderRadius:"bdr",borderRight:"bdrg",borderSpacing:"bdsp",borderStyle:"bdst",borderTop:"bdt",borderTopLeftRadius:"bdtlr",borderTopRightRadius:"bdtrr",borderWidth:"bdw",outline:"ol",outlineColor:"olc",outlineOffset:"olo",outlineStyle:"ols",outlineWidth:"olw",boxShadow:"bxsh",textShadow:"txsh",direction:"dir",fontDisplay:"fdi",fontFamily:"ff",fontFeatureSettings:"ffs",fontKerning:"fk",fontOpticalSizing:"fos",fontPalette:"fpl",fontSize:"fs",fontSizeAdjust:"fsa",fontSmooth:"fsm",fontStretch:"fsr",fontStyle:"fsy",fontSynthesis:"fsyn",fontVariant:"fv",fontVariationSettings:"fvs",fontWeight:"fw",hyphens:"hyp",letterSpacing:"ls",lineHeight:"lh",tabSize:"tsz",textAlign:"ta",textDecoration:"td",textDecorationColor:"tdc",textDecorationLine:"tdl",textDecorationStyle:"tds",textIndent:"ti",textOverflow:"tov",textStroke:"tsk",textTransform:"tt",unicodeBidi:"ub",verticalAlign:"va",whiteSpace:"ws",wordBreak:"wbr",wordSpacing:"wsp",wordWrap:"wwr",writingMode:"wm",captionSide:"cps",counterIncrement:"ci",counterReset:"cr",emptyCells:"ec",listStyle:"lst",listStyleImage:"lsi",listStylePosition:"lsp",listStyleType:"lsty",quotes:"qt",tableLayout:"tl",columnCount:"cc",columnFill:"cf",columnRule:"crl",columnRuleColor:"crlc",columnRuleStyle:"crls",columnRuleWidth:"crlw",columnSpan:"cspn",columnWidth:"cwi",columns:"col",backdropFilter:"bdf",boxDecorationBreak:"bxdb",clipPath:"cpth",filter:"fil",isolation:"iso",mixBlendMode:"mbm",objectFit:"obf",objectPosition:"obp",perspective:"prs",perspectiveOrigin:"prso",willChange:"wc",transform:"tf",transformOrigin:"tfo",transformStyle:"tfs",transition:"trn",transitionDelay:"trnd",transitionDuration:"trndr",transitionProperty:"trnp",transitionTimingFunction:"trntf",animation:"an",animationDelay:"and",animationDirection:"andr",animationDuration:"andur",animationFillMode:"anfm",animationIterationCount:"anic",animationName:"ann",animationPlayState:"anps",animationTimingFunction:"antf",scrollBehavior:"sb",scrollMargin:"smr",scrollMarginBottom:"smrb",scrollMarginLeft:"smrl",scrollMarginRight:"smrr",scrollMarginTop:"smrt",scrollPadding:"spd",scrollPaddingBottom:"spdb",scrollPaddingLeft:"spdl",scrollPaddingRight:"spdr",scrollPaddingTop:"spdt",scrollSnapAlign:"ssa",scrollSnapStop:"sss",scrollSnapType:"sst",breakAfter:"bka",breakBefore:"bkb",breakInside:"bki",pageBreakAfter:"pbka",pageBreakBefore:"pbkb",pageBreakInside:"pbki",accessKey:"ack",className:"cn",contentEditable:"ced",contextMenu:"cmu",draggable:"drg",hidden:"hid",id:"id",is:"is",lang:"lng",nonce:"nnc",spellCheck:"spc",tabIndex:"tbi",title:"ttl",translate:"trl",accept:"acp",acceptCharset:"accs",action:"act",autoComplete:"atc",autoFocus:"atf",capture:"cap",challenge:"chg",checked:"chk",cols:"cls",colSpan:"csn",controls:"ctl",default:"def",defer:"dfr",disabled:"dis",encType:"ect",form:"frm",formAction:"fac",formEncType:"fect",formMethod:"fme",formNoValidate:"fnv",formTarget:"ftg",high:"hgh",inputMode:"imd",kind:"knd",label:"lbl",list:"lis",loop:"lp",low:"lw",max:"mx",maxLength:"mxl",method:"mtd",min:"mn",minLength:"mnl",multiple:"mul",muted:"mut",name:"nm",open:"opn",optimum:"opt",pattern:"ptn",placeholder:"phd",readOnly:"ro",required:"req",reversed:"rev",rows:"rws",rowSpan:"rsn",selected:"sel",span:"spn",start:"srt",step:"stp",type:"typ",value:"val",download:"dl",href:"hrf",hrefLang:"hrl",ping:"png",referrerPolicy:"rfp",rel:"rl",target:"tgt",allow:"alw",allowFullScreen:"afs",allowPaymentRequest:"apr",alt:"alt",cellPadding:"cpg",cellSpacing:"csg",cite:"cit",coords:"crd",crossOrigin:"cor",dateTime:"dtm",fetchPriority:"fpr",headers:"hds",httpEquiv:"hte",integrity:"itg",isMap:"ism",keyType:"kty",loading:"ldg",manifest:"mft",media:"mda",poster:"pst",preload:"prl",radioGroup:"rdg",sandbox:"sbx",scoped:"scod",seamless:"sml",shape:"shp",sizes:"szs",src:"src",srcDoc:"srd",srcLang:"srl",srcSet:"srs",useMap:"ump",ariaActiveDescendant:"aad",ariaAtomic:"aat",ariaBusy:"abu",ariaChecked:"achk",ariaControls:"acl",ariaCurrent:"acr",ariaDescribedBy:"adb",ariaDetails:"adt",ariaDisabled:"adis",ariaDropEffect:"ade",ariaErrorMessage:"aem",ariaExpanded:"aexp",ariaGrabbed:"agr",ariaHasPopup:"ahp",ariaHidden:"ahid",ariaInvalid:"ainv",ariaLabel:"alb",ariaLabelledBy:"alby",ariaLive:"alv",ariaModal:"amod",ariaMultiSelectable:"ams",ariaOrientation:"aor",ariaOwns:"aow",ariaPosInSet:"apis",ariaPressed:"aprs",ariaReadOnly:"aro",ariaRelevant:"arl",ariaRequired:"areq",ariaSelected:"asel",ariaSetSize:"assz",ariaValueMax:"avmx",ariaValueMin:"avmn",ariaValueNow:"avn",role:"role",onInit:"@in",onRender:"@rn",onUpdate:"@up",onStateChange:"@sc",onStateUpdate:"@su",onClick:"@ck",onContextMenu:"@cm",onDblClick:"@dc",onMouseDown:"@md",onMouseEnter:"@me",onMouseLeave:"@ml",onMouseMove:"@mm",onMouseOut:"@mo",onMouseOver:"@mv",onMouseUp:"@mu",onKeyDown:"@kd",onKeyPress:"@kp",onKeyUp:"@ku",onBlur:"@bl",onFocus:"@fc",onFocusIn:"@fi",onFocusOut:"@fo",onBeforeInput:"@bi",onChange:"@cg",onFormData:"@fd",onInput:"@ip",onInvalid:"@iv",onReset:"@rs",onSearch:"@sr",onSelect:"@sl",onSubmit:"@sm",onTouchCancel:"@tc",onTouchEnd:"@te",onTouchMove:"@tm",onTouchStart:"@ts",onPointerCancel:"@pc",onPointerDown:"@pd",onPointerEnter:"@pe",onPointerLeave:"@ple",onPointerMove:"@pm",onPointerOut:"@po",onPointerOver:"@pov",onPointerUp:"@pu",onDrag:"@dg",onDragEnd:"@dge",onDragEnter:"@dgn",onDragLeave:"@dgl",onDragOver:"@dgo",onDragStart:"@dgs",onDrop:"@dp",onResize:"@rz",onScroll:"@scl",onWheel:"@wh",onCopy:"@cy",onCut:"@ct",onPaste:"@pt",onCompositionEnd:"@cpe",onCompositionStart:"@cps",onCompositionUpdate:"@cpu",onAnimationEnd:"@ae",onAnimationIteration:"@ai",onAnimationStart:"@as",onTransitionEnd:"@tre",onTransitionStart:"@trs",onAbort:"@ab",onCanPlay:"@cap",onCanPlayThrough:"@cpt",onDurationChange:"@duc",onEmptied:"@em",onEncrypted:"@enc",onEnded:"@end",onError:"@er",onLoad:"@ld",onLoadedData:"@ldd",onLoadedMetadata:"@ldm",onPause:"@pa",onPlay:"@pl",onPlaying:"@plg",onProgress:"@prg",onRateChange:"@rc",onSeeked:"@sk",onSeeking:"@skg",onStalled:"@stl",onSuspend:"@ssp",onTimeUpdate:"@tu",onVolumeChange:"@vc",onWaiting:"@wt",icon:"ico",iconText:"ict",lookup:"lkp",router:"rtr",shapeModifier:"shpm"},Dt=Object.create(null);for(let t in Se)Dt[Se[t]]=t;var Ry=Object.create(null);for(let t in Se){let e=Se[t];if(Ry[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${Ry[e]}"`);Ry[e]=t}var $t=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),Wr=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function Ie(t){return/^[A-Z]/.test(t)}function De(t){return/^[:@.!$>&]/.test(t)||t.startsWith("> ")}function dk(t){if(!t||typeof t!="object")return"";let e=[];for(let r in t){let o=t[r];if(typeof o=="function"||o!==null&&typeof o=="object"&&!Array.isArray(o)||o===void 0)continue;let n=Se[r]||r;if(o===!0)e.push(n);else if(o===!1)e.push("!"+n);else if(Array.isArray(o)){let s=o.map(i=>Kf(i));e.push(n+":"+s.join(","))}else e.push(n+":"+Kf(o))}return e.join(" ")}function Kf(t){return String(t).replace(/ /g,"_")}function Ka(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Ka(r):r});let e={};for(let r in t){let o=t[r];if(Ie(r)){e[r]=Py(o);continue}if(De(r)){e[r]=Py(o);continue}let n=Se[r]||r;if($t.has(r)||$t.has(n)){e[n]=o;continue}e[n]=Py(o)}return e}function Py(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Ka(e):e}):typeof t=="object"?Ka(t):t}function Co(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(o){return o!==null&&typeof o=="object"?Co(o):o});let e={},r=[];for(let o in t){let n=t[o];if(Ie(o)){e[o]=uk(n);continue}if(De(o)){e[o]=uk(n);continue}let s=Se[o]||o;if($t.has(o)||$t.has(s)){e[s]=n;continue}if(typeof n=="function"){e[s]=n;continue}if(n==null){e[s]=n;continue}if(Wr.has(o)||Wr.has(s)){e[s]=n;continue}if(Array.isArray(n)){if(n.some(function(a){return a!==null&&typeof a=="object"})){e[s]=n.map(function(a){return a!==null&&typeof a=="object"?Co(a):a});continue}if(n.length<=1){e[s]=n;continue}r.push(s+":"+n.map(Kf).join(","));continue}if(typeof n=="object"){e[s]=Co(n);continue}n===!0?r.push(s):n===!1?r.push("!"+s):typeof n=="number"||typeof n=="string"&&(n.includes(",")||n.includes("_"))?e[s]=n:r.push(s+":"+Kf(n))}return r.length&&(e.in=r.join(" ")),e}function uk(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Co(e):e}):typeof t=="object"?Co(t):t}function gk(t){if(!t||typeof t!="string")return{};let e={},r=mk(t);for(let o of r){if(o.startsWith("!")){let c=o.slice(1),l=Dt[c]||c;e[l]=!1;continue}let n=o.indexOf(":");if(n===-1){let c=Dt[o]||o;e[c]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(pk);continue}e[a]=pk(i)}return e}function mk(t){return t.trim().split(/\s+/).filter(Boolean)}function pk(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function hk(t){return t.replace(/_/g," ")}function _O(t){if(!t||typeof t!="string")return{};let e={},r=mk(t);for(let o of r){if(o.startsWith("!")){let c=o.slice(1),l=Dt[c]||c;e[l]=!1;continue}let n=o.indexOf(":");if(n===-1){let c=Dt[o]||o;e[c]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(hk);continue}e[a]=hk(i)}return e}function Eo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Eo(r):r});let e={};for(let r in t){let o=t[r];if(Ie(r)){e[r]=Iy(o);continue}let n=Dt[r]||r;if(De(r)&&n===r){e[r]=Iy(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=Iy(o)}return e}function Iy(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Eo(e):e}):typeof t=="object"?Eo(t):t}function Ao(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Ao(r):r});let e={};if(typeof t.in=="string"){let r=_O(t.in);for(let o in r)e[o]=r[o]}for(let r in t){if(r==="in")continue;let o=t[r];if(Ie(r)){e[r]=Dy(o);continue}let n=Dt[r]||r;if(De(r)&&n===r){e[r]=Dy(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=Dy(o)}return e}function Dy(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Ao(e):e}):typeof t=="object"?Ao(t):t}function yk(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function xO(t){let e="",r=0;for(;r<t.length;){if(t[r]==="\\"&&r+1<t.length){let o=t[r+1];if(o===","||o==="_"||o==="\\"){e+=o,r+=2;continue}}t[r]==="_"?e+=" ":e+=t[r],r++}return e}function wO(t){let e=[],r="",o=0;for(;o<t.length;){if(t[o]==="\\"&&o+1<t.length){r+=t[o]+t[o+1],o+=2;continue}if(t[o]===","){e.push(r),r="",o++;continue}r+=t[o],o++}return e.push(r),e}function bk(t){if(t==null||typeof t!="object"||Array.isArray(t))return!1;let e=Object.keys(t);return e.length===1&&e[0]==="in"&&typeof t.in=="string"}function To(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(o){return o!==null&&typeof o=="object"?To(o):o});let e={},r=[];for(let o in t){let n=t[o];if(Ie(o)){let i=_k(n);e[o]=bk(i)?i.in:i;continue}if(De(o)){let i=_k(n);e[o]=bk(i)?i.in:i;continue}let s=Se[o]||o;if($t.has(o)||$t.has(s)){e[s]=n;continue}if(typeof n=="function"){e[s]=n;continue}if(n==null){e[s]=n;continue}if(Wr.has(o)||Wr.has(s)){e[s]=n;continue}if(Array.isArray(n)){if(n.some(function(a){return a!==null&&typeof a=="object"})){e[s]=n.map(function(a){return a!==null&&typeof a=="object"?To(a):a});continue}if(n.length<=1){e[s]=n;continue}r.push(s+":"+n.map(yk).join(","));continue}if(typeof n=="object"){e[s]=To(n);continue}if(n===!0){r.push(s);continue}if(n===!1){r.push("!"+s);continue}if(typeof n=="number"){r.push(s+":#"+n);continue}r.push(s+":"+yk(n))}return r.length&&(e.in=r.join(" ")),e}function _k(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?To(e):e}):typeof t=="object"?To(t):t}function xk(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):xO(t)}function $y(t){if(!t||typeof t!="string")return{};let e={},r=t.trim().split(/\s+/).filter(Boolean);for(let o of r){if(o.startsWith("!")){let l=o.slice(1),f=Dt[l]||l;e[f]=!1;continue}let n=o.indexOf(":");if(n===-1){let l=Dt[o]||o;e[l]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s,c=wO(i);if(c.length>1){e[a]=c.map(xk);continue}e[a]=xk(i)}return e}function Oo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Oo(r):r});let e={};if(typeof t.in=="string"){let r=$y(t.in);for(let o in r)e[o]=r[o]}for(let r in t){if(r==="in")continue;let o=t[r];if(Ie(r)){typeof o=="string"?e[r]=$y(o):e[r]=Ly(o);continue}let n=Dt[r]||r;if(De(r)&&n===r){typeof o=="string"?e[r]=$y(o):e[r]=Ly(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=Ly(o)}return e}function Ly(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Oo(e):e}):typeof t=="object"?Oo(t):t}var SO={shorten:Eo,stringify:Ao,stringifyFurther:Oo};function kO(t,e){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(o=>e(o));let r={};for(let o in t){let n=t[o];r[o]=n&&typeof n=="object"?e(n):n}return r}var vO=["components","pages","snippets"],Ga={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let o=SO[e===!0?"shorten":e];if(o){for(let n of vO)t[n]&&(t[n]=kO(t[n],o));t.app&&typeof t.app=="object"&&(t.app=o(t.app))}}};var Gy={};P(Gy,{LEVELS:()=>Ya,analyzePlugin:()=>Qn,attachBrowserListeners:()=>ru,attachNetworkListeners:()=>Ja,classifyEvent:()=>zy,createAnalyzeState:()=>ou,createBeaconSink:()=>qy,createConsoleSink:()=>Hy,createDedupe:()=>By,createEnrich:()=>Ny,createMemorySink:()=>Wy,createPipeline:()=>Jf,createRedact:()=>Xf,createRemoteSink:()=>Qf,createSample:()=>Uy,createSummarize:()=>jy,default:()=>Qn,emitFetchEvent:()=>Tk,makeEvent:()=>X,meetsLevel:()=>Gf,normalizeLevel:()=>Xa,resolveSinks:()=>eu,summarizeElement:()=>Ro});var CO=0,EO=()=>`${Date.now().toString(36)}-${(CO++).toString(36)}`,X=(t,e,r={})=>({id:EO(),ts:Date.now(),type:t,level:e,...r}),AO=t=>{let e=[],r=t,o=0;for(;r&&o<32;)r.key!=null&&e.unshift(String(r.key)),r=r.parent,o++;return e.join(" > ")},Ro=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:AO(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var Zn=t=>t?.context?.analyze,TO={init:{category:"lifecycle",type:"lifecycle",level:"debug"},create:{category:"lifecycle",type:"lifecycle",level:"debug"},render:{category:"lifecycle",type:"lifecycle",level:"debug"},beforeRemove:{category:"lifecycle",type:"lifecycle",level:"debug"},remove:{category:"lifecycle",type:"lifecycle",level:"debug"}},OO=(t,{category:e,type:r,level:o})=>n=>{let s=Zn(n);!s||!s.shouldCapture(e)||s.emit(X(r,o,{hook:t,element:Ro(n)}))},wk=t=>(e,r)=>{let o=Zn(e);!o||!o.shouldCapture("state")||o.emit(X("state","debug",{hook:t,element:Ro(e),changedKeys:r?.changedKeys||null}))},Qn={name:"analyze",error(t,e){let r=Zn(t);if(!r||r.config.enabled===!1||!r.shouldCapture("errors"))return;let o=e?.error||e?.err||(e instanceof Error?e:null);r.emit(X("error","error",{hook:e?.hook||"error",element:Ro(t),error:o,message:o?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=Zn(t);e&&(!e.shouldCapture("navigation")&&!e.shouldCapture("lifecycle")||e.emit(X("navigation","info",{hook:"renderRouter",route:t.context?.routerOptions?.currentRoute||null})))},beforeUpdate(t){let e=Zn(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=Zn(t);if(!e||!e.shouldCapture("updates"))return;let r=null;t.__ref?.__analyzeUpdateStart!=null&&(r=(typeof performance<"u"?performance.now():Date.now())-t.__ref.__analyzeUpdateStart,t.__ref.__analyzeUpdateStart=null),e.emit(X("update","debug",{hook:"update",element:Ro(t),durationMs:r}))},beforeStateUpdate:wk("beforeStateUpdate"),stateUpdate:wk("stateUpdate")};for(let[t,e]of Object.entries(TO))Qn[t]=OO(t,e);R();var Ya={error:0,warn:1,info:2,debug:3,trace:4};var Gf=(t,e)=>{let r=Ya[t],o=Ya[e];return r==null||o==null?!0:r<=o},Xa=t=>Ya[t]!=null?t:"warn";R();var Yf=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var RO=(t,e)=>{for(let r of e)if(r instanceof RegExp){if(r.test(t))return!0}else if(typeof r=="string"&&t.toLowerCase().includes(r.toLowerCase()))return!0;return!1},PO=(t,e)=>{if(e!=="redact"){if(e==="hash"){let r=0,o=String(t);for(let n=0;n<o.length;n++)r=(r<<5)-r+o.charCodeAt(n)|0;return`#${(r>>>0).toString(36)}`}return"***"}},Fy=(t,e,r,o)=>{if(o>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>Fy(s,e,r,o+1));let n={};for(let s of Object.keys(t))if(RO(s,e)||Yf.test(s)){let a=PO(t[s],r);a!==void 0&&(n[s]=a)}else n[s]=Fy(t[s],e,r,o+1);return n},Xf=(t=[],e="mask")=>{let r=Array.isArray(t)?t:[t];return o=>{if(!o)return o;let{id:n,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:h,...g}=o,p=Fy(g,r,e,0);return{id:n,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:h,...p}}};var Ny=t=>{let e=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,r=typeof navigator<"u"?navigator.userAgent:null,o=t.config.buildHash||null,n=t.config.appId||null;return s=>{if(!s)return s;let i=t.context?.routerOptions?.currentRoute||null,a=v,c=a&&a.innerWidth?{w:a.innerWidth,h:a.innerHeight}:null;return{...s,session:e,app:{id:n,build:o,route:i},meta:{ua:r,viewport:c}}}},jy=()=>t=>{if(!t)return t;if(t.element&&typeof t.element=="object"){let e=t.element;(e.node||e.parent||e.__ref)&&(t={...t,element:{key:e.key!=null?String(e.key):null,name:e.__name||e.name||null,tag:e.tag||null,component:e.component||null}})}return t.error instanceof Error&&(t={...t,error:{name:t.error.name,message:t.error.message,stack:t.error.stack}}),t},By=(t=1e3,e=500)=>{let r=new Map;return o=>{if(!o)return o;let n=`${o.type}:${o.level}:${o.message||""}:${o.error?.message||""}`,s=r.get(n),i=o.ts||Date.now();if(s&&i-s<t)return null;if(r.set(n,i),r.size>e){let a=Math.ceil(e/10),c=0;for(let l of r.keys()){if(c++>=a)break;r.delete(l)}}return o}},Uy=t=>e=>{if(!e)return e;let r=t[e.type];return r==null||r>=1?e:Math.random()>r?null:e},Sk={redact:t=>Xf(t.config.redact||[],t.config.maskStrategy),enrich:t=>Ny(t),summarize:()=>jy(),dedupe:t=>By(t.config.cache?.dedupeWindowMs||1e3),sample:t=>Uy(t.config.sample||{})},IO=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let r=Sk[t];return r?r(e):null}return null},Jf=t=>{let e=t.config,r=Array.isArray(e.transformers)?e.transformers.slice():[],o=r.findIndex(s=>s==="redact");o>=0&&r.splice(o,1);let n=[];e.redact!==!1&&n.push(Sk.redact(t));for(let s of r){let i=IO(s,t);i&&n.push(i)}return s=>{let i=s;for(let a of n){if(i==null)return null;let c=a(i);if(c==null)return null;if(Array.isArray(c)){let l=n.slice(n.indexOf(a)+1),f=[];for(let u of c){let d=u,h=!1;for(let g of l)if(d=g(d),d==null){h=!0;break}!h&&d!=null&&f.push(d)}return f}i=c}return i}};R();R();var Zf=typeof v<"u"&&typeof v.document<"u",DO=5e3,$O=50,LO=3,MO=1500,FO=1e3,zy=t=>t?t.level==="error"||t.type==="error"?"bug":t.type==="network"?"network":t.type==="console"?t.level==="error"||t.level==="warn"?"bug":"log":t.level==="warn"?"bug":t.level==="info"?"log":"verbose":"verbose",NO=t=>{try{return JSON.stringify(t)}catch{return null}},jO=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},BO=t=>{if(!t)return null;let e=String(t),r;return(r=e.match(/Edg\/([\d.]+)/))?{name:"Edge",version:r[1]}:(r=e.match(/OPR\/([\d.]+)/))?{name:"Opera",version:r[1]}:(r=e.match(/Firefox\/([\d.]+)/))?{name:"Firefox",version:r[1]}:/Chrome\/([\d.]+)/.test(e)&&/Safari\//.test(e)?(r=e.match(/Chrome\/([\d.]+)/),{name:"Chrome",version:r[1]}):(r=e.match(/Version\/([\d.]+).*Safari/))?{name:"Safari",version:r[1]}:{name:null,version:null}},UO=()=>{if(!Zf)return null;try{let t=v.document?.documentElement?.getAttribute("data-theme")||null,e=typeof v.matchMedia=="function"?v.matchMedia("(prefers-color-scheme: dark)").matches:null;return{active:t||(e?"dark":e===!1?"light":null),forced:t||null,prefers:e==null?null:e?"dark":"light"}}catch{return null}},VO=()=>{if(!Zf)return null;let t=v.location,e=typeof navigator<"u"?navigator:null,r=typeof screen<"u"?screen:null;return{url:t?.href||null,path:t?.pathname||null,referrer:v.document?.referrer||null,title:v.document?.title||null,ua:e?.userAgent||null,browser:BO(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:jO(),viewport:v.innerWidth?{w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}:null,screen:r?{w:r.width||null,h:r.height||null,availW:r.availWidth||null,availH:r.availHeight||null,colorDepth:r.colorDepth||null,orientation:r.orientation?.type||null}:null,theme:UO()}},Qf=(t={})=>{let e=t.url,r=typeof t.transport=="function"?t.transport:null,o=typeof t.syncTransport=="function"?t.syncTransport:null;if(!e&&!r)return()=>{};let n=t.apiKey||null,s=t.appKey||t.appId||null,i=t.tenantKey||t.tenant||null,a=t.release||null,c=t.env||null,l=t.sdk||null,f=typeof t.getAuth=="function"?t.getAuth:null,u=typeof t.getContext=="function"?t.getContext:null,d=typeof t.classify=="function"?t.classify:zy,h=typeof t.beforeSend=="function"?t.beforeSend:null,g=t.debug===!0,p=typeof t.getDebug=="function"?t.getDebug:null,m=t.batchMs!=null?t.batchMs:DO,b=t.maxBatch||$O,_=t.maxRetries!=null?t.maxRetries:LO,y=t.backoffMs||MO,x=t.queueLimit||FO,k=t.sampleRate!=null?t.sampleRate:1,E=()=>typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,O=t.sessionId||E(),$=[],D=[],I=null,H=null,V=()=>{I||!$.length||(I=setTimeout(K,m))},rt=L=>{if(H)return;let ot=y*Math.pow(2,Math.max(0,L-1));H=setTimeout(()=>{if(H=null,!D.length)return;let U=D.shift();G(U.envelope,U.attempt)},ot)},at=(L,ot=!1)=>{let U=u?Vy(u):null,Y={id:O,sentAt:Date.now()};ot&&(Y.endedAt=Date.now());let j={v:1,session:Y,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:VO(),user:U?.user||null,traits:U?.traits||null,tags:U?.tags||null,events:L};if((p?Vy(p)===!0:g)&&(j.app.debug=!0),h)try{return h(j)||null}catch{return j}return j},G=async(L,ot=1)=>{if(L)try{let U=!0;if(r){let Y=await r(L);U=Y!==!1&&Y?.ok!==!1}else U=await zO(e,L,{apiKey:n,getAuth:f});!U&&ot<_&&(D.push({envelope:L,attempt:ot+1}),rt(ot+1))}catch{ot<_&&(D.push({envelope:L,attempt:ot+1}),rt(ot+1))}},K=(L=!1,ot=!1)=>{if(I&&(clearTimeout(I),I=null),!$.length&&!ot)return;let U=$;$=[];let Y=at(U,ot);if(Y){if(L&&Zf){if(typeof o=="function"&&Vy(()=>o(Y)))return;if(navigator.sendBeacon&&e){let j=NO(Y);if(j)try{navigator.sendBeacon(e,new v.Blob([j],{type:"application/json"}));return}catch{}}}G(Y)}},lt=!1,Vt=()=>{lt||(lt=!0,K(!0,!0))};Zf&&(v.addEventListener("pagehide",Vt,{passive:!0}),v.addEventListener("beforeunload",Vt,{passive:!0}),v.addEventListener("visibilitychange",()=>{v.document.visibilityState==="hidden"&&K(!0)},{passive:!0}));let W=L=>{if(!L||k<1&&Math.random()>k)return;lt&&(lt=!1);let ot={...L,log_type:d(L)};$.push(ot),$.length>x&&($=$.slice(-x)),$.length>=b?K():V()},wt=L=>(K(!1,!0),O=L||E(),lt=!1,W.sessionId=O,O);return W.flush=()=>K(!1),W.endSession=Vt,W.startNewSession=wt,W.sessionId=O,W},Vy=t=>{try{return t()}catch{return null}},zO=async(t,e,{apiKey:r,getAuth:o})=>{let n={"Content-Type":"application/json","X-Analyze-Beacon":"1"};if(r&&(n["X-Analyze-Key"]=r),o)try{let s=await o();s&&(n.Authorization=`Bearer ${s}`)}catch{}try{return(await fetch(t,{method:"POST",headers:n,body:JSON.stringify(e),keepalive:!0,credentials:"omit",mode:"cors"})).ok}catch{return!1}};var HO={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},WO="\x1B[0m",tu=typeof v<"u"&&typeof v.document<"u",Hy=(t={})=>{let e=t.minLevel||null,r=console.error.bind(console),o=console.warn.bind(console),n=console.log.bind(console);return s=>{if(!s)return;let i=s.level==="error"?r:s.level==="warn"?o:n,a=`[analyze:${s.type}]`;if(tu)i(a,s);else{let c=HO[s.level]||"";i(`${c}${a}${WO}`,s)}}},Wy=(t,e={})=>{let r=e.max||t.config.cache?.max||500,o=new Array(r),n=0,s=0,i=a=>{o[n]=a,n=(n+1)%r,s<r&&s++};return t.__memory={push:i,snapshot:()=>{let a=new Array(s),c=(n-s+r)%r;for(let l=0;l<s;l++)a[l]=o[(c+l)%r];return a},query:(a={})=>{let c=t.__memory.snapshot(),l=a.sinceMs?Date.now()-a.sinceMs:0;return c.filter(f=>!(!f||a.level&&f.level!==a.level||a.type&&f.type!==a.type||l&&f.ts<l))},clear:()=>{n=0,s=0}},i},qy=(t={})=>{let e=t.url,r=t.batchMs!=null?t.batchMs:5e3,o=t.maxBatch||50;if(!e)return()=>{};let n=[],s=null,i=()=>{if(s&&(clearTimeout(s),s=null),!n.length)return;let c=JSON.stringify({events:n});n=[];let l=tu?new v.Blob([c],{type:"application/json"}):c;if(tu&&navigator.sendBeacon)try{navigator.sendBeacon(e,l);return}catch{}typeof fetch<"u"&&fetch(e,{method:"POST",headers:{"Content-Type":"application/json","X-Analyze-Beacon":"1"},body:c,keepalive:!0}).catch(()=>{})};tu&&(v.addEventListener("pagehide",i,{passive:!0}),v.addEventListener("beforeunload",i,{passive:!0}));let a=c=>{c&&(n.push(c),n.length>=o?i():s||(s=setTimeout(i,r)))};return a.flush=i,a},kk={console:Hy,memory:Wy,beacon:qy,remote:Qf},vk=(t,e)=>e.getDebug!=null||e.debug!=null?e:{...e,getDebug:()=>t.config.debug===!0},eu=t=>{let e=Array.isArray(t.config.sinks)?t.config.sinks:["console"],r=[];for(let o of e)if(typeof o=="function")r.push(o);else if(typeof o=="string"){let n=kk[o];if(!n)continue;r.push(o==="memory"?n(t,{}):n(o==="remote"?vk(t,{}):{}))}else if(o&&typeof o=="object"&&o.type){let n=kk[o.type];if(!n)continue;r.push(o.type==="memory"?n(t,o):n(o.type==="remote"?vk(t,o):o))}return r};R();var qO=typeof v<"u"&&typeof v.document<"u",KO=new Set(["password","hidden"]),Ck=(t,e)=>{let r=0,o=null,n=null;return(...s)=>{let i=Date.now();i-r>=e?(r=i,t(...s)):(n=s,o||(o=setTimeout(()=>{r=Date.now(),o=null,n&&(t(...n),n=null)},e-(i-r))))}},Ky="__analyzeKeyPath",ts=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[Ky])return e[Ky];let r=[],o=e,n=0,s=null;for(;o&&n<64;){if(o.getAttribute){let a=o.getAttribute("data-key");a&&(s==null&&(s=a),r.unshift(a))}o=o.parentNode,n++}let i;if(r.length)i={selector:null,key:s,path:r.join(" > "),tag:e.tagName?.toLowerCase()||null};else{let a=(e.tagName||"unknown").toLowerCase(),c=e.id?`#${e.id}`:"",l=e.className&&typeof e.className=="string"?"."+e.className.trim().split(/\s+/).slice(0,2).join("."):"";i={selector:`${a}${c}${l}`,key:null,path:null}}try{e[Ky]=i}catch{}return i},GO=(t,e)=>{if(e==="mask")return"***";if(e!=="redact"){if(e==="hash"){let r=0,o=String(t||"");for(let n=0;n<o.length;n++)r=(r<<5)-r+o.charCodeAt(n)|0;return`#${(r>>>0).toString(36)}`}return"***"}},YO=t=>!!(!t||t.tagName==="INPUT"&&KO.has(t.type)||Yf.test(t.name||"")||Yf.test(t.id||"")||t.dataset?.analyze==="skip"),ru=t=>{if(!qO)return;let e=t.config.capture,r=t.config.throttle,o=t.__teardown,n=(s,i,a,c)=>{s.addEventListener(i,a,c),o.push(()=>s.removeEventListener(i,a,c))};if(e.errors&&(n(v,"error",s=>{t.emit(X("error","error",{hook:"window.onerror",message:s.message||null,error:s.error||null,source:s.filename||null,line:s.lineno||null,col:s.colno||null}))}),n(v,"unhandledrejection",s=>{let i=s.reason,a=i instanceof Error?i:null;t.emit(X("error","error",{hook:"unhandledrejection",message:a?.message||(typeof i=="string"?i:"Unhandled promise rejection"),error:a}))})),e.pointer){n(v,"click",i=>{t.emit(X("pointer","info",{hook:"click",target:ts(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:Ek(i)}))},{passive:!0,capture:!0}),n(v,"dblclick",i=>{t.emit(X("pointer","info",{hook:"dblclick",target:ts(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),n(v,"contextmenu",i=>{t.emit(X("pointer","info",{hook:"contextmenu",target:ts(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=Ck(i=>{t.emit(X("pointer","trace",{hook:"pointermove",x:i.clientX,y:i.clientY}))},r.pointermove);n(v,"pointermove",s,{passive:!0})}if(e.keyboard&&n(v,"keydown",s=>{t.emit(X("keyboard","info",{hook:"keydown",code:s.code,key:s.key&&s.key.length===1?"\xB7":s.key,modifiers:Ek(s),target:ts(s)}))},{passive:!0,capture:!0}),e.forms){let s=i=>{let a=i.target;if(!a||!a.tagName||!["INPUT","TEXTAREA","SELECT"].includes(a.tagName))return;let l=YO(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=GO(a.value,t.config.maskStrategy)),t.emit(X("forms","info",{hook:i.type,target:ts(i),field:{name:a.name||null,type:a.type||a.tagName.toLowerCase()},value:u}))};n(v,"input",s,{passive:!0,capture:!0}),n(v,"change",s,{passive:!0,capture:!0}),n(v,"submit",i=>{t.emit(X("forms","info",{hook:"submit",target:ts(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=Ck(()=>{t.emit(X("scroll","trace",{hook:"scroll",x:v.scrollX,y:v.scrollY}))},r.scroll);n(v,"scroll",s,{passive:!0,capture:!0})}if(e.viewport){let s=Bs(()=>{t.emit(X("viewport","info",{hook:"resize",w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}))},r.resize);n(v,"resize",s,{passive:!0}),n(v,"orientationchange",()=>{t.emit(X("viewport","info",{hook:"orientationchange",orientation:typeof screen<"u"&&screen.orientation?screen.orientation.type:null}))},{passive:!0}),n(v.document,"visibilitychange",()=>{t.emit(X("viewport","info",{hook:"visibilitychange",hidden:v.document.hidden}))},{passive:!0}),t.emit(X("viewport","info",{hook:"initial",w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}))}if(e.console)for(let s of["log","warn","error","debug"]){let i=console[s];console[s]=function(...a){try{t.emit(X("console",s==="error"?"error":s==="warn"?"warn":"debug",{hook:`console.${s}`,args:a.map(Ak)}))}catch{}return i.apply(console,a)},o.push(()=>{console[s]=i})}if(e.performance&&typeof PerformanceObserver<"u")try{let s=new PerformanceObserver(a=>{for(let c of a.getEntries())t.emit(X("performance","info",{hook:c.entryType,name:c.name,startTime:c.startTime,duration:c.duration,value:c.value!=null?c.value:null}))}),i=["largest-contentful-paint","layout-shift","longtask","paint","first-input","event"];for(let a of i)try{s.observe({type:a,buffered:!0})}catch{}o.push(()=>s.disconnect())}catch{}},Ek=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),XO=t=>{let e={name:t.name||"Error",message:typeof t.message=="string"?t.message:String(t),stack:typeof t.stack=="string"?t.stack:null};return t.cause!==void 0&&(e.cause=Ak(t.cause)),e},Ak=t=>{if(t==null)return t;if(t instanceof Error)return XO(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};R();var JO=typeof v<"u"&&typeof v.document<"u",Tk=(t,e)=>{let r=t?.analyze;if(!r||!r.shouldCapture("network"))return;let o=e.phase==="error"?"error":"info";r.emit(X("network",o,{hook:`fetch.${e.phase}`,source:"symbo-fetch",...e}))},Ja=t=>{if(JO&&t.config.capture.network&&!t.__networkListeners){if(t.__networkListeners=!0,t.__teardown.push(()=>{t.__networkListeners=!1}),typeof v.fetch=="function"){let e=v.fetch.bind(v),r=function(o,n){if(n?.headers?.["X-Analyze-Beacon"]||!t.shouldCapture("network"))return e(o,n);let s=typeof o=="string"?o:o&&o.url||"",i=(n?.method||typeof o=="object"&&o?.method||"GET").toUpperCase(),a=typeof performance<"u"?performance.now():Date.now();return t.emit(X("network","info",{hook:"fetch.start",source:"window.fetch",url:s,method:i})),e(o,n).then(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;return t.emit(X("network",c.ok?"info":"warn",{hook:"fetch.success",source:"window.fetch",url:s,method:i,status:c.status,ok:c.ok,durationMs:l})),c}).catch(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;throw t.emit(X("network","error",{hook:"fetch.error",source:"window.fetch",url:s,method:i,error:c,durationMs:l})),c})};v.fetch=r,t.__teardown.push(()=>{v.fetch=e})}if(typeof v.XMLHttpRequest=="function"){let e=v.XMLHttpRequest,r=e.prototype.open,o=e.prototype.send;e.prototype.open=function(n,s){return this.__analyze={method:String(n).toUpperCase(),url:String(s)},r.apply(this,arguments)},e.prototype.send=function(n){let s=this.__analyze;if(!s||!t.shouldCapture("network"))return o.apply(this,arguments);let i=typeof performance<"u"?performance.now():Date.now();t.emit(X("network","info",{hook:"xhr.start",source:"xhr",url:s.url,method:s.method}));let a=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i,f=this.status>=200&&this.status<400;t.emit(X("network",f?"info":"warn",{hook:"xhr.success",source:"xhr",url:s.url,method:s.method,status:this.status,ok:f,durationMs:l}))},c=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i;t.emit(X("network","error",{hook:"xhr.error",source:"xhr",url:s.url,method:s.method,status:this.status,durationMs:l}))};return this.addEventListener("loadend",a),this.addEventListener("error",c),o.apply(this,arguments)},t.__teardown.push(()=>{e.prototype.open=r,e.prototype.send=o})}}};var ZO={errors:!0,warnings:!0,pointer:!1,keyboard:!1,forms:!1,scroll:!1,viewport:!1,network:!1,performance:!1,navigation:!1,console:!1,lifecycle:!1,state:!1,updates:!1,replay:!1,telemetry:!1},QO={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},tR={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},eR={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},rR=t=>{let e={...ZO,...t};return e.replay&&Object.assign(e,QO),e.telemetry&&Object.assign(e,tR),e.remote&&Object.assign(e,eR),Object.assign(e,t),e},oR=64,nR=()=>{if(typeof v>"u"||!v.location)return null;try{let e=new URLSearchParams(v.location.search).get("analyze");return e||null}catch{return null}},ou=(t={})=>{let e=t===!0?{}:{...t};e.capture=rR(e.capture||{});let r=nR();(r==="debug"||e.debug)&&(e.level="debug",e.debug=!0,e.capture={...e.capture,lifecycle:!0,state:!0,updates:!0,console:!0,network:!0}),r==="off"&&(e.enabled=!1),e.level=Xa(e.level||"warn"),e.cache={max:500,dedupeWindowMs:1e3,...e.cache||{}},e.throttle={pointermove:80,mousemove:80,scroll:100,resize:200,...e.throttle||{}},e.maskFormValues==null&&(e.maskFormValues=!0),e.maskStrategy||(e.maskStrategy="mask"),Array.isArray(e.sinks)||(e.sinks=["console","memory"]),Array.isArray(e.transformers)||(e.transformers=["enrich","summarize"]);let o={config:e,context:null,__ready:!1,__paused:!1,__preBuffer:[],__teardown:[],__pipeline:null,__sinks:null,__memory:null,__initialSnapshot:null},n=()=>{o.__pipeline||(o.__pipeline=Jf(o),o.__sinks=eu(o))};return o.shouldCapture=s=>o.config.enabled===!1?!1:!!o.config.capture[s],o.emit=s=>{if(s&&o.config.enabled!==!1&&!o.__paused&&Gf(s.level,o.config.level)){if(!o.__ready){if(s.level!=="error"&&!o.config.captureDuringHydration)return;o.__preBuffer.length<oR&&o.__preBuffer.push(s);return}n(),Ok(o,s)}},o.activate=s=>{if(o.context==null&&(o.context=s||null),o.__ready)return;o.__ready=!0;let i=o.__preBuffer;if(o.__preBuffer=[],i.length){n();for(let a of i)Ok(o,a)}try{ru(o)}catch(a){console.error("[analyze] browser attach error:",a)}try{Ja(o)}catch(a){console.error("[analyze] network attach error:",a)}for(let a of o.__onActivate||[])try{a(o)}catch(c){console.error("[analyze] onActivate error:",c)}},o.pause=()=>{o.__paused=!0},o.resume=()=>{o.__paused=!1},o.setLevel=s=>{o.config.level=Xa(s)},o.setCapture=(s,i)=>{if(o.config.capture[s]=!!i,s==="network"&&i&&o.__ready)try{Ja(o)}catch(a){console.error("[analyze] network attach error:",a)}},o.query=s=>o.__memory?o.__memory.query(s):[],o.snapshot=()=>o.__memory?o.__memory.snapshot():[],o.emitNetwork=s=>{if(!o.shouldCapture("network"))return;let i=s?.phase,a=i==="error"?"error":i==="success"&&s.ok===!1?"warn":"info";o.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:"network",level:a,hook:`fetch.${i||"unknown"}`,...s})},o.flush=()=>{if(o.__sinks)for(let s of o.__sinks)typeof s.flush=="function"&&s.flush()},o.startNewSession=s=>{let i=s||(typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),a=Array.isArray(o.config.sinks)?o.config.sinks:[];for(let c of a)c&&typeof c=="object"&&c.type==="remote"&&(c.sessionId=i);if(o.__sinks)for(let c of o.__sinks)typeof c.startNewSession=="function"&&c.startNewSession(i);return i},o.replay=()=>({initialSnapshot:o.__initialSnapshot,events:o.snapshot()}),o.destroy=()=>{for(let s of o.__teardown)try{s()}catch{}o.__teardown=[],o.__ready=!1,o.__paused=!0},o.__onActivate=[],o.onActivate=s=>{o.__onActivate.push(s)},o},Ok=(t,e)=>{let r=t.__pipeline(e);if(r==null)return;let o=Array.isArray(r)?r:[r];for(let n of o){if(typeof t.config.onEvent=="function")try{t.config.onEvent(n)}catch{}for(let s of t.__sinks)try{s(n)}catch(i){console.error("[analyze] sink error:",i)}}};var Jy={};P(Jy,{Inspect:()=>nu,inspectPlugin:()=>Xy});R();function Rk(t){return w(t)?t:T(t)?t.find(e=>w(e)):""}function Yy(t){if(!t)return;let e=t.__ref.__componentKey,r=t.extends&&Rk(t.extends),o=t.parent&&t.parent.childExtends&&Rk(t.parent.childExtends);return(e||r||o||"").split("_")[0].split(".")[0].split("+")[0]}function su(t){if(!t||!t.__ref)return;let{components:e,pages:r,editor:o}=t.context,n=Yy(t);return o&&o.onInitInspect&&!o.onInitInspect(n,t,t.state)?su(t.parent):n&&(e[n]||r[n])?t:su(t.parent)}var sR=(t,e,r)=>{let o=r.window||window;o.onkeydown=n=>{n.altKey&&n.shiftKey&&t.state.update({debugging:!0,preventSelect:!0},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0})},o.onkeyup=n=>{t.state.preventSelect&&(!n.altKey||!n.shiftKey)&&(t.state.replace({debugging:!1,preventSelect:!1},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0}),t.Inspector.state.update({area:!1}))}},nu={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:sR,onMousemove:(t,e,r)=>{let o=t.target.ref,n=su(o),s=e.Inspector.state;if(!n||!r.debugging||!n.__ref)return s.update({area:!1});let i=Yy(n),a=l=>{s.update({area:l,focusKey:i})},c=()=>{if(t.altKey&&t.shiftKey){let{x:l,y:f,width:u,height:d}=n.node.getBoundingClientRect(),h={x:l,y:f,width:u,height:d};if(!s.area)return a(h);s.area.x!==h.x&&a(h)}else s.area&&s.update({area:!1})};window.requestAnimationFrame(()=>{c(),window.requestAnimationFrame(c)})},onMousedown:(t,e,r)=>{if(!r.debugging)return;let o=t.target.ref,n=su(o);if(!n)return;let s=Yy(n);if(!s)return;let i=o.context.editor;if(i&&i.onInspect)return i.onInspect(s,o,o.state,{allowRouterWhileInspect:!0});let a=JSON.stringify({componentKey:`${s}`});return o.context.socket?.emit&&o.context.socket.emit("route",a),t.preventDefault(),t.stopPropagation(),!1},Inspector:{state:{},transition:"all, defaultBezier, X",position:"fixed",hide:(t,e)=>!(e.area&&e.parent.debugging),style:{boxShadow:"0 0 10px #3686F733, 0 0 0 3px #3686F766, 0 0 100vmax 100vmax #000A",zIndex:"9999999",borderRadius:"10px",pointerEvents:"none"},Span:{position:"absolute",margin:"A2 0",fontSize:"Z",color:"text",zIndex:"99999999",transition:"all, defaultBezier, X",textDecoration:"underline",fontWeight:"500",top:"100%",style:{boxShadow:"0 25px 10px 35px black",textShadow:"0 0 10px black"},text:"{{ focusKey }}"},onInit:({context:t})=>{let{components:e}=t;if(S(e)){let{Content:r,...o}=e;for(let n in o)Hn[n]||(o[n].__ref||(o[n].__ref={}),o[n].__ref.__componentKey||(o[n].__ref.__componentKey=n))}},onBeforeUpdate:(t,e,r)=>{let{area:o}=r,n=r.area&&r.parent.debugging,s;if(!n)s="display: none !important";else if(o){let{x:i,y:a,width:c,height:l}=o;s=`
84
+ `)}var B0={display:"d",position:"pos",padding:"p",paddingTop:"pt",paddingRight:"pr",paddingBottom:"pb",paddingLeft:"pl",paddingBlock:"pbl",paddingInline:"pin",margin:"m",marginTop:"mt",marginRight:"mr",marginBottom:"mb",marginLeft:"ml",marginBlock:"mbl",marginInline:"min",width:"w",height:"h",minWidth:"mnw",minHeight:"mnh",maxWidth:"mxw",maxHeight:"mxh",top:"t",right:"r",bottom:"b",left:"l",flex:"fx",flexDirection:"fxd",flexWrap:"fxw",flexGrow:"fxg",flexShrink:"fxs",flexBasis:"fxb",justifyContent:"jc",alignItems:"ai",alignSelf:"as",alignContent:"ac",gap:"g",rowGap:"rg",columnGap:"cg",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",gridColumn:"gc",gridRow:"gr",overflow:"of",overflowX:"ofx",overflowY:"ofy",fontSize:"fs",fontWeight:"fw",fontFamily:"ff",fontStyle:"fst",lineHeight:"lh",letterSpacing:"ls",textAlign:"ta",textDecoration:"td",textTransform:"tt",color:"c",background:"bg",backgroundColor:"bgc",backgroundImage:"bgi",border:"bd",borderRadius:"br",borderColor:"bdc",borderWidth:"bdw",borderStyle:"bds",boxShadow:"bxsh",opacity:"op",zIndex:"z",cursor:"cur",transition:"tr",transform:"tf",animation:"an",visibility:"vis",whiteSpace:"ws",wordBreak:"wb",objectFit:"obj",pointerEvents:"pe",userSelect:"us",boxSizing:"bxz",outline:"ol",listStyle:"lis",textOverflow:"txo",verticalAlign:"va",float:"fl",clear:"cl",content:"cnt",backdropFilter:"bdf",filter:"flt",resize:"rsz",appearance:"apr",fill:"fil",stroke:"stk",scrollBehavior:"sb",inset:"ins"};function U0(t,e){let r=B0[t]||Vr(t),o=La(e),n=`_${r}-${o}`,s=qn(t),i=J1[s],a=i?`${s}: ${e};${i}: ${e}`:`${s}: ${e}`,c=`.${n}{${a}}`;return`${n}
85
+ ${c}`}var J1={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select"},Z1="@media (hover: hover)",Q1=/(?:^|[^\\]):hover(?![\w-])/,V0=t=>typeof t=="string"&&(t.indexOf("{")!==-1||t.indexOf("}")!==-1);function H0(t){let e=t.split("\0"),r=[],o=[];for(let n=0;n+1<e.length;n+=2){let s=e[n],i=e[n+1];if(!i||V0(i))continue;let a=B0[s]||Vr(s),c=La(i),l=`_${a}-${c}`,f=qn(s);r.push(l),o.push(`.${l}{${f}:${i}}`)}return r.join(" ")+"\0"+o.join(`
86
+ `)}function z0(t,e,r){let o=t+e,n=`_c${Vr(o)}`,s=e.split("\0"),i="";for(let l=0;l+1<s.length;l+=2){let f=s[l],u=s[l+1];u&&(V0(u)||(i+=`${qn(f)}:${u};`))}let a,c;if(t.startsWith("@media"))c=`.${n}`,a=`${t}{${c}{${i}}}`;else if(t.startsWith(":")||t.startsWith("&")){let l=t.startsWith("&")?t.slice(1):t;c=`.${n}${l}`,a=`${c}{${i}}`}else t.includes("&")?(c=t.replace("&",`.${n}`),a=`${c}{${i}}`):(c=`.${n} ${t}`,a=`${c}{${i}}`);return r!==!1&&Q1.test(c)&&(a=`${Z1}{${a}}`),`${n}
87
+ ${a}`}var xy=null;function Uf(t){xy=t}var Pe={structuralHash:Nf,deepEqual:jf,mergeStructural:by,overwriteDeep:_y,shortHash:Vr,toKebab:qn,sanitizeValue:La,batchShortHash:j0,atomicCssClass:U0,batchAtomicCss:H0,compoundCssClass:z0},W0=!1,Bf=null;function q0(t){return Bf||(Bf=import(t||"@symbo.ls/wasm/pkg").then(e=>(e.structuralHash&&(Pe.structuralHash=e.structuralHash),e.deepEqual&&(Pe.deepEqual=e.deepEqual),e.mergeStructural&&(Pe.mergeStructural=e.mergeStructural),e.overwriteDeep&&(Pe.overwriteDeep=e.overwriteDeep),e.shortHash&&(Pe.shortHash=e.shortHash),e.toKebab&&(Pe.toKebab=e.toKebab),e.sanitizeValue&&(Pe.sanitizeValue=e.sanitizeValue),e.batchShortHash&&(Pe.batchShortHash=e.batchShortHash),e.atomicCssClass&&(Pe.atomicCssClass=e.atomicCssClass),e.batchAtomicCss&&(Pe.batchAtomicCss=e.batchAtomicCss),e.compoundCssClass&&(Pe.compoundCssClass=e.compoundCssClass),W0=!0,xy&&e.batchAtomicCss&&xy({batchAtomicCss:e.batchAtomicCss,compoundCssClass:e.compoundCssClass}),!0)).catch(e=>(console.debug("[smbls] WASM not available, using JS fallbacks:",e.message),!1)),Bf)}function K0(){return W0}R();var Ma={};P(Ma,{CDN_PROVIDERS:()=>ue,DOMQL_EVENTS:()=>Ud,DOMQ_PROPERTIES:()=>_r,ENV:()=>op,HTML_TAGS:()=>Jo,METHODS:()=>qo,METHODS_EXL:()=>Is,NODE_ENV:()=>ve,OPTIONS:()=>oi,PACKAGE_MANAGER_TO_CDN:()=>Ar,PARSED_DOMQ_PROPERTIES:()=>Ps,PROPS_METHODS:()=>xr,STATE_METHODS:()=>ro,STATE_PROPERTIES:()=>Bd,SVG_TAGS:()=>u_,TYPES:()=>vs,UNIVERSAL_RESERVED_KEYS:()=>_l,addCaching:()=>el,addContext:()=>tl,addExtend:()=>Tp,addExtends:()=>Kt,addItemAfterEveryElement:()=>Ad,addProtoToArray:()=>As,addRef:()=>Jc,applyCSS:()=>Sy,applyDependentState:()=>Kp,applyEvent:()=>al,applyEventUpdate:()=>cl,applyExtends:()=>h_,applyProps:()=>Xs,arrayContainsOtherArray:()=>xd,arraysEqual:()=>Od,arrayzeValue:()=>fo,buildImgSrcset:()=>Mi,buildSourcesAndImg:()=>Fi,cache:()=>Zp,call:()=>gh,captureSnapshot:()=>yh,checkForStateTypes:()=>Hp,checkIfInherits:()=>il,checkIfStringIsInArray:()=>Id,clone:()=>Hd,cloneAndMergeArrayExtend:()=>Vs,cloneFunction:()=>dp,concatAddExtends:()=>Cp,copyJavaScriptToClipboard:()=>Fh,copyStringToClipboard:()=>Mh,createBasedOnType:()=>Xc,createElement:()=>Vp,createElementExtends:()=>Nc,createExtends:()=>zs,createExtendsFromKeys:()=>Zo,createExtendsStack:()=>Vc,createIfConditionFlag:()=>pp,createInheritedState:()=>zp,createKey:()=>Bs,createNestedObject:()=>Xd,createNestedObjectByKeyPath:()=>qp,createObjectWithoutPrototype:()=>Pc,createParent:()=>Zc,createPath:()=>Qc,createProps:()=>Js,createPropsStack:()=>Gc,createRoot:()=>Up,createScope:()=>Yp,createSnapshotId:()=>js,customDecodeURIComponent:()=>jd,customEncodeURIComponent:()=>Nd,cutArrayAfterValue:()=>Cd,cutArrayBeforeValue:()=>vd,debounce:()=>Us,debounceOnContext:()=>lp,decodeNewlines:()=>Fd,deepClone:()=>ft,deepContains:()=>Gd,deepDefaults:()=>Ri,deepDestringifyFunctions:()=>le,deepExtend:()=>Fc,deepMerge:()=>st,deepMergeExtends:()=>je,deepStringifyFunctions:()=>$s,defineSetter:()=>ph,destringifyGlobalScope:()=>Ms,detectHeightOnInit:()=>Sh,detectInfiniteLoop:()=>tp,document:()=>Q,encodeNewlines:()=>Md,error:()=>co,excludeKeysFromObject:()=>rp,exec:()=>ut,extendCachedRegistry:()=>Ep,extendStackRegistry:()=>Ws,extractArrayExtend:()=>Ks,fetchLibraryData:()=>vl,fibonacciNumberByIndex:()=>kh,filterArrays:()=>Rd,filterArraysFast:()=>Pd,finalizeExtends:()=>Hc,findClosestNumber:()=>kl,findClosestNumberInFactory:()=>Dh,findInheritedState:()=>sl,findKeyPosition:()=>$d,flattenExtend:()=>Qo,formatDate:()=>wh,generateHash:()=>$c,generateHeadArrayTags:()=>Sl,generateKey:()=>Ns,generateMetaTags:()=>Ph,get:()=>fh,getActiveRoute:()=>iy,getCDNDirUrl:()=>xl,getCDNUrl:()=>Ee,getCapitalCaseKeys:()=>Pp,getCdnProviderFromConfig:()=>nn,getChildStateInKey:()=>nl,getChildren:()=>hi,getContext:()=>wi,getCookie:()=>bp,getDB:()=>Ei,getEmotionStylesheet:()=>Uh,getExtendsInElement:()=>Op,getExtendsStack:()=>Hs,getExtendsStackRegistry:()=>Mc,getFrequencyInArray:()=>wd,getHashedExtend:()=>qs,getImportMapScript:()=>xh,getInObjectByPath:()=>Qd,getLocalStorage:()=>xp,getNev:()=>ap,getPageMetadata:()=>Ih,getParentStateInKey:()=>ol,getPath:()=>gi,getQuery:()=>Ai,getRef:()=>dh,getRoot:()=>bi,getRootContext:()=>xi,getRootData:()=>_i,getRootState:()=>yi,getRootStateInKey:()=>rl,getSpreadChildren:()=>Ip,global:()=>yd,hasFunction:()=>Ne,hasHandlerPlugin:()=>Go,hasOwnProperty:()=>Wd,hashContent:()=>ln,inheritChildExtends:()=>Bc,inheritChildPropsExtends:()=>jc,inheritParentProps:()=>Zs,inheritRecursiveChildExtends:()=>Uc,init:()=>ur,initProps:()=>Np,is:()=>Wt,isArray:()=>T,isBoolean:()=>Ec,isContextComponent:()=>Dp,isCyclic:()=>ep,isDOMNode:()=>zt,isDate:()=>Tc,isDefined:()=>bt,isDevelopment:()=>Sr,isEmpty:()=>Oc,isEmptyObject:()=>qd,isEqualDeep:()=>Rc,isFunction:()=>A,isHtmlElement:()=>Ss,isLocal:()=>ip,isLoudDevRuntime:()=>Pt,isMalformedDependency:()=>sn,isMethod:()=>mh,isMobile:()=>mp,isNode:()=>Qe,isNot:()=>_d,isNotProduction:()=>so,isNull:()=>Ac,isNumber:()=>Fe,isObject:()=>S,isObjectLike:()=>H,isPhoto:()=>vh,isPolyglotWritableKey:()=>er,isProduction:()=>wr,isStaging:()=>sp,isState:()=>Wp,isString:()=>w,isStringFunction:()=>up,isTest:()=>Dc,isTesting:()=>np,isUndefined:()=>Tt,isUniversallyReservedKey:()=>bh,isUnresolvableDependency:()=>lo,isValidDependencyMap:()=>an,isValidHtmlTag:()=>Sp,isWrappedLibrary:()=>Ii,joinArrays:()=>Ho,jointStacks:()=>Ap,keys:()=>yl,lastLevel:()=>Ff,lastPathname:()=>Mf,loadCssFile:()=>Th,loadJavascript:()=>Oh,loadJavascriptFile:()=>Ch,loadJavascriptFileEmbedSync:()=>Ah,loadJavascriptFileSync:()=>Eh,loadRemoteCSS:()=>Rh,loadRemoteScript:()=>cn,log:()=>hh,logGroupIf:()=>gp,logIf:()=>hp,lookdown:()=>ch,lookdownAll:()=>lh,lookup:()=>ah,lowercaseFirstLetter:()=>eo,makeObjectWithoutPrototype:()=>Kd,map:()=>Vd,mapStringsWithContextComponents:()=>Gs,markPolyglotSeeded:()=>Ue,matchRoute:()=>oy,matchesComponentNaming:()=>Be,memoize:()=>fp,merge:()=>gt,mergeSharedLibraries:()=>Di,nextElement:()=>ki,normalizeIgnoreList:()=>Pi,normalizeLibraryKey:()=>fn,objectToString:()=>Ls,objectizeStringProperty:()=>Ys,overwrite:()=>Fs,overwriteDeep:()=>qt,overwriteShallow:()=>no,overwriteState:()=>Gp,parse:()=>bl,parseDeep:()=>di,parseQuery:()=>ny,parseRoutePattern:()=>ry,pickupElementFromProps:()=>qc,pickupPropsFromElement:()=>Wc,polyglotSeededKeys:()=>ri,previousElement:()=>vi,propExists:()=>Mp,propertizeElement:()=>Kc,propertizeUpdate:()=>Lp,reinit:()=>wy,remove:()=>U_,removeChars:()=>Nh,removeCookie:()=>_p,removeDuplicateProps:()=>ti,removeDuplicatesInArray:()=>zo,removeFromArray:()=>Sd,removeFromObject:()=>Yd,removeNestedKeyByPath:()=>Jd,removeValueFromArray:()=>Es,removeValueFromArrayAll:()=>Ed,reorderArrayByValues:()=>Td,replaceLiteralsWithObjectFields:()=>to,replaceOctalEscapeSequences:()=>Ld,resolveAsset:()=>Gt,resolveHandler:()=>Yo,resolveSharedLibraries:()=>Lh,returnValueAsText:()=>Yc,router:()=>Ge,runGuards:()=>sy,runPluginHook:()=>At,scratchSystem:()=>vn,scratchUtils:()=>Rr,self:()=>bd,set:()=>So,setActiveRootState:()=>mi,setCookie:()=>yp,setHashedExtend:()=>Lc,setInObjectByPath:()=>Zd,setLocalStorage:()=>wp,setNodeStyles:()=>ml,setProps:()=>uh,setPropsPrototype:()=>Qs,sharedLibrary:()=>$h,splitPackageSpecifier:()=>Ti,spotByPath:()=>pi,srcsetFor:()=>un,stringIncludesAny:()=>Os,stringToObject:()=>zd,stripVersionRangePrefix:()=>Oi,swapItemsInArray:()=>kd,syncProps:()=>ei,toCamelCase:()=>$i,toDashCase:()=>Li,toDescriptionCase:()=>Bh,toTitleCase:()=>jh,toggleFullscreen:()=>_h,triggerEventOn:()=>kr,triggerEventOnUpdate:()=>Xp,trimStringFromSymbols:()=>Dd,unstackArrayOfObjects:()=>Cs,update:()=>Fp,updateProps:()=>jp,variables:()=>Ci,verbose:()=>en,warn:()=>Si,window:()=>v});R();R();var eO=C(),G0=(t=eO,e)=>{let r=S(e.localFile)?e.localFile:{},o=ft(r.designSystem||{});return st(t,o,ee)},rO={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},Kn=(t,e)=>{let r=!e||e===":root",o={};for(let n in t)if(n.startsWith("@media")){let s=r?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`;o[n]={[s]:t[n]}}else r?o[n]=t[n]:o[`${e}${n}, ${n} ${e}`]=t[n];return o},ur=(t,e=rO)=>{let r=G0(t||{},e),o=e.scopeSelector||":root",n=e.globalTheme;if(typeof window<"u"&&window.location){let p=new URLSearchParams(window.location.search).get("globalTheme");p&&(n=p)}let s=So({verbose:e.verbose,useReset:e.useReset,useFontImport:e.useFontImport,useVariable:e.useVariable,useSvgSprite:e.useSvgSprite,useDocumentTheme:e.useDocumentTheme,useIconSprite:e.useIconSprite,useDefaultConfig:e.useDefaultConfig,globalTheme:n,themeRoot:e.themeRoot,files:e.files,assets:e.assets,...r},{newConfig:e.newConfig,config:e.config});s&&(s.scopeSelector=o);let i=Vi(s.font,s.files),a=s.useReset,c=s.useVariable,l=s.useFontImport,f=s.useSvgSprite,u=t.svg,d=s.useIconSprite,h=t.icons;l&&kt(i),c&&(kt({[o]:s.CSS_VARS}),s.CSS_MEDIA_VARS&&kt(Kn(s.CSS_MEDIA_VARS,o))),a&&kt(s.reset);let g=s.animation;if(g){let p={};for(let m in g)p[`@keyframes ${m}`]=g[m];kt(p)}return(u||f)&&ma(s.svg,{document:e.document}),(h||d)&&wo(s.icons,{document:e.document}),s},Vf={},wy=(t,e=Vf)=>{let r=G0(t||{},e),o=e.scopeSelector||":root",n=So({verbose:!1,...r});return e.preventInject||(kt({[o]:n.CSS_VARS}),n.CSS_MEDIA_VARS&&kt(Kn(n.CSS_MEDIA_VARS,o)),kt(n.reset)),n},Sy=(t,e=Vf)=>{kt(t)},oO=(t,e=Vf)=>{let r=e.scopeSelector||":root";kt({[r]:t.CSS_VARS}),t.CSS_MEDIA_VARS&&kt(Kn(t.CSS_MEDIA_VARS,r))};var nO=(t,e=Vf)=>{};R();var Y0=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,sO=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},ky={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},Fa=(t,e)=>{if(!e)return t;let r=Array.isArray(e)?e:e.split("."),o=t;for(let n of r){if(!o||!o[n])return null;o=o[n]}return o},X0=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=ky:e.router=gt(e.router||{},ky);let r=e.router,o=async(s,i)=>{let a=s.context?.window||v,c=sO(r);if(!c){if(!a.location)return;let{pathname:f,search:u,hash:d}=a.location;f=Y0(f),c=f+u+d}let l=s;if(r.customRouterElement){let f=Fa(s,r.customRouterElement);f&&(l=f,s.routes&&(l.routes=s.routes))}l.routes&&await Ge(c,l,{},{initialRender:!0,pushState:!1})},n=!Tt(t.onRenderRouter);return r&&r.initRouter&&!n&&(t.onRenderRouter=o),iO(e,r),r},vy=(t,e)=>{if(e.router===!1)return;let r=e.router||ky;if(!r.popState)return;let o=e.utils&&e.utils.router?e.utils.router:Ge,n=e.window||v,s=async i=>{let{pathname:a,search:c,hash:l}=n.location;a=Y0(a);let f=a+c+l,u=t;if(r.customRouterElement){let d=Fa(t,r.customRouterElement);d&&(u=d,t.routes&&(u.routes=t.routes))}await u.call("router",f,u,{},{pushState:!1,scrollToTop:!1,level:0,event:i})};n.addEventListener("popstate",s),e.__teardowns=e.__teardowns||[],e.__teardowns.push(()=>n.removeEventListener("popstate",s))},iO=(t,e)=>{let{components:r}=t;if(e&&e.injectRouterInLinkComponent)return st(r.Link||r["smbls.Link"],r.RouterLink||r["smbls.RouterLink"])};R();var Cy=v&&v.location?v.location.host.includes("dev."):Sr(),J0=Cy?"http://localhost:8080/get":"https://api.symbols.app/get",aO={endpoint:J0},Z0=async(t,e=aO)=>{let r=e.endpoint||J0,o=e.serviceRoute?T(e.serviceRoute)?e.serviceRoute.map(s=>s.toLowerCase()+"=true").join("&"):e.serviceRoute:"",n;try{return n=await globalThis.fetch(r+"/?"+o,{method:"GET",headers:{"Content-Type":"application/json","X-AppKey":t,"X-Metadata":e.metadata}}),await n.json()}catch(s){if(A(e.onError))return e.onError(s);console.error(s)}},cO=async(t,e)=>{let{editor:r}=e;if(r&&r.remote){let o=await Z0(t,r),n=Cy||e.isDevelopment?le(o):le(o.releases[0]);r.serviceRoute?T(r.serviceRoute)?r.serviceRoute.forEach(s=>{qt(e[s],n[s.toLowerCase()])}):qt(e[r.serviceRoute],n):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{qt(e[s],n[s.toLowerCase()])})}return e},lO=async(t,e,r)=>{let{editor:o}=e;if(o&&o.remote){let n=await Z0(t,o),s=Cy||e.isDevelopment?le(n):le(n.releases[0]);r(s)}},Q0=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await cO(t,e)}catch(r){console.error(r)}},tk=(t,e,r,o)=>{if(e&&r.editor)try{r.editor.async&&lO(e,r,o||(n=>{let s=n.designSystem;S(s)&&r.utils.init(s),S(n.state)&&t.state.set(n.state)}))}catch(n){console.error(n)}};var Na=t=>{if(!t||t.__destroyed)return!1;let e=t.context;if(!e)return t.__destroyed=!0,!1;if(Array.isArray(e.__teardowns)){for(let r of e.__teardowns)try{r()}catch(o){console.error("[smbls] destroy teardown error:",o)}e.__teardowns.length=0}try{Br(t)}catch(r){console.error("[smbls] dispose error:",r)}if(e.fetch&&e.fetch.__resolved&&delete e.fetch.__resolved,e.fetch&&e.fetch.__resolving&&delete e.fetch.__resolving,e.db&&e.db.__resolved&&delete e.db.__resolved,e.db&&e.db.__resolving&&delete e.db.__resolving,e.analyze?.destroy)try{e.analyze.destroy()}catch(r){console.error("[analyze] destroy error:",r)}return t.__destroyed=!0,!0};var Ty={};P(Ty,{Helmet:()=>ok,applyMetadata:()=>Gn,default:()=>gO,extractMetadata:()=>dO,generateHeadHtml:()=>hO,helmetPlugin:()=>Ay,resolveMetadata:()=>Hr});R();var fO={title:{tag:"title"},description:{tag:"meta",attr:"name",key:"description"},keywords:{tag:"meta",attr:"name",key:"keywords"},robots:{tag:"meta",attr:"name",key:"robots"},author:{tag:"meta",attr:"name",key:"author"},canonical:{tag:"link",attr:"rel",key:"canonical",valueAttr:"href"},image:{tag:"meta",attr:"property",key:"og:image"},url:{tag:"meta",attr:"property",key:"og:url"},siteName:{tag:"meta",attr:"property",key:"og:site_name"},type:{tag:"meta",attr:"property",key:"og:type"},locale:{tag:"meta",attr:"property",key:"og:locale"},"og:title":{tag:"meta",attr:"property",key:"og:title"},"og:description":{tag:"meta",attr:"property",key:"og:description"},"og:image":{tag:"meta",attr:"property",key:"og:image"},"og:url":{tag:"meta",attr:"property",key:"og:url"},"og:type":{tag:"meta",attr:"property",key:"og:type"},"og:site_name":{tag:"meta",attr:"property",key:"og:site_name"},"og:locale":{tag:"meta",attr:"property",key:"og:locale"},"twitter:card":{tag:"meta",attr:"name",key:"twitter:card"},"twitter:title":{tag:"meta",attr:"name",key:"twitter:title"},"twitter:description":{tag:"meta",attr:"name",key:"twitter:description"},"twitter:image":{tag:"meta",attr:"name",key:"twitter:image"},"twitter:site":{tag:"meta",attr:"name",key:"twitter:site"},"theme-color":{tag:"meta",attr:"name",key:"theme-color"}},uO=t=>{if(t.tag==="link")return`link[${t.attr}="${t.key}"]`;if(t.tag&&!t.attr&&!t.key)return t.tag;if(t.tag&&t.attr&&t.key)return`${t.tag}[${t.attr}="${t.key}"]`},ek=t=>le({v:t}).v,rk=(t,e,r,o)=>{try{return ut(t,e,r)}catch(n){console.warn(`[helmet] metadata factory for "${o}" threw; treating as unset:`,n&&n.message||n);return}},Hr=(t,e,r)=>{if(!t)return{};let o=t;w(o)&&Ne(o)&&(o=ek(o));let n=A(o)?rk(o,e,r,"metadata"):S(o)?{...o}:{};if(!S(n))return{};for(let s in n){let i=n[s];w(i)&&Ne(i)&&(i=ek(i)),A(i)?i=rk(i,e,r,s):w(i)&&Ne(i)&&(i=void 0),w(i)&&i.includes("{{")&&e?.call&&(i=e.call("replaceLiteralsWithObjectFields",i,r)),n[s]=i}return n},dO=(t,e="/",r,o)=>{let s=(t.pages||{})[e],i={};if(t.integrations?.seo&&(i={...t.integrations.seo}),t.app?.metadata){let c=Hr(t.app.metadata,r,o);i={...i,...c}}let a=new Set;if(s){let c=s.metadata||s.helmet||{},l=Hr(c,r,o);for(let f in l)a.add(f);i={...i,...l},!i.title&&s.state?.title&&(i.title=s.state.title,a.add("title")),!i.description&&s.state?.description&&(i.description=s.state.description,a.add("description"))}if(i.title||(i.title=t.name||"Symbols"),i.title&&(a.has("title")||!i["og:title"])&&(a.has("og:title")||(i["og:title"]=i.title)),i.description&&(a.has("description")||!i["og:description"])&&(a.has("og:description")||(i["og:description"]=i.description)),i.title&&!i["twitter:title"]&&(i["twitter:title"]=i.title),i.description&&!i["twitter:description"]&&(i["twitter:description"]=i.description),i["og:url"]||i.url){let c=(i["og:url"]||i.url||"").replace(/\/$/,"");if(c&&e&&e!=="/"){let l=e.startsWith("/")?e:"/"+e;i["og:url"]=c+l}}if(t.files)for(let c in i){let l=i[c];if(typeof l=="string"&&l.length>0&&!l.startsWith("/")&&!l.startsWith("http")){let f=t.files[l];f?.src&&(i[c]=f.src)}}return i},pO=(t,e)=>{let r=e.createElement(t.tag);return t.attr&&r.setAttribute(t.attr,t.key),(e.head||e.querySelector("head")).appendChild(r),r},ja=t=>{let e=5381,r=String(t);for(let o=0;o<r.length;o++)e=(e*33^r.charCodeAt(o))>>>0;return e.toString(36)},Ey=(t,e,r,o)=>{let n=t.head||t.querySelector("head");if(!n)return;let s=new Map;for(let a of n.querySelectorAll(`[${e}]`))s.set(a.getAttribute(e),a);let i=new Set;for(let a of r)i.add(a);for(let[a,c]of s)i.has(a)||c.remove();for(let a of r){if(s.has(a))continue;let c=o(a);c&&(c.setAttribute(e,a),n.appendChild(c))}},Gn=(t,e)=>{if(!(!S(t)||!e)){for(let r in t){let o=t[r];if(o==null||r==="jsonLd"||r==="styles"||r==="scripts")continue;let n=fO[r];if(!n)continue;let s=uO(n),i=e.querySelector(s)||pO(n,e);i&&(r==="title"?i.textContent=o:n.valueAttr?i.setAttribute(n.valueAttr,o):i.setAttribute("content",o))}if(Array.isArray(t.jsonLd)){let o=t.jsonLd.filter(s=>s!=null).map(s=>w(s)?s:JSON.stringify(s)),n=o.map(ja);Ey(e,"data-smbls-jsonld",n,s=>{let i=n.indexOf(s),a=e.createElement("script");return a.setAttribute("type","application/ld+json"),a.textContent=o[i],a})}if(Array.isArray(t.styles)){let r=t.styles.filter(n=>n!=null&&String(n).trim()),o=r.map(ja);Ey(e,"data-smbls-style",o,n=>{let s=o.indexOf(n),i=e.createElement("style");return i.textContent=String(r[s]),i})}if(Array.isArray(t.scripts)){let r=t.scripts.filter(n=>n&&(w(n)?n.trim():n.src)),o=r.map(n=>w(n)?n:String(n.src));Ey(e,"data-smbls-script",o,n=>{let s=o.indexOf(n),i=r[s],a=e.createElement("script");return w(i)?a.setAttribute("src",i):(i.src&&a.setAttribute("src",i.src),i.type&&a.setAttribute("type",i.type),i.async&&(a.async=!0),i.defer&&(a.defer=!0),i.integrity&&a.setAttribute("integrity",i.integrity),i.crossorigin&&a.setAttribute("crossorigin",i.crossorigin),i.referrerpolicy&&a.setAttribute("referrerpolicy",i.referrerpolicy),i.nomodule&&(a.noModule=!0),i.body&&(a.textContent=String(i.body))),a})}}},ct=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,r=>e[r])},hO=t=>{let e=['<meta charset="UTF-8">'],r=new Set(["charset","jsonLd","styles","scripts"]),o=!1;for(let[n,s]of Object.entries(t)){if(!s&&s!==0&&s!==!1||r.has(n)||typeof s=="function")continue;if(n==="title"){e.push(`<title>${ct(s)}</title>`);continue}if(n==="viewport"){o||(e.push(`<meta name="viewport" content="${ct(s)}">`),o=!0);continue}if(n==="canonical"){e.push(`<link rel="canonical" href="${ct(s)}">`);continue}if(n==="icon"||n==="favicon"){let f=ct(s),u=f.endsWith(".svg")?' type="image/svg+xml"':f.endsWith(".png")?' type="image/png"':"";e.push(`<link rel="icon" href="${f}"${u}>`);continue}if(n==="favicons"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${ct(h)}"`).join(" ");e.push(`<link rel="icon" ${u}>`)}else typeof f=="string"&&e.push(`<link rel="icon" href="${ct(f)}">`)});continue}if(n==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${ct(h)}"`).join(" ");e.push(`<link rel="alternate" ${u}>`)}});continue}let i=["og:","article:","product:","fb:","profile:","book:","business:","music:","video:"],a=["twitter:","DC:","DCTERMS:"],c=i.some(f=>n.startsWith(f)),l=a.some(f=>n.startsWith(f));if(n.startsWith("http-equiv:")){let f=n.replace("http-equiv:","");e.push(`<meta http-equiv="${ct(f)}" content="${ct(s)}">`)}else if(n.startsWith("itemprop:")){let f=n.replace("itemprop:","");e.push(`<meta itemprop="${ct(f)}" content="${ct(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>e.push(`<meta property="${ct(n)}" content="${ct(f)}">`)):e.push(`<meta property="${ct(n)}" content="${ct(s)}">`):l?e.push(`<meta name="${ct(n)}" content="${ct(s)}">`):Array.isArray(s)?s.forEach(f=>e.push(`<meta name="${ct(n)}" content="${ct(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.push(`<meta name="${ct(n)}" content="${ct(s)}">`)}if(o||e.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),Array.isArray(t.jsonLd))for(let n of t.jsonLd){if(n==null)continue;let s=typeof n=="string"?n:JSON.stringify(n),i=String(s).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${ja(s)}">${i}<\/script>`)}if(Array.isArray(t.styles))for(let n of t.styles){if(n==null||!String(n).trim())continue;let s=String(n).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${ja(s)}">${s}</style>`)}if(Array.isArray(t.scripts))for(let n of t.scripts){if(!n)continue;let s=typeof n=="string",i=s?n:n.src;if(!i&&!(n&&n.body))continue;let a=[];i&&a.push(`src="${ct(i)}"`),s||(n.type&&a.push(`type="${ct(n.type)}"`),n.async&&a.push("async"),n.defer&&a.push("defer"),n.integrity&&a.push(`integrity="${ct(n.integrity)}"`),n.crossorigin&&a.push(`crossorigin="${ct(n.crossorigin)}"`),n.referrerpolicy&&a.push(`referrerpolicy="${ct(n.referrerpolicy)}"`),n.nomodule&&a.push("nomodule"));let c=` data-smbls-script="${ct(i||ja(n.body||""))}"`;if(!s&&n.body){let l=String(n.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${a.join(" ")}${c}>${l}<\/script>`)}else e.push(`<script ${a.join(" ")}${c}><\/script>`)}return e.join(`
88
+ `)},ok={define:{metadata:(t,e,r)=>{let o=e.context?.document||typeof document<"u"&&document;if(!o)return;let n=Z(()=>{let s=Hr(t,e,e.state);Gn(s,o);let i=e.state?.root;S(i)&&(i.$helmet=s)});e.__ref?.__effects&&e.__ref.__effects.push(n)}}},Ay={name:"helmet",create(t){if(!t.metadata)return;let e=t.context?.document||typeof document<"u"&&document;if(!e)return;let r=Z(()=>{let o=t.metadata;if(!o)return;let n=Hr(o,t,t.state);Gn(n,e)});t.__ref?.__effects&&t.__ref.__effects.push(r)},update(t){let e=t.metadata;if(!e)return;let r=t.context?.document||typeof document<"u"&&document;if(!r)return;let o=Hr(e,t,t.state);Gn(o,r)}},gO=ok;Cr();var nk=(t,e,r,o)=>{t&&ui(t,e,r,o)},sk=(t,e,r)=>{if(!t)return;let o=e.context?.document||typeof document<"u"&&document;if(!o)return;let n=Hr(t,e,r);Gn(n,o)},ik=async(t,e)=>{if(!t)return;let r={tag:"fragment",...t},o=async()=>{await e.set(r,{preventDefineUpdate:"$router"})};return e.lazyLoad?window.requestAnimationFrame(o):await o(),r},Yn={routes:t=>t,metadata:sk,fetch:nk,$router:ik},ak=(t={})=>{let e={routes:r=>r};return t.metadata!==!1&&(e.metadata=sk),t.fetch!==!1&&(e.fetch=nk),t.router!==!1&&(e.$router=ik),e};var Oy={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},Hf={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},zf={...Oy,router:Hf},mO={state:{},pages:{},components:{},router:Hf,define:Yn},zr=mO;R();R();var ck=(t,e)=>H(t.extends)?t.extends:[];R();var Ry={};P(Ry,{default:()=>_O,getActiveLang:()=>Jn,getLanguages:()=>Ua,getLocalStateLang:()=>qa,initPolyglot:()=>qf,loadTranslations:()=>Ha,polyglotPlugin:()=>Zn,setLang:()=>za,translate:()=>Va,upsertTranslation:()=>Wa});R();var fk="smbls_lang",yO="smbls_t_",bO="smbls_tv_",Xn={get(t){try{return window?.localStorage.getItem(t)}catch{return null}},set(t,e){try{window?.localStorage.setItem(t,e)}catch(r){console.warn("[polyglot] localStorage unavailable:",r.message)}},remove(t){try{window?.localStorage.removeItem(t)}catch(e){console.warn("[polyglot] localStorage unavailable:",e.message)}}},Ba={};function Jn(){let t=this?.context,e=t?.polyglot;return(this?.state?.root||t?.state?.root)?.lang||e?.defaultLang||"en"}function Ua(){let t=this?.context?.polyglot;return t?t.languages?t.languages:t.translations?Object.keys(t.translations):[]:[]}var Wf=(t,e)=>{if(!t||!e)return;if(t[e]!==void 0)return t[e];if(e.indexOf(".")===-1)return;let r=e.split("."),o=t;for(let n=0;n<r.length;n++){if(o==null)return;o=o[r[n]]}return o},lk=(t,e,r)=>{let o=e.lastIndexOf(".");if(o===-1)return t[e+"_"+r];let n=Wf(t,e.substring(0,o));if(n!=null)return n[e.substring(o+1)+"_"+r]};function Va(t,e){if(!t)return"";let r=this?.context,o=r?.polyglot,n=e||this.call("getActiveLang"),s=this?.state;if(s){let l=lk(s,t,n);if(l!==void 0)return l}if(o?.translations){let l=o.translations[n];if(l){let f=Wf(l,t);if(f!==void 0)return f}}let a=(s?.root||r?.state?.root)?.translations;if(a){let l=a[n];if(l){let f=Wf(l,t);if(f!==void 0)return f}}let c=o?.defaultLang||"en";if(s){let l=lk(s,t,c);if(l!==void 0)return l}if(o?.translations){let l=o.translations[c];if(l){let f=Wf(l,t);if(f!==void 0)return f}}return t}async function Ha(t){let e=this?.context,r=e?.polyglot,o=this?.state?.root||e?.state?.root;if(!r||!o)return;let n=r.storagePrefix||yO,s=r.storageVersionPrefix||(r.storagePrefix?r.storagePrefix.replace(/_$/,"v_"):bO);if(r.translations&&r.translations[t]&&!r.fetch||!r.fetch||r._fetchFailed?.[t])return;if(!o.translations?.[t]){let c=Xn.get(n+t);if(c)try{let l=JSON.parse(c),f={translations:{...o.translations||{}}};f.translations[t]=l,o.update&&o.update(f)}catch(l){console.warn("[polyglot] Failed to apply language update:",l.message)}}let i=(r.storagePrefix||"smbls")+":"+t;if(Ba[i])return Ba[i];let a=this;return Ba[i]=(async()=>{try{let c=r.fetch,l=parseInt(Xn.get(s+t),10)||0,f,u,d;if(A(c)){let g=await c(t,l,a);if(!g||g.changed===!1)return;f=g.translations||g.data||g,u=g.version||0,d=!0}else if(S(c)){let g=a.getDB||(()=>e.fetch),p=A(g)?await g.call(a):e.fetch;if(!p)return;let m=c.rpc||c.from||"get_translations_if_changed",b={p_lang:t,p_cached_version:l,...c.params||{}},_=await p.rpc({from:m,params:b});if(_.error)throw r._fetchFailed||(r._fetchFailed={}),r._fetchFailed[t]=!0,_.error;let y=_.data;if(!y||!y.changed)return;f=y.translations||{},u=y.version||0,d=!0}else return;if(!d||!f)return;Xn.set(n+t,JSON.stringify(f)),u&&Xn.set(s+t,String(u));let h={translations:{...o.translations||{}}};h.translations[t]=f,o.update&&o.update(h)}catch(c){if(r.verbose!==!1){let l=c?.message||c?.details||(typeof c=="object"?JSON.stringify(c):String(c));console.warn("[polyglot] Failed to load translations for",t,"-",l)}}finally{delete Ba[i]}})(),Ba[i]}async function za(t){let e=this?.context,r=e?.polyglot,o=this?.state?.root||e?.state?.root;if(!o||this.call("getActiveLang")===t)return;let n=r?.storageLangKey||fk;Xn.set(n,t),r?.fetch&&await this.call("loadTranslations",t),e?.state&&(e.state.lang=t);let s=r?.translations?.[t],i={lang:t},a=l=>er(e,l,o);if(s&&typeof s=="object")for(let l in s){if(!a(l))continue;let f=s[l];(Array.isArray(f)||typeof f=="string"||typeof f=="number")&&(i[l]=f)}o.update&&o.update(i);for(let l in i)l!=="lang"&&Ue(e,l);if(s&&typeof s=="object")for(let l in s){if(!a(l))continue;let f=s[l];if(f&&typeof f=="object"&&!Array.isArray(f)&&o[l]&&typeof o[l]=="object"&&!Array.isArray(o[l])){for(let u in f)o[l][u]=f[u];Ue(e,l)}}let c=this?.context?.document||globalThis.document;if(c&&s){let l=c.querySelectorAll("[data-key]");for(let f of l){let u=f.ref;if(!u)continue;let d=u.__ref?.__exec?.text;if(typeof d=="string"&&d.includes("{{"))try{let h=u.call("replaceLiteralsWithObjectFields",d,u.state);h!=null&&f.textContent!==h&&(f.textContent=h)}catch{}}}}async function Wa(t,e,r){let o=this?.context,n=o?.polyglot,s=this?.state?.root||o?.state?.root;if(s?.translations?.[e]&&(s.translations[e][t]=r),n?.translations?.[e]&&(n.translations[e][t]=r),n?.fetch&&S(n.fetch)){let i=this.getDB||(()=>o.fetch),a=A(i)?await i.call(this):o.fetch;if(!a)return;let c=n.fetch.table||"translations",l=await a.upsert({from:c,data:{key:t,lang:e,text:r}});if(l?.error)throw l.error;return l.data}}async function qf(){let t=this?.context,e=t?.polyglot;if(!e)return;let r=this?.state?.root||t?.state?.root;if(!r)return;let o=e.storageLangKey||fk,s=Xn.get(o)||e.defaultLang||r.lang||"en";r.update&&r.lang!==s&&r.update({lang:s}),e.fetch&&!(e.translations&&e.translations[s])&&await this.call("loadTranslations",s)}function qa(t){try{let e=this?.context?.polyglot,o=(this?.state?.root||this?.context?.state?.root)?.lang||e?.defaultLang||"en",n=this?.state;if(!n)return"";let s=t.lastIndexOf(".");if(s===-1)return n[t+o]??"";let i=t.substring(0,s).split("."),a=n;for(let c=0;c<i.length;c++){if(a==null)return"";a=a[i[c]]}return a==null?"":a[t.substring(s+1)+o]??""}catch{return""}}var Zn={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,qf.call(t))}},_O=Zn;Cr();var Iy={};P(Iy,{SYSTEM_METRICS:()=>Ka,capsizeHandler:()=>Py,capsizePlugin:()=>Gf,computeCapsize:()=>uk,default:()=>xO,resolveFontSizePx:()=>dk,resolveMetrics:()=>pk});var Ka={arial:{capHeight:716,ascent:1854,descent:-434,lineGap:67,unitsPerEm:2048},helvetica:{capHeight:714,ascent:770,descent:-230,lineGap:0,unitsPerEm:1e3},"helvetica neue":{capHeight:714,ascent:952,descent:-213,lineGap:28,unitsPerEm:1e3},georgia:{capHeight:1419,ascent:1878,descent:-449,lineGap:0,unitsPerEm:2048},"times new roman":{capHeight:1356,ascent:1825,descent:-443,lineGap:87,unitsPerEm:2048},"courier new":{capHeight:1170,ascent:1705,descent:-615,lineGap:0,unitsPerEm:2048},verdana:{capHeight:1489,ascent:2059,descent:-430,lineGap:0,unitsPerEm:2048},roboto:{capHeight:1456,ascent:1900,descent:-500,lineGap:0,unitsPerEm:2048},"open sans":{capHeight:1462,ascent:2189,descent:-600,lineGap:0,unitsPerEm:2048},inter:{capHeight:1490,ascent:2048,descent:-512,lineGap:0,unitsPerEm:2048},lato:{capHeight:1434,ascent:1974,descent:-426,lineGap:0,unitsPerEm:2e3},"source sans":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},"source sans pro":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},"source sans 3":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},montserrat:{capHeight:700,ascent:968,descent:-251,lineGap:0,unitsPerEm:1e3},poppins:{capHeight:700,ascent:1050,descent:-350,lineGap:100,unitsPerEm:1e3},raleway:{capHeight:710,ascent:1e3,descent:-250,lineGap:0,unitsPerEm:1e3},"dm sans":{capHeight:700,ascent:992,descent:-312,lineGap:0,unitsPerEm:1e3},nunito:{capHeight:705,ascent:1011,descent:-353,lineGap:0,unitsPerEm:1e3},"work sans":{capHeight:684,ascent:930,descent:-243,lineGap:0,unitsPerEm:1e3},manrope:{capHeight:708,ascent:980,descent:-300,lineGap:0,unitsPerEm:1e3},"ibm plex sans":{capHeight:698,ascent:1025,descent:-275,lineGap:0,unitsPerEm:1e3},"plus jakarta sans":{capHeight:720,ascent:1060,descent:-300,lineGap:0,unitsPerEm:1e3}},Kf=t=>parseFloat(t.toFixed(4)),uk=(t,e,r)=>{let{ascent:o,descent:n,lineGap:s,unitsPerEm:i,capHeight:a}=e,c=Math.abs(n),l=o+c+s,f=r!==void 0?r:l/i*t,u=f/t,d=l/i,h=(o-a+s/2)/i-(u-d)/2,g=(c+s/2)/i-(u-d)/2;return{fontSize:`${Kf(t/16)}rem`,lineHeight:`${Kf(f)}px`,capHeightTrim:`${Kf(-h)}em`,baselineTrim:`${Kf(-g)}em`}},dk=(t,e)=>{if(typeof t=="number")return t;let r=e?.designSystem;if(!r)return null;let{typography:o}=r;if(o?.sequence){let s=String(t).toUpperCase(),i=o.sequence[s];if(i)return i.decimal||i.val}let n=parseFloat(t);return isNaN(n)?null:typeof t=="string"&&t.endsWith("rem")?n*(r.typography?.browserDefault||16):n},pk=(t,e)=>{let o=e?.designSystem?.font_family||{};if(t){let s=o[t];if(s?.metrics)return s.metrics;let i=String(t).toLowerCase().replace(/['"]/g,"").trim();if(Ka[i])return Ka[i]}let n=o.default||Object.keys(o)[0];if(n){let s=o[n];if(s?.metrics)return s.metrics;if(s?.value&&Array.isArray(s.value))for(let i of s.value){let a=i.toLowerCase().replace(/['"]/g,"").trim();if(Ka[a])return Ka[a]}}return null},Py=(t,e,r,o)=>{if(!t)return;let n=dk(e.fontSize,o);if(!n)return;let s=pk(e.fontFamily,o);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=uk(n,s,i),f={};return e.lineHeight||(f.lineHeight=a),f["::before"]={content:'""',marginBottom:c,display:"table"},f["::after"]={content:'""',marginTop:l,display:"table"},f},Gf={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},xO=Gf;var jy={};P(jy,{PRESERVE_VALUE_KEYS:()=>$t,SKIP_INLINE_KEYS:()=>Wr,abbrToProp:()=>Dt,decode:()=>bk,encode:()=>gk,expand:()=>Ao,isComponentKey:()=>Ie,isSelectorKey:()=>De,parse:()=>To,parseFurther:()=>Ro,propToAbbr:()=>Se,shorten:()=>Ga,shorthandPlugin:()=>Ya,stringify:()=>Eo,stringifyFurther:()=>Oo});var Se={attr:"at",childExtends:"cex",childExtendsRecursive:"cexr",childProps:"cp",children:"ch",childrenAs:"cha",class:"cl",content:"cnt",context:"ctx",data:"dt",extends:"ext",hide:"hd",html:"htm",if:"if",ignoreChildExtends:"icex",key:"ky",query:"qy",routes:"rt",scope:"scp",show:"shw",state:"st",style:"sy",tag:"tg",text:"tx",align:"aln",boxSize:"bsz",flow:"fl",heightRange:"hr",horizontalInset:"hi",round:"rnd",shadow:"shd",size:"sz",templateColumns:"tcol",verticalInset:"vi",widthRange:"wr",wrap:"wrp",aspectRatio:"ar",blockSize:"bks",boxSizing:"bxs",height:"h",inlineSize:"ins",margin:"m",marginBottom:"mb",marginLeft:"ml",marginRight:"mr",marginTop:"mt",maxBlockSize:"mxbs",maxHeight:"mxh",maxInlineSize:"mxis",maxWidth:"mxw",minBlockSize:"mnbs",minHeight:"mnh",minInlineSize:"mnis",minWidth:"mnw",padding:"p",paddingBottom:"pb",paddingInline:"pil",paddingLeft:"pl",paddingRight:"pr",paddingTop:"pt",width:"w",alignContent:"ac",alignItems:"ai",alignSelf:"as",flex:"fx",flexBasis:"fxb",flexDirection:"fxd",flexFlow:"fxf",flexGrow:"fxg",flexShrink:"fxs",flexWrap:"fxw",gap:"g",justifyContent:"jc",justifyItems:"ji",justifySelf:"js",order:"od",placeContent:"pcn",placeItems:"pit",placeSelf:"psl",rowGap:"rg",columnGap:"cg",gridArea:"ga",gridAutoColumns:"gac",gridAutoFlow:"gaf",gridAutoRows:"gar",gridColumn:"gc",gridColumnEnd:"gce",gridColumnStart:"gcs",gridRow:"gr",gridRowEnd:"gre",gridRowStart:"grs",gridTemplateAreas:"gta",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",bottom:"bot",float:"flt",inset:"ist",left:"lft",position:"pos",right:"rgt",top:"tp",zIndex:"zi",clear:"clr",contain:"ctn",cursor:"cur",display:"d",opacity:"op",overflow:"ov",overflowX:"ovx",overflowY:"ovy",pointerEvents:"pe",resize:"rsz",userSelect:"us",visibility:"vis",background:"bg",backgroundAttachment:"bga",backgroundBlendMode:"bgbm",backgroundClip:"bgcl",backgroundColor:"bgc",backgroundImage:"bgi",backgroundOrigin:"bgo",backgroundPosition:"bgp",backgroundPositionX:"bgpx",backgroundPositionY:"bgpy",backgroundRepeat:"bgr",backgroundRepeatX:"bgrx",backgroundRepeatY:"bgry",backgroundSize:"bgs",color:"c",theme:"thm",themeModifier:"thmm",border:"bd",borderBottom:"bdb",borderBottomLeftRadius:"bdblr",borderBottomRightRadius:"bdbrr",borderCollapse:"bdcl",borderColor:"bdc",borderImage:"bdi",borderImageOutset:"bdio",borderImageRepeat:"bdir",borderImageSlice:"bdis",borderImageSource:"bdisrc",borderImageWidth:"bdiw",borderLeft:"bdl",borderRadius:"bdr",borderRight:"bdrg",borderSpacing:"bdsp",borderStyle:"bdst",borderTop:"bdt",borderTopLeftRadius:"bdtlr",borderTopRightRadius:"bdtrr",borderWidth:"bdw",outline:"ol",outlineColor:"olc",outlineOffset:"olo",outlineStyle:"ols",outlineWidth:"olw",boxShadow:"bxsh",textShadow:"txsh",direction:"dir",fontDisplay:"fdi",fontFamily:"ff",fontFeatureSettings:"ffs",fontKerning:"fk",fontOpticalSizing:"fos",fontPalette:"fpl",fontSize:"fs",fontSizeAdjust:"fsa",fontSmooth:"fsm",fontStretch:"fsr",fontStyle:"fsy",fontSynthesis:"fsyn",fontVariant:"fv",fontVariationSettings:"fvs",fontWeight:"fw",hyphens:"hyp",letterSpacing:"ls",lineHeight:"lh",tabSize:"tsz",textAlign:"ta",textDecoration:"td",textDecorationColor:"tdc",textDecorationLine:"tdl",textDecorationStyle:"tds",textIndent:"ti",textOverflow:"tov",textStroke:"tsk",textTransform:"tt",unicodeBidi:"ub",verticalAlign:"va",whiteSpace:"ws",wordBreak:"wbr",wordSpacing:"wsp",wordWrap:"wwr",writingMode:"wm",captionSide:"cps",counterIncrement:"ci",counterReset:"cr",emptyCells:"ec",listStyle:"lst",listStyleImage:"lsi",listStylePosition:"lsp",listStyleType:"lsty",quotes:"qt",tableLayout:"tl",columnCount:"cc",columnFill:"cf",columnRule:"crl",columnRuleColor:"crlc",columnRuleStyle:"crls",columnRuleWidth:"crlw",columnSpan:"cspn",columnWidth:"cwi",columns:"col",backdropFilter:"bdf",boxDecorationBreak:"bxdb",clipPath:"cpth",filter:"fil",isolation:"iso",mixBlendMode:"mbm",objectFit:"obf",objectPosition:"obp",perspective:"prs",perspectiveOrigin:"prso",willChange:"wc",transform:"tf",transformOrigin:"tfo",transformStyle:"tfs",transition:"trn",transitionDelay:"trnd",transitionDuration:"trndr",transitionProperty:"trnp",transitionTimingFunction:"trntf",animation:"an",animationDelay:"and",animationDirection:"andr",animationDuration:"andur",animationFillMode:"anfm",animationIterationCount:"anic",animationName:"ann",animationPlayState:"anps",animationTimingFunction:"antf",scrollBehavior:"sb",scrollMargin:"smr",scrollMarginBottom:"smrb",scrollMarginLeft:"smrl",scrollMarginRight:"smrr",scrollMarginTop:"smrt",scrollPadding:"spd",scrollPaddingBottom:"spdb",scrollPaddingLeft:"spdl",scrollPaddingRight:"spdr",scrollPaddingTop:"spdt",scrollSnapAlign:"ssa",scrollSnapStop:"sss",scrollSnapType:"sst",breakAfter:"bka",breakBefore:"bkb",breakInside:"bki",pageBreakAfter:"pbka",pageBreakBefore:"pbkb",pageBreakInside:"pbki",accessKey:"ack",className:"cn",contentEditable:"ced",contextMenu:"cmu",draggable:"drg",hidden:"hid",id:"id",is:"is",lang:"lng",nonce:"nnc",spellCheck:"spc",tabIndex:"tbi",title:"ttl",translate:"trl",accept:"acp",acceptCharset:"accs",action:"act",autoComplete:"atc",autoFocus:"atf",capture:"cap",challenge:"chg",checked:"chk",cols:"cls",colSpan:"csn",controls:"ctl",default:"def",defer:"dfr",disabled:"dis",encType:"ect",form:"frm",formAction:"fac",formEncType:"fect",formMethod:"fme",formNoValidate:"fnv",formTarget:"ftg",high:"hgh",inputMode:"imd",kind:"knd",label:"lbl",list:"lis",loop:"lp",low:"lw",max:"mx",maxLength:"mxl",method:"mtd",min:"mn",minLength:"mnl",multiple:"mul",muted:"mut",name:"nm",open:"opn",optimum:"opt",pattern:"ptn",placeholder:"phd",readOnly:"ro",required:"req",reversed:"rev",rows:"rws",rowSpan:"rsn",selected:"sel",span:"spn",start:"srt",step:"stp",type:"typ",value:"val",download:"dl",href:"hrf",hrefLang:"hrl",ping:"png",referrerPolicy:"rfp",rel:"rl",target:"tgt",allow:"alw",allowFullScreen:"afs",allowPaymentRequest:"apr",alt:"alt",cellPadding:"cpg",cellSpacing:"csg",cite:"cit",coords:"crd",crossOrigin:"cor",dateTime:"dtm",fetchPriority:"fpr",headers:"hds",httpEquiv:"hte",integrity:"itg",isMap:"ism",keyType:"kty",loading:"ldg",manifest:"mft",media:"mda",poster:"pst",preload:"prl",radioGroup:"rdg",sandbox:"sbx",scoped:"scod",seamless:"sml",shape:"shp",sizes:"szs",src:"src",srcDoc:"srd",srcLang:"srl",srcSet:"srs",useMap:"ump",ariaActiveDescendant:"aad",ariaAtomic:"aat",ariaBusy:"abu",ariaChecked:"achk",ariaControls:"acl",ariaCurrent:"acr",ariaDescribedBy:"adb",ariaDetails:"adt",ariaDisabled:"adis",ariaDropEffect:"ade",ariaErrorMessage:"aem",ariaExpanded:"aexp",ariaGrabbed:"agr",ariaHasPopup:"ahp",ariaHidden:"ahid",ariaInvalid:"ainv",ariaLabel:"alb",ariaLabelledBy:"alby",ariaLive:"alv",ariaModal:"amod",ariaMultiSelectable:"ams",ariaOrientation:"aor",ariaOwns:"aow",ariaPosInSet:"apis",ariaPressed:"aprs",ariaReadOnly:"aro",ariaRelevant:"arl",ariaRequired:"areq",ariaSelected:"asel",ariaSetSize:"assz",ariaValueMax:"avmx",ariaValueMin:"avmn",ariaValueNow:"avn",role:"role",onInit:"@in",onRender:"@rn",onUpdate:"@up",onStateChange:"@sc",onStateUpdate:"@su",onClick:"@ck",onContextMenu:"@cm",onDblClick:"@dc",onMouseDown:"@md",onMouseEnter:"@me",onMouseLeave:"@ml",onMouseMove:"@mm",onMouseOut:"@mo",onMouseOver:"@mv",onMouseUp:"@mu",onKeyDown:"@kd",onKeyPress:"@kp",onKeyUp:"@ku",onBlur:"@bl",onFocus:"@fc",onFocusIn:"@fi",onFocusOut:"@fo",onBeforeInput:"@bi",onChange:"@cg",onFormData:"@fd",onInput:"@ip",onInvalid:"@iv",onReset:"@rs",onSearch:"@sr",onSelect:"@sl",onSubmit:"@sm",onTouchCancel:"@tc",onTouchEnd:"@te",onTouchMove:"@tm",onTouchStart:"@ts",onPointerCancel:"@pc",onPointerDown:"@pd",onPointerEnter:"@pe",onPointerLeave:"@ple",onPointerMove:"@pm",onPointerOut:"@po",onPointerOver:"@pov",onPointerUp:"@pu",onDrag:"@dg",onDragEnd:"@dge",onDragEnter:"@dgn",onDragLeave:"@dgl",onDragOver:"@dgo",onDragStart:"@dgs",onDrop:"@dp",onResize:"@rz",onScroll:"@scl",onWheel:"@wh",onCopy:"@cy",onCut:"@ct",onPaste:"@pt",onCompositionEnd:"@cpe",onCompositionStart:"@cps",onCompositionUpdate:"@cpu",onAnimationEnd:"@ae",onAnimationIteration:"@ai",onAnimationStart:"@as",onTransitionEnd:"@tre",onTransitionStart:"@trs",onAbort:"@ab",onCanPlay:"@cap",onCanPlayThrough:"@cpt",onDurationChange:"@duc",onEmptied:"@em",onEncrypted:"@enc",onEnded:"@end",onError:"@er",onLoad:"@ld",onLoadedData:"@ldd",onLoadedMetadata:"@ldm",onPause:"@pa",onPlay:"@pl",onPlaying:"@plg",onProgress:"@prg",onRateChange:"@rc",onSeeked:"@sk",onSeeking:"@skg",onStalled:"@stl",onSuspend:"@ssp",onTimeUpdate:"@tu",onVolumeChange:"@vc",onWaiting:"@wt",icon:"ico",iconText:"ict",lookup:"lkp",router:"rtr",shapeModifier:"shpm"},Dt=Object.create(null);for(let t in Se)Dt[Se[t]]=t;var Dy=Object.create(null);for(let t in Se){let e=Se[t];if(Dy[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${Dy[e]}"`);Dy[e]=t}var $t=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),Wr=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function Ie(t){return/^[A-Z]/.test(t)}function De(t){return/^[:@.!$>&]/.test(t)||t.startsWith("> ")}function gk(t){if(!t||typeof t!="object")return"";let e=[];for(let r in t){let o=t[r];if(typeof o=="function"||o!==null&&typeof o=="object"&&!Array.isArray(o)||o===void 0)continue;let n=Se[r]||r;if(o===!0)e.push(n);else if(o===!1)e.push("!"+n);else if(Array.isArray(o)){let s=o.map(i=>Yf(i));e.push(n+":"+s.join(","))}else e.push(n+":"+Yf(o))}return e.join(" ")}function Yf(t){return String(t).replace(/ /g,"_")}function Ga(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Ga(r):r});let e={};for(let r in t){let o=t[r];if(Ie(r)){e[r]=$y(o);continue}if(De(r)){e[r]=$y(o);continue}let n=Se[r]||r;if($t.has(r)||$t.has(n)){e[n]=o;continue}e[n]=$y(o)}return e}function $y(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Ga(e):e}):typeof t=="object"?Ga(t):t}function Eo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(o){return o!==null&&typeof o=="object"?Eo(o):o});let e={},r=[];for(let o in t){let n=t[o];if(Ie(o)){e[o]=hk(n);continue}if(De(o)){e[o]=hk(n);continue}let s=Se[o]||o;if($t.has(o)||$t.has(s)){e[s]=n;continue}if(typeof n=="function"){e[s]=n;continue}if(n==null){e[s]=n;continue}if(Wr.has(o)||Wr.has(s)){e[s]=n;continue}if(Array.isArray(n)){if(n.some(function(a){return a!==null&&typeof a=="object"})){e[s]=n.map(function(a){return a!==null&&typeof a=="object"?Eo(a):a});continue}if(n.length<=1){e[s]=n;continue}r.push(s+":"+n.map(Yf).join(","));continue}if(typeof n=="object"){e[s]=Eo(n);continue}n===!0?r.push(s):n===!1?r.push("!"+s):typeof n=="number"||typeof n=="string"&&(n.includes(",")||n.includes("_"))?e[s]=n:r.push(s+":"+Yf(n))}return r.length&&(e.in=r.join(" ")),e}function hk(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Eo(e):e}):typeof t=="object"?Eo(t):t}function bk(t){if(!t||typeof t!="string")return{};let e={},r=_k(t);for(let o of r){if(o.startsWith("!")){let c=o.slice(1),l=Dt[c]||c;e[l]=!1;continue}let n=o.indexOf(":");if(n===-1){let c=Dt[o]||o;e[c]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(mk);continue}e[a]=mk(i)}return e}function _k(t){return t.trim().split(/\s+/).filter(Boolean)}function mk(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function yk(t){return t.replace(/_/g," ")}function wO(t){if(!t||typeof t!="string")return{};let e={},r=_k(t);for(let o of r){if(o.startsWith("!")){let c=o.slice(1),l=Dt[c]||c;e[l]=!1;continue}let n=o.indexOf(":");if(n===-1){let c=Dt[o]||o;e[c]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(yk);continue}e[a]=yk(i)}return e}function Ao(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Ao(r):r});let e={};for(let r in t){let o=t[r];if(Ie(r)){e[r]=Ly(o);continue}let n=Dt[r]||r;if(De(r)&&n===r){e[r]=Ly(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=Ly(o)}return e}function Ly(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Ao(e):e}):typeof t=="object"?Ao(t):t}function To(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?To(r):r});let e={};if(typeof t.in=="string"){let r=wO(t.in);for(let o in r)e[o]=r[o]}for(let r in t){if(r==="in")continue;let o=t[r];if(Ie(r)){e[r]=My(o);continue}let n=Dt[r]||r;if(De(r)&&n===r){e[r]=My(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=My(o)}return e}function My(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?To(e):e}):typeof t=="object"?To(t):t}function xk(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function SO(t){let e="",r=0;for(;r<t.length;){if(t[r]==="\\"&&r+1<t.length){let o=t[r+1];if(o===","||o==="_"||o==="\\"){e+=o,r+=2;continue}}t[r]==="_"?e+=" ":e+=t[r],r++}return e}function kO(t){let e=[],r="",o=0;for(;o<t.length;){if(t[o]==="\\"&&o+1<t.length){r+=t[o]+t[o+1],o+=2;continue}if(t[o]===","){e.push(r),r="",o++;continue}r+=t[o],o++}return e.push(r),e}function wk(t){if(t==null||typeof t!="object"||Array.isArray(t))return!1;let e=Object.keys(t);return e.length===1&&e[0]==="in"&&typeof t.in=="string"}function Oo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(o){return o!==null&&typeof o=="object"?Oo(o):o});let e={},r=[];for(let o in t){let n=t[o];if(Ie(o)){let i=Sk(n);e[o]=wk(i)?i.in:i;continue}if(De(o)){let i=Sk(n);e[o]=wk(i)?i.in:i;continue}let s=Se[o]||o;if($t.has(o)||$t.has(s)){e[s]=n;continue}if(typeof n=="function"){e[s]=n;continue}if(n==null){e[s]=n;continue}if(Wr.has(o)||Wr.has(s)){e[s]=n;continue}if(Array.isArray(n)){if(n.some(function(a){return a!==null&&typeof a=="object"})){e[s]=n.map(function(a){return a!==null&&typeof a=="object"?Oo(a):a});continue}if(n.length<=1){e[s]=n;continue}r.push(s+":"+n.map(xk).join(","));continue}if(typeof n=="object"){e[s]=Oo(n);continue}if(n===!0){r.push(s);continue}if(n===!1){r.push("!"+s);continue}if(typeof n=="number"){r.push(s+":#"+n);continue}r.push(s+":"+xk(n))}return r.length&&(e.in=r.join(" ")),e}function Sk(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Oo(e):e}):typeof t=="object"?Oo(t):t}function kk(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):SO(t)}function Fy(t){if(!t||typeof t!="string")return{};let e={},r=t.trim().split(/\s+/).filter(Boolean);for(let o of r){if(o.startsWith("!")){let l=o.slice(1),f=Dt[l]||l;e[f]=!1;continue}let n=o.indexOf(":");if(n===-1){let l=Dt[o]||o;e[l]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s,c=kO(i);if(c.length>1){e[a]=c.map(kk);continue}e[a]=kk(i)}return e}function Ro(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Ro(r):r});let e={};if(typeof t.in=="string"){let r=Fy(t.in);for(let o in r)e[o]=r[o]}for(let r in t){if(r==="in")continue;let o=t[r];if(Ie(r)){typeof o=="string"?e[r]=Fy(o):e[r]=Ny(o);continue}let n=Dt[r]||r;if(De(r)&&n===r){typeof o=="string"?e[r]=Fy(o):e[r]=Ny(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=Ny(o)}return e}function Ny(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Ro(e):e}):typeof t=="object"?Ro(t):t}var vO={shorten:Ao,stringify:To,stringifyFurther:Ro};function CO(t,e){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(o=>e(o));let r={};for(let o in t){let n=t[o];r[o]=n&&typeof n=="object"?e(n):n}return r}var EO=["components","pages","snippets"],Ya={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let o=vO[e===!0?"shorten":e];if(o){for(let n of EO)t[n]&&(t[n]=CO(t[n],o));t.app&&typeof t.app=="object"&&(t.app=o(t.app))}}};var Jy={};P(Jy,{LEVELS:()=>Xa,analyzePlugin:()=>ts,attachBrowserListeners:()=>nu,attachNetworkListeners:()=>Za,classifyEvent:()=>qy,createAnalyzeState:()=>su,createBeaconSink:()=>Yy,createConsoleSink:()=>Ky,createDedupe:()=>Hy,createEnrich:()=>Uy,createMemorySink:()=>Gy,createPipeline:()=>Qf,createRedact:()=>Zf,createRemoteSink:()=>eu,createSample:()=>zy,createSummarize:()=>Vy,default:()=>ts,emitFetchEvent:()=>Pk,makeEvent:()=>X,meetsLevel:()=>Xf,normalizeLevel:()=>Ja,resolveSinks:()=>ou,summarizeElement:()=>Po});var AO=0,TO=()=>`${Date.now().toString(36)}-${(AO++).toString(36)}`,X=(t,e,r={})=>({id:TO(),ts:Date.now(),type:t,level:e,...r}),OO=t=>{let e=[],r=t,o=0;for(;r&&o<32;)r.key!=null&&e.unshift(String(r.key)),r=r.parent,o++;return e.join(" > ")},Po=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:OO(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var Qn=t=>t?.context?.analyze,RO={init:{category:"lifecycle",type:"lifecycle",level:"debug"},create:{category:"lifecycle",type:"lifecycle",level:"debug"},render:{category:"lifecycle",type:"lifecycle",level:"debug"},beforeRemove:{category:"lifecycle",type:"lifecycle",level:"debug"},remove:{category:"lifecycle",type:"lifecycle",level:"debug"}},PO=(t,{category:e,type:r,level:o})=>n=>{let s=Qn(n);!s||!s.shouldCapture(e)||s.emit(X(r,o,{hook:t,element:Po(n)}))},vk=t=>(e,r)=>{let o=Qn(e);!o||!o.shouldCapture("state")||o.emit(X("state","debug",{hook:t,element:Po(e),changedKeys:r?.changedKeys||null}))},ts={name:"analyze",error(t,e){let r=Qn(t);if(!r||r.config.enabled===!1||!r.shouldCapture("errors"))return;let o=e?.error||e?.err||(e instanceof Error?e:null);r.emit(X("error","error",{hook:e?.hook||"error",element:Po(t),error:o,message:o?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=Qn(t);e&&(!e.shouldCapture("navigation")&&!e.shouldCapture("lifecycle")||e.emit(X("navigation","info",{hook:"renderRouter",route:t.context?.routerOptions?.currentRoute||null})))},beforeUpdate(t){let e=Qn(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=Qn(t);if(!e||!e.shouldCapture("updates"))return;let r=null;t.__ref?.__analyzeUpdateStart!=null&&(r=(typeof performance<"u"?performance.now():Date.now())-t.__ref.__analyzeUpdateStart,t.__ref.__analyzeUpdateStart=null),e.emit(X("update","debug",{hook:"update",element:Po(t),durationMs:r}))},beforeStateUpdate:vk("beforeStateUpdate"),stateUpdate:vk("stateUpdate")};for(let[t,e]of Object.entries(RO))ts[t]=PO(t,e);R();var Xa={error:0,warn:1,info:2,debug:3,trace:4};var Xf=(t,e)=>{let r=Xa[t],o=Xa[e];return r==null||o==null?!0:r<=o},Ja=t=>Xa[t]!=null?t:"warn";R();var Jf=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var IO=(t,e)=>{for(let r of e)if(r instanceof RegExp){if(r.test(t))return!0}else if(typeof r=="string"&&t.toLowerCase().includes(r.toLowerCase()))return!0;return!1},DO=(t,e)=>{if(e!=="redact"){if(e==="hash"){let r=0,o=String(t);for(let n=0;n<o.length;n++)r=(r<<5)-r+o.charCodeAt(n)|0;return`#${(r>>>0).toString(36)}`}return"***"}},By=(t,e,r,o)=>{if(o>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>By(s,e,r,o+1));let n={};for(let s of Object.keys(t))if(IO(s,e)||Jf.test(s)){let a=DO(t[s],r);a!==void 0&&(n[s]=a)}else n[s]=By(t[s],e,r,o+1);return n},Zf=(t=[],e="mask")=>{let r=Array.isArray(t)?t:[t];return o=>{if(!o)return o;let{id:n,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:h,...g}=o,p=By(g,r,e,0);return{id:n,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:h,...p}}};var Uy=t=>{let e=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,r=typeof navigator<"u"?navigator.userAgent:null,o=t.config.buildHash||null,n=t.config.appId||null;return s=>{if(!s)return s;let i=t.context?.routerOptions?.currentRoute||null,a=v,c=a&&a.innerWidth?{w:a.innerWidth,h:a.innerHeight}:null;return{...s,session:e,app:{id:n,build:o,route:i},meta:{ua:r,viewport:c}}}},Vy=()=>t=>{if(!t)return t;if(t.element&&typeof t.element=="object"){let e=t.element;(e.node||e.parent||e.__ref)&&(t={...t,element:{key:e.key!=null?String(e.key):null,name:e.__name||e.name||null,tag:e.tag||null,component:e.component||null}})}return t.error instanceof Error&&(t={...t,error:{name:t.error.name,message:t.error.message,stack:t.error.stack}}),t},Hy=(t=1e3,e=500)=>{let r=new Map;return o=>{if(!o)return o;let n=`${o.type}:${o.level}:${o.message||""}:${o.error?.message||""}`,s=r.get(n),i=o.ts||Date.now();if(s&&i-s<t)return null;if(r.set(n,i),r.size>e){let a=Math.ceil(e/10),c=0;for(let l of r.keys()){if(c++>=a)break;r.delete(l)}}return o}},zy=t=>e=>{if(!e)return e;let r=t[e.type];return r==null||r>=1?e:Math.random()>r?null:e},Ck={redact:t=>Zf(t.config.redact||[],t.config.maskStrategy),enrich:t=>Uy(t),summarize:()=>Vy(),dedupe:t=>Hy(t.config.cache?.dedupeWindowMs||1e3),sample:t=>zy(t.config.sample||{})},$O=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let r=Ck[t];return r?r(e):null}return null},Qf=t=>{let e=t.config,r=Array.isArray(e.transformers)?e.transformers.slice():[],o=r.findIndex(s=>s==="redact");o>=0&&r.splice(o,1);let n=[];e.redact!==!1&&n.push(Ck.redact(t));for(let s of r){let i=$O(s,t);i&&n.push(i)}return s=>{let i=s;for(let a of n){if(i==null)return null;let c=a(i);if(c==null)return null;if(Array.isArray(c)){let l=n.slice(n.indexOf(a)+1),f=[];for(let u of c){let d=u,h=!1;for(let g of l)if(d=g(d),d==null){h=!0;break}!h&&d!=null&&f.push(d)}return f}i=c}return i}};R();R();var tu=typeof v<"u"&&typeof v.document<"u",LO=5e3,MO=50,FO=3,NO=1500,jO=1e3,qy=t=>t?t.level==="error"||t.type==="error"?"bug":t.type==="network"?"network":t.type==="console"?t.level==="error"||t.level==="warn"?"bug":"log":t.level==="warn"?"bug":t.level==="info"?"log":"verbose":"verbose",BO=t=>{try{return JSON.stringify(t)}catch{return null}},UO=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},VO=t=>{if(!t)return null;let e=String(t),r;return(r=e.match(/Edg\/([\d.]+)/))?{name:"Edge",version:r[1]}:(r=e.match(/OPR\/([\d.]+)/))?{name:"Opera",version:r[1]}:(r=e.match(/Firefox\/([\d.]+)/))?{name:"Firefox",version:r[1]}:/Chrome\/([\d.]+)/.test(e)&&/Safari\//.test(e)?(r=e.match(/Chrome\/([\d.]+)/),{name:"Chrome",version:r[1]}):(r=e.match(/Version\/([\d.]+).*Safari/))?{name:"Safari",version:r[1]}:{name:null,version:null}},HO=()=>{if(!tu)return null;try{let t=v.document?.documentElement?.getAttribute("data-theme")||null,e=typeof v.matchMedia=="function"?v.matchMedia("(prefers-color-scheme: dark)").matches:null;return{active:t||(e?"dark":e===!1?"light":null),forced:t||null,prefers:e==null?null:e?"dark":"light"}}catch{return null}},zO=()=>{if(!tu)return null;let t=v.location,e=typeof navigator<"u"?navigator:null,r=typeof screen<"u"?screen:null;return{url:t?.href||null,path:t?.pathname||null,referrer:v.document?.referrer||null,title:v.document?.title||null,ua:e?.userAgent||null,browser:VO(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:UO(),viewport:v.innerWidth?{w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}:null,screen:r?{w:r.width||null,h:r.height||null,availW:r.availWidth||null,availH:r.availHeight||null,colorDepth:r.colorDepth||null,orientation:r.orientation?.type||null}:null,theme:HO()}},eu=(t={})=>{let e=t.url,r=typeof t.transport=="function"?t.transport:null,o=typeof t.syncTransport=="function"?t.syncTransport:null;if(!e&&!r)return()=>{};let n=t.apiKey||null,s=t.appKey||t.appId||null,i=t.tenantKey||t.tenant||null,a=t.release||null,c=t.env||null,l=t.sdk||null,f=typeof t.getAuth=="function"?t.getAuth:null,u=typeof t.getContext=="function"?t.getContext:null,d=typeof t.classify=="function"?t.classify:qy,h=typeof t.beforeSend=="function"?t.beforeSend:null,g=t.debug===!0,p=typeof t.getDebug=="function"?t.getDebug:null,m=t.batchMs!=null?t.batchMs:LO,b=t.maxBatch||MO,_=t.maxRetries!=null?t.maxRetries:FO,y=t.backoffMs||NO,x=t.queueLimit||jO,k=t.sampleRate!=null?t.sampleRate:1,E=()=>typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,O=t.sessionId||E(),$=[],D=[],I=null,z=null,V=()=>{I||!$.length||(I=setTimeout(K,m))},rt=L=>{if(z)return;let ot=y*Math.pow(2,Math.max(0,L-1));z=setTimeout(()=>{if(z=null,!D.length)return;let U=D.shift();G(U.envelope,U.attempt)},ot)},at=(L,ot=!1)=>{let U=u?Wy(u):null,Y={id:O,sentAt:Date.now()};ot&&(Y.endedAt=Date.now());let j={v:1,session:Y,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:zO(),user:U?.user||null,traits:U?.traits||null,tags:U?.tags||null,events:L};if((p?Wy(p)===!0:g)&&(j.app.debug=!0),h)try{return h(j)||null}catch{return j}return j},G=async(L,ot=1)=>{if(L)try{let U=!0;if(r){let Y=await r(L);U=Y!==!1&&Y?.ok!==!1}else U=await WO(e,L,{apiKey:n,getAuth:f});!U&&ot<_&&(D.push({envelope:L,attempt:ot+1}),rt(ot+1))}catch{ot<_&&(D.push({envelope:L,attempt:ot+1}),rt(ot+1))}},K=(L=!1,ot=!1)=>{if(I&&(clearTimeout(I),I=null),!$.length&&!ot)return;let U=$;$=[];let Y=at(U,ot);if(Y){if(L&&tu){if(typeof o=="function"&&Wy(()=>o(Y)))return;if(navigator.sendBeacon&&e){let j=BO(Y);if(j)try{navigator.sendBeacon(e,new v.Blob([j],{type:"application/json"}));return}catch{}}}G(Y)}},lt=!1,Vt=()=>{lt||(lt=!0,K(!0,!0))};tu&&(v.addEventListener("pagehide",Vt,{passive:!0}),v.addEventListener("beforeunload",Vt,{passive:!0}),v.addEventListener("visibilitychange",()=>{v.document.visibilityState==="hidden"&&K(!0)},{passive:!0}));let W=L=>{if(!L||k<1&&Math.random()>k)return;lt&&(lt=!1);let ot={...L,log_type:d(L)};$.push(ot),$.length>x&&($=$.slice(-x)),$.length>=b?K():V()},wt=L=>(K(!1,!0),O=L||E(),lt=!1,W.sessionId=O,O);return W.flush=()=>K(!1),W.endSession=Vt,W.startNewSession=wt,W.sessionId=O,W},Wy=t=>{try{return t()}catch{return null}},WO=async(t,e,{apiKey:r,getAuth:o})=>{let n={"Content-Type":"application/json","X-Analyze-Beacon":"1"};if(r&&(n["X-Analyze-Key"]=r),o)try{let s=await o();s&&(n.Authorization=`Bearer ${s}`)}catch{}try{return(await fetch(t,{method:"POST",headers:n,body:JSON.stringify(e),keepalive:!0,credentials:"omit",mode:"cors"})).ok}catch{return!1}};var qO={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},KO="\x1B[0m",ru=typeof v<"u"&&typeof v.document<"u",Ky=(t={})=>{let e=t.minLevel||null,r=console.error.bind(console),o=console.warn.bind(console),n=console.log.bind(console);return s=>{if(!s)return;let i=s.level==="error"?r:s.level==="warn"?o:n,a=`[analyze:${s.type}]`;if(ru)i(a,s);else{let c=qO[s.level]||"";i(`${c}${a}${KO}`,s)}}},Gy=(t,e={})=>{let r=e.max||t.config.cache?.max||500,o=new Array(r),n=0,s=0,i=a=>{o[n]=a,n=(n+1)%r,s<r&&s++};return t.__memory={push:i,snapshot:()=>{let a=new Array(s),c=(n-s+r)%r;for(let l=0;l<s;l++)a[l]=o[(c+l)%r];return a},query:(a={})=>{let c=t.__memory.snapshot(),l=a.sinceMs?Date.now()-a.sinceMs:0;return c.filter(f=>!(!f||a.level&&f.level!==a.level||a.type&&f.type!==a.type||l&&f.ts<l))},clear:()=>{n=0,s=0}},i},Yy=(t={})=>{let e=t.url,r=t.batchMs!=null?t.batchMs:5e3,o=t.maxBatch||50;if(!e)return()=>{};let n=[],s=null,i=()=>{if(s&&(clearTimeout(s),s=null),!n.length)return;let c=JSON.stringify({events:n});n=[];let l=ru?new v.Blob([c],{type:"application/json"}):c;if(ru&&navigator.sendBeacon)try{navigator.sendBeacon(e,l);return}catch{}typeof fetch<"u"&&fetch(e,{method:"POST",headers:{"Content-Type":"application/json","X-Analyze-Beacon":"1"},body:c,keepalive:!0}).catch(()=>{})};ru&&(v.addEventListener("pagehide",i,{passive:!0}),v.addEventListener("beforeunload",i,{passive:!0}));let a=c=>{c&&(n.push(c),n.length>=o?i():s||(s=setTimeout(i,r)))};return a.flush=i,a},Ek={console:Ky,memory:Gy,beacon:Yy,remote:eu},Ak=(t,e)=>e.getDebug!=null||e.debug!=null?e:{...e,getDebug:()=>t.config.debug===!0},ou=t=>{let e=Array.isArray(t.config.sinks)?t.config.sinks:["console"],r=[];for(let o of e)if(typeof o=="function")r.push(o);else if(typeof o=="string"){let n=Ek[o];if(!n)continue;r.push(o==="memory"?n(t,{}):n(o==="remote"?Ak(t,{}):{}))}else if(o&&typeof o=="object"&&o.type){let n=Ek[o.type];if(!n)continue;r.push(o.type==="memory"?n(t,o):n(o.type==="remote"?Ak(t,o):o))}return r};R();var GO=typeof v<"u"&&typeof v.document<"u",YO=new Set(["password","hidden"]),Tk=(t,e)=>{let r=0,o=null,n=null;return(...s)=>{let i=Date.now();i-r>=e?(r=i,t(...s)):(n=s,o||(o=setTimeout(()=>{r=Date.now(),o=null,n&&(t(...n),n=null)},e-(i-r))))}},Xy="__analyzeKeyPath",es=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[Xy])return e[Xy];let r=[],o=e,n=0,s=null;for(;o&&n<64;){if(o.getAttribute){let a=o.getAttribute("data-key");a&&(s==null&&(s=a),r.unshift(a))}o=o.parentNode,n++}let i;if(r.length)i={selector:null,key:s,path:r.join(" > "),tag:e.tagName?.toLowerCase()||null};else{let a=(e.tagName||"unknown").toLowerCase(),c=e.id?`#${e.id}`:"",l=e.className&&typeof e.className=="string"?"."+e.className.trim().split(/\s+/).slice(0,2).join("."):"";i={selector:`${a}${c}${l}`,key:null,path:null}}try{e[Xy]=i}catch{}return i},XO=(t,e)=>{if(e==="mask")return"***";if(e!=="redact"){if(e==="hash"){let r=0,o=String(t||"");for(let n=0;n<o.length;n++)r=(r<<5)-r+o.charCodeAt(n)|0;return`#${(r>>>0).toString(36)}`}return"***"}},JO=t=>!!(!t||t.tagName==="INPUT"&&YO.has(t.type)||Jf.test(t.name||"")||Jf.test(t.id||"")||t.dataset?.analyze==="skip"),nu=t=>{if(!GO)return;let e=t.config.capture,r=t.config.throttle,o=t.__teardown,n=(s,i,a,c)=>{s.addEventListener(i,a,c),o.push(()=>s.removeEventListener(i,a,c))};if(e.errors&&(n(v,"error",s=>{t.emit(X("error","error",{hook:"window.onerror",message:s.message||null,error:s.error||null,source:s.filename||null,line:s.lineno||null,col:s.colno||null}))}),n(v,"unhandledrejection",s=>{let i=s.reason,a=i instanceof Error?i:null;t.emit(X("error","error",{hook:"unhandledrejection",message:a?.message||(typeof i=="string"?i:"Unhandled promise rejection"),error:a}))})),e.pointer){n(v,"click",i=>{t.emit(X("pointer","info",{hook:"click",target:es(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:Ok(i)}))},{passive:!0,capture:!0}),n(v,"dblclick",i=>{t.emit(X("pointer","info",{hook:"dblclick",target:es(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),n(v,"contextmenu",i=>{t.emit(X("pointer","info",{hook:"contextmenu",target:es(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=Tk(i=>{t.emit(X("pointer","trace",{hook:"pointermove",x:i.clientX,y:i.clientY}))},r.pointermove);n(v,"pointermove",s,{passive:!0})}if(e.keyboard&&n(v,"keydown",s=>{t.emit(X("keyboard","info",{hook:"keydown",code:s.code,key:s.key&&s.key.length===1?"\xB7":s.key,modifiers:Ok(s),target:es(s)}))},{passive:!0,capture:!0}),e.forms){let s=i=>{let a=i.target;if(!a||!a.tagName||!["INPUT","TEXTAREA","SELECT"].includes(a.tagName))return;let l=JO(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=XO(a.value,t.config.maskStrategy)),t.emit(X("forms","info",{hook:i.type,target:es(i),field:{name:a.name||null,type:a.type||a.tagName.toLowerCase()},value:u}))};n(v,"input",s,{passive:!0,capture:!0}),n(v,"change",s,{passive:!0,capture:!0}),n(v,"submit",i=>{t.emit(X("forms","info",{hook:"submit",target:es(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=Tk(()=>{t.emit(X("scroll","trace",{hook:"scroll",x:v.scrollX,y:v.scrollY}))},r.scroll);n(v,"scroll",s,{passive:!0,capture:!0})}if(e.viewport){let s=Us(()=>{t.emit(X("viewport","info",{hook:"resize",w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}))},r.resize);n(v,"resize",s,{passive:!0}),n(v,"orientationchange",()=>{t.emit(X("viewport","info",{hook:"orientationchange",orientation:typeof screen<"u"&&screen.orientation?screen.orientation.type:null}))},{passive:!0}),n(v.document,"visibilitychange",()=>{t.emit(X("viewport","info",{hook:"visibilitychange",hidden:v.document.hidden}))},{passive:!0}),t.emit(X("viewport","info",{hook:"initial",w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}))}if(e.console)for(let s of["log","warn","error","debug"]){let i=console[s];console[s]=function(...a){try{t.emit(X("console",s==="error"?"error":s==="warn"?"warn":"debug",{hook:`console.${s}`,args:a.map(Rk)}))}catch{}return i.apply(console,a)},o.push(()=>{console[s]=i})}if(e.performance&&typeof PerformanceObserver<"u")try{let s=new PerformanceObserver(a=>{for(let c of a.getEntries())t.emit(X("performance","info",{hook:c.entryType,name:c.name,startTime:c.startTime,duration:c.duration,value:c.value!=null?c.value:null}))}),i=["largest-contentful-paint","layout-shift","longtask","paint","first-input","event"];for(let a of i)try{s.observe({type:a,buffered:!0})}catch{}o.push(()=>s.disconnect())}catch{}},Ok=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),ZO=t=>{let e={name:t.name||"Error",message:typeof t.message=="string"?t.message:String(t),stack:typeof t.stack=="string"?t.stack:null};return t.cause!==void 0&&(e.cause=Rk(t.cause)),e},Rk=t=>{if(t==null)return t;if(t instanceof Error)return ZO(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};R();var QO=typeof v<"u"&&typeof v.document<"u",Pk=(t,e)=>{let r=t?.analyze;if(!r||!r.shouldCapture("network"))return;let o=e.phase==="error"?"error":"info";r.emit(X("network",o,{hook:`fetch.${e.phase}`,source:"symbo-fetch",...e}))},Za=t=>{if(QO&&t.config.capture.network&&!t.__networkListeners){if(t.__networkListeners=!0,t.__teardown.push(()=>{t.__networkListeners=!1}),typeof v.fetch=="function"){let e=v.fetch.bind(v),r=function(o,n){if(n?.headers?.["X-Analyze-Beacon"]||!t.shouldCapture("network"))return e(o,n);let s=typeof o=="string"?o:o&&o.url||"",i=(n?.method||typeof o=="object"&&o?.method||"GET").toUpperCase(),a=typeof performance<"u"?performance.now():Date.now();return t.emit(X("network","info",{hook:"fetch.start",source:"window.fetch",url:s,method:i})),e(o,n).then(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;return t.emit(X("network",c.ok?"info":"warn",{hook:"fetch.success",source:"window.fetch",url:s,method:i,status:c.status,ok:c.ok,durationMs:l})),c}).catch(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;throw t.emit(X("network","error",{hook:"fetch.error",source:"window.fetch",url:s,method:i,error:c,durationMs:l})),c})};v.fetch=r,t.__teardown.push(()=>{v.fetch=e})}if(typeof v.XMLHttpRequest=="function"){let e=v.XMLHttpRequest,r=e.prototype.open,o=e.prototype.send;e.prototype.open=function(n,s){return this.__analyze={method:String(n).toUpperCase(),url:String(s)},r.apply(this,arguments)},e.prototype.send=function(n){let s=this.__analyze;if(!s||!t.shouldCapture("network"))return o.apply(this,arguments);let i=typeof performance<"u"?performance.now():Date.now();t.emit(X("network","info",{hook:"xhr.start",source:"xhr",url:s.url,method:s.method}));let a=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i,f=this.status>=200&&this.status<400;t.emit(X("network",f?"info":"warn",{hook:"xhr.success",source:"xhr",url:s.url,method:s.method,status:this.status,ok:f,durationMs:l}))},c=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i;t.emit(X("network","error",{hook:"xhr.error",source:"xhr",url:s.url,method:s.method,status:this.status,durationMs:l}))};return this.addEventListener("loadend",a),this.addEventListener("error",c),o.apply(this,arguments)},t.__teardown.push(()=>{e.prototype.open=r,e.prototype.send=o})}}};var tR={errors:!0,warnings:!0,pointer:!1,keyboard:!1,forms:!1,scroll:!1,viewport:!1,network:!1,performance:!1,navigation:!1,console:!1,lifecycle:!1,state:!1,updates:!1,replay:!1,telemetry:!1},eR={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},rR={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},oR={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},nR=t=>{let e={...tR,...t};return e.replay&&Object.assign(e,eR),e.telemetry&&Object.assign(e,rR),e.remote&&Object.assign(e,oR),Object.assign(e,t),e},sR=64,iR=()=>{if(typeof v>"u"||!v.location)return null;try{let e=new URLSearchParams(v.location.search).get("analyze");return e||null}catch{return null}},su=(t={})=>{let e=t===!0?{}:{...t};e.capture=nR(e.capture||{});let r=iR();(r==="debug"||e.debug)&&(e.level="debug",e.debug=!0,e.capture={...e.capture,lifecycle:!0,state:!0,updates:!0,console:!0,network:!0}),r==="off"&&(e.enabled=!1),e.level=Ja(e.level||"warn"),e.cache={max:500,dedupeWindowMs:1e3,...e.cache||{}},e.throttle={pointermove:80,mousemove:80,scroll:100,resize:200,...e.throttle||{}},e.maskFormValues==null&&(e.maskFormValues=!0),e.maskStrategy||(e.maskStrategy="mask"),Array.isArray(e.sinks)||(e.sinks=["console","memory"]),Array.isArray(e.transformers)||(e.transformers=["enrich","summarize"]);let o={config:e,context:null,__ready:!1,__paused:!1,__preBuffer:[],__teardown:[],__pipeline:null,__sinks:null,__memory:null,__initialSnapshot:null},n=()=>{o.__pipeline||(o.__pipeline=Qf(o),o.__sinks=ou(o))};return o.shouldCapture=s=>o.config.enabled===!1?!1:!!o.config.capture[s],o.emit=s=>{if(s&&o.config.enabled!==!1&&!o.__paused&&Xf(s.level,o.config.level)){if(!o.__ready){if(s.level!=="error"&&!o.config.captureDuringHydration)return;o.__preBuffer.length<sR&&o.__preBuffer.push(s);return}n(),Ik(o,s)}},o.activate=s=>{if(o.context==null&&(o.context=s||null),o.__ready)return;o.__ready=!0;let i=o.__preBuffer;if(o.__preBuffer=[],i.length){n();for(let a of i)Ik(o,a)}try{nu(o)}catch(a){console.error("[analyze] browser attach error:",a)}try{Za(o)}catch(a){console.error("[analyze] network attach error:",a)}for(let a of o.__onActivate||[])try{a(o)}catch(c){console.error("[analyze] onActivate error:",c)}},o.pause=()=>{o.__paused=!0},o.resume=()=>{o.__paused=!1},o.setLevel=s=>{o.config.level=Ja(s)},o.setCapture=(s,i)=>{if(o.config.capture[s]=!!i,s==="network"&&i&&o.__ready)try{Za(o)}catch(a){console.error("[analyze] network attach error:",a)}},o.query=s=>o.__memory?o.__memory.query(s):[],o.snapshot=()=>o.__memory?o.__memory.snapshot():[],o.emitNetwork=s=>{if(!o.shouldCapture("network"))return;let i=s?.phase,a=i==="error"?"error":i==="success"&&s.ok===!1?"warn":"info";o.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:"network",level:a,hook:`fetch.${i||"unknown"}`,...s})},o.flush=()=>{if(o.__sinks)for(let s of o.__sinks)typeof s.flush=="function"&&s.flush()},o.startNewSession=s=>{let i=s||(typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),a=Array.isArray(o.config.sinks)?o.config.sinks:[];for(let c of a)c&&typeof c=="object"&&c.type==="remote"&&(c.sessionId=i);if(o.__sinks)for(let c of o.__sinks)typeof c.startNewSession=="function"&&c.startNewSession(i);return i},o.replay=()=>({initialSnapshot:o.__initialSnapshot,events:o.snapshot()}),o.destroy=()=>{for(let s of o.__teardown)try{s()}catch{}o.__teardown=[],o.__ready=!1,o.__paused=!0},o.__onActivate=[],o.onActivate=s=>{o.__onActivate.push(s)},o},Ik=(t,e)=>{let r=t.__pipeline(e);if(r==null)return;let o=Array.isArray(r)?r:[r];for(let n of o){if(typeof t.config.onEvent=="function")try{t.config.onEvent(n)}catch{}for(let s of t.__sinks)try{s(n)}catch(i){console.error("[analyze] sink error:",i)}}};var tb={};P(tb,{Inspect:()=>iu,inspectPlugin:()=>Qy});R();function Dk(t){return w(t)?t:T(t)?t.find(e=>w(e)):""}function Zy(t){if(!t)return;let e=t.__ref.__componentKey,r=t.extends&&Dk(t.extends),o=t.parent&&t.parent.childExtends&&Dk(t.parent.childExtends);return(e||r||o||"").split("_")[0].split(".")[0].split("+")[0]}function au(t){if(!t||!t.__ref)return;let{components:e,pages:r,editor:o}=t.context,n=Zy(t);return o&&o.onInitInspect&&!o.onInitInspect(n,t,t.state)?au(t.parent):n&&(e[n]||r[n])?t:au(t.parent)}var aR=(t,e,r)=>{let o=r.window||window;o.onkeydown=n=>{n.altKey&&n.shiftKey&&t.state.update({debugging:!0,preventSelect:!0},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0})},o.onkeyup=n=>{t.state.preventSelect&&(!n.altKey||!n.shiftKey)&&(t.state.replace({debugging:!1,preventSelect:!1},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0}),t.Inspector.state.update({area:!1}))}},iu={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:aR,onMousemove:(t,e,r)=>{let o=t.target.ref,n=au(o),s=e.Inspector.state;if(!n||!r.debugging||!n.__ref)return s.update({area:!1});let i=Zy(n),a=l=>{s.update({area:l,focusKey:i})},c=()=>{if(t.altKey&&t.shiftKey){let{x:l,y:f,width:u,height:d}=n.node.getBoundingClientRect(),h={x:l,y:f,width:u,height:d};if(!s.area)return a(h);s.area.x!==h.x&&a(h)}else s.area&&s.update({area:!1})};window.requestAnimationFrame(()=>{c(),window.requestAnimationFrame(c)})},onMousedown:(t,e,r)=>{if(!r.debugging)return;let o=t.target.ref,n=au(o);if(!n)return;let s=Zy(n);if(!s)return;let i=o.context.editor;if(i&&i.onInspect)return i.onInspect(s,o,o.state,{allowRouterWhileInspect:!0});let a=JSON.stringify({componentKey:`${s}`});return o.context.socket?.emit&&o.context.socket.emit("route",a),t.preventDefault(),t.stopPropagation(),!1},Inspector:{state:{},transition:"all, defaultBezier, X",position:"fixed",hide:(t,e)=>!(e.area&&e.parent.debugging),style:{boxShadow:"0 0 10px #3686F733, 0 0 0 3px #3686F766, 0 0 100vmax 100vmax #000A",zIndex:"9999999",borderRadius:"10px",pointerEvents:"none"},Span:{position:"absolute",margin:"A2 0",fontSize:"Z",color:"text",zIndex:"99999999",transition:"all, defaultBezier, X",textDecoration:"underline",fontWeight:"500",top:"100%",style:{boxShadow:"0 25px 10px 35px black",textShadow:"0 0 10px black"},text:"{{ focusKey }}"},onInit:({context:t})=>{let{components:e}=t;if(S(e)){let{Content:r,...o}=e;for(let n in o)Wn[n]||(o[n].__ref||(o[n].__ref={}),o[n].__ref.__componentKey||(o[n].__ref.__componentKey=n))}},onBeforeUpdate:(t,e,r)=>{let{area:o}=r,n=r.area&&r.parent.debugging,s;if(!n)s="display: none !important";else if(o){let{x:i,y:a,width:c,height:l}=o;s=`
89
89
  display: block !important;
90
90
  top: ${a-6}px;
91
91
  left: ${i-6}px;
92
92
  width: ${c+12}px;
93
93
  height: ${l+12}px;
94
- `}return e.node.style=s,e.Span.node.innerText=r.focusKey,!1}}},Xy={name:"inspect",beforeCreate(t,e){Array.isArray(t.extends)?t.extends.push(nu):t.extends?t.extends=[t.extends,nu]:t.extends=[nu]}};var Qy={};P(Qy,{apiUrl:()=>Zy,channelByApiUrl:()=>lR,channelNames:()=>aR,channels:()=>Zt,currentChannel:()=>qr,defaultChannel:()=>yR,deployTarget:()=>hR,isKnownChannel:()=>mR,mermaidUrl:()=>pR,normalizeOwnerSegment:()=>bR,normalizeProjectKey:()=>xR,normalizeProjectSlug:()=>_R,parseSymboLsHost:()=>wR,previewProjectUrl:()=>dR,previewUrl:()=>$k,resolveChannel:()=>Po,screenshotCdnHost:()=>Lk,screenshotCdnUrl:()=>gR,setChannel:()=>cR,shellUrl:()=>uR,socketUrl:()=>fR});var Zt={channels:{local:{api:"http://localhost:8080",socket:"http://localhost:8080",shell:"http://my.localhost:1355",preview:"http://preview.localhost:1355",mermaidApex:"localhost:1355",deploy:{}},development:{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.my.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},"demo-dev":{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.demo.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-demo-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},next:{api:"https://next.api.symbols.app",socket:"https://next.api.symbols.app",shell:"https://next.my.symbols.app",preview:"https://next.preview.symbols.app",mermaidApex:"next.symbo.ls",deploy:{shellBucket:"smbls-my-next",previewWorker:"smbls-preview-next",mermaidWorker:"mermaid-next"}},test:{api:"https://test.api.symbols.app",socket:"https://test.api.symbols.app",shell:"https://test.my.symbols.app",preview:"https://test.preview.symbols.app",mermaidApex:"test.symbo.ls",deploy:{shellBucket:"smbls-my-test",previewWorker:"smbls-preview-test",mermaidWorker:"mermaid-test"}},upcoming:{api:"https://upcoming.api.symbols.app",socket:"https://upcoming.api.symbols.app",shell:"https://upcoming.my.symbols.app",preview:"https://upcoming.preview.symbols.app",mermaidApex:"upcoming.symbo.ls",deploy:{shellBucket:"smbls-my-upcoming",previewWorker:"smbls-preview-upcoming",mermaidWorker:"mermaid-upcoming"}},staging:{api:"https://staging.api.symbols.app",socket:"https://staging.api.symbols.app",shell:"https://staging.my.symbols.app",preview:"https://staging.preview.symbols.app",mermaidApex:"staging.symbo.ls",deploy:{shellBucket:"smbls-my-staging",previewWorker:"smbls-preview-staging",mermaidWorker:"mermaid-staging"}},demo:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://demo.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-demo",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}},production:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://my.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-prod",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}}},defaultChannel:"production",screenshotCdn:"screenshots.api.symbols.app"};var aR=Object.keys(Zt.channels),dr=t=>!!(t&&Zt.channels[t]),Po=t=>dr(t)?Zt.channels[t]:Zt.channels[Zt.defaultChannel],cR=t=>{typeof globalThis>"u"||(globalThis.__SYMBOLS_CHANNEL__=dr(t)?t:null,es=void 0)},es,Za=t=>typeof process<"u"&&process.env&&process.env[t]||null,qr=()=>{if(es!==void 0)return es;let t=typeof globalThis<"u"?globalThis.__SYMBOLS_CHANNEL__:null,e=Za("SYMBOLS_CHANNEL"),r=Za("NODE_ENV");return es=dr(t)&&t||dr(e)&&e||dr(r)&&r||Zt.defaultChannel,es===Zt.defaultChannel&&!dr(t)&&!dr(e)&&!dr(r)&&typeof process<"u"&&process.versions&&process.versions.node&&console.warn(`[channels] no channel configured (NODE_ENV=${r||"unset"}, __SYMBOLS_CHANNEL__ unset) \u2014 falling back to "${Zt.defaultChannel}". Outbound URLs (shellUrl/apiUrl) will target production; set SYMBOLS_CHANNEL (preferred), NODE_ENV, or globalThis.__SYMBOLS_CHANNEL__ to a known channel.`),es},Pk=["production","staging","upcoming","next","test","development","local","demo","demo-dev"],Ik=t=>{let e=Pk.indexOf(t);return e===-1?Pk.length:e},lR=t=>{if(!t)return null;let e=Object.keys(Zt.channels).filter(r=>Zt.channels[r].api===t);return e.length===0?null:e.length===1?e[0]:e.sort((r,o)=>Ik(r)-Ik(o))[0]},Zy=(t=qr())=>Za("SYMBOLS_API_URL")||Po(t).api,fR=(t=qr())=>Za("SYMBOLS_SOCKET_URL")||Po(t).socket,uR=(t=qr())=>Po(t).shell||null,$k=(t=qr())=>Po(t).preview||null,dR=({owner:t,key:e,env:r="production"}={},o=qr())=>{let n=$k(o);if(!n||!t||!e)return null;let s=n.match(/^(https?:\/\/)(.+)$/);if(!s)return null;let[,i,a]=s,c=`${encodeURIComponent(t)}--${encodeURIComponent(e)}`,l=`${i}${c}.${a}/`;return!r||r==="production"||r==="prod"?l:`${l}?env=${encodeURIComponent(r)}`},pR=({owner:t,key:e,env:r="production"}={},o=qr())=>{let n=Po(o).mermaidApex;if(!n||!t||!e)return null;let i=!r||r==="production"||r==="prod"?"":`--${encodeURIComponent(r)}`,a=`${encodeURIComponent(t)}--${encodeURIComponent(e)}${i}`;return`${n.startsWith("localhost")?"http":"https"}://${a}.${n}`},hR=(t=qr())=>Po(t).deploy||{},Lk=()=>Za("SYMBOLS_SCREENSHOT_CDN")||Zt.screenshotCdn,gR=({owner:t,key:e,page:r="root",componentKey:o,env:n="production",width:s}={})=>{if(!t||!e)return null;let i=o?`component/${encodeURIComponent(o)}`:encodeURIComponent(String(r||"root").replace(/^\/+/,"").replace(/\//g,"-")||"root"),a=[];n&&n!=="production"&&a.push(`env=${encodeURIComponent(n)}`),s&&a.push(`w=${Number(s)}`);let c=a.length?`?${a.join("&")}`:"";return`https://${Lk()}/${encodeURIComponent(t)}/${encodeURIComponent(e)}/${i}.webp${c}`},mR=dr,yR=Zt.defaultChannel,bR=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"",_R=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"",xR=(t,e={})=>{let r=String(t||"").trim();if(!r)return"";/\.symbo\.ls$/iu.test(r)&&(r=r.replace(/\.symbo\.ls$/iu,"")),r.includes("/")&&(r=r.split("/").pop());let o=typeof e.owner=="string"?e.owner.trim():"";return o&&r.startsWith(`${o}--`)?r=r.slice(o.length+2):!o&&r.includes("--")&&(r=r.slice(r.indexOf("--")+2)),r},Dk={at:"production",prod:"production",production:"production",dev:"development",development:"development",next:"next",upcoming:"upcoming",test:"test",staging:"staging"},wR=t=>{if(typeof t!="string"||!t)return null;let e=t.toLowerCase().replace(/^www\./,"").replace(/\/$/,"");if(!e.endsWith(".symbo.ls"))return null;let r=e.split(".");if(r.length<4||r.slice(-2).join(".")!=="symbo.ls")return null;if(r.length===4){let s=r[1],i=r[0],a=Dk[s];if(a&&i.includes("--")){let c=i.split("--");if(c.length===2||c.length===3){let[l,f,u]=c;if(l&&f){let d=u?Dk[u]||u:null;return{projectKey:f,owner:l,env:d||a,sysEnv:a}}}}}if(r.length>=5)return{projectKey:r[1],owner:r[2],env:r[0]};let o=r[1],n=r[0];if(n.includes("--")){let[s,i]=n.split("--",2);return!s||!i?null:{projectKey:s,owner:o,env:i}}return{projectKey:n,owner:o,env:"production"}};var rb={};P(rb,{BUILD_DOMQL_SYSTEM_PROMPT:()=>Gk,DEFAULT_MAX_TOKENS:()=>du,DEFAULT_MODEL:()=>Kr,DEFAULT_PROVIDER:()=>fu,DEFAULT_TEMPERATURE:()=>uu,MODEL_TIER_ALIASES:()=>eb,PROVIDER_MODELS:()=>Fk,SIMONE_BASE_URL:()=>Qa,SIMONE_CHAT_PATH:()=>iu,SIMONE_CODE_PATH:()=>au,SIMONE_CODE_SYMBOLS_PATH:()=>cu,SIMONE_HEALTH_PATH:()=>lu,SIMONE_TOOLS_PATH:()=>Mk,WORKSPACE_SYSTEM_PROMPT:()=>Kk,buildMessages:()=>Vk,chat:()=>tc,health:()=>Uk,parseSimoneResponse:()=>Wk,resolveModel:()=>Yk,streamChat:()=>tc,streamCode:()=>jk,streamCodeSymbols:()=>Bk,toLegacyEnvelope:()=>qk});var Qa="https://symbols-service-production.up.railway.app",iu="/api/chat",au="/api/code",cu="/api/code-symbols",lu="/api/health",Mk="/api/tools",fu="openai-compatible",Kr="claude-sonnet-4-6",uu=.7,du=4096,Fk={"openai-compatible":["claude-sonnet-4-6","claude-opus-4-6","gpt-4o","gpt-4o-mini","deepseek-chat"],anthropic:["claude-sonnet-4-6","claude-sonnet-4-5-20250929","claude-opus-4-1-20250805","claude-haiku-4-5-20251001"],openrouter:["google/gemini-3-pro-preview"],gemini:["gemini-3-pro-preview"]};function Nk(t,e){return t?t.replace(/\/$/,"")+e:e}function SR(t){if(!t.startsWith("data: "))return null;let e=t.slice(6);if(e==="[DONE]")return{done:!0};try{return{chunk:JSON.parse(e)}}catch{return{raw:e}}}async function tc(t,e={},r){let{baseUrl:o=Qa,path:n=iu,provider:s=fu,model:i=Kr,temperature:a=.7,maxTokens:c=4096,effort:l,apiKeys:f,signal:u,headers:d}=e;if(!Array.isArray(t)||t.length===0)throw new TypeError("simone: messages must be a non-empty array");let h={messages:t,provider:s,model:i,temperature:a,maxTokens:c};l&&(h.effort=l),f&&(h.apiKeys=f);let g=await fetch(Nk(o,n),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...d},body:JSON.stringify(h),signal:u});if(!g.ok){let x=g.statusText;try{let E=await g.text();try{let O=JSON.parse(E);x=O.error||O.detail||x}catch{x=E||x}}catch{}let k=new Error(`simone: HTTP ${g.status} \u2014 ${x}`);throw k.status=g.status,k}if(!g.body||typeof g.body.getReader!="function"){let x=await g.text();return r&&r(x),{text:x,errors:[]}}let p=g.body.getReader(),m=new TextDecoder,b=[],_=[],y="";try{for(;;){let{done:x,value:k}=await p.read();if(x)break;y+=m.decode(k,{stream:!0});let E=y.indexOf(`
95
- `);for(;E!==-1;){let O=y.slice(0,E).trim();if(y=y.slice(E+1),O){let $=SR(O);if($?.done)return{text:b.join(""),errors:_};let D=$?.chunk;D?.delta&&(b.push(D.delta),r&&r(D.delta)),D?.error&&_.push(D.error)}E=y.indexOf(`
96
- `)}}return{text:b.join(""),errors:_}}finally{p.cancel().catch(()=>{})}}function jk(t,e={},r){return tc(t,{...e,path:au},r)}function Bk(t,e={},r){return tc(t,{...e,path:cu},r)}async function Uk(t={}){let{baseUrl:e=Qa,signal:r,headers:o}=t,n=await fetch(Nk(e,lu),{method:"GET",headers:o,signal:r});if(!n.ok)throw new Error(`simone health: HTTP ${n.status}`);return n.json()}function Vk({system:t,history:e=[],user:r,context:o}){let n=[];t&&n.push({role:"system",content:t});for(let s of e)!s||!s.role||typeof s.content!="string"||!s.content||n.push({role:s.role,content:s.content});if(r){let s=r;if(o!=null){let i=typeof o=="string"?o:JSON.stringify(o,null,2);s=`${s}
94
+ `}return e.node.style=s,e.Span.node.innerText=r.focusKey,!1}}},Qy={name:"inspect",beforeCreate(t,e){Array.isArray(t.extends)?t.extends.push(iu):t.extends?t.extends=[t.extends,iu]:t.extends=[iu]}};var rb={};P(rb,{apiUrl:()=>eb,channelByApiUrl:()=>uR,channelNames:()=>lR,channels:()=>Zt,currentChannel:()=>qr,defaultChannel:()=>_R,deployTarget:()=>mR,isKnownChannel:()=>bR,mermaidUrl:()=>gR,normalizeOwnerSegment:()=>xR,normalizeProjectKey:()=>SR,normalizeProjectSlug:()=>wR,parseSymboLsHost:()=>kR,previewProjectUrl:()=>hR,previewUrl:()=>Fk,resolveChannel:()=>Io,screenshotCdnHost:()=>Nk,screenshotCdnUrl:()=>yR,setChannel:()=>fR,shellUrl:()=>pR,socketUrl:()=>dR});var Zt={channels:{local:{api:"http://localhost:8080",socket:"http://localhost:8080",shell:"http://my.localhost:1355",preview:"http://preview.localhost:1355",mermaidApex:"localhost:1355",deploy:{}},development:{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.my.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},"demo-dev":{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.demo.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-demo-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},next:{api:"https://next.api.symbols.app",socket:"https://next.api.symbols.app",shell:"https://next.my.symbols.app",preview:"https://next.preview.symbols.app",mermaidApex:"next.symbo.ls",deploy:{shellBucket:"smbls-my-next",previewWorker:"smbls-preview-next",mermaidWorker:"mermaid-next"}},test:{api:"https://test.api.symbols.app",socket:"https://test.api.symbols.app",shell:"https://test.my.symbols.app",preview:"https://test.preview.symbols.app",mermaidApex:"test.symbo.ls",deploy:{shellBucket:"smbls-my-test",previewWorker:"smbls-preview-test",mermaidWorker:"mermaid-test"}},upcoming:{api:"https://upcoming.api.symbols.app",socket:"https://upcoming.api.symbols.app",shell:"https://upcoming.my.symbols.app",preview:"https://upcoming.preview.symbols.app",mermaidApex:"upcoming.symbo.ls",deploy:{shellBucket:"smbls-my-upcoming",previewWorker:"smbls-preview-upcoming",mermaidWorker:"mermaid-upcoming"}},staging:{api:"https://staging.api.symbols.app",socket:"https://staging.api.symbols.app",shell:"https://staging.my.symbols.app",preview:"https://staging.preview.symbols.app",mermaidApex:"staging.symbo.ls",deploy:{shellBucket:"smbls-my-staging",previewWorker:"smbls-preview-staging",mermaidWorker:"mermaid-staging"}},demo:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://demo.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-demo",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}},production:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://my.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-prod",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}}},defaultChannel:"production",screenshotCdn:"screenshots.api.symbols.app"};var lR=Object.keys(Zt.channels),dr=t=>!!(t&&Zt.channels[t]),Io=t=>dr(t)?Zt.channels[t]:Zt.channels[Zt.defaultChannel],fR=t=>{typeof globalThis>"u"||(globalThis.__SYMBOLS_CHANNEL__=dr(t)?t:null,rs=void 0)},rs,Qa=t=>typeof process<"u"&&process.env&&process.env[t]||null,qr=()=>{if(rs!==void 0)return rs;let t=typeof globalThis<"u"?globalThis.__SYMBOLS_CHANNEL__:null,e=Qa("SYMBOLS_CHANNEL"),r=Qa("NODE_ENV");return rs=dr(t)&&t||dr(e)&&e||dr(r)&&r||Zt.defaultChannel,rs===Zt.defaultChannel&&!dr(t)&&!dr(e)&&!dr(r)&&typeof process<"u"&&process.versions&&process.versions.node&&console.warn(`[channels] no channel configured (NODE_ENV=${r||"unset"}, __SYMBOLS_CHANNEL__ unset) \u2014 falling back to "${Zt.defaultChannel}". Outbound URLs (shellUrl/apiUrl) will target production; set SYMBOLS_CHANNEL (preferred), NODE_ENV, or globalThis.__SYMBOLS_CHANNEL__ to a known channel.`),rs},$k=["production","staging","upcoming","next","test","development","local","demo","demo-dev"],Lk=t=>{let e=$k.indexOf(t);return e===-1?$k.length:e},uR=t=>{if(!t)return null;let e=Object.keys(Zt.channels).filter(r=>Zt.channels[r].api===t);return e.length===0?null:e.length===1?e[0]:e.sort((r,o)=>Lk(r)-Lk(o))[0]},eb=(t=qr())=>Qa("SYMBOLS_API_URL")||Io(t).api,dR=(t=qr())=>Qa("SYMBOLS_SOCKET_URL")||Io(t).socket,pR=(t=qr())=>Io(t).shell||null,Fk=(t=qr())=>Io(t).preview||null,hR=({owner:t,key:e,env:r="production"}={},o=qr())=>{let n=Fk(o);if(!n||!t||!e)return null;let s=n.match(/^(https?:\/\/)(.+)$/);if(!s)return null;let[,i,a]=s,c=`${encodeURIComponent(t)}--${encodeURIComponent(e)}`,l=`${i}${c}.${a}/`;return!r||r==="production"||r==="prod"?l:`${l}?env=${encodeURIComponent(r)}`},gR=({owner:t,key:e,env:r="production"}={},o=qr())=>{let n=Io(o).mermaidApex;if(!n||!t||!e)return null;let i=!r||r==="production"||r==="prod"?"":`--${encodeURIComponent(r)}`,a=`${encodeURIComponent(t)}--${encodeURIComponent(e)}${i}`;return`${n.startsWith("localhost")?"http":"https"}://${a}.${n}`},mR=(t=qr())=>Io(t).deploy||{},Nk=()=>Qa("SYMBOLS_SCREENSHOT_CDN")||Zt.screenshotCdn,yR=({owner:t,key:e,page:r="root",componentKey:o,env:n="production",width:s}={})=>{if(!t||!e)return null;let i=o?`component/${encodeURIComponent(o)}`:encodeURIComponent(String(r||"root").replace(/^\/+/,"").replace(/\//g,"-")||"root"),a=[];n&&n!=="production"&&a.push(`env=${encodeURIComponent(n)}`),s&&a.push(`w=${Number(s)}`);let c=a.length?`?${a.join("&")}`:"";return`https://${Nk()}/${encodeURIComponent(t)}/${encodeURIComponent(e)}/${i}.webp${c}`},bR=dr,_R=Zt.defaultChannel,xR=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"",wR=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"",SR=(t,e={})=>{let r=String(t||"").trim();if(!r)return"";/\.symbo\.ls$/iu.test(r)&&(r=r.replace(/\.symbo\.ls$/iu,"")),r.includes("/")&&(r=r.split("/").pop());let o=typeof e.owner=="string"?e.owner.trim():"";return o&&r.startsWith(`${o}--`)?r=r.slice(o.length+2):!o&&r.includes("--")&&(r=r.slice(r.indexOf("--")+2)),r},Mk={at:"production",prod:"production",production:"production",dev:"development",development:"development",next:"next",upcoming:"upcoming",test:"test",staging:"staging"},kR=t=>{if(typeof t!="string"||!t)return null;let e=t.toLowerCase().replace(/^www\./,"").replace(/\/$/,"");if(!e.endsWith(".symbo.ls"))return null;let r=e.split(".");if(r.length<4||r.slice(-2).join(".")!=="symbo.ls")return null;if(r.length===4){let s=r[1],i=r[0],a=Mk[s];if(a&&i.includes("--")){let c=i.split("--");if(c.length===2||c.length===3){let[l,f,u]=c;if(l&&f){let d=u?Mk[u]||u:null;return{projectKey:f,owner:l,env:d||a,sysEnv:a}}}}}if(r.length>=5)return{projectKey:r[1],owner:r[2],env:r[0]};let o=r[1],n=r[0];if(n.includes("--")){let[s,i]=n.split("--",2);return!s||!i?null:{projectKey:s,owner:o,env:i}}return{projectKey:n,owner:o,env:"production"}};var sb={};P(sb,{BUILD_DOMQL_SYSTEM_PROMPT:()=>Jk,DEFAULT_MAX_TOKENS:()=>hu,DEFAULT_MODEL:()=>Kr,DEFAULT_PROVIDER:()=>du,DEFAULT_TEMPERATURE:()=>pu,MODEL_TIER_ALIASES:()=>nb,PROVIDER_MODELS:()=>Bk,SIMONE_BASE_URL:()=>tc,SIMONE_CHAT_PATH:()=>cu,SIMONE_CODE_PATH:()=>lu,SIMONE_CODE_SYMBOLS_PATH:()=>fu,SIMONE_HEALTH_PATH:()=>uu,SIMONE_TOOLS_PATH:()=>jk,WORKSPACE_SYSTEM_PROMPT:()=>Xk,buildMessages:()=>Wk,chat:()=>ec,health:()=>zk,parseSimoneResponse:()=>Gk,resolveModel:()=>Zk,streamChat:()=>ec,streamCode:()=>Vk,streamCodeSymbols:()=>Hk,toLegacyEnvelope:()=>Yk});var tc="https://symbols-service-production.up.railway.app",cu="/api/chat",lu="/api/code",fu="/api/code-symbols",uu="/api/health",jk="/api/tools",du="openai-compatible",Kr="claude-sonnet-4-6",pu=.7,hu=4096,Bk={"openai-compatible":["claude-sonnet-4-6","claude-opus-4-6","gpt-4o","gpt-4o-mini","deepseek-chat"],anthropic:["claude-sonnet-4-6","claude-sonnet-4-5-20250929","claude-opus-4-1-20250805","claude-haiku-4-5-20251001"],openrouter:["google/gemini-3-pro-preview"],gemini:["gemini-3-pro-preview"]};function Uk(t,e){return t?t.replace(/\/$/,"")+e:e}function vR(t){if(!t.startsWith("data: "))return null;let e=t.slice(6);if(e==="[DONE]")return{done:!0};try{return{chunk:JSON.parse(e)}}catch{return{raw:e}}}async function ec(t,e={},r){let{baseUrl:o=tc,path:n=cu,provider:s=du,model:i=Kr,temperature:a=.7,maxTokens:c=4096,effort:l,apiKeys:f,signal:u,headers:d}=e;if(!Array.isArray(t)||t.length===0)throw new TypeError("simone: messages must be a non-empty array");let h={messages:t,provider:s,model:i,temperature:a,maxTokens:c};l&&(h.effort=l),f&&(h.apiKeys=f);let g=await fetch(Uk(o,n),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...d},body:JSON.stringify(h),signal:u});if(!g.ok){let x=g.statusText;try{let E=await g.text();try{let O=JSON.parse(E);x=O.error||O.detail||x}catch{x=E||x}}catch{}let k=new Error(`simone: HTTP ${g.status} \u2014 ${x}`);throw k.status=g.status,k}if(!g.body||typeof g.body.getReader!="function"){let x=await g.text();return r&&r(x),{text:x,errors:[]}}let p=g.body.getReader(),m=new TextDecoder,b=[],_=[],y="";try{for(;;){let{done:x,value:k}=await p.read();if(x)break;y+=m.decode(k,{stream:!0});let E=y.indexOf(`
95
+ `);for(;E!==-1;){let O=y.slice(0,E).trim();if(y=y.slice(E+1),O){let $=vR(O);if($?.done)return{text:b.join(""),errors:_};let D=$?.chunk;D?.delta&&(b.push(D.delta),r&&r(D.delta)),D?.error&&_.push(D.error)}E=y.indexOf(`
96
+ `)}}return{text:b.join(""),errors:_}}finally{p.cancel().catch(()=>{})}}function Vk(t,e={},r){return ec(t,{...e,path:lu},r)}function Hk(t,e={},r){return ec(t,{...e,path:fu},r)}async function zk(t={}){let{baseUrl:e=tc,signal:r,headers:o}=t,n=await fetch(Uk(e,uu),{method:"GET",headers:o,signal:r});if(!n.ok)throw new Error(`simone health: HTTP ${n.status}`);return n.json()}function Wk({system:t,history:e=[],user:r,context:o}){let n=[];t&&n.push({role:"system",content:t});for(let s of e)!s||!s.role||typeof s.content!="string"||!s.content||n.push({role:s.role,content:s.content});if(r){let s=r;if(o!=null){let i=typeof o=="string"?o:JSON.stringify(o,null,2);s=`${s}
97
97
 
98
98
  ---
99
99
  Context:
100
100
  \`\`\`json
101
101
  ${i}
102
- \`\`\``}n.push({role:"user",content:s})}return n}var Hk=/```(?<lang>[a-zA-Z0-9_+-]*)\n(?<code>[\s\S]*?)```/g,kR=new Set(["component","components","page","pages","function","method","state","theme","color","font","icon"]);function vR(t){let e=[];for(let r of t.matchAll(Hk))e.push({lang:(r.groups?.lang||"").toLowerCase(),code:r.groups?.code??""});return e}function CR(t){return t.replace(Hk,"").trim()}function tb(t){if(!t||!/[{[]/.test(t))return null;try{return JSON.parse(t)}catch{}try{return JSON.parse(t.replace(/,\s*([}\]])/g,"$1"))}catch{}return null}function zk(t){return!!t&&typeof t=="object"&&typeof t.type=="string"&&kR.has(t.type)}function Wk(t){let e=(typeof t=="string"?t:"").trim();if(!e)return{kind:"text",text:"",message:""};let r=vR(e),o=r.filter(i=>/^(js|javascript|ts|typescript|jsx|tsx)$/.test(i.lang)),n=r.filter(i=>i.lang==="json"),s=CR(e);for(let i of n){let a=tb(i.code);if(zk(a))return{kind:"asset",text:s||a.description||"",asset:a,message:a.description||s||`Generated ${a.type}: ${a.title||a.key||""}`.trim()}}if(o.length>0){let i=o[0].code,a=tb("["+i+"]");return Array.isArray(a)&&a.length>1?{kind:"multi",text:s,assets:a,code:i,message:s||`Generated ${a.length} items`}:{kind:"component",text:s,code:i,message:s||"Generated a component"}}if(e.startsWith("{")){let i=tb(e);if(zk(i))return{kind:"asset",text:i.description||"",asset:i,message:i.description||`Generated ${i.type}: ${i.title||i.key||""}`.trim()}}return{kind:"text",text:e,message:e}}function qk(t){if(!t)return{code_response:{type:"error",content:"Empty response from assistant"}};switch(t.kind){case"asset":return{code_response:{type:"json_response",data:t.asset}};case"multi":return{code_response:{type:"symbols_component_code",component_code:t.code}};case"component":return{code_response:{type:"symbols_component_code",component_code:t.code,analysis_text:t.text}};default:return{code_response:{type:"plain_text_response",content:t.text||t.message||""}}}}var Kk=["You are Simone, the Symbols.app assistant.","You help users build DOMQL v3 components, pages, and design-system entries.",'When the user asks for a component or page, return a single ```json fenced block whose body is one asset object with shape { type, key, title, description, value }. type is one of "component", "page", "function", "state", "color", "font", "icon", "theme".',"For multiple assets, return one ```js fenced block with comma-separated asset objects.","For general questions, reply with prose only."].join(" "),Gk=["You are a DOMQL v3.14 code generator for the Symbols workspace.","Output EXECUTABLE DOMQL v3.14 for the requested page(s)/component(s) \u2014 never a description, never a plan, never an explanation.","Author data-first object schemas: child elements are UPPERCASE keys; styling lives in flat element props (NO attr/props/on wrappers); use design-system tokens (color/typography/spacing keys), never raw px/rem/hex/rgba; `extends` and `childExtends` are quoted strings; event handlers are flat (onClick, onInit) \u2014 never on:{} or props:{} wrappers.","OUTPUT FORMAT \u2014 pick ONE:","- SINGLE page/component: emit exactly one ```js fenced code block whose body is a single DOMQL object literal (an expression \u2014 start with `{`, no `export`, no variable assignment, no surrounding prose).",'- MULTIPLE pages/components: emit exactly one ```json fenced code block whose body is an object of the shape { "pages": { "PageKey": "<DOMQL object-literal source string>" }, "components": { "CompKey": "<DOMQL object-literal source string>" } }. Include only the sections you produce; each value is the DOMQL source for that key.',"Keys are PascalCase. Default to a single page unless the request clearly needs several distinct pages/components.","Emit ONLY the single fenced block. No text before or after it."].join(`
103
- `),eb={Starter:Kr,Free:Kr,Pro:"claude-opus-4-6"};function Yk(t){return t?eb[t]||t:Kr}var Xk={"@symbo.ls/signal":pd,"@symbo.ls/scratch":Pg,"@symbo.ls/element":Om,"@symbo.ls/css":jg,"@symbo.ls/utils":vl,"@symbo.ls/state":mm,"@symbo.ls/router":Da,"@symbo.ls/polyglot":Ay,"@symbo.ls/helmet":Cy,"@symbo.ls/fetch":ao,"@symbo.ls/capsize":Oy,"@symbo.ls/shorthand":My,"@symbo.ls/analyze":Gy,"@symbo.ls/inspect":Jy,"@symbo.ls/channels":Qy,"@symbo-ls/simone-server":rb},Jk=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:{}),o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in Xk)o[n]||(o[n]=Xk[n]);if(e)for(let n in e)o[n]||(o[n]=e[n]);return o},Zk=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:null);if(!r||!e||typeof e!="object")return null;let o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in e){let s=e[n];if(typeof s!="function"||Object.prototype.hasOwnProperty.call(o,n))continue;let i=a=>(Object.defineProperty(o,n,{configurable:!0,enumerable:!0,writable:!0,value:a}),a);Object.defineProperty(o,n,{configurable:!0,enumerable:!0,get:()=>i(s()),set:i})}return o},Qk=["@symbo.ls/sdk"],tv=(t,e)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r||!t||typeof t!="object")return null;let o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in t){let s=t[n];!s||typeof s!="object"&&typeof s!="function"||o[n]||(o[n]=s)}return o},ev=(t,e)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r||!Array.isArray(t))return null;let o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n of t){let s=n&&n.library?n.library:n;if(!s||typeof s!="object"||s.__isStub)continue;let i=s.key||s.name||s.__libraryKey;if(typeof i!="string"||!i)continue;let a=i.includes("/")?i.slice(i.indexOf("/")+1):i;for(let c of[`@symbo-ls/${a}`,`@symbo.ls/${a}`])o[c]||(o[c]=s)}return o};R();var nv=t=>{let e=typeof window<"u"?window:globalThis||{};e.document||(e.document={body:{}});let r=typeof document<"u"?document:e.document;t.document=t.document||r;let o=t.window;return o&&o!==e&&typeof o.URL!="function"?(typeof console<"u"&&console.warn&&!globalThis.__smblsRouterUrlWarned&&(globalThis.__smblsRouterUrlWarned=!0,console.warn("[smbls/router] context.window lacks URL, falling back to globalThis \u2014 passed-in window may be a stub (warned once; applies to every embed app this session)")),t.window=e):t.window=o||e,t.window},rv=(t="smbls")=>{let e={};for(let r in vo)Object.prototype.hasOwnProperty.call(vo,r)&&(Be(r)?e[`smbls.${r}`]=vo[r]:e[r]=vo[r]);return e},sv=t=>t.components?{...rv(),...t.components}:rv(),iv=t=>({...La,...Da,...Rr,...t.utils,...t.snippets,...t.functions}),av=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var ER=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,AR=3e3,TR=(t,e,r=o=>import(o))=>{if(typeof globalThis>"u")return Promise.resolve(null);try{let o=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});if(o[t])return Promise.resolve(o[t]);let n=Promise.resolve().then(()=>r(e)).then(i=>(i&&!o[t]&&(o[t]=i),o[t]||null)).catch(()=>null);return new Promise(i=>{let a=setTimeout(()=>i(null),AR);n.then(c=>{clearTimeout(a),i(c)})})}catch{return Promise.resolve(null)}},ov={},cv=async({dependencies:t,dependenciesOnDemand:e,document:r,preventCaching:o=!1,cdnProvider:n,packageManager:s,symbolsConfig:i,registerDependency:a=TR})=>{if(n||(n=Ar[s]||on(i)||"esmsh"),!t)return null;if(!sn(t))return console.warn(`[smbls] dependencies is ${Array.isArray(t)?"an ARRAY":`a ${typeof t}`}, not a package-name-keyed object \u2014 skipping the CDN fetch loop. This usually means a project's config.js declares its own "dependencies" field that collides with the platform package map once context.js spreads them together.`),null;let c=!1;for(let d in t){c=!0;break}if(!c)return null;let l=Sr()&&o?`?${Math.random()}`:"",f=async(d,h)=>{let g=Ee(d,h,n)+l;try{await Promise.race([an(g,{document:r,type:"module"}),new Promise((p,m)=>setTimeout(()=>m(new Error(`Timeout loading ${d}`)),1e4))]),await a(d,g)}catch(p){if(console.error(`Failed to load ${d} from ${n}:`,p),n!=="symbols")try{let m=Ee(d,h,"symbols")+l;await Promise.race([an(m,{document:r,type:"module"}),new Promise((b,_)=>setTimeout(()=>_(new Error(`Timeout fallback ${d}`)),2e4))]),console.log(`Successfully loaded ${d} from fallback (symbols.ls)`),await a(d,m)}catch(m){console.error(`Failed to load ${d} from fallback:`,m)}}},u=[];for(let d in t){let h=t[d];if(!(e&&e[d])&&!ov[d]&&(ov[d]=!0,!lo(d))){if(nn(d)){console.warn(`[smbls] dependency "${d}" looks like an un-interpolated template placeholder, not a real package specifier \u2014 skipping the CDN fetch (this is a bug upstream of the dependency loader, not a network failure).`);continue}ER(d)||u.push(f(d,h))}}return u.length&&await Promise.allSettled(u),t},lv=async(t,e)=>{let r=e.window||window,o=e.cdnProvider||on(e.symbolsConfig)||"esmsh",n=async i=>async(a,c)=>{let f=(i.window||window).packages[a];return typeof f=="function"?f():f},s=async i=>async(a,c=o)=>{let{dependenciesOnDemand:l}=i,f=i.document||document,u=i.window||window;if(!u.packages[a]&&lo(a))return await u.require(a,c);if(!u.packages[a]){let d=Sr()?`?${Math.random()}`:"";if(l&&l[a]){let h=l[a],g=Ee(a,h,c)+d;try{await i.utils.loadRemoteScript(g,{window:u,document:f})}catch(p){if(console.error(`Failed to load ${a} from ${c}:`,p),c!=="symbols"){let m=Ee(a,h,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let h=Ee(a,"latest",c)+d;try{await i.utils.loadRemoteScript(h,{window:u,document:f})}catch(g){if(console.error(`Failed to load ${a} from ${c}:`,g),c!=="symbols"){let p=Ee(a,"latest","symbols")+d;await i.utils.loadRemoteScript(p,{window:u,document:f})}}u.packages[a]="loadedOnDeman"}}return await u.require(a,c)};r.packages?r.packages=gt(r.packages,t):r.packages=t,r.require||(e.utils.require=await n(e),r.require=e.utils.require),r.requireOnDemand||(e.utils.requireOnDemand=await s(e),r.requireOnDemand=e.utils.requireOnDemand)},OR=/\s+/g,fv=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,RR=(t,e)=>{let r="";for(let o in t){let n=t[o];typeof n=="boolean"&&n?r+=` ${o}`:typeof n=="string"?r+=` ${n}`:typeof n=="function"&&(r+=` ${fv(n,e)}`)}return r},PR=(t,e,r)=>{if(!t)return;let{key:o}=e;t===!0&&(t=e.classlist={key:o}),typeof t=="string"&&(t=e.classlist={default:t}),t!==null&&typeof t=="object"&&!Array.isArray(t)&&(t=RR(t,e));let n=t.replace(OR," ").trim();if(r&&typeof r.setAttribute=="function")r.setAttribute("class",n);else if(r)try{r.className=n}catch{}return n},IR=()=>(t,e,r)=>{let o=fv(t,e);if(t){let{__ref:n}=e;n.__class.style=o}uv()(e.classlist,e,e.state,!0)},uv=()=>(t,e,r,o)=>{if(e.style&&!o)return;let{__ref:n}=e,{__class:s,__classNames:i}=n;if(!(t===null||typeof t!="object"||Array.isArray(t))){e.class&&(i.classProps=e.class),e.attr?.class&&(i.class=e.attr.class);for(let a in s){let c=s[a];if(!c){delete i[a];continue}let l;typeof c=="string"||typeof c=="number"?l=c:typeof c=="boolean"?l=e.key:l=_e(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];e.node&&PR(i,e,e.node)}},DR=()=>({style:IR(),classlist:uv()}),$R=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],ob=new WeakSet,nb=!1,LR=t=>!!t&&typeof t=="object",dv=(t,e)=>{let r=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,o=e.initOptions||{},n=e.registry||DR(),s=e.designSystem?st(ft(e.designSystem),ft(Pa),ee):ft(Pa),i={};for(let p of $R)e[p]!==void 0&&(i[p]=e[p]);let a,c=LR(r),f=c&&ob.has(r)&&!e.skipDesignSystemInit,u=!f&&!nb,d=f?`[data-smbls-app="${t}"]`:":root";if(e.scopeSelector=d,e.skipDesignSystemInit){if(a=C(t)||C(),a&&(a.__domDocument=r),a?.CSS_VARS){it(a);try{kt({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&kt(qn(a.CSS_MEDIA_VARS,d))}finally{tt()}}}else if(u){let p=C();p&&(p.__domDocument=r),a=ur(s,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...Vf,...i,...o}),a&&a!==p&&(a.__domDocument=r),c&&ob.add(r),nb=!0}else{let p=Wi(t,s,{cleanBase:!0});for(let m in i)p[m]=i[m];if(p.__domDocument=r,f){let m=t.replace(/[^a-zA-Z0-9]/g,"").substring(0,6);e.cssPrefix=m,p.varPrefix=m}it(p);try{a=ur(p,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...Vf,...i,...o})}finally{tt()}c&&ob.add(r),nb=!0}let h=a?.CONFIG||a,g=h?.font;if(g){it(h);try{for(let p in g){let m=g[p];if(!m?.fontFace)continue;let b=Array.isArray(m.fontFace)?m.fontFace:[m.fontFace];for(let _ of b)typeof _=="string"&&_.includes("font-family")&&kt(`@font-face { ${_} }`)}}finally{tt()}}return[a,n]},pv=(t,e)=>{let r={};e.state&&st(r,e.state),t&&t.state&&st(r,t.state);let o=e.polyglot;if(o?.translations){let n=null;try{typeof localStorage<"u"&&(n=localStorage.getItem(o.storageLangKey||"smbls_lang")||localStorage.getItem("lang"))}catch{}let s=n||r.lang||o.defaultLang||"en";n&&n!==r.lang&&(r.lang=n);let i=new Set,a=new Set,c=(u,d)=>{if(!a.has(u)){if(!er(e,u,r)){i.add(u);return}r[u]=d,a.add(u),Ue(e,u)}},l=o.translations[s];if(l&&typeof l=="object")for(let u in l)c(u,l[u]);let f=new Set(o.languages||[]);for(let u in o.translations)f.has(u)||c(u,o.translations[u]);i.size&&o.verbose!==!1&&e.verbose!==!1&&console.warn(`[polyglot] ${i.size} translation key${i.size===1?"":"s"} collide${i.size===1?"s":""} with a declared root-state key (${[...i].join(", ")}) \u2014 the declared value wins and the translation is NOT seeded into state. Rename the translation key, or read it with \`{{ key | polyglot }}\` instead of a bare \`{{ key }}\`.`)}return r.isRootState=!0,ft(r)},hv=(t,e)=>{S(t.routes)&&S(e.pages)&&gt(t.routes,e.pages);let r=t.routes||e.pages||{};for(let o in r){if(o.charCodeAt(0)===47)continue;let n=o==="index"?"":o;r["/"+n]=r[o],delete r[o]}return r},gv=t=>{Ii(t,t.sharedLibraries)};var ec={polyglot:Ua,getLocalStateLang:Wa,getActiveLang:Xn,getLang:Xn,setLang:za,getLanguages:Ba,loadTranslations:Va,upsertTranslation:Ha};Cr();var $e=Object.create(null);$e.open="0";$e.close="1";$e.ping="2";$e.pong="3";$e.message="4";$e.upgrade="5";$e.noop="6";var rc=Object.create(null);Object.keys($e).forEach(t=>{rc[$e[t]]=t});var oc={type:"error",data:"parser error"};var bv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",_v=typeof ArrayBuffer=="function",xv=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,nc=({type:t,data:e},r,o)=>bv&&e instanceof Blob?r?o(e):mv(e,o):_v&&(e instanceof ArrayBuffer||xv(e))?r?o(e):mv(new Blob([e]),o):o($e[t]+(e||"")),mv=(t,e)=>{let r=new FileReader;return r.onload=function(){let o=r.result.split(",")[1];e("b"+(o||""))},r.readAsDataURL(t)};function yv(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var sb;function wv(t,e){if(bv&&t.data instanceof Blob)return t.data.arrayBuffer().then(yv).then(e);if(_v&&(t.data instanceof ArrayBuffer||xv(t.data)))return e(yv(t.data));nc(t,!1,r=>{sb||(sb=new TextEncoder),e(sb.encode(r))})}var Sv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",sc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Sv.length;t++)sc[Sv.charCodeAt(t)]=t;var kv=t=>{let e=t.length*.75,r=t.length,o,n=0,s,i,a,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);let l=new ArrayBuffer(e),f=new Uint8Array(l);for(o=0;o<r;o+=4)s=sc[t.charCodeAt(o)],i=sc[t.charCodeAt(o+1)],a=sc[t.charCodeAt(o+2)],c=sc[t.charCodeAt(o+3)],f[n++]=s<<2|i>>4,f[n++]=(i&15)<<4|a>>2,f[n++]=(a&3)<<6|c&63;return l};var MR=typeof ArrayBuffer=="function",ic=(t,e)=>{if(typeof t!="string")return{type:"message",data:vv(t,e)};let r=t.charAt(0);return r==="b"?{type:"message",data:FR(t.substring(1),e)}:rc[r]?t.length>1?{type:rc[r],data:t.substring(1)}:{type:rc[r]}:oc},FR=(t,e)=>{if(MR){let r=kv(t);return vv(r,e)}else return{base64:!0,data:t}},vv=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer;var Cv="",Ev=(t,e)=>{let r=t.length,o=new Array(r),n=0;t.forEach((s,i)=>{nc(s,!1,a=>{o[i]=a,++n===r&&e(o.join(Cv))})})},Av=(t,e)=>{let r=t.split(Cv),o=[];for(let n=0;n<r.length;n++){let s=ic(r[n],e);if(o.push(s),s.type==="error")break}return o};function Tv(){return new TransformStream({transform(t,e){wv(t,r=>{let o=r.length,n;if(o<126)n=new Uint8Array(1),new DataView(n.buffer).setUint8(0,o);else if(o<65536){n=new Uint8Array(3);let s=new DataView(n.buffer);s.setUint8(0,126),s.setUint16(1,o)}else{n=new Uint8Array(9);let s=new DataView(n.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(o))}t.data&&typeof t.data!="string"&&(n[0]|=128),e.enqueue(n),e.enqueue(r)})}})}var ib;function pu(t){return t.reduce((e,r)=>e+r.length,0)}function hu(t,e){if(t[0].length===e)return t.shift();let r=new Uint8Array(e),o=0;for(let n=0;n<e;n++)r[n]=t[0][o++],o===t[0].length&&(t.shift(),o=0);return t.length&&o<t[0].length&&(t[0]=t[0].slice(o)),r}function Ov(t,e){ib||(ib=new TextDecoder);let r=[],o=0,n=-1,s=!1;return new TransformStream({transform(i,a){for(r.push(i);;){if(o===0){if(pu(r)<1)break;let c=hu(r,1);s=(c[0]&128)===128,n=c[0]&127,n<126?o=3:n===126?o=1:o=2}else if(o===1){if(pu(r)<2)break;let c=hu(r,2);n=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),o=3}else if(o===2){if(pu(r)<8)break;let c=hu(r,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(oc);break}n=f*Math.pow(2,32)+l.getUint32(4),o=3}else{if(pu(r)<n)break;let c=hu(r,n);a.enqueue(ic(s?c:ib.decode(c),e)),o=0}if(n===0||n>t){a.enqueue(oc);break}}}})}var ab=4;function dt(t){if(t)return NR(t)}function NR(t){for(var e in dt.prototype)t[e]=dt.prototype[e];return t}dt.prototype.on=dt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};dt.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};dt.prototype.off=dt.prototype.removeListener=dt.prototype.removeAllListeners=dt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var o,n=0;n<r.length;n++)if(o=r[n],o===e||o.fn===e){r.splice(n,1);break}return r.length===0&&delete this._callbacks["$"+t],this};dt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],o=1;o<arguments.length;o++)e[o-1]=arguments[o];if(r){r=r.slice(0);for(var o=0,n=r.length;o<n;++o)r[o].apply(this,e)}return this};dt.prototype.emitReserved=dt.prototype.emit;dt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};dt.prototype.hasListeners=function(t){return!!this.listeners(t).length};var pr=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),Ut=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Rv="arraybuffer";function gu(t,...e){return e.reduce((r,o)=>(t.hasOwnProperty(o)&&(r[o]=t[o]),r),{})}var jR=Ut.setTimeout,BR=Ut.clearTimeout;function hr(t,e){e.useNativeTimers?(t.setTimeoutFn=jR.bind(Ut),t.clearTimeoutFn=BR.bind(Ut)):(t.setTimeoutFn=Ut.setTimeout.bind(Ut),t.clearTimeoutFn=Ut.clearTimeout.bind(Ut))}var UR=1.33;function Pv(t){return typeof t=="string"?VR(t):Math.ceil((t.byteLength||t.size)*UR)}function VR(t){let e=0,r=0;for(let o=0,n=t.length;o<n;o++)e=t.charCodeAt(o),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(o++,r+=4);return r}function mu(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Iv(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function Dv(t){let e={},r=t.split("&");for(let o=0,n=r.length;o<n;o++){let s=r[o].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}var yu=class extends Error{constructor(e,r,o){super(e),this.description=r,this.context=o,this.type="TransportError"}},gr=class extends dt{constructor(e){super(),this.writable=!1,hr(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,r,o){return super.emitReserved("error",new yu(e,r,o)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let r=ic(e,this.socket.binaryType);this.onPacket(r)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,r={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){let e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){let r=Iv(e);return r.length?"?"+r:""}};var ac=class extends gr{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let r=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||r()})),this.writable||(o++,this.once("drain",function(){--o||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let r=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};Av(e,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,Ev(e,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=mu()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}};var $v=!1;try{$v=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var Lv=$v;function zR(){}var cb=class extends ac{constructor(e){if(super(e),typeof location<"u"){let r=location.protocol==="https:",o=location.port;o||(o=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||o!==e.port}}doWrite(e,r){let o=this.request({method:"POST",data:e});o.on("success",r),o.on("error",(n,s)=>{this.onError("xhr post error",n,s)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,o)=>{this.onError("xhr poll error",r,o)}),this.pollXhr=e}},Gr=class t extends dt{constructor(e,r,o){super(),this.createRequest=e,hr(this,o),this._opts=o,this._method=o.method||"GET",this._uri=r,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var e;let r=gu(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;let o=this._xhr=this.createRequest(r);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let n in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(n)&&o.setRequestHeader(n,this._opts.extraHeaders[n])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var n;o.readyState===3&&((n=this._opts.cookieJar)===null||n===void 0||n.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(n){this.setTimeoutFn(()=>{this._onError(n)},0);return}typeof document<"u"&&(this._index=t.requestsCount++,t.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=zR,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete t.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Gr.requestsCount=0;Gr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Mv);else if(typeof addEventListener=="function"){let t="onpagehide"in Ut?"pagehide":"unload";addEventListener(t,Mv,!1)}}function Mv(){for(let t in Gr.requests)Gr.requests.hasOwnProperty(t)&&Gr.requests[t].abort()}var HR=(function(){let t=Fv({xdomain:!1});return t&&t.responseType!==null})(),Yr=class extends cb{constructor(e){super(e);let r=e&&e.forceBase64;this.supportsBinary=HR&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Gr(Fv,this.uri(),e)}};function Fv(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Lv))return new XMLHttpRequest}catch{}if(!e)try{return new Ut[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var Nv=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",fb=class extends gr{get name(){return"websocket"}doOpen(){let e=this.uri(),r=this.opts.protocols,o=Nv?{}:gu(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,o)}catch(n){return this.emitReserved("error",n)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let r=0;r<e.length;r++){let o=e[r],n=r===e.length-1;nc(o,this.supportsBinary,s=>{try{this.doWrite(o,s)}catch{}n&&pr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=mu()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}},lb=Ut.WebSocket||Ut.MozWebSocket,Xr=class extends fb{createSocket(e,r,o){return Nv?new lb(e,r,o):r?new lb(e,r):new lb(e)}doWrite(e,r){this.ws.send(r)}};var rs=class extends gr{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let r=Ov(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=e.readable.pipeThrough(r).getReader(),n=Tv();n.readable.pipeTo(e.writable),this._writer=n.writable.getWriter();let s=()=>{o.read().then(({done:a,value:c})=>{a||(this.onPacket(c),s())}).catch(a=>{})};s();let i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let r=0;r<e.length;r++){let o=e[r],n=r===e.length-1;this._writer.write(o).then(()=>{n&&pr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var ub={websocket:Xr,webtransport:rs,polling:Yr};var WR=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,qR=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function os(t){if(t.length>8e3)throw"URI too long";let e=t,r=t.indexOf("["),o=t.indexOf("]");r!=-1&&o!=-1&&(t=t.substring(0,r)+t.substring(r,o).replace(/:/g,";")+t.substring(o,t.length));let n=WR.exec(t||""),s={},i=14;for(;i--;)s[qR[i]]=n[i]||"";return r!=-1&&o!=-1&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=KR(s,s.path),s.queryKey=GR(s,s.query),s}function KR(t,e){let r=/\/{2,9}/g,o=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&o.splice(0,1),e.slice(-1)=="/"&&o.splice(o.length-1,1),o}function GR(t,e){let r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,n,s){n&&(r[n]=s)}),r}var db=typeof addEventListener=="function"&&typeof removeEventListener=="function",bu=[];db&&addEventListener("offline",()=>{bu.forEach(t=>t())},!1);var Io=class t extends dt{constructor(e,r){if(super(),this.binaryType=Rv,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(r=e,e=null),e){let o=os(e);r.hostname=o.host,r.secure=o.protocol==="https"||o.protocol==="wss",r.port=o.port,o.query&&(r.query=o.query)}else r.host&&(r.hostname=os(r.host).host);hr(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(o=>{let n=o.prototype.name;this.transports.push(n),this._transportsByName[n]=o}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Dv(this.opts.query)),db&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},bu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let r=Object.assign({},this.opts.query);r.EIO=ab,r.transport=e,this.id&&(r.sid=this.id);let o=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let e=this.opts.rememberUpgrade&&t.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let r=this.createTransport(e);r.open(),this.setTransport(r)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",t.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let r=new Error("server error");r.code=e.data,this._onError(r);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let o=0;o<this.writeBuffer.length;o++){let n=this.writeBuffer[o].data;if(n&&(r+=Pv(n)),o>0&&r>this._maxPayload)return this.writeBuffer.slice(0,o);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,pr(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,o){return this._sendPacket("message",e,r,o),this}send(e,r,o){return this._sendPacket("message",e,r,o),this}_sendPacket(e,r,o,n){if(typeof r=="function"&&(n=r,r=void 0),typeof o=="function"&&(n=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;let s={type:e,data:r,options:o};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),n&&this.once("flush",n),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},o=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():e()}):this.upgrading?o():e()),this}_onError(e){if(t.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),db&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let o=bu.indexOf(this._offlineEventListener);o!==-1&&bu.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}};Io.protocol=ab;var _u=class extends Io{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let r=this.createTransport(e),o=!1;Io.priorWebsocketSuccess=!1;let n=()=>{o||(r.send([{type:"ping",data:"probe"}]),r.once("packet",u=>{if(!o)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Io.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(f(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{let d=new Error("probe error");d.transport=r.name,this.emitReserved("upgradeError",d)}}))};function s(){o||(o=!0,f(),r.close(),r=null)}let i=u=>{let d=new Error("probe error: "+u);d.transport=r.name,s(),this.emitReserved("upgradeError",d)};function a(){i("transport closed")}function c(){i("socket closed")}function l(u){r&&u.name!==r.name&&s()}let f=()=>{r.removeListener("open",n),r.removeListener("error",i),r.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};r.once("open",n),r.once("error",i),r.once("close",a),this.once("close",c),this.once("upgrading",l),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{o||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let r=[];for(let o=0;o<e.length;o++)~this.transports.indexOf(e[o])&&r.push(e[o]);return r}},ns=class extends _u{constructor(e,r={}){let o=typeof e=="object"?e:r;(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(n=>ub[n]).filter(n=>!!n)),super(e,o)}};var qU=ns.protocol;function jv(t,e="",r){let o=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),o=os(t)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";let s=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+s+":"+o.port+e,o.href=o.protocol+"://"+s+(r&&r.port===o.port?"":":"+o.port),o}var _b={};P(_b,{Decoder:()=>yb,Encoder:()=>mb,PacketType:()=>B,isPacketValid:()=>gP,protocol:()=>Xv});var XR=typeof ArrayBuffer=="function",JR=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Bv=Object.prototype.toString,ZR=typeof Blob=="function"||typeof Blob<"u"&&Bv.call(Blob)==="[object BlobConstructor]",QR=typeof File=="function"||typeof File<"u"&&Bv.call(File)==="[object FileConstructor]";function lc(t){return XR&&(t instanceof ArrayBuffer||JR(t))||ZR&&t instanceof Blob||QR&&t instanceof File}function cc(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,o=t.length;r<o;r++)if(cc(t[r]))return!0;return!1}if(lc(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return cc(t.toJSON(),!0);for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&cc(t[r]))return!0;return!1}function Uv(t){let e=[],r=t.data,o=t;return o.data=pb(r,e),o.attachments=e.length,{packet:o,buffers:e}}function pb(t,e){if(!t)return t;if(lc(t)){let r={_placeholder:!0,num:e.length};return e.push(t),r}else if(Array.isArray(t)){let r=new Array(t.length);for(let o=0;o<t.length;o++)r[o]=pb(t[o],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){let r={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=pb(t[o],e));return r}return t}function Vv(t,e){return t.data=hb(t.data,e),delete t.attachments,t}function hb(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=hb(t[r],e);else if(typeof t=="object")for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=hb(t[r],e));return t}var Gv=jC(Kv(),1),gb=(0,Gv.default)("socket.io-parser"),Yv=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Xv=5,B;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(B||(B={}));var mb=class{constructor(e){this.replacer=e}encode(e){return gb("encoding packet %j",e),(e.type===B.EVENT||e.type===B.ACK)&&cc(e)?this.encodeAsBinary({type:e.type===B.EVENT?B.BINARY_EVENT:B.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===B.BINARY_EVENT||e.type===B.BINARY_ACK)&&(r+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(r+=e.nsp+","),e.id!=null&&(r+=e.id),e.data!=null&&(r+=JSON.stringify(e.data,this.replacer)),gb("encoded %j as %s",e,r),r}encodeAsBinary(e){let r=Uv(e),o=this.encodeAsString(r.packet),n=r.buffers;return n.unshift(o),n}},yb=class t extends dt{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);let o=r.type===B.BINARY_EVENT;o||r.type===B.BINARY_ACK?(r.type=o?B.EVENT:B.ACK,this.reconstructor=new bb(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(lc(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0,o={type:Number(e.charAt(0))};if(B[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===B.BINARY_EVENT||o.type===B.BINARY_ACK){let s=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);let i=e.substring(s,r);if(i!=Number(i)||e.charAt(r)!=="-")throw new Error("Illegal attachments");let a=Number(i);if(!Jv(a)||a<0)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");o.attachments=a}if(e.charAt(r+1)==="/"){let s=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););o.nsp=e.substring(s,r)}else o.nsp="/";let n=e.charAt(r+1);if(n!==""&&Number(n)==n){let s=r+1;for(;++r;){let i=e.charAt(r);if(i==null||Number(i)!=i){--r;break}if(r===e.length)break}o.id=Number(e.substring(s,r+1))}if(e.charAt(++r)){let s=this.tryParse(e.substr(r));if(t.isPayloadValid(o.type,s))o.data=s;else throw new Error("invalid payload")}return gb("decoded %s as %j",e,o),o}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case B.CONNECT:return Su(r);case B.DISCONNECT:return r===void 0;case B.CONNECT_ERROR:return typeof r=="string"||Su(r);case B.EVENT:case B.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&Yv.indexOf(r[0])===-1);case B.ACK:case B.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},bb=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let r=Vv(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function dP(t){return typeof t=="string"}var Jv=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function pP(t){return t===void 0||Jv(t)}function Su(t){return Object.prototype.toString.call(t)==="[object Object]"}function hP(t,e){switch(t){case B.CONNECT:return e===void 0||Su(e);case B.DISCONNECT:return e===void 0;case B.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&Yv.indexOf(e[0])===-1);case B.ACK:return Array.isArray(e);case B.CONNECT_ERROR:return typeof e=="string"||Su(e);default:return!1}}function gP(t){return dP(t.nsp)&&pP(t.id)&&hP(t.type,t.data)}function ce(t,e,r){return t.on(e,r),function(){t.off(e,r)}}var mP=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),cs=class extends dt{constructor(e,r,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=r,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[ce(e,"open",this.onopen.bind(this)),ce(e,"packet",this.onpacket.bind(this)),ce(e,"error",this.onerror.bind(this)),ce(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...r){var o,n,s;if(mP.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(r.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;let i={type:B.EVENT,data:r};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){let f=this.ids++,u=r.pop();this._registerAckCallback(f,u),i.id=f}let a=(n=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||n===void 0?void 0:n.writable,c=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,r){var o;let n=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(n===void 0){this.acks[e]=r;return}let s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);r.call(this,new Error("operation has timed out"))},n),i=(...a)=>{this.io.clearTimeoutFn(s),r.apply(this,a)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...r){return new Promise((o,n)=>{let s=(i,a)=>i?n(i):o(a);s.withError=!0,r.push(s),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());let o={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((n,...s)=>(this._queue[0],n!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(n)):(this._queue.shift(),r&&r(null,...s)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:B.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(o=>String(o.id)===e)){let o=this.acks[e];delete this.acks[e],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case B.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case B.EVENT:case B.BINARY_EVENT:this.onevent(e);break;case B.ACK:case B.BINARY_ACK:this.onack(e);break;case B.DISCONNECT:this.ondisconnect();break;case B.CONNECT_ERROR:this.destroy();let o=new Error(e.data.message);o.data=e.data.data,this.emitReserved("connect_error",o);break}}onevent(e){let r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let r=this._anyListeners.slice();for(let o of r)o.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let r=this,o=!1;return function(...n){o||(o=!0,r.packet({type:B.ACK,id:e,data:n}))}}onack(e){let r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:B.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let r=this._anyListeners;for(let o=0;o<r.length;o++)if(e===r[o])return r.splice(o,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let r=this._anyOutgoingListeners;for(let o=0;o<r.length;o++)if(e===r[o])return r.splice(o,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let r=this._anyOutgoingListeners.slice();for(let o of r)o.apply(this,e.data)}}};function $o(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}$o.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-r:t+r}return Math.min(t,this.max)|0};$o.prototype.reset=function(){this.attempts=0};$o.prototype.setMin=function(t){this.ms=t};$o.prototype.setMax=function(t){this.max=t};$o.prototype.setJitter=function(t){this.jitter=t};var ls=class extends dt{constructor(e,r){var o;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,hr(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((o=r.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new $o({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;let n=r.parser||_b;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new ns(this.uri,this.opts);let r=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;let n=ce(r,"open",function(){o.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=ce(r,"error",s);if(this._timeout!==!1){let a=this._timeout,c=this.setTimeoutFn(()=>{n(),s(new Error("timeout")),r.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(n),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(ce(e,"ping",this.onping.bind(this)),ce(e,"data",this.ondata.bind(this)),ce(e,"error",this.onerror.bind(this)),ce(e,"close",this.onclose.bind(this)),ce(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(r){this.onclose("parse error",r)}}ondecoded(e){pr(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let o=this.nsps[e];return o?this._autoConnect&&!o.active&&o.connect():(o=new cs(this,e,r),this.nsps[e]=o),o}_destroy(e){let r=Object.keys(this.nsps);for(let o of r)if(this.nsps[o].active)return;this._close()}_packet(e){let r=this.encoder.encode(e);for(let o=0;o<r.length;o++)this.engine.write(r[o],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,r){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let r=this.backoff.duration();this._reconnecting=!0;let o=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(n=>{n?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",n)):e.onreconnect()}))},r);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var fc={};function fs(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let r=jv(t,e.path||"/socket.io"),o=r.source,n=r.id,s=r.path,i=fc[n]&&s in fc[n].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new ls(o,e):(fc[n]||(fc[n]=new ls(o,e)),c=fc[n]),r.query&&!e.query&&(e.query=r.queryKey),c.socket(r.path,e)}Object.assign(fs,{Manager:ls,Socket:cs,io:fs,connect:fs});R();var xb=new Set(["__proto__","constructor","prototype"]),wb=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(xb.has(t[e]))return!1;return!0},Zv=(t,e)=>{!t||!wb(e)||e.reduce((r,o,n,s)=>{if(r&&o in r){if(n!==s.length-1)return r[o];delete r[o]}},t)},Qv=(t,e,r,o=!1)=>{!t||!wb(e)||e.reduce((n,s,i,a)=>{if(n){if(i!==a.length-1)return!n[s]&&o&&(n[s]={}),n[s];n[s]=r}},t)},ku=(t,e)=>{let r=new Set;if(!Array.isArray(e))return r;for(let[o,n,s]of e)if(!(!Array.isArray(n)||!n.length))switch(r.add(n[0]),o){case"delete":Zv(t,n);break;case"update":case"set":Qv(t,n,s,!0);break;default:break}return r},uc=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},tC=(t,e)=>{for(let r in e){if(xb.has(r))continue;let o=e[r],n=t[r];if(o&&typeof o=="object"&&!Array.isArray(o)){if(!n||typeof n!="object"||Array.isArray(n)){r in t||(t[r]=JSON.parse(JSON.stringify(o)));continue}tC(n,o)}else r in t||(t[r]=o)}},Sb=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let n={designSystem:t.__rawDesignSystem};ku(n,e)}let r=JSON.parse(JSON.stringify(t.__rawDesignSystem)),o=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[];for(let n of o){let s=n&&n.designSystem;s&&typeof s=="object"&&tC(r,s)}return r};R();var eC=(t,e,r)=>{let o=!1;return(n={})=>{let{data:s}=n,{schema:i}=n;s&&(s=t.call("deepDestringifyFunctions",s,Array.isArray(s)?[]:{}),Object.entries(s).forEach(([a,c])=>{if(r[a]&&typeof r[a]=="object")if(a==="designSystem"){if(uc(r,c),o){let l=Sb(r);l&&ur(l)}}else no(r[a],c);else r[a]=c}),o=!0,i&&(r.schema=i))}},rC=(t,e,r)=>(o={})=>{let{changes:n}=o;if(!n||!Array.isArray(n)||!n.length)return;n=t.call("deepDestringifyFunctions",n,Array.isArray(n)?[]:{});let s=n.filter(c=>Array.isArray(c)&&Array.isArray(c[1])&&c[1][0]==="designSystem"),i=s.length?n.filter(c=>!s.includes(c)):n,a=ku(r,i);if(s.length&&a.add("designSystem"),a.has("designSystem")){let c=Sb(r,s);ur(c||r.designSystem)}if(a.has("state")&&e.update(r.state),["pages","components","snippets","functions","assets"].some(c=>a.has(c))){let{pathname:c,search:l,hash:f}=r.window.location;t.call("router",c+l+f,t.__ref.root,{},{scrollToTop:!1,force:!0})}};var yP={success:"green",error:"red",warning:"yellow"},oC=(t,e,r)=>{if(t.symbols){if(!r.connected){r.notifications.connected={title:"Connected",message:"to the Symbols live server"},r.update({connected:!0});let o=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(o)},3e3)}}else if(r.connected){r.notifications.connected={title:"Disconnected",type:"error"},r.update({connected:!1});let o=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected&&e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(o)},3e3)}},nC={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:yP[t.type||"success"],icon:null,Flex:{Title:{text:"{{ title }}"},P:{text:"{{ title }}"}},onRender:(e,r,o)=>{r.update({animation:"fadeInUp"})},onClick:(e,r,o)=>{delete o.notifications[r.key],r.update({animation:"fadeOutDown"}),o.onClose&&o.onClose(e,r,o)}}),IconText:null,childrenAs:"state",children:({state:t})=>t.notifications}};var bP=!1,_P=()=>bP?"http://localhost:8080":"https://api.symbols.app",xP=t=>{let e=t&&t.editor&&t.editor.socketUrl||t&&t.settings&&t.settings.socketUrl;return typeof e=="string"&&e?{mode:"collab",baseUrl:e}:t&&t.editor&&t.editor.runtime==="runner"?{mode:"runner",baseUrl:null}:{mode:null,baseUrl:null}},wP=async t=>{try{let e=t||_P(),r=await v.fetch(`${e}/service-token`,{method:"GET"}),o;try{let n=await r.clone().json();if(n&&typeof n.token=="string")return n.token.trim();o=await r.text()}catch{o=await r.text()}return(o||"").replace(/\s+/gu,"")||void 0}catch(e){console.error("[sync] Failed to fetch service-token",e)}},aC=(t,e,r,o)=>{t.on("snapshot",eC(e,r,o)),t.on("ops",rC(e,r,o)),t.on("clients",n=>{o.editor?.verbose&&oC(n,e,r)}),t.on("disconnect",n=>{o.editor?.verbose&&console.info("[sync] disconnected",n)})},SP=async(t,e,r,o)=>{let n=await wP(o);if(!n)return console.warn("[sync] no service token \u2014 collab disabled"),null;let s=r.key;if(!s)return console.warn("[sync] ctx.key missing \u2014 collab cannot authenticate"),null;let i=r.editor?.projectId||null,a=fs(o,{path:"/collab-socket",transports:["websocket"],auth:{token:n,projectId:i,projectKey:s,branch:"main",live:!0,clientType:"platform"},reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return a.on("connect",()=>{r.editor?.verbose&&console.info("[sync] connected (collab)")}),aC(a,t,e,r),a},kP=(t,e,r)=>{let o=fs({transports:["websocket","polling"],reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return o.on("connect",()=>{r.editor?.verbose!==!1&&console.info("[sync] connected (runner)")}),aC(o,t,e,r),o.on("reload",()=>{typeof v<"u"&&v.location&&v.location.reload()}),o},vP=async(t,e,r)=>{let{mode:o,baseUrl:n}=xP(r);return o?o==="collab"?SP(t,e,r,n):o==="runner"?kP(t,e,r):null:null},CP={onInit:vP};var cC=t=>typeof t>"u",sC=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),iC=t=>t?.editor?.runtime==="runner",lC=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},fC={name:"sync",beforeCreate(t,e){let r=e&&e.editor;(r&&!cC(r.liveSync)?r.liveSync:sC(e)||iC(e))&&(sC(e)&&!iC(e)&&!e?.key||lC(t,CP))}},uC={name:"notifications",beforeCreate(t,e){if(!e)return;let r=cC(e.notifications)?null:e.notifications,o=e.editor&&e.editor.verbose===!0;(r===!0||r!==!1&&o)&&lC(t,nC)}};var Cb={};P(Cb,{AlertTemplate:()=>Lu,ConfirmTemplate:()=>Du,CustomTemplate:()=>Fu,ModalLayer:()=>Iu,ModalRoot:()=>Pu,PromptTemplate:()=>Mu,windowsComponents:()=>vb});var kb={};P(kb,{alertDialog:()=>Ou,closeAllModals:()=>Au,closeModal:()=>Cu,confirmDialog:()=>Tu,getLayer:()=>vu,openModal:()=>Eu,promptDialog:()=>Ru,windowsFunctions:()=>mr});function J(t){let e=t;for(;e;){if(e.layer!==void 0)return e.layer;e=e.parent}return null}function us(t){let e=t;for(;e;){if(e.key==="ModalRoot")return e;if(e.ModalRoot&&e.ModalRoot.__ref)return e.ModalRoot;e=e.parent}let r=t?.getRoot?.();return r?.ModalRoot?r.ModalRoot:typeof globalThis<"u"&&globalThis.__SMBLS_WINDOWS_MODAL_ROOT__?.__ref?globalThis.__SMBLS_WINDOWS_MODAL_ROOT__:null}function vu(){return J(this)}var EP=(t,e)=>{let r=t&&t["ModalLayer_"+e],o=r?.node||r?.__ref?.node;!o||typeof o.style?.setProperty!="function"||(o.style.setProperty("display","none","important"),o.style.setProperty("opacity","0","important"),o.style.setProperty("visibility","hidden","important"),o.style.setProperty("pointer-events","none","important"))},dC=(t,e)=>{let r=t&&t["ModalLayer_"+e],o=r?.node||r?.__ref?.node;!o||typeof o.style?.removeProperty!="function"||(o.style.removeProperty("display"),o.style.removeProperty("opacity"),o.style.removeProperty("visibility"),o.style.removeProperty("pointer-events"))};function Cu(t){let e=us(this);if(!e)return;let r=e.state?.stack||[];if(!r.length)return;let o,n,s;if(t){if(s=[],o=r.filter((i,a)=>{let c=i.id!==t;return c||s.push(a),c}),o.length===r.length)return;n=r.filter(i=>i.id===t)}else o=r.slice(0,-1),n=r.slice(-1),s=[r.length-1];e.state.update({stack:o});for(let i of s)EP(e,i);for(let i of n)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function Eu(t={}){let e=us(this);if(!e)return console.warn("[windows] openModal: ModalRoot is not mounted on the app root. Add `ModalRoot: {}` to your shell tree and import windowsComponents into context."),null;e.__modalIdCounter=(e.__modalIdCounter||0)+1;let r=t.id||`modal_${e.__modalIdCounter}_${Date.now().toString(36)}`,o={id:r,template:t.template||"custom",title:t.title,message:t.message,icon:t.icon,confirmText:t.confirmText,cancelText:t.cancelText,okText:t.okText,confirmTheme:t.confirmTheme,placeholder:t.placeholder,defaultValue:t.defaultValue,dismissOnBackdrop:t.dismissOnBackdrop,content:t.content,width:t.width,maxWidth:t.maxWidth,maxHeight:t.maxHeight,onConfirm:t.onConfirm,onCancel:t.onCancel,onOk:t.onOk,onClose:t.onClose},n=e.state?.stack||[];if(n.length>=5)return console.warn("[windows] openModal: stack already at the 5-layer maximum, dropping the new layer. Close some modals first."),null;let s=n.length;return dC(e,s),e.state.update({stack:[...n,o]}),r}function Au(){let t=us(this);!t||!t.state?.stack?.length||t.state.update({stack:[]})}function Tu(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"confirm"})}function Ou(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"alert"})}function Ru(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"prompt"})}var mr={openModal:Eu,closeModal:Cu,closeAllModals:Au,confirmDialog:Tu,alertDialog:Ou,promptDialog:Ru,getLayer:vu};var AP=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),pC=t=>{if(!t?.querySelectorAll)return[];let e=t.querySelectorAll(AP),r=[];for(let o=0;o<e.length;o++){let n=e[o];(n.offsetParent!==null||n===document.activeElement)&&r.push(n)}return r},hC=t=>{let e=t.state?.stack||[];if(!e.length)return null;let r=t["ModalLayer_"+(e.length-1)];return r?.node||r?.__ref?.node||null},Pu={tag:"div",position:"fixed",inset:"0",zIndex:"2000",pointerEvents:"none",state:{stack:[]},subscribeTo:["stack"],ModalLayer_0:{__slotIndex:0,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[0]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_1:{__slotIndex:1,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[1]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_2:{__slotIndex:2,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[2]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_3:{__slotIndex:3,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[3]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_4:{__slotIndex:4,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[4]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},onInit:(t,e)=>{if(typeof window>"u")return;globalThis.__SMBLS_WINDOWS_MODAL_ROOT__=t;let r=t.context;if(r){r.functions||(r.functions={});for(let a in mr)a in r.functions||(r.functions[a]=mr[a])}t.__modalOpeners=t.__modalOpeners||[],t.__prevStackLen=t.state&&t.state.stack&&t.state.stack.length||0;let o=()=>{let a=t.state?.stack||[];if(!a.length)return;let c=a.length-1,l=a[c];t.state.update({stack:a.slice(0,-1)});let f=t["ModalLayer_"+c],u=f?.node||f?.__ref?.node;if(u?.style?.setProperty&&(u.style.setProperty("display","none","important"),u.style.setProperty("opacity","0","important"),u.style.setProperty("visibility","hidden","important"),u.style.setProperty("pointer-events","none","important")),typeof l?.onClose=="function")try{l.onClose()}catch(d){console.warn("[windows] onClose threw:",d)}},n=a=>{let c=t.state?.stack;if(c?.length){if(a.key==="Tab"){let l=hC(t);if(!l)return;let f=pC(l);if(!f.length){a.preventDefault();let g=l.querySelector?.('[role="dialog"]')||l;try{g.focus?.()}catch{}return}let u=f[0],d=f[f.length-1],h=document.activeElement;if(!l.contains(h)){a.preventDefault();try{u.focus()}catch{}return}if(a.shiftKey&&h===u){a.preventDefault();try{d.focus()}catch{}}else if(!a.shiftKey&&h===d){a.preventDefault();try{u.focus()}catch{}}return}a.key==="Escape"&&c[c.length-1]?.dismissOnBackdrop!==!1&&(a.preventDefault(),o())}};window.addEventListener("keydown",n),t.__escHandler=n;let s=a=>{let c=t.state?.stack||[];if(a<0||a>=c.length)return;let l=c[a];t.state.update({stack:c.filter((d,h)=>h!==a)});let f=t["ModalLayer_"+a],u=f?.node||f?.__ref?.node;if(u?.style?.setProperty&&(u.style.setProperty("display","none","important"),u.style.setProperty("opacity","0","important"),u.style.setProperty("visibility","hidden","important"),u.style.setProperty("pointer-events","none","important")),typeof l?.onClose=="function")try{l.onClose()}catch(d){console.warn("[windows] onClose threw:",d)}},i=a=>{let c=t.state?.stack||[];if(!c.length)return;let l=a.target?.closest?.('[data-key="Close"]');if(l){for(let f=c.length-1;f>=0;f--){let u=t["ModalLayer_"+f],d=u?.node||u?.__ref?.node;if(d&&d.contains(l)){a.preventDefault(),a.stopPropagation(),s(f);return}}return}for(let f=c.length-1;f>=0;f--){let u=t["ModalLayer_"+f];if((u?.node||u?.__ref?.node)===a.target){if(c[f]?.dismissOnBackdrop===!1)return;a.preventDefault(),a.stopPropagation(),s(f);return}}};document.addEventListener("click",i,!0),t.__clickDelegate=i},onUpdate:t=>{if(typeof window>"u")return;let e=(t.state&&t.state.stack||[]).length,r=t.__prevStackLen||0;if(e!==r)if(t.__prevStackLen=e,t.__modalOpeners=t.__modalOpeners||[],e>r)t.__modalOpeners[e]=document.activeElement&&document.activeElement!==document.body?document.activeElement:t.__modalOpeners[e]||null,typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>{let o=hC(t);if(!o)return;let n=pC(o)[0]||o.querySelector&&o.querySelector('[role="dialog"]')||o;try{n.focus&&n.focus()}catch{}});else{let o=null;for(let n=r;n>e;n--)t.__modalOpeners[n]&&(o=o||t.__modalOpeners[n]),t.__modalOpeners[n]=null;if(o&&typeof o.focus=="function"&&o.isConnected!==!1)try{o.focus()}catch{}}},onDestroy:t=>{typeof window>"u"||(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__===t&&(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__=null),t.__escHandler&&(window.removeEventListener("keydown",t.__escHandler),delete t.__escHandler),t.__clickDelegate&&(document.removeEventListener("click",t.__clickDelegate,!0),delete t.__clickDelegate))}};var Iu={tag:"div",position:"fixed",inset:"0",alignItems:"center",justifyContent:"center",padding:"A",background:"black.45",backdropFilter:"blur(4px)",transitionProperty:"opacity",transitionDuration:"200ms",transitionTimingFunction:"ease",zIndex:(t,e)=>`${2e3+(t.__slotIndex||0)*10}`,display:(t,e)=>t.layer?"flex":"none",opacity:(t,e)=>t.layer?"1":"0",visibility:(t,e)=>t.layer?"visible":"hidden",pointerEvents:(t,e)=>t.layer?"auto":"none",ModalWindow:{attr:{role:"dialog","aria-modal":"true",tabindex:"-1","aria-labelledby":t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}},width:t=>J(t)?.width||"H",maxWidth:t=>J(t)?.maxWidth||"90vw",maxHeight:t=>J(t)?.maxHeight||null,onClick:t=>t.stopPropagation(),onMousedown:t=>t.stopPropagation(),ModalHeader:{display:"none"},overflow:"visible",ConfirmTemplate:{hide:t=>J(t)?.template!=="confirm"},AlertTemplate:{hide:t=>J(t)?.template!=="alert"},PromptTemplate:{hide:t=>J(t)?.template!=="prompt"},CustomTemplate:{hide:t=>J(t)?.template!=="custom"}}};var ds=(t,e,r)=>J(t)?.[e]||r,TP=t=>{let e=J(t)?.icon;return e===null||e===!1},Du={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>ds(t,"title","Are you sure?"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>ds(t,"message","This action cannot be undone."),color:"dim"}},Icons:{hide:t=>TP(t),Indicator:{extends:"Icon",opacity:".7",icon:t=>ds(t,"icon","warning")}}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"Button",theme:"ghost",text:t=>ds(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let o=J(e);if(o?.onCancel)try{o.onCancel()}catch(n){console.warn("[windows] confirm.onCancel threw:",n)}e.call("closeModal",o?.id)}},ConfirmBtn:{extends:"Button",theme:t=>ds(t,"confirmTheme","primary"),text:t=>ds(t,"confirmText","Confirm"),onClick:(t,e,r)=>{let o=J(e);if(o?.onConfirm)try{o.onConfirm()}catch(n){console.warn("[windows] confirm.onConfirm threw:",n)}e.call("closeModal",o?.id)}}}};var $u=(t,e,r)=>J(t)?.[e]||r,Lu={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>$u(t,"title","Notice"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>$u(t,"message",""),color:"dim"}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:t=>$u(t,"icon","info")}}},ModalFooter:{flow:"x",align:"center end",OkBtn:{extends:"Button",theme:"primary",text:t=>$u(t,"okText","OK"),onClick:(t,e,r)=>{let o=J(e);if(o?.onOk)try{o.onOk()}catch(n){console.warn("[windows] alert.onOk threw:",n)}e.call("closeModal",o?.id)}}}};var dc=(t,e,r)=>J(t)?.[e]||r,Mu={tag:"div",flow:"y",gap:"B",scope:{value:""},onRender:(t,e)=>{let r=J(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let o=t.InputRow&&t.InputRow.node;o&&(o.value=t.scope.value)},onUpdate:(t,e)=>{let r=J(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let o=t.InputRow&&t.InputRow.node;o&&(o.value=t.scope.value)},ModalHeader:{Hgroup:{H:{text:t=>dc(t,"title","Enter a value"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>dc(t,"message",""),color:"dim"}}},InputRow:{extends:"Input",autofocus:!0,placeholder:t=>dc(t,"placeholder",""),value:(t,e)=>t.parent.scope?.value||"",onInput:(t,e,r)=>{e.parent.scope.value=t.target.value},onKeydown:(t,e,r)=>{if(t.key!=="Enter")return;t.preventDefault();let o=J(e),n=e.parent.scope?.value||"";if(o?.onConfirm)try{o.onConfirm(n)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",o?.id)}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"Button",theme:"ghost",text:t=>dc(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let o=J(e);if(o?.onCancel)try{o.onCancel()}catch(n){console.warn("[windows] prompt.onCancel threw:",n)}e.call("closeModal",o?.id)}},ConfirmBtn:{extends:"Button",theme:"primary",text:t=>dc(t,"confirmText","OK"),onClick:(t,e,r)=>{let o=J(e),n=e.parent.parent.scope?.value||"";if(o?.onConfirm)try{o.onConfirm(n)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",o?.id)}}}};var Fu={tag:"div",flow:"y",gap:"B",Title:{tag:"h2",text:t=>J(t)?.title||"",hide:t=>!J(t)?.title,position:"absolute",width:"1px",height:"1px",margin:"-1px",padding:"0",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0",attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},Slot:{tag:"div",onInit:t=>{let e=Z(()=>{let r=J(t),o=r?.content||null,n=r?.id||null;if(!o){t.__lastLayerId!=null&&(t.removeContent(),t.__lastLayerId=null);return}if(t.__lastLayerId!==n){t.__lastLayerId=n;try{t.set(o);let s=t.content?.context;if(s){s.functions||(s.functions={});for(let i in mr)i in s.functions||(s.functions[i]=mr[i])}}catch(s){console.warn("[windows] custom.content set failed:",s)}}});t.__ref&&t.__ref.__effects.push(e)}}};var vb={ModalRoot:Pu,ModalLayer:Iu,ConfirmTemplate:Du,AlertTemplate:Lu,PromptTemplate:Mu,CustomTemplate:Fu};var Ob={};P(Ob,{Dropdown:()=>zu,DropdownList:()=>Hu,DropdownParent:()=>Wu,DropdownParentFocus:()=>qu,DropdownRoot:()=>Uu,DropdownSiblingFocus:()=>Ku,DropdownTrigger:()=>Vu,dropdownComponents:()=>Tb});var gC=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),OP=(t,e,r,o)=>{let n=gC(t,r,o),s=i=>n[i]>=e.height+8;return s("bottom")?"bottom":s("top")?"top":n.bottom>=n.top?"bottom":"top"},RP=(t,e,r,o,n)=>{let s=gC(e,o,n),i=t==="top"||t==="bottom"?r.height+8:r.width+8;if(s[t]>=i)return t;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[t];return a&&s[a]>=i?a:t},Nu=(t,e,r)=>Math.max(e,Math.min(r,t)),Jr=(t,e,r="auto")=>{if(!t)return{left:0,top:0,side:"bottom",align:"start"};let o=typeof window<"u"?window.innerWidth:1024,n=typeof window<"u"?window.innerHeight:768,s={width:Math.max(120,e?.width||0),height:Math.max(40,e?.height||0)};if(r==="center"){let d=Nu((o-s.width)/2,8,Math.max(8,o-s.width-8)),h=Nu((n-s.height)/2,8,Math.max(8,n-s.height-8));return{left:d,top:h,side:"center",align:"center"}}let i,a;if(r==="auto")i=OP(t,s,o,n),a="start";else{let d=r.split("-");i=d[0],a=d[1]||"start",i=RP(i,t,s,o,n)}let c,l;i==="bottom"||i==="top"?(a==="start"?c=t.left:a==="end"?c=t.right-s.width:c=t.left+(t.width-s.width)/2,l=i==="bottom"?t.bottom+8:t.top-s.height-8):(a==="start"?l=t.top:a==="end"?l=t.bottom-s.height:l=t.top+(t.height-s.height)/2,c=i==="right"?t.right+8:t.left-s.width-8);let f=Math.max(8,o-s.width-8),u=Math.max(8,n-s.height-8);return c=Nu(c,8,f),l=Nu(l,8,u),{left:c,top:l,side:i,align:a}},ps=t=>{switch(t){case"bottom":return"translateY(-6px)";case"top":return"translateY(6px)";case"left":return"translateX(6px)";case"right":return"translateX(-6px)";case"center":return"translateY(0px)";default:return"translateY(-6px)"}};var yr={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:"70vh",theme:"modal"},PP=t=>{if(!t||typeof t.getBoundingClientRect!="function")return null;let e=t.getBoundingClientRect();return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}},Eb=t=>t?.getRoot?.()?.DropdownRoot||null,IP=0,DP=()=>`dropdown_${++IP}_${Date.now().toString(36)}`;function ju(t={}){let e=Eb(this);if(!e)return console.warn("[dropdown] openDropdown: DropdownRoot is not mounted on the app root. Add `DropdownRoot: {}` to your shell tree and import dropdown components into context."),null;let r=t.anchorEl?.node||t.anchorEl,o=t.anchorRect||PP(r);if(!o)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let n=t.id||DP(),s=t.triggerEl?.node||t.triggerEl||r||(typeof document<"u"?document.activeElement:null),i={id:n,content:t.content||null,anchor:o,placement:t.placement||yr.placement,trigger:t.trigger||yr.trigger,offset:t.offset??yr.offset,minWidth:t.minWidth||yr.minWidth,maxWidth:t.maxWidth||yr.maxWidth,maxHeight:t.maxHeight||yr.maxHeight,theme:t.theme||yr.theme,background:t.background||null,round:t.round||null,onOpen:t.onOpen,onClose:t.onClose,triggerEl:s},a=e.state?.layer;if(a?.onClose)try{a.onClose(a)}catch(c){console.warn("[dropdown] prev onClose threw:",c)}if(e.state.update({layer:i}),typeof i.onOpen=="function")try{i.onOpen(i)}catch(c){console.warn("[dropdown] onOpen threw:",c)}return n}function Bu(t){let e=Eb(this);if(!e)return;let r=e.state?.layer;r&&e.state.update({layer:{...r,inert:!!t}})}function Lo(t){let e=Eb(this);if(!e)return;let r=e.state?.layer;if(!r)return;let o=typeof t=="string"?t:t?.id;if(o&&r.id&&o!==r.id)return;let n=r.onClose;e.state.update({layer:null});let s=r.triggerEl;if(s&&typeof s.focus=="function")try{s.focus()}catch(i){console.warn("[dropdown] focus restore threw:",i)}if(typeof n=="function")try{n(r)}catch(i){console.warn("[dropdown] onClose threw:",i)}}var $P=`
102
+ \`\`\``}n.push({role:"user",content:s})}return n}var Kk=/```(?<lang>[a-zA-Z0-9_+-]*)\n(?<code>[\s\S]*?)```/g,CR=new Set(["component","components","page","pages","function","method","state","theme","color","font","icon"]);function ER(t){let e=[];for(let r of t.matchAll(Kk))e.push({lang:(r.groups?.lang||"").toLowerCase(),code:r.groups?.code??""});return e}function AR(t){return t.replace(Kk,"").trim()}function ob(t){if(!t||!/[{[]/.test(t))return null;try{return JSON.parse(t)}catch{}try{return JSON.parse(t.replace(/,\s*([}\]])/g,"$1"))}catch{}return null}function qk(t){return!!t&&typeof t=="object"&&typeof t.type=="string"&&CR.has(t.type)}function Gk(t){let e=(typeof t=="string"?t:"").trim();if(!e)return{kind:"text",text:"",message:""};let r=ER(e),o=r.filter(i=>/^(js|javascript|ts|typescript|jsx|tsx)$/.test(i.lang)),n=r.filter(i=>i.lang==="json"),s=AR(e);for(let i of n){let a=ob(i.code);if(qk(a))return{kind:"asset",text:s||a.description||"",asset:a,message:a.description||s||`Generated ${a.type}: ${a.title||a.key||""}`.trim()}}if(o.length>0){let i=o[0].code,a=ob("["+i+"]");return Array.isArray(a)&&a.length>1?{kind:"multi",text:s,assets:a,code:i,message:s||`Generated ${a.length} items`}:{kind:"component",text:s,code:i,message:s||"Generated a component"}}if(e.startsWith("{")){let i=ob(e);if(qk(i))return{kind:"asset",text:i.description||"",asset:i,message:i.description||`Generated ${i.type}: ${i.title||i.key||""}`.trim()}}return{kind:"text",text:e,message:e}}function Yk(t){if(!t)return{code_response:{type:"error",content:"Empty response from assistant"}};switch(t.kind){case"asset":return{code_response:{type:"json_response",data:t.asset}};case"multi":return{code_response:{type:"symbols_component_code",component_code:t.code}};case"component":return{code_response:{type:"symbols_component_code",component_code:t.code,analysis_text:t.text}};default:return{code_response:{type:"plain_text_response",content:t.text||t.message||""}}}}var Xk=["You are Simone, the Symbols.app assistant.","You help users build DOMQL v3 components, pages, and design-system entries.",'When the user asks for a component or page, return a single ```json fenced block whose body is one asset object with shape { type, key, title, description, value }. type is one of "component", "page", "function", "state", "color", "font", "icon", "theme".',"For multiple assets, return one ```js fenced block with comma-separated asset objects.","For general questions, reply with prose only."].join(" "),Jk=["You are a DOMQL v3.14 code generator for the Symbols workspace.","Output EXECUTABLE DOMQL v3.14 for the requested page(s)/component(s) \u2014 never a description, never a plan, never an explanation.","Author data-first object schemas: child elements are UPPERCASE keys; styling lives in flat element props (NO attr/props/on wrappers); use design-system tokens (color/typography/spacing keys), never raw px/rem/hex/rgba; `extends` and `childExtends` are quoted strings; event handlers are flat (onClick, onInit) \u2014 never on:{} or props:{} wrappers.","OUTPUT FORMAT \u2014 pick ONE:","- SINGLE page/component: emit exactly one ```js fenced code block whose body is a single DOMQL object literal (an expression \u2014 start with `{`, no `export`, no variable assignment, no surrounding prose).",'- MULTIPLE pages/components: emit exactly one ```json fenced code block whose body is an object of the shape { "pages": { "PageKey": "<DOMQL object-literal source string>" }, "components": { "CompKey": "<DOMQL object-literal source string>" } }. Include only the sections you produce; each value is the DOMQL source for that key.',"Keys are PascalCase. Default to a single page unless the request clearly needs several distinct pages/components.","Emit ONLY the single fenced block. No text before or after it."].join(`
103
+ `),nb={Starter:Kr,Free:Kr,Pro:"claude-opus-4-6"};function Zk(t){return t?nb[t]||t:Kr}var Qk={"@symbo.ls/signal":gd,"@symbo.ls/scratch":$g,"@symbo.ls/element":Im,"@symbo.ls/css":Vg,"@symbo.ls/utils":Cl,"@symbo.ls/state":_m,"@symbo.ls/router":$a,"@symbo.ls/polyglot":Ry,"@symbo.ls/helmet":Ty,"@symbo.ls/fetch":ao,"@symbo.ls/capsize":Iy,"@symbo.ls/shorthand":jy,"@symbo.ls/analyze":Jy,"@symbo.ls/inspect":tb,"@symbo.ls/channels":rb,"@symbo-ls/simone-server":sb},tv=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:{}),o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in Qk)o[n]||(o[n]=Qk[n]);if(e)for(let n in e)o[n]||(o[n]=e[n]);return o},ev=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:null);if(!r||!e||typeof e!="object")return null;let o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in e){let s=e[n];if(typeof s!="function"||Object.prototype.hasOwnProperty.call(o,n))continue;let i=a=>(Object.defineProperty(o,n,{configurable:!0,enumerable:!0,writable:!0,value:a}),a);Object.defineProperty(o,n,{configurable:!0,enumerable:!0,get:()=>i(s()),set:i})}return o},rv=["@symbo.ls/sdk"],ov=(t,e)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r||!t||typeof t!="object")return null;let o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in t){let s=t[n];!s||typeof s!="object"&&typeof s!="function"||o[n]||(o[n]=s)}return o},nv=(t,e)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r||!Array.isArray(t))return null;let o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n of t){let s=n&&n.library?n.library:n;if(!s||typeof s!="object"||s.__isStub)continue;let i=s.key||s.name||s.__libraryKey;if(typeof i!="string"||!i)continue;let a=i.includes("/")?i.slice(i.indexOf("/")+1):i;for(let c of[`@symbo-ls/${a}`,`@symbo.ls/${a}`])o[c]||(o[c]=s)}return o};R();var av=t=>{let e=typeof window<"u"?window:globalThis||{};e.document||(e.document={body:{}});let r=typeof document<"u"?document:e.document;t.document=t.document||r;let o=t.window;return o&&o!==e&&typeof o.URL!="function"?(typeof console<"u"&&console.warn&&!globalThis.__smblsRouterUrlWarned&&(globalThis.__smblsRouterUrlWarned=!0,console.warn("[smbls/router] context.window lacks URL, falling back to globalThis \u2014 passed-in window may be a stub (warned once; applies to every embed app this session)")),t.window=e):t.window=o||e,t.window},sv=(t="smbls")=>{let e={};for(let r in Co)Object.prototype.hasOwnProperty.call(Co,r)&&(Be(r)?e[`smbls.${r}`]=Co[r]:e[r]=Co[r]);return e},cv=t=>t.components?{...sv(),...t.components}:sv(),lv=t=>({...Ma,...$a,...Rr,...t.utils,...t.snippets,...t.functions}),fv=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var TR=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,OR=3e3,RR=(t,e,r=o=>import(o))=>{if(typeof globalThis>"u")return Promise.resolve(null);try{let o=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});if(o[t])return Promise.resolve(o[t]);let n=Promise.resolve().then(()=>r(e)).then(i=>(i&&!o[t]&&(o[t]=i),o[t]||null)).catch(()=>null);return new Promise(i=>{let a=setTimeout(()=>i(null),OR);n.then(c=>{clearTimeout(a),i(c)})})}catch{return Promise.resolve(null)}},iv={},uv=async({dependencies:t,dependenciesOnDemand:e,document:r,preventCaching:o=!1,cdnProvider:n,packageManager:s,symbolsConfig:i,registerDependency:a=RR})=>{if(n||(n=Ar[s]||nn(i)||"esmsh"),!t)return null;if(!an(t))return console.warn(`[smbls] dependencies is ${Array.isArray(t)?"an ARRAY":`a ${typeof t}`}, not a package-name-keyed object \u2014 skipping the CDN fetch loop. This usually means a project's config.js declares its own "dependencies" field that collides with the platform package map once context.js spreads them together.`),null;let c=!1;for(let d in t){c=!0;break}if(!c)return null;let l=Sr()&&o?`?${Math.random()}`:"",f=async(d,h)=>{let g=Ee(d,h,n)+l;try{await Promise.race([cn(g,{document:r,type:"module"}),new Promise((p,m)=>setTimeout(()=>m(new Error(`Timeout loading ${d}`)),1e4))]),await a(d,g)}catch(p){if(console.error(`Failed to load ${d} from ${n}:`,p),n!=="symbols")try{let m=Ee(d,h,"symbols")+l;await Promise.race([cn(m,{document:r,type:"module"}),new Promise((b,_)=>setTimeout(()=>_(new Error(`Timeout fallback ${d}`)),2e4))]),console.log(`Successfully loaded ${d} from fallback (symbols.ls)`),await a(d,m)}catch(m){console.error(`Failed to load ${d} from fallback:`,m)}}},u=[];for(let d in t){let h=t[d];if(!(e&&e[d])&&!iv[d]&&(iv[d]=!0,!lo(d))){if(sn(d)){console.warn(`[smbls] dependency "${d}" looks like an un-interpolated template placeholder, not a real package specifier \u2014 skipping the CDN fetch (this is a bug upstream of the dependency loader, not a network failure).`);continue}TR(d)||u.push(f(d,h))}}return u.length&&await Promise.allSettled(u),t},dv=async(t,e)=>{let r=e.window||window,o=e.cdnProvider||nn(e.symbolsConfig)||"esmsh",n=async i=>async(a,c)=>{let f=(i.window||window).packages[a];return typeof f=="function"?f():f},s=async i=>async(a,c=o)=>{let{dependenciesOnDemand:l}=i,f=i.document||document,u=i.window||window;if(!u.packages[a]&&lo(a))return await u.require(a,c);if(!u.packages[a]){let d=Sr()?`?${Math.random()}`:"";if(l&&l[a]){let h=l[a],g=Ee(a,h,c)+d;try{await i.utils.loadRemoteScript(g,{window:u,document:f})}catch(p){if(console.error(`Failed to load ${a} from ${c}:`,p),c!=="symbols"){let m=Ee(a,h,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let h=Ee(a,"latest",c)+d;try{await i.utils.loadRemoteScript(h,{window:u,document:f})}catch(g){if(console.error(`Failed to load ${a} from ${c}:`,g),c!=="symbols"){let p=Ee(a,"latest","symbols")+d;await i.utils.loadRemoteScript(p,{window:u,document:f})}}u.packages[a]="loadedOnDeman"}}return await u.require(a,c)};r.packages?r.packages=gt(r.packages,t):r.packages=t,r.require||(e.utils.require=await n(e),r.require=e.utils.require),r.requireOnDemand||(e.utils.requireOnDemand=await s(e),r.requireOnDemand=e.utils.requireOnDemand)},PR=/\s+/g,pv=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,IR=(t,e)=>{let r="";for(let o in t){let n=t[o];typeof n=="boolean"&&n?r+=` ${o}`:typeof n=="string"?r+=` ${n}`:typeof n=="function"&&(r+=` ${pv(n,e)}`)}return r},DR=(t,e,r)=>{if(!t)return;let{key:o}=e;t===!0&&(t=e.classlist={key:o}),typeof t=="string"&&(t=e.classlist={default:t}),t!==null&&typeof t=="object"&&!Array.isArray(t)&&(t=IR(t,e));let n=t.replace(PR," ").trim();if(r&&typeof r.setAttribute=="function")r.setAttribute("class",n);else if(r)try{r.className=n}catch{}return n},$R=()=>(t,e,r)=>{let o=pv(t,e);if(t){let{__ref:n}=e;n.__class.style=o}hv()(e.classlist,e,e.state,!0)},hv=()=>(t,e,r,o)=>{if(e.style&&!o)return;let{__ref:n}=e,{__class:s,__classNames:i}=n;if(!(t===null||typeof t!="object"||Array.isArray(t))){e.class&&(i.classProps=e.class),e.attr?.class&&(i.class=e.attr.class);for(let a in s){let c=s[a];if(!c){delete i[a];continue}let l;typeof c=="string"||typeof c=="number"?l=c:typeof c=="boolean"?l=e.key:l=_e(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];e.node&&DR(i,e,e.node)}},LR=()=>({style:$R(),classlist:hv()}),MR=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],ib=new WeakSet,ab=!1,FR=t=>!!t&&typeof t=="object",gv=(t,e)=>{let r=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,o=e.initOptions||{},n=e.registry||LR(),s=e.designSystem?st(ft(e.designSystem),ft(Ia),ee):ft(Ia),i={};for(let p of MR)e[p]!==void 0&&(i[p]=e[p]);let a,c=FR(r),f=c&&ib.has(r)&&!e.skipDesignSystemInit,u=!f&&!ab,d=f?`[data-smbls-app="${t}"]`:":root";if(e.scopeSelector=d,e.skipDesignSystemInit){if(a=C(t)||C(),a&&(a.__domDocument=r),a?.CSS_VARS){it(a);try{kt({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&kt(Kn(a.CSS_MEDIA_VARS,d))}finally{tt()}}}else if(u){let p=C();p&&(p.__domDocument=r),a=ur(s,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...zf,...i,...o}),a&&a!==p&&(a.__domDocument=r),c&&ib.add(r),ab=!0}else{let p=qi(t,s,{cleanBase:!0});for(let m in i)p[m]=i[m];if(p.__domDocument=r,f){let m=t.replace(/[^a-zA-Z0-9]/g,"").substring(0,6);e.cssPrefix=m,p.varPrefix=m}it(p);try{a=ur(p,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...zf,...i,...o})}finally{tt()}c&&ib.add(r),ab=!0}let h=a?.CONFIG||a,g=h?.font;if(g){it(h);try{for(let p in g){let m=g[p];if(!m?.fontFace)continue;let b=Array.isArray(m.fontFace)?m.fontFace:[m.fontFace];for(let _ of b)typeof _=="string"&&_.includes("font-family")&&kt(`@font-face { ${_} }`)}}finally{tt()}}return[a,n]},mv=(t,e)=>{let r={};e.state&&st(r,e.state),t&&t.state&&st(r,t.state);let o=e.polyglot;if(o?.translations){let n=null;try{typeof localStorage<"u"&&(n=localStorage.getItem(o.storageLangKey||"smbls_lang")||localStorage.getItem("lang"))}catch{}let s=n||r.lang||o.defaultLang||"en";n&&n!==r.lang&&(r.lang=n);let i=new Set,a=new Set,c=(u,d)=>{if(!a.has(u)){if(!er(e,u,r)){i.add(u);return}r[u]=d,a.add(u),Ue(e,u)}},l=o.translations[s];if(l&&typeof l=="object")for(let u in l)c(u,l[u]);let f=new Set(o.languages||[]);for(let u in o.translations)f.has(u)||c(u,o.translations[u]);i.size&&o.verbose!==!1&&e.verbose!==!1&&console.warn(`[polyglot] ${i.size} translation key${i.size===1?"":"s"} collide${i.size===1?"s":""} with a declared root-state key (${[...i].join(", ")}) \u2014 the declared value wins and the translation is NOT seeded into state. Rename the translation key, or read it with \`{{ key | polyglot }}\` instead of a bare \`{{ key }}\`.`)}return r.isRootState=!0,ft(r)},yv=(t,e)=>{S(t.routes)&&S(e.pages)&&gt(t.routes,e.pages);let r=t.routes||e.pages||{};for(let o in r){if(o.charCodeAt(0)===47)continue;let n=o==="index"?"":o;r["/"+n]=r[o],delete r[o]}return r},bv=t=>{Di(t,t.sharedLibraries)};var rc={polyglot:Va,getLocalStateLang:qa,getActiveLang:Jn,getLang:Jn,setLang:za,getLanguages:Ua,loadTranslations:Ha,upsertTranslation:Wa};Cr();var $e=Object.create(null);$e.open="0";$e.close="1";$e.ping="2";$e.pong="3";$e.message="4";$e.upgrade="5";$e.noop="6";var oc=Object.create(null);Object.keys($e).forEach(t=>{oc[$e[t]]=t});var nc={type:"error",data:"parser error"};var wv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Sv=typeof ArrayBuffer=="function",kv=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,sc=({type:t,data:e},r,o)=>wv&&e instanceof Blob?r?o(e):_v(e,o):Sv&&(e instanceof ArrayBuffer||kv(e))?r?o(e):_v(new Blob([e]),o):o($e[t]+(e||"")),_v=(t,e)=>{let r=new FileReader;return r.onload=function(){let o=r.result.split(",")[1];e("b"+(o||""))},r.readAsDataURL(t)};function xv(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var cb;function vv(t,e){if(wv&&t.data instanceof Blob)return t.data.arrayBuffer().then(xv).then(e);if(Sv&&(t.data instanceof ArrayBuffer||kv(t.data)))return e(xv(t.data));sc(t,!1,r=>{cb||(cb=new TextEncoder),e(cb.encode(r))})}var Cv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ic=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Cv.length;t++)ic[Cv.charCodeAt(t)]=t;var Ev=t=>{let e=t.length*.75,r=t.length,o,n=0,s,i,a,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);let l=new ArrayBuffer(e),f=new Uint8Array(l);for(o=0;o<r;o+=4)s=ic[t.charCodeAt(o)],i=ic[t.charCodeAt(o+1)],a=ic[t.charCodeAt(o+2)],c=ic[t.charCodeAt(o+3)],f[n++]=s<<2|i>>4,f[n++]=(i&15)<<4|a>>2,f[n++]=(a&3)<<6|c&63;return l};var NR=typeof ArrayBuffer=="function",ac=(t,e)=>{if(typeof t!="string")return{type:"message",data:Av(t,e)};let r=t.charAt(0);return r==="b"?{type:"message",data:jR(t.substring(1),e)}:oc[r]?t.length>1?{type:oc[r],data:t.substring(1)}:{type:oc[r]}:nc},jR=(t,e)=>{if(NR){let r=Ev(t);return Av(r,e)}else return{base64:!0,data:t}},Av=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer;var Tv="",Ov=(t,e)=>{let r=t.length,o=new Array(r),n=0;t.forEach((s,i)=>{sc(s,!1,a=>{o[i]=a,++n===r&&e(o.join(Tv))})})},Rv=(t,e)=>{let r=t.split(Tv),o=[];for(let n=0;n<r.length;n++){let s=ac(r[n],e);if(o.push(s),s.type==="error")break}return o};function Pv(){return new TransformStream({transform(t,e){vv(t,r=>{let o=r.length,n;if(o<126)n=new Uint8Array(1),new DataView(n.buffer).setUint8(0,o);else if(o<65536){n=new Uint8Array(3);let s=new DataView(n.buffer);s.setUint8(0,126),s.setUint16(1,o)}else{n=new Uint8Array(9);let s=new DataView(n.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(o))}t.data&&typeof t.data!="string"&&(n[0]|=128),e.enqueue(n),e.enqueue(r)})}})}var lb;function gu(t){return t.reduce((e,r)=>e+r.length,0)}function mu(t,e){if(t[0].length===e)return t.shift();let r=new Uint8Array(e),o=0;for(let n=0;n<e;n++)r[n]=t[0][o++],o===t[0].length&&(t.shift(),o=0);return t.length&&o<t[0].length&&(t[0]=t[0].slice(o)),r}function Iv(t,e){lb||(lb=new TextDecoder);let r=[],o=0,n=-1,s=!1;return new TransformStream({transform(i,a){for(r.push(i);;){if(o===0){if(gu(r)<1)break;let c=mu(r,1);s=(c[0]&128)===128,n=c[0]&127,n<126?o=3:n===126?o=1:o=2}else if(o===1){if(gu(r)<2)break;let c=mu(r,2);n=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),o=3}else if(o===2){if(gu(r)<8)break;let c=mu(r,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(nc);break}n=f*Math.pow(2,32)+l.getUint32(4),o=3}else{if(gu(r)<n)break;let c=mu(r,n);a.enqueue(ac(s?c:lb.decode(c),e)),o=0}if(n===0||n>t){a.enqueue(nc);break}}}})}var fb=4;function dt(t){if(t)return BR(t)}function BR(t){for(var e in dt.prototype)t[e]=dt.prototype[e];return t}dt.prototype.on=dt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};dt.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};dt.prototype.off=dt.prototype.removeListener=dt.prototype.removeAllListeners=dt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var o,n=0;n<r.length;n++)if(o=r[n],o===e||o.fn===e){r.splice(n,1);break}return r.length===0&&delete this._callbacks["$"+t],this};dt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],o=1;o<arguments.length;o++)e[o-1]=arguments[o];if(r){r=r.slice(0);for(var o=0,n=r.length;o<n;++o)r[o].apply(this,e)}return this};dt.prototype.emitReserved=dt.prototype.emit;dt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};dt.prototype.hasListeners=function(t){return!!this.listeners(t).length};var pr=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),Ut=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Dv="arraybuffer";function yu(t,...e){return e.reduce((r,o)=>(t.hasOwnProperty(o)&&(r[o]=t[o]),r),{})}var UR=Ut.setTimeout,VR=Ut.clearTimeout;function hr(t,e){e.useNativeTimers?(t.setTimeoutFn=UR.bind(Ut),t.clearTimeoutFn=VR.bind(Ut)):(t.setTimeoutFn=Ut.setTimeout.bind(Ut),t.clearTimeoutFn=Ut.clearTimeout.bind(Ut))}var HR=1.33;function $v(t){return typeof t=="string"?zR(t):Math.ceil((t.byteLength||t.size)*HR)}function zR(t){let e=0,r=0;for(let o=0,n=t.length;o<n;o++)e=t.charCodeAt(o),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(o++,r+=4);return r}function bu(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Lv(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function Mv(t){let e={},r=t.split("&");for(let o=0,n=r.length;o<n;o++){let s=r[o].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}var _u=class extends Error{constructor(e,r,o){super(e),this.description=r,this.context=o,this.type="TransportError"}},gr=class extends dt{constructor(e){super(),this.writable=!1,hr(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,r,o){return super.emitReserved("error",new _u(e,r,o)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let r=ac(e,this.socket.binaryType);this.onPacket(r)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,r={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){let e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){let r=Lv(e);return r.length?"?"+r:""}};var cc=class extends gr{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let r=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||r()})),this.writable||(o++,this.once("drain",function(){--o||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let r=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};Rv(e,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,Ov(e,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=bu()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}};var Fv=!1;try{Fv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var Nv=Fv;function WR(){}var ub=class extends cc{constructor(e){if(super(e),typeof location<"u"){let r=location.protocol==="https:",o=location.port;o||(o=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||o!==e.port}}doWrite(e,r){let o=this.request({method:"POST",data:e});o.on("success",r),o.on("error",(n,s)=>{this.onError("xhr post error",n,s)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,o)=>{this.onError("xhr poll error",r,o)}),this.pollXhr=e}},Gr=class t extends dt{constructor(e,r,o){super(),this.createRequest=e,hr(this,o),this._opts=o,this._method=o.method||"GET",this._uri=r,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var e;let r=yu(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;let o=this._xhr=this.createRequest(r);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let n in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(n)&&o.setRequestHeader(n,this._opts.extraHeaders[n])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var n;o.readyState===3&&((n=this._opts.cookieJar)===null||n===void 0||n.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(n){this.setTimeoutFn(()=>{this._onError(n)},0);return}typeof document<"u"&&(this._index=t.requestsCount++,t.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=WR,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete t.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Gr.requestsCount=0;Gr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",jv);else if(typeof addEventListener=="function"){let t="onpagehide"in Ut?"pagehide":"unload";addEventListener(t,jv,!1)}}function jv(){for(let t in Gr.requests)Gr.requests.hasOwnProperty(t)&&Gr.requests[t].abort()}var qR=(function(){let t=Bv({xdomain:!1});return t&&t.responseType!==null})(),Yr=class extends ub{constructor(e){super(e);let r=e&&e.forceBase64;this.supportsBinary=qR&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Gr(Bv,this.uri(),e)}};function Bv(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Nv))return new XMLHttpRequest}catch{}if(!e)try{return new Ut[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var Uv=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",pb=class extends gr{get name(){return"websocket"}doOpen(){let e=this.uri(),r=this.opts.protocols,o=Uv?{}:yu(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,o)}catch(n){return this.emitReserved("error",n)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let r=0;r<e.length;r++){let o=e[r],n=r===e.length-1;sc(o,this.supportsBinary,s=>{try{this.doWrite(o,s)}catch{}n&&pr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=bu()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}},db=Ut.WebSocket||Ut.MozWebSocket,Xr=class extends pb{createSocket(e,r,o){return Uv?new db(e,r,o):r?new db(e,r):new db(e)}doWrite(e,r){this.ws.send(r)}};var os=class extends gr{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let r=Iv(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=e.readable.pipeThrough(r).getReader(),n=Pv();n.readable.pipeTo(e.writable),this._writer=n.writable.getWriter();let s=()=>{o.read().then(({done:a,value:c})=>{a||(this.onPacket(c),s())}).catch(a=>{})};s();let i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let r=0;r<e.length;r++){let o=e[r],n=r===e.length-1;this._writer.write(o).then(()=>{n&&pr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var hb={websocket:Xr,webtransport:os,polling:Yr};var KR=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,GR=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ns(t){if(t.length>8e3)throw"URI too long";let e=t,r=t.indexOf("["),o=t.indexOf("]");r!=-1&&o!=-1&&(t=t.substring(0,r)+t.substring(r,o).replace(/:/g,";")+t.substring(o,t.length));let n=KR.exec(t||""),s={},i=14;for(;i--;)s[GR[i]]=n[i]||"";return r!=-1&&o!=-1&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=YR(s,s.path),s.queryKey=XR(s,s.query),s}function YR(t,e){let r=/\/{2,9}/g,o=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&o.splice(0,1),e.slice(-1)=="/"&&o.splice(o.length-1,1),o}function XR(t,e){let r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,n,s){n&&(r[n]=s)}),r}var gb=typeof addEventListener=="function"&&typeof removeEventListener=="function",xu=[];gb&&addEventListener("offline",()=>{xu.forEach(t=>t())},!1);var Do=class t extends dt{constructor(e,r){if(super(),this.binaryType=Dv,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(r=e,e=null),e){let o=ns(e);r.hostname=o.host,r.secure=o.protocol==="https"||o.protocol==="wss",r.port=o.port,o.query&&(r.query=o.query)}else r.host&&(r.hostname=ns(r.host).host);hr(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(o=>{let n=o.prototype.name;this.transports.push(n),this._transportsByName[n]=o}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Mv(this.opts.query)),gb&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},xu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let r=Object.assign({},this.opts.query);r.EIO=fb,r.transport=e,this.id&&(r.sid=this.id);let o=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let e=this.opts.rememberUpgrade&&t.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let r=this.createTransport(e);r.open(),this.setTransport(r)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",t.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let r=new Error("server error");r.code=e.data,this._onError(r);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let o=0;o<this.writeBuffer.length;o++){let n=this.writeBuffer[o].data;if(n&&(r+=$v(n)),o>0&&r>this._maxPayload)return this.writeBuffer.slice(0,o);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,pr(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,o){return this._sendPacket("message",e,r,o),this}send(e,r,o){return this._sendPacket("message",e,r,o),this}_sendPacket(e,r,o,n){if(typeof r=="function"&&(n=r,r=void 0),typeof o=="function"&&(n=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;let s={type:e,data:r,options:o};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),n&&this.once("flush",n),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},o=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():e()}):this.upgrading?o():e()),this}_onError(e){if(t.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),gb&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let o=xu.indexOf(this._offlineEventListener);o!==-1&&xu.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}};Do.protocol=fb;var wu=class extends Do{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let r=this.createTransport(e),o=!1;Do.priorWebsocketSuccess=!1;let n=()=>{o||(r.send([{type:"ping",data:"probe"}]),r.once("packet",u=>{if(!o)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Do.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(f(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{let d=new Error("probe error");d.transport=r.name,this.emitReserved("upgradeError",d)}}))};function s(){o||(o=!0,f(),r.close(),r=null)}let i=u=>{let d=new Error("probe error: "+u);d.transport=r.name,s(),this.emitReserved("upgradeError",d)};function a(){i("transport closed")}function c(){i("socket closed")}function l(u){r&&u.name!==r.name&&s()}let f=()=>{r.removeListener("open",n),r.removeListener("error",i),r.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};r.once("open",n),r.once("error",i),r.once("close",a),this.once("close",c),this.once("upgrading",l),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{o||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let r=[];for(let o=0;o<e.length;o++)~this.transports.indexOf(e[o])&&r.push(e[o]);return r}},ss=class extends wu{constructor(e,r={}){let o=typeof e=="object"?e:r;(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(n=>hb[n]).filter(n=>!!n)),super(e,o)}};var GU=ss.protocol;function Vv(t,e="",r){let o=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),o=ns(t)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";let s=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+s+":"+o.port+e,o.href=o.protocol+"://"+s+(r&&r.port===o.port?"":":"+o.port),o}var Sb={};P(Sb,{Decoder:()=>xb,Encoder:()=>_b,PacketType:()=>B,isPacketValid:()=>yP,protocol:()=>Qv});var ZR=typeof ArrayBuffer=="function",QR=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Hv=Object.prototype.toString,tP=typeof Blob=="function"||typeof Blob<"u"&&Hv.call(Blob)==="[object BlobConstructor]",eP=typeof File=="function"||typeof File<"u"&&Hv.call(File)==="[object FileConstructor]";function fc(t){return ZR&&(t instanceof ArrayBuffer||QR(t))||tP&&t instanceof Blob||eP&&t instanceof File}function lc(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,o=t.length;r<o;r++)if(lc(t[r]))return!0;return!1}if(fc(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return lc(t.toJSON(),!0);for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&lc(t[r]))return!0;return!1}function zv(t){let e=[],r=t.data,o=t;return o.data=mb(r,e),o.attachments=e.length,{packet:o,buffers:e}}function mb(t,e){if(!t)return t;if(fc(t)){let r={_placeholder:!0,num:e.length};return e.push(t),r}else if(Array.isArray(t)){let r=new Array(t.length);for(let o=0;o<t.length;o++)r[o]=mb(t[o],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){let r={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=mb(t[o],e));return r}return t}function Wv(t,e){return t.data=yb(t.data,e),delete t.attachments,t}function yb(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=yb(t[r],e);else if(typeof t=="object")for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=yb(t[r],e));return t}var Jv=VC(Xv(),1),bb=(0,Jv.default)("socket.io-parser"),Zv=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Qv=5,B;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(B||(B={}));var _b=class{constructor(e){this.replacer=e}encode(e){return bb("encoding packet %j",e),(e.type===B.EVENT||e.type===B.ACK)&&lc(e)?this.encodeAsBinary({type:e.type===B.EVENT?B.BINARY_EVENT:B.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===B.BINARY_EVENT||e.type===B.BINARY_ACK)&&(r+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(r+=e.nsp+","),e.id!=null&&(r+=e.id),e.data!=null&&(r+=JSON.stringify(e.data,this.replacer)),bb("encoded %j as %s",e,r),r}encodeAsBinary(e){let r=zv(e),o=this.encodeAsString(r.packet),n=r.buffers;return n.unshift(o),n}},xb=class t extends dt{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);let o=r.type===B.BINARY_EVENT;o||r.type===B.BINARY_ACK?(r.type=o?B.EVENT:B.ACK,this.reconstructor=new wb(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(fc(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0,o={type:Number(e.charAt(0))};if(B[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===B.BINARY_EVENT||o.type===B.BINARY_ACK){let s=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);let i=e.substring(s,r);if(i!=Number(i)||e.charAt(r)!=="-")throw new Error("Illegal attachments");let a=Number(i);if(!tC(a)||a<0)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");o.attachments=a}if(e.charAt(r+1)==="/"){let s=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););o.nsp=e.substring(s,r)}else o.nsp="/";let n=e.charAt(r+1);if(n!==""&&Number(n)==n){let s=r+1;for(;++r;){let i=e.charAt(r);if(i==null||Number(i)!=i){--r;break}if(r===e.length)break}o.id=Number(e.substring(s,r+1))}if(e.charAt(++r)){let s=this.tryParse(e.substr(r));if(t.isPayloadValid(o.type,s))o.data=s;else throw new Error("invalid payload")}return bb("decoded %s as %j",e,o),o}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case B.CONNECT:return vu(r);case B.DISCONNECT:return r===void 0;case B.CONNECT_ERROR:return typeof r=="string"||vu(r);case B.EVENT:case B.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&Zv.indexOf(r[0])===-1);case B.ACK:case B.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},wb=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let r=Wv(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function hP(t){return typeof t=="string"}var tC=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function gP(t){return t===void 0||tC(t)}function vu(t){return Object.prototype.toString.call(t)==="[object Object]"}function mP(t,e){switch(t){case B.CONNECT:return e===void 0||vu(e);case B.DISCONNECT:return e===void 0;case B.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&Zv.indexOf(e[0])===-1);case B.ACK:return Array.isArray(e);case B.CONNECT_ERROR:return typeof e=="string"||vu(e);default:return!1}}function yP(t){return hP(t.nsp)&&gP(t.id)&&mP(t.type,t.data)}function ce(t,e,r){return t.on(e,r),function(){t.off(e,r)}}var bP=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),ls=class extends dt{constructor(e,r,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=r,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[ce(e,"open",this.onopen.bind(this)),ce(e,"packet",this.onpacket.bind(this)),ce(e,"error",this.onerror.bind(this)),ce(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...r){var o,n,s;if(bP.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(r.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;let i={type:B.EVENT,data:r};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){let f=this.ids++,u=r.pop();this._registerAckCallback(f,u),i.id=f}let a=(n=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||n===void 0?void 0:n.writable,c=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,r){var o;let n=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(n===void 0){this.acks[e]=r;return}let s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);r.call(this,new Error("operation has timed out"))},n),i=(...a)=>{this.io.clearTimeoutFn(s),r.apply(this,a)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...r){return new Promise((o,n)=>{let s=(i,a)=>i?n(i):o(a);s.withError=!0,r.push(s),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());let o={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((n,...s)=>(this._queue[0],n!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(n)):(this._queue.shift(),r&&r(null,...s)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:B.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(o=>String(o.id)===e)){let o=this.acks[e];delete this.acks[e],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case B.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case B.EVENT:case B.BINARY_EVENT:this.onevent(e);break;case B.ACK:case B.BINARY_ACK:this.onack(e);break;case B.DISCONNECT:this.ondisconnect();break;case B.CONNECT_ERROR:this.destroy();let o=new Error(e.data.message);o.data=e.data.data,this.emitReserved("connect_error",o);break}}onevent(e){let r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let r=this._anyListeners.slice();for(let o of r)o.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let r=this,o=!1;return function(...n){o||(o=!0,r.packet({type:B.ACK,id:e,data:n}))}}onack(e){let r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:B.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let r=this._anyListeners;for(let o=0;o<r.length;o++)if(e===r[o])return r.splice(o,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let r=this._anyOutgoingListeners;for(let o=0;o<r.length;o++)if(e===r[o])return r.splice(o,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let r=this._anyOutgoingListeners.slice();for(let o of r)o.apply(this,e.data)}}};function Lo(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Lo.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-r:t+r}return Math.min(t,this.max)|0};Lo.prototype.reset=function(){this.attempts=0};Lo.prototype.setMin=function(t){this.ms=t};Lo.prototype.setMax=function(t){this.max=t};Lo.prototype.setJitter=function(t){this.jitter=t};var fs=class extends dt{constructor(e,r){var o;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,hr(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((o=r.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new Lo({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;let n=r.parser||Sb;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new ss(this.uri,this.opts);let r=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;let n=ce(r,"open",function(){o.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=ce(r,"error",s);if(this._timeout!==!1){let a=this._timeout,c=this.setTimeoutFn(()=>{n(),s(new Error("timeout")),r.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(n),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(ce(e,"ping",this.onping.bind(this)),ce(e,"data",this.ondata.bind(this)),ce(e,"error",this.onerror.bind(this)),ce(e,"close",this.onclose.bind(this)),ce(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(r){this.onclose("parse error",r)}}ondecoded(e){pr(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let o=this.nsps[e];return o?this._autoConnect&&!o.active&&o.connect():(o=new ls(this,e,r),this.nsps[e]=o),o}_destroy(e){let r=Object.keys(this.nsps);for(let o of r)if(this.nsps[o].active)return;this._close()}_packet(e){let r=this.encoder.encode(e);for(let o=0;o<r.length;o++)this.engine.write(r[o],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,r){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let r=this.backoff.duration();this._reconnecting=!0;let o=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(n=>{n?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",n)):e.onreconnect()}))},r);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var uc={};function us(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let r=Vv(t,e.path||"/socket.io"),o=r.source,n=r.id,s=r.path,i=uc[n]&&s in uc[n].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new fs(o,e):(uc[n]||(uc[n]=new fs(o,e)),c=uc[n]),r.query&&!e.query&&(e.query=r.queryKey),c.socket(r.path,e)}Object.assign(us,{Manager:fs,Socket:ls,io:us,connect:us});R();var kb=new Set(["__proto__","constructor","prototype"]),vb=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(kb.has(t[e]))return!1;return!0},eC=(t,e)=>{!t||!vb(e)||e.reduce((r,o,n,s)=>{if(r&&o in r){if(n!==s.length-1)return r[o];delete r[o]}},t)},rC=(t,e,r,o=!1)=>{!t||!vb(e)||e.reduce((n,s,i,a)=>{if(n){if(i!==a.length-1)return!n[s]&&o&&(n[s]={}),n[s];n[s]=r}},t)},Cu=(t,e)=>{let r=new Set;if(!Array.isArray(e))return r;for(let[o,n,s]of e)if(!(!Array.isArray(n)||!n.length))switch(r.add(n[0]),o){case"delete":eC(t,n);break;case"update":case"set":rC(t,n,s,!0);break;default:break}return r},dc=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},oC=(t,e)=>{for(let r in e){if(kb.has(r))continue;let o=e[r],n=t[r];if(o&&typeof o=="object"&&!Array.isArray(o)){if(!n||typeof n!="object"||Array.isArray(n)){r in t||(t[r]=JSON.parse(JSON.stringify(o)));continue}oC(n,o)}else r in t||(t[r]=o)}},Cb=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let n={designSystem:t.__rawDesignSystem};Cu(n,e)}let r=JSON.parse(JSON.stringify(t.__rawDesignSystem)),o=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[];for(let n of o){let s=n&&n.designSystem;s&&typeof s=="object"&&oC(r,s)}return r};R();var nC=(t,e,r)=>{let o=!1;return(n={})=>{let{data:s}=n,{schema:i}=n;s&&(s=t.call("deepDestringifyFunctions",s,Array.isArray(s)?[]:{}),Object.entries(s).forEach(([a,c])=>{if(r[a]&&typeof r[a]=="object")if(a==="designSystem"){if(dc(r,c),o){let l=Cb(r);l&&ur(l)}}else no(r[a],c);else r[a]=c}),o=!0,i&&(r.schema=i))}},sC=(t,e,r)=>(o={})=>{let{changes:n}=o;if(!n||!Array.isArray(n)||!n.length)return;n=t.call("deepDestringifyFunctions",n,Array.isArray(n)?[]:{});let s=n.filter(c=>Array.isArray(c)&&Array.isArray(c[1])&&c[1][0]==="designSystem"),i=s.length?n.filter(c=>!s.includes(c)):n,a=Cu(r,i);if(s.length&&a.add("designSystem"),a.has("designSystem")){let c=Cb(r,s);ur(c||r.designSystem)}if(a.has("state")&&e.update(r.state),["pages","components","snippets","functions","assets"].some(c=>a.has(c))){let{pathname:c,search:l,hash:f}=r.window.location;t.call("router",c+l+f,t.__ref.root,{},{scrollToTop:!1,force:!0})}};var _P={success:"green",error:"red",warning:"yellow"},iC=(t,e,r)=>{if(t.symbols){if(!r.connected){r.notifications.connected={title:"Connected",message:"to the Symbols live server"},r.update({connected:!0});let o=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(o)},3e3)}}else if(r.connected){r.notifications.connected={title:"Disconnected",type:"error"},r.update({connected:!1});let o=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected&&e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(o)},3e3)}},aC={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:_P[t.type||"success"],icon:null,Flex:{Title:{text:"{{ title }}"},P:{text:"{{ title }}"}},onRender:(e,r,o)=>{r.update({animation:"fadeInUp"})},onClick:(e,r,o)=>{delete o.notifications[r.key],r.update({animation:"fadeOutDown"}),o.onClose&&o.onClose(e,r,o)}}),IconText:null,childrenAs:"state",children:({state:t})=>t.notifications}};var xP=!1,wP=()=>xP?"http://localhost:8080":"https://api.symbols.app",SP=t=>{let e=t&&t.editor&&t.editor.socketUrl||t&&t.settings&&t.settings.socketUrl;return typeof e=="string"&&e?{mode:"collab",baseUrl:e}:t&&t.editor&&t.editor.runtime==="runner"?{mode:"runner",baseUrl:null}:{mode:null,baseUrl:null}},kP=async t=>{try{let e=t||wP(),r=await v.fetch(`${e}/service-token`,{method:"GET"}),o;try{let n=await r.clone().json();if(n&&typeof n.token=="string")return n.token.trim();o=await r.text()}catch{o=await r.text()}return(o||"").replace(/\s+/gu,"")||void 0}catch(e){console.error("[sync] Failed to fetch service-token",e)}},fC=(t,e,r,o)=>{t.on("snapshot",nC(e,r,o)),t.on("ops",sC(e,r,o)),t.on("clients",n=>{o.editor?.verbose&&iC(n,e,r)}),t.on("disconnect",n=>{o.editor?.verbose&&console.info("[sync] disconnected",n)})},vP=async(t,e,r,o)=>{let n=await kP(o);if(!n)return console.warn("[sync] no service token \u2014 collab disabled"),null;let s=r.key;if(!s)return console.warn("[sync] ctx.key missing \u2014 collab cannot authenticate"),null;let i=r.editor?.projectId||null,a=us(o,{path:"/collab-socket",transports:["websocket"],auth:{token:n,projectId:i,projectKey:s,branch:"main",live:!0,clientType:"platform"},reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return a.on("connect",()=>{r.editor?.verbose&&console.info("[sync] connected (collab)")}),fC(a,t,e,r),a},CP=(t,e,r)=>{let o=us({transports:["websocket","polling"],reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return o.on("connect",()=>{r.editor?.verbose!==!1&&console.info("[sync] connected (runner)")}),fC(o,t,e,r),o.on("reload",()=>{typeof v<"u"&&v.location&&v.location.reload()}),o},EP=async(t,e,r)=>{let{mode:o,baseUrl:n}=SP(r);return o?o==="collab"?vP(t,e,r,n):o==="runner"?CP(t,e,r):null:null},AP={onInit:EP};var uC=t=>typeof t>"u",cC=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),lC=t=>t?.editor?.runtime==="runner",dC=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},pC={name:"sync",beforeCreate(t,e){let r=e&&e.editor;(r&&!uC(r.liveSync)?r.liveSync:cC(e)||lC(e))&&(cC(e)&&!lC(e)&&!e?.key||dC(t,AP))}},hC={name:"notifications",beforeCreate(t,e){if(!e)return;let r=uC(e.notifications)?null:e.notifications,o=e.editor&&e.editor.verbose===!0;(r===!0||r!==!1&&o)&&dC(t,aC)}};var Tb={};P(Tb,{AlertTemplate:()=>Fu,ConfirmTemplate:()=>Lu,CustomTemplate:()=>ju,ModalLayer:()=>$u,ModalRoot:()=>Du,PromptTemplate:()=>Nu,windowsComponents:()=>Ab});var Eb={};P(Eb,{alertDialog:()=>Pu,closeAllModals:()=>Ou,closeModal:()=>Au,confirmDialog:()=>Ru,getLayer:()=>Eu,openModal:()=>Tu,promptDialog:()=>Iu,windowsFunctions:()=>mr});function J(t){let e=t;for(;e;){if(e.layer!==void 0)return e.layer;e=e.parent}return null}function ds(t){let e=t;for(;e;){if(e.key==="ModalRoot")return e;if(e.ModalRoot&&e.ModalRoot.__ref)return e.ModalRoot;e=e.parent}let r=t?.getRoot?.();return r?.ModalRoot?r.ModalRoot:typeof globalThis<"u"&&globalThis.__SMBLS_WINDOWS_MODAL_ROOT__?.__ref?globalThis.__SMBLS_WINDOWS_MODAL_ROOT__:null}function Eu(){return J(this)}var TP=(t,e)=>{let r=t&&t["ModalLayer_"+e],o=r?.node||r?.__ref?.node;!o||typeof o.style?.setProperty!="function"||(o.style.setProperty("display","none","important"),o.style.setProperty("opacity","0","important"),o.style.setProperty("visibility","hidden","important"),o.style.setProperty("pointer-events","none","important"))},gC=(t,e)=>{let r=t&&t["ModalLayer_"+e],o=r?.node||r?.__ref?.node;!o||typeof o.style?.removeProperty!="function"||(o.style.removeProperty("display"),o.style.removeProperty("opacity"),o.style.removeProperty("visibility"),o.style.removeProperty("pointer-events"))};function Au(t){let e=ds(this);if(!e)return;let r=e.state?.stack||[];if(!r.length)return;let o,n,s;if(t){if(s=[],o=r.filter((i,a)=>{let c=i.id!==t;return c||s.push(a),c}),o.length===r.length)return;n=r.filter(i=>i.id===t)}else o=r.slice(0,-1),n=r.slice(-1),s=[r.length-1];e.state.update({stack:o});for(let i of s)TP(e,i);for(let i of n)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function Tu(t={}){let e=ds(this);if(!e)return console.warn("[windows] openModal: ModalRoot is not mounted on the app root. Add `ModalRoot: {}` to your shell tree and import windowsComponents into context."),null;e.__modalIdCounter=(e.__modalIdCounter||0)+1;let r=t.id||`modal_${e.__modalIdCounter}_${Date.now().toString(36)}`,o={id:r,template:t.template||"custom",title:t.title,message:t.message,icon:t.icon,confirmText:t.confirmText,cancelText:t.cancelText,okText:t.okText,confirmTheme:t.confirmTheme,placeholder:t.placeholder,defaultValue:t.defaultValue,dismissOnBackdrop:t.dismissOnBackdrop,content:t.content,width:t.width,maxWidth:t.maxWidth,maxHeight:t.maxHeight,onConfirm:t.onConfirm,onCancel:t.onCancel,onOk:t.onOk,onClose:t.onClose},n=e.state?.stack||[];if(n.length>=5)return console.warn("[windows] openModal: stack already at the 5-layer maximum, dropping the new layer. Close some modals first."),null;let s=n.length;return gC(e,s),e.state.update({stack:[...n,o]}),r}function Ou(){let t=ds(this);!t||!t.state?.stack?.length||t.state.update({stack:[]})}function Ru(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"confirm"})}function Pu(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"alert"})}function Iu(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"prompt"})}var mr={openModal:Tu,closeModal:Au,closeAllModals:Ou,confirmDialog:Ru,alertDialog:Pu,promptDialog:Iu,getLayer:Eu};var OP=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),mC=t=>{if(!t?.querySelectorAll)return[];let e=t.querySelectorAll(OP),r=[];for(let o=0;o<e.length;o++){let n=e[o];(n.offsetParent!==null||n===document.activeElement)&&r.push(n)}return r},yC=t=>{let e=t.state?.stack||[];if(!e.length)return null;let r=t["ModalLayer_"+(e.length-1)];return r?.node||r?.__ref?.node||null},Du={tag:"div",position:"fixed",inset:"0",zIndex:"2000",pointerEvents:"none",state:{stack:[]},subscribeTo:["stack"],ModalLayer_0:{__slotIndex:0,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[0]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_1:{__slotIndex:1,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[1]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_2:{__slotIndex:2,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[2]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_3:{__slotIndex:3,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[3]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_4:{__slotIndex:4,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[4]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},onInit:(t,e)=>{if(typeof window>"u")return;globalThis.__SMBLS_WINDOWS_MODAL_ROOT__=t;let r=t.context;if(r){r.functions||(r.functions={});for(let a in mr)a in r.functions||(r.functions[a]=mr[a])}t.__modalOpeners=t.__modalOpeners||[],t.__prevStackLen=t.state&&t.state.stack&&t.state.stack.length||0;let o=()=>{let a=t.state?.stack||[];if(!a.length)return;let c=a.length-1,l=a[c];t.state.update({stack:a.slice(0,-1)});let f=t["ModalLayer_"+c],u=f?.node||f?.__ref?.node;if(u?.style?.setProperty&&(u.style.setProperty("display","none","important"),u.style.setProperty("opacity","0","important"),u.style.setProperty("visibility","hidden","important"),u.style.setProperty("pointer-events","none","important")),typeof l?.onClose=="function")try{l.onClose()}catch(d){console.warn("[windows] onClose threw:",d)}},n=a=>{let c=t.state?.stack;if(c?.length){if(a.key==="Tab"){let l=yC(t);if(!l)return;let f=mC(l);if(!f.length){a.preventDefault();let g=l.querySelector?.('[role="dialog"]')||l;try{g.focus?.()}catch{}return}let u=f[0],d=f[f.length-1],h=document.activeElement;if(!l.contains(h)){a.preventDefault();try{u.focus()}catch{}return}if(a.shiftKey&&h===u){a.preventDefault();try{d.focus()}catch{}}else if(!a.shiftKey&&h===d){a.preventDefault();try{u.focus()}catch{}}return}a.key==="Escape"&&c[c.length-1]?.dismissOnBackdrop!==!1&&(a.preventDefault(),o())}};window.addEventListener("keydown",n),t.__escHandler=n;let s=a=>{let c=t.state?.stack||[];if(a<0||a>=c.length)return;let l=c[a];t.state.update({stack:c.filter((d,h)=>h!==a)});let f=t["ModalLayer_"+a],u=f?.node||f?.__ref?.node;if(u?.style?.setProperty&&(u.style.setProperty("display","none","important"),u.style.setProperty("opacity","0","important"),u.style.setProperty("visibility","hidden","important"),u.style.setProperty("pointer-events","none","important")),typeof l?.onClose=="function")try{l.onClose()}catch(d){console.warn("[windows] onClose threw:",d)}},i=a=>{let c=t.state?.stack||[];if(!c.length)return;let l=a.target?.closest?.('[data-key="Close"]');if(l){for(let f=c.length-1;f>=0;f--){let u=t["ModalLayer_"+f],d=u?.node||u?.__ref?.node;if(d&&d.contains(l)){a.preventDefault(),a.stopPropagation(),s(f);return}}return}for(let f=c.length-1;f>=0;f--){let u=t["ModalLayer_"+f];if((u?.node||u?.__ref?.node)===a.target){if(c[f]?.dismissOnBackdrop===!1)return;a.preventDefault(),a.stopPropagation(),s(f);return}}};document.addEventListener("click",i,!0),t.__clickDelegate=i},onUpdate:t=>{if(typeof window>"u")return;let e=(t.state&&t.state.stack||[]).length,r=t.__prevStackLen||0;if(e!==r)if(t.__prevStackLen=e,t.__modalOpeners=t.__modalOpeners||[],e>r)t.__modalOpeners[e]=document.activeElement&&document.activeElement!==document.body?document.activeElement:t.__modalOpeners[e]||null,typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>{let o=yC(t);if(!o)return;let n=mC(o)[0]||o.querySelector&&o.querySelector('[role="dialog"]')||o;try{n.focus&&n.focus()}catch{}});else{let o=null;for(let n=r;n>e;n--)t.__modalOpeners[n]&&(o=o||t.__modalOpeners[n]),t.__modalOpeners[n]=null;if(o&&typeof o.focus=="function"&&o.isConnected!==!1)try{o.focus()}catch{}}},onDestroy:t=>{typeof window>"u"||(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__===t&&(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__=null),t.__escHandler&&(window.removeEventListener("keydown",t.__escHandler),delete t.__escHandler),t.__clickDelegate&&(document.removeEventListener("click",t.__clickDelegate,!0),delete t.__clickDelegate))}};var $u={tag:"div",position:"fixed",inset:"0",alignItems:"center",justifyContent:"center",padding:"A",background:"black.45",backdropFilter:"blur(4px)",transitionProperty:"opacity",transitionDuration:"200ms",transitionTimingFunction:"ease",zIndex:(t,e)=>`${2e3+(t.__slotIndex||0)*10}`,display:(t,e)=>t.layer?"flex":"none",opacity:(t,e)=>t.layer?"1":"0",visibility:(t,e)=>t.layer?"visible":"hidden",pointerEvents:(t,e)=>t.layer?"auto":"none",ModalWindow:{attr:{role:"dialog","aria-modal":"true",tabindex:"-1","aria-labelledby":t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}},width:t=>J(t)?.width||"H",maxWidth:t=>J(t)?.maxWidth||"90vw",maxHeight:t=>J(t)?.maxHeight||null,onClick:t=>t.stopPropagation(),onMousedown:t=>t.stopPropagation(),ModalHeader:{display:"none"},overflow:"visible",ConfirmTemplate:{hide:t=>J(t)?.template!=="confirm"},AlertTemplate:{hide:t=>J(t)?.template!=="alert"},PromptTemplate:{hide:t=>J(t)?.template!=="prompt"},CustomTemplate:{hide:t=>J(t)?.template!=="custom"}}};var ps=(t,e,r)=>J(t)?.[e]||r,RP=t=>{let e=J(t)?.icon;return e===null||e===!1},Lu={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>ps(t,"title","Are you sure?"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>ps(t,"message","This action cannot be undone."),color:"dim"}},Icons:{hide:t=>RP(t),Indicator:{extends:"Icon",opacity:".7",icon:t=>ps(t,"icon","warning")}}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"Button",theme:"ghost",text:t=>ps(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let o=J(e);if(o?.onCancel)try{o.onCancel()}catch(n){console.warn("[windows] confirm.onCancel threw:",n)}e.call("closeModal",o?.id)}},ConfirmBtn:{extends:"Button",theme:t=>ps(t,"confirmTheme","primary"),text:t=>ps(t,"confirmText","Confirm"),onClick:(t,e,r)=>{let o=J(e);if(o?.onConfirm)try{o.onConfirm()}catch(n){console.warn("[windows] confirm.onConfirm threw:",n)}e.call("closeModal",o?.id)}}}};var Mu=(t,e,r)=>J(t)?.[e]||r,Fu={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>Mu(t,"title","Notice"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>Mu(t,"message",""),color:"dim"}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:t=>Mu(t,"icon","info")}}},ModalFooter:{flow:"x",align:"center end",OkBtn:{extends:"Button",theme:"primary",text:t=>Mu(t,"okText","OK"),onClick:(t,e,r)=>{let o=J(e);if(o?.onOk)try{o.onOk()}catch(n){console.warn("[windows] alert.onOk threw:",n)}e.call("closeModal",o?.id)}}}};var pc=(t,e,r)=>J(t)?.[e]||r,Nu={tag:"div",flow:"y",gap:"B",scope:{value:""},onRender:(t,e)=>{let r=J(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let o=t.InputRow&&t.InputRow.node;o&&(o.value=t.scope.value)},onUpdate:(t,e)=>{let r=J(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let o=t.InputRow&&t.InputRow.node;o&&(o.value=t.scope.value)},ModalHeader:{Hgroup:{H:{text:t=>pc(t,"title","Enter a value"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>pc(t,"message",""),color:"dim"}}},InputRow:{extends:"Input",autofocus:!0,placeholder:t=>pc(t,"placeholder",""),value:(t,e)=>t.parent.scope?.value||"",onInput:(t,e,r)=>{e.parent.scope.value=t.target.value},onKeydown:(t,e,r)=>{if(t.key!=="Enter")return;t.preventDefault();let o=J(e),n=e.parent.scope?.value||"";if(o?.onConfirm)try{o.onConfirm(n)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",o?.id)}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"Button",theme:"ghost",text:t=>pc(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let o=J(e);if(o?.onCancel)try{o.onCancel()}catch(n){console.warn("[windows] prompt.onCancel threw:",n)}e.call("closeModal",o?.id)}},ConfirmBtn:{extends:"Button",theme:"primary",text:t=>pc(t,"confirmText","OK"),onClick:(t,e,r)=>{let o=J(e),n=e.parent.parent.scope?.value||"";if(o?.onConfirm)try{o.onConfirm(n)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",o?.id)}}}};var ju={tag:"div",flow:"y",gap:"B",Title:{tag:"h2",text:t=>J(t)?.title||"",hide:t=>!J(t)?.title,position:"absolute",width:"1px",height:"1px",margin:"-1px",padding:"0",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0",attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},Slot:{tag:"div",onInit:t=>{let e=Z(()=>{let r=J(t),o=r?.content||null,n=r?.id||null;if(!o){t.__lastLayerId!=null&&(t.removeContent(),t.__lastLayerId=null);return}if(t.__lastLayerId!==n){t.__lastLayerId=n;try{t.set(o);let s=t.content?.context;if(s){s.functions||(s.functions={});for(let i in mr)i in s.functions||(s.functions[i]=mr[i])}}catch(s){console.warn("[windows] custom.content set failed:",s)}}});t.__ref&&t.__ref.__effects.push(e)}}};var Ab={ModalRoot:Du,ModalLayer:$u,ConfirmTemplate:Lu,AlertTemplate:Fu,PromptTemplate:Nu,CustomTemplate:ju};var Ib={};P(Ib,{Dropdown:()=>Wu,DropdownList:()=>qu,DropdownParent:()=>Ku,DropdownParentFocus:()=>Gu,DropdownRoot:()=>Hu,DropdownSiblingFocus:()=>Yu,DropdownTrigger:()=>zu,dropdownComponents:()=>Pb});var bC=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),PP=(t,e,r,o)=>{let n=bC(t,r,o),s=i=>n[i]>=e.height+8;return s("bottom")?"bottom":s("top")?"top":n.bottom>=n.top?"bottom":"top"},IP=(t,e,r,o,n)=>{let s=bC(e,o,n),i=t==="top"||t==="bottom"?r.height+8:r.width+8;if(s[t]>=i)return t;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[t];return a&&s[a]>=i?a:t},Bu=(t,e,r)=>Math.max(e,Math.min(r,t)),Jr=(t,e,r="auto")=>{if(!t)return{left:0,top:0,side:"bottom",align:"start"};let o=typeof window<"u"?window.innerWidth:1024,n=typeof window<"u"?window.innerHeight:768,s={width:Math.max(120,e?.width||0),height:Math.max(40,e?.height||0)};if(r==="center"){let d=Bu((o-s.width)/2,8,Math.max(8,o-s.width-8)),h=Bu((n-s.height)/2,8,Math.max(8,n-s.height-8));return{left:d,top:h,side:"center",align:"center"}}let i,a;if(r==="auto")i=PP(t,s,o,n),a="start";else{let d=r.split("-");i=d[0],a=d[1]||"start",i=IP(i,t,s,o,n)}let c,l;i==="bottom"||i==="top"?(a==="start"?c=t.left:a==="end"?c=t.right-s.width:c=t.left+(t.width-s.width)/2,l=i==="bottom"?t.bottom+8:t.top-s.height-8):(a==="start"?l=t.top:a==="end"?l=t.bottom-s.height:l=t.top+(t.height-s.height)/2,c=i==="right"?t.right+8:t.left-s.width-8);let f=Math.max(8,o-s.width-8),u=Math.max(8,n-s.height-8);return c=Bu(c,8,f),l=Bu(l,8,u),{left:c,top:l,side:i,align:a}},hs=t=>{switch(t){case"bottom":return"translateY(-6px)";case"top":return"translateY(6px)";case"left":return"translateX(6px)";case"right":return"translateX(-6px)";case"center":return"translateY(0px)";default:return"translateY(-6px)"}};var yr={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:"70vh",theme:"modal"},DP=t=>{if(!t||typeof t.getBoundingClientRect!="function")return null;let e=t.getBoundingClientRect();return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}},Ob=t=>t?.getRoot?.()?.DropdownRoot||null,$P=0,LP=()=>`dropdown_${++$P}_${Date.now().toString(36)}`;function Uu(t={}){let e=Ob(this);if(!e)return console.warn("[dropdown] openDropdown: DropdownRoot is not mounted on the app root. Add `DropdownRoot: {}` to your shell tree and import dropdown components into context."),null;let r=t.anchorEl?.node||t.anchorEl,o=t.anchorRect||DP(r);if(!o)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let n=t.id||LP(),s=t.triggerEl?.node||t.triggerEl||r||(typeof document<"u"?document.activeElement:null),i={id:n,content:t.content||null,anchor:o,placement:t.placement||yr.placement,trigger:t.trigger||yr.trigger,offset:t.offset??yr.offset,minWidth:t.minWidth||yr.minWidth,maxWidth:t.maxWidth||yr.maxWidth,maxHeight:t.maxHeight||yr.maxHeight,theme:t.theme||yr.theme,background:t.background||null,round:t.round||null,onOpen:t.onOpen,onClose:t.onClose,triggerEl:s},a=e.state?.layer;if(a?.onClose)try{a.onClose(a)}catch(c){console.warn("[dropdown] prev onClose threw:",c)}if(e.state.update({layer:i}),typeof i.onOpen=="function")try{i.onOpen(i)}catch(c){console.warn("[dropdown] onOpen threw:",c)}return n}function Vu(t){let e=Ob(this);if(!e)return;let r=e.state?.layer;r&&e.state.update({layer:{...r,inert:!!t}})}function Mo(t){let e=Ob(this);if(!e)return;let r=e.state?.layer;if(!r)return;let o=typeof t=="string"?t:t?.id;if(o&&r.id&&o!==r.id)return;let n=r.onClose;e.state.update({layer:null});let s=r.triggerEl;if(s&&typeof s.focus=="function")try{s.focus()}catch(i){console.warn("[dropdown] focus restore threw:",i)}if(typeof n=="function")try{n(r)}catch(i){console.warn("[dropdown] onClose threw:",i)}}var MP=`
104
104
  @keyframes smbls-dropdown-fade-in {
105
105
  from { opacity: 0; transform: var(--smbls-dropdown-from, translateY(-6px)) scale(0.98); }
106
106
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
@@ -122,7 +122,7 @@ ${i}
122
122
  border-width: 0 !important;
123
123
  padding: 0 !important;
124
124
  }
125
- `,LP=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let t=document.createElement("style");t.id="smbls-dropdown-css",t.textContent=$P,document.head.appendChild(t)},mC=(t,e)=>{if(!t.node)return;let r=e?.background;if(!r){t.node.removeAttribute("data-smbls-surface");return}let o=/^[a-z][\w.+-]*$/i.test(r)?`var(--color-${r})`:r;t.node.style.setProperty("--smbls-dropdown-surface",o),t.node.setAttribute("data-smbls-surface","")},MP=t=>{t.node&&(t.node.style.animation="none",t.node.offsetWidth,t.node.style.animation="smbls-dropdown-fade-in 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both")},Uu={tag:"div",attr:{"data-smbls-dropdown-root":"true"},position:"fixed",inset:"0",zIndex:"1500",pointerEvents:"none",state:{layer:null},onInit:t=>{if(LP(),typeof window>"u")return;let e=o=>{o.key==="Escape"&&t.state?.layer&&(o.preventDefault(),Lo.call(t))};window.addEventListener("keydown",e),t.__dropdownEscHandler=e;let r=o=>{let n=t.state?.layer;if(!n)return;let s=t.node?.querySelector('[data-smbls-dropdown="panel"]');if(s&&s.contains(o.target))return;let i=n.anchor;if(i){let a=o.clientX,c=o.clientY;if(a>=i.left&&a<=i.right&&c>=i.top&&c<=i.bottom)return}Lo.call(t)};document.addEventListener("mousedown",r,!0),t.__dropdownClickHandler=r},onRemove:t=>{typeof window>"u"||(t.__dropdownEscHandler&&window.removeEventListener("keydown",t.__dropdownEscHandler),t.__dropdownClickHandler&&document.removeEventListener("mousedown",t.__dropdownClickHandler,!0))},PanelHost:{tag:"div",position:"fixed",inset:"0",pointerEvents:"none",subscribeTo:["layer"],layer:(t,e)=>e?.layer||null,Panel:{tag:"div",attr:{"data-smbls-dropdown":"panel"},position:"fixed",subscribeTo:["layer"],left:t=>{let e=t.parent?.layer;if(!e?.anchor)return"-9999px";let r=t._lastSize||{width:280,height:200};return Jr(e.anchor,r,e.placement).left+"px"},top:t=>{let e=t.parent?.layer;if(!e?.anchor)return"-9999px";let r=t._lastSize||{width:280,height:200};return Jr(e.anchor,r,e.placement).top+"px"},style:t=>{let e=t.parent?.layer;if(!e?.anchor)return{};let r=t._lastSize||{width:280,height:200};return{"--smbls-dropdown-from":ps(Jr(e.anchor,r,e.placement).side)}},minWidth:t=>t.parent?.layer?.minWidth||"180px",maxWidth:t=>t.parent?.layer?.maxWidth||"90vw",maxHeight:t=>t.parent?.layer?.maxHeight||"70vh",overflow:"auto",overscrollBehavior:"contain",padding:"0",round:t=>t.parent?.layer?.round||"Z",theme:t=>t.parent?.layer?.theme||"modal",border:"none",borderWidth:"0",shadow:"overlay",pointerEvents:t=>{let e=t.parent?.layer;return e?e.inert?"none":"auto":"none"},opacity:t=>t.parent?.layer?"0.999":"0",onClick:t=>t.stopPropagation(),onInit:t=>{let e=Z(()=>{let r=t.parent?.layer,o=r?.content||null,n=r?.id||null;if(!o){if(t.__lastLayerId!=null){try{t.removeContent?.()}catch{}t.__lastLayerId=null}return}if(t.__lastLayerId!==n){t.__lastLayerId=n;try{t.set(o)}catch(s){console.warn("[dropdown] content set failed:",s)}mC(t,r),MP(t),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{if(!t.node)return;mC(t,r);let s=t.parent?.layer;if(!s?.anchor)return;let i=t.node.getBoundingClientRect(),a={width:i.width,height:i.height};t._lastSize=a;let c=Jr(s.anchor,a,s.placement);t.node.style.left=c.left+"px",t.node.style.top=c.top+"px",t.node.style.setProperty("--smbls-dropdown-from",ps(c.side))})}});t.__ref&&t.__ref.__effects?.push(e)},onRender:t=>{if(t?.node&&(t.parent?.layer?t.node.setAttribute("data-smbls-open","true"):t.node.removeAttribute("data-smbls-open")),!t?.node)return;let e=t.parent?.layer;if(!e?.anchor)return;let r=t.node.getBoundingClientRect(),o={width:r.width,height:r.height},n=t._lastSize;(!n||Math.abs(n.width-o.width)>1||Math.abs(n.height-o.height)>1)&&(t._lastSize=o);let s=Jr(e.anchor,o,e.placement);t.node.style.left=s.left+"px",t.node.style.top=s.top+"px",t.node.style.setProperty("--smbls-dropdown-from",ps(s.side))}}}};var Ab=t=>{let e=t?.getRoot?.()?.DropdownRoot?.state?.layer;if(e&&t.dropdownId&&e.id===t.dropdownId){t.call("closeDropdown");return}let r={anchorEl:t,trigger:t.dropdownTrigger||"click",placement:t.dropdownPlacement||"auto",content:t.dropdownContent||null,minWidth:t.dropdownMinWidth,maxWidth:t.dropdownMaxWidth,maxHeight:t.dropdownMaxHeight,theme:t.dropdownTheme,offset:t.dropdownOffset,id:t.dropdownId,onOpen:t.onDropdownOpen,onClose:t.onDropdownClose};for(let o in r)r[o]===void 0&&delete r[o];t.call("openDropdown",r)},Vu={position:"relative",onClick:(t,e)=>{(e.dropdownTrigger||"click")==="click"&&(t.preventDefault(),t.stopPropagation(),Ab(e))},onFocus:(t,e)=>{e.dropdownTrigger==="focus"&&Ab(e)},onMouseenter:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&clearTimeout(e._hoverTimer),e._hoverTimer=setTimeout(()=>Ab(e),120))},onMouseleave:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&(clearTimeout(e._hoverTimer),e._hoverTimer=null),e._closeTimer=setTimeout(()=>e.call("closeDropdown"),250))}};var zu={attr:{dropdown:!0},position:"absolute",top:"100%",left:"0",zIndex:1e3,theme:"quaternary",padding:"Y",round:"Z2",flow:"column",gap:"X",transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},Hu={display:"flex",attr:{dropdown:!0},padding:"0 Y",maxHeight:"G",flow:"column",theme:"quaternary",overflow:"hidden auto",style:{listStyleType:"none"},transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",children:t=>t.options||[],childrenAs:"props",".hidden":{transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},childExtends:{extends:"Button",state:{},isActive:({key:t,state:e})=>e.active===t,position:"relative",round:"0",align:"center flex-end",flow:"row-reverse",padding:"Z2 C Z2 Y2",margin:"0",gap:"Y2",theme:"quaternary .child",":hover":{style:{svg:{opacity:"0.5"}}},Icon:{isActive:({key:t,state:e})=>e.active===t,name:"checkmark",opacity:"0.1",".active":{opacity:"1"}},":not(:first-child)":{"@dark":{border:"solid gray4.65"},"@light":{border:"solid gray11"},borderWidth:"1px 0 0"}}},Wu={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},qu={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}},Dropdown:{onClick:()=>{document.activeElement?.blur()}}},Ku={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& ~ [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}}};var Tb={DropdownRoot:Uu,DropdownTrigger:Vu,Dropdown:zu,DropdownList:Hu,DropdownParent:Wu,DropdownParentFocus:qu,DropdownSiblingFocus:Ku};var Pb={};P(Pb,{DROPDOWN_DEFAULTS:()=>yr,closeDropdown:()=>Lo,computePosition:()=>Jr,dropdownFunctions:()=>Rb,fadeInTransform:()=>ps,openDropdown:()=>ju,setDropdownInert:()=>Bu});var Rb={openDropdown:ju,closeDropdown:Lo,setDropdownInert:Bu};var FP=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),NP=(t,e,r,o,n)=>{let s=FP(e,o,n),i=t==="top"||t==="bottom"?r.height+6:r.width+6;if(s[t]>=i)return t;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[t];return a&&s[a]>=i?a:t},yC=(t,e,r)=>Math.max(e,Math.min(r,t)),Gu=(t,e,r="bottom")=>{if(!t)return{left:0,top:0,side:"bottom"};let o=typeof window<"u"?window.innerWidth:1024,n=typeof window<"u"?window.innerHeight:768,s=NP(r,t,e,o,n),i,a;return s==="bottom"||s==="top"?(i=t.left+(t.width-e.width)/2,a=s==="bottom"?t.bottom+6:t.top-e.height-6):(a=t.top+(t.height-e.height)/2,i=s==="right"?t.right+6:t.left-e.width-6),i=yC(i,6,o-e.width-6),a=yC(a,6,n-e.height-6),{left:i,top:a,side:s}},bC=t=>{switch(t){case"bottom":return"translateY(-4px)";case"top":return"translateY(4px)";case"left":return"translateX(4px)";case"right":return"translateX(-4px)";default:return"translateY(-4px)"}};var jP=`
125
+ `,FP=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let t=document.createElement("style");t.id="smbls-dropdown-css",t.textContent=MP,document.head.appendChild(t)},_C=(t,e)=>{if(!t.node)return;let r=e?.background;if(!r){t.node.removeAttribute("data-smbls-surface");return}let o=/^[a-z][\w.+-]*$/i.test(r)?`var(--color-${r})`:r;t.node.style.setProperty("--smbls-dropdown-surface",o),t.node.setAttribute("data-smbls-surface","")},NP=t=>{t.node&&(t.node.style.animation="none",t.node.offsetWidth,t.node.style.animation="smbls-dropdown-fade-in 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both")},Hu={tag:"div",attr:{"data-smbls-dropdown-root":"true"},position:"fixed",inset:"0",zIndex:"1500",pointerEvents:"none",state:{layer:null},onInit:t=>{if(FP(),typeof window>"u")return;let e=o=>{o.key==="Escape"&&t.state?.layer&&(o.preventDefault(),Mo.call(t))};window.addEventListener("keydown",e),t.__dropdownEscHandler=e;let r=o=>{let n=t.state?.layer;if(!n)return;let s=t.node?.querySelector('[data-smbls-dropdown="panel"]');if(s&&s.contains(o.target))return;let i=n.anchor;if(i){let a=o.clientX,c=o.clientY;if(a>=i.left&&a<=i.right&&c>=i.top&&c<=i.bottom)return}Mo.call(t)};document.addEventListener("mousedown",r,!0),t.__dropdownClickHandler=r},onRemove:t=>{typeof window>"u"||(t.__dropdownEscHandler&&window.removeEventListener("keydown",t.__dropdownEscHandler),t.__dropdownClickHandler&&document.removeEventListener("mousedown",t.__dropdownClickHandler,!0))},PanelHost:{tag:"div",position:"fixed",inset:"0",pointerEvents:"none",subscribeTo:["layer"],layer:(t,e)=>e?.layer||null,Panel:{tag:"div",attr:{"data-smbls-dropdown":"panel"},position:"fixed",subscribeTo:["layer"],left:t=>{let e=t.parent?.layer;if(!e?.anchor)return"-9999px";let r=t._lastSize||{width:280,height:200};return Jr(e.anchor,r,e.placement).left+"px"},top:t=>{let e=t.parent?.layer;if(!e?.anchor)return"-9999px";let r=t._lastSize||{width:280,height:200};return Jr(e.anchor,r,e.placement).top+"px"},style:t=>{let e=t.parent?.layer;if(!e?.anchor)return{};let r=t._lastSize||{width:280,height:200};return{"--smbls-dropdown-from":hs(Jr(e.anchor,r,e.placement).side)}},minWidth:t=>t.parent?.layer?.minWidth||"180px",maxWidth:t=>t.parent?.layer?.maxWidth||"90vw",maxHeight:t=>t.parent?.layer?.maxHeight||"70vh",overflow:"auto",overscrollBehavior:"contain",padding:"0",round:t=>t.parent?.layer?.round||"Z",theme:t=>t.parent?.layer?.theme||"modal",border:"none",borderWidth:"0",shadow:"overlay",pointerEvents:t=>{let e=t.parent?.layer;return e?e.inert?"none":"auto":"none"},opacity:t=>t.parent?.layer?"0.999":"0",onClick:t=>t.stopPropagation(),onInit:t=>{let e=Z(()=>{let r=t.parent?.layer,o=r?.content||null,n=r?.id||null;if(!o){if(t.__lastLayerId!=null){try{t.removeContent?.()}catch{}t.__lastLayerId=null}return}if(t.__lastLayerId!==n){t.__lastLayerId=n;try{t.set(o)}catch(s){console.warn("[dropdown] content set failed:",s)}_C(t,r),NP(t),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{if(!t.node)return;_C(t,r);let s=t.parent?.layer;if(!s?.anchor)return;let i=t.node.getBoundingClientRect(),a={width:i.width,height:i.height};t._lastSize=a;let c=Jr(s.anchor,a,s.placement);t.node.style.left=c.left+"px",t.node.style.top=c.top+"px",t.node.style.setProperty("--smbls-dropdown-from",hs(c.side))})}});t.__ref&&t.__ref.__effects?.push(e)},onRender:t=>{if(t?.node&&(t.parent?.layer?t.node.setAttribute("data-smbls-open","true"):t.node.removeAttribute("data-smbls-open")),!t?.node)return;let e=t.parent?.layer;if(!e?.anchor)return;let r=t.node.getBoundingClientRect(),o={width:r.width,height:r.height},n=t._lastSize;(!n||Math.abs(n.width-o.width)>1||Math.abs(n.height-o.height)>1)&&(t._lastSize=o);let s=Jr(e.anchor,o,e.placement);t.node.style.left=s.left+"px",t.node.style.top=s.top+"px",t.node.style.setProperty("--smbls-dropdown-from",hs(s.side))}}}};var Rb=t=>{let e=t?.getRoot?.()?.DropdownRoot?.state?.layer;if(e&&t.dropdownId&&e.id===t.dropdownId){t.call("closeDropdown");return}let r={anchorEl:t,trigger:t.dropdownTrigger||"click",placement:t.dropdownPlacement||"auto",content:t.dropdownContent||null,minWidth:t.dropdownMinWidth,maxWidth:t.dropdownMaxWidth,maxHeight:t.dropdownMaxHeight,theme:t.dropdownTheme,offset:t.dropdownOffset,id:t.dropdownId,onOpen:t.onDropdownOpen,onClose:t.onDropdownClose};for(let o in r)r[o]===void 0&&delete r[o];t.call("openDropdown",r)},zu={position:"relative",onClick:(t,e)=>{(e.dropdownTrigger||"click")==="click"&&(t.preventDefault(),t.stopPropagation(),Rb(e))},onFocus:(t,e)=>{e.dropdownTrigger==="focus"&&Rb(e)},onMouseenter:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&clearTimeout(e._hoverTimer),e._hoverTimer=setTimeout(()=>Rb(e),120))},onMouseleave:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&(clearTimeout(e._hoverTimer),e._hoverTimer=null),e._closeTimer=setTimeout(()=>e.call("closeDropdown"),250))}};var Wu={attr:{dropdown:!0},position:"absolute",top:"100%",left:"0",zIndex:1e3,theme:"quaternary",padding:"Y",round:"Z2",flow:"column",gap:"X",transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},qu={display:"flex",attr:{dropdown:!0},padding:"0 Y",maxHeight:"G",flow:"column",theme:"quaternary",overflow:"hidden auto",style:{listStyleType:"none"},transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",children:t=>t.options||[],childrenAs:"props",".hidden":{transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},childExtends:{extends:"Button",state:{},isActive:({key:t,state:e})=>e.active===t,position:"relative",round:"0",align:"center flex-end",flow:"row-reverse",padding:"Z2 C Z2 Y2",margin:"0",gap:"Y2",theme:"quaternary .child",":hover":{style:{svg:{opacity:"0.5"}}},Icon:{isActive:({key:t,state:e})=>e.active===t,name:"checkmark",opacity:"0.1",".active":{opacity:"1"}},":not(:first-child)":{"@dark":{border:"solid gray4.65"},"@light":{border:"solid gray11"},borderWidth:"1px 0 0"}}},Ku={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},Gu={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}},Dropdown:{onClick:()=>{document.activeElement?.blur()}}},Yu={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& ~ [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}}};var Pb={DropdownRoot:Hu,DropdownTrigger:zu,Dropdown:Wu,DropdownList:qu,DropdownParent:Ku,DropdownParentFocus:Gu,DropdownSiblingFocus:Yu};var $b={};P($b,{DROPDOWN_DEFAULTS:()=>yr,closeDropdown:()=>Mo,computePosition:()=>Jr,dropdownFunctions:()=>Db,fadeInTransform:()=>hs,openDropdown:()=>Uu,setDropdownInert:()=>Vu});var Db={openDropdown:Uu,closeDropdown:Mo,setDropdownInert:Vu};var jP=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),BP=(t,e,r,o,n)=>{let s=jP(e,o,n),i=t==="top"||t==="bottom"?r.height+6:r.width+6;if(s[t]>=i)return t;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[t];return a&&s[a]>=i?a:t},xC=(t,e,r)=>Math.max(e,Math.min(r,t)),Xu=(t,e,r="bottom")=>{if(!t)return{left:0,top:0,side:"bottom"};let o=typeof window<"u"?window.innerWidth:1024,n=typeof window<"u"?window.innerHeight:768,s=BP(r,t,e,o,n),i,a;return s==="bottom"||s==="top"?(i=t.left+(t.width-e.width)/2,a=s==="bottom"?t.bottom+6:t.top-e.height-6):(a=t.top+(t.height-e.height)/2,i=s==="right"?t.right+6:t.left-e.width-6),i=xC(i,6,o-e.width-6),a=xC(a,6,n-e.height-6),{left:i,top:a,side:s}},wC=t=>{switch(t){case"bottom":return"translateY(-4px)";case"top":return"translateY(4px)";case"left":return"translateX(4px)";case"right":return"translateX(-4px)";default:return"translateY(-4px)"}};var UP=`
126
126
  @keyframes smbls-tooltip-fade-in {
127
127
  from { opacity: 0; transform: var(--smbls-tooltip-from, translateY(-4px)); }
128
128
  to { opacity: 1; transform: translate3d(0, 0, 0); }
@@ -130,4 +130,4 @@ ${i}
130
130
  [data-smbls-tooltip="panel"][data-smbls-open="true"] {
131
131
  animation: smbls-tooltip-fade-in 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
132
132
  }
133
- `,BP=()=>{if(typeof document>"u"||document.getElementById("smbls-tooltip-css"))return;let t=document.createElement("style");t.id="smbls-tooltip-css",t.textContent=jP,document.head.appendChild(t)},_C={tag:"div",attr:{"data-smbls-tooltip-root":"true"},position:"fixed",inset:"0",zIndex:"2500",pointerEvents:"none",state:{tip:null},onInit:()=>{BP()},Panel:{tag:"div",attr:{"data-smbls-tooltip":"panel"},position:"fixed",subscribeTo:["tip"],tip:(t,e)=>e?.tip||null,left:t=>{let e=t.tip;if(!e?.anchor)return"-9999px";let r=t._lastSize||{width:200,height:32};return Gu(e.anchor,r,e.placement).left+"px"},top:t=>{let e=t.tip;if(!e?.anchor)return"-9999px";let r=t._lastSize||{width:200,height:32};return Gu(e.anchor,r,e.placement).top+"px"},style:t=>{let e=t.tip;if(!e?.anchor)return{};let r=t._lastSize||{width:200,height:32};return{"--smbls-tooltip-from":bC(Gu(e.anchor,r,e.placement).side)}},text:t=>t.tip?.text||"",theme:t=>t.tip?.theme||"tooltip .quaternary",maxWidth:"280px",padding:"Y2 Z",round:"Z",fontSize:"Y2",lineHeight:"1.35",whiteSpace:"normal",pointerEvents:"none",opacity:t=>t.tip?"1":"0",visibility:t=>t.tip?"visible":"hidden",transition:"B opacity defaultBezier, B visibility defaultBezier",onRender:t=>{if(t?.node&&(t.tip?t.node.setAttribute("data-smbls-open","true"):t.node.removeAttribute("data-smbls-open")),!t?.node)return;let e=t.node.getBoundingClientRect(),r={width:e.width,height:e.height},o=t._lastSize;if(!o||Math.abs(o.width-r.width)>1||Math.abs(o.height-r.height)>1){t._lastSize=r;let n=t.getParent?.();n?.state?.tip&&n.state.update({tip:{...n.state.tip}})}}}};var UP=t=>{t.tooltipText&&t.call("openTooltip",{anchorEl:t,text:t.tooltipText,placement:t.tooltipPlacement||"bottom",theme:t.tooltipTheme,id:t.tooltipId||t.key})},xC=t=>{t._tooltipHideTimer&&(clearTimeout(t._tooltipHideTimer),t._tooltipHideTimer=null),!t._tooltipShowTimer&&(t._tooltipShowTimer=setTimeout(()=>{t._tooltipShowTimer=null,UP(t)},t.tooltipDelay??250))},wC=t=>{t._tooltipShowTimer&&(clearTimeout(t._tooltipShowTimer),t._tooltipShowTimer=null),!t._tooltipHideTimer&&(t._tooltipHideTimer=setTimeout(()=>{t._tooltipHideTimer=null,t.call("closeTooltip",t.tooltipId||t.key)},t.tooltipHideDelay??100))},SC={onMouseenter:(t,e)=>xC(e),onMouseleave:(t,e)=>wC(e),onFocus:(t,e)=>xC(e),onBlur:(t,e)=>wC(e)};R();var kC={display:"flex",theme:"dialog",background:"black",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>bt(t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"gray12",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"gray6",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},vC={extends:"Tooltip",position:"absolute",pointerEvents:"none",opacity:"0",visibility:"hidden",transition:"C defaultBezier opacity, C defaultBezier visibility, B defaultBezier transform",onInit:t=>{let e=!t.shapeDirection||t.shapeDirection==="top"?{top:"112%",left:"50%",transform:"translate3d(-50%,10%,0)",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="right"?{transform:"translate3d(10%,-50%,0)",left:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="bottom"?{transform:"translate3d(-50%,-10%,0)",bottom:"112%",left:"50%",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="left"?{transform:"translate3d(10%,-50%,0)",right:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:{};Object.assign(t,e)}},CC={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:r}=t,o=e||r;if(!o)return;let n=o&&o[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":n||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var EC={TooltipRoot:_C,TooltipTrigger:SC,Tooltip:kC,TooltipHidden:vC,TooltipParent:CC};var AC={placement:"bottom",theme:"tooltip .quaternary",delay:250,hideDelay:100},VP=t=>{if(!t||typeof t.getBoundingClientRect!="function")return null;let e=t.getBoundingClientRect();return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}},TC=t=>t?.getRoot?.()?.TooltipRoot||null,zP=0,HP=()=>`tooltip_${++zP}_${Date.now().toString(36)}`;function OC(t={}){let e=TC(this);if(!e)return console.warn("[tooltip] openTooltip: TooltipRoot is not mounted on the app root. Add `TooltipRoot: {}` to your shell tree and import tooltip components into context."),null;let r=t.anchorEl?.node||t.anchorEl,o=t.anchorRect||VP(r);if(!o)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let n=t.id||HP(),s={id:n,text:t.text||"",anchor:o,placement:t.placement||AC.placement,theme:t.theme||AC.theme};return e.state.update({tip:s}),n}function RC(t){let e=TC(this);if(!e)return;let r=e.state?.tip;if(!r)return;let o=typeof t=="string"?t:t?.id;o&&r.id&&o!==r.id||e.state.update({tip:null})}var PC={openTooltip:OC,closeTooltip:RC};var IC=t=>!!(t&&typeof t=="object"&&t.__isStub===!0),WP=(t,e)=>{let r=e?.sharedLibraries,o=Array.isArray(r)?r.map(s=>typeof s=="string"?s:s?.key||s?.name):r&&typeof r=="object"?Object.keys(r):null,n=0;return t.map(s=>{if(!IC(s))return s;let i=n++;if(typeof s.__libraryKey=="string"&&s.__libraryKey)return s.__libraryKey;if(o&&o[i])return o[i];if(typeof s.__stubId=="string"){let a=s.__stubId.match(/^@symbo[-.]ls\/([^/]+)/);if(a)return a[1]}return null}).filter(Boolean)},qP=async(t,e={})=>{let r=e.symbolsConfig,o=r?.owner&&r?.key?`${r.owner}--${r.key}`:r?.key,n=e.key=e.key||o||(w(t)?t:"smblsapp");if(e.define=e.define||Gn,e.cssPropsRegistry=xt,e.window=nv(e),e.sharedLibraries&&e.sharedLibraries.length){if(e.sharedLibraries.some(g=>typeof g=="string"||IC(g))){e.sharedLibraries=WP(e.sharedLibraries,e.symbolsConfig);let{resolveSharedLibraries:g}=await Promise.resolve().then(()=>(R(),vl));e.sharedLibraries=await g(e.sharedLibraries,{apiBaseUrl:Zy()})}ev(e.sharedLibraries),gv(e)}uc(e,e.designSystem);let[s,i]=dv(n,e);e.designSystem=s,e.registry=i,e.cases||(e.cases={}),e.shorthand&&Ga.prepareContext(e);let a=pv(t,e);if(e.state=a,gi(a),e.pages=hv(t,e),e.components=sv(e),e.utils=iv(e),Ar[e.packageManager]&&(e.dependencies=await cv(e)),e.methods=av(e),e.routerOptions=K0(t,e),e.defaultExtends=[Df],e.snippets=e.snippets||{},e.functions=e.functions||{},e.plugins=e.plugins||[],e.plugins.some(h=>!h||typeof h!="object")){let h=e.plugins.filter(g=>!g||typeof g!="object");e.plugins=e.plugins.filter(g=>g&&typeof g=="object"),e.verbose!==!1&&console.warn(`[smbls] context.plugins carried ${h.length} non-plugin entr${h.length===1?"y":"ies"} (${h.map(g=>JSON.stringify(g)).join(", ")}) \u2014 dropped. A published project that imports a framework plugin it does not declare ships a stub phantom here; the runtime registers polyglot/helmet/fetch/... itself from the context config, so remove the import instead.`)}e.globalScope&&S(e.globalScope)&&(e.globalScope=Ls(e.globalScope));let c=(h,g)=>{let p=g?h[g]:h;if(!S(p))return;let m=le(p);try{Object.assign(p,m)}catch(b){if(g)h[g]=m;else throw b}};c(t),c(e,"components"),c(e,"pages"),c(e,"functions"),c(e,"methods"),c(e,"snippets"),c(e,"app");let l=h=>h&&typeof h.select=="function";e.fetch?.__resolved&&!l(e.fetch.__resolved)&&delete e.fetch.__resolved,e.db?.__resolved&&!l(e.db.__resolved)&&delete e.db.__resolved;let f=h=>e.plugins.some(g=>g&&g.name===h);if(e.polyglot&&!f("polyglot")){e.plugins.push(Jn);for(let h in ec)typeof e.functions[h]!="function"&&(e.functions[h]=ec[h])}if(f("helmet")||e.plugins.push(vy),e.fetch&&!f("fetch")&&e.plugins.push(oh),e.designSystem?.typography?.useCapsize!==!1&&!f("capsize")&&(e.plugins.push(qf),e.cssPropsRegistry.useCapsize=Ty),e.shorthand&&!f("shorthand")&&e.plugins.push(Ga),e.analyze&&!f("analyze")){let h=e.analyze===!0?{}:e.analyze;e.analyze=ou(h),e.plugins.push(Qn)}e.sync!==!1&&!f("sync")&&e.plugins.push(fC),e.inspect&&!f("inspect")&&e.plugins.push(Xy),(e.notifications===!0||e.editor&&e.editor.verbose===!0)&&e.notifications!==!1&&!f("notifications")&&e.plugins.push(uC);let d=(h,g,p)=>{if(e[h]!==!1){for(let m in g)S(e.components[m])||(e.components[m]=g[m]);for(let m in p)typeof e.functions[m]!="function"&&(e.functions[m]=p[m])}};return d("windows",vb,mr),d("dropdown",Tb,Rb),d("tooltip",EC,PC),e},Ib=async(t,e)=>{S(e)||(e={}),Qe(t)?(t={},e.parent=t):w(t)?(t={},e.key=t):S(t)||(t={});let r=e.window||(typeof window<"u"?window:null),o=r?.__BRENDER__,n=null;if(o){let c=e.document||(typeof document<"u"?document:null);c&&(n=Array.from(c.head.querySelectorAll("style")))}if(await qP(t,e),e.useReset!==!1){let c=e.document||(typeof document<"u"?document:null);if(c){let l=c.head.querySelector("style[data-smbls]");l||(l=c.createElement("style"),l.setAttribute("data-smbls",""),c.head.appendChild(l));let f=l.sheet;if(f){try{f.insertRule("*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }",0)}catch{}try{f.insertRule("h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }",1)}catch{}}}}if(e.app&&S(e.app))for(let c in e.app)t[c]===void 0&&(t[c]=e.app[c]);t.extends=sk(t,e),e.router!==!1&&(t.routes=e.pages),t.state=e.state,t.context=e,t.data=t.data||{},e.skipDesignSystemInit||await lv({functions:e.functions,utils:e.utils,snippets:e.snippets,...e.files},e);for(let c of e.plugins)if(typeof c.beforeCreate=="function")try{c.beforeCreate(t,e)}catch(l){console.error(`[smbls] plugin "${c.name||"?"}" beforeCreate error:`,l)}let s=e.document;if(!s||!s.createElement)return t;let i=e.parent||s.body;if(o)return KP(ne,t,i,e,r,n);let a=ne(t,i,e.key,{verbose:e.verbose,context:e,...e.domqlOptions});return typeof window<"u"&&!e.document&&(window.__smblsApp=a),a},KP=async(t,e,r,o,n,s)=>{let i=r.ownerDocument||document;s&&s.forEach(l=>{l.parentNode&&l.remove()});let a=[];for(let l of r.childNodes){if(l.nodeType===1){let f=l.tagName.toLowerCase();if(f==="script"||f==="link"||f==="style"||f==="svg"&&l.id)continue}a.push(l)}a.forEach(l=>l.remove()),i.querySelectorAll("[data-br]").forEach(l=>l.removeAttribute("data-br"));let c=t(e,r,o.key,{verbose:o.verbose,context:o,...o.domqlOptions});return GP(n),c},GP=t=>{t&&(delete t.__BRENDER__,delete t.__BR_REGISTRY__)};var Db=(t,e)=>st(t,S(e)?e:{}),YP=t=>{if(typeof document>"u")return;let e=t.themeRoot||t.document&&t.document.documentElement||document.documentElement;if(!e||typeof e.setAttribute!="function")return;let r=t.globalTheme||"auto";try{if(typeof window<"u"&&window.location){let s=new URLSearchParams(window.location.search).get("globalTheme");s&&(r=s)}}catch{}let o=t.themeStorageKey;if(r==="auto"&&o&&typeof localStorage<"u")try{let s=localStorage.getItem(o);s&&(r=s)}catch{}let n=r==="auto"?(()=>{try{return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}})():r;e.setAttribute("data-theme",n),t.globalTheme=r,t.themeRoot=e},XP=()=>{if(typeof document>"u")return null;try{let t=document.querySelector('meta[name="symbols-runtime"]'),e=t&&t.getAttribute("content");return typeof e=="string"&&e?e:null}catch{return null}},DC=t=>{let e=XP();e&&(t.editor||(t.editor={}),t.editor.runtime||(t.editor.runtime=e),e==="runner"&&typeof t.editor.livesync>"u"&&(t.editor.livesync=!0))},$b=(t,e=Hr,r)=>{let o={...Hr,...Db(e,r)};return DC(o),YP(o),Ib(t,o).then(s=>{if(wy(s,o),s.destroy=()=>Fa(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Ma(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},s.onCreate&&s.onCreate(s,s.state,s.context,o),s.context?.analyze?.activate)try{s.context.analyze.activate(s.context)}catch(i){console.error("[analyze] activate error:",i)}return s}).catch(s=>{throw console.error("[smbls] create error:",s),s})},JP=(t,e=Hr,r)=>{let o=$b(t,e,r),n={...Hr,...Db(e,r)},s=n.key;return J0(o,s,{utils:La,...n}),o},ZP=async(t,e=Hr,r)=>{let o={...Hr,...Db(e,r)};DC(o);let n=e.key;await X0(n,o);let s=await Ib(t,o);return wy(s,o),s.destroy=()=>Fa(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Ma(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},o.onCreate&&await o.onCreate(s,s.state,s.context,o),s},QP=(t={},e=Hr,r)=>$b({deps:{isUndefined:Tt},...t},st({domqlOptions:{onlyResolveExtends:!0}},e),r);jf(xa);Jk(void 0,{smbls:Lb});Zk(void 0,{"@symbo.ls/windows":()=>({...Cb,...kb}),"@symbo.ls/dropdown":()=>({...Ob,...Pb})});
133
+ `,VP=()=>{if(typeof document>"u"||document.getElementById("smbls-tooltip-css"))return;let t=document.createElement("style");t.id="smbls-tooltip-css",t.textContent=UP,document.head.appendChild(t)},SC={tag:"div",attr:{"data-smbls-tooltip-root":"true"},position:"fixed",inset:"0",zIndex:"2500",pointerEvents:"none",state:{tip:null},onInit:()=>{VP()},Panel:{tag:"div",attr:{"data-smbls-tooltip":"panel"},position:"fixed",subscribeTo:["tip"],tip:(t,e)=>e?.tip||null,left:t=>{let e=t.tip;if(!e?.anchor)return"-9999px";let r=t._lastSize||{width:200,height:32};return Xu(e.anchor,r,e.placement).left+"px"},top:t=>{let e=t.tip;if(!e?.anchor)return"-9999px";let r=t._lastSize||{width:200,height:32};return Xu(e.anchor,r,e.placement).top+"px"},style:t=>{let e=t.tip;if(!e?.anchor)return{};let r=t._lastSize||{width:200,height:32};return{"--smbls-tooltip-from":wC(Xu(e.anchor,r,e.placement).side)}},text:t=>t.tip?.text||"",theme:t=>t.tip?.theme||"tooltip .quaternary",maxWidth:"280px",padding:"Y2 Z",round:"Z",fontSize:"Y2",lineHeight:"1.35",whiteSpace:"normal",pointerEvents:"none",opacity:t=>t.tip?"1":"0",visibility:t=>t.tip?"visible":"hidden",transition:"B opacity defaultBezier, B visibility defaultBezier",onRender:t=>{if(t?.node&&(t.tip?t.node.setAttribute("data-smbls-open","true"):t.node.removeAttribute("data-smbls-open")),!t?.node)return;let e=t.node.getBoundingClientRect(),r={width:e.width,height:e.height},o=t._lastSize;if(!o||Math.abs(o.width-r.width)>1||Math.abs(o.height-r.height)>1){t._lastSize=r;let n=t.getParent?.();n?.state?.tip&&n.state.update({tip:{...n.state.tip}})}}}};var HP=t=>{t.tooltipText&&t.call("openTooltip",{anchorEl:t,text:t.tooltipText,placement:t.tooltipPlacement||"bottom",theme:t.tooltipTheme,id:t.tooltipId||t.key})},kC=t=>{t._tooltipHideTimer&&(clearTimeout(t._tooltipHideTimer),t._tooltipHideTimer=null),!t._tooltipShowTimer&&(t._tooltipShowTimer=setTimeout(()=>{t._tooltipShowTimer=null,HP(t)},t.tooltipDelay??250))},vC=t=>{t._tooltipShowTimer&&(clearTimeout(t._tooltipShowTimer),t._tooltipShowTimer=null),!t._tooltipHideTimer&&(t._tooltipHideTimer=setTimeout(()=>{t._tooltipHideTimer=null,t.call("closeTooltip",t.tooltipId||t.key)},t.tooltipHideDelay??100))},CC={onMouseenter:(t,e)=>kC(e),onMouseleave:(t,e)=>vC(e),onFocus:(t,e)=>kC(e),onBlur:(t,e)=>vC(e)};R();var EC={display:"flex",theme:"dialog",background:"black",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>bt(t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"gray12",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"gray6",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},AC={extends:"Tooltip",position:"absolute",pointerEvents:"none",opacity:"0",visibility:"hidden",transition:"C defaultBezier opacity, C defaultBezier visibility, B defaultBezier transform",onInit:t=>{let e=!t.shapeDirection||t.shapeDirection==="top"?{top:"112%",left:"50%",transform:"translate3d(-50%,10%,0)",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="right"?{transform:"translate3d(10%,-50%,0)",left:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="bottom"?{transform:"translate3d(-50%,-10%,0)",bottom:"112%",left:"50%",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="left"?{transform:"translate3d(10%,-50%,0)",right:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:{};Object.assign(t,e)}},TC={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:r}=t,o=e||r;if(!o)return;let n=o&&o[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":n||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var OC={TooltipRoot:SC,TooltipTrigger:CC,Tooltip:EC,TooltipHidden:AC,TooltipParent:TC};var RC={placement:"bottom",theme:"tooltip .quaternary",delay:250,hideDelay:100},zP=t=>{if(!t||typeof t.getBoundingClientRect!="function")return null;let e=t.getBoundingClientRect();return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}},PC=t=>t?.getRoot?.()?.TooltipRoot||null,WP=0,qP=()=>`tooltip_${++WP}_${Date.now().toString(36)}`;function IC(t={}){let e=PC(this);if(!e)return console.warn("[tooltip] openTooltip: TooltipRoot is not mounted on the app root. Add `TooltipRoot: {}` to your shell tree and import tooltip components into context."),null;let r=t.anchorEl?.node||t.anchorEl,o=t.anchorRect||zP(r);if(!o)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let n=t.id||qP(),s={id:n,text:t.text||"",anchor:o,placement:t.placement||RC.placement,theme:t.theme||RC.theme};return e.state.update({tip:s}),n}function DC(t){let e=PC(this);if(!e)return;let r=e.state?.tip;if(!r)return;let o=typeof t=="string"?t:t?.id;o&&r.id&&o!==r.id||e.state.update({tip:null})}var $C={openTooltip:IC,closeTooltip:DC};var LC=t=>!!(t&&typeof t=="object"&&t.__isStub===!0),KP=(t,e)=>{let r=e?.sharedLibraries,o=Array.isArray(r)?r.map(s=>typeof s=="string"?s:s?.key||s?.name):r&&typeof r=="object"?Object.keys(r):null,n=0;return t.map(s=>{if(!LC(s))return s;let i=n++;if(typeof s.__libraryKey=="string"&&s.__libraryKey)return s.__libraryKey;if(o&&o[i])return o[i];if(typeof s.__stubId=="string"){let a=s.__stubId.match(/^@symbo[-.]ls\/([^/]+)/);if(a)return a[1]}return null}).filter(Boolean)},GP=async(t,e={})=>{let r=e.symbolsConfig,o=r?.owner&&r?.key?`${r.owner}--${r.key}`:r?.key,n=e.key=e.key||o||(w(t)?t:"smblsapp");if(e.define=e.define||Yn,e.cssPropsRegistry=xt,e.window=av(e),e.sharedLibraries&&e.sharedLibraries.length){if(e.sharedLibraries.some(g=>typeof g=="string"||LC(g))){e.sharedLibraries=KP(e.sharedLibraries,e.symbolsConfig);let{resolveSharedLibraries:g}=await Promise.resolve().then(()=>(R(),Cl));e.sharedLibraries=await g(e.sharedLibraries,{apiBaseUrl:eb()})}nv(e.sharedLibraries),bv(e)}dc(e,e.designSystem);let[s,i]=gv(n,e);e.designSystem=s,e.registry=i,e.cases||(e.cases={}),e.shorthand&&Ya.prepareContext(e);let a=mv(t,e);if(e.state=a,mi(a),e.pages=yv(t,e),e.components=cv(e),e.utils=lv(e),Ar[e.packageManager]&&(e.dependencies=await uv(e)),e.methods=fv(e),e.routerOptions=X0(t,e),e.defaultExtends=[Lf],e.snippets=e.snippets||{},e.functions=e.functions||{},e.plugins=e.plugins||[],e.plugins.some(h=>!h||typeof h!="object")){let h=e.plugins.filter(g=>!g||typeof g!="object");e.plugins=e.plugins.filter(g=>g&&typeof g=="object"),e.verbose!==!1&&console.warn(`[smbls] context.plugins carried ${h.length} non-plugin entr${h.length===1?"y":"ies"} (${h.map(g=>JSON.stringify(g)).join(", ")}) \u2014 dropped. A published project that imports a framework plugin it does not declare ships a stub phantom here; the runtime registers polyglot/helmet/fetch/... itself from the context config, so remove the import instead.`)}e.globalScope&&S(e.globalScope)&&(e.globalScope=Ms(e.globalScope));let c=(h,g)=>{let p=g?h[g]:h;if(!S(p))return;let m=le(p);try{Object.assign(p,m)}catch(b){if(g)h[g]=m;else throw b}};c(t),c(e,"components"),c(e,"pages"),c(e,"functions"),c(e,"methods"),c(e,"snippets"),c(e,"app");let l=h=>h&&typeof h.select=="function";e.fetch?.__resolved&&!l(e.fetch.__resolved)&&delete e.fetch.__resolved,e.db?.__resolved&&!l(e.db.__resolved)&&delete e.db.__resolved;let f=h=>e.plugins.some(g=>g&&g.name===h);if(e.polyglot&&!f("polyglot")){e.plugins.push(Zn);for(let h in rc)typeof e.functions[h]!="function"&&(e.functions[h]=rc[h])}if(f("helmet")||e.plugins.push(Ay),e.fetch&&!f("fetch")&&e.plugins.push(sh),e.designSystem?.typography?.useCapsize!==!1&&!f("capsize")&&(e.plugins.push(Gf),e.cssPropsRegistry.useCapsize=Py),e.shorthand&&!f("shorthand")&&e.plugins.push(Ya),e.analyze&&!f("analyze")){let h=e.analyze===!0?{}:e.analyze;e.analyze=su(h),e.plugins.push(ts)}e.sync!==!1&&!f("sync")&&e.plugins.push(pC),e.inspect&&!f("inspect")&&e.plugins.push(Qy),(e.notifications===!0||e.editor&&e.editor.verbose===!0)&&e.notifications!==!1&&!f("notifications")&&e.plugins.push(hC);let d=(h,g,p)=>{if(e[h]!==!1){for(let m in g)S(e.components[m])||(e.components[m]=g[m]);for(let m in p)typeof e.functions[m]!="function"&&(e.functions[m]=p[m])}};return d("windows",Ab,mr),d("dropdown",Pb,Db),d("tooltip",OC,$C),e},Lb=async(t,e)=>{S(e)||(e={}),Qe(t)?(t={},e.parent=t):w(t)?(t={},e.key=t):S(t)||(t={});let r=e.window||(typeof window<"u"?window:null),o=r?.__BRENDER__,n=null;if(o){let c=e.document||(typeof document<"u"?document:null);c&&(n=Array.from(c.head.querySelectorAll("style")))}if(await GP(t,e),e.useReset!==!1){let c=e.document||(typeof document<"u"?document:null);if(c){let l=c.head.querySelector("style[data-smbls]");l||(l=c.createElement("style"),l.setAttribute("data-smbls",""),c.head.appendChild(l));let f=l.sheet;if(f){try{f.insertRule("*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }",0)}catch{}try{f.insertRule("h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }",1)}catch{}}}}if(e.app&&S(e.app))for(let c in e.app)t[c]===void 0&&(t[c]=e.app[c]);t.extends=ck(t,e),e.router!==!1&&(t.routes=e.pages),t.state=e.state,t.context=e,t.data=t.data||{},e.skipDesignSystemInit||await dv({functions:e.functions,utils:e.utils,snippets:e.snippets,...e.files},e);for(let c of e.plugins)if(typeof c.beforeCreate=="function")try{c.beforeCreate(t,e)}catch(l){console.error(`[smbls] plugin "${c.name||"?"}" beforeCreate error:`,l)}let s=e.document;if(!s||!s.createElement)return t;let i=e.parent||s.body;if(o)return YP(ne,t,i,e,r,n);let a=ne(t,i,e.key,{verbose:e.verbose,context:e,...e.domqlOptions});return typeof window<"u"&&!e.document&&(window.__smblsApp=a),a},YP=async(t,e,r,o,n,s)=>{let i=r.ownerDocument||document;s&&s.forEach(l=>{l.parentNode&&l.remove()});let a=[];for(let l of r.childNodes){if(l.nodeType===1){let f=l.tagName.toLowerCase();if(f==="script"||f==="link"||f==="style"||f==="svg"&&l.id)continue}a.push(l)}a.forEach(l=>l.remove()),i.querySelectorAll("[data-br]").forEach(l=>l.removeAttribute("data-br"));let c=t(e,r,o.key,{verbose:o.verbose,context:o,...o.domqlOptions});return XP(n),c},XP=t=>{t&&(delete t.__BRENDER__,delete t.__BR_REGISTRY__)};var Mb=(t,e)=>st(t,S(e)?e:{}),JP=t=>{if(typeof document>"u")return;let e=t.themeRoot||t.document&&t.document.documentElement||document.documentElement;if(!e||typeof e.setAttribute!="function")return;let r=t.globalTheme||"auto";try{if(typeof window<"u"&&window.location){let s=new URLSearchParams(window.location.search).get("globalTheme");s&&(r=s)}}catch{}let o=t.themeStorageKey;if(r==="auto"&&o&&typeof localStorage<"u")try{let s=localStorage.getItem(o);s&&(r=s)}catch{}let n=r==="auto"?(()=>{try{return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}})():r;e.setAttribute("data-theme",n),t.globalTheme=r,t.themeRoot=e},ZP=()=>{if(typeof document>"u")return null;try{let t=document.querySelector('meta[name="symbols-runtime"]'),e=t&&t.getAttribute("content");return typeof e=="string"&&e?e:null}catch{return null}},MC=t=>{let e=ZP();e&&(t.editor||(t.editor={}),t.editor.runtime||(t.editor.runtime=e),e==="runner"&&typeof t.editor.livesync>"u"&&(t.editor.livesync=!0))},Fb=(t,e=zr,r)=>{let o={...zr,...Mb(e,r)};return MC(o),JP(o),Lb(t,o).then(s=>{if(vy(s,o),s.destroy=()=>Na(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Fa(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},s.onCreate&&s.onCreate(s,s.state,s.context,o),s.context?.analyze?.activate)try{s.context.analyze.activate(s.context)}catch(i){console.error("[analyze] activate error:",i)}return s}).catch(s=>{throw console.error("[smbls] create error:",s),s})},QP=(t,e=zr,r)=>{let o=Fb(t,e,r),n={...zr,...Mb(e,r)},s=n.key;return tk(o,s,{utils:Ma,...n}),o},tI=async(t,e=zr,r)=>{let o={...zr,...Mb(e,r)};MC(o);let n=e.key;await Q0(n,o);let s=await Lb(t,o);return vy(s,o),s.destroy=()=>Na(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Fa(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},o.onCreate&&await o.onCreate(s,s.state,s.context,o),s},eI=(t={},e=zr,r)=>Fb({deps:{isUndefined:Tt},...t},st({domqlOptions:{onlyResolveExtends:!0}},e),r);Uf(wa);tv(void 0,{smbls:Nb});ev(void 0,{"@symbo.ls/windows":()=>({...Tb,...Eb}),"@symbo.ls/dropdown":()=>({...Ib,...$b})});