smbls 3.14.807 → 3.14.808

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,35 +1,35 @@
1
- "use strict";var F1=Object.create;var Oc=Object.defineProperty;var N1=Object.getOwnPropertyDescriptor;var j1=Object.getOwnPropertyNames;var B1=Object.getPrototypeOf,U1=Object.prototype.hasOwnProperty;var j=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var wd=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},I=(t,e)=>{for(var r in e)Oc(t,r,{get:e[r],enumerable:!0})},g_=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of j1(e))!U1.call(t,o)&&o!==r&&Oc(t,o,{get:()=>e[o],enumerable:!(n=N1(e,o))||n.enumerable});return t};var V1=(t,e,r)=>(r=t!=null?F1(B1(t)):{},g_(e||!t||!t.__esModule?Oc(r,"default",{value:t,enumerable:!0}):r,t)),z1=t=>g_(Oc({},"__esModule",{value:!0}),t);var Bd,Ud,C,et,Us=j(()=>{"use strict";Bd=globalThis,Ud=globalThis,C=globalThis,et=C.document});var lr,Vs,qt,zs=j(()=>{"use strict";Us();lr=t=>(typeof Node=="object"?t instanceof C.Node:t&&typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.nodeName=="string")||!1,Vs=t=>(typeof HTMLElement=="object"?t instanceof C.HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string")||!1,qt=t=>typeof C<"u"&&(C.Node&&t instanceof C.Node||C.Window&&t instanceof C.Window||t===C||et!==void 0&&t===et)});var k,S,ze,A,Uc,Vc,O,zc,N,Ct,Tt,Hs,Kt,Vd,Ot=j(()=>{"use strict";zs();k=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,S=t=>typeof t=="string",ze=t=>typeof t=="number",A=t=>typeof t=="function",Uc=t=>t===!0||t===!1,Vc=t=>t===null,O=t=>Array.isArray(t),zc=t=>t instanceof Date,N=t=>t===null?!1:typeof t=="object",Ct=t=>t!==void 0,Tt=t=>t===void 0,Hs={boolean:Uc,array:O,object:k,string:S,date:zc,number:ze,null:Vc,function:A,objectLike:N,node:lr,htmlElement:Vs,defined:Ct},Kt=t=>(...e)=>e.some(r=>Hs[r](t)),Vd=t=>(...e)=>!e.some(r=>Hs[r](t))});var zd,Hd,Wd,qd,so,Ws,Kd,Gd,qs,Yd,Xd,Zd,Jd,Qd,tp,ep,io,Ks,ao=j(()=>{"use strict";fr();Ot();zd=(t,e)=>e.every(r=>t.includes(r)),Hd=(t,e)=>{let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r},Wd=(t,e)=>{if(S(e)&&(e=parseInt(e)),ze(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},qd=(t,e,r)=>{e<0||r<0||e>=t.length||r>=t.length||([t[e],t[r]]=[t[r],t[e]])},so=(...t)=>[].concat(...t),Ws=(t,e=[])=>t.reduce((r,n)=>ot(r,lt(n,{exclude:e}),e),{}),Kd=(t,e)=>{let r=t.indexOf(e);return r!==-1?t.slice(0,r):t},Gd=(t,e)=>{if(!O(t))return;let r=t.indexOf(e);return r!==-1?t.slice(r+1):t},qs=(t,e)=>{let r=t.indexOf(e);if(r>-1){let n=[...t];return n.splice(r,1),n}return t},Yd=(t,e)=>t.filter(r=>r!==e),Xd=(t,e)=>{let r=[];for(let n=0;n<t.length;n++)r.push(t[n]),n<t.length-1&&r.push(e);return r},Zd=(t,e,r)=>{let n=[...t],o=n.indexOf(e),s=n.indexOf(r);if(o!==-1&&s!==-1){let i=n.splice(o,1)[0],a=s<o?s:s+1;n.splice(a,0,i)}return n},Jd=(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},Qd=(t,e)=>t.filter(r=>!e.includes(r)),tp=(t,e)=>{let r=new Set(e);return t.filter(n=>!r.has(n))},ep=(t,e)=>{if(!t)return 0;let r=0;for(let n=0;n<e.length;n++)t.includes(e[n])&&r++;return r},io=t=>O(t)?[...new Set(t)]:t,Ks=(t,e)=>{for(let r in e)Object.defineProperty(t,r,{value:e[r],enumerable:!1,configurable:!0,writable:!0})}});function Dt(t,e,r={}){let{bracketsLength:n=2}=r,o=n===3?"{{{":"{{";if(!t.includes(o))return t;let s=iE[n],i=e||this.state||{},a=this;return t.replace(s,(c,l,f,u)=>{let d=f.trim();if(u){let p=a?.context,h=p?.functions?.[u]||p?.utils?.[u]||p?.methods?.[u]||p?.snippets?.[u]||a?.[u];if(h&&typeof h=="function")try{return String(h.call(a,d)??"")}catch{return""}return""}if(l){let p=(l.match(/\.\.\//g)||[]).length,h=i;for(let m=0;m<p;m++){if(!h||!h.parent)return"";h=h.parent}if(d==="parent")return String(h.value??"");let g=Gs(h,d);return g!=null&&typeof g=="object"?"":String(g??"")}else{let p=Gs(i,d);if(p!=null&&typeof p!="object")return String(p);let h=a?.context?.polyglot;if(h?.translations){let g=i?.root?.lang||i?.lang||a?.context?.state?.lang||h.defaultLang||"en",m=h.translations[g];if(m){let _=Gs(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 w=Gs(x,d);if(w!=null&&typeof w!="object")return String(w)}}}let b=Gs(h.translations,d);if(b!=null&&typeof b!="object")return String(b)}return""}})}var Ys,rp,iE,Gs,hn,np,aE,op,sp,ip,cE,ap,cp,Xs=j(()=>{"use strict";Ys=(t,e)=>{for(let r of e)if(t.includes(r))return!0;return!1},rp=(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},Gs=(t,e)=>e.split(".").reduce((r,n)=>r?.[n],t);hn=t=>`${t.charAt(0).toLowerCase()}${t.slice(1)}`,np=(t,e)=>{let r=t.split(`
2
- `),n=-1,o=-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,n=f+1,s=r[f].indexOf(e)+1,r[f].includes("{}")){o=n,i=r[f].indexOf("{}")+3;break}let u=r[f].slice(s+e.length);if(u.includes("{")||u.includes("["))c=1;else{o=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)){o=f+1,i=r[f].lastIndexOf("}")!==-1?r[f].lastIndexOf("}")+2:r[f].length+1;break}return{startColumn:s,endColumn:i,startLineNumber:n,endLineNumber:o}},aE=/\\([0-7]{1,3})/g,op=t=>t.replace(aE,(e,r)=>String.fromCharCode(parseInt(r,8))),sp=t=>t.replace(/\n/g,"/////n").replace(/`/g,"/////tilde").replace(/\$/g,"/////dlrsgn"),ip=t=>t.replace(/\/\/\/\/\/n/g,`
3
- `).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),cE=/[^a-zA-Z0-9\s]/g,ap=t=>t.replace(cE,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),cp=t=>t.replace(/%[0-9A-Fa-f]{2}/g,e=>String.fromCharCode(parseInt(e.slice(1),16)))});var Ar,Zs,lp,gn,Tr,co,Js,fp,lo=j(()=>{"use strict";Ar=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"]),Zs=new Set(["attr","style","text","html","content","data","class","state","scope","children","props","if","key","tag","query","on","context"]),lp=["ref","parent","__element","__depends","__ref","__children","root"],gn=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"]),Tr=new Set(["update","__element"]),co=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"]),Js=new Set(["node","context","extends","__element","__ref",...co,...gn,...Tr]),fp=new Set(["init","beforeClassAssign","render","renderRouter","attachNode","stateInit","stateCreated","beforeStateUpdate","stateUpdate","beforeUpdate","done","create","complete","frame","update","fetchError","fetchComplete"])});var T_,mn,ft,up,gt,ot,I_,dp,lt,ti,lE,fE,O_,ei,uE,dE,pE,He,hE,gE,R_,me,$_,L_,M_,F_,N_,P_,Qs,D_,ri,pp,hp,Hc,gp,mp,ni,yn,Gt,Wc,mE,yp,bp,qc,_p,xp,wp,Sp,kp,vp,Cp,fr=j(()=>{"use strict";Us();Ot();ao();Xs();zs();lo();T_="production",mn=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,ft=(t,e,r,n)=>{if(A(t))return e?typeof t.call!="function"?t:t.call(e,e,r||e.state,n||e.context):void 0;if(t!=null&&e?.context?.plugins&&(O(t)||k(t)&&!qt(t))){let o=e.context.plugins;for(let s of o)if(s.resolveHandler){let i=s.resolveHandler(t,e);if(typeof i=="function")return ft(i,e,r,n)}}return t},up=(t,e,r)=>{for(let n in e)t[n]=ft(e[n],r)},gt=(t,e,r=[])=>{let n=r instanceof Set;for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(mn(o)||(n?r.has(o):r.includes(o))||t[o]===void 0&&(t[o]=e[o]));return t},ot=(t,e,r=Js)=>I_(t,e,r,null),I_=(t,e,r,n)=>{if(t===e)return t;if(n){for(let s=0;s<n.length;s+=2)if(n[s]===t&&n[s+1]===e)return t}let o=r instanceof Set;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||mn(s)||s==="constructor"||s==="prototype"||(o?r.has(s):r.includes(s)))continue;let i=t[s],a=e[s];if(N(i)&&N(a)){let c=n||[];c.push(t,e),I_(i,a,r,c),c.length-=2}else i===void 0&&(t[s]=a)}return t},dp=(t,e=[])=>{let r=e instanceof Set,n={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(mn(o)||(r?e.has(o):e.includes(o))||(n[o]=t[o]));return n},lt=(t,e={})=>{let{exclude:r=[],cleanUndefined:n=!1,cleanNull:o=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!N(t)||qt(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=O(t)?[]:{};s.set(t,l);let f=[[t,l]];for(;f.length;){let[u,d]=f.pop();for(let p in u){if(!Object.prototype.hasOwnProperty.call(u,p)||mn(p)||p==="__proto__"||c(p))continue;let h=u[p];if(!(n&&h===void 0)&&!(o&&h===null)){if(qt(h)){d[p]=h;continue}if(i&&p==="extends"&&O(h)){d[p]=Ws(h,r);continue}if(A(h)){d[p]=h;continue}if(N(h))if(s.has(h))d[p]=s.get(h);else{let g=O(h)?[]:{};s.set(h,g),d[p]=g,f.push([h,g])}else d[p]=h}}}return l},ti=(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 n=t[r];if(A(n))e[r]=n.toString();else if(k(n))e[r]={},ti(n,e[r]);else if(O(n)){let o=e[r]=[];for(let s=0;s<n.length;s++){let i=n[s];k(i)?(o[s]={},ti(i,o[s])):A(i)?o[s]=i.toString():o[s]=i}}else e[r]=n}return e},lE=/^[A-Za-z_$][A-Za-z0-9_$]*$/,fE=t=>`'${String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\r/g,"\\r").replace(/\n/g,"\\n")}'`,O_=t=>{let e=String(t);return Ys(e,[`
4
- `,"'"])?"`"+e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")+"`":"'"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\r/g,"\\r")+"'"},ei=(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 n=" ".repeat(e),o=`{
5
- `;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=t[s],a=lE.test(s)?s:fE(s);if(o+=`${n} ${a}: `,i instanceof RegExp)o+=String(i);else if(O(i)){o+=`[
1
+ "use strict";var H1=Object.create;var Pc=Object.defineProperty;var W1=Object.getOwnPropertyDescriptor;var q1=Object.getOwnPropertyNames;var K1=Object.getPrototypeOf,G1=Object.prototype.hasOwnProperty;var j=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var Sd=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},D=(t,e)=>{for(var r in e)Pc(t,r,{get:e[r],enumerable:!0})},__=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of q1(e))!G1.call(t,o)&&o!==r&&Pc(t,o,{get:()=>e[o],enumerable:!(n=W1(e,o))||n.enumerable});return t};var Y1=(t,e,r)=>(r=t!=null?H1(K1(t)):{},__(e||!t||!t.__esModule?Pc(r,"default",{value:t,enumerable:!0}):r,t)),X1=t=>__(Pc({},"__esModule",{value:!0}),t);var Ud,Vd,C,rt,zs=j(()=>{"use strict";Ud=globalThis,Vd=globalThis,C=globalThis,rt=C.document});var lr,Hs,qt,Ws=j(()=>{"use strict";zs();lr=t=>(typeof Node=="object"?t instanceof C.Node:t&&typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.nodeName=="string")||!1,Hs=t=>(typeof HTMLElement=="object"?t instanceof C.HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string")||!1,qt=t=>typeof C<"u"&&(C.Node&&t instanceof C.Node||C.Window&&t instanceof C.Window||t===C||rt!==void 0&&t===rt)});var k,S,ze,T,zc,Hc,O,Wc,N,Ct,Ot,qs,Kt,zd,Rt=j(()=>{"use strict";Ws();k=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,S=t=>typeof t=="string",ze=t=>typeof t=="number",T=t=>typeof t=="function",zc=t=>t===!0||t===!1,Hc=t=>t===null,O=t=>Array.isArray(t),Wc=t=>t instanceof Date,N=t=>t===null?!1:typeof t=="object",Ct=t=>t!==void 0,Ot=t=>t===void 0,qs={boolean:zc,array:O,object:k,string:S,date:Wc,number:ze,null:Hc,function:T,objectLike:N,node:lr,htmlElement:Hs,defined:Ct},Kt=t=>(...e)=>e.some(r=>qs[r](t)),zd=t=>(...e)=>!e.some(r=>qs[r](t))});var Hd,Wd,qd,Kd,io,Ks,Gd,Yd,Gs,Xd,Zd,Jd,Qd,tp,ep,rp,ao,Ys,co=j(()=>{"use strict";fr();Rt();Hd=(t,e)=>e.every(r=>t.includes(r)),Wd=(t,e)=>{let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r},qd=(t,e)=>{if(S(e)&&(e=parseInt(e)),ze(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]])},io=(...t)=>[].concat(...t),Ks=(t,e=[])=>t.reduce((r,n)=>st(r,lt(n,{exclude:e}),e),{}),Gd=(t,e)=>{let r=t.indexOf(e);return r!==-1?t.slice(0,r):t},Yd=(t,e)=>{if(!O(t))return;let r=t.indexOf(e);return r!==-1?t.slice(r+1):t},Gs=(t,e)=>{let r=t.indexOf(e);if(r>-1){let n=[...t];return n.splice(r,1),n}return t},Xd=(t,e)=>t.filter(r=>r!==e),Zd=(t,e)=>{let r=[];for(let n=0;n<t.length;n++)r.push(t[n]),n<t.length-1&&r.push(e);return r},Jd=(t,e,r)=>{let n=[...t],o=n.indexOf(e),s=n.indexOf(r);if(o!==-1&&s!==-1){let i=n.splice(o,1)[0],a=s<o?s:s+1;n.splice(a,0,i)}return n},Qd=(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},tp=(t,e)=>t.filter(r=>!e.includes(r)),ep=(t,e)=>{let r=new Set(e);return t.filter(n=>!r.has(n))},rp=(t,e)=>{if(!t)return 0;let r=0;for(let n=0;n<e.length;n++)t.includes(e[n])&&r++;return r},ao=t=>O(t)?[...new Set(t)]:t,Ys=(t,e)=>{for(let r in e)Object.defineProperty(t,r,{value:e[r],enumerable:!1,configurable:!0,writable:!0})}});function It(t,e,r={}){let{bracketsLength:n=2}=r,o=n===3?"{{{":"{{";if(!t.includes(o))return t;let s=pE[n],i=e||this.state||{},a=this;return t.replace(s,(c,l,f,u)=>{let d=f.trim();if(u){let p=a?.context,h=p?.functions?.[u]||p?.utils?.[u]||p?.methods?.[u]||p?.snippets?.[u]||a?.[u];if(h&&typeof h=="function")try{return String(h.call(a,d)??"")}catch{return""}return""}if(l){let p=(l.match(/\.\.\//g)||[]).length,h=i;for(let m=0;m<p;m++){if(!h||!h.parent)return"";h=h.parent}if(d==="parent")return String(h.value??"");let g=Xs(h,d);return g!=null&&typeof g=="object"?"":String(g??"")}else{let p=Xs(i,d);if(p!=null&&typeof p!="object")return String(p);let h=a?.context?.polyglot;if(h?.translations){let g=i?.root?.lang||i?.lang||a?.context?.state?.lang||h.defaultLang||"en",m=h.translations[g];if(m){let _=Xs(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 w=Xs(x,d);if(w!=null&&typeof w!="object")return String(w)}}}let b=Xs(h.translations,d);if(b!=null&&typeof b!="object")return String(b)}return""}})}var Zs,np,pE,Xs,hn,op,hE,sp,ip,ap,gE,cp,lp,Js=j(()=>{"use strict";Zs=(t,e)=>{for(let r of e)if(t.includes(r))return!0;return!1},np=(t,e)=>{let r=new RegExp(`[${e.join("\\")}]`,"g");return t.replace(r,"")},pE={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},Xs=(t,e)=>e.split(".").reduce((r,n)=>r?.[n],t);hn=t=>`${t.charAt(0).toLowerCase()}${t.slice(1)}`,op=(t,e)=>{let r=t.split(`
2
+ `),n=-1,o=-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,n=f+1,s=r[f].indexOf(e)+1,r[f].includes("{}")){o=n,i=r[f].indexOf("{}")+3;break}let u=r[f].slice(s+e.length);if(u.includes("{")||u.includes("["))c=1;else{o=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)){o=f+1,i=r[f].lastIndexOf("}")!==-1?r[f].lastIndexOf("}")+2:r[f].length+1;break}return{startColumn:s,endColumn:i,startLineNumber:n,endLineNumber:o}},hE=/\\([0-7]{1,3})/g,sp=t=>t.replace(hE,(e,r)=>String.fromCharCode(parseInt(r,8))),ip=t=>t.replace(/\n/g,"/////n").replace(/`/g,"/////tilde").replace(/\$/g,"/////dlrsgn"),ap=t=>t.replace(/\/\/\/\/\/n/g,`
3
+ `).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),gE=/[^a-zA-Z0-9\s]/g,cp=t=>t.replace(gE,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),lp=t=>t.replace(/%[0-9A-Fa-f]{2}/g,e=>String.fromCharCode(parseInt(e.slice(1),16)))});var Ar,Qs,fp,gn,Tr,lo,ti,up,fo=j(()=>{"use strict";Ar=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"]),Qs=new Set(["attr","style","text","html","content","data","class","state","scope","children","props","if","key","tag","query","on","context"]),fp=["ref","parent","__element","__depends","__ref","__children","root"],gn=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"]),Tr=new Set(["update","__element"]),lo=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"]),ti=new Set(["node","context","extends","__element","__ref",...lo,...gn,...Tr]),up=new Set(["init","beforeClassAssign","render","renderRouter","attachNode","stateInit","stateCreated","beforeStateUpdate","stateUpdate","beforeUpdate","done","create","complete","frame","update","fetchError","fetchComplete"])});var D_,mn,ft,dp,mt,st,F_,pp,lt,ri,mE,yE,I_,ni,bE,_E,xE,He,wE,SE,$_,ye,N_,j_,B_,U_,V_,L_,ei,M_,oi,hp,gp,qc,mp,yp,si,yn,Gt,Kc,kE,bp,_p,Gc,xp,wp,Sp,kp,vp,Cp,Ep,fr=j(()=>{"use strict";zs();Rt();co();Js();Ws();fo();D_="production",mn=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,ft=(t,e,r,n)=>{if(T(t))return e?typeof t.call!="function"?t:t.call(e,e,r||e.state,n||e.context):void 0;if(t!=null&&e?.context?.plugins&&(O(t)||k(t)&&!qt(t))){let o=e.context.plugins;for(let s of o)if(s.resolveHandler){let i=s.resolveHandler(t,e);if(typeof i=="function")return ft(i,e,r,n)}}return t},dp=(t,e,r)=>{for(let n in e)t[n]=ft(e[n],r)},mt=(t,e,r=[])=>{let n=r instanceof Set;for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(mn(o)||(n?r.has(o):r.includes(o))||t[o]===void 0&&(t[o]=e[o]));return t},st=(t,e,r=ti)=>F_(t,e,r,null),F_=(t,e,r,n)=>{if(t===e)return t;if(n){for(let s=0;s<n.length;s+=2)if(n[s]===t&&n[s+1]===e)return t}let o=r instanceof Set;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||mn(s)||s==="constructor"||s==="prototype"||(o?r.has(s):r.includes(s)))continue;let i=t[s],a=e[s];if(N(i)&&N(a)){let c=n||[];c.push(t,e),F_(i,a,r,c),c.length-=2}else i===void 0&&(t[s]=a)}return t},pp=(t,e=[])=>{let r=e instanceof Set,n={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(mn(o)||(r?e.has(o):e.includes(o))||(n[o]=t[o]));return n},lt=(t,e={})=>{let{exclude:r=[],cleanUndefined:n=!1,cleanNull:o=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!N(t)||qt(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=O(t)?[]:{};s.set(t,l);let f=[[t,l]];for(;f.length;){let[u,d]=f.pop();for(let p in u){if(!Object.prototype.hasOwnProperty.call(u,p)||mn(p)||p==="__proto__"||c(p))continue;let h=u[p];if(!(n&&h===void 0)&&!(o&&h===null)){if(qt(h)){d[p]=h;continue}if(i&&p==="extends"&&O(h)){d[p]=Ks(h,r);continue}if(T(h)){d[p]=h;continue}if(N(h))if(s.has(h))d[p]=s.get(h);else{let g=O(h)?[]:{};s.set(h,g),d[p]=g,f.push([h,g])}else d[p]=h}}}return l},ri=(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 n=t[r];if(T(n))e[r]=n.toString();else if(k(n))e[r]={},ri(n,e[r]);else if(O(n)){let o=e[r]=[];for(let s=0;s<n.length;s++){let i=n[s];k(i)?(o[s]={},ri(i,o[s])):T(i)?o[s]=i.toString():o[s]=i}}else e[r]=n}return e},mE=/^[A-Za-z_$][A-Za-z0-9_$]*$/,yE=t=>`'${String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\r/g,"\\r").replace(/\n/g,"\\n")}'`,I_=t=>{let e=String(t);return Zs(e,[`
4
+ `,"'"])?"`"+e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")+"`":"'"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\r/g,"\\r")+"'"},ni=(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 n=" ".repeat(e),o=`{
5
+ `;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=t[s],a=mE.test(s)?s:yE(s);if(o+=`${n} ${a}: `,i instanceof RegExp)o+=String(i);else if(O(i)){o+=`[
6
6
  `;for(let c of i)c instanceof RegExp?o+=`${n} ${String(c)},
7
- `:N(c)&&c!==null?o+=`${n} ${ei(c,e+2)},
8
- `:S(c)?o+=`${n} ${O_(c)},
7
+ `:N(c)&&c!==null?o+=`${n} ${ni(c,e+2)},
8
+ `:S(c)?o+=`${n} ${I_(c)},
9
9
  `:o+=`${n} ${c},
10
- `;o+=`${n} ]`}else N(i)?o+=ei(i,e+1):S(i)?o+=O_(i):o+=i;o+=`,
11
- `}return o+=`${n}}`,o},uE=[/^\(\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]*\}$/],dE=/^["[{]/,pE=/^(export|import)\s/,He=t=>{if(!t)return!1;let e=t.trim().replace(/\n\s*/g," ").trim();if(e===""||e==="{}"||e==="[]"||pE.test(e)||!uE.some(s=>s.test(e)))return!1;let n=e.charCodeAt(0),o=e.includes("=>");return!(n===123&&!o||n===91||dE.test(e)&&!o)},hE=t=>(0,eval)(t),gE=(t,e)=>{let r=/^(\s*(?:async\s+)?function\s*[\w$]*\s*\([^)]*\)\s*)\{/.exec(t);if(!r)return null;let n=r[0].length,o=[],s=n,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(`
10
+ `;o+=`${n} ]`}else N(i)?o+=ni(i,e+1):S(i)?o+=I_(i):o+=i;o+=`,
11
+ `}return o+=`${n}}`,o},bE=[/^\(\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]*\}$/],_E=/^["[{]/,xE=/^(export|import)\s/,He=t=>{if(!t)return!1;let e=t.trim().replace(/\n\s*/g," ").trim();if(e===""||e==="{}"||e==="[]"||xE.test(e)||!bE.some(s=>s.test(e)))return!1;let n=e.charCodeAt(0),o=e.includes("=>");return!(n===123&&!o||n===91||_E.test(e)&&!o)},wE=t=>(0,eval)(t),SE=(t,e)=>{let r=/^(\s*(?:async\s+)?function\s*[\w$]*\s*\([^)]*\)\s*)\{/.exec(t);if(!r)return null;let n=r[0].length,o=[],s=n,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 p=1;for(;s<c&&p>0;)t[s]==="{"?p++:t[s]==="}"&&p--,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,p=0,h=s;for(;h<c;){let g=t[h];if(g==='"'||g==="'"||g==="`"){let m=g;for(h++;h<c;){if(t[h]==="\\"){h+=2;continue}if(t[h]===m){h++;break}h++}continue}if(g==="("||g==="["||g==="{"){p++,h++;continue}if(g===")"||g==="]"||g==="}"){if(p===0)break;p--,h++;continue}if(p===0&&(g===";"||g===`
13
- `)){h++;break}h++}o.push([d,h]),s=h;continue}s++}if(!o.length)return null;let f=t;for(let u=o.length-1;u>=0;u--)f=f.slice(0,o[u][0])+f.slice(o[u][1]);return f},R_=(t,e,r)=>{let n=String(t).trimStart();if(/^(export|import)\s/.test(n))return t;try{return r.window.eval(`(${t})`)}catch(o){let s=o&&o.message?o.message:String(o),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=gE(l,f);if(!d||d===l)break;l=d;try{c=r.window.eval("("+l+")");break}catch(p){let h=/Identifier '([^']+)' has already been declared/.exec(p&&p.message||String(p));if(!h||h[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)}},me=(t,e={},r={window:{eval:hE}})=>{if(!t||typeof t!="object")return e;let n=[[t,e]];for(;n.length;){let[o,s]=n.pop();for(let i in o){if(!Object.prototype.hasOwnProperty.call(o,i))continue;let a=o[i];if(S(a))He(a)?s[i]=R_(a,`"${i}"`,r):s[i]=a;else if(O(a)){let c=s[i]=[];for(let l=0;l<a.length;l++){let f=a[l];if(S(f))c.push(He(f)?R_(f,`array index ${l} (prop "${i}")`,r):f);else if(k(f)){let u=D_(f);if(u)c.push(u);else{let d={};c.push(d),n.push([f,d])}}else c.push(f)}}else if(k(a)){let c=D_(a);if(c){s[i]=c;continue}let l=s[i]&&typeof s[i]=="object"&&!O(s[i])?s[i]:s[i]={};n.push([a,l])}else s[i]=a}}return e},$_="Set",L_="Map",M_="RegExp",F_="WeakMap",N_="WeakSet",P_=t=>{let e=Object.keys(t);return e.length===1&&e[0]==="__type"},Qs=(t,e)=>{if(!t||typeof t!="object")return t;let r=s=>Qs(s,e||(e=new WeakMap));if(t.__type===$_&&O(t.values))return new Set(t.values.map(r));if(t.__type===L_&&O(t.entries))return new Map(t.entries.map(s=>O(s)?[r(s[0]),r(s[1])]:s));if(t.__type===F_&&P_(t))return new WeakMap;if(t.__type===N_&&P_(t))return new WeakSet;if(t.__type===M_&&S(t.source))try{return new RegExp(t.source,S(t.flags)?t.flags:"")}catch{return t}if(e||(e=new WeakMap),e.has(t))return e.get(t);let n=!1;if(O(t)){let s=new Array(t.length);e.set(t,s);for(let i=0;i<t.length;i++)s[i]=Qs(t[i],e),s[i]!==t[i]&&(n=!0);return n||e.set(t,t),n?s:t}let o={};e.set(t,o);for(let s of Object.keys(t))o[s]=Qs(t[s],e),o[s]!==t[s]&&(n=!0);return n||e.set(t,t),n?o:t},D_=t=>{if(!t||typeof t!="object")return null;let e=t.__type;if(e!==M_&&e!==$_&&e!==L_&&e!==F_&&e!==N_)return null;let r=Qs(t);return r===t?null:r},ri=t=>{if(!t||typeof t!="object")return t;let e={},r=[];for(let i of Object.keys(t)){let a=t[i];S(a)&&He(a)?r.push([i,a]):e[i]=Qs(a)}if(r.length===0)return e;let n=i=>/^[A-Za-z_$][\w$]*$/.test(i),o=r.filter(([i])=>n(i)),s=Object.keys(e).filter(n).map(i=>`var ${i} = __gs__[${JSON.stringify(i)}];`).join(`
13
+ `)){h++;break}h++}o.push([d,h]),s=h;continue}s++}if(!o.length)return null;let f=t;for(let u=o.length-1;u>=0;u--)f=f.slice(0,o[u][0])+f.slice(o[u][1]);return f},$_=(t,e,r)=>{let n=String(t).trimStart();if(/^(export|import)\s/.test(n))return t;try{return r.window.eval(`(${t})`)}catch(o){let s=o&&o.message?o.message:String(o),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=SE(l,f);if(!d||d===l)break;l=d;try{c=r.window.eval("("+l+")");break}catch(p){let h=/Identifier '([^']+)' has already been declared/.exec(p&&p.message||String(p));if(!h||h[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)}},ye=(t,e={},r={window:{eval:wE}})=>{if(!t||typeof t!="object")return e;let n=[[t,e]];for(;n.length;){let[o,s]=n.pop();for(let i in o){if(!Object.prototype.hasOwnProperty.call(o,i))continue;let a=o[i];if(S(a))He(a)?s[i]=$_(a,`"${i}"`,r):s[i]=a;else if(O(a)){let c=s[i]=[];for(let l=0;l<a.length;l++){let f=a[l];if(S(f))c.push(He(f)?$_(f,`array index ${l} (prop "${i}")`,r):f);else if(k(f)){let u=M_(f);if(u)c.push(u);else{let d={};c.push(d),n.push([f,d])}}else c.push(f)}}else if(k(a)){let c=M_(a);if(c){s[i]=c;continue}let l=s[i]&&typeof s[i]=="object"&&!O(s[i])?s[i]:s[i]={};n.push([a,l])}else s[i]=a}}return e},N_="Set",j_="Map",B_="RegExp",U_="WeakMap",V_="WeakSet",L_=t=>{let e=Object.keys(t);return e.length===1&&e[0]==="__type"},ei=(t,e)=>{if(!t||typeof t!="object")return t;let r=s=>ei(s,e||(e=new WeakMap));if(t.__type===N_&&O(t.values))return new Set(t.values.map(r));if(t.__type===j_&&O(t.entries))return new Map(t.entries.map(s=>O(s)?[r(s[0]),r(s[1])]:s));if(t.__type===U_&&L_(t))return new WeakMap;if(t.__type===V_&&L_(t))return new WeakSet;if(t.__type===B_&&S(t.source))try{return new RegExp(t.source,S(t.flags)?t.flags:"")}catch{return t}if(e||(e=new WeakMap),e.has(t))return e.get(t);let n=!1;if(O(t)){let s=new Array(t.length);e.set(t,s);for(let i=0;i<t.length;i++)s[i]=ei(t[i],e),s[i]!==t[i]&&(n=!0);return n||e.set(t,t),n?s:t}let o={};e.set(t,o);for(let s of Object.keys(t))o[s]=ei(t[s],e),o[s]!==t[s]&&(n=!0);return n||e.set(t,t),n?o:t},M_=t=>{if(!t||typeof t!="object")return null;let e=t.__type;if(e!==B_&&e!==N_&&e!==j_&&e!==U_&&e!==V_)return null;let r=ei(t);return r===t?null:r},oi=t=>{if(!t||typeof t!="object")return t;let e={},r=[];for(let i of Object.keys(t)){let a=t[i];S(a)&&He(a)?r.push([i,a]):e[i]=ei(a)}if(r.length===0)return e;let n=i=>/^[A-Za-z_$][\w$]*$/.test(i),o=r.filter(([i])=>n(i)),s=Object.keys(e).filter(n).map(i=>`var ${i} = __gs__[${JSON.stringify(i)}];`).join(`
15
15
  `);try{let i=o.map(([l,f])=>`var ${l} = (${f});`).join(`
16
16
  `),a="{ "+o.map(([l])=>`${JSON.stringify(l)}: ${l}`).join(", ")+" }",c=C.eval(`(function(__gs__) { ${s}
17
17
  ${i}
18
18
  return ${a}; })`)(e);Object.assign(e,c)}catch{for(let[a,c]of o)try{let l=Object.keys(e).filter(n).map(f=>`var ${f} = __gs__[${JSON.stringify(f)}];`).join(`
19
19
  `);e[a]=C.eval(`(function(__gs__) { ${l}
20
- return (${c}); })`)(e)}catch{try{e[a]=C.eval(`(${c})`)}catch{e[a]=c}}}for(let[i,a]of r)if(!n(i))try{e[i]=C.eval(`(${a})`)}catch{e[i]=a}return e},pp=(t,e={verbose:!0})=>{try{return t?C.eval("("+t+")"):{}}catch(r){e.verbose&&console.warn(r)}},hp=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),Hc=t=>{for(let e in t)return!1;return!0},gp=t=>k(t)&&Hc(t),mp=()=>Object.create(null),ni=(t,e,r={})=>{let n=r.exclude||[],o=r.preventUnderscore;for(let s in e)n.includes(s)||!o&&mn(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},yn=(t,e,r=[])=>{let n=r instanceof Set;for(let o in e)mn(o)||o==="constructor"||o==="prototype"||(n?r.has(o):r.includes(o))||(t[o]=e[o]);return t},Gt=(t,e,r={},n=new WeakMap)=>{if(!N(t)||!N(e)||qt(t)||qt(e))return e;if(n.has(t))return n.get(t);n.set(t,t);let o=r.exclude,s=o?o instanceof Set?o:new Set(o):null,i=!r.preventForce;for(let a in e){if(!Object.prototype.hasOwnProperty.call(e,a)||s&&s.has(a)||i&&mn(a)||a==="constructor"||a==="prototype")continue;let c=t[a],l=e[a];qt(l)?t[a]=l:N(c)&&N(l)?t[a]=Gt(c,l,r,n):l!==void 0&&(t[a]=l)}return t},Wc=(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 n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(let s=0;s<n.length;s++){let i=n[s];if(!Object.prototype.hasOwnProperty.call(e,i)||!Wc(t[i],e[i],r))return!1}return!0},mE=new Set(["node","__ref"]),yp=(t,e,r=mE)=>{if(t===e)return!0;if(!N(t)||!N(e)||qt(t)||qt(e))return t===e;let n=r instanceof Set?r:new Set(r),o=new WeakSet;function s(i,a){if(o.has(a))return!0;o.add(a);for(let c in a){if(!Object.prototype.hasOwnProperty.call(a,c)||n.has(c))continue;if(!Object.prototype.hasOwnProperty.call(i,c))return!1;let l=a[c],f=i[c];if(qt(l)||qt(f)){if(l!==f)return!1}else if(N(l)&&N(f)){if(!s(f,l))return!1}else if(l!==f)return!1}return!0}return s(t,e)},bp=(t,e)=>{if(e==null)return t;if(Kt(e)("string","number"))delete t[e];else if(O(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},qc=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]=qc(t[r]));return e},_p=(t,e)=>{if(t.length===0)return e;let r={},n=r;for(let o=0;o<t.length;o++)o===t.length-1&&e?n[t[o]]=e:(n[t[o]]={},n=n[t[o]]);return r},xp=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let o=0;o<e.length-1;o++){if(r[e[o]]===void 0)return;r=r[e[o]]}let n=e[e.length-1];r&&Object.prototype.hasOwnProperty.call(r,n)&&delete r[n]},wp=(t,e,r)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let n=t;for(let o=0;o<e.length-1;o++)(!n[e[o]]||typeof n[e[o]]!="object")&&(n[e[o]]={}),n=n[e[o]];return n[e[e.length-1]]=r,t},Sp=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let n=0;n<e.length;n++){if(r==null)return;r=r[e[n]]}return r},kp=t=>{let r=[],n=0;for(let o=0;o<t.length;o++)if(r.length<2)r.push(t[o]);else if(t[o]===r[o%2]?n++:(r=[t[o-1],t[o]],n=1),n>=20)return(T_==="test"||T_==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",r),!0},vp=t=>{let e=new WeakSet;function r(n){if(n&&typeof n=="object"){if(e.has(n))return!0;e.add(n);for(let o in n)if(Object.prototype.hasOwnProperty.call(n,o)&&r(n[o]))return console.log(n,"cycle at "+o),!0}return!1}return r(t)},Cp=(t,e)=>{let r=e instanceof Set?e:new Set(e),n={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&!r.has(o)&&(n[o]=t[o]);return n}});var oi,si,ii,Kc=j(()=>{"use strict";fr();oi=(function(){let t=0;function e(){return t++,t}return e})(),si=oi,ii=(t,e,r)=>(ft(r,t)||r||t.key||oi()).toString()});var Oe,Ep,Or,Gc,Ap,Tp,Op,Rr,Rp,bn,Et,Pp=j(()=>{"use strict";Oe="production",Ep=Oe,Or=(t=Oe)=>t==="production",Gc=(t=Oe)=>t==="testing"||t==="test",Ap=Gc,Tp=(t=Oe)=>t==="staging",Op=(t=Oe)=>t==="local",Rr=(t=Oe)=>t==="development"||t==="dev"||t==="local",Rp=(t,e=Oe)=>e[t],bn=(t=Oe)=>!Or(t),Et=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 ai(t,e,r){let n;return function(){let o=this,s=arguments,i=function(){n=null,r||t.apply(o,s)},a=r&&!n;clearTimeout(n),n=setTimeout(i,e),a&&t.apply(o,s)}}function $p(t,e=window){let r=function(){return t.apply(e,arguments)};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}var Dp,Ip,yE,ci,fo,uo,At,_n=j(()=>{"use strict";Dp=(t,e,r=300)=>{let n;return(...o)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(t,o)},r)}},Ip=t=>{let e={};return(...r)=>{let n=r[0];if(n in e)return e[n];{let o=t(n);return e[n]=o,o}}},yE=/^\s*(?:async\s+)?(?:function\b|\([^)]*\)\s*=>|[a-zA-Z_$][\w$]*\s*=>)/,ci=t=>yE.test(t),fo=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let r of e)if(r.resolveHandler)return!0;return!1},uo=(t,e)=>{if(typeof t=="function")return t;let r=e?.context?.plugins;if(!r)return t;for(let n of r)if(n.resolveHandler){let o=n.resolveHandler(t,e);if(typeof o=="function")return o}return t},At=(t,e,...r)=>{let n=e?.context?.plugins;if(!n)return!1;let o=!1;for(let s of n)typeof s[t]=="function"&&(s[t](e,...r),o=!0);return o}});var Lp,j_=j(()=>{"use strict";Ot();fr();Lp=(t,e)=>{let{__ref:r}=t,n=t.if;if(A(n)){let o;try{o=n(t,t.state,t.context)}catch(s){typeof console<"u"&&console.warn("[DOMQL] if condition error:",s),delete r.__if;return}o?r.__if=!0:delete r.__if}else n!=null&&typeof n=="object"?ft(n,t)?r.__if=!0:delete r.__if:r.__if=!0}});var Mp,Fp,B_=j(()=>{"use strict";Mp=(t,...e)=>{t&&e.map(r=>console.log(r))},Fp=(t,e,...r)=>{t&&(console.group(e),r.map(n=>console.log(n)),console.groupEnd(e))}});function Vp(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 zp(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 Np,jp,Bp,Up,U_=j(()=>{"use strict";Ot();Us();Np=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),jp=(t,e,r=365)=>{if(Tt(et)||Tt(et.cookie))return;let n=new Date;n.setTime(n.getTime()+r*24*60*60*1e3);let o=`expires=${n.toUTCString()}`;et.cookie=`${t}=${e};${o};path=/`},Bp=t=>{if(Tt(et)||Tt(et.cookie))return;let e=`${t}=`,n=decodeURIComponent(et.cookie).split(";");for(let o=0;o<n.length;o++){let s=n[o];for(;s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return""},Up=t=>{Tt(et)||Tt(et.cookie)||(et.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var po,V_,Hp,Wp=j(()=>{"use strict";po={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"])},V_=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"]),Hp=t=>po.body.has(t)});var qp,z_,ho,ye,go,ui,We,Kp,Yc,di,Gp,pi,Xc,Zc,hi,Jc,mo,bE,qe,H_,li,gi,Yp,fi,Xp,Zp,Qc,tl,el,rl,nl,ol,W_,sl=j(()=>{"use strict";ao();Jp();fr();Ot();qp="production",z_=t=>t.sourcemap!==!1&&qp!=="production",ho=t=>{if(!t)return[];let e=[],r=t.extends;r&&(O(r)?e.push(...r):e.push(r));let n=t.extend;return n&&(O(n)?e.push(...n):e.push(n)),e},ye=t=>{if(!O(t))return t;let e=[];for(let r=t.length-1;r>=0;r--){let n=t[r];e.push(O(n)?ye(n):n)}return e},go=t=>{if(t.includes("+"))return t.split("+").filter(Ke);if(t.includes("_")){let[e]=t.split("_");return[e]}if(t.includes(".")&&!Ke(t.split(".")[1])){let[e]=t.split(".");return[e]}return[t]},ui=(t,e,r)=>{let n=[],o=go(r);o&&(n=[...o]);let s=ye(ho(t));return s.length&&(n=[...n,...s]),n},We=(t,e)=>{let{__ref:r}=e,{__extends:n}=r;if(!t)return n;let o=e.variant,s=e.context;if(o&&s?.components&&!Array.isArray(t)&&typeof t=="string"){let i=`${t}.${o}`;s.components[i]&&(t=i)}return n.includes(t)||(n=Array.isArray(t)?[...n,...t]:[...n,t],r.__extends=n),n},Kp=(t,e)=>{if(!t)return e;let{extends:r}=e,n=O(r)?r:[r],o=O(t)?t:[t];return{...e,extends:so(o,n)}},Yc=()=>Math.random().toString(36).substring(2),di={},Gp={},pi=t=>di[t.__hash],Xc=(t,e)=>{let r=Yc();return S(t)||(t.__hash=r),r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(di[r]=e),e},Zc=(t,e)=>t.__hash?e.concat(pi(t)):Xc(t,e),hi=(t,e,r,n=new Set,o,s)=>{for(let i of t)O(i)?hi(i,e,r,n,o,s):mo(i,e,r,n,o,void 0,s);return e},Jc=(t,e,r,n=new Set,o,s,i)=>{let a=ho(t),c={...t};delete c.extends,delete c.extend;let l=!1;for(let f in c){l=!0;break}return l&&(e.push(c),o&&o.push(s)),a.length&&mo(ye(a),e,r,n,o,s,i),e},mo=(t,e,r,n=new Set,o,s,i)=>{if(!t||n.has(t))return e;if(O(t))return hi(t,e,r,n,o,i);let a=s;return S(t)?(a=t,t=gi(t,r)):i&&k(t)&&i.has(t)&&(a=i.get(t)),n.has(t)||(n.add(t),t?.extends||t?.extend?Jc(t,e,r,n,o,a,i):t&&(e.push(t),o&&o.push(a))),e},bE=new Set(["parent","node","__ref","__proto__","extends","extend","childExtends","childExtendsRecursive"]),qe=(t,e,r,n,o)=>{e=lt(e);for(let s in e){if(bE.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&&n?k(a)&&!O(a)?(r[s]=r[s]||{},H_(r[s],a,n)):r[s]=n:r&&o?.[s]&&(r[s]=o[s]);else if(k(i)&&k(a)){let c=r?r[s]=r[s]||{}:void 0,l=o?.[s];Ke(s)?t[s]=qe(i,a,c,n,l):qe(i,a,c,n,l)}if(s==="extends"||s==="childExtends"||s==="childExtendsRecursive"){if(O(i)&&O(a))t[s]=i.concat(a);else if(O(i)&&k(a)){let c=qe({},i);t[s]=qe(c,a)}}}}return t},H_=(t,e,r,n)=>{if(n||(n=new WeakSet),!n.has(e)){n.add(e);for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o)||o==="__proto__"||o==="constructor"||o==="prototype")continue;let s=e[o];k(s)&&!O(s)?(t[o]=t[o]||{},H_(t[o],s,r,n)):t[o]=r}}},li=(t,e,r)=>t.reduce((n,o,s)=>{let i=lt(o),a=r?r[s]:void 0;return qe(n,i,e,a)},{}),gi=(t,e,r={},n)=>{let o=e?.components||r.components,s=e?.pages||r.pages;if(S(t)){let i=o&&(o[t+"."+n]||o[t]||o["smbls."+t]),a=s&&t.charCodeAt(0)===47&&s[t];if(i)return i;if(a)return a;r.verbose&&(qp==="test"||qp==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},Yp=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),fi=(t,e,r,n)=>{if(!t)return[];if(t.__hash)return pi(t)||[];let s=mo(t,[],e,new Set,r,void 0,n);return r?s:Zc(t,s)},Xp=(t,e)=>{if(!t)return e;let r=O(t)?t:[t];return so(r,e)},Zp=t=>{let e=[];function r(n){for(let o in n)Object.prototype.hasOwnProperty.call(n,o)&&(Ke(o)&&e.push(o),o==="extends"&&(typeof n[o]=="string"?e.push(n[o]):Array.isArray(n[o])&&(e=e.concat(n[o]))),typeof n[o]=="object"&&n[o]!==null&&r(n[o]))}return r(t),e},Qc=(t,e,r={})=>{let{__ref:n}=t,o=t.context||e.context,s=t.variant,i=ho(t);if(i.length){let a=ye(i),[c,...l]=a,f=typeof c=="string"&&s&&o?.components?`${c}.${s}`:null;f&&o.components[f]?We([f,...l],t):We(a,t)}return tl(t,e,r),el(t,e,r),rl(t,e,r),t.component&&We(ye(ft(t.component,t)),t),o.defaultExtends&&We(ye(o.defaultExtends),t),io(n.__extends)},tl=(t,e,r={})=>{let{__ref:n}=t;return r.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&We(ye(e.childProps.extends),t),n.__extends},el=(t,e,r={})=>{let{__ref:n}=t,o=r.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!o&&s&&We(ye(s),t),n.__extends},rl=(t,e,r={})=>{let{__ref:n}=t,o=e.childExtendsRecursive,s=r.ignoreChildExtendsRecursive||t.ignoreChildExtendsRecursive,i=t.key==="__text";return o&&!i&&!s&&We(ye(o),t),n.__extends},nl=(t,e,r={})=>{let{__ref:n}=t,o=t.context||e.context,s=t.variant,i=z_(r),a=i?[...n.__extends]:null,c=io(n.__extends.map((l,f)=>gi(l,o,r,f===0&&s)));if(i){let l=new WeakMap;for(let d=0;d<c.length;d++){let p=c[d],h=a[d];p&&k(p)&&S(h)&&l.set(p,h)}let f=[],u=fi(c,o,f,l);n.__extendsStack=u,n.__extendsNames=f}else{let l=fi(c,o);n.__extendsStack=l}return n.__extendsStack},ol=(t,e,r={})=>{let{__ref:n}=t,{__extendsStack:o}=n;if(z_(r)){let s={},i=n.__extendsNames||[],a=li(o,s,i),c={};qe(t,a,c,void 0,s),n.__sourcemap=c}else{let s=li(o);qe(t,s)}return t},W_=(t,e,r={})=>(Qc(t,e,r),nl(t,e,r),ol(t,e,r),t)});function Qp(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function th(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function eh(t,e,r){let{context:n}=e||{},[o]=go(r),s=r||o;return n?.components?.[s]||n?.pages?.[s]}var Ke,Jp=j(()=>{"use strict";sl();Ot();Ke=t=>{if(!S(t)||!t.length)return!1;let e=t.charCodeAt(0);return e>=65&&e<=90}});function q_(t,e){let{props:r,on:n}=e,o=hn(t.split("on")[1]),s=n[o],i=r[t];A(s)?n[o]=(...a)=>{if(s(...a)!==!1&&A(i))return i(...a)}:n[o]=i}var K_=j(()=>{"use strict";Xs();Ot()});function il(t,e={}){let r=e.cachedKeys||[];for(let n in t){let o=t[n];if(n.length>2&&n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n[2]===n[2].toUpperCase()&&(A(o)||o!=null&&fo(this.context))){let h=hn(n.slice(2));t.on&&(t.on[h]=o),delete t[n];continue}if(n==="childProps"){t.props[n]=o,delete t[n],r.push(n);continue}let a=this.define?.[n],c=this.context?.define?.[n],l=k(a)||A(a),f=k(c)||A(c);if(l||f)continue;let u=n.charAt(0);if(Y_.has(u)){t.props[n]=o,delete t[n],r.push(n);continue}let d=rh.test(n)||G_.test(n)||xE(o),p=Ar.has(n);!d&&!p&&(n in t.props||(t.props[n]=o),delete t[n],r.push(n))}return t}function al(t=this,e){let r=e.cachedKeys||[];for(let n in t.props){let o=t.props[n],s=n.length>2&&n.charCodeAt(0)===111&&n.charCodeAt(1)===110,i=A(o)||o!=null&&fo(this.context);if(s&&i){q_(n,t),delete t.props[n];continue}if(r.includes(n)||n==="childProps")continue;let a=n.charAt(0);if(Y_.has(a))continue;let c=this.define?.[n],l=this.context?.define?.[n],f=k(c)||A(c),u=k(l)||A(l),d=rh.test(n)||G_.test(n),p=Ar.has(n);(d||p||f||u)&&(t[n]===void 0||o===null)&&(t[n]=o,t.props&&delete t.props[n])}return t}function cl(t=this){let e=[];return il.call(this,t,{cachedKeys:e}),al.call(this,t,{cachedKeys:e}),t}function nh(t={}){return t.on||(t.on={}),t.props||(t.props={}),cl.call(this,t)}function sh(t,e){this.__element.update({props:t},e)}function xi(t){let e={update:sh.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var rh,G_,Y_,_E,xE,bi,mi,oh,_i,wi,Si,ll,yi,ih,ah,ch=j(()=>{"use strict";lo();K_();fr();Ot();Xs();_n();rh=/^[A-Z]/,G_=/^\d+$/,Y_=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),_E=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),xE=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if(_E.has(e)||rh.test(e))return!0;return!1},bi=(t,e,r)=>{let{props:n,__ref:o}=t;if(o.__propsStack=[],n)o.__initialProps=n;else return{};return N(n)?{...n}:(o.__propsStack.push(n),{})};mi=t=>Kt(t)("string","number")?{inheritedString:t}:t,oh=(t,e)=>!t||!e.length?!1:e.includes(t),_i=(t,e)=>{let{__ref:r}=t,n=r.__propsStack||[],o=e.props;if(!o)return n;let s=o[t.key],i=o.childProps||e.childProps,a=t.props?.ignoreChildProps;if(i&&!a){let c=mi(i);n.unshift(c)}if(s){let c=mi(s);n.unshift(c)}return n};wi=t=>{let e=new Set;return t.filter(r=>!r||Tr.has(r)||e.has(r)?!1:(e.add(r),!0))},Si=(t,e,r)=>(e.props=t.reduce((n,o)=>{if(Tr.has(o))return n;for(;A(o);)o=ft(o,e);return ot(n,lt(o,{exclude:Tr}))},{}),xi(e),e.props),ll=(t,e)=>{let{props:r,__ref:n}=t,o=n.__propsStack||[];if(e?.props&&(o=[..._i(t,e)]),k(r)?o.push(r):r==="inherit"&&e?.props?o.push(e.props):r&&o.push(r),O(n.__extendsStack))for(let s=0;s<n.__extendsStack.length;s++){let i=n.__extendsStack[s];i.props&&i.props!==r&&o.push(i.props)}return n.__propsStack=wi(o),n.__propsStack},yi=(t,e)=>{let{__ref:r}=t,n=ll(t,e);n.length?Si(n,t):(r.__propsStack=[],t.props={})},ih=function(t,e,r){let{__ref:n}=t;if(n.__if)yi(t,e);else try{yi(t,e)}catch(o){t.context?.designSystem?.verbose&&console.warn("initProps error at",n.path?.join("."),o),t.props={},n.__propsStack=[]}return xi(t),t},ah=(t,e,r)=>{let{__ref:n}=e,s=[...n.__propsStack||[]],i=_i(e,r);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),n.__propsStack=wi(s),n.__propsStack.length&&Si(n.__propsStack,e),e}});var X_,fl,ul,dl,pl,lh,hl,gl,ml,fh,Z_=j(()=>{"use strict";sl();Kc();zs();ch();Wp();Ot();X_="production",fl=(t,e,r)=>{let n=e.childExtends&&e.childExtends.tag,o=e.childProps&&e.childProps.tag,s=po.body.has(r)&&r;return{text:t,tag:n||o||s||"string"}},ul=(t,e,r)=>{if(t===void 0)return(X_==="test"||X_==="development")&&console.warn(r,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:Kt(t)("string","number")?fl(t,e,r):A(t)?{props:t}:t},dl=(t,e)=>{let r={};return r.origin=t,r.parent=e,r},pl=(t,e,r,n,o)=>{if(!e)return o;if(lr(e)){let s={key:":root",node:e};return o[`${r}_parent`]=s,s}return e},lh=(t,e)=>{let{__ref:r}=t,{__ref:n}=e,o=e&&e.key===":root";r?.root||(r.root=o?t:n?.root)},hl=(t,e,r)=>{let{__ref:n}=e;return n||(n=e.ref={}),n.path||(n.path=[]),n.path.concat(r)},gl=(t,e,r,n,o)=>(n.context&&!o.context&&!t.context&&(o.context=n.context),n.context||e.context||o.context||t.context),ml=(t,e,r)=>{let n=dl(t,e);return t.__ref=n,n.__defineCache||(n.__defineCache={}),n.__exec||(n.__exec={}),n.__execProps||(n.__execProps={}),n.__class||(n.__class={}),n.__classNames||(n.__classNames={}),n.__attr||(n.__attr={}),n.__changes||(n.__changes=[]),n.__children||(n.__children=[]),n.__extends=ui(t,e,r),n.path=hl(t,e,r),n},fh=(t,e,r,n,o)=>{let i=t?.__hash?{extends:[t]}:ul(t,e,r);if(!i)return;let a=pl(i,e,r,n,o),c=ii(i,a,r);ml(i,a,c);let l=bi(i,a,c),f=gl(i,a,c,n,o),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var uh,yl,bl,_l,xl,dh,wl,ph,hh,gh,mh,J_,ki,ur,Ge,Q_=j(()=>{"use strict";ao();lo();fr();Ot();uh=t=>{let{state:e,props:r,__ref:n}=t,o=r?.state||e;return Kt(o)("string","number")?(n.__state=o,{value:o}):o===!0?(n.__state=t.key,{}):o?(n.__hasRootState=!0,o):!1},yl=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},bl=(t,e)=>{if(!t.includes("../"))return;let n=t.split("../").length-1;for(let o=0;o<n;o++){if(!e.parent)return null;e=e.parent}return e},_l=(t,e,r={})=>{let n=S(t)?t.split("/"):[t],o=n.length-1;for(let s=0;s<o;s++){let i=n[s],a=n[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]},xl=(t,e,r={})=>{let o=t.__ref.__state;if(!wl(t))return;let s=yl(o,e.state),i=e.state;if(s)i=s,o=o.replaceAll("~/","");else{let a=bl(o,e.state);a&&(i=a,o=o.replaceAll("../",""))}if(i)return _l(o,i,r)},dh=(t,e)=>{let r=t.__ref,n=xl(t,e);if(n===void 0)return t.state;if(Kt(n)("object","array"))return lt(n);if(Kt(n)("string","number","boolean"))return r.__stateType=typeof n,{value:n};console.warn(r.__state,"is not present. Replacing with",{})},wl=t=>{let{__ref:e}=t,r=e?.__state;return!!(r&&Kt(r)("number","string","boolean"))},ph=function(t){return N(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},hh=(t,e)=>{if(!t)return e||{};let r=t.split("/"),n={},o=n,s=r.length-1;for(let i=0;i<=s;i++)o[r[i]]=i===s?e||{}:{},o=o[r[i]];return n},gh=(t,e)=>{let{__element:r}=e,n=r?.state;if(!n)return;let o=lt(n,gn),s={[t.key]:o},i=k(n.__depends)?{...n.__depends,...s}:s;return Array.isArray(n)?Ks(n,{...Object.getPrototypeOf(n),__depends:i}):Object.setPrototypeOf(n,{...Object.getPrototypeOf(n),__depends:i}),o},mh=(t,e,r={})=>{let{overwrite:n}=r;if(!n)return;let o=n==="shallow";if(n==="merge"){ot(t,e,gn);return}(o?yn:Gt)(t,e,gn)},J_="__polyglotSeededKeys",ki=t=>{if(!k(t))return new Set;let e=t[J_];if(!(e instanceof Set)){e=new Set;try{Object.defineProperty(t,J_,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},ur=(t,e,r)=>ki(t).has(e)?!0:!k(r)||r[e]===void 0,Ge=(t,e)=>(ki(t).add(e),e)});var wE,yh,tx=j(()=>{"use strict";wE=(t,e)=>{let r=e;for(;r;){if(r===t)return!0;r=Object.getPrototypeOf(r)}return!1},yh=(t,e)=>{let{__ref:r}=t,n=t.context||e.context||r.root?.context;n&&!n.globalScope&&(n.globalScope={});let o=e.scope||r.root?.scope,s=n?.globalScope;if(!t.scope)o?t.scope=o: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=o||s;i&&!wE(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var ex,Sl,Pr,kl,bh,_h=j(()=>{"use strict";Ot();_n();ex=(t,e)=>{let r="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[r]},Sl=(t,e,r,n,o)=>{if(t=uo(t,e),!!A(t))try{let s=t.call(e,e,r||e.state,n||e.context,o);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}},Pr=(t,e,r)=>{if(!e)throw new Error("Element is required");At(t,e,r);let n=ex(t,e);if(n){let{state:o,context:s}=e;return Sl(n,e,o,s,r)}},kl=(t,e,r,n,o,s)=>{if(t=uo(t,r),!!A(t))try{let i=t.call(r,e,r,n||r.state,o||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}},bh=(t,e,r,n)=>{At(t,r,e,n);let o=ex(t,r);if(o){let{state:s,context:i}=r;return kl(o,e,r,s,i,n)}}});var xh,vi,wh=j(()=>{"use strict";xh={},vi={}});var nx={};I(nx,{restAdapter:()=>rx,setup:()=>kE});var SE,dr,kE,rx,ox=j(()=>{"use strict";SE=(t,e,r)=>{let n=e&&!e.startsWith("/")?"/":"",o=new URL(`${t}${n}${e}`);if(r)for(let s in r){let i=r[s];i!=null&&o.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return o.toString()},dr=async(t,e)=>{let r=await globalThis.fetch(t,e),n=r.headers.get("content-type"),o=n&&n.includes("json")?await r.json():await r.text();return{data:o,error:r.ok?null:o?.message||o?.error||r.statusText,status:r.status}},kE=async({url:t,headers:e,auth:r,fetchOptions:n})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return rx(t,e,r,n)},rx=(t,e={},r,n={})=>{let o=r?.token||null,s=f=>{let u={...e,...f};return o&&(u.Authorization=`Bearer ${o}`),u},i=f=>({...s(f),"Content-Type":"application/json"}),a=f=>({...n,...f}),c=(f,u)=>{let d=u||t;if(f&&(f.startsWith("http://")||f.startsWith("https://")))return f;let p=f&&!f.startsWith("/")?"/":"";return`${d}${p}${f||""}`};return{name:"rest",setToken:f=>{o=f},getSession:async()=>{if(!r?.sessionUrl)return o?{token:o}:null;let f=await dr(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 dr(c(r.signInUrl,r.baseUrl),a({method:"POST",headers:i(),body:JSON.stringify(f)}));return u.data?.token&&(o=u.data.token),u},signOut:async()=>(r?.signOutUrl&&await dr(c(r.signOutUrl,r.baseUrl),a({method:"POST",headers:s()})),o=null,{error:null}),select:({from:f,params:u,select:d,limit:p,offset:h,order:g,single:m,headers:b,baseUrl:_})=>{let y={...u};return d&&(y.select=d),p&&(y.limit=p),h&&(y.offset=h),m&&(y.single=!0),g&&(typeof g=="string"?y.order=g:Array.isArray(g)?y.order=g.map(x=>`${x.by}:${x.asc===!1?"desc":"asc"}`).join(","):g.by&&(y.order=`${g.by}:${g.asc===!1?"desc":"asc"}`)),dr(SE(_||t,f||"",y),a({headers:s(b)}))},rpc:({from:f,params:u,headers:d,baseUrl:p})=>dr(c(`rpc/${f}`,p),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),insert:({from:f,data:u,headers:d,baseUrl:p})=>dr(c(f,p),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),update:({from:f,data:u,params:d,method:p,headers:h,baseUrl:g})=>{let m=d?.id||u?.id,b=m?`${f}/${m}`:f;return dr(c(b,g),a({method:p||"PATCH",headers:i(h),body:JSON.stringify(u)}))},upsert:({from:f,data:u,params:d,method:p,headers:h,baseUrl:g})=>{let m=d?.id||u?.id,b=m?`${f}/${m}`:f;return dr(c(b,g),a({method:p||"PUT",headers:i(h),body:JSON.stringify(u)}))},delete:({from:f,params:u,headers:d,baseUrl:p})=>{let h=u?.id,g=h?`${f}/${h}`:f;return dr(c(g,p),a({method:"DELETE",headers:s(d)}))}}}});var ix={};I(ix,{localAdapter:()=>sx,setup:()=>CE});var vl,vE,CE,sx,ax=j(()=>{"use strict";vl=(t,e)=>{if(!e)return!0;for(let r in e){let n=e[r];if(n===null){if(t[r]!==null&&t[r]!==void 0)return!1}else if(Array.isArray(n)){if(!n.includes(t[r]))return!1}else if(typeof n=="object"){for(let o in n)if(o==="gt"&&!(t[r]>n[o])||o==="gte"&&!(t[r]>=n[o])||o==="lt"&&!(t[r]<n[o])||o==="lte"&&!(t[r]<=n[o])||o==="neq"&&t[r]===n[o]||o==="like"&&!String(t[r]).includes(n[o]))return!1}else if(t[r]!==n)return!1}return!0},vE=(t,{order:e,limit:r,offset:n,single:o})=>{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 n&&(s=s.slice(n)),r&&(s=s.slice(0,r)),o?{data:s[0]||null,error:null}:{data:s,error:null}},CE=async({data:t,...e})=>sx(t,e),sx=(t={},e={})=>{let r={},n={},o=e.persist!==!1&&typeof localStorage<"u",s=e.prefix||"smbls_db_",i=f=>{if(!r[f])if(o)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(o)try{localStorage.setItem(s+f,JSON.stringify(r[f]))}catch{}},c=(f,u,d,p)=>{let h=n[f];if(h)for(let g of h)g(d,p,{event:u,table:f})},l=Date.now();return{name:"local",store:r,select:async({from:f,params:u,...d})=>{let h=i(f).filter(g=>vl(g,u));return vE(h,d)},insert:async({from:f,data:u})=>{let d=i(f),h=(Array.isArray(u)?u:[u]).map(g=>{let m={id:g.id||++l,...g};return d.push(m),m});a(f);for(let g of h)c(f,"INSERT",g,null);return{data:Array.isArray(u)?h:h[0],error:null}},update:async({from:f,data:u,params:d})=>{let p=i(f),h=[];for(let g=0;g<p.length;g++)if(vl(p[g],d)){let m={...p[g]};Object.assign(p[g],u),h.push(p[g]),c(f,"UPDATE",p[g],m)}return a(f),{data:h,error:null}},upsert:async({from:f,data:u,params:d})=>{let p=i(f),h=Array.isArray(u)?u:[u],g=[];for(let m of h){let b=d||(m.id!==void 0?{id:m.id}:null),_=b?p.findIndex(y=>vl(y,b)):-1;if(_>-1){let y={...p[_]};Object.assign(p[_],m),g.push(p[_]),c(f,"UPDATE",p[_],y)}else{let y={id:m.id||++l,...m};p.push(y),g.push(y),c(f,"INSERT",y,null)}}return a(f),{data:Array.isArray(u)?g:g[0],error:null}},delete:async({from:f,params:u})=>{let d=i(f),p=[];for(let h=d.length-1;h>=0;h--)vl(d[h],u)&&(p.push(d[h]),d.splice(h,1),c(f,"DELETE",null,p[p.length-1]));return a(f),{data:p,error:null}},subscribe:({from:f,on:u},d)=>{n[f]||(n[f]=[]);let p=(h,g,m)=>{u&&u!=="*"&&u!==m.event||d(h,g,m)};return n[f].push(p),()=>{let h=n[f].indexOf(p);h>-1&&n[f].splice(h,1)}}}}});var wn={};I(wn,{createAdapter:()=>PE,default:()=>UE,executeFetch:()=>Pi,fetchPlugin:()=>Th,initAdapterAuth:()=>Ol,parseDuration:()=>Ei,queryClient:()=>BE,registerAdapter:()=>RE,resolveDb:()=>ux});var EE,AE,Cl,Ci,El,vh,TE,OE,RE,PE,ux,Ei,zt,dx,yo,DE,Ri,Ai,Ti,Al,Eh,Tl,IE,cx,Sh,px,hx,bo,lx,$E,fx,LE,Rl,Ch,gx,Ol,Ah,be,Re,Oi,xn,Ye,Dr,ME,FE,NE,kh,jE,Pi,BE,Th,UE,Ir=j(()=>{"use strict";P();EE=["select","rpc","insert","update","upsert","delete","subscribe"],AE={rest:()=>Promise.resolve().then(()=>(ox(),nx)),local:()=>Promise.resolve().then(()=>(ax(),ix))},Cl=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),Ci=(()=>{if(typeof globalThis<"u"&&globalThis[Cl])return globalThis[Cl];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Cl,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Cl]}catch{}return t})(),El=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),vh=(()=>{if(typeof globalThis<"u"&&globalThis[El])return globalThis[El];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,El,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[El]}catch{}return t})(),TE=5e3,OE=t=>new Promise(e=>{if(Ci[t])return e(Ci[t]);let r=vh[t]||=[],n=!1,o=()=>{n||(n=!0,e(Ci[t]||null))};r.push(o),setTimeout(o,TE)}),RE=(t,e)=>{Ci[t]=e;let r=vh[t];if(r&&r.length){vh[t]=[];for(let n of r)n()}},PE=t=>{let e={};for(let r of EE)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},ux=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...r}=t,n=typeof e=="string"?e:typeof t=="string"?t:null;if(!n)return null;let o=Ci[n]||AE[n];if(!o&&(o=await OE(n),!o))throw new Error(`Unknown db adapter: "${n}". Use registerAdapter() for adapters with optional deps.`);let s=await o();if(!s||typeof s.setup!="function")throw new Error(`Adapter "${n}" loader returned a module without a setup() function. Got keys: [${Object.keys(s||{}).join(", ")}]. Likely a bundler chunk-resolution issue.`);return s.setup(r)},Ei=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]),n=e[2];return n==="ms"?r:n==="s"?r*1e3:n==="m"?r*6e4:n==="h"?r*36e5:0},zt=new Map,dx=new Map,yo=new Map,DE=(t,e,r)=>{if(t.cache?.key)return t.cache.key;let n=LE(t.params),o=r?`${r}:`:"",s=`${t.from}:${t.method}:${o}${JSON.stringify(n||"")}`;return e?`${s}:${e}`:s},Ri=t=>zt.get(t)||null,Ai=(t,e,r)=>{let n=zt.get(t),o={data:e,error:r,time:Date.now(),stale:!1};zt.set(t,o);let s=dx.get(t);if(s)for(let i of s)A(i)&&i(o);return o},Ti=t=>{if(t){let e=zt.get(t);e&&(e.stale=!0);return}for(let[,e]of zt)e.stale=!0},Al=t=>{if(t){zt.delete(t);return}zt.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)}:S(t)?{staleTime:Ei(t),gcTime:3e5}:{staleTime:Ei(t.stale||t.staleTime)||6e4,gcTime:Ei(t.gc||t.gcTime||t.expire)||3e5,key:t.key},Tl=null,IE=()=>{Tl||(Tl=setInterval(()=>{let t=Date.now();for(let[e,r]of zt){let n=dx.get(e);!(n&&n.size>0)&&t-r.time>(r.gcTime||3e5)&&zt.delete(e)}},3e4),Tl.unref&&Tl.unref())};IE();cx=3,Sh=t=>Math.min(1e3*2**t,3e4),px=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:cx,delay:Sh}:typeof e=="number"?{count:e,delay:Sh}:{count:e.count??cx,delay:A(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:Sh}},hx=async(t,e)=>{let{count:r,delay:n}=e,o;for(let s=0;s<=r;s++)try{let i=await t();if(i?.error){if(o=i.error,s<r){let a=A(n)?n(s,o):n;await new Promise(c=>setTimeout(c,a));continue}return i}return i}catch(i){if(o=i,s<r){let a=A(n)?n(s,i):n;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:o}},bo={focus:new Set,online:new Set},lx=!1,$E=()=>{if(lx||typeof window>"u")return;lx=!0;let t=()=>{for(let r of bo.focus)r()},e=()=>{for(let r of bo.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},fx=(t,e)=>{let r=e.__ref;if(t===!0)return{from:r.__state||e.key,method:"select",query:!0,on:"create"};if(S(t))return{from:t,method:"select",query:!0,on:"create"};if(k(t)){let n={...t};return n.from=n.from||r.__state||e.key,n.method=n.method||"select",n.on=n.on||"create",n.query===void 0&&(n.query=!0),n}return null},LE=t=>(!t||A(t),t),Rl=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},Ch=(t,e)=>{let n=(t?.state?.root||e?.state?.root)?.__fetchScope;return n?String(n):void 0},gx=(t,e,r)=>{let n;if(!t)n=void 0;else if(A(t))n=t(e,e.state);else{n={};for(let o in t){let s=t[o];n[o]=A(s)?s(e,e.state):s}}return n},Ol=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let r=(n,o)=>{let s=e.state?.root;s?.update&&s.update({auth:{user:n,session:o,loading:!1}})};try{let n=await t.getSession();r(n?.user||null,n)}catch(n){console.warn("[fetch] Failed to restore auth session:",n.message)}t.onAuthStateChange&&t.onAuthStateChange((n,o)=>{r(o?.user||null,o)})},Ah=async(t,e)=>{if(A(t.select))return t.auth!==!1&&await Ol(t,e),t;if(t.__resolved)return t.auth!==!1&&await Ol(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=ux(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 Ol(r,e),r):null},be=(t,e,...r)=>{let n=A(t[e])?t[e]:null;n&&n.call(t,...r,t,t.state,t.context)},Re=(t,e,r,...n)=>{let o=t&&A(t[r])?t[r]:null;o&&o.call(e,...n,e,e.state,e.context)},Oi=t=>{let e={},r=t.node;if(!r)return e;if(r.tagName==="FORM"){let o=new FormData(r);for(let[s,i]of o.entries())e[s]=i;return e}let n=r.querySelectorAll("input, textarea, select");for(let o=0;o<n.length;o++){let s=n[o],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},xn=(t,e,r,n={})=>{let o=r&&r.startsWith("~/"),s=o&&t.state?.root||t.state;if(s?.update)if(o){let i=r.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&i in e?s.update(e,{preventFetch:!0,...n}):s.update({[i]:e},{preventFetch:!0,...n})}else{let i=r?{[r]:e}:e;s.update(i,{preventFetch:!0,...n})}},Ye=(t,e)=>{let r=t?.__ref;r&&(r.__fetchStatus=e,r.__fetching=e.isFetching,r.__fetchError=e.error)},Dr=async(t,e,r,n={})=>{let o=r?.fetch;if(!o||!e||!e.__ref)return;let s=e.__ref,i=Ch(e,r);(!s.__fetchScopeOwner||s.__fetchScopeOwner.scope!==i)&&(s.__fetchScopeOwner={scope:i});let a=s.__fetchScopeOwner,c=()=>e.__ref===s&&s.__fetchScopeOwner===a&&Ch(e,r)===i;if(t.enabled===!1||A(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||A(t.skip)&&t.skip(e,e.state))return;let l=await Ah(o,r);if(!l||!c())return;let{from:f,method:u,query:d,params:p,cache:h,transform:g,single:m,auth:b,fields:_,as:y,limit:x,offset:w,order:v,headers:D,baseUrl:L,page:T,cursor:R,getNextPageParam:V,getPreviousPageParam:Bt,infinite:z,placeholderData:H,initialData:nt,select:B,keepPreviousData:Z}=t,Lt=S(B)?B:void 0;if(d&&A(e.getQuery)){let at=e.getQuery(l.name||"paths");at&&(Lt=at.select||at.length&&at.join(",")||Lt)}let W=gx(p,e,r),yt=Eh(h),F=px(t),J=Rl(e,r),wt=J?`:${J}`:"",G=i?`${i}:`:"",$=yt?h?.key||`${f}:${u}:${G}${JSON.stringify(W||"")}${z?":infinite":""}${T?":p"+JSON.stringify(T):""}${wt}`:null;if(!s.__fetchInitialized&&$&&(s.__fetchInitialized=!0,nt!==void 0)){let at=A(nt)?nt():nt;Ai($,at,null)}if((u==="select"||u==="rpc")&&$&&yt){let at=Ri($);if(at&&!at.error){let Q=Date.now()-at.time,kt=at.stale||Q>(yt.staleTime||0),q=at.data;if(A(B)&&(q=B(q,e,e.state)),g&&(q=g(q,e,e.state)),!c())return;if(xn(e,q,y),!kt){Ye(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(H!==void 0){let Q=A(H)?H(e,e.state):H;Q!==void 0&&xn(e,Q,y)}}if($&&yo.has($)&&!n.force){let at=yo.get($);try{let Q=await Promise.race([at,new Promise((kt,q)=>setTimeout(()=>q("DEDUP_TIMEOUT"),15e3))]);if(!c())return;if(Q?.data!==void 0){let kt=Q.data;if(A(B)&&(kt=B(kt,e,e.state)),g&&(kt=g(kt,e,e.state)),!c())return;xn(e,kt,y),be(e,"onFetchComplete",kt),Re(t,e,"onFetchComplete",kt)}}catch{if(!c())return}return}let St=!Ri($)?.data;Ye(e,{isFetching:!0,isLoading:St,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),be(e,"onFetchStart"),Re(t,e,"onFetchStart");let it=r?.analyze?.emitNetwork,Be=it?typeof performance<"u"?performance.now():Date.now():0;it&&it({phase:"start",mode:"query",from:f,method:u,cacheKey:$,lang:J});let Mt=hx(async()=>{if(!c())return;if(b!==!1&&l.auth!==!1&&l.getSession){let q=await l.getSession();if(!c())return;if(b===!0&&!q){let Ut={message:"Not authenticated"};return Ye(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:Ut,status:"error",fetchStatus:"idle"}),be(e,"onFetchError",Ut),Re(t,e,"onFetchError",Ut),{data:null,error:Ut}}}let at=l[u];if(!A(at))return{data:null,error:{message:`Method "${u}" not found on adapter`}};let Q={from:f,select:Lt,params:W,single:m,limit:x,offset:w,order:v,headers:D,baseUrl:L},kt=Rl(e,r);if(kt&&(Q.headers={...Q.headers,"Accept-Language":kt}),T!==void 0){if(k(T))T.offset!==void 0&&(Q.offset=T.offset),T.limit!==void 0&&(Q.limit=T.limit),T.cursor!==void 0&&(Q.params={...Q.params,cursor:T.cursor});else if(typeof T=="number"){let q=t.pageSize||x||20;Q.offset=(T-1)*q,Q.limit=q}}if(R!==void 0&&(Q.params={...Q.params,cursor:R}),u==="insert"||u==="update"||u==="upsert"){let q;if(_===!0||t.on==="submit")q=Oi(e);else if(O(_)){let Ut=Oi(e);q={};for(let xd of _)q[xd]=Ut[xd]}else e.state?.parse?q=e.state.parse():k(e.state)&&(q={...e.state});g&&(q=g(q,e,e.state)),Q.data=q}if(u==="rpc"){let q=W;if(t.on==="submit"){let Ut=Oi(e);q=t.transformParams?t.transformParams(Ut,e,e.state):Ut}Q.params=q}if(u==="subscribe"){let q=l.subscribe({from:f,params:W,on:t.subscribeOn},(Ut,xd,bD)=>{c()&&(xn(e,Ut,y),be(e,"onFetchComplete",Ut),Re(t,e,"onFetchComplete",Ut))});return c()?(s.__unsubscribe=q,{data:null,error:null,subscribed:!0}):(A(q)&&q(),{data:null,error:null,subscribed:!0})}return at(Q)},F);$&&yo.set($,Mt);try{let at=await Mt;if(!c()||at?.subscribed)return;let{data:Q,error:kt}=at||{};if(kt){$&&Ai($,null,kt),Ye(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:kt,status:"error",fetchStatus:"idle"}),be(e,"onFetchError",kt),Re(t,e,"onFetchError",kt),it&&it({phase:"error",mode:"query",from:f,method:u,cacheKey:$,error:kt.message||kt,durationMs:(typeof performance<"u"?performance.now():Date.now())-Be});return}if(Q!==void 0){if((u==="select"||u==="rpc")&&$){let Ut=Ai($,Q,null);Ut.gcTime=yt?.gcTime||3e5}let q=Q;if(z&&O(Q)&&(s.__pages||(s.__pages=[]),n.direction==="previous"?s.__pages.unshift(Q):s.__pages.push(Q),q=s.__pages.flat(),V&&(s.__nextPageParam=V(Q,s.__pages),s.__hasNextPage=s.__nextPageParam!=null),Bt&&(s.__prevPageParam=Bt(Q,s.__pages),s.__hasPreviousPage=s.__prevPageParam!=null)),A(B)&&(q=B(q,e,e.state)),g&&(q=g(q,e,e.state)),!c())return;(!Z||q!==void 0)&&xn(e,q,y),Ye(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),be(e,"onFetchComplete",q),Re(t,e,"onFetchComplete",q),it&&it({phase:"success",mode:"query",ok:!0,from:f,method:u,cacheKey:$,durationMs:(typeof performance<"u"?performance.now():Date.now())-Be})}}catch(at){if(!c())return;Ye(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:at,status:"error",fetchStatus:"idle"}),be(e,"onFetchError",at),Re(t,e,"onFetchError",at),it&&it({phase:"error",mode:"query",from:f,method:u,cacheKey:$,error:at.message||String(at),durationMs:(typeof performance<"u"?performance.now():Date.now())-Be})}finally{$&&yo.get($)===Mt&&yo.delete($)}},ME=(t,e,r)=>{let n=t.on,o=e.__ref;o.__fetchListeners||(o.__fetchListeners=[]);let s=t.__runner||Dr;if(n==="submit"){let i=c=>{c.preventDefault(),s(t,e,r)},a=e.node;a&&(a.addEventListener("submit",i),o.__fetchListeners.push(()=>a.removeEventListener("submit",i)))}else if(n==="click"){let i=()=>s(t,e,r),a=e.node;a&&(a.addEventListener("click",i),o.__fetchListeners.push(()=>a.removeEventListener("click",i)))}else n==="stateChange"&&(o.__fetchOnStateChange=()=>s(t,e,r))},FE=(t,e,r)=>{let n=e.__ref;n.__fetchCleanups||(n.__fetchCleanups=[]),$E();let o=t.refetchInterval;if(o){let s=typeof o=="number"?o:Ei(o);if(s>0){let i=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&Dr(t,e,r,{force:!0})},s);n.__fetchCleanups.push(()=>clearInterval(i))}}if(t.refetchOnWindowFocus!==!1){let s=()=>{let i=Rl(e,r),a=Ch(e,r),c=DE(t,i,a),l=Ri(c),f=Eh(t.cache);(!l||l.stale||Date.now()-l.time>(f?.staleTime||0))&&Dr(t,e,r,{force:!0})};bo.focus.add(s),n.__fetchCleanups.push(()=>bo.focus.delete(s))}if(t.refetchOnReconnect!==!1){let s=()=>Dr(t,e,r,{force:!0});bo.online.add(s),n.__fetchCleanups.push(()=>bo.online.delete(s))}},NE=(t,e,r)=>{if(!e.optimistic)return null;let n=t.__ref,o=e.as,s=t.state?.parse?t.state.parse():k(t.state)?{...t.state}:t.state;n.__optimisticSnapshot=s;let i=A(e.optimistic)?e.optimistic(r,s,t):e.optimistic;return i!==void 0&&xn(t,i,o),s},kh=(t,e)=>{let r=t.__ref,n=r.__optimisticSnapshot;n!==void 0&&(xn(t,n,e.as),delete r.__optimisticSnapshot)},jE=async(t,e,r)=>{let n=r?.fetch;if(!n)return;let o=await Ah(n,r);if(!o)return;let s=e.__ref,{method:i,from:a,fields:c,transform:l,as:f,on:u,auth:d,headers:p,baseUrl:h,invalidates:g,optimistic:m,onMutate:b,onSuccess:_,onError:y,onSettled:x}=t,w;if(c===!0||u==="submit")w=Oi(e);else if(O(c)){let T=Oi(e);w={};for(let R of c)w[R]=T[R]}else e.state?.parse?w=e.state.parse():k(e.state)&&(w={...e.state});l&&(w=l(w,e,e.state)),A(b)&&b(w,e,e.state);let v=m?NE(e,t,w):null;s.__fetching=!0,Ye(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),be(e,"onFetchStart"),Re(t,e,"onFetchStart");let D=r?.analyze?.emitNetwork,L=D?typeof performance<"u"?performance.now():Date.now():0;D&&D({phase:"start",mode:"mutation",from:a,method:i});try{if(d!==!1&&o.auth!==!1&&o.getSession){let B=await o.getSession();if(d===!0&&!B){v!==void 0&&kh(e,t);let Z={message:"Not authenticated"};be(e,"onFetchError",Z),Re(t,e,"onFetchError",Z);return}}let T=o[i];if(!A(T))return;let R={from:a,data:w,headers:p,baseUrl:h};t.params&&(R.params=gx(t.params,e,r));let V=Rl(e,r);V&&(R.headers={...R.headers,"Accept-Language":V});let Bt=px(t),z=await hx(()=>T(R),Bt),{data:H,error:nt}=z||{};if(nt){v!==void 0&&kh(e,t),Ye(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:nt,status:"error",fetchStatus:"idle"}),be(e,"onFetchError",nt),A(y)&&y(nt,w,e),A(x)&&x(null,nt,w,e),D&&D({phase:"error",mode:"mutation",from:a,method:i,error:nt.message||String(nt),durationMs:(typeof performance<"u"?performance.now():Date.now())-L});return}if(delete s.__optimisticSnapshot,H!==void 0){let B=f?{[f]:H}:H;e.state?.update&&e.state.update(B,{preventFetch:!0})}if(Ye(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),be(e,"onFetchComplete",H),Re(t,e,"onFetchComplete",H),A(_)&&_(H,w,e),A(x)&&x(H,null,w,e),D&&D({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-L}),g){let B=O(g)?g:[g];for(let Z of B)if(Z===!0||Z==="*")for(let[Lt]of zt)Lt.startsWith(a+":")&&Ti(Lt);else Ti(Z)}}catch(T){v!==void 0&&kh(e,t),Ye(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:T,status:"error",fetchStatus:"idle"}),be(e,"onFetchError",T),Re(t,e,"onFetchError",T),A(y)&&y(T,w,e),A(x)&&x(null,T,w,e),D&&D({phase:"error",mode:"mutation",from:a,method:i,error:T.message||String(T),durationMs:(typeof performance<"u"?performance.now():Date.now())-L})}finally{s.__fetching=!1}},Pi=(t,e,r,n)=>{if(!t||!n?.fetch)return;let s=ft(t,e);if(!s)return;let i=O(s)?s.map(c=>fx(ft(c,e),e)).filter(Boolean):[fx(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?jE:Dr;c.on==="create"?f(c,e,n):Promise.resolve().then(()=>{ME({...c,__runner:f},e,n)}),!l&&c.on==="create"&&(c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&FE(c,e,n)}let a=e.__ref;a.refetch=c=>{for(let l of i)Dr(l,e,n,{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};Dr(f,e,n,{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};Dr(f,e,n,{direction:"previous",force:!0})}},BE={invalidateQueries:t=>{if(!t){Ti();return}if(S(t))for(let[e]of zt)(e.startsWith(t)||e.includes(t))&&Ti(e);else if(O(t)){let e=t.join(":");for(let[r]of zt)r.includes(e)&&Ti(r)}},removeQueries:t=>{if(!t){Al();return}if(S(t))for(let[e]of zt)(e.startsWith(t)||e.includes(t))&&Al(e)},getQueryData:t=>Ri(t)?.data??void 0,setQueryData:(t,e)=>{let r=Ri(t),n=A(e)?e(r?.data):e;Ai(t,n,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let n=await Ah(r,e);if(!n)return;let o=t.cache?.key||`${t.from}:${t.method||"select"}:${JSON.stringify(t.params||"")}`,s=n[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(o,i.data,null);a.gcTime=Eh(t.cache)?.gcTime||3e5}return i},getCache:()=>zt,clear:()=>Al(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of zt)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||Al(r))}},Th={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||yo.clear(),Pi(e,t,t.state,t.context))}},UE=Pi});function Ii(t){let e=this,{__ref:r}=e,n=[].concat(t),o=r.root[n[0]];if(!n||!n.length)return console.log(n,"on",e.key,"is undefined");for(;o.key===n[0]&&(n.shift(),!!n.length);)if(o=o[n[0]],!o)return;return o}function Rh(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 Ph(t){let e=this,{__ref:r}=e,n=r?.__children;if(n)for(let o=0;o<n.length;o++){let s=n[o],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 Dh(t,e=[]){let r=this,{__ref:n}=r,o=n?.__children;if(o){for(let s=0;s<o.length;s++){let i=o[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 Pl(t={}){let e=this;if(e.node?.style){for(let r in t){let n=t[r],o=e[r];if(k(n)&&o)Pl.call(o,n);else if(n!=null){let s=r.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),i=String(n).replace(/\s*!important\s*$/,"");e.node.style.setProperty(s,i,"important")}}return e}}function yx(t){let e=this;if(Pr("beforeRemove",e,t)===!1)return e;A(e.node.remove)?e.node.remove():Or()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=qs(e.parent.__ref.__children,e.key)),Pr("remove",e,t)}function Ih(t){return this[t]}function $h(t,e){let r=this;if(t)return r.update(t,e),r}function Lh(t){return t?this.__ref&&this.__ref[t]:this.__ref}function Mh(){let t=this.getRef("__children");return Array.isArray(t)?t.map(e=>this[e]):[]}function $i(){return this.getRef().path}function Mi(t){let e=null,r=n=>n.__element&&n.root?.isRootState;if(!this)e=mx();else if(r(this))e=this.root;else if(this.__ref&&this.__ref.path){let n=this.state&&r(this.state),o=A(this.state)&&this.parent.state&&r(this.parent.state);(n||o)&&(e=this.state.root||this.parent.state.root)}return e||(e=mx()),t?e?.[t]:e}function Fi(t){let e=this?.__ref?.root||this.getRootState()?.__element;if(!e)throw new Error(`[smbls] getRoot() could not resolve a root element for "${this?.key||"<unknown>"}" \u2014 it has no __ref (never went through create()) and no root state is registered. Answering undefined here used to no-op silently for every caller.`);return Object.keys(e).length>0&&t?e[t]:e}function Ni(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function ji(t){let e=this.getRoot()?.context;return t?e[t]:e}function Bi(t){let e=this.context;return t?e[t]:e}function Dl(){let t=this,e=[];for(let r in t)!Object.prototype.hasOwnProperty.call(t,r)||Ar.has(r)&&!Zs.has(r)||e.push(r);return e}function Il(t=[]){let e=this,r={},n=Dl.call(e),o=n.includes("children"),s=t.length?new Set(t):null;for(let i=0;i<n.length;i++){let a=n[i];if(s&&s.has(a)||!Object.prototype.hasOwnProperty.call(e,a)||o&&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 Ct(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 n=Il.call(r,t),o=t.length?new Set(t):null;for(let s in n){if(o&&o.has(s)||!Object.prototype.hasOwnProperty.call(r,s))continue;let i=n[s];Array.isArray(i)?n[s]=i.map(a=>N(a)?Di.call(a,t,e):a):N(i)&&(n[s]=Di.call(i,t,e))}return n}function _o(...t){if($r!=="test"&&$r!=="development")return;let e=this,{__ref:r}=e;return console.groupCollapsed(e.key),t.length?t.forEach(n=>console.log(`%c${n}:
21
- `,"font-weight: bold",e[n])):(console.log(r.path),e.keys().forEach(o=>console.log(`%c${o}:`,"font-weight: bold",e[o]))),console.log(e),console.groupEnd(e.key),e}function Nh(...t){($r==="test"||$r==="development")&&console.log(...t)}function Ui(...t){($r==="test"||$r==="development")&&console.warn(...t)}function Sn(...t){if($r==="test"||$r==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&_o.call(this),new Error(...t)}}function Vi(){let t=this,{key:e,parent:r}=t,{__children:n}=r.__ref,o=n.indexOf(e),s=n[o+1];return r[s]}function zi(t){let e=t||this,{key:r,parent:n}=e,{__children:o}=n.__ref;if(!o)return;let s=o.indexOf(r);return n[o[s-1]]}function Hi(t={}){let e=this;e.data||(e.data={}),e.data.varCaches||(e.data.varCaches={});let r=e.data.varCaches,n={},o;for(let s in t)t[s]!==r[s]&&(o=!0,n[s]=t[s]);return{changed:s=>{if(!o)return;let i=s(n,lt(r));for(let a in n)r[a]=n[a];return i},timeout:(s,i)=>{if(!o)return;let a=setTimeout(()=>{s(n),clearTimeout(a)},i)}}}function jh(t,...e){let r=this.context,n=r.utils?.[t]||r.functions?.[t]||r.methods?.[t]||r.snippets?.[t];if(n)try{let o=n.call(this,...e);return o&&typeof o.then=="function"&&o.catch(s=>{Sn.call(this,s)}),o}catch(o){if(Sn.call(this,o),r?.strictMode)throw o}}async function Wi(){let t=this,e=t.context?.fetch;if(!e)return null;if(typeof e.select=="function"){if(!e.__authInitialized&&e.getSession){let{initAdapterAuth:o}=await Promise.resolve().then(()=>(Ir(),wn));await o(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:o}=await Promise.resolve().then(()=>(Ir(),wn));await o(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let r=Promise.resolve().then(()=>(Ir(),wn)).then(({resolveDb:o})=>o(e));e.__resolving=r;let n=await r;if(e.__resolved=n,t.context.fetch=n,delete e.__resolving,n?.getSession){let{initAdapterAuth:o}=await Promise.resolve().then(()=>(Ir(),wn));await o(n,t.context)}return n}function qi(t){let e=this,r=t||vi.useStateQuery||e.context?.useStateQuery;if(!r)return null;let n={};if(Oh(e,n),r===!0)return n;let o=GE[r];return o?o(n):n}function Bh(t,e){return!!(co.has(t)||e?.context?.methods?.[t])}var $r,bx,Li,mx,Fh,Oh,VE,_x,zE,HE,WE,qE,KE,GE,xx=j(()=>{"use strict";_h();lo();Ot();fr();Pp();ao();wh();$r="production";bx=null,Li=t=>{bx=t||null},mx=()=>bx||null;Fh=(t,e,r,n)=>Object.defineProperty(t,e,{get:r,set:n});Oh=(t,e)=>{let r=t.__ref;if(!r)return;let n=r.__state;n&&typeof n=="string"&&VE(e,n);let o=r.__children;if(o)for(let a=0;a<o.length;a++){let c=t[o[a]];c&&c.__ref&&Oh(c,e)}let s=r.contentElementKey||"content",i=t[s];i&&i.__ref&&Oh(i,e)},VE=(t,e)=>{let n=e.replaceAll("../","").replaceAll("~/","").split("/"),o=t;for(let s=0;s<n.length;s++){let i=n[s];s===n.length-1?o[i]||(o[i]=!0):(o[i]===!0&&(o[i]={}),o[i]||(o[i]={}),o=o[i])}},_x=(t,e=0)=>{let r=" ".repeat(e),n=Object.entries(t);return n.length?n.map(([s,i])=>i===!0?`${r}${s}`:`${r}${s} {
22
- ${_x(i,e+1)}
20
+ return (${c}); })`)(e)}catch{try{e[a]=C.eval(`(${c})`)}catch{e[a]=c}}}for(let[i,a]of r)if(!n(i))try{e[i]=C.eval(`(${a})`)}catch{e[i]=a}return e},hp=(t,e={verbose:!0})=>{try{return t?C.eval("("+t+")"):{}}catch(r){e.verbose&&console.warn(r)}},gp=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),qc=t=>{for(let e in t)return!1;return!0},mp=t=>k(t)&&qc(t),yp=()=>Object.create(null),si=(t,e,r={})=>{let n=r.exclude||[],o=r.preventUnderscore;for(let s in e)n.includes(s)||!o&&mn(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},yn=(t,e,r=[])=>{let n=r instanceof Set;for(let o in e)mn(o)||o==="constructor"||o==="prototype"||(n?r.has(o):r.includes(o))||(t[o]=e[o]);return t},Gt=(t,e,r={},n=new WeakMap)=>{if(!N(t)||!N(e)||qt(t)||qt(e))return e;if(n.has(t))return n.get(t);n.set(t,t);let o=r.exclude,s=o?o instanceof Set?o:new Set(o):null,i=!r.preventForce;for(let a in e){if(!Object.prototype.hasOwnProperty.call(e,a)||s&&s.has(a)||i&&mn(a)||a==="constructor"||a==="prototype")continue;let c=t[a],l=e[a];qt(l)?t[a]=l:N(c)&&N(l)?t[a]=Gt(c,l,r,n):l!==void 0&&(t[a]=l)}return t},Kc=(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 n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(let s=0;s<n.length;s++){let i=n[s];if(!Object.prototype.hasOwnProperty.call(e,i)||!Kc(t[i],e[i],r))return!1}return!0},kE=new Set(["node","__ref"]),bp=(t,e,r=kE)=>{if(t===e)return!0;if(!N(t)||!N(e)||qt(t)||qt(e))return t===e;let n=r instanceof Set?r:new Set(r),o=new WeakSet;function s(i,a){if(o.has(a))return!0;o.add(a);for(let c in a){if(!Object.prototype.hasOwnProperty.call(a,c)||n.has(c))continue;if(!Object.prototype.hasOwnProperty.call(i,c))return!1;let l=a[c],f=i[c];if(qt(l)||qt(f)){if(l!==f)return!1}else if(N(l)&&N(f)){if(!s(f,l))return!1}else if(l!==f)return!1}return!0}return s(t,e)},_p=(t,e)=>{if(e==null)return t;if(Kt(e)("string","number"))delete t[e];else if(O(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},Gc=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]=Gc(t[r]));return e},xp=(t,e)=>{if(t.length===0)return e;let r={},n=r;for(let o=0;o<t.length;o++)o===t.length-1&&e?n[t[o]]=e:(n[t[o]]={},n=n[t[o]]);return r},wp=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let o=0;o<e.length-1;o++){if(r[e[o]]===void 0)return;r=r[e[o]]}let n=e[e.length-1];r&&Object.prototype.hasOwnProperty.call(r,n)&&delete r[n]},Sp=(t,e,r)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let n=t;for(let o=0;o<e.length-1;o++)(!n[e[o]]||typeof n[e[o]]!="object")&&(n[e[o]]={}),n=n[e[o]];return n[e[e.length-1]]=r,t},kp=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let n=0;n<e.length;n++){if(r==null)return;r=r[e[n]]}return r},vp=t=>{let r=[],n=0;for(let o=0;o<t.length;o++)if(r.length<2)r.push(t[o]);else if(t[o]===r[o%2]?n++:(r=[t[o-1],t[o]],n=1),n>=20)return(D_==="test"||D_==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",r),!0},Cp=t=>{let e=new WeakSet;function r(n){if(n&&typeof n=="object"){if(e.has(n))return!0;e.add(n);for(let o in n)if(Object.prototype.hasOwnProperty.call(n,o)&&r(n[o]))return console.log(n,"cycle at "+o),!0}return!1}return r(t)},Ep=(t,e)=>{let r=e instanceof Set?e:new Set(e),n={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&!r.has(o)&&(n[o]=t[o]);return n}});var ii,ai,ci,Yc=j(()=>{"use strict";fr();ii=(function(){let t=0;function e(){return t++,t}return e})(),ai=ii,ci=(t,e,r)=>(ft(r,t)||r||t.key||ii()).toString()});var Re,Ap,Or,Xc,Tp,Op,Rp,Rr,Pp,bn,Et,Dp=j(()=>{"use strict";Re="production",Ap=Re,Or=(t=Re)=>t==="production",Xc=(t=Re)=>t==="testing"||t==="test",Tp=Xc,Op=(t=Re)=>t==="staging",Rp=(t=Re)=>t==="local",Rr=(t=Re)=>t==="development"||t==="dev"||t==="local",Pp=(t,e=Re)=>e[t],bn=(t=Re)=>!Or(t),Et=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 li(t,e,r){let n;return function(){let o=this,s=arguments,i=function(){n=null,r||t.apply(o,s)},a=r&&!n;clearTimeout(n),n=setTimeout(i,e),a&&t.apply(o,s)}}function Lp(t,e=window){let r=function(){return t.apply(e,arguments)};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}var Ip,$p,vE,fi,uo,po,At,_n=j(()=>{"use strict";Ip=(t,e,r=300)=>{let n;return(...o)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(t,o)},r)}},$p=t=>{let e={};return(...r)=>{let n=r[0];if(n in e)return e[n];{let o=t(n);return e[n]=o,o}}},vE=/^\s*(?:async\s+)?(?:function\b|\([^)]*\)\s*=>|[a-zA-Z_$][\w$]*\s*=>)/,fi=t=>vE.test(t),uo=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let r of e)if(r.resolveHandler)return!0;return!1},po=(t,e)=>{if(typeof t=="function")return t;let r=e?.context?.plugins;if(!r)return t;for(let n of r)if(n.resolveHandler){let o=n.resolveHandler(t,e);if(typeof o=="function")return o}return t},At=(t,e,...r)=>{let n=e?.context?.plugins;if(!n)return!1;let o=!1;for(let s of n)typeof s[t]=="function"&&(s[t](e,...r),o=!0);return o}});var Mp,z_=j(()=>{"use strict";Rt();fr();Mp=(t,e)=>{let{__ref:r}=t,n=t.if;if(T(n)){let o;try{o=n(t,t.state,t.context)}catch(s){typeof console<"u"&&console.warn("[DOMQL] if condition error:",s),delete r.__if;return}o?r.__if=!0:delete r.__if}else n!=null&&typeof n=="object"?ft(n,t)?r.__if=!0:delete r.__if:r.__if=!0}});var Fp,Np,H_=j(()=>{"use strict";Fp=(t,...e)=>{t&&e.map(r=>console.log(r))},Np=(t,e,...r)=>{t&&(console.group(e),r.map(n=>console.log(n)),console.groupEnd(e))}});function zp(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 Hp(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 jp,Bp,Up,Vp,W_=j(()=>{"use strict";Rt();zs();jp=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),Bp=(t,e,r=365)=>{if(Ot(rt)||Ot(rt.cookie))return;let n=new Date;n.setTime(n.getTime()+r*24*60*60*1e3);let o=`expires=${n.toUTCString()}`;rt.cookie=`${t}=${e};${o};path=/`},Up=t=>{if(Ot(rt)||Ot(rt.cookie))return;let e=`${t}=`,n=decodeURIComponent(rt.cookie).split(";");for(let o=0;o<n.length;o++){let s=n[o];for(;s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return""},Vp=t=>{Ot(rt)||Ot(rt.cookie)||(rt.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var ho,q_,Wp,qp=j(()=>{"use strict";ho={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"])},q_=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"]),Wp=t=>ho.body.has(t)});var Kp,K_,go,be,mo,pi,We,Gp,Zc,hi,Yp,gi,Jc,Qc,mi,tl,yo,CE,qe,G_,ui,yi,Xp,di,Zp,Jp,el,rl,nl,ol,sl,il,Y_,al=j(()=>{"use strict";co();Qp();fr();Rt();Kp="production",K_=t=>t.sourcemap!==!1&&Kp!=="production",go=t=>{if(!t)return[];let e=[],r=t.extends;r&&(O(r)?e.push(...r):e.push(r));let n=t.extend;return n&&(O(n)?e.push(...n):e.push(n)),e},be=t=>{if(!O(t))return t;let e=[];for(let r=t.length-1;r>=0;r--){let n=t[r];e.push(O(n)?be(n):n)}return e},mo=t=>{if(t.includes("+"))return t.split("+").filter(Ke);if(t.includes("_")){let[e]=t.split("_");return[e]}if(t.includes(".")&&!Ke(t.split(".")[1])){let[e]=t.split(".");return[e]}return[t]},pi=(t,e,r)=>{let n=[],o=mo(r);o&&(n=[...o]);let s=be(go(t));return s.length&&(n=[...n,...s]),n},We=(t,e)=>{let{__ref:r}=e,{__extends:n}=r;if(!t)return n;let o=e.variant,s=e.context;if(o&&s?.components&&!Array.isArray(t)&&typeof t=="string"){let i=`${t}.${o}`;s.components[i]&&(t=i)}return n.includes(t)||(n=Array.isArray(t)?[...n,...t]:[...n,t],r.__extends=n),n},Gp=(t,e)=>{if(!t)return e;let{extends:r}=e,n=O(r)?r:[r],o=O(t)?t:[t];return{...e,extends:io(o,n)}},Zc=()=>Math.random().toString(36).substring(2),hi={},Yp={},gi=t=>hi[t.__hash],Jc=(t,e)=>{let r=Zc();return S(t)||(t.__hash=r),r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(hi[r]=e),e},Qc=(t,e)=>t.__hash?e.concat(gi(t)):Jc(t,e),mi=(t,e,r,n=new Set,o,s)=>{for(let i of t)O(i)?mi(i,e,r,n,o,s):yo(i,e,r,n,o,void 0,s);return e},tl=(t,e,r,n=new Set,o,s,i)=>{let a=go(t),c={...t};delete c.extends,delete c.extend;let l=!1;for(let f in c){l=!0;break}return l&&(e.push(c),o&&o.push(s)),a.length&&yo(be(a),e,r,n,o,s,i),e},yo=(t,e,r,n=new Set,o,s,i)=>{if(!t||n.has(t))return e;if(O(t))return mi(t,e,r,n,o,i);let a=s;return S(t)?(a=t,t=yi(t,r)):i&&k(t)&&i.has(t)&&(a=i.get(t)),n.has(t)||(n.add(t),t?.extends||t?.extend?tl(t,e,r,n,o,a,i):t&&(e.push(t),o&&o.push(a))),e},CE=new Set(["parent","node","__ref","__proto__","extends","extend","childExtends","childExtendsRecursive"]),qe=(t,e,r,n,o)=>{e=lt(e);for(let s in e){if(CE.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&&n?k(a)&&!O(a)?(r[s]=r[s]||{},G_(r[s],a,n)):r[s]=n:r&&o?.[s]&&(r[s]=o[s]);else if(k(i)&&k(a)){let c=r?r[s]=r[s]||{}:void 0,l=o?.[s];Ke(s)?t[s]=qe(i,a,c,n,l):qe(i,a,c,n,l)}if(s==="extends"||s==="childExtends"||s==="childExtendsRecursive"){if(O(i)&&O(a))t[s]=i.concat(a);else if(O(i)&&k(a)){let c=qe({},i);t[s]=qe(c,a)}}}}return t},G_=(t,e,r,n)=>{if(n||(n=new WeakSet),!n.has(e)){n.add(e);for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o)||o==="__proto__"||o==="constructor"||o==="prototype")continue;let s=e[o];k(s)&&!O(s)?(t[o]=t[o]||{},G_(t[o],s,r,n)):t[o]=r}}},ui=(t,e,r)=>t.reduce((n,o,s)=>{let i=lt(o),a=r?r[s]:void 0;return qe(n,i,e,a)},{}),yi=(t,e,r={},n)=>{let o=e?.components||r.components,s=e?.pages||r.pages;if(S(t)){let i=o&&(o[t+"."+n]||o[t]||o["smbls."+t]),a=s&&t.charCodeAt(0)===47&&s[t];if(i)return i;if(a)return a;r.verbose&&(Kp==="test"||Kp==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},Xp=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),di=(t,e,r,n)=>{if(!t)return[];if(t.__hash)return gi(t)||[];let s=yo(t,[],e,new Set,r,void 0,n);return r?s:Qc(t,s)},Zp=(t,e)=>{if(!t)return e;let r=O(t)?t:[t];return io(r,e)},Jp=t=>{let e=[];function r(n){for(let o in n)Object.prototype.hasOwnProperty.call(n,o)&&(Ke(o)&&e.push(o),o==="extends"&&(typeof n[o]=="string"?e.push(n[o]):Array.isArray(n[o])&&(e=e.concat(n[o]))),typeof n[o]=="object"&&n[o]!==null&&r(n[o]))}return r(t),e},el=(t,e,r={})=>{let{__ref:n}=t,o=t.context||e.context,s=t.variant,i=go(t);if(i.length){let a=be(i),[c,...l]=a,f=typeof c=="string"&&s&&o?.components?`${c}.${s}`:null;f&&o.components[f]?We([f,...l],t):We(a,t)}return rl(t,e,r),nl(t,e,r),ol(t,e,r),t.component&&We(be(ft(t.component,t)),t),o.defaultExtends&&We(be(o.defaultExtends),t),ao(n.__extends)},rl=(t,e,r={})=>{let{__ref:n}=t;return r.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&We(be(e.childProps.extends),t),n.__extends},nl=(t,e,r={})=>{let{__ref:n}=t,o=r.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!o&&s&&We(be(s),t),n.__extends},ol=(t,e,r={})=>{let{__ref:n}=t,o=e.childExtendsRecursive,s=r.ignoreChildExtendsRecursive||t.ignoreChildExtendsRecursive,i=t.key==="__text";return o&&!i&&!s&&We(be(o),t),n.__extends},sl=(t,e,r={})=>{let{__ref:n}=t,o=t.context||e.context,s=t.variant,i=K_(r),a=i?[...n.__extends]:null,c=ao(n.__extends.map((l,f)=>yi(l,o,r,f===0&&s)));if(i){let l=new WeakMap;for(let d=0;d<c.length;d++){let p=c[d],h=a[d];p&&k(p)&&S(h)&&l.set(p,h)}let f=[],u=di(c,o,f,l);n.__extendsStack=u,n.__extendsNames=f}else{let l=di(c,o);n.__extendsStack=l}return n.__extendsStack},il=(t,e,r={})=>{let{__ref:n}=t,{__extendsStack:o}=n;if(K_(r)){let s={},i=n.__extendsNames||[],a=ui(o,s,i),c={};qe(t,a,c,void 0,s),n.__sourcemap=c}else{let s=ui(o);qe(t,s)}return t},Y_=(t,e,r={})=>(el(t,e,r),sl(t,e,r),il(t,e,r),t)});function th(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function eh(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function rh(t,e,r){let{context:n}=e||{},[o]=mo(r),s=r||o;return n?.components?.[s]||n?.pages?.[s]}var Ke,Qp=j(()=>{"use strict";al();Rt();Ke=t=>{if(!S(t)||!t.length)return!1;let e=t.charCodeAt(0);return e>=65&&e<=90}});function X_(t,e){let{props:r,on:n}=e,o=hn(t.split("on")[1]),s=n[o],i=r[t];T(s)?n[o]=(...a)=>{if(s(...a)!==!1&&T(i))return i(...a)}:n[o]=i}var Z_=j(()=>{"use strict";Js();Rt()});function cl(t,e={}){let r=e.cachedKeys||[];for(let n in t){let o=t[n];if(n.length>2&&n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n[2]===n[2].toUpperCase()&&(T(o)||o!=null&&uo(this.context))){let h=hn(n.slice(2));t.on&&(t.on[h]=o),delete t[n];continue}if(n==="childProps"){t.props[n]=o,delete t[n],r.push(n);continue}let a=this.define?.[n],c=this.context?.define?.[n],l=k(a)||T(a),f=k(c)||T(c);if(l||f)continue;let u=n.charAt(0);if(Q_.has(u)){t.props[n]=o,delete t[n],r.push(n);continue}let d=nh.test(n)||J_.test(n)||AE(o),p=Ar.has(n);!d&&!p&&(n in t.props||(t.props[n]=o),delete t[n],r.push(n))}return t}function ll(t=this,e){let r=e.cachedKeys||[];for(let n in t.props){let o=t.props[n],s=n.length>2&&n.charCodeAt(0)===111&&n.charCodeAt(1)===110,i=T(o)||o!=null&&uo(this.context);if(s&&i){X_(n,t),delete t.props[n];continue}if(r.includes(n)||n==="childProps")continue;let a=n.charAt(0);if(Q_.has(a))continue;let c=this.define?.[n],l=this.context?.define?.[n],f=k(c)||T(c),u=k(l)||T(l),d=nh.test(n)||J_.test(n),p=Ar.has(n);(d||p||f||u)&&(t[n]===void 0||o===null)&&(t[n]=o,t.props&&delete t.props[n])}return t}function fl(t=this){let e=[];return cl.call(this,t,{cachedKeys:e}),ll.call(this,t,{cachedKeys:e}),t}function oh(t={}){return t.on||(t.on={}),t.props||(t.props={}),fl.call(this,t)}function ih(t,e){this.__element.update({props:t},e)}function Si(t){let e={update:ih.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var nh,J_,Q_,EE,AE,xi,bi,sh,wi,ki,vi,ul,_i,ah,ch,lh=j(()=>{"use strict";fo();Z_();fr();Rt();Js();_n();nh=/^[A-Z]/,J_=/^\d+$/,Q_=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),EE=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),AE=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if(EE.has(e)||nh.test(e))return!0;return!1},xi=(t,e,r)=>{let{props:n,__ref:o}=t;if(o.__propsStack=[],n)o.__initialProps=n;else return{};return N(n)?{...n}:(o.__propsStack.push(n),{})};bi=t=>Kt(t)("string","number")?{inheritedString:t}:t,sh=(t,e)=>!t||!e.length?!1:e.includes(t),wi=(t,e)=>{let{__ref:r}=t,n=r.__propsStack||[],o=e.props;if(!o)return n;let s=o[t.key],i=o.childProps||e.childProps,a=t.props?.ignoreChildProps;if(i&&!a){let c=bi(i);n.unshift(c)}if(s){let c=bi(s);n.unshift(c)}return n};ki=t=>{let e=new Set;return t.filter(r=>!r||Tr.has(r)||e.has(r)?!1:(e.add(r),!0))},vi=(t,e,r)=>(e.props=t.reduce((n,o)=>{if(Tr.has(o))return n;for(;T(o);)o=ft(o,e);return st(n,lt(o,{exclude:Tr}))},{}),Si(e),e.props),ul=(t,e)=>{let{props:r,__ref:n}=t,o=n.__propsStack||[];if(e?.props&&(o=[...wi(t,e)]),k(r)?o.push(r):r==="inherit"&&e?.props?o.push(e.props):r&&o.push(r),O(n.__extendsStack))for(let s=0;s<n.__extendsStack.length;s++){let i=n.__extendsStack[s];i.props&&i.props!==r&&o.push(i.props)}return n.__propsStack=ki(o),n.__propsStack},_i=(t,e)=>{let{__ref:r}=t,n=ul(t,e);n.length?vi(n,t):(r.__propsStack=[],t.props={})},ah=function(t,e,r){let{__ref:n}=t;if(n.__if)_i(t,e);else try{_i(t,e)}catch(o){t.context?.designSystem?.verbose&&console.warn("initProps error at",n.path?.join("."),o),t.props={},n.__propsStack=[]}return Si(t),t},ch=(t,e,r)=>{let{__ref:n}=e,s=[...n.__propsStack||[]],i=wi(e,r);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),n.__propsStack=ki(s),n.__propsStack.length&&vi(n.__propsStack,e),e}});var tx,dl,pl,hl,gl,fh,ml,yl,bl,uh,ex=j(()=>{"use strict";al();Yc();Ws();lh();qp();Rt();tx="production",dl=(t,e,r)=>{let n=e.childExtends&&e.childExtends.tag,o=e.childProps&&e.childProps.tag,s=ho.body.has(r)&&r;return{text:t,tag:n||o||s||"string"}},pl=(t,e,r)=>{if(t===void 0)return(tx==="test"||tx==="development")&&console.warn(r,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:Kt(t)("string","number")?dl(t,e,r):T(t)?{props:t}:t},hl=(t,e)=>{let r={};return r.origin=t,r.parent=e,r},gl=(t,e,r,n,o)=>{if(!e)return o;if(lr(e)){let s={key:":root",node:e};return o[`${r}_parent`]=s,s}return e},fh=(t,e)=>{let{__ref:r}=t,{__ref:n}=e,o=e&&e.key===":root";r?.root||(r.root=o?t:n?.root)},ml=(t,e,r)=>{let{__ref:n}=e;return n||(n=e.ref={}),n.path||(n.path=[]),n.path.concat(r)},yl=(t,e,r,n,o)=>(n.context&&!o.context&&!t.context&&(o.context=n.context),n.context||e.context||o.context||t.context),bl=(t,e,r)=>{let n=hl(t,e);return t.__ref=n,n.__defineCache||(n.__defineCache={}),n.__exec||(n.__exec={}),n.__execProps||(n.__execProps={}),n.__class||(n.__class={}),n.__classNames||(n.__classNames={}),n.__attr||(n.__attr={}),n.__changes||(n.__changes=[]),n.__children||(n.__children=[]),n.__extends=pi(t,e,r),n.path=ml(t,e,r),n},uh=(t,e,r,n,o)=>{let i=t?.__hash?{extends:[t]}:pl(t,e,r);if(!i)return;let a=gl(i,e,r,n,o),c=ci(i,a,r);bl(i,a,c);let l=xi(i,a,c),f=yl(i,a,c,n,o),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var dh,_l,xl,wl,Sl,ph,kl,hh,gh,mh,yh,rx,Ci,ur,Ge,nx=j(()=>{"use strict";co();fo();fr();Rt();dh=t=>{let{state:e,props:r,__ref:n}=t,o=r?.state||e;return Kt(o)("string","number")?(n.__state=o,{value:o}):o===!0?(n.__state=t.key,{}):o?(n.__hasRootState=!0,o):!1},_l=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},xl=(t,e)=>{if(!t.includes("../"))return;let n=t.split("../").length-1;for(let o=0;o<n;o++){if(!e.parent)return null;e=e.parent}return e},wl=(t,e,r={})=>{let n=S(t)?t.split("/"):[t],o=n.length-1;for(let s=0;s<o;s++){let i=n[s],a=n[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 o=t.__ref.__state;if(!kl(t))return;let s=_l(o,e.state),i=e.state;if(s)i=s,o=o.replaceAll("~/","");else{let a=xl(o,e.state);a&&(i=a,o=o.replaceAll("../",""))}if(i)return wl(o,i,r)},ph=(t,e)=>{let r=t.__ref,n=Sl(t,e);if(n===void 0)return t.state;if(Kt(n)("object","array"))return lt(n);if(Kt(n)("string","number","boolean"))return r.__stateType=typeof n,{value:n};console.warn(r.__state,"is not present. Replacing with",{})},kl=t=>{let{__ref:e}=t,r=e?.__state;return!!(r&&Kt(r)("number","string","boolean"))},hh=function(t){return N(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},gh=(t,e)=>{if(!t)return e||{};let r=t.split("/"),n={},o=n,s=r.length-1;for(let i=0;i<=s;i++)o[r[i]]=i===s?e||{}:{},o=o[r[i]];return n},mh=(t,e)=>{let{__element:r}=e,n=r?.state;if(!n)return;let o=lt(n,gn),s={[t.key]:o},i=k(n.__depends)?{...n.__depends,...s}:s;return Array.isArray(n)?Ys(n,{...Object.getPrototypeOf(n),__depends:i}):Object.setPrototypeOf(n,{...Object.getPrototypeOf(n),__depends:i}),o},yh=(t,e,r={})=>{let{overwrite:n}=r;if(!n)return;let o=n==="shallow";if(n==="merge"){st(t,e,gn);return}(o?yn:Gt)(t,e,gn)},rx="__polyglotSeededKeys",Ci=t=>{if(!k(t))return new Set;let e=t[rx];if(!(e instanceof Set)){e=new Set;try{Object.defineProperty(t,rx,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},ur=(t,e,r)=>Ci(t).has(e)?!0:!k(r)||r[e]===void 0,Ge=(t,e)=>(Ci(t).add(e),e)});var TE,bh,ox=j(()=>{"use strict";TE=(t,e)=>{let r=e;for(;r;){if(r===t)return!0;r=Object.getPrototypeOf(r)}return!1},bh=(t,e)=>{let{__ref:r}=t,n=t.context||e.context||r.root?.context;n&&!n.globalScope&&(n.globalScope={});let o=e.scope||r.root?.scope,s=n?.globalScope;if(!t.scope)o?t.scope=o: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=o||s;i&&!TE(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var sx,vl,Pr,Cl,_h,xh=j(()=>{"use strict";Rt();_n();sx=(t,e)=>{let r="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[r]},vl=(t,e,r,n,o)=>{if(t=po(t,e),!!T(t))try{let s=t.call(e,e,r||e.state,n||e.context,o);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}},Pr=(t,e,r)=>{if(!e)throw new Error("Element is required");At(t,e,r);let n=sx(t,e);if(n){let{state:o,context:s}=e;return vl(n,e,o,s,r)}},Cl=(t,e,r,n,o,s)=>{if(t=po(t,r),!!T(t))try{let i=t.call(r,e,r,n||r.state,o||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}},_h=(t,e,r,n)=>{At(t,r,e,n);let o=sx(t,r);if(o){let{state:s,context:i}=r;return Cl(o,e,r,s,i,n)}}});var wh,Ei,Sh=j(()=>{"use strict";wh={},Ei={}});var fx={};D(fx,{restAdapter:()=>lx,setup:()=>NE});var OE,cx,ix,RE,PE,DE,ax,dr,IE,$E,LE,kh,ME,FE,NE,lx,ux=j(()=>{"use strict";OE=(t,e,r)=>{let n=e&&!e.startsWith("/")?"/":"",o=new URL(`${t}${n}${e}`);if(r)for(let s in r){let i=r[s];i!=null&&o.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return o.toString()},cx=t=>Object.prototype.toString.call(t).slice(8,-1),ix=["auto","json","text","blob","arrayBuffer","stream","response"],RE={json:async t=>{let e=await t.text();return e?JSON.parse(e):null},text:t=>t.text(),blob:t=>t.blob(),arrayBuffer:t=>t.arrayBuffer(),stream:t=>t.body,response:t=>t},PE=t=>{let e=t.headers.get("content-type");return e&&e.includes("json")?t.json():t.text()},DE=async t=>{let e=await t.text(),r=t.headers.get("content-type");if(e&&r&&r.includes("json"))try{return JSON.parse(e)}catch{}return e},ax=(t,e)=>t?.message||t?.error||e.statusText,dr=async(t,e,r)=>{let n=r??"auto";if(!ix.includes(n))throw new TypeError(`@symbo.ls/fetch rest: unknown responseType "${n}" \u2014 use one of: ${ix.join(", ")}`);let o=await globalThis.fetch(t,e);if(n==="auto"){let s=await PE(o);return{data:s,error:o.ok?null:ax(s,o),status:o.status}}if(!o.ok){let s=await DE(n==="response"?o.clone():o);return{data:n==="response"?o:s,error:ax(s,o)||`HTTP ${o.status}`,status:o.status}}return{data:await RE[n](o),error:null,status:o.status}},IE=["FormData","Blob","File","URLSearchParams","ReadableStream","ArrayBuffer"],$E=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||IE.includes(cx(t))),LE=t=>Array.isArray(t)?t:typeof t.entries=="function"?t.entries():Object.entries(t),kh=(...t)=>{let e={},r=new Map;for(let n of t)if(n)for(let[o,s]of LE(n)){let i=o.toLowerCase();if(r.has(i)&&delete e[r.get(i)],s==null){r.delete(i);continue}r.set(i,o),e[o]=s}return e},ME={"Content-Type":"application/json"},FE={"Content-Type":void 0},NE=async({url:t,headers:e,auth:r,fetchOptions:n})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return lx(t,e,r,n)},lx=(t,e={},r,n={})=>{let o=r?.token||null,s=()=>o?{Authorization:`Bearer ${o}`}:null,i=u=>kh(e,s(),u),a=u=>({...n,...u}),c=(u,d,p)=>{if(!$E(d))return a({method:u,headers:kh(e,s(),ME,p),body:JSON.stringify(d)});let h={method:u,headers:kh(e,s(),FE,p),body:d};return cx(d)==="ReadableStream"&&(h.duplex="half"),a(h)},l=(u,d)=>{let p=d||t;if(u&&(u.startsWith("http://")||u.startsWith("https://")))return u;let h=u&&!u.startsWith("/")?"/":"";return`${p}${h}${u||""}`};return{name:"rest",setToken:u=>{o=u},getSession:async()=>{if(!r?.sessionUrl)return o?{token:o}:null;let u=await dr(l(r.sessionUrl,r.baseUrl),a({headers:i()}));return u.error?null:u.data},signIn:async u=>{if(!r?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let d=await dr(l(r.signInUrl,r.baseUrl),c("POST",u));return d.data?.token&&(o=d.data.token),d},signOut:async()=>(r?.signOutUrl&&await dr(l(r.signOutUrl,r.baseUrl),a({method:"POST",headers:i()})),o=null,{error:null}),select:({from:u,params:d,select:p,limit:h,offset:g,order:m,single:b,headers:_,baseUrl:y,responseType:x})=>{let w={...d};return p&&(w.select=p),h&&(w.limit=h),g&&(w.offset=g),b&&(w.single=!0),m&&(typeof m=="string"?w.order=m:Array.isArray(m)?w.order=m.map(v=>`${v.by}:${v.asc===!1?"desc":"asc"}`).join(","):m.by&&(w.order=`${m.by}:${m.asc===!1?"desc":"asc"}`)),dr(OE(y||t,u||"",w),a({headers:i(_)}),x)},rpc:({from:u,params:d,headers:p,baseUrl:h,responseType:g})=>dr(l(`rpc/${u}`,h),c("POST",d,p),g),insert:({from:u,data:d,headers:p,baseUrl:h,responseType:g})=>dr(l(u,h),c("POST",d,p),g),update:({from:u,data:d,params:p,method:h,headers:g,baseUrl:m,responseType:b})=>{let _=p?.id||d?.id,y=_?`${u}/${_}`:u;return dr(l(y,m),c(h||"PATCH",d,g),b)},upsert:({from:u,data:d,params:p,method:h,headers:g,baseUrl:m,responseType:b})=>{let _=p?.id||d?.id,y=_?`${u}/${_}`:u;return dr(l(y,m),c(h||"PUT",d,g),b)},delete:({from:u,params:d,headers:p,baseUrl:h,responseType:g})=>{let m=d?.id,b=m?`${u}/${m}`:u;return dr(l(b,h),a({method:"DELETE",headers:i(p)}),g)}}}});var px={};D(px,{localAdapter:()=>dx,setup:()=>BE});var El,jE,BE,dx,hx=j(()=>{"use strict";El=(t,e)=>{if(!e)return!0;for(let r in e){let n=e[r];if(n===null){if(t[r]!==null&&t[r]!==void 0)return!1}else if(Array.isArray(n)){if(!n.includes(t[r]))return!1}else if(typeof n=="object"){for(let o in n)if(o==="gt"&&!(t[r]>n[o])||o==="gte"&&!(t[r]>=n[o])||o==="lt"&&!(t[r]<n[o])||o==="lte"&&!(t[r]<=n[o])||o==="neq"&&t[r]===n[o]||o==="like"&&!String(t[r]).includes(n[o]))return!1}else if(t[r]!==n)return!1}return!0},jE=(t,{order:e,limit:r,offset:n,single:o})=>{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 n&&(s=s.slice(n)),r&&(s=s.slice(0,r)),o?{data:s[0]||null,error:null}:{data:s,error:null}},BE=async({data:t,...e})=>dx(t,e),dx=(t={},e={})=>{let r={},n={},o=e.persist!==!1&&typeof localStorage<"u",s=e.prefix||"smbls_db_",i=f=>{if(!r[f])if(o)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(o)try{localStorage.setItem(s+f,JSON.stringify(r[f]))}catch{}},c=(f,u,d,p)=>{let h=n[f];if(h)for(let g of h)g(d,p,{event:u,table:f})},l=Date.now();return{name:"local",store:r,select:async({from:f,params:u,...d})=>{let h=i(f).filter(g=>El(g,u));return jE(h,d)},insert:async({from:f,data:u})=>{let d=i(f),h=(Array.isArray(u)?u:[u]).map(g=>{let m={id:g.id||++l,...g};return d.push(m),m});a(f);for(let g of h)c(f,"INSERT",g,null);return{data:Array.isArray(u)?h:h[0],error:null}},update:async({from:f,data:u,params:d})=>{let p=i(f),h=[];for(let g=0;g<p.length;g++)if(El(p[g],d)){let m={...p[g]};Object.assign(p[g],u),h.push(p[g]),c(f,"UPDATE",p[g],m)}return a(f),{data:h,error:null}},upsert:async({from:f,data:u,params:d})=>{let p=i(f),h=Array.isArray(u)?u:[u],g=[];for(let m of h){let b=d||(m.id!==void 0?{id:m.id}:null),_=b?p.findIndex(y=>El(y,b)):-1;if(_>-1){let y={...p[_]};Object.assign(p[_],m),g.push(p[_]),c(f,"UPDATE",p[_],y)}else{let y={id:m.id||++l,...m};p.push(y),g.push(y),c(f,"INSERT",y,null)}}return a(f),{data:Array.isArray(u)?g:g[0],error:null}},delete:async({from:f,params:u})=>{let d=i(f),p=[];for(let h=d.length-1;h>=0;h--)El(d[h],u)&&(p.push(d[h]),d.splice(h,1),c(f,"DELETE",null,p[p.length-1]));return a(f),{data:p,error:null}},subscribe:({from:f,on:u},d)=>{n[f]||(n[f]=[]);let p=(h,g,m)=>{u&&u!=="*"&&u!==m.event||d(h,g,m)};return n[f].push(p),()=>{let h=n[f].indexOf(p);h>-1&&n[f].splice(h,1)}}}}});var wn={};D(wn,{createAdapter:()=>qE,default:()=>nA,executeFetch:()=>Ii,fetchPlugin:()=>Dh,initAdapterAuth:()=>Pl,parseDuration:()=>Ti,queryClient:()=>rA,registerAdapter:()=>WE,resolveDb:()=>bx});var UE,VE,Al,Ai,Tl,Eh,zE,HE,WE,qE,bx,Ti,zt,_x,bo,KE,Di,Oi,Ri,Ol,Oh,Rl,GE,gx,vh,xx,wx,_o,mx,YE,yx,XE,Dl,Ah,Sx,Pl,Rh,_e,Pe,Pi,Ph,ZE,Th,xn,Ye,Dr,JE,QE,tA,Ch,eA,Ii,rA,Dh,nA,Ir=j(()=>{"use strict";R();UE=["select","rpc","insert","update","upsert","delete","subscribe"],VE={rest:()=>Promise.resolve().then(()=>(ux(),fx)),local:()=>Promise.resolve().then(()=>(hx(),px))},Al=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),Ai=(()=>{if(typeof globalThis<"u"&&globalThis[Al])return globalThis[Al];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Al,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Al]}catch{}return t})(),Tl=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),Eh=(()=>{if(typeof globalThis<"u"&&globalThis[Tl])return globalThis[Tl];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Tl,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Tl]}catch{}return t})(),zE=5e3,HE=t=>new Promise(e=>{if(Ai[t])return e(Ai[t]);let r=Eh[t]||=[],n=!1,o=()=>{n||(n=!0,e(Ai[t]||null))};r.push(o),setTimeout(o,zE)}),WE=(t,e)=>{Ai[t]=e;let r=Eh[t];if(r&&r.length){Eh[t]=[];for(let n of r)n()}},qE=t=>{let e={};for(let r of UE)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},bx=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...r}=t,n=typeof e=="string"?e:typeof t=="string"?t:null;if(!n)return null;let o=Ai[n]||VE[n];if(!o&&(o=await HE(n),!o))throw new Error(`Unknown db adapter: "${n}". Use registerAdapter() for adapters with optional deps.`);let s=await o();if(!s||typeof s.setup!="function")throw new Error(`Adapter "${n}" loader returned a module without a setup() function. Got keys: [${Object.keys(s||{}).join(", ")}]. Likely a bundler chunk-resolution issue.`);return s.setup(r)},Ti=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]),n=e[2];return n==="ms"?r:n==="s"?r*1e3:n==="m"?r*6e4:n==="h"?r*36e5:0},zt=new Map,_x=new Map,bo=new Map,KE=(t,e,r)=>{if(t.cache?.key)return t.cache.key;let n=XE(t.params),o=r?`${r}:`:"",s=`${t.from}:${t.method}:${o}${JSON.stringify(n||"")}`;return e?`${s}:${e}`:s},Di=t=>zt.get(t)||null,Oi=(t,e,r)=>{let n=zt.get(t),o={data:e,error:r,time:Date.now(),stale:!1};zt.set(t,o);let s=_x.get(t);if(s)for(let i of s)T(i)&&i(o);return o},Ri=t=>{if(t){let e=zt.get(t);e&&(e.stale=!0);return}for(let[,e]of zt)e.stale=!0},Ol=t=>{if(t){zt.delete(t);return}zt.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)}:S(t)?{staleTime:Ti(t),gcTime:3e5}:{staleTime:Ti(t.stale||t.staleTime)||6e4,gcTime:Ti(t.gc||t.gcTime||t.expire)||3e5,key:t.key},Rl=null,GE=()=>{Rl||(Rl=setInterval(()=>{let t=Date.now();for(let[e,r]of zt){let n=_x.get(e);!(n&&n.size>0)&&t-r.time>(r.gcTime||3e5)&&zt.delete(e)}},3e4),Rl.unref&&Rl.unref())};GE();gx=3,vh=t=>Math.min(1e3*2**t,3e4),xx=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:gx,delay:vh}:typeof e=="number"?{count:e,delay:vh}:{count:e.count??gx,delay:T(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:vh}},wx=async(t,e)=>{let{count:r,delay:n}=e,o;for(let s=0;s<=r;s++)try{let i=await t();if(i?.error){if(o=i.error,s<r){let a=T(n)?n(s,o):n;await new Promise(c=>setTimeout(c,a));continue}return i}return i}catch(i){if(o=i,s<r){let a=T(n)?n(s,i):n;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:o}},_o={focus:new Set,online:new Set},mx=!1,YE=()=>{if(mx||typeof window>"u")return;mx=!0;let t=()=>{for(let r of _o.focus)r()},e=()=>{for(let r of _o.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},yx=(t,e)=>{let r=e.__ref;if(t===!0)return{from:r.__state||e.key,method:"select",query:!0,on:"create"};if(S(t))return{from:t,method:"select",query:!0,on:"create"};if(k(t)){let n={...t};return n.from=n.from||r.__state||e.key,n.method=n.method||"select",n.on=n.on||"create",n.query===void 0&&(n.query=!0),n}return null},XE=t=>(!t||T(t),t),Dl=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},Ah=(t,e)=>{let n=(t?.state?.root||e?.state?.root)?.__fetchScope;return n?String(n):void 0},Sx=(t,e,r)=>{let n;if(!t)n=void 0;else if(T(t))n=t(e,e.state);else{n={};for(let o in t){let s=t[o];n[o]=T(s)?s(e,e.state):s}}return n},Pl=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let r=(n,o)=>{let s=e.state?.root;s?.update&&s.update({auth:{user:n,session:o,loading:!1}})};try{let n=await t.getSession();r(n?.user||null,n)}catch(n){console.warn("[fetch] Failed to restore auth session:",n.message)}t.onAuthStateChange&&t.onAuthStateChange((n,o)=>{r(o?.user||null,o)})},Rh=async(t,e)=>{if(T(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=bx(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},_e=(t,e,...r)=>{let n=T(t[e])?t[e]:null;n&&n.call(t,...r,t,t.state,t.context)},Pe=(t,e,r,...n)=>{let o=t&&T(t[r])?t[r]:null;o&&o.call(e,...n,e,e.state,e.context)},Pi=t=>{let e={},r=t.node;if(!r)return e;if(r.tagName==="FORM"){let o=new FormData(r);for(let[s,i]of o.entries())e[s]=i;return e}let n=r.querySelectorAll("input, textarea, select");for(let o=0;o<n.length;o++){let s=n[o],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},Ph=t=>t.responseType==="stream"||t.responseType==="response",ZE=["Blob","File","ArrayBuffer","ReadableStream","Response"],Th=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||ZE.includes(Object.prototype.toString.call(t).slice(8,-1))),xn=(t,e,r,n={})=>{if(!r&&Th(e))return;let o=r&&r.startsWith("~/"),s=o&&t.state?.root||t.state;if(s?.update)if(o){let i=r.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&!Th(e)&&i in e?s.update(e,{preventFetch:!0,...n}):s.update({[i]:e},{preventFetch:!0,...n})}else{let i=r?{[r]:e}:e;s.update(i,{preventFetch:!0,...n})}},Ye=(t,e)=>{let r=t?.__ref;r&&(r.__fetchStatus=e,r.__fetching=e.isFetching,r.__fetchError=e.error)},Dr=async(t,e,r,n={})=>{let o=r?.fetch;if(!o||!e||!e.__ref)return;let s=e.__ref,i=Ah(e,r);(!s.__fetchScopeOwner||s.__fetchScopeOwner.scope!==i)&&(s.__fetchScopeOwner={scope:i});let a=s.__fetchScopeOwner,c=()=>e.__ref===s&&s.__fetchScopeOwner===a&&Ah(e,r)===i;if(t.enabled===!1||T(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||T(t.skip)&&t.skip(e,e.state))return;let l=await Rh(o,r);if(!l||!c())return;let{from:f,method:u,query:d,params:p,cache:h,transform:g,single:m,auth:b,fields:_,as:y,limit:x,offset:w,order:v,headers:P,baseUrl:$,responseType:I,page:A,cursor:F,getNextPageParam:Mt,getPreviousPageParam:H,infinite:tt,placeholderData:et,initialData:V,select:W,keepPreviousData:Tt}=t,z=S(W)?W:void 0;if(d&&T(e.getQuery)){let ct=e.getQuery(l.name||"paths");ct&&(z=ct.select||ct.length&&ct.join(",")||z)}let bt=Sx(p,e,r),L=Ph(t)?null:Oh(h),ot=xx(t),gt=Dl(e,r),Y=gt?`:${gt}`:"",G=i?`${i}:`:"",B=L?h?.key||`${f}:${u}:${G}${JSON.stringify(bt||"")}${tt?":infinite":""}${A?":p"+JSON.stringify(A):""}${Y}`:null;if(!s.__fetchInitialized&&B&&(s.__fetchInitialized=!0,V!==void 0)){let ct=T(V)?V():V;Oi(B,ct,null)}if((u==="select"||u==="rpc")&&B&&L){let ct=Di(B);if(ct&&!ct.error){let J=Date.now()-ct.time,St=ct.stale||J>(L.staleTime||0),q=ct.data;if(T(W)&&(q=W(q,e,e.state)),g&&(q=g(q,e,e.state)),!c())return;if(xn(e,q,y),!St){Ye(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(et!==void 0){let J=T(et)?et(e,e.state):et;J!==void 0&&xn(e,J,y)}}if(B&&bo.has(B)&&!n.force){let ct=bo.get(B);try{let J=await Promise.race([ct,new Promise((St,q)=>setTimeout(()=>q("DEDUP_TIMEOUT"),15e3))]);if(!c())return;if(J?.data!==void 0){let St=J.data;if(T(W)&&(St=W(St,e,e.state)),g&&(St=g(St,e,e.state)),!c())return;xn(e,St,y),_e(e,"onFetchComplete",St),Pe(t,e,"onFetchComplete",St)}}catch{if(!c())return}return}let vt=!Di(B)?.data;Ye(e,{isFetching:!0,isLoading:vt,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),_e(e,"onFetchStart"),Pe(t,e,"onFetchStart");let Ft=r?.analyze?.emitNetwork,Qn=Ft?typeof performance<"u"?performance.now():Date.now():0;Ft&&Ft({phase:"start",mode:"query",from:f,method:u,cacheKey:B,lang:gt});let Ms=wx(async()=>{if(!c())return;if(b!==!1&&l.auth!==!1&&l.getSession){let q=await l.getSession();if(!c())return;if(b===!0&&!q){let Ut={message:"Not authenticated"};return Ye(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:Ut,status:"error",fetchStatus:"idle"}),_e(e,"onFetchError",Ut),Pe(t,e,"onFetchError",Ut),{data:null,error:Ut}}}let ct=l[u];if(!T(ct))return{data:null,error:{message:`Method "${u}" not found on adapter`}};let J={from:f,select:z,params:bt,single:m,limit:x,offset:w,order:v,headers:P,baseUrl:$};I!==void 0&&(J.responseType=I);let St=Dl(e,r);if(St&&(J.headers={...J.headers,"Accept-Language":St}),A!==void 0){if(k(A))A.offset!==void 0&&(J.offset=A.offset),A.limit!==void 0&&(J.limit=A.limit),A.cursor!==void 0&&(J.params={...J.params,cursor:A.cursor});else if(typeof A=="number"){let q=t.pageSize||x||20;J.offset=(A-1)*q,J.limit=q}}if(F!==void 0&&(J.params={...J.params,cursor:F}),u==="insert"||u==="update"||u==="upsert"){let q;if(_===!0||t.on==="submit")q=Pi(e);else if(O(_)){let Ut=Pi(e);q={};for(let wd of _)q[wd]=Ut[wd]}else e.state?.parse?q=e.state.parse():k(e.state)&&(q={...e.state});g&&(q=g(q,e,e.state)),J.data=q}if(u==="rpc"){let q=bt;if(t.on==="submit"){let Ut=Pi(e);q=t.transformParams?t.transformParams(Ut,e,e.state):Ut}J.params=q}if(u==="subscribe"){let q=l.subscribe({from:f,params:bt,on:t.subscribeOn},(Ut,wd,$D)=>{c()&&(xn(e,Ut,y),_e(e,"onFetchComplete",Ut),Pe(t,e,"onFetchComplete",Ut))});return c()?(s.__unsubscribe=q,{data:null,error:null,subscribed:!0}):(T(q)&&q(),{data:null,error:null,subscribed:!0})}return ct(J)},ot);B&&bo.set(B,Ms);try{let ct=await Ms;if(!c()||ct?.subscribed)return;let{data:J,error:St}=ct||{};if(St){B&&Oi(B,null,St),Ye(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:St,status:"error",fetchStatus:"idle"}),_e(e,"onFetchError",St),Pe(t,e,"onFetchError",St),Ft&&Ft({phase:"error",mode:"query",from:f,method:u,cacheKey:B,error:St.message||St,durationMs:(typeof performance<"u"?performance.now():Date.now())-Qn});return}if(J!==void 0){if((u==="select"||u==="rpc")&&B){let Ut=Oi(B,J,null);Ut.gcTime=L?.gcTime||3e5}let q=J;if(tt&&O(J)&&(s.__pages||(s.__pages=[]),n.direction==="previous"?s.__pages.unshift(J):s.__pages.push(J),q=s.__pages.flat(),Mt&&(s.__nextPageParam=Mt(J,s.__pages),s.__hasNextPage=s.__nextPageParam!=null),H&&(s.__prevPageParam=H(J,s.__pages),s.__hasPreviousPage=s.__prevPageParam!=null)),T(W)&&(q=W(q,e,e.state)),g&&(q=g(q,e,e.state)),!c())return;(!Tt||q!==void 0)&&xn(e,q,y),Ye(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),_e(e,"onFetchComplete",q),Pe(t,e,"onFetchComplete",q),Ft&&Ft({phase:"success",mode:"query",ok:!0,from:f,method:u,cacheKey:B,durationMs:(typeof performance<"u"?performance.now():Date.now())-Qn})}}catch(ct){if(!c())return;Ye(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:ct,status:"error",fetchStatus:"idle"}),_e(e,"onFetchError",ct),Pe(t,e,"onFetchError",ct),Ft&&Ft({phase:"error",mode:"query",from:f,method:u,cacheKey:B,error:ct.message||String(ct),durationMs:(typeof performance<"u"?performance.now():Date.now())-Qn})}finally{B&&bo.get(B)===Ms&&bo.delete(B)}},JE=(t,e,r)=>{let n=t.on,o=e.__ref;o.__fetchListeners||(o.__fetchListeners=[]);let s=t.__runner||Dr;if(n==="submit"){let i=c=>{c.preventDefault(),s(t,e,r)},a=e.node;a&&(a.addEventListener("submit",i),o.__fetchListeners.push(()=>a.removeEventListener("submit",i)))}else if(n==="click"){let i=()=>s(t,e,r),a=e.node;a&&(a.addEventListener("click",i),o.__fetchListeners.push(()=>a.removeEventListener("click",i)))}else n==="stateChange"&&(o.__fetchOnStateChange=()=>s(t,e,r))},QE=(t,e,r)=>{let n=e.__ref;n.__fetchCleanups||(n.__fetchCleanups=[]),YE();let o=t.refetchInterval;if(o){let c=typeof o=="number"?o:Ti(o);if(c>0){let l=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&Dr(t,e,r,{force:!0})},c);n.__fetchCleanups.push(()=>clearInterval(l))}}let s=Ph(t),i=t.refetchOnWindowFocus===void 0?!s:t.refetchOnWindowFocus!==!1,a=t.refetchOnReconnect===void 0?!s:t.refetchOnReconnect!==!1;if(i){let c=()=>{let l=Dl(e,r),f=Ah(e,r),u=KE(t,l,f),d=Di(u),p=Oh(t.cache);(!d||d.stale||Date.now()-d.time>(p?.staleTime||0))&&Dr(t,e,r,{force:!0})};_o.focus.add(c),n.__fetchCleanups.push(()=>_o.focus.delete(c))}if(a){let c=()=>Dr(t,e,r,{force:!0});_o.online.add(c),n.__fetchCleanups.push(()=>_o.online.delete(c))}},tA=(t,e,r)=>{if(!e.optimistic)return null;let n=t.__ref,o=e.as,s=t.state?.parse?t.state.parse():k(t.state)?{...t.state}:t.state;n.__optimisticSnapshot=s;let i=T(e.optimistic)?e.optimistic(r,s,t):e.optimistic;return i!==void 0&&xn(t,i,o),s},Ch=(t,e)=>{let r=t.__ref,n=r.__optimisticSnapshot;n!==void 0&&(xn(t,n,e.as),delete r.__optimisticSnapshot)},eA=async(t,e,r)=>{let n=r?.fetch;if(!n)return;let o=await Rh(n,r);if(!o)return;let s=e.__ref,{method:i,from:a,fields:c,transform:l,as:f,on:u,auth:d,headers:p,baseUrl:h,responseType:g,invalidates:m,optimistic:b,onMutate:_,onSuccess:y,onError:x,onSettled:w}=t,v;if(c===!0||u==="submit")v=Pi(e);else if(O(c)){let A=Pi(e);v={};for(let F of c)v[F]=A[F]}else e.state?.parse?v=e.state.parse():k(e.state)&&(v={...e.state});l&&(v=l(v,e,e.state)),T(_)&&_(v,e,e.state);let P=b?tA(e,t,v):null;s.__fetching=!0,Ye(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),_e(e,"onFetchStart"),Pe(t,e,"onFetchStart");let $=r?.analyze?.emitNetwork,I=$?typeof performance<"u"?performance.now():Date.now():0;$&&$({phase:"start",mode:"mutation",from:a,method:i});try{if(d!==!1&&o.auth!==!1&&o.getSession){let W=await o.getSession();if(d===!0&&!W){P!==void 0&&Ch(e,t);let Tt={message:"Not authenticated"};_e(e,"onFetchError",Tt),Pe(t,e,"onFetchError",Tt);return}}let A=o[i];if(!T(A))return;let F={from:a,data:v,headers:p,baseUrl:h};g!==void 0&&(F.responseType=g),t.params&&(F.params=Sx(t.params,e,r));let Mt=Dl(e,r);Mt&&(F.headers={...F.headers,"Accept-Language":Mt});let H=xx(t),tt=await wx(()=>A(F),H),{data:et,error:V}=tt||{};if(V){P!==void 0&&Ch(e,t),Ye(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:V,status:"error",fetchStatus:"idle"}),_e(e,"onFetchError",V),T(x)&&x(V,v,e),T(w)&&w(null,V,v,e),$&&$({phase:"error",mode:"mutation",from:a,method:i,error:V.message||String(V),durationMs:(typeof performance<"u"?performance.now():Date.now())-I});return}if(delete s.__optimisticSnapshot,et!==void 0&&(f||!Th(et))){let W=f?{[f]:et}:et;e.state?.update&&e.state.update(W,{preventFetch:!0})}if(Ye(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),_e(e,"onFetchComplete",et),Pe(t,e,"onFetchComplete",et),T(y)&&y(et,v,e),T(w)&&w(et,null,v,e),$&&$({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-I}),m){let W=O(m)?m:[m];for(let Tt of W)if(Tt===!0||Tt==="*")for(let[z]of zt)z.startsWith(a+":")&&Ri(z);else Ri(Tt)}}catch(A){P!==void 0&&Ch(e,t),Ye(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:A,status:"error",fetchStatus:"idle"}),_e(e,"onFetchError",A),Pe(t,e,"onFetchError",A),T(x)&&x(A,v,e),T(w)&&w(null,A,v,e),$&&$({phase:"error",mode:"mutation",from:a,method:i,error:A.message||String(A),durationMs:(typeof performance<"u"?performance.now():Date.now())-I})}finally{s.__fetching=!1}},Ii=(t,e,r,n)=>{if(!t||!n?.fetch)return;let s=ft(t,e);if(!s)return;let i=O(s)?s.map(c=>yx(ft(c,e),e)).filter(Boolean):[yx(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?eA:Dr;c.on==="create"?f(c,e,n):Promise.resolve().then(()=>{JE({...c,__runner:f},e,n)}),!l&&c.on==="create"&&(c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&QE(c,e,n)}let a=e.__ref;a.refetch=c=>{for(let l of i)Dr(l,e,n,{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};Dr(f,e,n,{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};Dr(f,e,n,{direction:"previous",force:!0})}},rA={invalidateQueries:t=>{if(!t){Ri();return}if(S(t))for(let[e]of zt)(e.startsWith(t)||e.includes(t))&&Ri(e);else if(O(t)){let e=t.join(":");for(let[r]of zt)r.includes(e)&&Ri(r)}},removeQueries:t=>{if(!t){Ol();return}if(S(t))for(let[e]of zt)(e.startsWith(t)||e.includes(t))&&Ol(e)},getQueryData:t=>Di(t)?.data??void 0,setQueryData:(t,e)=>{let r=Di(t),n=T(e)?e(r?.data):e;Oi(t,n,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let n=await Rh(r,e);if(!n)return;let o=t.cache?.key||`${t.from}:${t.method||"select"}:${JSON.stringify(t.params||"")}`,s=n[t.method||"select"];if(!T(s))return;let i={from:t.from,params:t.params,limit:t.limit,offset:t.offset,order:t.order,single:t.single,headers:t.headers,baseUrl:t.baseUrl};t.responseType!==void 0&&(i.responseType=t.responseType);let a=await s(i);if(a?.data!==void 0&&!a?.error&&!Ph(t)){let c=Oi(o,a.data,null);c.gcTime=Oh(t.cache)?.gcTime||3e5}return a},getCache:()=>zt,clear:()=>Ol(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of zt)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||Ol(r))}},Dh={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||bo.clear(),Ii(e,t,t.state,t.context))}},nA=Ii});function Li(t){let e=this,{__ref:r}=e,n=[].concat(t),o=r.root[n[0]];if(!n||!n.length)return console.log(n,"on",e.key,"is undefined");for(;o.key===n[0]&&(n.shift(),!!n.length);)if(o=o[n[0]],!o)return;return o}function $h(t){let e=this,{parent:r}=e;if(T(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 Lh(t){let e=this,{__ref:r}=e,n=r?.__children;if(n)for(let o=0;o<n.length;o++){let s=n[o],i=e[s];if(s===t)return i;if(T(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 Mh(t,e=[]){let r=this,{__ref:n}=r,o=n?.__children;if(o){for(let s=0;s<o.length;s++){let i=o[s],a=r[i];if(i===t)e.push(a);else if(T(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 Il(t={}){let e=this;if(e.node?.style){for(let r in t){let n=t[r],o=e[r];if(k(n)&&o)Il.call(o,n);else if(n!=null){let s=r.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),i=String(n).replace(/\s*!important\s*$/,"");e.node.style.setProperty(s,i,"important")}}return e}}function vx(t){let e=this;if(Pr("beforeRemove",e,t)===!1)return e;T(e.node.remove)?e.node.remove():Or()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=Gs(e.parent.__ref.__children,e.key)),Pr("remove",e,t)}function Fh(t){return this[t]}function Nh(t,e){let r=this;if(t)return r.update(t,e),r}function jh(t){return t?this.__ref&&this.__ref[t]:this.__ref}function Bh(){let t=this.getRef("__children");return Array.isArray(t)?t.map(e=>this[e]):[]}function Mi(){return this.getRef().path}function Ni(t){let e=null,r=n=>n.__element&&n.root?.isRootState;if(!this)e=kx();else if(r(this))e=this.root;else if(this.__ref&&this.__ref.path){let n=this.state&&r(this.state),o=T(this.state)&&this.parent.state&&r(this.parent.state);(n||o)&&(e=this.state.root||this.parent.state.root)}return e||(e=kx()),t?e?.[t]:e}function ji(t){let e=this?.__ref?.root||this.getRootState()?.__element;if(!e)throw new Error(`[smbls] getRoot() could not resolve a root element for "${this?.key||"<unknown>"}" \u2014 it has no __ref (never went through create()) and no root state is registered. Answering undefined here used to no-op silently for every caller.`);return 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 Ui(t){let e=this.getRoot()?.context;return t?e[t]:e}function Vi(t){let e=this.context;return t?e[t]:e}function $l(){let t=this,e=[];for(let r in t)!Object.prototype.hasOwnProperty.call(t,r)||Ar.has(r)&&!Qs.has(r)||e.push(r);return e}function Ll(t=[]){let e=this,r={},n=$l.call(e),o=n.includes("children"),s=t.length?new Set(t):null;for(let i=0;i<n.length;i++){let a=n[i];if(s&&s.has(a)||!Object.prototype.hasOwnProperty.call(e,a)||o&&a==="content")continue;let c=e[a];if(a==="state"){if(e.__ref&&!e.__ref.__hasRootState)continue;let l=T(c&&c.parse)?c.parse():c;r[a]=T(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 Ct(c)&&Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=c)}return r}function $i(t=[],e=new WeakSet){let r=this;if(e.has(r))return;e.add(r);let n=Ll.call(r,t),o=t.length?new Set(t):null;for(let s in n){if(o&&o.has(s)||!Object.prototype.hasOwnProperty.call(r,s))continue;let i=n[s];Array.isArray(i)?n[s]=i.map(a=>N(a)?$i.call(a,t,e):a):N(i)&&(n[s]=$i.call(i,t,e))}return n}function xo(...t){if($r!=="test"&&$r!=="development")return;let e=this,{__ref:r}=e;return console.groupCollapsed(e.key),t.length?t.forEach(n=>console.log(`%c${n}:
21
+ `,"font-weight: bold",e[n])):(console.log(r.path),e.keys().forEach(o=>console.log(`%c${o}:`,"font-weight: bold",e[o]))),console.log(e),console.groupEnd(e.key),e}function Vh(...t){($r==="test"||$r==="development")&&console.log(...t)}function zi(...t){($r==="test"||$r==="development")&&console.warn(...t)}function Sn(...t){if($r==="test"||$r==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&xo.call(this),new Error(...t)}}function Hi(){let t=this,{key:e,parent:r}=t,{__children:n}=r.__ref,o=n.indexOf(e),s=n[o+1];return r[s]}function Wi(t){let e=t||this,{key:r,parent:n}=e,{__children:o}=n.__ref;if(!o)return;let s=o.indexOf(r);return n[o[s-1]]}function qi(t={}){let e=this;e.data||(e.data={}),e.data.varCaches||(e.data.varCaches={});let r=e.data.varCaches,n={},o;for(let s in t)t[s]!==r[s]&&(o=!0,n[s]=t[s]);return{changed:s=>{if(!o)return;let i=s(n,lt(r));for(let a in n)r[a]=n[a];return i},timeout:(s,i)=>{if(!o)return;let a=setTimeout(()=>{s(n),clearTimeout(a)},i)}}}function zh(t,...e){let r=this.context,n=r.utils?.[t]||r.functions?.[t]||r.methods?.[t]||r.snippets?.[t];if(n)try{let o=n.call(this,...e);return o&&typeof o.then=="function"&&o.catch(s=>{Sn.call(this,s)}),o}catch(o){if(Sn.call(this,o),r?.strictMode)throw o}}async function Ki(){let t=this,e=t.context?.fetch;if(!e)return null;if(typeof e.select=="function"){if(!e.__authInitialized&&e.getSession){let{initAdapterAuth:o}=await Promise.resolve().then(()=>(Ir(),wn));await o(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:o}=await Promise.resolve().then(()=>(Ir(),wn));await o(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let r=Promise.resolve().then(()=>(Ir(),wn)).then(({resolveDb:o})=>o(e));e.__resolving=r;let n=await r;if(e.__resolved=n,t.context.fetch=n,delete e.__resolving,n?.getSession){let{initAdapterAuth:o}=await Promise.resolve().then(()=>(Ir(),wn));await o(n,t.context)}return n}function Gi(t){let e=this,r=t||Ei.useStateQuery||e.context?.useStateQuery;if(!r)return null;let n={};if(Ih(e,n),r===!0)return n;let o=fA[r];return o?o(n):n}function Hh(t,e){return!!(lo.has(t)||e?.context?.methods?.[t])}var $r,Cx,Fi,kx,Uh,Ih,oA,Ex,sA,iA,aA,cA,lA,fA,Ax=j(()=>{"use strict";xh();fo();Rt();fr();Dp();co();Sh();$r="production";Cx=null,Fi=t=>{Cx=t||null},kx=()=>Cx||null;Uh=(t,e,r,n)=>Object.defineProperty(t,e,{get:r,set:n});Ih=(t,e)=>{let r=t.__ref;if(!r)return;let n=r.__state;n&&typeof n=="string"&&oA(e,n);let o=r.__children;if(o)for(let a=0;a<o.length;a++){let c=t[o[a]];c&&c.__ref&&Ih(c,e)}let s=r.contentElementKey||"content",i=t[s];i&&i.__ref&&Ih(i,e)},oA=(t,e)=>{let n=e.replaceAll("../","").replaceAll("~/","").split("/"),o=t;for(let s=0;s<n.length;s++){let i=n[s];s===n.length-1?o[i]||(o[i]=!0):(o[i]===!0&&(o[i]={}),o[i]||(o[i]={}),o=o[i])}},Ex=(t,e=0)=>{let r=" ".repeat(e),n=Object.entries(t);return n.length?n.map(([s,i])=>i===!0?`${r}${s}`:`${r}${s} {
22
+ ${Ex(i,e+1)}
23
23
  ${r}}`).join(`
24
- `):""},zE=t=>`{
25
- ${_x(t,1)}
26
- }`,HE=t=>{let e={fields:{},include:[]},r=(n,o)=>{let s=[];for(let i in n)if(n[i]===!0)s.push(i);else{let a=o?`${o}.${i}`:i;e.include.push(a),r(n[i],a)}s.length&&(e.fields[o||"_root"]=s)};return r(t,""),e},WE=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:n}=e(t),o=[];return r&&o.push(`$select=${r}`),n&&o.push(`$expand=${n}`),o.join("&")},qE=(t,e)=>{let r=[],n=[],o=new Set,s=(f,u,d)=>{o.add(u),d&&n.push(`LEFT JOIN ${u} ON ${u}.${d}_id = ${d}.id`);for(let p in f)f[p]===!0?r.push(`${u}.${p}`):s(f[p],p,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=[...o][0]||"_root",c=r.length?r.join(", "):"*",l=n.length?`
24
+ `):""},sA=t=>`{
25
+ ${Ex(t,1)}
26
+ }`,iA=t=>{let e={fields:{},include:[]},r=(n,o)=>{let s=[];for(let i in n)if(n[i]===!0)s.push(i);else{let a=o?`${o}.${i}`:i;e.include.push(a),r(n[i],a)}s.length&&(e.fields[o||"_root"]=s)};return r(t,""),e},aA=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:n}=e(t),o=[];return r&&o.push(`$select=${r}`),n&&o.push(`$expand=${n}`),o.join("&")},cA=(t,e)=>{let r=[],n=[],o=new Set,s=(f,u,d)=>{o.add(u),d&&n.push(`LEFT JOIN ${u} ON ${u}.${d}_id = ${d}.id`);for(let p in f)f[p]===!0?r.push(`${u}.${p}`):s(f[p],p,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=[...o][0]||"_root",c=r.length?r.join(", "):"*",l=n.length?`
27
27
  `+n.join(`
28
28
  `):"";return`SELECT ${c}
29
- FROM ${a}${l}`},KE=t=>{let e=[],r=(n,o)=>{for(let s in n){let i=o?`${o}/${s}`:s;n[s]===!0?e.push(i):r(n[s],i)}};return r(t,""),e},GE={graphql:zE,"json-api":HE,odata:WE,sql:qE,paths:KE}});var YE,Uh,wx=j(()=>{"use strict";Kc();YE={snapshotId:si},Uh=(t,e)=>{let r=t.__ref,{currentSnapshot:n,calleeElement:o}=e;if(!o||o===t){let a=YE.snapshotId();return r.__currentSnapshot=a,[a,t]}let i=o.__ref.__currentSnapshot;return n<i?[i,o,!0]:[i,o]}});var $l,Vh,Sx=j(()=>{$l=new Set(["__proto__","constructor","prototype","_id","__v","id","createdAt","updatedAt","schema"]),Vh=t=>typeof t=="string"&&$l.has(t)});async function zh(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 kx=j(()=>{"use strict"});var xo,wo,Ki,_e,Lr,So,Gi,Pe,Ll,XE,kn,ZE,ko,vo,Hh,vx=j(()=>{"use strict";xo=t=>t!=="latest"?`@${t}`:"",wo=t=>t?`/${t}`:"",Ki=t=>{let e=typeof t=="string"?t.replace(/\/+$/,""):"";if(!e)return{name:"",subpath:""};let r=e.split("/"),n=e.startsWith("@")?2:1;return{name:r.slice(0,n).join("/"),subpath:r.slice(n).join("/")}},_e={skypack:{url:"https://cdn.skypack.dev",formatUrl:(t,e,r)=>`${_e.skypack.url}/${t}${xo(e)}${wo(r)}`},esmsh:{url:"https://esm.sh",formatUrl:(t,e,r)=>`${_e.esmsh.url}/${t}${xo(e)}${wo(r)}`},unpkg:{url:"https://unpkg.com",formatUrl:(t,e,r)=>`${_e.unpkg.url}/${t}${xo(e)}${wo(r)}?module`},jsdelivr:{url:"https://cdn.jsdelivr.net/npm",formatUrl:(t,e,r)=>`${_e.jsdelivr.url}/${t}${xo(e)}${wo(r)}/+esm`},symbols:{url:"https://pkg.symbo.ls",formatUrl:(t,e,r)=>`${_e.symbols.url}/${t}${xo(e)}${wo(r)}/+esm`}},Lr={"esm.sh":"esmsh",unpkg:"unpkg",skypack:"skypack",jsdelivr:"jsdelivr","pkg.symbo.ls":"symbols"},So=(t={})=>{let{packageManager:e}=t;return Lr[e]||null},Gi=t=>{if(typeof t!="string")return t;let e=t.trim().match(/^[\^~](\d.*)$/);return e?e[1]:t},Pe=(t,e="latest",r="esmsh")=>{let n=_e[r]||_e.esmsh,{name:o,subpath:s}=Ki(t);return n.formatUrl(o||t,Gi(e),s)},Ll=(t,e="latest",r="esmsh")=>{let n=_e[r]||_e.esmsh,o=Gi(e),{name:s,subpath:i}=Ki(t);return`${n.url}/${s||t}${xo(o)}${wo(i)}/`},XE=/^node:|^@symbo-ls\//,kn=t=>typeof t=="string"&&XE.test(t),ZE=/[<>…]/,ko=t=>typeof t=="string"&&ZE.test(t),vo=t=>!!t&&typeof t=="object"&&!Array.isArray(t),Hh=(t,e="skypack",r={})=>{let n=t.dependencies;if(!vo(n))return"";let o=Object.keys(n);if(!o.length)return"";let s=r.pin||{},i={};for(let f of o){if(kn(f)||ko(f))continue;let u=s[f]||n[f]||"latest";i[f]=Pe(f,u,e),f.endsWith("/")||(i[f+"/"]=Ll(f,u,e))}if(!Object.keys(i).length)return"";let a='<script type="importmap">',c="<\/script>",l=`{
29
+ FROM ${a}${l}`},lA=t=>{let e=[],r=(n,o)=>{for(let s in n){let i=o?`${o}/${s}`:s;n[s]===!0?e.push(i):r(n[s],i)}};return r(t,""),e},fA={graphql:sA,"json-api":iA,odata:aA,sql:cA,paths:lA}});var uA,Wh,Tx=j(()=>{"use strict";Yc();uA={snapshotId:ai},Wh=(t,e)=>{let r=t.__ref,{currentSnapshot:n,calleeElement:o}=e;if(!o||o===t){let a=uA.snapshotId();return r.__currentSnapshot=a,[a,t]}let i=o.__ref.__currentSnapshot;return n<i?[i,o,!0]:[i,o]}});var Ml,qh,Ox=j(()=>{Ml=new Set(["__proto__","constructor","prototype","_id","__v","id","createdAt","updatedAt","schema"]),qh=t=>typeof t=="string"&&Ml.has(t)});async function Kh(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 Rx=j(()=>{"use strict"});var wo,So,Yi,xe,Lr,ko,Xi,De,Fl,dA,kn,pA,vo,Co,Gh,Px=j(()=>{"use strict";wo=t=>t!=="latest"?`@${t}`:"",So=t=>t?`/${t}`:"",Yi=t=>{let e=typeof t=="string"?t.replace(/\/+$/,""):"";if(!e)return{name:"",subpath:""};let r=e.split("/"),n=e.startsWith("@")?2:1;return{name:r.slice(0,n).join("/"),subpath:r.slice(n).join("/")}},xe={skypack:{url:"https://cdn.skypack.dev",formatUrl:(t,e,r)=>`${xe.skypack.url}/${t}${wo(e)}${So(r)}`},esmsh:{url:"https://esm.sh",formatUrl:(t,e,r)=>`${xe.esmsh.url}/${t}${wo(e)}${So(r)}`},unpkg:{url:"https://unpkg.com",formatUrl:(t,e,r)=>`${xe.unpkg.url}/${t}${wo(e)}${So(r)}?module`},jsdelivr:{url:"https://cdn.jsdelivr.net/npm",formatUrl:(t,e,r)=>`${xe.jsdelivr.url}/${t}${wo(e)}${So(r)}/+esm`},symbols:{url:"https://pkg.symbo.ls",formatUrl:(t,e,r)=>`${xe.symbols.url}/${t}${wo(e)}${So(r)}/+esm`}},Lr={"esm.sh":"esmsh",unpkg:"unpkg",skypack:"skypack",jsdelivr:"jsdelivr","pkg.symbo.ls":"symbols"},ko=(t={})=>{let{packageManager:e}=t;return Lr[e]||null},Xi=t=>{if(typeof t!="string")return t;let e=t.trim().match(/^[\^~](\d.*)$/);return e?e[1]:t},De=(t,e="latest",r="esmsh")=>{let n=xe[r]||xe.esmsh,{name:o,subpath:s}=Yi(t);return n.formatUrl(o||t,Xi(e),s)},Fl=(t,e="latest",r="esmsh")=>{let n=xe[r]||xe.esmsh,o=Xi(e),{name:s,subpath:i}=Yi(t);return`${n.url}/${s||t}${wo(o)}${So(i)}/`},dA=/^node:|^@symbo-ls\//,kn=t=>typeof t=="string"&&dA.test(t),pA=/[<>…]/,vo=t=>typeof t=="string"&&pA.test(t),Co=t=>!!t&&typeof t=="object"&&!Array.isArray(t),Gh=(t,e="skypack",r={})=>{let n=t.dependencies;if(!Co(n))return"";let o=Object.keys(n);if(!o.length)return"";let s=r.pin||{},i={};for(let f of o){if(kn(f)||vo(f))continue;let u=s[f]||n[f]||"latest";i[f]=De(f,u,e),f.endsWith("/")||(i[f+"/"]=Fl(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 Wh,Cx=j(()=>{"use strict";Wh=t=>{if(!t)return"";let e=new Date(t),r=new Intl.DateTimeFormat("en",{year:"numeric"}).format(e),n=new Intl.DateTimeFormat("en",{month:"short"}).format(e);return`${new Intl.DateTimeFormat("en",{day:"2-digit"}).format(e)} ${n}, ${r}`}});var qh,Ex=j(()=>{"use strict";qh=(t,e)=>{let r=setTimeout(()=>{let{props:n}=t;if(!e.clientHeight){let{node:{clientHeight:o}}=t;o&&(e.clientHeight=o)}if(e.active){if(n.height==="auto")return;t.update({height:e.clientHeight},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});let o=setTimeout(()=>{t.update({height:"auto"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0}),clearTimeout(o)},450)}else t.update({height:"0"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});clearTimeout(r)})}});var Kh,Ax=j(()=>{"use strict";Kh=function(e){let r=[0,1];for(let n=2;n<=e;n++)r[n]=r[n-1]+r[n-2];return r[e]}});var Gh,Tx=j(()=>{"use strict";Gh=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function Co(t,e={}){let{window:r=globalThis}=e,{document:n=r.document}=e;return new Promise((o,s)=>{let i=n.querySelector(`script[src="${t}"]`);if(i)return o(i);let a=n.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,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load script: ${t}`))},n.head.appendChild(a)})}async function tg(t,e={}){let{window:r=globalThis}=e,{document:n=r.document}=e;return new Promise((o,s)=>{let i=n.querySelector(`link[href="${t}"]`);if(i)return o(i);let a=n.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,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load stylesheet: ${t}`))},n.head.appendChild(a)})}var Yh,Xh,Zh,Jh,Qh,Ox=j(()=>{"use strict";Yh=(t,e=!1,r=document,n="text/javascript")=>new Promise((o,s)=>{try{let i=r.createElement("script");i.type=n,i.async=e,i.src=t,i.addEventListener("load",a=>{o({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)}}),Xh=(t,e=document,r="text/javascript")=>new Promise((n,o)=>{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),n()},s.onerror=()=>{e.body.removeChild(i),o(new Error(`Failed to load: ${t}`))},e.body.appendChild(s)}),Zh=(t,e=document,r,n="text/javascript")=>{let o=new window.XMLHttpRequest;if(o.open("GET",t,!1),o.send(),o.status===200){let s=e.createElement("script");s.type=n,s.text=o.responseText,e.body.appendChild(s),typeof r=="function"&&r()}else throw new Error(`Failed to load the script ${t}`)},Jh=(t,e=!1,r=document,n="text/javascript")=>new Promise((o,s)=>{try{let i=r.createElement("link");i.rel="stylesheet",i.href=t,i.addEventListener("load",a=>{o({status:!0})}),r.head.appendChild(i)}catch(i){s(i)}}),Qh=(t,e=!1,r=document,n="text/javascript",o="smbls-script")=>{try{let s=r.createElement("script");s.type=n,s.async=e,s.id=o,s.innerHTML=t,r.body.appendChild(s)}catch(s){console.warn(s)}}});function eA(t,e){if(!e||typeof e!="object")return t;let r=o=>{if(!tA(o))return o;let s=e[o];return s?.src?s.src:o},n={...t};for(let[o,s]of Object.entries(n))typeof s=="string"?n[o]=r(s):Array.isArray(s)&&(n[o]=s.map(i=>typeof i=="string"?r(i):i));return n}function Ml(t,e){if(!t||!e)return;let r=e.split("."),n=t;for(let o of r){if(n==null||typeof n!="object")return;n=n[o]}return n}function rA(t,e,r){let o=(e.config||e.settings||{}).polyglot||e.polyglot,s=r?.lang||o?.defaultLang||"en",a=(o?.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,p,h)=>{let g=p.trim();if(h==="polyglot")return a[g]??Ml(a,g)??d;if(h==="getLocalStateLang")return Ml(c,g+s)??d;let m=Ml(c,g);return m!==void 0?m:a[g]??Ml(a,g)??d}));return l}function Rx(t){if(!k(t))return{};let e={...t};for(let[r,n]of Object.entries(e))if(typeof n=="function"){let o=n.toString(),s=o.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | getLocalStateLang }}`;continue}let i=o.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(i){e[r]=`{{ ${i[1]} | polyglot }}`;continue}let a=o.match(/s\.(\w+(?:\.\w+)+)/);if(a){e[r]=`{{ ${a[1]} }}`;continue}delete e[r]}else if(typeof n=="string"){let o=n.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(o){e[r]=`{{ ${o[1]} | getLocalStateLang }}`;continue}let s=n.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | polyglot }}`;continue}if(n.includes("=>")&&n.includes("s.")){let i=n.match(/s\.(\w+(?:\.\w+)+)/);if(i){e[r]=`{{ ${i[1]} }}`;continue}}ci(n)&&delete e[r]}return e}function rg(t,e,r,{isProduction:n=!1,channel:o="production"}={}){let s=t.pages?.[e],i=k(s?.state)&&s?.state,a=s?.metadata||s?.helmet||i||{},c=Rx(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=Rx(f),d={};if(t.integrations?.seo?d={...t.integrations.seo,...u,...c}:Object.keys(u).length?d={...u,...c}:d={...c},!d.title){let g=t.name||t.key;g?n?d.title=g:o==="development"?d.title=`${g} / dev:symbo.ls`:o==="staging"?d.title=`${g} / staging:symbo.ls`:d.title=`${g} / symbo.ls`:d.title="Symbols demo"}d=rA(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 p=r?.actualPathname||e;if(d["og:url"]||d.url){let g=(d["og:url"]||d.url||"").replace(/\/$/,"");if(g&&p&&p!=="/"){let m=p.startsWith("/")?p:"/"+p;d["og:url"]=g+m}}d=eA(d,t.files);let h=t.name||t.app?.metadata?.title||t.app?.name||"";for(let[g,m]of Object.entries(d))if(typeof m=="string"&&m.includes("{{")){let b=m.replace(/\{\{[^}]*\}\}/g,"").trim();b?d[g]=b:g==="title"?d[g]=h:delete d[g]}return d}var Rt,JE,Eo,QE,Fl,eg,tA,Px=j(()=>{"use strict";Ot();_n();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(" "),Eo=t=>{let e=5381,r=String(t);for(let n=0;n<r.length;n++)e=(e*33^r.charCodeAt(n))>>>0;return e.toString(36)},QE=new Set(["jsonLd","styles","scripts"]),Fl=t=>{let e=[];if(Array.isArray(t.jsonLd))for(let r of t.jsonLd){if(r==null)continue;let n=typeof r=="string"?r:JSON.stringify(r),o=String(n).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${Eo(n)}">${o}<\/script>`)}if(Array.isArray(t.styles))for(let r of t.styles){if(r==null||!String(r).trim())continue;let n=String(r).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${Eo(n)}">${n}</style>`)}if(Array.isArray(t.scripts))for(let r of t.scripts){if(!r)continue;let n=typeof r=="string",o=n?r:r.src;if(!o&&!r.body)continue;let s=[];o&&s.push(`src="${Rt(o)}"`),n||(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(o||Eo(r.body||""))}"`;if(!n&&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},eg=(t,e)=>{e||(t={...t,robots:"noindex"});let r=Object.entries(t).reduce((n,[o,s])=>{if(!s&&s!==0&&s!==!1||QE.has(o))return n;if(o==="title")return n.push(`<title>${Rt(s)}</title>`),n;if(o==="canonical")return n.push(`<link rel="canonical" href="${Rt(s)}">`),n;if(o==="manifest")return n.push(`<link rel="manifest" href="${Rt(s)}">`),n;if(o==="favicon"||o==="favicons"||o==="icon"||o==="icons")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="string")n.push(`<link rel="icon" href="${Rt(f)}">`);else if(typeof f=="object"){let u=JE(f);/rel=/.test(u)?n.push(`<link ${u}>`):n.push(`<link rel="icon" ${u}>`)}}),n;if(o==="alternate")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).filter(([d,p])=>p!==void 0).map(([d,p])=>`${d}="${Rt(p)}"`).join(" ");n.push(`<link rel="alternate" ${u}>`)}}),n;let i=(l,f,u="name")=>{if(typeof f=="string"||typeof f=="number"||typeof f=="boolean")n.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")n.push(`<meta ${u}="${Rt(l)}" content="${Rt(d)}">`);else if(typeof d=="object"){let p=Object.entries(d).filter(([h,g])=>g!==void 0).map(([h,g])=>`${h}="${Rt(g)}"`).join(" ");n.push(`<meta ${p}>`)}});else if(typeof f=="object"){let d=Object.entries(f).filter(([p,h])=>h!==void 0).map(([p,h])=>`${p}="${Rt(h)}"`).join(" ");n.push(`<meta ${d}>`)}};if(o.startsWith("http-equiv:")){let l=o.replace("http-equiv:","");return i(l,s,"http-equiv"),n}if(o.startsWith("itemprop:")){let l=o.replace("itemprop:","");return i(l,s,"itemprop"),n}let c=["og:","twitter:","fb:","article:","profile:","book:","business:","music:","product:","video:","DC:","DCTERMS:"].find(l=>o.startsWith(l));if(c){let l=o.replace(c,"");return i(`${c.replace(":","")}:${l}`,s,c==="twitter:"||c==="DC:"||c==="DCTERMS:"?"name":"property"),n}if(o.startsWith("apple:")||o.startsWith("msapplication:")){let l=o.startsWith("apple:")?"apple-":"msapplication-",f=o.replace(/^apple:|^msapplication:/,"");return i(`${l}${f}`,s,"name"),n}return i(o,s),n},['<meta charset="UTF-8">','<meta name="viewport" content="width=device-width, initial-scale=1">']);return r.push(...Fl(t)),r.join(`
32
- `)},tA=t=>typeof t=="string"&&t.length>0&&!t.startsWith("/")&&!t.startsWith("http")});var Nl,ng,Dx=j(()=>{"use strict";Ot();Nl=(t,e)=>(O(e)?e:Object.values(e)).reduce((r,n)=>Math.abs(n-t)<Math.abs(r-t)?n:r),ng=(t,e)=>(t=parseFloat(t),k(e)&&(e=Object.values(e)),Nl(t,e))});function Ao(t){let e=String(t||"").trim();if(!e)return{owner:Ix,key:"",full:""};let r=null,n=e;if(e.includes("/")){let s=e.indexOf("/");r=e.slice(0,s),n=e.slice(s+1)}n=n.replace(/\.symbo\.ls$/iu,""),r||(r=Ix);let o=n?`${r}/${n}`:"";return{owner:r,key:n,full:o}}async function jl(t,e={}){if((e.provider||"kv")==="api")return Lx(t,e);let n=await dA(t,e);return n||Lx(t,e)}async function dA(t,e={}){let r=e.kvBaseUrl||nA,n=e.env||"production",o=`${r}/kv/${encodeURIComponent(t)}?env=${n}`;try{let s=await fetch(o,{method:"GET"});return s.ok&&(await s.json())?.value||null}catch{return null}}async function Lx(t,e={}){let r=e.apiBaseUrl||oA,{key:n}=Ao(t);try{let o=`${r}/core/projects/libraries/available?search=${encodeURIComponent(n)}&limit=10`,s=await fetch(o,{method:"GET"});if(!s.ok)return null;let i=await s.json(),c=(i?.items||i?.data||(Array.isArray(i)?i:[])).find(p=>{let{key:h}=Ao(p?.key);return h.toLowerCase()===n.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 Mx(t,e={}){if(k(t))return t;if(S(t)){let{full:r}=Ao(t);if(!r)return null;try{let n=await jl(r,e);return n||console.warn(`[smbls] Shared library "${r}" not found`),n}catch(n){return console.warn(`[smbls] Failed to fetch shared library "${r}":`,n.message),null}}return null}async function sg(t,e={}){return!t||!t.length?[]:(await Promise.all(t.map(async n=>{if(Xe(n)){let o=await Mx(fA(n),e);return o?{library:o,ignoreList:n.ignoreList}:null}return Mx(n,e)}))).filter(Boolean)}var Ix,nA,oA,Yi,Fx,sA,iA,$x,Nx,aA,cA,lA,Mr,og,Xe,fA,uA,Xi,jx=j(()=>{"use strict";Ot();Ix="system",nA="https://smbls-kv.nika-980.workers.dev",oA="https://api.symbols.app";Yi=(t,e,r,n)=>{for(let o in e){let s=n?`${n}/${o}`:o;r&&r.has(s)||(o in t?k(t[o])&&k(e[o])&&Yi(t[o],e[o],r,s):t[o]=e[o])}},Fx=(t,e,r)=>{if(!k(t)||!e.size)return t;let n=`${r}/`,o=!1;for(let i of e)if(i.startsWith(n)){o=!0;break}if(!o)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]=Fx(t[i],e,a))}return s},sA=new Set,iA=new Set(["components","pages","functions","snippets","methods"]),$x=(t,e)=>e===""&&iA.has(t),Nx=["fontFamily","fontfamily","font_family","FONT_FAMILY"],aA=t=>{let e=new Map;if(!k(t))return e;for(let r of Nx){let n=t[r];if(k(n))for(let o in n)!k(n[o])||!n[o].isDefault||(e.has(r)||e.set(r,new Set),e.get(r).add(o))}return e},cA=(t,e)=>{for(let r of Nx){let n=t[r];if(!k(n))continue;let o=e.get(r),s=null;for(let i in n){let a=n[i];if(!k(a)||!a.isDefault||o&&o.has(i))continue;let c={...a};delete c.isDefault,s||(s={...n}),s[i]=c}s&&(t[r]=s)}},lA=t=>t.replace(/\.js$/iu,""),Mr=t=>{let e=new Set;if(!Array.isArray(t))return e;for(let r of t){if(!S(r))continue;let n=r.split("/").map(o=>lA(o.trim())).filter(Boolean).join("/");n&&e.add(n)}return e},og=(t,e={})=>({library:t,ignoreList:Array.isArray(e.ignoreList)?e.ignoreList:[]}),Xe=t=>k(t)&&Array.isArray(t.ignoreList)&&("library"in t||"key"in t||"name"in t),fA=t=>t.library!==void 0?t.library:t.key??t.name,uA=(t,e,r)=>{let n=Mr(e.sharedLibIgnore);e.sharePages===!1&&n.add("pages");let o=n.size?new Set([...r,...n]):r;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&!(s==="sharePages"||s==="sharedLibIgnore")&&s!=="app"&&!o.has(s))if(k(e[s])&&k(t[s]))if(s==="designSystem")Yi(t[s],e[s],o,s);else for(let i in e[s])o.has(`${s}/${i}`)||(i in t[s]?$x(s,t[s][i])&&!$x(s,e[s][i])&&(t[s][i]=e[s][i]):t[s][i]=e[s][i]);else s in t||(t[s]=Fx(e[s],o,s))},Xi=(t,e)=>{if(!e||!e.length)return;let r=aA(t.designSystem);for(let n=0;n<e.length;n++){let o=e[n],s=sA;Xe(o)&&(s=Mr(o.ignoreList),o=o.library),k(o)&&uA(t,o,s)}r.size&&cA(t.designSystem,r)}});var ig,ag,cg,Zi,lg,Ji,fg,vn,Bx=j(()=>{"use strict";Ot();ig=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},ag=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)}},cg=t=>t.replace(/[^a-zA-Z0-9_]/g,""),Zi=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,"")),lg=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),Ji=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),fg=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},vn=t=>{if(O(t))return t;if(S(t))return t.split(" ");if(k(t))return Object.values(t);if(ze(t))return[t]}});var ug,Ux=j(()=>{"use strict";ug=()=>{let t=document.styleSheets[0],e="";if(t)try{let r=t.cssRules||t.rules;for(let n=0;n<r.length;n++)e+=r[n].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 Yt,To,Qi,ta,Vx=j(()=>{"use strict";Yt=t=>{let e=t&&t.src;if(!e||typeof e!="string")return null;let r=t.context;if(!r)return null;let n=r.assets&&r.assets[e]||r.files&&r.files[e];if(!n)return null;if(typeof n=="string")return{src:n,type:null,variants:null};if(typeof n=="object"){if(typeof n.src=="string")return n;let o=n.content,s=o&&o.src;if(typeof s=="string")return{...n,src:s,type:n.type??o.type??null,variants:n.variants??o.variants??null}}return null},To=(t,{keepOneX:e=!0}={})=>{if(!Array.isArray(t)||!t.length)return"";let r=t.some(o=>typeof o.width=="number"),n=[];for(let o of t)r&&typeof o.width=="number"?n.push(`${o.src} ${o.width}w`):r||(o.scale===1&&e?n.push(o.src):o.scale&&o.scale!==1&&n.push(`${o.src} ${o.scale}x`));return n.join(", ")},Qi=t=>{if(!t||!Array.isArray(t.variants))return"";let e=t.variants.filter(r=>r.format===t.type);return To(e,{keepOneX:!1})},ta=(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 n=[];for(let[a,c]of r)a!==t.type&&n.push({tag:"source",attr:{type:a,srcset:To(c,{keepOneX:!0})}});let o=r.get(t.type)||[],s=To(o,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...n,{tag:"img",attr:i}]}});var Bl={};I(Bl,{CDN_PROVIDERS:()=>_e,DOMQL_EVENTS:()=>fp,DOMQ_PROPERTIES:()=>Ar,ENV:()=>Ep,HTML_TAGS:()=>po,METHODS:()=>co,METHODS_EXL:()=>Js,NODE_ENV:()=>Oe,OPTIONS:()=>vi,PACKAGE_MANAGER_TO_CDN:()=>Lr,PARSED_DOMQ_PROPERTIES:()=>Zs,PROPS_METHODS:()=>Tr,STATE_METHODS:()=>gn,STATE_PROPERTIES:()=>lp,SVG_TAGS:()=>V_,TYPES:()=>Hs,UNIVERSAL_RESERVED_KEYS:()=>$l,addCaching:()=>ml,addContext:()=>gl,addExtend:()=>Xp,addExtends:()=>We,addItemAfterEveryElement:()=>Xd,addProtoToArray:()=>Ks,addRef:()=>dl,applyDependentState:()=>gh,applyEvent:()=>Sl,applyEventUpdate:()=>kl,applyExtends:()=>W_,applyProps:()=>yi,arrayContainsOtherArray:()=>zd,arraysEqual:()=>Jd,arrayzeValue:()=>vn,buildImgSrcset:()=>Qi,buildSourcesAndImg:()=>ta,cache:()=>xh,call:()=>jh,captureSnapshot:()=>Uh,checkForStateTypes:()=>uh,checkIfInherits:()=>wl,checkIfStringIsInArray:()=>ep,clone:()=>dp,cloneAndMergeArrayExtend:()=>li,cloneFunction:()=>$p,collectExtendsList:()=>ho,concatAddExtends:()=>Kp,copyJavaScriptToClipboard:()=>ag,copyStringToClipboard:()=>ig,createBasedOnType:()=>ul,createElement:()=>fh,createElementExtends:()=>Qc,createExtends:()=>ui,createExtendsFromKeys:()=>go,createExtendsStack:()=>nl,createIfConditionFlag:()=>Lp,createInheritedState:()=>dh,createKey:()=>ii,createNestedObject:()=>_p,createNestedObjectByKeyPath:()=>hh,createObjectWithoutPrototype:()=>qc,createParent:()=>pl,createPath:()=>hl,createProps:()=>bi,createPropsStack:()=>ll,createRoot:()=>lh,createScope:()=>yh,createSnapshotId:()=>si,customDecodeURIComponent:()=>cp,customEncodeURIComponent:()=>ap,cutArrayAfterValue:()=>Gd,cutArrayBeforeValue:()=>Kd,debounce:()=>ai,debounceOnContext:()=>Dp,decodeNewlines:()=>ip,deepClone:()=>lt,deepContains:()=>yp,deepDefaults:()=>Yi,deepDestringifyFunctions:()=>me,deepExtend:()=>Jc,deepMerge:()=>ot,deepMergeExtends:()=>qe,deepStringifyFunctions:()=>ti,defineSetter:()=>Fh,destringifyGlobalScope:()=>ri,detectHeightOnInit:()=>qh,detectInfiniteLoop:()=>kp,document:()=>et,encodeNewlines:()=>sp,error:()=>Sn,excludeKeysFromObject:()=>Cp,exec:()=>ft,extendCachedRegistry:()=>Gp,extendStackRegistry:()=>di,extractArrayExtend:()=>hi,fetchLibraryData:()=>jl,fibonacciNumberByIndex:()=>Kh,filterArrays:()=>Qd,filterArraysFast:()=>tp,finalizeExtends:()=>ol,findClosestNumber:()=>Nl,findClosestNumberInFactory:()=>ng,findInheritedState:()=>xl,findKeyPosition:()=>np,flattenExtend:()=>mo,formatDate:()=>Wh,generateHash:()=>Yc,generateHeadArrayTags:()=>Fl,generateKey:()=>oi,generateMetaTags:()=>eg,get:()=>Ih,getCDNDirUrl:()=>Ll,getCDNUrl:()=>Pe,getCapitalCaseKeys:()=>Qp,getCdnProviderFromConfig:()=>So,getChildStateInKey:()=>_l,getChildren:()=>Mh,getContext:()=>Bi,getCookie:()=>Bp,getDB:()=>Wi,getEmotionStylesheet:()=>ug,getExtendsInElement:()=>Zp,getExtendsStack:()=>fi,getExtendsStackRegistry:()=>Zc,getFrequencyInArray:()=>Hd,getHashedExtend:()=>pi,getImportMapScript:()=>Hh,getInObjectByPath:()=>Sp,getLocalStorage:()=>Vp,getNev:()=>Rp,getPageMetadata:()=>rg,getParentStateInKey:()=>bl,getPath:()=>$i,getQuery:()=>qi,getRef:()=>Lh,getRoot:()=>Fi,getRootContext:()=>ji,getRootData:()=>Ni,getRootState:()=>Mi,getRootStateInKey:()=>yl,getSpreadChildren:()=>th,global:()=>Bd,hasFunction:()=>He,hasHandlerPlugin:()=>fo,hasOwnProperty:()=>hp,hashContent:()=>Eo,inheritChildExtends:()=>el,inheritChildPropsExtends:()=>tl,inheritParentProps:()=>_i,inheritRecursiveChildExtends:()=>rl,initProps:()=>ih,is:()=>Kt,isArray:()=>O,isBoolean:()=>Uc,isContextComponent:()=>eh,isCyclic:()=>vp,isDOMNode:()=>qt,isDate:()=>zc,isDefined:()=>Ct,isDevelopment:()=>Rr,isEmpty:()=>Hc,isEmptyObject:()=>gp,isEqualDeep:()=>Wc,isFunction:()=>A,isHtmlElement:()=>Vs,isLocal:()=>Op,isLoudDevRuntime:()=>Et,isMalformedDependency:()=>ko,isMethod:()=>Bh,isMobile:()=>Np,isNode:()=>lr,isNot:()=>Vd,isNotProduction:()=>bn,isNull:()=>Vc,isNumber:()=>ze,isObject:()=>k,isObjectLike:()=>N,isPhoto:()=>Gh,isPolyglotWritableKey:()=>ur,isProduction:()=>Or,isStaging:()=>Tp,isState:()=>ph,isString:()=>S,isStringFunction:()=>ci,isTest:()=>Gc,isTesting:()=>Ap,isUndefined:()=>Tt,isUniversallyReservedKey:()=>Vh,isUnresolvableDependency:()=>kn,isValidDependencyMap:()=>vo,isValidHtmlTag:()=>Hp,isWrappedLibrary:()=>Xe,joinArrays:()=>so,jointStacks:()=>Yp,keys:()=>Dl,loadCssFile:()=>Jh,loadJavascript:()=>Qh,loadJavascriptFile:()=>Yh,loadJavascriptFileEmbedSync:()=>Zh,loadJavascriptFileSync:()=>Xh,loadRemoteCSS:()=>tg,loadRemoteScript:()=>Co,log:()=>Nh,logGroupIf:()=>Fp,logIf:()=>Mp,lookdown:()=>Ph,lookdownAll:()=>Dh,lookup:()=>Rh,lowercaseFirstLetter:()=>hn,makeObjectWithoutPrototype:()=>mp,map:()=>up,mapStringsWithContextComponents:()=>gi,markPolyglotSeeded:()=>Ge,matchesComponentNaming:()=>Ke,memoize:()=>Ip,merge:()=>gt,mergeSharedLibraries:()=>Xi,nextElement:()=>Vi,normalizeIgnoreList:()=>Mr,normalizeLibraryKey:()=>Ao,objectToString:()=>ei,objectizeStringProperty:()=>mi,overwrite:()=>ni,overwriteDeep:()=>Gt,overwriteShallow:()=>yn,overwriteState:()=>mh,parse:()=>Il,parseDeep:()=>Di,pickupElementFromProps:()=>al,pickupPropsFromElement:()=>il,polyglotSeededKeys:()=>ki,previousElement:()=>zi,propExists:()=>oh,propertizeElement:()=>cl,propertizeUpdate:()=>nh,remove:()=>yx,removeChars:()=>cg,removeCookie:()=>Up,removeDuplicateProps:()=>wi,removeDuplicatesInArray:()=>io,removeFromArray:()=>Wd,removeFromObject:()=>bp,removeNestedKeyByPath:()=>xp,removeValueFromArray:()=>qs,removeValueFromArrayAll:()=>Yd,reorderArrayByValues:()=>Zd,replaceLiteralsWithObjectFields:()=>Dt,replaceOctalEscapeSequences:()=>op,resolveAsset:()=>Yt,resolveHandler:()=>uo,resolveSharedLibraries:()=>sg,returnValueAsText:()=>fl,runPluginHook:()=>At,self:()=>Ud,setActiveRootState:()=>Li,setCookie:()=>jp,setHashedExtend:()=>Xc,setInObjectByPath:()=>wp,setLocalStorage:()=>zp,setNodeStyles:()=>Pl,setProps:()=>$h,setPropsPrototype:()=>xi,sharedLibrary:()=>og,splitPackageSpecifier:()=>Ki,spotByPath:()=>Ii,srcsetFor:()=>To,stringIncludesAny:()=>Ys,stringToObject:()=>pp,stripVersionRangePrefix:()=>Gi,swapItemsInArray:()=>qd,syncProps:()=>Si,toCamelCase:()=>Zi,toDashCase:()=>Ji,toDescriptionCase:()=>fg,toPriorityOrder:()=>ye,toTitleCase:()=>lg,toggleFullscreen:()=>zh,triggerEventOn:()=>Pr,triggerEventOnUpdate:()=>bh,trimStringFromSymbols:()=>rp,unstackArrayOfObjects:()=>Ws,update:()=>sh,updateProps:()=>ah,variables:()=>Hi,verbose:()=>_o,warn:()=>Ui,window:()=>C});var P=j(()=>{"use strict";Kc();Pp();Ot();fr();_n();ao();zs();j_();B_();Xs();Us();U_();Wp();Jp();ch();sl();Z_();Q_();lo();tx();xx();wh();wx();_h();Sx();kx();vx();Cx();Ex();Ax();Tx();Ox();Px();Dx();jx();Bx();Ux();Vx()});var zC=wd((L9,VC)=>{var Es=1e3,As=Es*60,Ts=As*60,Xn=Ts*24,_2=Xn*7,x2=Xn*365.25;VC.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return w2(t);if(r==="number"&&isFinite(t))return e.long?k2(t):S2(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function w2(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]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*x2;case"weeks":case"week":case"w":return r*_2;case"days":case"day":case"d":return r*Xn;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Ts;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*Es;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function S2(t){var e=Math.abs(t);return e>=Xn?Math.round(t/Xn)+"d":e>=Ts?Math.round(t/Ts)+"h":e>=As?Math.round(t/As)+"m":e>=Es?Math.round(t/Es)+"s":t+"ms"}function k2(t){var e=Math.abs(t);return e>=Xn?zu(t,e,Xn,"day"):e>=Ts?zu(t,e,Ts,"hour"):e>=As?zu(t,e,As,"minute"):e>=Es?zu(t,e,Es,"second"):t+" ms"}function zu(t,e,r,n){var o=e>=r*1.5;return Math.round(t/r)+" "+n+(o?"s":"")}});var WC=wd((M9,HC)=>{function v2(t){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=o,r.enabled=a,r.humanize=zC(),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,p,h;function g(...m){if(!g.enabled)return;let b=g,_=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,(v,D)=>{if(v==="%%")return"%";x++;let L=r.formatters[D];if(typeof L=="function"){let T=m[x];v=L.call(b,T),m.splice(x,1),x--}return v}),r.formatArgs.call(b,m),(b.log||r.log).apply(b,m)}return g.namespace=f,g.useColors=r.useColors(),g.color=r.selectColor(f),g.extend=n,g.destroy=r.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(p!==r.namespaces&&(p=r.namespaces,h=r.enabled(f)),h),set:m=>{d=m}}),typeof r.init=="function"&&r.init(g),g}function n(f,u){let d=r(this.namespace+(typeof u>"u"?":":u)+f);return d.log=this.log,d}function o(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,p=0,h=-1,g=0;for(;d<f.length;)if(p<u.length&&(u[p]===f[d]||u[p]==="*"))u[p]==="*"?(h=p,g=d,p++):(d++,p++);else if(h!==-1)p=h+1,g++,d=g;else return!1;for(;p<u.length&&u[p]==="*";)p++;return p===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}HC.exports=v2});var qC=wd((ne,Hu)=>{ne.formatArgs=E2;ne.save=A2;ne.load=T2;ne.useColors=C2;ne.storage=O2();ne.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`."))}})();ne.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 C2(){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 E2(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Hu.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),t.splice(n,0,e)}ne.log=console.debug||console.log||(()=>{});function A2(t){try{t?ne.storage.setItem("debug",t):ne.storage.removeItem("debug")}catch{}}function T2(){let t;try{t=ne.storage.getItem("debug")||ne.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function O2(){try{return localStorage}catch{}}Hu.exports=WC()(ne);var{formatters:R2}=Hu.exports;R2.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var h_={};I(h_,{ANIMATION_PROPS:()=>Cm,ARIA_ROLES:()=>ET,ATTR_TRANSFORMS:()=>Bn,BLOCK_PROPS:()=>Em,CDN_PROVIDERS:()=>_e,COMPOUND_CSS_KEYWORDS:()=>En,CONFIG:()=>Rn,CONFIG_MERGE_EXL:()=>ie,CSS_NAMED_COLOR_HEX:()=>Ul,CSS_NATIVE_COLOR_REGEX:()=>oe,CSS_PROPS_REGISTRY:()=>pt,CSS_UNITS:()=>oo,DEFAULT_CONFIG:()=>Ga,DEFAULT_CSS_PROPERTIES_LIST:()=>ht,DELEGATED_EVENTS:()=>Qo,DESIGN_SYSTEM_OPTIONS:()=>nb,DOMQL_EVENTS:()=>fp,DOMQ_PROPERTIES:()=>Ar,DOM_EVENTS:()=>zw,ENV:()=>Ep,FACTORY:()=>se,FLEX_PROPS:()=>Pm,FONT_PROPS:()=>Am,GRID_PROPS:()=>Dm,HOST_REGISTERED_PACKAGES:()=>Xv,HTML_ATTRIBUTES:()=>$f,HTML_TAGS:()=>po,LIFECYCLE_EVENTS:()=>Gr,METHODS:()=>co,METHODS_EXL:()=>Js,MISC_PROPS:()=>Tm,MIXINS:()=>Rf,NODE_ENV:()=>Oe,OPTIONS:()=>vi,PACKAGE_MANAGER_TO_CDN:()=>Lr,PARSED_DOMQ_PROPERTIES:()=>Zs,POSITION_PROPS:()=>Om,PROPS_METHODS:()=>Tr,REGISTRY:()=>Nt,RESERVED_STORE_METHODS:()=>C_,ROUTER_OPTIONS:()=>fu,SIGNAL_ENGINE_KEY:()=>ro,SIGNAL_INSTANCES_KEY:()=>to,STANDARD_SCHEME_QUERIES:()=>df,STATE_PROPERTIES:()=>lp,STORE_METHOD_NAMES:()=>v_,SVG_TAGS:()=>Zo,THEME_PROPS:()=>Rm,TIMING_PROPS:()=>Ba,TYPES:()=>Hs,UNIVERSAL_RESERVED_KEYS:()=>$l,VALUE_TRANSFORMERS:()=>Sf,VERSION:()=>A_,__resetSignalEngine:()=>Fd,__resetSignalInstances:()=>Md,__resetStateShadowWarnings:()=>E_,activateConfig:()=>Kx,addCaching:()=>ml,addContext:()=>gl,addDelegatedEvent:()=>Na,addExtend:()=>Xp,addExtends:()=>We,addItemAfterEveryElement:()=>Xd,addMethods:()=>ss,addProtoToArray:()=>Ks,addRef:()=>dl,aliasCaseVariants:()=>Fo,animation:()=>Mg,appendSVGSprite:()=>Pa,appendSvgIconsSprite:()=>Mn,applyAttrTransforms:()=>Sm,applyCSS:()=>Zy,applyDependentState:()=>gh,applyDocument:()=>Ra,applyEvent:()=>Sl,applyEventUpdate:()=>kl,applyExtends:()=>es,applyHeadings:()=>gf,applyInitialState:()=>Wf,applyMediaSequenceVars:()=>Nr,applyProps:()=>yi,applyReset:()=>Da,applySequenceGlobalVars:()=>ma,applySequenceVars:()=>mr,applySpacingSequence:()=>_a,applyStateMethods:()=>pe,applyTimingSequence:()=>Oa,applyTrueProps:()=>$m,applyTypographySequence:()=>Ea,arrayContainsOtherArray:()=>zd,arraysEqual:()=>Jd,arrayzeValue:()=>vn,assertEmitIntegrity:()=>um,batch:()=>Fc,breakpoints:()=>$g,buildImgSrcset:()=>Qi,buildSourcesAndImg:()=>ta,buildThemeVarStyles:()=>ds,cache:()=>xh,cacheNode:()=>Kr,call:()=>jh,callStateMethod:()=>Va,camelToAttr:()=>er,camelToLowerAttr:()=>Hw,captureSnapshot:()=>Uh,changeGlobalTheme:()=>kf,changeLightness:()=>yg,checkAttributeByTagName:()=>nr,checkEventFunctions:()=>wm,checkForStateTypes:()=>uh,checkIfBoxSize:()=>ba,checkIfInherits:()=>wl,checkIfStringIsInArray:()=>ep,class:()=>Ug,clone:()=>dp,cloneAndMergeArrayExtend:()=>li,cloneFunction:()=>$p,collectExtendsList:()=>ho,color:()=>Ag,colorStringToRgbaArray:()=>xe,components:()=>fs,compositeOverBackdrop:()=>An,concatAddExtends:()=>Kp,contrastRatio:()=>Po,convertSvgToSymbol:()=>ya,copyJavaScriptToClipboard:()=>ag,copyStringToClipboard:()=>ig,create:()=>p_,createAsync:()=>gD,createBasedOnType:()=>ul,createComputed:()=>w_,createConfig:()=>fa,createDefine:()=>ev,createEffect:()=>K,createElement:()=>fh,createElementExtends:()=>Qc,createExtends:()=>ui,createExtendsFromKeys:()=>go,createExtendsStack:()=>nl,createHTMLNode:()=>Xo,createIfConditionFlag:()=>Lp,createInheritedState:()=>dh,createKey:()=>ii,createNestedObject:()=>_p,createNestedObjectByKeyPath:()=>hh,createObjectWithoutPrototype:()=>qc,createParent:()=>pl,createPath:()=>hl,createProps:()=>bi,createPropsStack:()=>ll,createRoot:()=>lh,createScope:()=>yh,createScopeStore:()=>jc,createSignal:()=>js,createSkeleton:()=>yD,createSnapshotId:()=>si,createState:()=>zm,createStore:()=>ir,createSync:()=>mD,css:()=>le,cssMediaVars:()=>sf,cssVars:()=>of,customDecodeURIComponent:()=>cp,customEncodeURIComponent:()=>ap,cutArrayAfterValue:()=>Gd,cutArrayBeforeValue:()=>Kd,debounce:()=>ai,debounceOnContext:()=>Dp,decodeNewlines:()=>ip,deepClone:()=>lt,deepContains:()=>yp,deepDefaults:()=>Yi,deepDestringifyFunctions:()=>me,deepExtend:()=>Jc,deepMerge:()=>ot,deepMergeExtends:()=>qe,deepStringifyFunctions:()=>ti,defaultDefine:()=>ms,defineResolvedThemeSignal:()=>Mo,defineSetter:()=>Fh,defineThemeSignal:()=>Lo,destringifyGlobalScope:()=>ri,destroy:()=>tc,detectHeightOnInit:()=>qh,detectInfiniteLoop:()=>kp,detectTag:()=>qr,devices:()=>Lg,dispose:()=>Xr,encodeNewlines:()=>sp,error:()=>Sn,excludeKeysFromObject:()=>Cp,exec:()=>ft,executeAttr:()=>RT,exetuteClassPerComponent:()=>aO,extendCachedRegistry:()=>Gp,extendStackRegistry:()=>di,extractArrayExtend:()=>hi,extractConditionalAttrs:()=>IT,fetchLibraryData:()=>jl,fibonacciNumberByIndex:()=>Kh,filterArrays:()=>Qd,filterArraysFast:()=>tp,filterAttributesByTagName:()=>OT,finalizeExtends:()=>ol,findClosestNumber:()=>Nl,findClosestNumberInFactory:()=>ng,findHeadingLetter:()=>ff,findHeadings:()=>ga,findInheritedState:()=>xl,findKeyPosition:()=>np,flattenExtend:()=>mo,font:()=>wg,fontFace:()=>vg,fontFamily:()=>Sg,fontFamilyTypes:()=>kg,formatDate:()=>Wh,generateHash:()=>Yc,generateHeadArrayTags:()=>Fl,generateKey:()=>oi,generateMetaTags:()=>eg,generateSequence:()=>Xt,generateSequencePosition:()=>qg,generateSprite:()=>No,generateSubSequence:()=>ha,get:()=>Ih,getActiveConfig:()=>E,getActiveDocument:()=>jn,getActiveLang:()=>rn,getCDNDirUrl:()=>Ll,getCDNUrl:()=>Pe,getCacheSize:()=>pm,getCapitalCaseKeys:()=>Qp,getCdnProviderFromConfig:()=>So,getChildStateInKey:()=>_l,getChildren:()=>Mh,getColor:()=>tt,getColorShade:()=>ql,getContext:()=>Bi,getCookie:()=>Bp,getDB:()=>Wi,getDefaultOrFirstKey:()=>Tn,getEmitStats:()=>Tf,getEmotionStylesheet:()=>ug,getExtendsInElement:()=>Zp,getExtendsStack:()=>fi,getExtendsStackRegistry:()=>Zc,getFnPrefixAndValue:()=>gr,getFontFace:()=>_g,getFontFaceEach:()=>On,getFontFaceEachString:()=>tf,getFontFaceString:()=>ia,getFontFamily:()=>Ca,getFontFormat:()=>Jl,getFontSizeByKey:()=>Aa,getFrequencyInArray:()=>Hd,getHashedExtend:()=>pi,getImportMapScript:()=>Hh,getInObjectByPath:()=>Sp,getLanguages:()=>rc,getLocalStateLang:()=>ac,getLocalStorage:()=>Vp,getMediaColor:()=>Pt,getMediaTheme:()=>ve,getNev:()=>Rp,getObserver:()=>Nc,getPageMetadata:()=>rg,getParentStateInKey:()=>bl,getPath:()=>$i,getQuery:()=>qi,getRef:()=>Lh,getResolvedThemeSignal:()=>qx,getRgbTone:()=>Ze,getRoot:()=>Fi,getRootContext:()=>ji,getRootData:()=>Ni,getRootState:()=>Mi,getRootStateInKey:()=>yl,getSafeInk:()=>pf,getSafeInkInfo:()=>Xg,getSequenceValue:()=>Pn,getSequenceValueBySymbols:()=>lf,getSequenceValuePropertyPair:()=>Qe,getShadow:()=>wa,getShapeByKey:()=>Ta,getSignals:()=>k_,getSpacingBasedOnRatio:()=>ke,getSpacingByKey:()=>vt,getSpreadChildren:()=>th,getSubratio:()=>pa,getSubratioDifference:()=>da,getSystemGlobalTheme:()=>ue,getTheme:()=>tm,getThemeSignal:()=>Wx,getTimingByKey:()=>ce,getTimingFunction:()=>Ce,global:()=>Bd,gradient:()=>Tg,grid:()=>Bg,hasFunction:()=>He,hasHandlerPlugin:()=>fo,hasOwnProperty:()=>hp,hashContent:()=>Eo,hexToRgb:()=>pg,hexToRgbArray:()=>Vl,hexToRgba:()=>gg,hslToRgb:()=>Wl,icons:()=>Pg,inheritChildExtends:()=>el,inheritChildPropsExtends:()=>tl,inheritParentProps:()=>_i,inheritRecursiveChildExtends:()=>rl,init:()=>xr,initPolyglot:()=>pu,initProps:()=>ih,injectGlobal:()=>xt,is:()=>Kt,isArray:()=>O,isBoolean:()=>Uc,isCSSVar:()=>mt,isContextComponent:()=>eh,isCyclic:()=>vp,isDOMNode:()=>qt,isDate:()=>zc,isDefined:()=>Ct,isDevelopment:()=>Rr,isDomDocument:()=>ar,isEmpty:()=>Hc,isEmptyObject:()=>gp,isEnumeratedTrueFalseAttr:()=>rr,isEqualDeep:()=>Wc,isFunction:()=>A,isGoogleFontsUrl:()=>Do,isHostObject:()=>cr,isHtmlElement:()=>Vs,isLocal:()=>Op,isLoudDevRuntime:()=>Et,isMalformedDependency:()=>ko,isMethod:()=>Bh,isMobile:()=>Np,isNode:()=>lr,isNot:()=>Vd,isNotProduction:()=>bn,isNull:()=>Vc,isNumber:()=>ze,isObject:()=>k,isObjectLike:()=>N,isPhoto:()=>Gh,isPlainColor:()=>Ur,isPolyglotWritableKey:()=>ur,isProduction:()=>Or,isRawUnitValue:()=>Bs,isResolvedColor:()=>De,isScalingUnit:()=>pn,isStaging:()=>Tp,isState:()=>ph,isStore:()=>bt,isString:()=>S,isStringFunction:()=>ci,isSvgTag:()=>Jo,isTest:()=>Gc,isTesting:()=>Ap,isTracking:()=>Wm,isUndefined:()=>Tt,isUniversallyReservedKey:()=>Vh,isUnresolvableDependency:()=>kn,isValidDependencyMap:()=>vo,isValidHtmlTag:()=>Hp,isValidTag:()=>Yo,isWasmLoaded:()=>Uk,isWrappedLibrary:()=>Xe,isWritableFamilyBucket:()=>jd,joinArrays:()=>so,jointStacks:()=>Yp,keyframes:()=>Go,keys:()=>Dl,linearChannelToSrgb:()=>Yl,loadCssFile:()=>Jh,loadJavascript:()=>Qh,loadJavascriptFile:()=>Yh,loadJavascriptFileEmbedSync:()=>Zh,loadJavascriptFileSync:()=>Xh,loadRemoteCSS:()=>tg,loadRemoteScript:()=>Co,loadTranslations:()=>oc,loadWasm:()=>Bk,log:()=>Nh,logGroupIf:()=>Fp,logIf:()=>Mp,lookdown:()=>Ph,lookdownAll:()=>Dh,lookup:()=>Rh,lowercaseFirstLetter:()=>hn,makeObjectWithoutPrototype:()=>mp,map:()=>up,mapStringsWithContextComponents:()=>gi,markPolyglotSeeded:()=>Ge,matchesComponentNaming:()=>Ke,media:()=>Cg,memoize:()=>Ip,merge:()=>gt,mergeSharedLibraries:()=>Xi,mixTwoColors:()=>dg,mixTwoRgb:()=>mg,mixTwoRgba:()=>Kl,nextElement:()=>Vi,normalizeIgnoreList:()=>Mr,normalizeLibraryKey:()=>Ao,numToLetterMap:()=>Je,objectToString:()=>ei,objectizeStringProperty:()=>mi,oklabToLinearSrgb:()=>Xl,oklabToOklch:()=>na,oklchToGamutSafeSrgb:()=>oa,oklchToOklab:()=>Zl,opacify:()=>Ro,overwrite:()=>ni,overwriteDeep:()=>Gt,overwriteShallow:()=>yn,overwriteState:()=>mh,parkHostObject:()=>Er,parse:()=>Il,parseColorToken:()=>Ft,parseDeep:()=>Di,pickupElementFromProps:()=>al,pickupPropsFromElement:()=>il,polyglotFunctions:()=>yc,polyglotPlugin:()=>bs,polyglotSeededKeys:()=>ki,popConfig:()=>rt,popStaticCssPass:()=>Ff,previousElement:()=>zi,propExists:()=>oh,propertizeElement:()=>cl,propertizeUpdate:()=>nh,pushConfig:()=>st,pushStaticCssPass:()=>Mf,quietColorProbe:()=>Dn,refreshContextProto:()=>Bf,registerEvent:()=>ts,registerHostPackages:()=>Zv,registerSignalInstance:()=>eo,reinit:()=>Xy,relativeLuminance:()=>Cn,remove:()=>os,removeChars:()=>cg,removeCookie:()=>Up,removeDelegatedEvent:()=>ja,removeDuplicateProps:()=>wi,removeDuplicatesInArray:()=>io,removeFromArray:()=>Wd,removeFromObject:()=>bp,removeNestedKeyByPath:()=>xp,removeValueFromArray:()=>qs,removeValueFromArrayAll:()=>Yd,reorderArrayByValues:()=>Zd,replaceLiteralsWithObjectFields:()=>Dt,replaceOctalEscapeSequences:()=>op,resetEmitStats:()=>fm,resolveAsset:()=>Yt,resolveBorderValue:()=>ae,resolveColorRgb:()=>In,resolveColorsInGradient:()=>$a,resolveConfigDocument:()=>no,resolveFileSource:()=>xm,resolveFileUrl:()=>we,resolveGridTracks:()=>Yw,resolveHandler:()=>uo,resolvePropValue:()=>Yr,resolveShadowValue:()=>$n,resolveSharedLibraries:()=>sg,returnSubThemeOrDefault:()=>bg,returnValueAsText:()=>fl,rgbArrayToHex:()=>zl,rgbToHSL:()=>Hl,rgbToHex:()=>hg,runPluginHook:()=>At,runThroughMedia:()=>hf,schemeGuardSelector:()=>zr,schemeMediaQuery:()=>Vr,scratchDefaultConfig:()=>$o,scratchSystem:()=>zo,scratchUtils:()=>jr,self:()=>Ud,semanticIcons:()=>Dg,sequence:()=>hr,serializeAttrValue:()=>Qt,set:()=>Fn,setActiveConfig:()=>af,setActiveDocument:()=>lm,setActiveRootState:()=>Li,setAdaptiveSchemeVar:()=>Hr,setClass:()=>gR,setClassname:()=>cO,setColor:()=>Br,setCookie:()=>jp,setCssEngineHook:()=>cu,setCustomFont:()=>sa,setCustomFontMedia:()=>Fr,setEach:()=>sm,setFont:()=>va,setFontFamily:()=>Uo,setFontImport:()=>Io,setGradient:()=>jo,setHashedExtend:()=>Xc,setInCustomFontMedia:()=>Ql,setInObjectByPath:()=>wp,setLang:()=>sc,setLocalStorage:()=>zp,setMediaTheme:()=>Bo,setNodeStyles:()=>Pl,setObserver:()=>S_,setProps:()=>$h,setPropsPrototype:()=>xi,setSVG:()=>Vo,setScalingVar:()=>ua,setShadow:()=>Wr,setSubScalingVar:()=>cf,setSvgIcon:()=>Ln,setTheme:()=>ka,setValue:()=>om,setVariables:()=>Kg,setWasmEngine:()=>Fa,shadow:()=>Rg,shape:()=>Hg,sharedLibrary:()=>og,sizes:()=>zg,spacing:()=>Eg,splitPackageSpecifier:()=>Ki,splitSpacedValue:()=>xa,splitTopLevelCommas:()=>pr,splitTopLevelSpaces:()=>ea,splitTransition:()=>wf,spotByPath:()=>Ii,srcsetFor:()=>To,srgbChannelToLinear:()=>Gl,srgbToOklab:()=>ra,stringIncludesAny:()=>Ys,stringToObject:()=>pp,stripVersionRangePrefix:()=>Gi,svg:()=>Fg,svgData:()=>Ng,swapItemsInArray:()=>qd,syncProps:()=>Si,templates:()=>jg,theme:()=>Og,timing:()=>Ig,toCamel:()=>la,toCamelCase:()=>Zi,toDashCase:()=>Ji,toDescriptionCase:()=>fg,toLinearChannel:()=>Oo,toPriorityOrder:()=>ye,toTitleCase:()=>lg,toggleFullscreen:()=>zh,transformBackgroundImage:()=>bf,transformBorder:()=>tr,transformBorderRadius:()=>yr,transformBoxShadow:()=>Ia,transformClassname:()=>eS,transformDuration:()=>La,transformGridTemplate:()=>xf,transformShadow:()=>yf,transformSize:()=>_t,transformSizeRatio:()=>M,transformTextStroke:()=>mf,transformTransition:()=>nm,transformersByPrefix:()=>Lm,transfromGap:()=>_f,translate:()=>nc,triggerEventOn:()=>Pr,triggerEventOnUpdate:()=>bh,trimStringFromSymbols:()=>rp,typography:()=>aa,unit:()=>xg,unstackArrayOfObjects:()=>Ws,update:()=>rs,updateProps:()=>ah,updateVars:()=>hR,upsertTranslation:()=>ic,useCssInProps:()=>de,useHostState:()=>Hm,usePropsAsCSS:()=>Qw,useSelectorsAsCSS:()=>tS,variables:()=>Hi,vars:()=>Vg,verbose:()=>_o,warn:()=>Ui,warnStateKeyShadowsMethod:()=>Bc,window:()=>C,wrapHoverRule:()=>br});module.exports=z1(h_);var Nd={};I(Nd,{RESERVED_STORE_METHODS:()=>C_,SIGNAL_ENGINE_KEY:()=>ro,SIGNAL_INSTANCES_KEY:()=>to,STORE_METHOD_NAMES:()=>v_,VERSION:()=>A_,__resetSignalEngine:()=>Fd,__resetSignalInstances:()=>Md,__resetStateShadowWarnings:()=>E_,batch:()=>Fc,createComputed:()=>w_,createEffect:()=>K,createScopeStore:()=>jc,createSignal:()=>js,createStore:()=>ir,getObserver:()=>Nc,getSignals:()=>k_,isStore:()=>bt,registerSignalInstance:()=>eo,setObserver:()=>S_,warnStateKeyShadowsMethod:()=>Bc});var Td={};I(Td,{WRITE_JOURNAL:()=>Ls,batch:()=>Fs,createComputed:()=>W1,createEffect:()=>q1,createSignal:()=>Ue,getObserver:()=>Ed,journalWrite:()=>Ms,setObserver:()=>H1});var Wt=null,Rc=0,Pc=[],Ed=()=>Wt,H1=t=>{Wt=t},Dc=0,Sd=[];function Ue(t){let e=new Set;function r(){return Wt&&(e.add(Wt),Wt._sources.add(s)),t}function n(i){i!==t&&(t=i,J1(e))}function o(){return t}let s={get:r,set:n,peek:o,_subscribers:e,_type:"signal"};return s}function W1(t){let e,r=!0,n=new Set,o={_sources:new Set,_type:"computed",_subscribers:n,_execute(){Cd(o);let s=Wt;Wt=o;try{e=t(),r=!1}finally{Wt=s}},_notify(){r=!0,n.size>0&&__(n)},get(){return Wt&&(n.add(Wt),Wt._sources.add(o)),r&&o._execute(),e},peek(){return r&&o._execute(),e}};return o._execute(),o}var Te=new Set,kd=!1,Ls=[];function Ms(t){Ls.push(t),Ls.length>32&&Ls.shift()}function q1(t,e){let r=e?.depth??0,n={_sources:new Set,_type:"effect",_depth:r,_label:e?.label,_disposed:!1,_subscribers:new Set,_execute(){if(n._disposed)return;Cd(n);let o=Wt;Wt=n;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{Wt=o}},_notify(){n._disposed||(Rc>0?Pc.push(n):Dc>0?Sd.push(n):Ad(n))},dispose(){n._disposed=!0,Cd(n)}};return n._execute(),n}function Fs(t){Rc++;try{t()}finally{Rc--,Rc===0&&Z1()}}var vd=!1,m_=1e3,K1=8,G1=256,Y1=4;function y_(){return typeof performance<"u"?performance.now():Date.now()}function Ad(t){Te.add(t),!vd&&(kd||(kd=!0,queueMicrotask(b_)))}var Qn=[];function X1(){if(Te.size===1){let[e]=Te;return Te.clear(),e._disposed?0:(e._execute(),1)}Qn.length=0;for(let e of Te)Qn.push(e);Te.clear(),Qn.sort((e,r)=>e._depth-r._depth);let t=0;for(let e=0;e<Qn.length;e++){let r=Qn[e];r._disposed||(r._execute(),t++)}return Qn.length=0,t}function b_(t=0,e=0){if(kd=!1,Te.size===0)return;vd=!0;let r=y_(),n=!1;try{for(;Te.size>0;){if(++t>m_){let o=new Map;for(let c of Te){let l=c._label;if(typeof l=="function")try{l=l()}catch{l="<label error>"}if(l=l||"<unlabeled>",o.set(l,(o.get(l)||0)+1),o.size>=12)break}let s=[...o.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", "),i=new Map;for(let c of Ls)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",m_,"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>"),Te.clear();break}if(e+=X1(),Te.size>0&&(e>=G1||t>=Y1)&&y_()-r>K1){n=!0,setTimeout(()=>b_(t,e),0);break}}}finally{n||(vd=!1)}}function Z1(){for(let t=0;t<Pc.length;t++)Ad(Pc[t]);Pc.length=0}function __(t){Dc++;try{for(let e of t)e._notify()}finally{if(Dc--,Dc===0&&Sd.length>0){let e=Sd.splice(0);for(let r=0;r<e.length;r++)Ad(e[r])}}}function J1(t){__(t)}function Cd(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var Ld={};I(Ld,{RESERVED_STORE_METHODS:()=>Ns,STORE_METHOD_NAMES:()=>$d,__resetStateShadowWarnings:()=>Q1,createScopeStore:()=>nE,createStore:()=>Ic,getSignals:()=>rE,isStore:()=>eE,warnStateKeyShadowsMethod:()=>Id});var Ve=Symbol("store"),$c=Symbol("signals"),$d=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],Ns=new Set($d),Dd=new Set,Od=(t,e)=>t?t+"."+e:String(e);function Id(t,e){let r=(e||"")+"::"+t;if(Dd.has(r))return;Dd.add(r);let n=e?`state.${e}`:"state",o=`[smbls/state] "${t}" is a reserved store-method name and was written as DATA at ${n}.${t}. The value is preserved and readable \u2014 data wins over the method \u2014 but "${n}.${t}(\u2026)" no longer reaches the store method on this node. Use "${n}.$${t}(\u2026)" for the method, or rename the data key. Reserved: ${$d.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(o)}function Q1(){Dd.clear()}var Rd=t=>!t||typeof t!="object"||Array.isArray(t)||t[Ve]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!Lc(t),tE=12,Lc=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function Mc(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 n=0;n<t.length;n++)if(!Mc(t[n],e[n],r+1))return!1;return!0}if(Lc(t)&&Lc(e)){let n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(let s of n)if(!Object.prototype.hasOwnProperty.call(e,s)||!Mc(t[s],e[s],r+1))return!1;return!0}return!1}function Ic(t,e,r,n){r===void 0&&(r=0),n===void 0&&(n="");let o={},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}Ns.has(_)&&Id(_,n);let y=t[_];r<i&&y&&typeof y=="object"&&!Rd(y)?(s[_]=y,o[_]=Ue(Ic(y,e,r+1,Od(n,_)))):(s[_]=y,o[_]=Ue(y))}let a=new Proxy(s,{get(_,y){if(y===Ve)return!0;if(y===$c)return o;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 p;if(y==="$replace")return h;if(y==="$add")return g;if(y==="$remove")return m;if(y==="$destroy")return b;if(y==="$quietUpdate")return l;if(Ns.has(y)&&!Object.prototype.hasOwnProperty.call(o,y))switch(y){case"update":return c;case"parse":return f;case"clean":return u;case"keys":return d;case"values":return p;case"replace":return h;case"add":return g;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(o,y)){let w=o[y].get();if(w!==void 0||!(y!=="root"&&_.root&&_.root!==a))return w}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 w=_.root[y];return x&&!Object.prototype.hasOwnProperty.call(o,y)&&(o[y]=Ue(void 0),o[y].get()),w}if(x)return o[y]=Ue(void 0),o[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(o,y))return _[y]=x,!0;Ns.has(y)&&Id(y,n);let w=Od(n,y);if(Object.prototype.hasOwnProperty.call(o,y))if(x&&typeof x=="object"&&!Rd(x)){if(x===_[y])return!0;let v=o[y].peek(),D=v&&v[Ve]?v.$parse():v;if(Mc(x,D,0))return!0;_[y]=x,Ms(w),o[y].set(Ic(x,e,r+1,w))}else{if(Array.isArray(x)&&x!==_[y]&&Array.isArray(o[y].peek())&&Mc(x,o[y].peek(),0))return!0;o[y].peek()!==x&&Ms(w),_[y]=x,o[y].set(x)}else _[y]=x,x&&typeof x=="object"&&!Rd(x)?o[y]=Ue(Ic(x,e,r+1,w)):o[y]=Ue(x);return!0},has(_,y){return typeof y=="string"&&y.charCodeAt(0)===36&&Ns.has(y.slice(1))?!0:y in o||y in _},ownKeys(_){return Object.keys(o)},getOwnPropertyDescriptor(_,y){return y in o?{enumerable:!0,configurable:!0,value:o[y].peek()}:Object.getOwnPropertyDescriptor(_,y)},deleteProperty(_,y){return o[y]&&(o[y].peek()!==void 0&&Ms(Od(n,y)),o[y].set(void 0),delete o[y]),delete _[y],!0}});function c(_,y){Fs(()=>{for(let w in _)w!=="__proto__"&&(a[w]=_[w])});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 o){if(x==="parent"||x==="root"||x.startsWith("__"))continue;let w=o[x].peek();w&&w[Ve]?y[x]=w.$parse(_):y[x]=w}return y}function u(){return Fs(()=>{for(let _ in o)delete a[_]}),a}function d(){return Object.keys(o)}function p(){return Object.keys(o).map(_=>o[_].peek())}function h(_){return Fs(()=>{for(let y in o)y in _||delete a[y];for(let y in _)y!=="__proto__"&&(a[y]=_[y])}),a}function g(_,y){let x=Object.prototype.hasOwnProperty.call(o,_)?o[_].peek():s[_];if(Array.isArray(x))return a[_]=[...x,y],a;if(x&&typeof x=="object"&&!Array.isArray(x)){if(Lc(y))x[Ve]?x.$update(y):a[_]={...x,...y};else{let w=String(Object.keys(x).length);x[Ve]?x.$update({[w]:y}):a[_]={...x,[w]: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[Ve]===!0}function rE(t){return t[$c]}function nE(t,e){let r={},n={};if(t&&typeof t=="object")for(let i in t)n[i]=t[i],r[i]=Ue(t[i]);let o=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[Ve]?a[Pd]:null}return null};return new Proxy(n,{get(i,a){return a===Ve?!0:a===$c?r:a===Pd?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=o(a);return l?(l===r&&(i[a]=c),l[a].set(c),!0):(i[a]=c,r[a]=Ue(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[Ve]?c[Pd]: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 Pd=Symbol("scope.parent");var dn="3.14.784";var to="__SMBLS_SIGNAL_INSTANCES__",eo=(t,e,r)=>{let n=e||(typeof globalThis<"u"?globalThis:null);if(!n)return null;let o=n[to]||(n[to]={versions:[],engines:0,reported:!1});return typeof o.engines!="number"&&(o.engines=o.versions.length),o.versions.push(t||dn),r||o.engines++,o.engines>1&&!o.reported&&(o.reported=!0,console.error("[smbls] duplicate @symbo.ls/signal instance \u2014",o.engines,"copies of the reactive engine are loaded on this page:",o.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.")),o},Md=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[to]};var ro="__SMBLS_SIGNAL_ENGINE__",x_=(t,e,r)=>{let n=e||dn,o=r||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[ro];return s&&s.engine&&s.version===n?(eo(n,o,!0),s.engine):(s||(o[ro]={version:n,engine:t}),eo(n,o,!1),t)},Fd=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[ro]};var Vt=x_({...Td,...Ld,VERSION:dn},dn),js=Vt.createSignal,w_=Vt.createComputed,K=Vt.createEffect,Fc=Vt.batch,Nc=Vt.getObserver,S_=Vt.setObserver,ir=Vt.createStore,jc=Vt.createScopeStore,bt=Vt.isStore,k_=Vt.getSignals,v_=Vt.STORE_METHOD_NAMES,C_=Vt.RESERVED_STORE_METHODS,Bc=Vt.warnStateKeyShadowsMethod,E_=Vt.__resetStateShadowWarnings,A_=Vt.VERSION;var hm={};I(hm,{assertEmitIntegrity:()=>um,css:()=>le,getActiveDocument:()=>jn,getCacheSize:()=>pm,getEmitStats:()=>Tf,injectGlobal:()=>xt,keyframes:()=>Go,reset:()=>Dw,resetEmitStats:()=>fm,setActiveDocument:()=>lm,setWasmEngine:()=>Fa,wrapHoverRule:()=>br});var im={};I(im,{COMPOUND_CSS_KEYWORDS:()=>En,CONFIG:()=>Rn,CONFIG_MERGE_EXL:()=>ie,CSS_NAMED_COLOR_HEX:()=>Ul,CSS_NATIVE_COLOR_REGEX:()=>oe,CSS_UNITS:()=>oo,FACTORY:()=>se,STANDARD_SCHEME_QUERIES:()=>df,VALUE_TRANSFORMERS:()=>Sf,activateConfig:()=>Kx,aliasCaseVariants:()=>Fo,animation:()=>Mg,appendSVGSprite:()=>Pa,appendSvgIconsSprite:()=>Mn,applyDocument:()=>Ra,applyHeadings:()=>gf,applyMediaSequenceVars:()=>Nr,applyReset:()=>Da,applySequenceGlobalVars:()=>ma,applySequenceVars:()=>mr,applySpacingSequence:()=>_a,applyTimingSequence:()=>Oa,applyTypographySequence:()=>Ea,breakpoints:()=>$g,changeGlobalTheme:()=>kf,changeLightness:()=>yg,checkIfBoxSize:()=>ba,class:()=>Ug,color:()=>Ag,colorStringToRgbaArray:()=>xe,compositeOverBackdrop:()=>An,contrastRatio:()=>Po,convertSvgToSymbol:()=>ya,createConfig:()=>fa,cssMediaVars:()=>sf,cssVars:()=>of,defineResolvedThemeSignal:()=>Mo,defineThemeSignal:()=>Lo,devices:()=>Lg,document:()=>zx,findHeadingLetter:()=>ff,findHeadings:()=>ga,font:()=>wg,fontFace:()=>vg,fontFamily:()=>Sg,fontFamilyTypes:()=>kg,generateSequence:()=>Xt,generateSequencePosition:()=>qg,generateSprite:()=>No,generateSubSequence:()=>ha,getActiveConfig:()=>E,getColor:()=>tt,getColorShade:()=>ql,getDefaultOrFirstKey:()=>Tn,getFnPrefixAndValue:()=>gr,getFontFace:()=>_g,getFontFaceEach:()=>On,getFontFaceEachString:()=>tf,getFontFaceString:()=>ia,getFontFamily:()=>Ca,getFontFormat:()=>Jl,getFontSizeByKey:()=>Aa,getMediaColor:()=>Pt,getMediaTheme:()=>ve,getResolvedThemeSignal:()=>qx,getRgbTone:()=>Ze,getSafeInk:()=>pf,getSafeInkInfo:()=>Xg,getSequenceValue:()=>Pn,getSequenceValueBySymbols:()=>lf,getSequenceValuePropertyPair:()=>Qe,getShadow:()=>wa,getShapeByKey:()=>Ta,getSpacingBasedOnRatio:()=>ke,getSpacingByKey:()=>vt,getSubratio:()=>pa,getSubratioDifference:()=>da,getTheme:()=>tm,getThemeSignal:()=>Wx,getTimingByKey:()=>ce,getTimingFunction:()=>Ce,gradient:()=>Tg,grid:()=>Bg,hexToRgb:()=>pg,hexToRgbArray:()=>Vl,hexToRgba:()=>gg,hslToRgb:()=>Wl,icons:()=>Pg,isCSSVar:()=>mt,isDomDocument:()=>ar,isGoogleFontsUrl:()=>Do,isHostObject:()=>cr,isPlainColor:()=>Ur,isRawUnitValue:()=>Bs,isResolvedColor:()=>De,isScalingUnit:()=>pn,isWritableFamilyBucket:()=>jd,linearChannelToSrgb:()=>Yl,media:()=>Cg,mixTwoColors:()=>dg,mixTwoRgb:()=>mg,mixTwoRgba:()=>Kl,numToLetterMap:()=>Je,oklabToLinearSrgb:()=>Xl,oklabToOklch:()=>na,oklchToGamutSafeSrgb:()=>oa,oklchToOklab:()=>Zl,opacify:()=>Ro,parkHostObject:()=>Er,parseColorToken:()=>Ft,popConfig:()=>rt,pushConfig:()=>st,quietColorProbe:()=>Dn,relativeLuminance:()=>Cn,reset:()=>Hx,resolveBorderValue:()=>ae,resolveColorRgb:()=>In,resolveColorsInGradient:()=>$a,resolveConfigDocument:()=>no,resolveFileUrl:()=>we,resolveShadowValue:()=>$n,returnSubThemeOrDefault:()=>bg,rgbArrayToHex:()=>zl,rgbToHSL:()=>Hl,rgbToHex:()=>hg,runThroughMedia:()=>hf,schemeGuardSelector:()=>zr,schemeMediaQuery:()=>Vr,scratchDefaultConfig:()=>$o,scratchSystem:()=>zo,scratchUtils:()=>jr,semanticIcons:()=>Dg,sequence:()=>hr,set:()=>Fn,setActiveConfig:()=>af,setAdaptiveSchemeVar:()=>Hr,setColor:()=>Br,setCustomFont:()=>sa,setCustomFontMedia:()=>Fr,setEach:()=>sm,setFont:()=>va,setFontFamily:()=>Uo,setFontImport:()=>Io,setGradient:()=>jo,setInCustomFontMedia:()=>Ql,setMediaTheme:()=>Bo,setSVG:()=>Vo,setScalingVar:()=>ua,setShadow:()=>Wr,setSubScalingVar:()=>cf,setSvgIcon:()=>Ln,setTheme:()=>ka,setValue:()=>om,setVariables:()=>Kg,shadow:()=>Rg,shape:()=>Hg,sizes:()=>zg,spacing:()=>Eg,splitSpacedValue:()=>xa,splitTopLevelCommas:()=>pr,splitTopLevelSpaces:()=>ea,splitTransition:()=>wf,srgbChannelToLinear:()=>Gl,srgbToOklab:()=>ra,svg:()=>Fg,svgData:()=>Ng,templates:()=>jg,theme:()=>Og,timing:()=>Ig,toCamel:()=>la,toLinearChannel:()=>Oo,transformBackgroundImage:()=>bf,transformBorder:()=>tr,transformBorderRadius:()=>yr,transformBoxShadow:()=>Ia,transformDuration:()=>La,transformGridTemplate:()=>xf,transformShadow:()=>yf,transformSize:()=>_t,transformSizeRatio:()=>M,transformTextStroke:()=>mf,transformTransition:()=>nm,transfromGap:()=>_f,typography:()=>aa,unit:()=>xg,vars:()=>Vg});var jr={};I(jr,{COMPOUND_CSS_KEYWORDS:()=>En,CSS_NAMED_COLOR_HEX:()=>Ul,CSS_NATIVE_COLOR_REGEX:()=>oe,CSS_UNITS:()=>oo,applyMediaSequenceVars:()=>Nr,applySequenceGlobalVars:()=>ma,applySequenceVars:()=>mr,changeLightness:()=>yg,colorStringToRgbaArray:()=>xe,compositeOverBackdrop:()=>An,contrastRatio:()=>Po,convertSvgToSymbol:()=>ya,findHeadingLetter:()=>ff,findHeadings:()=>ga,generateSequence:()=>Xt,generateSequencePosition:()=>qg,generateSprite:()=>No,generateSubSequence:()=>ha,getColorShade:()=>ql,getDefaultOrFirstKey:()=>Tn,getFnPrefixAndValue:()=>gr,getFontFace:()=>_g,getFontFaceEach:()=>On,getFontFaceEachString:()=>tf,getFontFaceString:()=>ia,getFontFormat:()=>Jl,getRgbTone:()=>Ze,getSequenceValue:()=>Pn,getSequenceValueBySymbols:()=>lf,getSequenceValuePropertyPair:()=>Qe,getSubratio:()=>pa,getSubratioDifference:()=>da,hexToRgb:()=>pg,hexToRgbArray:()=>Vl,hexToRgba:()=>gg,hslToRgb:()=>Wl,isCSSVar:()=>mt,isDomDocument:()=>ar,isGoogleFontsUrl:()=>Do,isHostObject:()=>cr,isRawUnitValue:()=>Bs,isResolvedColor:()=>De,isScalingUnit:()=>pn,isWritableFamilyBucket:()=>jd,linearChannelToSrgb:()=>Yl,mixTwoColors:()=>dg,mixTwoRgb:()=>mg,mixTwoRgba:()=>Kl,numToLetterMap:()=>Je,oklabToLinearSrgb:()=>Xl,oklabToOklch:()=>na,oklchToGamutSafeSrgb:()=>oa,oklchToOklab:()=>Zl,opacify:()=>Ro,parkHostObject:()=>Er,parseColorToken:()=>Ft,relativeLuminance:()=>Cn,resolveConfigDocument:()=>no,resolveFileUrl:()=>we,returnSubThemeOrDefault:()=>bg,rgbArrayToHex:()=>zl,rgbToHSL:()=>Hl,rgbToHex:()=>hg,setCustomFont:()=>sa,setCustomFontMedia:()=>Fr,setFontImport:()=>Io,setInCustomFontMedia:()=>Ql,setScalingVar:()=>ua,setSubScalingVar:()=>cf,setVariables:()=>Kg,splitTopLevelCommas:()=>pr,splitTopLevelSpaces:()=>ea,srgbChannelToLinear:()=>Gl,srgbToOklab:()=>ra,toLinearChannel:()=>Oo});var ar=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0),cr=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)},jd=t=>t!==null&&typeof t=="object"&&!cr(t),Er=(t,e,r)=>{if(!t)return;if(ar(r)){t.__domDocument||(t.__domDocument=r);return}let n=`__host_${e}`;t[n]||(t[n]=r)},no=t=>t?ar(t.__domDocument)?t.__domDocument:ar(t.document)?t.document:null:null;var pn=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",oo=["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"],oE=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),sE=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${oo.filter(t=>t!=="auto").map(oE).join("|")})$`),Bs=t=>sE.test(String(t).trim());P();var Ul={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"},xe=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=Ul[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&&et&&C){let r=et.body.appendChild(et.createElement("fictum")),n="rgb(1, 2, 3)";if(r.style.color=n,r.style.color!==n){et.body.removeChild(r);return}if(r.style.color=t,r.style.color===n||r.style.color==="")return et.body.removeChild(r),[0,0,0,0];t=C.getComputedStyle(r).color,et.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]},dg=(t,e,r=.5)=>(t=xe(t),e=xe(e),Kl(t,e,r)),pg=(t,e=1)=>{let[r,n,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${r},${n},${o})`},Vl=(t,e=1)=>{let[r,n,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[r,n,o]},hg=(t,e,r)=>"#"+(1<<24|t<<16|e<<8|r).toString(16).slice(1),zl=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1),gg=(t,e=1)=>{let[r,n,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${r},${n},${o},${e})`},mg=(t,e,r=.5)=>{let n=[];for(let o=0;o<3;o++)n[o]=~~(t[o]+(e[o]-t[o])*r);return`rgb(${n})`},yg=(t,e)=>{let[r,n,o]=e,s=Math.max(0,Math.min(100,o+parseFloat(t)));return[r,n,s]},Hl=(t,e,r)=>{let n=Math.max(t,e,r),o=n-Math.min(t,e,r),s=1-Math.abs(n+n-o-1),i=o&&(n==t?(e-r)/o:n==e?2+(r-t)/o:4+(t-e)/o);return[60*(i<0?i+6:i),s?o/s:0,(n+n-o)/2]},Wl=(t,e,r,n=e*Math.min(r,1-r),o=(s,i=(s+t/30)%12)=>r-n*Math.max(Math.min(i-3,9-i,1),-1))=>[o(0),o(8),o(4)],ql=(t,e)=>{let r=parseInt(t,16),n=(r>>16)+e;n>255?n=255:n<0&&(n=0);let o=(r>>8&255)+e;o>255?o=255:o<0&&(o=0);let s=(r&255)+e;return s>255?s=255:s<0&&(s=0),((s|o<<8|n<<16)+16777216).toString(16).slice(1)},Kl=(t,e,r=.5)=>{let n=[];for(let o=0;o<4;o++){let s=o===3?i=>i:Math.round;n[o]=s(t[o]+(e[o]-t[o])*r)}return`rgba(${n})`},Ro=(t,e)=>{let r=xe(t);if(!r){bn()&&console.warn(t+" color is not rgba");return}return r[3]=e,`rgba(${r})`},mt=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,En=new Set(["currentcolor","transparent","thin","medium","thick"]),oe=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,pA=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,Ft=t=>{if(!S(t))return null;if(oe.test(t))return{passthrough:t};if(mt(t))return{cssVar:t};let e=t.match(pA);if(!e)return null;let[,r,n,o]=e,s=n!==void 0?`0.${n}`:void 0,i=o&&o[0]==="="?o.slice(1):o;return{name:r,alpha:s,tone:i}},De=t=>S(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),pr=t=>{let e=[],r="",n=0;for(let o of t){if(o==="("?n+=1:o===")"&&n>0&&(n-=1),o===","&&n===0){e.push(r),r="";continue}r+=o}return(r.length||!e.length)&&e.push(r),e},ea=t=>{let e=[],r="",n=0;for(let o of t){if(o==="("?n+=1:o===")"&&n>0&&(n-=1),n===0&&/\s/.test(o)){r.length&&e.push(r),r="";continue}r+=o}return r.length&&e.push(r),e},Oo=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),Cn=t=>.2126*Oo(t[0])+.7152*Oo(t[1])+.0722*Oo(t[2]),Po=(t,e)=>{let r=Cn(t)+.05,n=Cn(e)+.05;return r>n?r/n:n/r},Gl=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),Yl=t=>(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*255,ra=([t,e,r])=>{let[n,o,s]=[t,e,r].map(Gl),i=.4122214708*n+.5363325363*o+.0514459929*s,a=.2119034982*n+.6806995451*o+.1073969566*s,c=.0883024619*n+.2817188376*o+.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]},Xl=([t,e,r])=>{let n=t+.3963377774*e+.2158037573*r,o=t-.1055613458*e-.0638541728*r,s=t-.0894841775*e-1.291485548*r,i=n**3,a=o**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]},na=([t,e,r])=>{let n=Math.atan2(r,e)*180/Math.PI;return n<0&&(n+=360),[t,Math.sqrt(e*e+r*r),n]},Zl=([t,e,r])=>{let n=r*Math.PI/180;return[t,e*Math.cos(n),e*Math.sin(n)]},oa=(t,e,r,n=24)=>{let o=a=>Xl(Zl([t,a,r])),s=a=>a.every(c=>c>=-1e-4&&c<=1.0001),i=o(e);if(!s(i)){let a=0,c=e;for(let l=0;l<n;l++){let f=(a+c)/2;s(o(f))?a=f:c=f}i=o(a)}return i.map(a=>Yl(Math.max(0,Math.min(1,a))))},An=(t,e=1,r=[255,255,255])=>e>=1?t:t.map((n,o)=>n*e+r[o]*(1-e)),Ze=(t,e)=>{S(t)&&t.includes("rgb")&&(t=xe(t).join(", ")),S(t)&&(t=t.split(",").map(o=>parseFloat(o.trim()))),ze(e)&&(e+="");let r=zl(t),n=e.slice(0,1);if(n==="-"||n==="+"){let o=ql(r,parseFloat(e));return Vl(o).join(", ")}else{let[o,s,i]=t,[a,c]=Hl(o/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return Wl(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var bg=(t,e)=>{if(t)return t.themes&&t.themes[e]?t.themes[e]:t[e]?[t,t[e]]:t};var we=(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},Tn=(t,e)=>{if(t[e])return t[e].value;let r=()=>Object.keys(t).find(o=>o!=="default"&&t[o]&&t[o].value&&!t[o].isSystemFallback);if(t.default){let o=t[t.default];if(o&&o.isSystemFallback){let s=r();if(s)return t[s].value}if(o)return o.value}let n=r()||Object.keys(t).find(o=>o!=="default"&&t[o]&&t[o].value);return n&&t[n]&&t[n].value},Jl=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},Do=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),Io=t=>`@import url('${t}');`,Ql=t=>`@font-face { ${t} }`,sa=(t,e,r,n={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=Jl(a),l=c?` format('${c}')`:"";return`url('${a}')${l}`}).join(`,
31
+ }`;return`${a}${l}${c}`}});var Yh,Dx=j(()=>{"use strict";Yh=t=>{if(!t)return"";let e=new Date(t),r=new Intl.DateTimeFormat("en",{year:"numeric"}).format(e),n=new Intl.DateTimeFormat("en",{month:"short"}).format(e);return`${new Intl.DateTimeFormat("en",{day:"2-digit"}).format(e)} ${n}, ${r}`}});var Xh,Ix=j(()=>{"use strict";Xh=(t,e)=>{let r=setTimeout(()=>{let{props:n}=t;if(!e.clientHeight){let{node:{clientHeight:o}}=t;o&&(e.clientHeight=o)}if(e.active){if(n.height==="auto")return;t.update({height:e.clientHeight},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});let o=setTimeout(()=>{t.update({height:"auto"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0}),clearTimeout(o)},450)}else t.update({height:"0"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});clearTimeout(r)})}});var Zh,$x=j(()=>{"use strict";Zh=function(e){let r=[0,1];for(let n=2;n<=e;n++)r[n]=r[n-1]+r[n-2];return r[e]}});var Jh,Lx=j(()=>{"use strict";Jh=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function Eo(t,e={}){let{window:r=globalThis}=e,{document:n=r.document}=e;return new Promise((o,s)=>{let i=n.querySelector(`script[src="${t}"]`);if(i)return o(i);let a=n.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,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load script: ${t}`))},n.head.appendChild(a)})}async function og(t,e={}){let{window:r=globalThis}=e,{document:n=r.document}=e;return new Promise((o,s)=>{let i=n.querySelector(`link[href="${t}"]`);if(i)return o(i);let a=n.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,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load stylesheet: ${t}`))},n.head.appendChild(a)})}var Qh,tg,eg,rg,ng,Mx=j(()=>{"use strict";Qh=(t,e=!1,r=document,n="text/javascript")=>new Promise((o,s)=>{try{let i=r.createElement("script");i.type=n,i.async=e,i.src=t,i.addEventListener("load",a=>{o({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)}}),tg=(t,e=document,r="text/javascript")=>new Promise((n,o)=>{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),n()},s.onerror=()=>{e.body.removeChild(i),o(new Error(`Failed to load: ${t}`))},e.body.appendChild(s)}),eg=(t,e=document,r,n="text/javascript")=>{let o=new window.XMLHttpRequest;if(o.open("GET",t,!1),o.send(),o.status===200){let s=e.createElement("script");s.type=n,s.text=o.responseText,e.body.appendChild(s),typeof r=="function"&&r()}else throw new Error(`Failed to load the script ${t}`)},rg=(t,e=!1,r=document,n="text/javascript")=>new Promise((o,s)=>{try{let i=r.createElement("link");i.rel="stylesheet",i.href=t,i.addEventListener("load",a=>{o({status:!0})}),r.head.appendChild(i)}catch(i){s(i)}}),ng=(t,e=!1,r=document,n="text/javascript",o="smbls-script")=>{try{let s=r.createElement("script");s.type=n,s.async=e,s.id=o,s.innerHTML=t,r.body.appendChild(s)}catch(s){console.warn(s)}}});function yA(t,e){if(!e||typeof e!="object")return t;let r=o=>{if(!mA(o))return o;let s=e[o];return s?.src?s.src:o},n={...t};for(let[o,s]of Object.entries(n))typeof s=="string"?n[o]=r(s):Array.isArray(s)&&(n[o]=s.map(i=>typeof i=="string"?r(i):i));return n}function Nl(t,e){if(!t||!e)return;let r=e.split("."),n=t;for(let o of r){if(n==null||typeof n!="object")return;n=n[o]}return n}function bA(t,e,r){let o=(e.config||e.settings||{}).polyglot||e.polyglot,s=r?.lang||o?.defaultLang||"en",a=(o?.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,p,h)=>{let g=p.trim();if(h==="polyglot")return a[g]??Nl(a,g)??d;if(h==="getLocalStateLang")return Nl(c,g+s)??d;let m=Nl(c,g);return m!==void 0?m:a[g]??Nl(a,g)??d}));return l}function Fx(t){if(!k(t))return{};let e={...t};for(let[r,n]of Object.entries(e))if(typeof n=="function"){let o=n.toString(),s=o.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | getLocalStateLang }}`;continue}let i=o.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(i){e[r]=`{{ ${i[1]} | polyglot }}`;continue}let a=o.match(/s\.(\w+(?:\.\w+)+)/);if(a){e[r]=`{{ ${a[1]} }}`;continue}delete e[r]}else if(typeof n=="string"){let o=n.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(o){e[r]=`{{ ${o[1]} | getLocalStateLang }}`;continue}let s=n.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | polyglot }}`;continue}if(n.includes("=>")&&n.includes("s.")){let i=n.match(/s\.(\w+(?:\.\w+)+)/);if(i){e[r]=`{{ ${i[1]} }}`;continue}}fi(n)&&delete e[r]}return e}function ig(t,e,r,{isProduction:n=!1,channel:o="production"}={}){let s=t.pages?.[e],i=k(s?.state)&&s?.state,a=s?.metadata||s?.helmet||i||{},c=Fx(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=Fx(f),d={};if(t.integrations?.seo?d={...t.integrations.seo,...u,...c}:Object.keys(u).length?d={...u,...c}:d={...c},!d.title){let g=t.name||t.key;g?n?d.title=g:o==="development"?d.title=`${g} / dev:symbo.ls`:o==="staging"?d.title=`${g} / staging:symbo.ls`:d.title=`${g} / symbo.ls`:d.title="Symbols demo"}d=bA(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 p=r?.actualPathname||e;if(d["og:url"]||d.url){let g=(d["og:url"]||d.url||"").replace(/\/$/,"");if(g&&p&&p!=="/"){let m=p.startsWith("/")?p:"/"+p;d["og:url"]=g+m}}d=yA(d,t.files);let h=t.name||t.app?.metadata?.title||t.app?.name||"";for(let[g,m]of Object.entries(d))if(typeof m=="string"&&m.includes("{{")){let b=m.replace(/\{\{[^}]*\}\}/g,"").trim();b?d[g]=b:g==="title"?d[g]=h:delete d[g]}return d}var Pt,hA,Ao,gA,jl,sg,mA,Nx=j(()=>{"use strict";Rt();_n();Pt=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,r=>e[r])},hA=t=>Object.entries(t||{}).filter(([e,r])=>r!==void 0).map(([e,r])=>`${e}="${Pt(r)}"`).join(" "),Ao=t=>{let e=5381,r=String(t);for(let n=0;n<r.length;n++)e=(e*33^r.charCodeAt(n))>>>0;return e.toString(36)},gA=new Set(["jsonLd","styles","scripts"]),jl=t=>{let e=[];if(Array.isArray(t.jsonLd))for(let r of t.jsonLd){if(r==null)continue;let n=typeof r=="string"?r:JSON.stringify(r),o=String(n).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${Ao(n)}">${o}<\/script>`)}if(Array.isArray(t.styles))for(let r of t.styles){if(r==null||!String(r).trim())continue;let n=String(r).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${Ao(n)}">${n}</style>`)}if(Array.isArray(t.scripts))for(let r of t.scripts){if(!r)continue;let n=typeof r=="string",o=n?r:r.src;if(!o&&!r.body)continue;let s=[];o&&s.push(`src="${Pt(o)}"`),n||(r.type&&s.push(`type="${Pt(r.type)}"`),r.async&&s.push("async"),r.defer&&s.push("defer"),r.integrity&&s.push(`integrity="${Pt(r.integrity)}"`),r.crossorigin&&s.push(`crossorigin="${Pt(r.crossorigin)}"`),r.referrerpolicy&&s.push(`referrerpolicy="${Pt(r.referrerpolicy)}"`),r.nomodule&&s.push("nomodule"));let i=` data-smbls-script="${Pt(o||Ao(r.body||""))}"`;if(!n&&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},sg=(t,e)=>{e||(t={...t,robots:"noindex"});let r=Object.entries(t).reduce((n,[o,s])=>{if(!s&&s!==0&&s!==!1||gA.has(o))return n;if(o==="title")return n.push(`<title>${Pt(s)}</title>`),n;if(o==="canonical")return n.push(`<link rel="canonical" href="${Pt(s)}">`),n;if(o==="manifest")return n.push(`<link rel="manifest" href="${Pt(s)}">`),n;if(o==="favicon"||o==="favicons"||o==="icon"||o==="icons")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="string")n.push(`<link rel="icon" href="${Pt(f)}">`);else if(typeof f=="object"){let u=hA(f);/rel=/.test(u)?n.push(`<link ${u}>`):n.push(`<link rel="icon" ${u}>`)}}),n;if(o==="alternate")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).filter(([d,p])=>p!==void 0).map(([d,p])=>`${d}="${Pt(p)}"`).join(" ");n.push(`<link rel="alternate" ${u}>`)}}),n;let i=(l,f,u="name")=>{if(typeof f=="string"||typeof f=="number"||typeof f=="boolean")n.push(`<meta ${u}="${Pt(l)}" content="${Pt(f)}">`);else if(Array.isArray(f))f.forEach(d=>{if(typeof d=="string"||typeof d=="number"||typeof d=="boolean")n.push(`<meta ${u}="${Pt(l)}" content="${Pt(d)}">`);else if(typeof d=="object"){let p=Object.entries(d).filter(([h,g])=>g!==void 0).map(([h,g])=>`${h}="${Pt(g)}"`).join(" ");n.push(`<meta ${p}>`)}});else if(typeof f=="object"){let d=Object.entries(f).filter(([p,h])=>h!==void 0).map(([p,h])=>`${p}="${Pt(h)}"`).join(" ");n.push(`<meta ${d}>`)}};if(o.startsWith("http-equiv:")){let l=o.replace("http-equiv:","");return i(l,s,"http-equiv"),n}if(o.startsWith("itemprop:")){let l=o.replace("itemprop:","");return i(l,s,"itemprop"),n}let c=["og:","twitter:","fb:","article:","profile:","book:","business:","music:","product:","video:","DC:","DCTERMS:"].find(l=>o.startsWith(l));if(c){let l=o.replace(c,"");return i(`${c.replace(":","")}:${l}`,s,c==="twitter:"||c==="DC:"||c==="DCTERMS:"?"name":"property"),n}if(o.startsWith("apple:")||o.startsWith("msapplication:")){let l=o.startsWith("apple:")?"apple-":"msapplication-",f=o.replace(/^apple:|^msapplication:/,"");return i(`${l}${f}`,s,"name"),n}return i(o,s),n},['<meta charset="UTF-8">','<meta name="viewport" content="width=device-width, initial-scale=1">']);return r.push(...jl(t)),r.join(`
32
+ `)},mA=t=>typeof t=="string"&&t.length>0&&!t.startsWith("/")&&!t.startsWith("http")});var Bl,ag,jx=j(()=>{"use strict";Rt();Bl=(t,e)=>(O(e)?e:Object.values(e)).reduce((r,n)=>Math.abs(n-t)<Math.abs(r-t)?n:r),ag=(t,e)=>(t=parseFloat(t),k(e)&&(e=Object.values(e)),Bl(t,e))});function To(t){let e=String(t||"").trim();if(!e)return{owner:Bx,key:"",full:""};let r=null,n=e;if(e.includes("/")){let s=e.indexOf("/");r=e.slice(0,s),n=e.slice(s+1)}n=n.replace(/\.symbo\.ls$/iu,""),r||(r=Bx);let o=n?`${r}/${n}`:"";return{owner:r,key:n,full:o}}async function Ul(t,e={}){if((e.provider||"kv")==="api")return Vx(t,e);let n=await TA(t,e);return n||Vx(t,e)}async function TA(t,e={}){let r=e.kvBaseUrl||_A,n=e.env||"production",o=`${r}/kv/${encodeURIComponent(t)}?env=${n}`;try{let s=await fetch(o,{method:"GET"});return s.ok&&(await s.json())?.value||null}catch{return null}}async function Vx(t,e={}){let r=e.apiBaseUrl||xA,{key:n}=To(t);try{let o=`${r}/core/projects/libraries/available?search=${encodeURIComponent(n)}&limit=10`,s=await fetch(o,{method:"GET"});if(!s.ok)return null;let i=await s.json(),c=(i?.items||i?.data||(Array.isArray(i)?i:[])).find(p=>{let{key:h}=To(p?.key);return h.toLowerCase()===n.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 zx(t,e={}){if(k(t))return t;if(S(t)){let{full:r}=To(t);if(!r)return null;try{let n=await Ul(r,e);return n||console.warn(`[smbls] Shared library "${r}" not found`),n}catch(n){return console.warn(`[smbls] Failed to fetch shared library "${r}":`,n.message),null}}return null}async function lg(t,e={}){return!t||!t.length?[]:(await Promise.all(t.map(async n=>{if(Xe(n)){let o=await zx(EA(n),e);return o?{library:o,ignoreList:n.ignoreList}:null}return zx(n,e)}))).filter(Boolean)}var Bx,_A,xA,Zi,Hx,wA,SA,Ux,Wx,kA,vA,CA,Mr,cg,Xe,EA,AA,Ji,qx=j(()=>{"use strict";Rt();Bx="system",_A="https://smbls-kv.nika-980.workers.dev",xA="https://api.symbols.app";Zi=(t,e,r,n)=>{for(let o in e){let s=n?`${n}/${o}`:o;r&&r.has(s)||(o in t?k(t[o])&&k(e[o])&&Zi(t[o],e[o],r,s):t[o]=e[o])}},Hx=(t,e,r)=>{if(!k(t)||!e.size)return t;let n=`${r}/`,o=!1;for(let i of e)if(i.startsWith(n)){o=!0;break}if(!o)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]=Hx(t[i],e,a))}return s},wA=new Set,SA=new Set(["components","pages","functions","snippets","methods"]),Ux=(t,e)=>e===""&&SA.has(t),Wx=["fontFamily","fontfamily","font_family","FONT_FAMILY"],kA=t=>{let e=new Map;if(!k(t))return e;for(let r of Wx){let n=t[r];if(k(n))for(let o in n)!k(n[o])||!n[o].isDefault||(e.has(r)||e.set(r,new Set),e.get(r).add(o))}return e},vA=(t,e)=>{for(let r of Wx){let n=t[r];if(!k(n))continue;let o=e.get(r),s=null;for(let i in n){let a=n[i];if(!k(a)||!a.isDefault||o&&o.has(i))continue;let c={...a};delete c.isDefault,s||(s={...n}),s[i]=c}s&&(t[r]=s)}},CA=t=>t.replace(/\.js$/iu,""),Mr=t=>{let e=new Set;if(!Array.isArray(t))return e;for(let r of t){if(!S(r))continue;let n=r.split("/").map(o=>CA(o.trim())).filter(Boolean).join("/");n&&e.add(n)}return e},cg=(t,e={})=>({library:t,ignoreList:Array.isArray(e.ignoreList)?e.ignoreList:[]}),Xe=t=>k(t)&&Array.isArray(t.ignoreList)&&("library"in t||"key"in t||"name"in t),EA=t=>t.library!==void 0?t.library:t.key??t.name,AA=(t,e,r)=>{let n=Mr(e.sharedLibIgnore);e.sharePages===!1&&n.add("pages");let o=n.size?new Set([...r,...n]):r;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&!(s==="sharePages"||s==="sharedLibIgnore")&&s!=="app"&&!o.has(s))if(k(e[s])&&k(t[s]))if(s==="designSystem")Zi(t[s],e[s],o,s);else for(let i in e[s])o.has(`${s}/${i}`)||(i in t[s]?Ux(s,t[s][i])&&!Ux(s,e[s][i])&&(t[s][i]=e[s][i]):t[s][i]=e[s][i]);else s in t||(t[s]=Hx(e[s],o,s))},Ji=(t,e)=>{if(!e||!e.length)return;let r=kA(t.designSystem);for(let n=0;n<e.length;n++){let o=e[n],s=wA;Xe(o)&&(s=Mr(o.ignoreList),o=o.library),k(o)&&AA(t,o,s)}r.size&&vA(t.designSystem,r)}});var fg,ug,dg,Qi,pg,ta,hg,vn,Kx=j(()=>{"use strict";Rt();fg=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},ug=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)}},dg=t=>t.replace(/[^a-zA-Z0-9_]/g,""),Qi=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,"")),pg=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),ta=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),hg=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},vn=t=>{if(O(t))return t;if(S(t))return t.split(" ");if(k(t))return Object.values(t);if(ze(t))return[t]}});var gg,Gx=j(()=>{"use strict";gg=()=>{let t=document.styleSheets[0],e="";if(t)try{let r=t.cssRules||t.rules;for(let n=0;n<r.length;n++)e+=r[n].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 Yt,Oo,ea,ra,Yx=j(()=>{"use strict";Yt=t=>{let e=t&&t.src;if(!e||typeof e!="string")return null;let r=t.context;if(!r)return null;let n=r.assets&&r.assets[e]||r.files&&r.files[e];if(!n)return null;if(typeof n=="string")return{src:n,type:null,variants:null};if(typeof n=="object"){if(typeof n.src=="string")return n;let o=n.content,s=o&&o.src;if(typeof s=="string")return{...n,src:s,type:n.type??o.type??null,variants:n.variants??o.variants??null}}return null},Oo=(t,{keepOneX:e=!0}={})=>{if(!Array.isArray(t)||!t.length)return"";let r=t.some(o=>typeof o.width=="number"),n=[];for(let o of t)r&&typeof o.width=="number"?n.push(`${o.src} ${o.width}w`):r||(o.scale===1&&e?n.push(o.src):o.scale&&o.scale!==1&&n.push(`${o.src} ${o.scale}x`));return n.join(", ")},ea=t=>{if(!t||!Array.isArray(t.variants))return"";let e=t.variants.filter(r=>r.format===t.type);return Oo(e,{keepOneX:!1})},ra=(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 n=[];for(let[a,c]of r)a!==t.type&&n.push({tag:"source",attr:{type:a,srcset:Oo(c,{keepOneX:!0})}});let o=r.get(t.type)||[],s=Oo(o,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...n,{tag:"img",attr:i}]}});var Vl={};D(Vl,{CDN_PROVIDERS:()=>xe,DOMQL_EVENTS:()=>up,DOMQ_PROPERTIES:()=>Ar,ENV:()=>Ap,HTML_TAGS:()=>ho,METHODS:()=>lo,METHODS_EXL:()=>ti,NODE_ENV:()=>Re,OPTIONS:()=>Ei,PACKAGE_MANAGER_TO_CDN:()=>Lr,PARSED_DOMQ_PROPERTIES:()=>Qs,PROPS_METHODS:()=>Tr,STATE_METHODS:()=>gn,STATE_PROPERTIES:()=>fp,SVG_TAGS:()=>q_,TYPES:()=>qs,UNIVERSAL_RESERVED_KEYS:()=>Ml,addCaching:()=>bl,addContext:()=>yl,addExtend:()=>Zp,addExtends:()=>We,addItemAfterEveryElement:()=>Zd,addProtoToArray:()=>Ys,addRef:()=>hl,applyDependentState:()=>mh,applyEvent:()=>vl,applyEventUpdate:()=>Cl,applyExtends:()=>Y_,applyProps:()=>_i,arrayContainsOtherArray:()=>Hd,arraysEqual:()=>Qd,arrayzeValue:()=>vn,buildImgSrcset:()=>ea,buildSourcesAndImg:()=>ra,cache:()=>wh,call:()=>zh,captureSnapshot:()=>Wh,checkForStateTypes:()=>dh,checkIfInherits:()=>kl,checkIfStringIsInArray:()=>rp,clone:()=>pp,cloneAndMergeArrayExtend:()=>ui,cloneFunction:()=>Lp,collectExtendsList:()=>go,concatAddExtends:()=>Gp,copyJavaScriptToClipboard:()=>ug,copyStringToClipboard:()=>fg,createBasedOnType:()=>pl,createElement:()=>uh,createElementExtends:()=>el,createExtends:()=>pi,createExtendsFromKeys:()=>mo,createExtendsStack:()=>sl,createIfConditionFlag:()=>Mp,createInheritedState:()=>ph,createKey:()=>ci,createNestedObject:()=>xp,createNestedObjectByKeyPath:()=>gh,createObjectWithoutPrototype:()=>Gc,createParent:()=>gl,createPath:()=>ml,createProps:()=>xi,createPropsStack:()=>ul,createRoot:()=>fh,createScope:()=>bh,createSnapshotId:()=>ai,customDecodeURIComponent:()=>lp,customEncodeURIComponent:()=>cp,cutArrayAfterValue:()=>Yd,cutArrayBeforeValue:()=>Gd,debounce:()=>li,debounceOnContext:()=>Ip,decodeNewlines:()=>ap,deepClone:()=>lt,deepContains:()=>bp,deepDefaults:()=>Zi,deepDestringifyFunctions:()=>ye,deepExtend:()=>tl,deepMerge:()=>st,deepMergeExtends:()=>qe,deepStringifyFunctions:()=>ri,defineSetter:()=>Uh,destringifyGlobalScope:()=>oi,detectHeightOnInit:()=>Xh,detectInfiniteLoop:()=>vp,document:()=>rt,encodeNewlines:()=>ip,error:()=>Sn,excludeKeysFromObject:()=>Ep,exec:()=>ft,extendCachedRegistry:()=>Yp,extendStackRegistry:()=>hi,extractArrayExtend:()=>mi,fetchLibraryData:()=>Ul,fibonacciNumberByIndex:()=>Zh,filterArrays:()=>tp,filterArraysFast:()=>ep,finalizeExtends:()=>il,findClosestNumber:()=>Bl,findClosestNumberInFactory:()=>ag,findInheritedState:()=>Sl,findKeyPosition:()=>op,flattenExtend:()=>yo,formatDate:()=>Yh,generateHash:()=>Zc,generateHeadArrayTags:()=>jl,generateKey:()=>ii,generateMetaTags:()=>sg,get:()=>Fh,getCDNDirUrl:()=>Fl,getCDNUrl:()=>De,getCapitalCaseKeys:()=>th,getCdnProviderFromConfig:()=>ko,getChildStateInKey:()=>wl,getChildren:()=>Bh,getContext:()=>Vi,getCookie:()=>Up,getDB:()=>Ki,getEmotionStylesheet:()=>gg,getExtendsInElement:()=>Jp,getExtendsStack:()=>di,getExtendsStackRegistry:()=>Qc,getFrequencyInArray:()=>Wd,getHashedExtend:()=>gi,getImportMapScript:()=>Gh,getInObjectByPath:()=>kp,getLocalStorage:()=>zp,getNev:()=>Pp,getPageMetadata:()=>ig,getParentStateInKey:()=>xl,getPath:()=>Mi,getQuery:()=>Gi,getRef:()=>jh,getRoot:()=>ji,getRootContext:()=>Ui,getRootData:()=>Bi,getRootState:()=>Ni,getRootStateInKey:()=>_l,getSpreadChildren:()=>eh,global:()=>Ud,hasFunction:()=>He,hasHandlerPlugin:()=>uo,hasOwnProperty:()=>gp,hashContent:()=>Ao,inheritChildExtends:()=>nl,inheritChildPropsExtends:()=>rl,inheritParentProps:()=>wi,inheritRecursiveChildExtends:()=>ol,initProps:()=>ah,is:()=>Kt,isArray:()=>O,isBoolean:()=>zc,isContextComponent:()=>rh,isCyclic:()=>Cp,isDOMNode:()=>qt,isDate:()=>Wc,isDefined:()=>Ct,isDevelopment:()=>Rr,isEmpty:()=>qc,isEmptyObject:()=>mp,isEqualDeep:()=>Kc,isFunction:()=>T,isHtmlElement:()=>Hs,isLocal:()=>Rp,isLoudDevRuntime:()=>Et,isMalformedDependency:()=>vo,isMethod:()=>Hh,isMobile:()=>jp,isNode:()=>lr,isNot:()=>zd,isNotProduction:()=>bn,isNull:()=>Hc,isNumber:()=>ze,isObject:()=>k,isObjectLike:()=>N,isPhoto:()=>Jh,isPolyglotWritableKey:()=>ur,isProduction:()=>Or,isStaging:()=>Op,isState:()=>hh,isString:()=>S,isStringFunction:()=>fi,isTest:()=>Xc,isTesting:()=>Tp,isUndefined:()=>Ot,isUniversallyReservedKey:()=>qh,isUnresolvableDependency:()=>kn,isValidDependencyMap:()=>Co,isValidHtmlTag:()=>Wp,isWrappedLibrary:()=>Xe,joinArrays:()=>io,jointStacks:()=>Xp,keys:()=>$l,loadCssFile:()=>rg,loadJavascript:()=>ng,loadJavascriptFile:()=>Qh,loadJavascriptFileEmbedSync:()=>eg,loadJavascriptFileSync:()=>tg,loadRemoteCSS:()=>og,loadRemoteScript:()=>Eo,log:()=>Vh,logGroupIf:()=>Np,logIf:()=>Fp,lookdown:()=>Lh,lookdownAll:()=>Mh,lookup:()=>$h,lowercaseFirstLetter:()=>hn,makeObjectWithoutPrototype:()=>yp,map:()=>dp,mapStringsWithContextComponents:()=>yi,markPolyglotSeeded:()=>Ge,matchesComponentNaming:()=>Ke,memoize:()=>$p,merge:()=>mt,mergeSharedLibraries:()=>Ji,nextElement:()=>Hi,normalizeIgnoreList:()=>Mr,normalizeLibraryKey:()=>To,objectToString:()=>ni,objectizeStringProperty:()=>bi,overwrite:()=>si,overwriteDeep:()=>Gt,overwriteShallow:()=>yn,overwriteState:()=>yh,parse:()=>Ll,parseDeep:()=>$i,pickupElementFromProps:()=>ll,pickupPropsFromElement:()=>cl,polyglotSeededKeys:()=>Ci,previousElement:()=>Wi,propExists:()=>sh,propertizeElement:()=>fl,propertizeUpdate:()=>oh,remove:()=>vx,removeChars:()=>dg,removeCookie:()=>Vp,removeDuplicateProps:()=>ki,removeDuplicatesInArray:()=>ao,removeFromArray:()=>qd,removeFromObject:()=>_p,removeNestedKeyByPath:()=>wp,removeValueFromArray:()=>Gs,removeValueFromArrayAll:()=>Xd,reorderArrayByValues:()=>Jd,replaceLiteralsWithObjectFields:()=>It,replaceOctalEscapeSequences:()=>sp,resolveAsset:()=>Yt,resolveHandler:()=>po,resolveSharedLibraries:()=>lg,returnValueAsText:()=>dl,runPluginHook:()=>At,self:()=>Vd,setActiveRootState:()=>Fi,setCookie:()=>Bp,setHashedExtend:()=>Jc,setInObjectByPath:()=>Sp,setLocalStorage:()=>Hp,setNodeStyles:()=>Il,setProps:()=>Nh,setPropsPrototype:()=>Si,sharedLibrary:()=>cg,splitPackageSpecifier:()=>Yi,spotByPath:()=>Li,srcsetFor:()=>Oo,stringIncludesAny:()=>Zs,stringToObject:()=>hp,stripVersionRangePrefix:()=>Xi,swapItemsInArray:()=>Kd,syncProps:()=>vi,toCamelCase:()=>Qi,toDashCase:()=>ta,toDescriptionCase:()=>hg,toPriorityOrder:()=>be,toTitleCase:()=>pg,toggleFullscreen:()=>Kh,triggerEventOn:()=>Pr,triggerEventOnUpdate:()=>_h,trimStringFromSymbols:()=>np,unstackArrayOfObjects:()=>Ks,update:()=>ih,updateProps:()=>ch,variables:()=>qi,verbose:()=>xo,warn:()=>zi,window:()=>C});var R=j(()=>{"use strict";Yc();Dp();Rt();fr();_n();co();Ws();z_();H_();Js();zs();W_();qp();Qp();lh();al();ex();nx();fo();ox();Ax();Sh();Tx();xh();Ox();Rx();Px();Dx();Ix();$x();Lx();Mx();Nx();jx();qx();Kx();Gx();Yx()});var XC=Sd((Z9,YC)=>{var As=1e3,Ts=As*60,Os=Ts*60,Xn=Os*24,L2=Xn*7,M2=Xn*365.25;YC.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return F2(t);if(r==="number"&&isFinite(t))return e.long?j2(t):N2(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function F2(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]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*M2;case"weeks":case"week":case"w":return r*L2;case"days":case"day":case"d":return r*Xn;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Os;case"minutes":case"minute":case"mins":case"min":case"m":return r*Ts;case"seconds":case"second":case"secs":case"sec":case"s":return r*As;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function N2(t){var e=Math.abs(t);return e>=Xn?Math.round(t/Xn)+"d":e>=Os?Math.round(t/Os)+"h":e>=Ts?Math.round(t/Ts)+"m":e>=As?Math.round(t/As)+"s":t+"ms"}function j2(t){var e=Math.abs(t);return e>=Xn?Wu(t,e,Xn,"day"):e>=Os?Wu(t,e,Os,"hour"):e>=Ts?Wu(t,e,Ts,"minute"):e>=As?Wu(t,e,As,"second"):t+" ms"}function Wu(t,e,r,n){var o=e>=r*1.5;return Math.round(t/r)+" "+n+(o?"s":"")}});var JC=Sd((J9,ZC)=>{function B2(t){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=o,r.enabled=a,r.humanize=XC(),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,p,h;function g(...m){if(!g.enabled)return;let b=g,_=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,(v,P)=>{if(v==="%%")return"%";x++;let $=r.formatters[P];if(typeof $=="function"){let I=m[x];v=$.call(b,I),m.splice(x,1),x--}return v}),r.formatArgs.call(b,m),(b.log||r.log).apply(b,m)}return g.namespace=f,g.useColors=r.useColors(),g.color=r.selectColor(f),g.extend=n,g.destroy=r.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(p!==r.namespaces&&(p=r.namespaces,h=r.enabled(f)),h),set:m=>{d=m}}),typeof r.init=="function"&&r.init(g),g}function n(f,u){let d=r(this.namespace+(typeof u>"u"?":":u)+f);return d.log=this.log,d}function o(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,p=0,h=-1,g=0;for(;d<f.length;)if(p<u.length&&(u[p]===f[d]||u[p]==="*"))u[p]==="*"?(h=p,g=d,p++):(d++,p++);else if(h!==-1)p=h+1,g++,d=g;else return!1;for(;p<u.length&&u[p]==="*";)p++;return p===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}ZC.exports=B2});var QC=Sd((ne,qu)=>{ne.formatArgs=V2;ne.save=z2;ne.load=H2;ne.useColors=U2;ne.storage=W2();ne.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`."))}})();ne.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 U2(){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 V2(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+qu.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),t.splice(n,0,e)}ne.log=console.debug||console.log||(()=>{});function z2(t){try{t?ne.storage.setItem("debug",t):ne.storage.removeItem("debug")}catch{}}function H2(){let t;try{t=ne.storage.getItem("debug")||ne.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function W2(){try{return localStorage}catch{}}qu.exports=JC()(ne);var{formatters:q2}=qu.exports;q2.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var b_={};D(b_,{ANIMATION_PROPS:()=>Om,ARIA_ROLES:()=>VT,ATTR_TRANSFORMS:()=>Bn,BLOCK_PROPS:()=>Rm,CDN_PROVIDERS:()=>xe,COMPOUND_CSS_KEYWORDS:()=>En,CONFIG:()=>Rn,CONFIG_MERGE_EXL:()=>ae,CSS_NAMED_COLOR_HEX:()=>zl,CSS_NATIVE_COLOR_REGEX:()=>se,CSS_PROPS_REGISTRY:()=>pt,CSS_UNITS:()=>so,DEFAULT_CONFIG:()=>Xa,DEFAULT_CSS_PROPERTIES_LIST:()=>ht,DELEGATED_EVENTS:()=>ts,DESIGN_SYSTEM_OPTIONS:()=>ab,DOMQL_EVENTS:()=>up,DOMQ_PROPERTIES:()=>Ar,DOM_EVENTS:()=>Xw,ENV:()=>Ap,FACTORY:()=>ie,FLEX_PROPS:()=>Lm,FONT_PROPS:()=>Pm,GRID_PROPS:()=>Mm,HOST_REGISTERED_PACKAGES:()=>nC,HTML_ATTRIBUTES:()=>Mf,HTML_TAGS:()=>ho,LIFECYCLE_EVENTS:()=>Gr,METHODS:()=>lo,METHODS_EXL:()=>ti,MISC_PROPS:()=>Dm,MIXINS:()=>Df,NODE_ENV:()=>Re,OPTIONS:()=>Ei,PACKAGE_MANAGER_TO_CDN:()=>Lr,PARSED_DOMQ_PROPERTIES:()=>Qs,POSITION_PROPS:()=>Im,PROPS_METHODS:()=>Tr,REGISTRY:()=>jt,RESERVED_STORE_METHODS:()=>O_,ROUTER_OPTIONS:()=>du,SIGNAL_ENGINE_KEY:()=>no,SIGNAL_INSTANCES_KEY:()=>eo,STANDARD_SCHEME_QUERIES:()=>hf,STATE_PROPERTIES:()=>fp,STORE_METHOD_NAMES:()=>T_,SVG_TAGS:()=>Jo,THEME_PROPS:()=>$m,TIMING_PROPS:()=>Va,TYPES:()=>qs,UNIVERSAL_RESERVED_KEYS:()=>Ml,VALUE_TRANSFORMERS:()=>vf,VERSION:()=>P_,__resetSignalEngine:()=>Nd,__resetSignalInstances:()=>Fd,__resetStateShadowWarnings:()=>R_,activateConfig:()=>tw,addCaching:()=>bl,addContext:()=>yl,addDelegatedEvent:()=>Ba,addExtend:()=>Zp,addExtends:()=>We,addItemAfterEveryElement:()=>Zd,addMethods:()=>is,addProtoToArray:()=>Ys,addRef:()=>hl,aliasCaseVariants:()=>No,animation:()=>Bg,appendSVGSprite:()=>Ia,appendSvgIconsSprite:()=>Mn,applyAttrTransforms:()=>Em,applyCSS:()=>eb,applyDependentState:()=>mh,applyDocument:()=>Da,applyEvent:()=>vl,applyEventUpdate:()=>Cl,applyExtends:()=>rs,applyHeadings:()=>yf,applyInitialState:()=>Kf,applyMediaSequenceVars:()=>Nr,applyProps:()=>_i,applyReset:()=>$a,applySequenceGlobalVars:()=>ba,applySequenceVars:()=>mr,applySpacingSequence:()=>wa,applyStateMethods:()=>he,applyTimingSequence:()=>Pa,applyTrueProps:()=>Nm,applyTypographySequence:()=>Ta,arrayContainsOtherArray:()=>Hd,arraysEqual:()=>Qd,arrayzeValue:()=>vn,assertEmitIntegrity:()=>gm,batch:()=>jc,breakpoints:()=>Ng,buildImgSrcset:()=>ea,buildSourcesAndImg:()=>ra,buildThemeVarStyles:()=>ps,cache:()=>wh,cacheNode:()=>Kr,call:()=>zh,callStateMethod:()=>Ha,camelToAttr:()=>er,camelToLowerAttr:()=>Zw,captureSnapshot:()=>Wh,changeGlobalTheme:()=>Cf,changeLightness:()=>wg,checkAttributeByTagName:()=>nr,checkEventFunctions:()=>Cm,checkForStateTypes:()=>dh,checkIfBoxSize:()=>xa,checkIfInherits:()=>kl,checkIfStringIsInArray:()=>rp,class:()=>Wg,clone:()=>pp,cloneAndMergeArrayExtend:()=>ui,cloneFunction:()=>Lp,collectExtendsList:()=>go,color:()=>Pg,colorStringToRgbaArray:()=>we,components:()=>us,compositeOverBackdrop:()=>An,concatAddExtends:()=>Gp,contrastRatio:()=>Do,convertSvgToSymbol:()=>_a,copyJavaScriptToClipboard:()=>ug,copyStringToClipboard:()=>fg,create:()=>y_,createAsync:()=>PD,createBasedOnType:()=>pl,createComputed:()=>C_,createConfig:()=>da,createDefine:()=>cv,createEffect:()=>K,createElement:()=>uh,createElementExtends:()=>el,createExtends:()=>pi,createExtendsFromKeys:()=>mo,createExtendsStack:()=>sl,createHTMLNode:()=>Zo,createIfConditionFlag:()=>Mp,createInheritedState:()=>ph,createKey:()=>ci,createNestedObject:()=>xp,createNestedObjectByKeyPath:()=>gh,createObjectWithoutPrototype:()=>Gc,createParent:()=>gl,createPath:()=>ml,createProps:()=>xi,createPropsStack:()=>ul,createRoot:()=>fh,createScope:()=>bh,createScopeStore:()=>Uc,createSignal:()=>Us,createSkeleton:()=>ID,createSnapshotId:()=>ai,createState:()=>Km,createStore:()=>ir,createSync:()=>DD,css:()=>fe,cssMediaVars:()=>cf,cssVars:()=>af,customDecodeURIComponent:()=>lp,customEncodeURIComponent:()=>cp,cutArrayAfterValue:()=>Yd,cutArrayBeforeValue:()=>Gd,debounce:()=>li,debounceOnContext:()=>Ip,decodeNewlines:()=>ap,deepClone:()=>lt,deepContains:()=>bp,deepDefaults:()=>Zi,deepDestringifyFunctions:()=>ye,deepExtend:()=>tl,deepMerge:()=>st,deepMergeExtends:()=>qe,deepStringifyFunctions:()=>ri,defaultDefine:()=>ys,defineResolvedThemeSignal:()=>Fo,defineSetter:()=>Uh,defineThemeSignal:()=>Mo,destringifyGlobalScope:()=>oi,destroy:()=>rc,detectHeightOnInit:()=>Xh,detectInfiniteLoop:()=>vp,detectTag:()=>qr,devices:()=>jg,dispose:()=>Xr,encodeNewlines:()=>ip,error:()=>Sn,excludeKeysFromObject:()=>Ep,exec:()=>ft,executeAttr:()=>qT,exetuteClassPerComponent:()=>kO,extendCachedRegistry:()=>Yp,extendStackRegistry:()=>hi,extractArrayExtend:()=>mi,extractConditionalAttrs:()=>YT,fetchLibraryData:()=>Ul,fibonacciNumberByIndex:()=>Zh,filterArrays:()=>tp,filterArraysFast:()=>ep,filterAttributesByTagName:()=>WT,finalizeExtends:()=>il,findClosestNumber:()=>Bl,findClosestNumberInFactory:()=>ag,findHeadingLetter:()=>df,findHeadings:()=>ya,findInheritedState:()=>Sl,findKeyPosition:()=>op,flattenExtend:()=>yo,font:()=>Cg,fontFace:()=>Tg,fontFamily:()=>Eg,fontFamilyTypes:()=>Ag,formatDate:()=>Yh,generateHash:()=>Zc,generateHeadArrayTags:()=>jl,generateKey:()=>ii,generateMetaTags:()=>sg,generateSequence:()=>Xt,generateSequencePosition:()=>Xg,generateSprite:()=>jo,generateSubSequence:()=>ma,get:()=>Fh,getActiveConfig:()=>E,getActiveDocument:()=>jn,getActiveLang:()=>rn,getCDNDirUrl:()=>Fl,getCDNUrl:()=>De,getCacheSize:()=>ym,getCapitalCaseKeys:()=>th,getCdnProviderFromConfig:()=>ko,getChildStateInKey:()=>wl,getChildren:()=>Bh,getColor:()=>Q,getColorShade:()=>Gl,getContext:()=>Vi,getCookie:()=>Up,getDB:()=>Ki,getDefaultOrFirstKey:()=>Tn,getEmitStats:()=>Rf,getEmotionStylesheet:()=>gg,getExtendsInElement:()=>Jp,getExtendsStack:()=>di,getExtendsStackRegistry:()=>Qc,getFnPrefixAndValue:()=>gr,getFontFace:()=>kg,getFontFaceEach:()=>On,getFontFaceEachString:()=>rf,getFontFaceString:()=>ca,getFontFamily:()=>Aa,getFontFormat:()=>tf,getFontSizeByKey:()=>Oa,getFrequencyInArray:()=>Wd,getHashedExtend:()=>gi,getImportMapScript:()=>Gh,getInObjectByPath:()=>kp,getLanguages:()=>oc,getLocalStateLang:()=>lc,getLocalStorage:()=>zp,getMediaColor:()=>Dt,getMediaTheme:()=>Ce,getNev:()=>Pp,getObserver:()=>Bc,getPageMetadata:()=>ig,getParentStateInKey:()=>xl,getPath:()=>Mi,getQuery:()=>Gi,getRef:()=>jh,getResolvedThemeSignal:()=>Qx,getRgbTone:()=>Ze,getRoot:()=>ji,getRootContext:()=>Ui,getRootData:()=>Bi,getRootState:()=>Ni,getRootStateInKey:()=>_l,getSafeInk:()=>gf,getSafeInkInfo:()=>tm,getSequenceValue:()=>Pn,getSequenceValueBySymbols:()=>uf,getSequenceValuePropertyPair:()=>Qe,getShadow:()=>ka,getShapeByKey:()=>Ra,getSignals:()=>A_,getSpacingBasedOnRatio:()=>ve,getSpacingByKey:()=>kt,getSpreadChildren:()=>eh,getSubratio:()=>ga,getSubratioDifference:()=>ha,getSystemGlobalTheme:()=>de,getTheme:()=>om,getThemeSignal:()=>Jx,getTimingByKey:()=>le,getTimingFunction:()=>Ee,global:()=>Ud,gradient:()=>Dg,grid:()=>Hg,hasFunction:()=>He,hasHandlerPlugin:()=>uo,hasOwnProperty:()=>gp,hashContent:()=>Ao,hexToRgb:()=>yg,hexToRgbArray:()=>Hl,hexToRgba:()=>_g,hslToRgb:()=>Kl,icons:()=>Lg,inheritChildExtends:()=>nl,inheritChildPropsExtends:()=>rl,inheritParentProps:()=>wi,inheritRecursiveChildExtends:()=>ol,init:()=>xr,initPolyglot:()=>gu,initProps:()=>ah,injectGlobal:()=>wt,is:()=>Kt,isArray:()=>O,isBoolean:()=>zc,isCSSVar:()=>yt,isContextComponent:()=>rh,isCyclic:()=>Cp,isDOMNode:()=>qt,isDate:()=>Wc,isDefined:()=>Ct,isDevelopment:()=>Rr,isDomDocument:()=>ar,isEmpty:()=>qc,isEmptyObject:()=>mp,isEnumeratedTrueFalseAttr:()=>rr,isEqualDeep:()=>Kc,isFunction:()=>T,isGoogleFontsUrl:()=>Io,isHostObject:()=>cr,isHtmlElement:()=>Hs,isLocal:()=>Rp,isLoudDevRuntime:()=>Et,isMalformedDependency:()=>vo,isMethod:()=>Hh,isMobile:()=>jp,isNode:()=>lr,isNot:()=>zd,isNotProduction:()=>bn,isNull:()=>Hc,isNumber:()=>ze,isObject:()=>k,isObjectLike:()=>N,isPhoto:()=>Jh,isPlainColor:()=>Ur,isPolyglotWritableKey:()=>ur,isProduction:()=>Or,isRawUnitValue:()=>Vs,isResolvedColor:()=>Ie,isScalingUnit:()=>pn,isStaging:()=>Op,isState:()=>hh,isStore:()=>_t,isString:()=>S,isStringFunction:()=>fi,isSvgTag:()=>Qo,isTest:()=>Xc,isTesting:()=>Tp,isTracking:()=>Ym,isUndefined:()=>Ot,isUniversallyReservedKey:()=>qh,isUnresolvableDependency:()=>kn,isValidDependencyMap:()=>Co,isValidHtmlTag:()=>Wp,isValidTag:()=>Xo,isWasmLoaded:()=>Gk,isWrappedLibrary:()=>Xe,isWritableFamilyBucket:()=>Bd,joinArrays:()=>io,jointStacks:()=>Xp,keyframes:()=>Yo,keys:()=>$l,linearChannelToSrgb:()=>Zl,loadCssFile:()=>rg,loadJavascript:()=>ng,loadJavascriptFile:()=>Qh,loadJavascriptFileEmbedSync:()=>eg,loadJavascriptFileSync:()=>tg,loadRemoteCSS:()=>og,loadRemoteScript:()=>Eo,loadTranslations:()=>ic,loadWasm:()=>Kk,log:()=>Vh,logGroupIf:()=>Np,logIf:()=>Fp,lookdown:()=>Lh,lookdownAll:()=>Mh,lookup:()=>$h,lowercaseFirstLetter:()=>hn,makeObjectWithoutPrototype:()=>yp,map:()=>dp,mapStringsWithContextComponents:()=>yi,markPolyglotSeeded:()=>Ge,matchesComponentNaming:()=>Ke,media:()=>Og,memoize:()=>$p,merge:()=>mt,mergeSharedLibraries:()=>Ji,mixTwoColors:()=>mg,mixTwoRgb:()=>xg,mixTwoRgba:()=>Yl,nextElement:()=>Hi,normalizeIgnoreList:()=>Mr,normalizeLibraryKey:()=>To,numToLetterMap:()=>Je,objectToString:()=>ni,objectizeStringProperty:()=>bi,oklabToLinearSrgb:()=>Jl,oklabToOklch:()=>sa,oklchToGamutSafeSrgb:()=>ia,oklchToOklab:()=>Ql,opacify:()=>Po,overwrite:()=>si,overwriteDeep:()=>Gt,overwriteShallow:()=>yn,overwriteState:()=>yh,parkHostObject:()=>Er,parse:()=>Ll,parseColorToken:()=>Nt,parseDeep:()=>$i,pickupElementFromProps:()=>ll,pickupPropsFromElement:()=>cl,polyglotFunctions:()=>_c,polyglotPlugin:()=>_s,polyglotSeededKeys:()=>Ci,popConfig:()=>nt,popStaticCssPass:()=>jf,previousElement:()=>Wi,propExists:()=>sh,propertizeElement:()=>fl,propertizeUpdate:()=>oh,pushConfig:()=>it,pushStaticCssPass:()=>Nf,quietColorProbe:()=>Dn,refreshContextProto:()=>Vf,registerEvent:()=>es,registerHostPackages:()=>oC,registerSignalInstance:()=>ro,reinit:()=>tb,relativeLuminance:()=>Cn,remove:()=>ss,removeChars:()=>dg,removeCookie:()=>Vp,removeDelegatedEvent:()=>Ua,removeDuplicateProps:()=>ki,removeDuplicatesInArray:()=>ao,removeFromArray:()=>qd,removeFromObject:()=>_p,removeNestedKeyByPath:()=>wp,removeValueFromArray:()=>Gs,removeValueFromArrayAll:()=>Xd,reorderArrayByValues:()=>Jd,replaceLiteralsWithObjectFields:()=>It,replaceOctalEscapeSequences:()=>sp,resetEmitStats:()=>hm,resolveAsset:()=>Yt,resolveBorderValue:()=>ce,resolveColorRgb:()=>In,resolveColorsInGradient:()=>Ma,resolveConfigDocument:()=>oo,resolveFileSource:()=>vm,resolveFileUrl:()=>Se,resolveGridTracks:()=>rS,resolveHandler:()=>po,resolvePropValue:()=>Yr,resolveShadowValue:()=>$n,resolveSharedLibraries:()=>lg,returnSubThemeOrDefault:()=>Sg,returnValueAsText:()=>dl,rgbArrayToHex:()=>Wl,rgbToHSL:()=>ql,rgbToHex:()=>bg,runPluginHook:()=>At,runThroughMedia:()=>mf,schemeGuardSelector:()=>zr,schemeMediaQuery:()=>Vr,scratchDefaultConfig:()=>Lo,scratchSystem:()=>Ho,scratchUtils:()=>jr,self:()=>Vd,semanticIcons:()=>Mg,sequence:()=>hr,serializeAttrValue:()=>Qt,set:()=>Fn,setActiveConfig:()=>lf,setActiveDocument:()=>pm,setActiveRootState:()=>Fi,setAdaptiveSchemeVar:()=>Hr,setClass:()=>PR,setClassname:()=>vO,setColor:()=>Br,setCookie:()=>Bp,setCssEngineHook:()=>fu,setCustomFont:()=>aa,setCustomFontMedia:()=>Fr,setEach:()=>lm,setFont:()=>Ea,setFontFamily:()=>Vo,setFontImport:()=>$o,setGradient:()=>Bo,setHashedExtend:()=>Jc,setInCustomFontMedia:()=>ef,setInObjectByPath:()=>Sp,setLang:()=>ac,setLocalStorage:()=>Hp,setMediaTheme:()=>Uo,setNodeStyles:()=>Il,setObserver:()=>E_,setProps:()=>Nh,setPropsPrototype:()=>Si,setSVG:()=>zo,setScalingVar:()=>pa,setShadow:()=>Wr,setSubScalingVar:()=>ff,setSvgIcon:()=>Ln,setTheme:()=>Ca,setValue:()=>cm,setVariables:()=>Zg,setWasmEngine:()=>ja,shadow:()=>$g,shape:()=>Gg,sharedLibrary:()=>cg,sizes:()=>Kg,spacing:()=>Rg,splitPackageSpecifier:()=>Yi,splitSpacedValue:()=>Sa,splitTopLevelCommas:()=>pr,splitTopLevelSpaces:()=>na,splitTransition:()=>kf,spotByPath:()=>Li,srcsetFor:()=>Oo,srgbChannelToLinear:()=>Xl,srgbToOklab:()=>oa,stringIncludesAny:()=>Zs,stringToObject:()=>hp,stripVersionRangePrefix:()=>Xi,svg:()=>Ug,svgData:()=>Vg,swapItemsInArray:()=>Kd,syncProps:()=>vi,templates:()=>zg,theme:()=>Ig,timing:()=>Fg,toCamel:()=>ua,toCamelCase:()=>Qi,toDashCase:()=>ta,toDescriptionCase:()=>hg,toLinearChannel:()=>Ro,toPriorityOrder:()=>be,toTitleCase:()=>pg,toggleFullscreen:()=>Kh,transformBackgroundImage:()=>xf,transformBorder:()=>tr,transformBorderRadius:()=>yr,transformBoxShadow:()=>La,transformClassname:()=>cS,transformDuration:()=>Fa,transformGridTemplate:()=>Sf,transformShadow:()=>_f,transformSize:()=>xt,transformSizeRatio:()=>M,transformTextStroke:()=>bf,transformTransition:()=>am,transformersByPrefix:()=>jm,transfromGap:()=>wf,translate:()=>sc,triggerEventOn:()=>Pr,triggerEventOnUpdate:()=>_h,trimStringFromSymbols:()=>np,typography:()=>la,unit:()=>vg,unstackArrayOfObjects:()=>Ks,update:()=>ns,updateProps:()=>ch,updateVars:()=>RR,upsertTranslation:()=>cc,useCssInProps:()=>pe,useHostState:()=>Gm,usePropsAsCSS:()=>iS,useSelectorsAsCSS:()=>aS,variables:()=>qi,vars:()=>qg,verbose:()=>xo,warn:()=>zi,warnStateKeyShadowsMethod:()=>Vc,window:()=>C,wrapHoverRule:()=>br});module.exports=X1(b_);var jd={};D(jd,{RESERVED_STORE_METHODS:()=>O_,SIGNAL_ENGINE_KEY:()=>no,SIGNAL_INSTANCES_KEY:()=>eo,STORE_METHOD_NAMES:()=>T_,VERSION:()=>P_,__resetSignalEngine:()=>Nd,__resetSignalInstances:()=>Fd,__resetStateShadowWarnings:()=>R_,batch:()=>jc,createComputed:()=>C_,createEffect:()=>K,createScopeStore:()=>Uc,createSignal:()=>Us,createStore:()=>ir,getObserver:()=>Bc,getSignals:()=>A_,isStore:()=>_t,registerSignalInstance:()=>ro,setObserver:()=>E_,warnStateKeyShadowsMethod:()=>Vc});var Od={};D(Od,{WRITE_JOURNAL:()=>Fs,batch:()=>js,createComputed:()=>J1,createEffect:()=>Q1,createSignal:()=>Ue,getObserver:()=>Ad,journalWrite:()=>Ns,setObserver:()=>Z1});var Wt=null,Dc=0,Ic=[],Ad=()=>Wt,Z1=t=>{Wt=t},$c=0,kd=[];function Ue(t){let e=new Set;function r(){return Wt&&(e.add(Wt),Wt._sources.add(s)),t}function n(i){i!==t&&(t=i,sE(e))}function o(){return t}let s={get:r,set:n,peek:o,_subscribers:e,_type:"signal"};return s}function J1(t){let e,r=!0,n=new Set,o={_sources:new Set,_type:"computed",_subscribers:n,_execute(){Ed(o);let s=Wt;Wt=o;try{e=t(),r=!1}finally{Wt=s}},_notify(){r=!0,n.size>0&&k_(n)},get(){return Wt&&(n.add(Wt),Wt._sources.add(o)),r&&o._execute(),e},peek(){return r&&o._execute(),e}};return o._execute(),o}var Oe=new Set,vd=!1,Fs=[];function Ns(t){Fs.push(t),Fs.length>32&&Fs.shift()}function Q1(t,e){let r=e?.depth??0,n={_sources:new Set,_type:"effect",_depth:r,_label:e?.label,_disposed:!1,_subscribers:new Set,_execute(){if(n._disposed)return;Ed(n);let o=Wt;Wt=n;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{Wt=o}},_notify(){n._disposed||(Dc>0?Ic.push(n):$c>0?kd.push(n):Td(n))},dispose(){n._disposed=!0,Ed(n)}};return n._execute(),n}function js(t){Dc++;try{t()}finally{Dc--,Dc===0&&oE()}}var Cd=!1,x_=1e3,tE=8,eE=256,rE=4;function w_(){return typeof performance<"u"?performance.now():Date.now()}function Td(t){Oe.add(t),!Cd&&(vd||(vd=!0,queueMicrotask(S_)))}var to=[];function nE(){if(Oe.size===1){let[e]=Oe;return Oe.clear(),e._disposed?0:(e._execute(),1)}to.length=0;for(let e of Oe)to.push(e);Oe.clear(),to.sort((e,r)=>e._depth-r._depth);let t=0;for(let e=0;e<to.length;e++){let r=to[e];r._disposed||(r._execute(),t++)}return to.length=0,t}function S_(t=0,e=0){if(vd=!1,Oe.size===0)return;Cd=!0;let r=w_(),n=!1;try{for(;Oe.size>0;){if(++t>x_){let o=new Map;for(let c of Oe){let l=c._label;if(typeof l=="function")try{l=l()}catch{l="<label error>"}if(l=l||"<unlabeled>",o.set(l,(o.get(l)||0)+1),o.size>=12)break}let s=[...o.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", "),i=new Map;for(let c of Fs)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",x_,"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>"),Oe.clear();break}if(e+=nE(),Oe.size>0&&(e>=eE||t>=rE)&&w_()-r>tE){n=!0,setTimeout(()=>S_(t,e),0);break}}}finally{n||(Cd=!1)}}function oE(){for(let t=0;t<Ic.length;t++)Td(Ic[t]);Ic.length=0}function k_(t){$c++;try{for(let e of t)e._notify()}finally{if($c--,$c===0&&kd.length>0){let e=kd.splice(0);for(let r=0;r<e.length;r++)Td(e[r])}}}function sE(t){k_(t)}function Ed(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var Md={};D(Md,{RESERVED_STORE_METHODS:()=>Bs,STORE_METHOD_NAMES:()=>Ld,__resetStateShadowWarnings:()=>iE,createScopeStore:()=>fE,createStore:()=>Lc,getSignals:()=>lE,isStore:()=>cE,warnStateKeyShadowsMethod:()=>$d});var Ve=Symbol("store"),Mc=Symbol("signals"),Ld=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],Bs=new Set(Ld),Id=new Set,Rd=(t,e)=>t?t+"."+e:String(e);function $d(t,e){let r=(e||"")+"::"+t;if(Id.has(r))return;Id.add(r);let n=e?`state.${e}`:"state",o=`[smbls/state] "${t}" is a reserved store-method name and was written as DATA at ${n}.${t}. The value is preserved and readable \u2014 data wins over the method \u2014 but "${n}.${t}(\u2026)" no longer reaches the store method on this node. Use "${n}.$${t}(\u2026)" for the method, or rename the data key. Reserved: ${Ld.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(o)}function iE(){Id.clear()}var Pd=t=>!t||typeof t!="object"||Array.isArray(t)||t[Ve]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!Fc(t),aE=12,Fc=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function Nc(t,e,r){if(t===e)return!0;if(r>aE)return!1;if(Array.isArray(t)||Array.isArray(e)){if(!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!Nc(t[n],e[n],r+1))return!1;return!0}if(Fc(t)&&Fc(e)){let n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(let s of n)if(!Object.prototype.hasOwnProperty.call(e,s)||!Nc(t[s],e[s],r+1))return!1;return!0}return!1}function Lc(t,e,r,n){r===void 0&&(r=0),n===void 0&&(n="");let o={},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(_)&&$d(_,n);let y=t[_];r<i&&y&&typeof y=="object"&&!Pd(y)?(s[_]=y,o[_]=Ue(Lc(y,e,r+1,Rd(n,_)))):(s[_]=y,o[_]=Ue(y))}let a=new Proxy(s,{get(_,y){if(y===Ve)return!0;if(y===Mc)return o;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 p;if(y==="$replace")return h;if(y==="$add")return g;if(y==="$remove")return m;if(y==="$destroy")return b;if(y==="$quietUpdate")return l;if(Bs.has(y)&&!Object.prototype.hasOwnProperty.call(o,y))switch(y){case"update":return c;case"parse":return f;case"clean":return u;case"keys":return d;case"values":return p;case"replace":return h;case"add":return g;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(o,y)){let w=o[y].get();if(w!==void 0||!(y!=="root"&&_.root&&_.root!==a))return w}if(_[y]!==void 0)return _[y];let x=typeof y=="string"&&!y.startsWith("__")&&y!=="then"&&y!=="constructor"&&Ad()!=null;if(y!=="root"&&_.root&&_.root!==a){let w=_.root[y];return x&&!Object.prototype.hasOwnProperty.call(o,y)&&(o[y]=Ue(void 0),o[y].get()),w}if(x)return o[y]=Ue(void 0),o[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(o,y))return _[y]=x,!0;Bs.has(y)&&$d(y,n);let w=Rd(n,y);if(Object.prototype.hasOwnProperty.call(o,y))if(x&&typeof x=="object"&&!Pd(x)){if(x===_[y])return!0;let v=o[y].peek(),P=v&&v[Ve]?v.$parse():v;if(Nc(x,P,0))return!0;_[y]=x,Ns(w),o[y].set(Lc(x,e,r+1,w))}else{if(Array.isArray(x)&&x!==_[y]&&Array.isArray(o[y].peek())&&Nc(x,o[y].peek(),0))return!0;o[y].peek()!==x&&Ns(w),_[y]=x,o[y].set(x)}else _[y]=x,x&&typeof x=="object"&&!Pd(x)?o[y]=Ue(Lc(x,e,r+1,w)):o[y]=Ue(x);return!0},has(_,y){return typeof y=="string"&&y.charCodeAt(0)===36&&Bs.has(y.slice(1))?!0:y in o||y in _},ownKeys(_){return Object.keys(o)},getOwnPropertyDescriptor(_,y){return y in o?{enumerable:!0,configurable:!0,value:o[y].peek()}:Object.getOwnPropertyDescriptor(_,y)},deleteProperty(_,y){return o[y]&&(o[y].peek()!==void 0&&Ns(Rd(n,y)),o[y].set(void 0),delete o[y]),delete _[y],!0}});function c(_,y){js(()=>{for(let w in _)w!=="__proto__"&&(a[w]=_[w])});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 o){if(x==="parent"||x==="root"||x.startsWith("__"))continue;let w=o[x].peek();w&&w[Ve]?y[x]=w.$parse(_):y[x]=w}return y}function u(){return js(()=>{for(let _ in o)delete a[_]}),a}function d(){return Object.keys(o)}function p(){return Object.keys(o).map(_=>o[_].peek())}function h(_){return js(()=>{for(let y in o)y in _||delete a[y];for(let y in _)y!=="__proto__"&&(a[y]=_[y])}),a}function g(_,y){let x=Object.prototype.hasOwnProperty.call(o,_)?o[_].peek():s[_];if(Array.isArray(x))return a[_]=[...x,y],a;if(x&&typeof x=="object"&&!Array.isArray(x)){if(Fc(y))x[Ve]?x.$update(y):a[_]={...x,...y};else{let w=String(Object.keys(x).length);x[Ve]?x.$update({[w]:y}):a[_]={...x,[w]: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 cE(t){return t&&t[Ve]===!0}function lE(t){return t[Mc]}function fE(t,e){let r={},n={};if(t&&typeof t=="object")for(let i in t)n[i]=t[i],r[i]=Ue(t[i]);let o=i=>{if(Object.prototype.hasOwnProperty.call(r,i))return r;let a=e;for(;a;){let c=a[Mc];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[Ve]?a[Dd]:null}return null};return new Proxy(n,{get(i,a){return a===Ve?!0:a===Mc?r:a===Dd?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=o(a);return l?(l===r&&(i[a]=c),l[a].set(c),!0):(i[a]=c,r[a]=Ue(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[Ve]?c[Dd]: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 Dd=Symbol("scope.parent");var dn="3.14.784";var eo="__SMBLS_SIGNAL_INSTANCES__",ro=(t,e,r)=>{let n=e||(typeof globalThis<"u"?globalThis:null);if(!n)return null;let o=n[eo]||(n[eo]={versions:[],engines:0,reported:!1});return typeof o.engines!="number"&&(o.engines=o.versions.length),o.versions.push(t||dn),r||o.engines++,o.engines>1&&!o.reported&&(o.reported=!0,console.error("[smbls] duplicate @symbo.ls/signal instance \u2014",o.engines,"copies of the reactive engine are loaded on this page:",o.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.")),o},Fd=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[eo]};var no="__SMBLS_SIGNAL_ENGINE__",v_=(t,e,r)=>{let n=e||dn,o=r||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[no];return s&&s.engine&&s.version===n?(ro(n,o,!0),s.engine):(s||(o[no]={version:n,engine:t}),ro(n,o,!1),t)},Nd=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[no]};var Vt=v_({...Od,...Md,VERSION:dn},dn),Us=Vt.createSignal,C_=Vt.createComputed,K=Vt.createEffect,jc=Vt.batch,Bc=Vt.getObserver,E_=Vt.setObserver,ir=Vt.createStore,Uc=Vt.createScopeStore,_t=Vt.isStore,A_=Vt.getSignals,T_=Vt.STORE_METHOD_NAMES,O_=Vt.RESERVED_STORE_METHODS,Vc=Vt.warnStateKeyShadowsMethod,R_=Vt.__resetStateShadowWarnings,P_=Vt.VERSION;var bm={};D(bm,{assertEmitIntegrity:()=>gm,css:()=>fe,getActiveDocument:()=>jn,getCacheSize:()=>ym,getEmitStats:()=>Rf,injectGlobal:()=>wt,keyframes:()=>Yo,reset:()=>jw,resetEmitStats:()=>hm,setActiveDocument:()=>pm,setWasmEngine:()=>ja,wrapHoverRule:()=>br});var fm={};D(fm,{COMPOUND_CSS_KEYWORDS:()=>En,CONFIG:()=>Rn,CONFIG_MERGE_EXL:()=>ae,CSS_NAMED_COLOR_HEX:()=>zl,CSS_NATIVE_COLOR_REGEX:()=>se,CSS_UNITS:()=>so,FACTORY:()=>ie,STANDARD_SCHEME_QUERIES:()=>hf,VALUE_TRANSFORMERS:()=>vf,activateConfig:()=>tw,aliasCaseVariants:()=>No,animation:()=>Bg,appendSVGSprite:()=>Ia,appendSvgIconsSprite:()=>Mn,applyDocument:()=>Da,applyHeadings:()=>yf,applyMediaSequenceVars:()=>Nr,applyReset:()=>$a,applySequenceGlobalVars:()=>ba,applySequenceVars:()=>mr,applySpacingSequence:()=>wa,applyTimingSequence:()=>Pa,applyTypographySequence:()=>Ta,breakpoints:()=>Ng,changeGlobalTheme:()=>Cf,changeLightness:()=>wg,checkIfBoxSize:()=>xa,class:()=>Wg,color:()=>Pg,colorStringToRgbaArray:()=>we,compositeOverBackdrop:()=>An,contrastRatio:()=>Do,convertSvgToSymbol:()=>_a,createConfig:()=>da,cssMediaVars:()=>cf,cssVars:()=>af,defineResolvedThemeSignal:()=>Fo,defineThemeSignal:()=>Mo,devices:()=>jg,document:()=>Xx,findHeadingLetter:()=>df,findHeadings:()=>ya,font:()=>Cg,fontFace:()=>Tg,fontFamily:()=>Eg,fontFamilyTypes:()=>Ag,generateSequence:()=>Xt,generateSequencePosition:()=>Xg,generateSprite:()=>jo,generateSubSequence:()=>ma,getActiveConfig:()=>E,getColor:()=>Q,getColorShade:()=>Gl,getDefaultOrFirstKey:()=>Tn,getFnPrefixAndValue:()=>gr,getFontFace:()=>kg,getFontFaceEach:()=>On,getFontFaceEachString:()=>rf,getFontFaceString:()=>ca,getFontFamily:()=>Aa,getFontFormat:()=>tf,getFontSizeByKey:()=>Oa,getMediaColor:()=>Dt,getMediaTheme:()=>Ce,getResolvedThemeSignal:()=>Qx,getRgbTone:()=>Ze,getSafeInk:()=>gf,getSafeInkInfo:()=>tm,getSequenceValue:()=>Pn,getSequenceValueBySymbols:()=>uf,getSequenceValuePropertyPair:()=>Qe,getShadow:()=>ka,getShapeByKey:()=>Ra,getSpacingBasedOnRatio:()=>ve,getSpacingByKey:()=>kt,getSubratio:()=>ga,getSubratioDifference:()=>ha,getTheme:()=>om,getThemeSignal:()=>Jx,getTimingByKey:()=>le,getTimingFunction:()=>Ee,gradient:()=>Dg,grid:()=>Hg,hexToRgb:()=>yg,hexToRgbArray:()=>Hl,hexToRgba:()=>_g,hslToRgb:()=>Kl,icons:()=>Lg,isCSSVar:()=>yt,isDomDocument:()=>ar,isGoogleFontsUrl:()=>Io,isHostObject:()=>cr,isPlainColor:()=>Ur,isRawUnitValue:()=>Vs,isResolvedColor:()=>Ie,isScalingUnit:()=>pn,isWritableFamilyBucket:()=>Bd,linearChannelToSrgb:()=>Zl,media:()=>Og,mixTwoColors:()=>mg,mixTwoRgb:()=>xg,mixTwoRgba:()=>Yl,numToLetterMap:()=>Je,oklabToLinearSrgb:()=>Jl,oklabToOklch:()=>sa,oklchToGamutSafeSrgb:()=>ia,oklchToOklab:()=>Ql,opacify:()=>Po,parkHostObject:()=>Er,parseColorToken:()=>Nt,popConfig:()=>nt,pushConfig:()=>it,quietColorProbe:()=>Dn,relativeLuminance:()=>Cn,reset:()=>Zx,resolveBorderValue:()=>ce,resolveColorRgb:()=>In,resolveColorsInGradient:()=>Ma,resolveConfigDocument:()=>oo,resolveFileUrl:()=>Se,resolveShadowValue:()=>$n,returnSubThemeOrDefault:()=>Sg,rgbArrayToHex:()=>Wl,rgbToHSL:()=>ql,rgbToHex:()=>bg,runThroughMedia:()=>mf,schemeGuardSelector:()=>zr,schemeMediaQuery:()=>Vr,scratchDefaultConfig:()=>Lo,scratchSystem:()=>Ho,scratchUtils:()=>jr,semanticIcons:()=>Mg,sequence:()=>hr,set:()=>Fn,setActiveConfig:()=>lf,setAdaptiveSchemeVar:()=>Hr,setColor:()=>Br,setCustomFont:()=>aa,setCustomFontMedia:()=>Fr,setEach:()=>lm,setFont:()=>Ea,setFontFamily:()=>Vo,setFontImport:()=>$o,setGradient:()=>Bo,setInCustomFontMedia:()=>ef,setMediaTheme:()=>Uo,setSVG:()=>zo,setScalingVar:()=>pa,setShadow:()=>Wr,setSubScalingVar:()=>ff,setSvgIcon:()=>Ln,setTheme:()=>Ca,setValue:()=>cm,setVariables:()=>Zg,shadow:()=>$g,shape:()=>Gg,sizes:()=>Kg,spacing:()=>Rg,splitSpacedValue:()=>Sa,splitTopLevelCommas:()=>pr,splitTopLevelSpaces:()=>na,splitTransition:()=>kf,srgbChannelToLinear:()=>Xl,srgbToOklab:()=>oa,svg:()=>Ug,svgData:()=>Vg,templates:()=>zg,theme:()=>Ig,timing:()=>Fg,toCamel:()=>ua,toLinearChannel:()=>Ro,transformBackgroundImage:()=>xf,transformBorder:()=>tr,transformBorderRadius:()=>yr,transformBoxShadow:()=>La,transformDuration:()=>Fa,transformGridTemplate:()=>Sf,transformShadow:()=>_f,transformSize:()=>xt,transformSizeRatio:()=>M,transformTextStroke:()=>bf,transformTransition:()=>am,transfromGap:()=>wf,typography:()=>la,unit:()=>vg,vars:()=>qg});var jr={};D(jr,{COMPOUND_CSS_KEYWORDS:()=>En,CSS_NAMED_COLOR_HEX:()=>zl,CSS_NATIVE_COLOR_REGEX:()=>se,CSS_UNITS:()=>so,applyMediaSequenceVars:()=>Nr,applySequenceGlobalVars:()=>ba,applySequenceVars:()=>mr,changeLightness:()=>wg,colorStringToRgbaArray:()=>we,compositeOverBackdrop:()=>An,contrastRatio:()=>Do,convertSvgToSymbol:()=>_a,findHeadingLetter:()=>df,findHeadings:()=>ya,generateSequence:()=>Xt,generateSequencePosition:()=>Xg,generateSprite:()=>jo,generateSubSequence:()=>ma,getColorShade:()=>Gl,getDefaultOrFirstKey:()=>Tn,getFnPrefixAndValue:()=>gr,getFontFace:()=>kg,getFontFaceEach:()=>On,getFontFaceEachString:()=>rf,getFontFaceString:()=>ca,getFontFormat:()=>tf,getRgbTone:()=>Ze,getSequenceValue:()=>Pn,getSequenceValueBySymbols:()=>uf,getSequenceValuePropertyPair:()=>Qe,getSubratio:()=>ga,getSubratioDifference:()=>ha,hexToRgb:()=>yg,hexToRgbArray:()=>Hl,hexToRgba:()=>_g,hslToRgb:()=>Kl,isCSSVar:()=>yt,isDomDocument:()=>ar,isGoogleFontsUrl:()=>Io,isHostObject:()=>cr,isRawUnitValue:()=>Vs,isResolvedColor:()=>Ie,isScalingUnit:()=>pn,isWritableFamilyBucket:()=>Bd,linearChannelToSrgb:()=>Zl,mixTwoColors:()=>mg,mixTwoRgb:()=>xg,mixTwoRgba:()=>Yl,numToLetterMap:()=>Je,oklabToLinearSrgb:()=>Jl,oklabToOklch:()=>sa,oklchToGamutSafeSrgb:()=>ia,oklchToOklab:()=>Ql,opacify:()=>Po,parkHostObject:()=>Er,parseColorToken:()=>Nt,relativeLuminance:()=>Cn,resolveConfigDocument:()=>oo,resolveFileUrl:()=>Se,returnSubThemeOrDefault:()=>Sg,rgbArrayToHex:()=>Wl,rgbToHSL:()=>ql,rgbToHex:()=>bg,setCustomFont:()=>aa,setCustomFontMedia:()=>Fr,setFontImport:()=>$o,setInCustomFontMedia:()=>ef,setScalingVar:()=>pa,setSubScalingVar:()=>ff,setVariables:()=>Zg,splitTopLevelCommas:()=>pr,splitTopLevelSpaces:()=>na,srgbChannelToLinear:()=>Xl,srgbToOklab:()=>oa,toLinearChannel:()=>Ro});var ar=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0),cr=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)},Bd=t=>t!==null&&typeof t=="object"&&!cr(t),Er=(t,e,r)=>{if(!t)return;if(ar(r)){t.__domDocument||(t.__domDocument=r);return}let n=`__host_${e}`;t[n]||(t[n]=r)},oo=t=>t?ar(t.__domDocument)?t.__domDocument:ar(t.document)?t.document:null:null;var pn=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",so=["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"],uE=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),dE=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${so.filter(t=>t!=="auto").map(uE).join("|")})$`),Vs=t=>dE.test(String(t).trim());R();var zl={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"},we=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=zl[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&&rt&&C){let r=rt.body.appendChild(rt.createElement("fictum")),n="rgb(1, 2, 3)";if(r.style.color=n,r.style.color!==n){rt.body.removeChild(r);return}if(r.style.color=t,r.style.color===n||r.style.color==="")return rt.body.removeChild(r),[0,0,0,0];t=C.getComputedStyle(r).color,rt.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]},mg=(t,e,r=.5)=>(t=we(t),e=we(e),Yl(t,e,r)),yg=(t,e=1)=>{let[r,n,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${r},${n},${o})`},Hl=(t,e=1)=>{let[r,n,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[r,n,o]},bg=(t,e,r)=>"#"+(1<<24|t<<16|e<<8|r).toString(16).slice(1),Wl=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1),_g=(t,e=1)=>{let[r,n,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${r},${n},${o},${e})`},xg=(t,e,r=.5)=>{let n=[];for(let o=0;o<3;o++)n[o]=~~(t[o]+(e[o]-t[o])*r);return`rgb(${n})`},wg=(t,e)=>{let[r,n,o]=e,s=Math.max(0,Math.min(100,o+parseFloat(t)));return[r,n,s]},ql=(t,e,r)=>{let n=Math.max(t,e,r),o=n-Math.min(t,e,r),s=1-Math.abs(n+n-o-1),i=o&&(n==t?(e-r)/o:n==e?2+(r-t)/o:4+(t-e)/o);return[60*(i<0?i+6:i),s?o/s:0,(n+n-o)/2]},Kl=(t,e,r,n=e*Math.min(r,1-r),o=(s,i=(s+t/30)%12)=>r-n*Math.max(Math.min(i-3,9-i,1),-1))=>[o(0),o(8),o(4)],Gl=(t,e)=>{let r=parseInt(t,16),n=(r>>16)+e;n>255?n=255:n<0&&(n=0);let o=(r>>8&255)+e;o>255?o=255:o<0&&(o=0);let s=(r&255)+e;return s>255?s=255:s<0&&(s=0),((s|o<<8|n<<16)+16777216).toString(16).slice(1)},Yl=(t,e,r=.5)=>{let n=[];for(let o=0;o<4;o++){let s=o===3?i=>i:Math.round;n[o]=s(t[o]+(e[o]-t[o])*r)}return`rgba(${n})`},Po=(t,e)=>{let r=we(t);if(!r){bn()&&console.warn(t+" color is not rgba");return}return r[3]=e,`rgba(${r})`},yt=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,En=new Set(["currentcolor","transparent","thin","medium","thick"]),se=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,OA=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,Nt=t=>{if(!S(t))return null;if(se.test(t))return{passthrough:t};if(yt(t))return{cssVar:t};let e=t.match(OA);if(!e)return null;let[,r,n,o]=e,s=n!==void 0?`0.${n}`:void 0,i=o&&o[0]==="="?o.slice(1):o;return{name:r,alpha:s,tone:i}},Ie=t=>S(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),pr=t=>{let e=[],r="",n=0;for(let o of t){if(o==="("?n+=1:o===")"&&n>0&&(n-=1),o===","&&n===0){e.push(r),r="";continue}r+=o}return(r.length||!e.length)&&e.push(r),e},na=t=>{let e=[],r="",n=0;for(let o of t){if(o==="("?n+=1:o===")"&&n>0&&(n-=1),n===0&&/\s/.test(o)){r.length&&e.push(r),r="";continue}r+=o}return r.length&&e.push(r),e},Ro=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),Cn=t=>.2126*Ro(t[0])+.7152*Ro(t[1])+.0722*Ro(t[2]),Do=(t,e)=>{let r=Cn(t)+.05,n=Cn(e)+.05;return r>n?r/n:n/r},Xl=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),Zl=t=>(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*255,oa=([t,e,r])=>{let[n,o,s]=[t,e,r].map(Xl),i=.4122214708*n+.5363325363*o+.0514459929*s,a=.2119034982*n+.6806995451*o+.1073969566*s,c=.0883024619*n+.2817188376*o+.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]},Jl=([t,e,r])=>{let n=t+.3963377774*e+.2158037573*r,o=t-.1055613458*e-.0638541728*r,s=t-.0894841775*e-1.291485548*r,i=n**3,a=o**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]},sa=([t,e,r])=>{let n=Math.atan2(r,e)*180/Math.PI;return n<0&&(n+=360),[t,Math.sqrt(e*e+r*r),n]},Ql=([t,e,r])=>{let n=r*Math.PI/180;return[t,e*Math.cos(n),e*Math.sin(n)]},ia=(t,e,r,n=24)=>{let o=a=>Jl(Ql([t,a,r])),s=a=>a.every(c=>c>=-1e-4&&c<=1.0001),i=o(e);if(!s(i)){let a=0,c=e;for(let l=0;l<n;l++){let f=(a+c)/2;s(o(f))?a=f:c=f}i=o(a)}return i.map(a=>Zl(Math.max(0,Math.min(1,a))))},An=(t,e=1,r=[255,255,255])=>e>=1?t:t.map((n,o)=>n*e+r[o]*(1-e)),Ze=(t,e)=>{S(t)&&t.includes("rgb")&&(t=we(t).join(", ")),S(t)&&(t=t.split(",").map(o=>parseFloat(o.trim()))),ze(e)&&(e+="");let r=Wl(t),n=e.slice(0,1);if(n==="-"||n==="+"){let o=Gl(r,parseFloat(e));return Hl(o).join(", ")}else{let[o,s,i]=t,[a,c]=ql(o/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return Kl(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var Sg=(t,e)=>{if(t)return t.themes&&t.themes[e]?t.themes[e]:t[e]?[t,t[e]]:t};var Se=(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},Tn=(t,e)=>{if(t[e])return t[e].value;let r=()=>Object.keys(t).find(o=>o!=="default"&&t[o]&&t[o].value&&!t[o].isSystemFallback);if(t.default){let o=t[t.default];if(o&&o.isSystemFallback){let s=r();if(s)return t[s].value}if(o)return o.value}let n=r()||Object.keys(t).find(o=>o!=="default"&&t[o]&&t[o].value);return n&&t[n]&&t[n].value},tf=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},Io=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),$o=t=>`@import url('${t}');`,ef=t=>`@font-face { ${t} }`,aa=(t,e,r,n={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=tf(a),l=c?` format('${c}')`:"";return`url('${a}')${l}`}).join(`,
33
33
  `);return`
34
34
  font-family: '${t}';
35
35
  font-style: ${n.fontStyle||"normal"};${r?`
@@ -37,24 +37,24 @@ FROM ${a}${l}`},KE=t=>{let e=[],r=(n,o)=>{for(let s in n){let i=o?`${o}/${s}`:s;
37
37
  font-stretch: ${n.fontStretch};`:""}${n.fontDisplay?`
38
38
  font-display: ${n.fontDisplay};`:""}${n.unicodeRange?`
39
39
  unicode-range: ${n.unicodeRange};`:""}
40
- src: ${i};`},Fr=(t,e,r,n)=>`@font-face {${sa(t,e,r,n)}
41
- }`,On=(t,e,r)=>Object.keys(e).map(o=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f}=e[o],u=Array.isArray(s)?s.map(d=>we(d,r)||d):we(s,r)||s;return sa(t,u,i,{fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f})}),_g=t=>Object.keys(t).map(r=>On(r,t[r].value)),tf=(t,e,r)=>{if(e&&e.isVariable){let s=we(e.url,r)||e.url;return Do(s)?Io(s):Fr(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap",unicodeRange:e.unicodeRange})}if(e[0])return On(t,e,r).map(Ql);let o=Array.isArray(e.url)?e.url.map(s=>we(s,r)||s):we(e.url,r)||e.url;return Fr(t,o,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch,unicodeRange:e.unicodeRange})},ia=(t,e)=>Object.keys(t).map(n=>tf(n,t[n].value,e));P();P();P();P();var $o={};I($o,{animation:()=>Mg,breakpoints:()=>$g,class:()=>Ug,color:()=>Ag,devices:()=>Lg,document:()=>zx,font:()=>wg,fontFace:()=>vg,fontFamily:()=>Sg,fontFamilyTypes:()=>kg,gradient:()=>Tg,grid:()=>Bg,icons:()=>Pg,media:()=>Cg,reset:()=>Hx,semanticIcons:()=>Dg,sequence:()=>hr,shadow:()=>Rg,shape:()=>Hg,sizes:()=>zg,spacing:()=>Eg,svg:()=>Fg,svgData:()=>Ng,templates:()=>jg,theme:()=>Og,timing:()=>Ig,typography:()=>aa,unit:()=>xg,vars:()=>Vg});var hr={"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 xg={default:"em"};var hA={browserDefault:16,base:16,type:"font-size",ratio:hr["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},aa=hA;var wg={};var Sg={},kg={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},vg={};var Cg={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var gA={base:aa.base,type:"spacing",ratio:hr.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},Eg=gA;var Ag={},Tg={};var Og={};var Rg={};var Pg={},Dg={};var mA={default:150,base:150,type:"timing",ratio:hr["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},Ig=mA;var zx={};var $g={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 Mg={};var Fg={},Ng={};var jg={};var yA={},Bg=yA;var Ug={};var Hx={},Vg={},zg={},Hg={};var of={},sf={},ie=new Set,ef=$o,rf={},la=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in ef){let e=t.toLowerCase();rf[e]=ef[t];let r=la(e);r!==e&&(rf[r]=ef[t]),e!==t&&(rf[t]=ef[t])}var Rn={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:of,cssMediaVars:sf,CSS_VARS:of,CSS_MEDIA_VARS:sf,_scratchConfig:!0,...rf},Lo=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return Ct(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let r=Ct(e)?e:t.globalTheme,n=js(Ct(r)?r:"auto");return Object.defineProperty(t,"globalTheme",{get(){return n.get()},set(o){n.set(o)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"__globalThemeSignal",{value:n,enumerable:!1,configurable:!0,writable:!0}),n},Wx=t=>t?Lo(t):null,Mo=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return Ct(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let r=Ct(e)?e:t.resolvedTheme,n=js(Ct(r)?r:null);return Object.defineProperty(t,"resolvedTheme",{get(){return n.get()},set(o){n.set(o)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"__resolvedThemeSignal",{value:n,enumerable:!1,configurable:!0,writable:!0}),n},qx=t=>t?Mo(t):null;Lo(Rn);Mo(Rn);var nf=lt(Rn),se={active:"0",0:Rn},Kx=t=>(Ct(t)&&(se.active=t),se[t||se.active]),ca=[],st=t=>{t&&t._scratchConfig&&ca.push(t)},rt=()=>{ca.pop()},E=t=>ca.length?ca[ca.length-1]:se[t||se.active]||Rn,af=t=>{if(k(t))return se.active="1",se[1]=ot(t,lt(nf),ie),Fo(se[1]),Lo(se[1]),Mo(se[1]),t},bA=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],_A=["useVariable","globalTheme","verbose"],xA=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],Fo=t=>{for(let e of xA){let r;for(let n of e){let o=t[n];k(o)&&(r=r?ot(r,o,ie):o)}if(r)for(let n of e)k(t[n])&&(t[n]=r)}},fa=(t,e,{cleanBase:r=!1}={})=>{let n=r?null:E(),o=lt(!r&&n&&n._scratchConfig?n:nf);for(let i of bA)delete o[i];for(let i of _A)Object.prototype.hasOwnProperty.call(nf,i)?o[i]=nf[i]:delete o[i];let s=ot(e||{},o,ie);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s._scratchConfig=!0,Fo(s),Lo(s),Mo(s),t&&(se[t]=s),s};var Je={"-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:n,value:o,scaling:s,index:i,scalingVariable:a}=t;e.sequence[r]={key:r,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:a,variable:n},e.scales[r]=s;let c=Gx.has(e.unit)?"rem":e.unit;e.vars[n]=s+c},gr=t=>{if(!t.includes("("))return t;let e=t.split("(")[0],r=t.slice(t.indexOf("(")+1,t.lastIndexOf(")"));return[e,r]},Gx=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),ua=(t,e)=>{let{base:r,type:n,unit:o}=e,s=Gx.has(o)?"rem":o,i=(pn(s)?1:r)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(n&&n.replace(".","-")),l=`${c}-ratio`;if(t>0){let f=Je[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=Je[t+1],u=Math.abs(t),d=Math.pow(Yx,2*u),p=Je[u];return p?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${p}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},cf=(t,e,r,n)=>{let{type:o}=n,i=t===2&&e.length===2?t+1:t,l=`${"--"+(n.varPrefix?n.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${l+i}))`},da=(t,e)=>{let n=(t*e-t)/1.618,o=t*e-n,s=t+n,i=(o+s)/2;return[o,i,s]},pa=(t,e)=>da(t,e).map(r=>r/t),ha=(t,e)=>{let{key:r,base:n,value:o,ratio:s,variable:i,index:a}=t,l=~~(o*s)-~~o,f,[u,d,p]=da(o,s);l>16?f=[u,d,p]:f=[u,p],f.forEach((h,g)=>{let m=~~(h/n*1e3)/1e3,b=i+(g+1),_=a+(g+1)/10,y=cf(g+1,f,i,e),x={key:r+(g+1),variable:b,value:h,scaling:m,scalingVariable:y,index:_};Wg(x,e)})},Yx=1.618,wA=(t,e,r)=>{if(t>=0)return e*Math.pow(r,t);let n=Math.abs(t),o=e*Math.pow(r,t),s=e*Math.pow(r,n)/Math.pow(Yx,2*n);return Math.max(o,s)},Xt=t=>{let{type:e,base:r,ratio:n,range:o,subSequence:s}=t,i=Math.abs(o[0])+Math.abs(o[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=o[1]-l,u=Je[f],d=wA(f,r,n),p=~~(d/r*100)/100,h=c+u,g=ua(f,t),m={key:u,variable:h,value:d,base:r,scaling:p,scalingVariable:g,ratio:n,index:f};Wg(m,t),s&&ha(m,t)}return t},qg=(t,e=0)=>{let{type:r,base:n,ratio:o,subSequence:s}=t,i=S(e)?e:Je[e],a=S(e)?Object.entries(Je).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=n*Math.pow(o,a),f=~~(l/n*100)/100,p="--"+(t.varPrefix?t.varPrefix+"-":"")+(r&&r.replace(".","-"))+"-"+i,h=ua(a,t),g={key:i,variable:p,value:l,base:n,scaling:f,scalingVariable:h,ratio:o,index:a};return Wg(g,c),s&&ha(g,c),c},Pn=(t="A",e)=>{let r=E(),{unit:n}=r;if(S(t)&&mt(t))return`var(${t})`;if(S(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(S(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:o,unit:s=n.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(Bs(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+"-":""}${Ji(e.type.replace(".","-"))}-`,p=t.toUpperCase(),h=p.slice(0,1)==="-"?"-":"",g=h?p.slice(1):p,m="";g.includes("_")&&(m="_"+g.split("_")[1].toLowerCase(),g=g.split("_")[0]);let b=y=>a.test(y)?`var(${d}${y}${m})`:y;if(g.includes("+")){let[y,x]=g.split("+"),w=`${b(y)} + ${b(x)}`;return h?`calc((${w}) * -1)`:`calc(${w})`}else if(g.includes("*")){let[y,x]=g.split("*"),w=`${b(y)} * ${b(x)}`;return h?`calc((${w}) * -1)`:`calc(${w})`}else if(g.includes("-")){let[y,x]=g.split("-"),w=`${b(y)} - ${b(x)}`;return h?`calc((${w}) * -1)`:`calc(${w})`}if(!o[g]&&g.length===2&&(r.verbose&&console.warn(g,"- value is not found because `subSequence` is set to false"),g=g.slice(0,1)),i||r.useVariable){let y=`var(${d}${g}${m})`;return h?`calc(${y} * -1)`:y}let _=o?o[g]:null;if(!_){if(console.warn("can't find",o,g),Et())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"?h+_.val+s:h+_.scaling+s},lf=(t,e)=>{if(!["+","-","*","/",","].filter(s=>t.includes(s+" ")).length)return t;let n=/(\s+-\s+|\s*[+*/,]\s*)/;return t.split(n).map(s=>{let i=s.trim();return!i||["+","-","*","/",","].includes(i)?s:Pn(i,e)}).join("")},Qe=(t,e,r,n)=>{if(typeof t!="string")return E().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!n&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let s=gr(t);n=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=lf(t,r):t=Pn(t,r),{[e]:n?`${n}(${t})`:t}},ff=(t,e)=>Je[t-e],ga=t=>{let{h1Matches:e,sequence:r}=t;return new Array(6).fill(null).map((n,o)=>{let s=ff(e,o);return r[s]})};P();var Kg=(t,e)=>{let r=E(),{cssVars:n}=r;N(t.value)||(n[t.var]=t.value)},ma=(t,e,r)=>{let n=E(),{unit:o}=n,s=e.unit||o.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,p,h]=pa(i,a);t[`${f}-sub-ratio-1`]=`calc(var(${f}-ratio) * ${d/a})`,t[`${f}-sub-ratio-2`]=`calc(var(${f}-ratio) * ${p/a})`,t[`${f}-sub-ratio-3`]=`calc(var(${f}-ratio) * ${h/a})`},Xx=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),mr=(t,e={})=>{let r=E(),{unit:n,timing:o,cssVars:s}=r,i=t.unit||n.default,a=Xx.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||ma(s,t,e);for(let u in l){let d=l[u],p=(t.type===o.type?l[u].val:f[u])+a;if(!c){s[d.variable+"_default"]=p,s[d.variable]=d.scalingVariable;continue}e.useDefault===!1?s[d.variable]=p:(s[d.variable+"_default"]=p,s[d.variable]=`var(${d.variable+"_default"})`)}},Nr=(t,e,r={})=>{let n=E(),{unit:o,media:s,cssVars:i}=n,a=e.slice(1),c=t[e],l=c.unit||t.unit||o.default,f=Xx.has(l)?"rem":l,{mediaRegenerate:u}=t,{sequence:d,scales:p}=c,h=s[a];if(!h&&n.verbose&&console.warn("Can't find media query ",h),!u){let g=i[`@media ${h}`];g||(g=i[`@media ${h}`]={}),ma(g,c,r);let m=t.unit||o.default;if(f!==m&&d)for(let b in d){let _=d[b],y=p[b]+f;g[_.variable+"_default"]=y,g[_.variable]=y}return}for(let g in d){let m=d[g],b=(pn(f)?p[g]:d[g].val)+f;!h&&n.verbose&&console.warn("Can't find query ",h);let _=i[`@media ${h}`];_||(_=i[`@media ${h}`]={}),_[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=b}};P();var Jx=bn(),No=t=>{let e=E(),r="";for(let n in t)e.__svgCache[n]||(e.__svgCache[n]=!0,r+=t[n]);return r},SA=t=>{let e=t&&(t.default||t);if(!S(e))return Jx&&console.warn("parseRootAttributes:",e,"is not a string"),{};let r=e.match(/<svg\s+(.*?)>/);if(!r||!r[1])return{};let o=r[1].match(/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|\s*\/?[>"']))+.)["']?/gm);return o?o.reduce((s,i)=>{let[a,c]=i.split("=");return s[a]=c.replace(/['"]/g,""),s},{}):{}},kA=(t,e)=>{let r=[];if(t.replace(/id="([^"]*)"/g,(o,s)=>(r.push(s),o)),!r.length)return t;let n=t;for(let o of r){let s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${e}-${o}`;n=n.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 n},Zx=new Set,ya=(t,e)=>{let r=e&&e.default?e.default:e;if(!S(r))return Jx&&!Zx.has(t)&&(Zx.add(t),console.warn("convertSvgToSymbol:",t,"is not a string")),"";e=r;let n=e.match(/^<symbol\b[^>]*\bid="([^"]*)"/);if(n){let u=n[1];return u===t?e:e.replace(`id="${u}"`,`id="${t}"`)}let o=SA(e),{width:s,height:i}=o,a=o.viewBox||`0 0 ${s||24} ${i||24}`,f=kA(e,t).replace("<svg",`<symbol id="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="${a}"`);return f=f.replace(/^<symbol\b[^>]*>/,u=>u.replace(/\s(width|height)="[^"]*"/g,"")),f=f.replace("</svg","</symbol"),f=EA(f),f},vA="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",CA=new RegExp(`<(${vA})\\b([^>]*?)\\s*/>`,"g"),EA=t=>t.replace(CA,"<$1$2></$1>");var zo={};I(zo,{STANDARD_SCHEME_QUERIES:()=>df,appendSVGSprite:()=>Pa,appendSvgIconsSprite:()=>Mn,applyDocument:()=>Ra,applyHeadings:()=>gf,applyReset:()=>Da,applySpacingSequence:()=>_a,applyTimingSequence:()=>Oa,applyTypographySequence:()=>Ea,checkIfBoxSize:()=>ba,getColor:()=>tt,getFontFamily:()=>Ca,getFontSizeByKey:()=>Aa,getMediaColor:()=>Pt,getMediaTheme:()=>ve,getSafeInk:()=>pf,getSafeInkInfo:()=>Xg,getShadow:()=>wa,getShapeByKey:()=>Ta,getSpacingBasedOnRatio:()=>ke,getSpacingByKey:()=>vt,getTheme:()=>tm,getTimingByKey:()=>ce,getTimingFunction:()=>Ce,isPlainColor:()=>Ur,quietColorProbe:()=>Dn,resolveBorderValue:()=>ae,resolveColorRgb:()=>In,resolveShadowValue:()=>$n,runThroughMedia:()=>hf,schemeGuardSelector:()=>zr,schemeMediaQuery:()=>Vr,setAdaptiveSchemeVar:()=>Hr,setColor:()=>Br,setFont:()=>va,setFontFamily:()=>Uo,setGradient:()=>jo,setMediaTheme:()=>Bo,setSVG:()=>Vo,setShadow:()=>Wr,setSvgIcon:()=>Ln,setTheme:()=>ka,splitSpacedValue:()=>xa});P();var df={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},Vr=(t,e)=>{let r=e.media&&e.media[t]||df[t];return r?"@media "+(r==="print"?`${r}`:`screen and ${r}`):null},zr=t=>{let e=t.scopeSelector||":root";return`${e===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`} &`},Se=new Set,rw=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"]),AA=/^(?:#[0-9a-f]{3,8}$|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix)\()/i,TA=/gradient\(|url\(|image-set\(|var\(/i,OA=new Set(["transparent","currentColor","currentcolor"]),Ur=t=>{if(!S(t))return!1;let e=t.trim();return TA.test(e)?!1:AA.test(e)?!0:rw.has(e)||OA.has(e)},uf=new Set,Qx=t=>{if(!t)return!1;let{color:e,gradient:r}=t;return!!(k(e)&&Object.keys(e).length||k(r)&&Object.keys(r).length)},tw=new Set,Gg=0,Dn=t=>{Gg++;try{return t()}finally{Gg--}},RA=(t,e)=>{if(!S(t)||t.indexOf(" ")===-1)return null;let r=t.replace(/\s+/g,""),n=Ft(r);if(!n||n.passthrough||n.cssVar)return null;let{color:o,gradient:s}=e;return!o[n.name]&&!s[n.name]?null:r},Yg=(t,e,r)=>{let n=RA(t,r);if(n){if(!tw.has(t)){tw.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 \`${n}\`? 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 o=Ft(t);if(o&&o.name&&!o.passthrough&&!o.cssVar&&(o.alpha!==void 0||o.tone!==void 0)&&Qx(r)&&!r.color[o.name]&&!r.gradient[o.name]){if(!Gg&&!uf.has(t)){uf.add(t);let i=r&&r.name?` (design system \`${r.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` does not resolve${i} \u2014 \`${o.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=S(e)?e.toLowerCase():"";if(!rw.has(s)||!Qx(r))return t;if(!uf.has(s)){uf.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.`)}},nw=(t,e,r)=>{let n=e!==void 0?e:1;if(!r)return`rgb(from ${t} r g b / ${n})`;if(r.charCodeAt(0)===43||r.charCodeAt(0)===45){let s=parseFloat(r),i=s<0?"-":"+",a=Math.abs(s);return`rgb(from ${t} calc(r ${i} ${a}) calc(g ${i} ${a}) calc(b ${i} ${a}) / ${n})`}return`hsl(from ${t} h s ${r}% / ${n})`},tt=(t,e,r)=>{let n=r||E();if(!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(mt(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(O(t))[o,s,i]=t;else{let u=Ft(t);if(!u){let{color:d,gradient:p}=n,h=p[t]||d[t];return h?(e&&h[e]&&(h=h[e]),n.useVariable?`var(${h.var})`:h.value):Yg(t,t,n)}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}let{color:a,gradient:c}=n,l=a[o]||c[o];if(!l)return Yg(t,o,n);if(e)if(l[e]!==void 0)l=l[e];else if(O(l)){let u=e.charCodeAt(0)===64?e.slice(1):e;u==="dark"?l=l[1]!==void 0?l[1]:l[0]:(u!=="light"&&n.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 n.verbose&&console.warn(t," - does not have ",e);if(S(l)){if(Se.has(o))return l;Se.add(o);try{return tt(l,null,r)}finally{Se.delete(o)}}let f=l.rgb;if(!f){let u=n.useVariable?`var(${l.var})`:l.value;return(s||i)&&u?nw(u,s,i):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}, ${l.alpha!==void 0?l.alpha:1})`:n.useVariable?`var(${l.var})`:l.value!==void 0?l.value:`rgb(${f})`},ew=t=>{let e=xe(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}},PA=(t,e)=>{if(!e)return t;let r=t.rgb;if(e.tone){let o=Ze(r,e.tone);r=S(o)?o.split(",").map(s=>parseFloat(s.trim())):o}let n=e.alpha!==void 0?parseFloat(e.alpha):t.alpha;return{rgb:r,alpha:n}},In=(t,e,r)=>{let n=e||E();if(!S(t))return null;let o=Ft(t);if(o){if(o.passthrough){let d=xe(o.passthrough);return d&&d.length>=3?{rgb:[d[0],d[1],d[2]],alpha:d[3]!==void 0?d[3]:1}:null}if(o.cssVar)return null}let s=o?o.name:t,{color:i,gradient:a}=n,c=i[s]||a[s];if(!c)return ew(t);if(S(c)){let d;if(Se.has(s))d=ew(c);else{Se.add(s);try{d=In(c,n,r)}finally{Se.delete(s)}}return d?PA(d,o):null}if(c.rgb===void 0&&k(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;o&&o.tone&&(l=Ze(l,o.tone));let f=S(l)?l.split(",").map(d=>parseFloat(d.trim())):l,u=o&&o.alpha!==void 0?parseFloat(o.alpha):c.alpha!==void 0?c.alpha:1;return{rgb:f,alpha:u}},ow=t=>k(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0),sw=t=>{if(!k(t)||t.value!==void 0)return null;let e=[];for(let r in t)if(r!=="var"){if(r.charCodeAt(0)!==64||!ow(t[r]))return null;e.push(r.slice(1))}return e.length?e:null},DA=t=>S(t&&t.var)&&sw(t)!==null,IA=(t,e,r,n,o)=>{let s=sw(e);if(!s)return;if(S(e.var)){let c=`var(${e.var})`;return r||n?nw(c,r,n):c}if(s.length!==2||!s.includes("light")||!s.includes("dark"))return;let i=tt(t,"@light",o),a=tt(t,"@dark",o);if(!(!Ur(i)||!Ur(a)))return i===a?i:`light-dark(${i}, ${a})`},Pt=(t,e,r)=>{let n=r||E();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(mt(t))return`var(${t})`;let o,s,i;if(O(t))o=t[0];else{let u=Ft(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}else o=t}let{color:a,gradient:c}=n,l=a[o]||c[o],f=k(l);if(f&&l.value)return tt(t,`@${e}`,r);if(f){if(n.useVariable&&l.var)return s||i?tt(t,null,r):`var(${l.var})`;if(e){if(!n.useVariable&&a[o]===l){let u=IA(t,l,s,i,r);if(u!==void 0)return u}return tt(t,`@${e}`,r)}else{let u={},d=zr(n);for(let p in l){if(p.charCodeAt(0)!==64)continue;let h=p.slice(1),g=tt(t,p,r);if(g!==void 0&&(u[`[data-theme="${h}"] &`]=g,h==="light"||h==="dark")){let m=Vr(h,n);if(!m)continue;u[m]={[d]:g}}}return u}}else return Yg(t,o,n)},Hr=(t,e,r,n)=>{let s=`--${n.varPrefix?n.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){n.cssVars[s]=i,n.cssMediaVars||(n.cssMediaVars={});for(let c in a){let l=`[data-theme="${c}"]`;if(n.cssMediaVars[l]||(n.cssMediaVars[l]={}),n.cssMediaVars[l][s]=a[c],c==="light"||c==="dark"){let f=`@media (prefers-color-scheme: ${c})`;n.cssMediaVars[f]||(n.cssMediaVars[f]={}),n.cssMediaVars[f][s]=a[c]}}return t.var=s,s}},Br=(t,e,r)=>{let n=E();if(ow(t))return n.useVariable&&t.var&&(n.cssVars[t.var]=t.value),t;if(!n.useVariable&&DA(t))return t;if(S(t)&&mt(t)){let g=t.slice(2);if(t=tt(g),!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let m=g.split(" "),b=n.color[m[0]];if(b&&!b.value&&!b.rgb&&(S(b)||O(b)||k(b))&&!Se.has(m[0])){Se.add(m[0]);try{n.color[m[0]]=Br(b,m[0])}finally{Se.delete(m[0])}b=n.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=xe(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(O(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),k(t)){let g={};for(let m in t)m!=="var"&&(g[m]=Br(t[m],e,m.slice(0,1)==="@"?m.slice(1):m));return n.useVariable&&Hr(g,"color",e,n),g}let s=`--${n.varPrefix?n.varPrefix+"-":""}color-${e}`+(r?`-${r}`:""),i=t.value||t;if(S(i)&&!i.includes("(")&&!i.startsWith("#")){let g=Ft(i);if(g&&g.name&&!g.passthrough&&!g.cssVar){let m=n.color[g.name];if(m&&!m.value&&!m.rgb&&(S(m)||O(m)||k(m))&&!Se.has(g.name)){Se.add(g.name);try{n.color[g.name]=Br(m,g.name)}finally{Se.delete(g.name)}}let b=n.color[g.name];if(b&&b.rgb){let _=b.rgb;g.tone&&(_=Ze(_,g.tone));let y=g.alpha!==void 0?parseFloat(g.alpha):b.alpha!==void 0?b.alpha:1;i=`rgba(${_}, ${y})`}}}let a=xe(i),[c,l,f,u=1]=a,d=parseFloat(u.toFixed(2)),p=`${c}, ${l}, ${f}`,h=`rgba(${p}, ${d})`;return n.useVariable&&(n.cssVars[s]=h),{var:s,rgb:p,alpha:d,value:h}},jo=(t,e,r)=>{let n=E();if(k(t)&&t.value!==void 0&&t.var!==void 0)return n.useVariable&&(n.cssVars[t.var]=t.value),t;if(S(t)&&mt(t)&&(t=tt(t.slice(2))),O(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),k(t)){let i={};for(let a in t)a!=="var"&&(i[a]=jo(t[a],e,a.slice(0,1)==="@"?a.slice(1):a));return n.useVariable&&Hr(i,"gradient",e,n),i}let s=`--${n.varPrefix?n.varPrefix+"-":""}gradient-${e}`+(r?`-${r}`:"");return n.useVariable&&(n.cssVars[s]=t.value||t),{var:s,value:t.value||t}};P();var pf=(t,e,r={},n)=>{let o=n||E(),{min:s=4.5,large:i=!1,scheme:a,meta:c=!1,maxIterations:l=15}=r,f=i?3:s,u=a||(o.globalTheme&&o.globalTheme!=="auto"?o.globalTheme:"light"),d=S(e)?e:String(e),p=Ft(t),h=p&&!p.passthrough&&!p.cssVar?p.name:null,g=(G,$)=>c?{value:G,...$}:G;if(h){let G=o.color[`${h}Safe`];if(G){let $=`${d}@${u}`,St=G[$]!==void 0?G[$]:G[d];if(St!==void 0){let it=St&&St.rgb!==void 0?o.useVariable&&St.var?`var(${St.var})`:St.value:tt(St,null,o);return g(it,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=tt(t,u?`@${u}`:null,o),b=In(t,o,u),_=In(e,o,u);if(!b||!_)return o.verbose&&console.warn("getSafeInk: could not resolve",t,e,"\u2014 returning hue unchanged"),g(m,{ratio:null,deviation:0,derived:!1,overridden:!1,unresolved:!0});let y=An(_.rgb,_.alpha),x=An(b.rgb,b.alpha,y),w=Po(x,y);if(w>=f-.02)return g(m,{ratio:w,deviation:0,derived:!1,overridden:!1});let[v,D,L]=ra(b.rgb),[,T,R]=na([v,D,L]),V=Cn(y)>.5,Bt=V?v:1-v,z=G=>{let $=V?v-G:v+G,St=Math.max(0,Math.min(1,$));return{rgb:oa(St,T,R),L:St}},H=G=>{let{rgb:$}=z(G),St=An($.map(it=>Math.round(it)),b.alpha,y);return Po(St,y)},nt=0,B=Bt,Z=H(B)>=f;if(Z)for(let G=0;G<l;G++){let $=(nt+B)/2;H($)>=f?B=$:nt=$}else nt=B;let{rgb:Lt,L:W}=z(B),yt=Lt.map(G=>Math.round(G)),F=H(B),J=b.alpha<1?`rgba(${yt.join(", ")}, ${b.alpha})`:`rgb(${yt.join(", ")})`,wt=Math.abs(W-v)*100;return g(J,{rgb:yt,ratio:F,startRatio:w,deviation:wt,derived:!0,overridden:!1,reachable:Z})},Xg=(t,e,r={},n)=>pf(t,e,{...r,meta:!0},n);P();P();var $A=t=>{let r=E().spacing||{},n=parseFloat(t.spacingRatio),o={...r,ratio:Number.isFinite(n)?n:r.ratio,sequence:{},scales:{}};return Xt(o),o},LA=t=>{for(let e in t){let r=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;gt(r,{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),Xt(r),Nr(t,e)}},ba=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),n=e.includes("border")||e.includes("outline");return r&&!n},_a=()=>{let t=E(),{spacing:e}=t;Xt(e),mr(e),LA(e)},MA=t=>{let e=E(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:Xt(t)},vt=(t,e="padding",r,n)=>{let o=MA(r);if(S(t)){if(!n&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!n&&t.includes("(")){let i=gr(t);n=i[0],t=i[1]}}let s=n?[t]:vn(t);if(O(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)=>Qe(s[f],e+l+i,o,n);return a[s.length].map((l,f)=>c(l,f))}return Qe(t,e,o,n)}},ke=(t,e,r,n)=>{let o=E(),{spacing:s}=o,i=r||t[e];if(!n&&S(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!n&&S(i)&&i.includes("(")){let a=gr(i);n=a[0],i=a[1]}if(t.spacingRatio){let a=$A(t);return vt(i,e,a,n)}return vt(i,e,s,n)},xa=t=>{let e=r=>{let n=["+","-","*","/"].includes(r),o=oo.some(i=>t.includes(i));return n||o?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(" ")};P();var $n=(t,e,r)=>!S(t)||oe.test(t)?t:pr(t).map(n=>(n=n.trim(),n.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(o.startsWith("--"))return`var(${o})`;let s=Dn(()=>tt(o,e));if(De(s))return s;if(/^\d/.test(o)||o==="0"||o.includes("px")||o.slice(-2)==="em"||o==="inset"||o==="none"||En.has(o.toLowerCase()))return o;r&&r(o);let i=vt(o,"shadow");return i&&i.shadow?i.shadow:o}).join(" "))).join(", "),Wr=(t,e,r,n)=>{let o=E();if(k(t)&&t.value!==void 0&&t.var!==void 0)return o.useVariable&&(o.cssVars[t.var]=t.value),t;if(O(t)){let a={"@light":Wr(t[0],e,"light"),"@dark":Wr(t[1],e,"dark")};return o.useVariable&&Hr(a,"shadow",e,o),a}if(k(t)){let a={};for(let c in t)a[c]=Wr(t[c],e,c.startsWith("@")?c.slice(1):c);return o.useVariable&&Hr(a,"shadow",e,o),a}S(t)&&!oe.test(t)&&(t=$n(t));let i=`--${o.varPrefix?o.varPrefix+"-":""}shadow-${e}`+(r?`-${r}`:"");return o.useVariable&&(o.cssVars[i]=t),{var:i,value:t}},wa=(t,e)=>{let r=E();if(e||(e=r.globalTheme==="auto"?null:r.globalTheme),!S(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(mt(t))return`var(${t})`;let[n]=O(t)?t:t.split(" "),s=r.shadow[n],i=k(s);if(!s)return r.verbose&&console.warn("Can't find color ",n),t;if(i&&!s.value&&r.useVariable&&s.var)return`var(${s.var})`;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={},c=zr(r);for(let l in s){if(l.charCodeAt(0)!==64)continue;let f=l.slice(1),u=s[l],d=u&&(u.value!==void 0?u.value:u);if(d!==void 0&&(a[`[data-theme="${f}"] &`]=d,f==="light"||f==="dark")){let p=Vr(f,r);if(!p)continue;a[p]={[c]:d}}}return a}return r.verbose&&console.warn("Can't find color",t),t};var FA=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),NA=t=>FA.has(t),ae=(t,e,r)=>{if(t==null)return;let n=t+"";if(oe.test(n))return n;let o=n.trim();return o==="none"||o==="0"||o==="initial"||o==="inherit"||o==="unset"?n:n.split(/\s+/).map(s=>{if(s=s.trim(),!s)return"";if(mt(s))return`var(${s})`;if(NA(s)||/^\d/.test(s)||s==="0")return s;let i=Dn(()=>tt(s,e));if(De(i))return i;if(En.has(s.toLowerCase()))return s;r&&r(s);let a=vt(s,"border");return a&&a.border?a.border:s}).join(" ")};P();var jA=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"]),iw=["color","Color","background","Background","fill","Fill","stroke","Stroke"],fw=t=>{for(let e=0;e<iw.length;e++)if(t.includes(iw[e]))return!0;return!1},BA={boxShadow:$n,textShadow:$n,border:ae,borderTop:ae,borderRight:ae,borderBottom:ae,borderLeft:ae,outline:ae,columnRule:ae},UA=t=>{if(!t)return!1;let e=Ft(t);return!e||!e.name||e.passthrough||e.cssVar?!1:e.alpha!==void 0||e.tone!==void 0},aw=new Set,VA=(t,e,r,n,o,s)=>{if(!Et())return;let i=`${t}::${e}::${r||""}::${n}`;aw.has(i)||(aw.add(i),console.warn(`[smbls/scratch] theme param "${e}" on "${t}"`+(r?` (${r})`:"")+` did not fully resolve: "${n}" -> "${o}" 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.`))},Qg=(t,e,r,n)=>{let o=BA[e];if(!o)return tt(r,n);let s=null,i=o(r,n,a=>{!s&&UA(a)&&(s=a)});return s&&VA(t,e,n,r,i,s),i},tm=(t,e)=>ve(t,e),zA=t=>k(t)&&N(t.value),HA=t=>{for(let e in t){let r=t[e];if(S(r)&&r.startsWith("var(--"))return!0}return!1},ka=(t,e)=>{let r=E();return zA(t)?!r.useVariable&&HA(t)?t:Bo(t.value,e):Bo(t,e)},uw=(t,e)=>{let r=new Set;for(let n of e){let o=n.slice(0,1);if(!(o==="@"||o==="."||o===":")&&fw(n))for(let s in t){if(r.has(s))continue;let i=t[s]?.[n];if(i===void 0)continue;let a=tt(i,`@${s}`);a!==void 0&&S(a)&&/^[a-z][a-zA-Z]+$/.test(a)&&!jA.has(a)&&r.add(s)}}return r},WA=t=>t.startsWith("[data-theme=")||t.startsWith("@media"),Sa=(t,e)=>{for(let r in e){let n=e[r];k(n)?Sa(t[r]||(t[r]={}),n):t[r]=n}return t},cw=(t,e,r,n)=>{if(Sa(t,{[`[data-theme="${e}"] &`]:r}),e!=="light"&&e!=="dark")return;let o=Vr(e,n);o&&Sa(t,{[o]:{[zr(n)]:r}})},dw=(t,e,r,n)=>{let o=r.globalTheme!==void 0?r.globalTheme:"auto",s=o&&o!=="auto"?String(o).replace(/^'|'$/g,""):null,i=new Set(n?Object.keys(n):[]);for(let l in t)if(t[l])for(let f of Object.keys(t[l]))i.add(f);let a=uw(t,i),c={};for(let l of i){let f=l.slice(0,1);if(f==="@")continue;if(f==="."||f===":"){let b={};for(let x in t)N(t[x]?.[l])&&(b[x]=t[x][l]);let _=n&&N(n[l])?n[l]:void 0;if(!Object.keys(b).length&&!_)continue;let y=f==="."?l.slice(1):l.replace(/^:+/,"");c[l]=dw(b,`${e}-${y}`,r,_);continue}let u=n&&!N(n[l])?n[l]:void 0,d=new Set(Object.keys(t));u!==void 0&&(d.add("light"),d.add("dark"),s&&d.add(s));let p={},h;for(let b of d){if(a.has(b))continue;let _=t[b]?.[l];if((_===void 0||N(_))&&(_=u),_===void 0)continue;let y=Qg(e,l,_,`@${b}`);y!==void 0&&(p[b]=y,(s&&b===s||!s&&(b==="light"||h===void 0))&&(h=y))}let g={},m=Object.keys(p).filter(b=>p[b]!==h);if(m.length){let b=p.light!==void 0?p.light:h,_=p.dark!==void 0?p.dark:h;if(fw(l)&&Ur(b)&&Ur(_)){g[l]=b===_?b:`light-dark(${b}, ${_})`;for(let y in p)y==="light"||y==="dark"||cw(g,y,{[l]:p[y]},r)}else{h!==void 0&&(g[l]=h);for(let y of m)cw(g,y,{[l]:p[y]},r)}}else{if(h===void 0)continue;g[l]=h}Sa(c,g),c[`.${l}`]=g}return(c.background||c.color||c.backgroundColor)&&(c[".inversed"]={color:c.background||c.backgroundColor,background:c.color}),c},Zg=(t,e,r)=>{let{cssVars:n}=r;r.cssMediaVars||(r.cssMediaVars={});let o=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=uw(t,a);for(let l of a){let f=l.slice(0,1),u=Object.values(t).some(d=>N(d?.[l]));if(f==="."&&u){let d=l.slice(1),p={};for(let h in t)N(t[h]?.[l])&&(p[h]=t[h][l]);i[l]=Zg(p,`${e}-${d}`,r)}else if(f===":"&&u){let d=l.replace(/^:+/,""),p={};for(let h in t)N(t[h]?.[l])&&(p[h]=t[h][l]);i[l]=Zg(p,`${e}-${d}`,r)}else if(f!=="@"&&f!=="."&&f!==":"){let p=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}-${l}`,h=s&&s!=="auto"?String(s).replace(/^'|'$/g,""):null,g;for(let m in t){if(c.has(m))continue;let b=t[m]?.[l];if(b===void 0)continue;let _=Qg(e,l,b,`@${m}`);if(_===void 0)continue;(h&&m===h||!h&&(m==="light"||g===void 0))&&(g=_);let y=`[data-theme="${m}"]`;if(o[y]||(o[y]={}),o[y][p]=_,m==="dark"||m==="light"){let x=`@media (prefers-color-scheme: ${m})`;o[x]||(o[x]={}),o[x][p]=_}}g!==void 0&&(n[p]=g),i[l]=`var(${p})`,i[`.${l}`]={[l]:i[l]}}}return(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color}),i},Bo=(t,e,r,n)=>{let o=E(),{cssVars:s}=o,i={value:t},a=!r&&!n,c;if(N(t)){if(a&&o.useVariable){let l={};for(let f in t)f.startsWith("@")&&N(t[f])&&(l[f.slice(1)]=t[f]);if(Object.keys(l).length){let f=Zg(l,e,o);Object.assign(i,f)}}else if(a){let l={},f={};for(let u in t)u.startsWith("@")?N(t[u])&&(l[u.slice(1)]=t[u]):f[u]=t[u];c=dw(l,e,o,f),Object.assign(i,c)}for(let l in t){let f=l.slice(0,1),u=t[l];if(f==="@"||f===":"||f==="."){let d=f==="@"&&l;i[l]=Bo(u,e,l,n||d)}else if(!a){let d=Qg(e,l,u,n),p=[...new Set([n,r].filter(b=>b).map(b=>b.slice(1)))],h=p.length?"-"+p.join("-"):"",m=`--${o.varPrefix?o.varPrefix+"-":""}theme-${e}${h}-${l}`;o.useVariable?(o.useThemeSuffixedVars&&(s[m]=d),i[l]=`var(${m})`):i[l]=d,i[`.${l}`]={[l]:i[l]}}}if(c)for(let l in c){let f=l.slice(0,1);(f==="."||f===":")&&N(t[l])&&(i[l]=c[l])}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(S(t)&&mt(t)){let f=o.theme[t.slice(2)];return ve(f,n)}return i},Jg=(t,e)=>{let r={};for(let n in t){let o=n.slice(0,1);if(N(t[n]))if(e&&WA(n))r[n]=Sa({},t[n]);else{if(o==="@")continue;o===":"?r[`&${n}`]=Jg(t[n],e):o==="."&&(r[`&${n}`]=Jg(t[n],e))}else r[n]=t[n]}return r},pw=(t,e)=>{let r=e.shift();return t[r]?pw(t[r],e):t},lw=(t,e)=>O(e)?pw(t,e):S(e)&&t[e]?t[e]:t;var ve=(t,e)=>{let r=E();if(S(t)&&mt(t)&&(t=ve(t.slice(2))),!t||!S(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[n,...o]=O(t)?t:t.split(" "),s=r.theme[n];return s&&o.length?s=lw(s,o):s&&e&&(s=lw(s,e)),Jg(s,!r.useVariable)};P();P();var va=(t,e)=>{let r=E(),n=`--font-${e}`;if(!t||O(t)&&!t[0])return;let o;if(t.isVariable){let s=we(t.url,r.files)||t.url;Do(s)?o=Io(s):o=Fr(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap",unicodeRange:t.unicodeRange})}else if(t[0])o=On(e,t,r.files);else{let s=Array.isArray(t.url)?t.url.map(i=>we(i,r.files)||i):we(t.url,r.files)||t.url;o=Fr(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch,unicodeRange:t.unicodeRange})}return{var:n,value:t,fontFace:o}},Ca=(t,e)=>{let r=E(),{fontFamily:n}=r;return Tn(e||n,t)},Uo=(t,e)=>{let r=E(),{fontFamily:n,fontFamilyTypes:o}=r,{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!n.default)&&(n.default=e),k(s)&&(s=vn(s));let a=`--font-family-${e}`,c=`${s.join(", ")}, ${o[i]}`;return{var:a,value:c,arr:s,type:i,isSystemFallback:!!t.isSystemFallback}};P();var hf=t=>{let e=E(),{typography:r,media:n}=e;for(let o in t){let s=o.slice(0,1)==="@",i=t[o];if(!s)continue;let{mediaRegenerate:a}=t,c=o.slice(1),{type:l,base:f,ratio:u,range:d,subSequence:p,h1Matches:h,unit:g}=t;gt(i,{type:l,base:f,ratio:u,range:d,subSequence:p,h1Matches:h,unit:g});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),b=i.unit||g,_=!i.unit&&m.has(g)?"rem":b,y=n[c],x="@media "+(y==="print"?`${y}`:`screen and ${y}`);if(r.templates[x]={fontSize:i.base/r.browserDefault+_},!a){gt(i,{sequence:{},scales:{},vars:{}}),Xt(i),Nr(t,o);continue}gt(i,{sequence:{},scales:{},templates:{},vars:{}}),Xt(i),Nr(t,o)}},gf=t=>{let e=E();if(t.h1Matches){let r=t.unit,n=ga(t),{templates:o}=t;for(let s in n){let i=`h${parseInt(s)+1}`,a=o[i];o[i]={fontSize:e.useVariable?`var(${n[s]?.variable})`:`${n[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}}}},Ea=()=>{let t=E(),{typography:e}=t;Xt(e),gf(e),mr(e),hf(e)},Aa=t=>{let e=E(),{typography:r}=e;return Qe(t,"fontSize",r)};P();var Ta=t=>{if(!S(t))return;let r=E().shape;if(r)return r[t]!==void 0?r[t]:r[t.toLowerCase()]};P();var Oa=()=>{let t=E(),{timing:e}=t;Xt(e),mr(e)},Ce=t=>{let e=E(),{timing:r}=e;return r[t]||r[Zi(t)]||t},ce=(t,e="timing")=>{let r=E(),{timing:n}=r;return Qe(t,e,n)};P();var Ra=()=>{let t=E(),{fontFamily:e,theme:r,typography:n}=t,o=t.document;return cr(o)?(Er(t,"document",o),o=t.document={}):o||(o=t.document={}),gt(o,{theme:r.document,fontFamily:Tn(e),fontSize:n.base,lineHeight:n.lineHeight})};P();var rm={document:et},Vo=(t,e)=>{let r=E();if(!t){r.verbose&&console.warn("setSVG: val is not defined",e);return}return r.useSvgSprite?ya(e,t):t},Pa=(t,e=rm)=>{let r=E(),n=Object.keys(t).length?{}:r.svg;for(let o in t)n[o]=t[o];gw(n,e)},Ln=(t,e)=>{let r=E();return r.useIconSprite&&!r.semanticIcons?.[e]?Vo(t,e):t},Mn=(t,e=rm)=>{let r=E(),n=Object.keys(t).length?{}:r.icons;for(let o in t)n[o]=t[o];gw(n,e)},em=(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},qA=(t,e)=>{let r=typeof DOMParser<"u"?DOMParser:null;if(r){let n=`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,s=new r().parseFromString(n,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},hw=(t,e,r)=>{for(;e.firstChild;){let n=e.firstChild;r.appendChild(t.importNode(n,!0)),n.remove()}},gw=(t,e=rm)=>{let r=E(),n=e.document||et;if(!n||!n.documentElement)return r.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),No(t);let o=n.querySelector("#svgSprite"),s=No(t),i=`<svg aria-hidden="true" width="0" height="0" style="position:absolute" id="svgSprite">${s}</svg>`,a=qA(n,s);if(o)if(a)hw(n,a,o);else if(n.body.insertAdjacentHTML)o.insertAdjacentHTML("beforeend",s);else{let c=em(n,{isRoot:!1});c.innerHTML=s,o.append(...c.children)}else if(a){let c=em(n);c&&c.nodeType&&(hw(n,a,c),n.body.prepend(c))}else if(n.body.insertAdjacentHTML)n.body.insertAdjacentHTML("afterbegin",i);else{let c=em(n);c&&c.nodeType&&(c.innerHTML=s,n.body.prepend(c))}};P();var Da=(t={})=>{let e=E(),r=e.typography||{},n=e.document||{},o=k(e.reset)?e.reset:e.reset={};if(o[":root"]){let c=o,l=r.templates||{};c.body={...e.useDocumentTheme?ve("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?ve("document"):{};if(o.html&&Gt(o.html,a),r.unit)for(let c in i){if(c.slice(0,6)!=="@media")continue;let l=i[c];delete i[c],!(!l||!l.fontSize)&&(o[c]||(o[c]={}),o[c].html||(o[c].html={}),o[c].html.fontSize===void 0&&(o[c].html.fontSize=l.fontSize))}if(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,p=f.browserDefault||r.browserDefault,h=l.slice(1),g=c[h];if(!g)continue;let m="@media "+(g==="print"?g:"screen and "+g);o[m]||(o[m]={}),o[m].html||(o[m].html={}),o[m].html.fontSize=d/p+u}}return ot(gt(o,t),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",textSizeAdjust:"100%",WebkitTextSizeAdjust:"100%",...a,fontSize:r.unit?r.base/r.browserDefault+r.unit:r.browserDefault+"px",fontFamily:n.fontFamily,lineHeight:n.lineHeight},body:{boxSizing:"border-box",height:"100%",margin:0,fontFamily:n.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}},ie)};P();var KA=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),mw=/^-?[A-Z][0-9]?$/,tr=t=>ae(t),mf=t=>{if(S(t))return oe.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=tt(e);return De(r)?r:e}).join(" ")},yf=(t,e)=>wa(t,e),Ia=(t,e)=>{if(S(t))return oe.test(t)?t:pr(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(mt(n))return`var(${n})`;if(n==="inset"||n==="none")return n;let o=tt(n);if(De(o)){let i=Pt(n,e);return k(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em")return n;let s=vt(n,"shadow");return s&&s.shadow?s.shadow:n}).join(" "):"")).join(", ")},$a=(t,e)=>{let r=t.indexOf("(");if(r===-1)return t;let n=t.slice(0,r+1),o=t.slice(r+1,t.lastIndexOf(")")),s=")",a=pr(o).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||KA.has(f)||f==="transparent"||oe.test(f))return f;let u=tt(f);return De(u)?u:f}).join(" ")));return n+a.join(", ")+s},bf=(t,e)=>{if(!S(t))return;let r=E();return pr(t).map(n=>{let o=n.trim();if(mt(o))return`var(${o})`;if(/^var\(/.test(o)||o.includes("url"))return o;if(r.gradient?.[o]){let s=Pt(o,e);if(S(s))return s;if(k(s)){for(let i in s)if(S(s[i]))return s[i]}return o}return o.includes("gradient")?$a(o,e):o.includes("/")||o.startsWith("http")||o.includes(".")&&!Ft(o)?`url(${o})`:o}).join(", ")},_f=t=>S(t)&&t.split(" ").map(e=>vt(e,"gap").gap).join(" "),xf=t=>{if(!S(t))return t;let e=E();return ea(t).map(r=>mw.test(r)?Pn(r,e.spacing):r).join(" ")},nm=t=>{if(!S(t))return;let e=t.split(" ");return e.length?e.map(r=>mt(r)?`var(${r})`:r.length<3||r.includes("ms")?ce(r).timing||r:Ce(r)?Ce(r):r).join(" "):t},La=(t,e,r)=>{if(S(t))return t.split(",").map(n=>ce(n).timing||n).join(",")},wf=t=>{if(!S(t))return;let e=t.split(",");if(e.length)return e.map(nm).join(",")};function _t(t,e,r={},n={}){let o=ft.call(this,e||r[t]);if(o==null)return;let s;if(S(o)){if(/^(?:env|var)\(/.test(o.trim()))return{[t]:o};if(o.includes("(")){let c=gr(o);s=c[0],o=c[1]}let i=r.scaleBoxSize,a=ba(t);!i&&a&&!n.ratio&&(o=xa(o))}return n.ratio?ke(r,t,o,s):vt(o,t,void 0,s)}var M=(t,e=null,r)=>_t(t,e,r,{ratio:!0}),GA=(t,e,r)=>S(t)?t.split(" ").map(n=>mw.test(n)?ke(e,r,n)[r]:n).join(" "):t,yr=(t,e,r,n="borderRadius")=>{if(S(t))return{[n]:t.split(" ").map(o=>{let s=Ta(o);return s!==void 0?GA(s,e,r):ke(e,r,o)[r]}).join(" ")}};P();var Ho="__smblsThemeRootOwner",Wo=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)},yw=(t,e,r)=>{if(!(!t||!e)){Wo(t),t.__prefersListener=r,t.__prefersMq=e;try{e.addEventListener("change",r)}catch{e.addListener(r)}}},YA=(t,e)=>{let r=E(),{cssVars:n}=r,o=e.startsWith("--")?e:`--${e}`;return n[o]=t,t},Zt=t=>t,Sf={color:Br,gradient:jo,font:va,fontFamily:Uo,fontfamily:Uo,theme:ka,icons:Ln,semanticIcons:Zt,semanticicons:Zt,svg:Vo,svgData:Zt,typography:Zt,shadow:Wr,spacing:Zt,media:Zt,grid:Zt,class:Zt,timing:Zt,reset:Zt,unit:Zt,animation:Zt,vars:YA,sizes:Zt,shape:Zt},XA=(t,e,r,n)=>{Er(t,r,e);let o={};for(let s of n)t[s]===e&&(t[s]=o);return t.verbose&&console.warn("[scratch] design-system family",r,"resolved to a host object; parked it and allocated a plain bucket"),o},om=(t,e,r)=>{let n=E(),o=la(t),s=o.toLowerCase(),i=n[o]||n[s]||n[t],a=cr(i)?XA(n,i,s,[o,s,t]):i,c=Sf[o]||Sf[s];if(c)try{let l=c(e,r);return a&&(a[r]=l),a}catch(l){n.verbose&&console.warn("Error setting",s,"value",e,r,l)}if(!c){let l=a||(n[s]={});return l[r]=e,l}n.verbose&&console.warn("Can not find",s,"method in scratch")},sm=(t,e)=>{let r=E(),n=t.toLowerCase();return cr(e)?(Er(r,n,e),r.verbose&&console.warn("[scratch] ignoring host object passed as the",n,"design-system family"),r[n]||r[t]):e==null?(r.verbose&&console.warn("[scratch] skipping empty design-system family",n),r[n]||r[t]):(Object.keys(e).sort((s,i)=>{let a=k(e[s])||O(e[s])?1:0,c=k(e[i])||O(e[i])?1:0;return a-c}).forEach(s=>{try{return om(n,e[s],s)}catch(i){r.verbose&&console.warn("Error setting",n,"value",e[s],s,i)}}),r[n]||r[t])},kf=(t,e)=>{let r=e||E();r.globalTheme=t;let o=no(r)||(typeof document<"u"?document:null),s=o&&o.defaultView||(typeof window<"u"?window:null);if(o){let a=r.themeRoot||o.documentElement,c=t&&t!=="auto";if(a[Ho]=r,c)Wo(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",yw(r,f,l)}else Wo(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(o&&r.cssVars){let a=r.scopeSelector||":root",c=o.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},ZA={},Fn=(t,e=ZA)=>{let r=e.config||E(),{version:n,verbose:o,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:c,useIconSprite:l,globalTheme:f,themeRoot:u,useDocumentTheme:d,useDefaultConfig:p,semanticIcons:h,hoverMedia:g,files:m,assets:b,..._}=t;e.newConfig&&(r=af(e.newConfig)),ar(_.document)&&(r.__domDocument=_.document,delete _.document),ar(r.document)&&(r.__domDocument||(r.__domDocument=r.document),r.document={}),m!==void 0&&(r.files=m),b!==void 0&&(r.assets=b),o!==void 0&&(r.verbose=o),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),p!==void 0&&(r.useDefaultConfig=p),h!==void 0&&(r.semanticIcons=h),g!==void 0&&(r.hoverMedia=g),r.verbose&&console.log(r);let x=no(r)||(typeof document<"u"?document:null),w=x&&x.defaultView||(typeof window<"u"?window:null),v=x&&(r.themeRoot||x.documentElement);if(v&&typeof v.setAttribute=="function")if(r.globalTheme&&r.globalTheme!=="auto")Wo(r),v.setAttribute("data-theme",r.globalTheme),r.resolvedTheme=r.globalTheme,v[Ho]=r,r.globalTheme==="dark"||r.globalTheme==="light"?v.style.colorScheme=r.globalTheme:v.style.colorScheme="light dark";else if(v[Ho]&&v[Ho]!==r&&v.hasAttribute("data-theme"))Wo(r),r.resolvedTheme=v.getAttribute("data-theme");else if(w&&w.matchMedia){let V=z=>{let H=z.matches?"dark":"light";v.setAttribute("data-theme",H),r.resolvedTheme=H},Bt=w.matchMedia("(prefers-color-scheme: dark)");V(Bt),v.style.colorScheme="light dark",v[Ho]=r,yw(r,Bt,V)}else Wo(r),v.setAttribute("data-theme","light"),r.resolvedTheme="light",v.style.colorScheme="light",v[Ho]=r;r.__svgCache||(r.__svgCache={}),Fo(_);let D=Object.keys(_).filter(R=>!R.startsWith("__")),L=new Set(D);if(D.forEach(R=>{let V=R.toLowerCase();V!==R&&L.has(V)&&ot(_[V],_[R],ie)}),D.map(R=>{let V=R.toLowerCase();if(!(V!==R&&L.has(V)))return sm(R,_[R])}),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{Ea()}catch(R){r.verbose&&console.warn("Error applying typography sequence",R)}if(_.spacing)try{_a()}catch(R){r.verbose&&console.warn("Error applying spacing sequence",R)}if(_.timing)try{Oa()}catch(R){r.verbose&&console.warn("Error applying timing sequence",R)}Ra();let T=Da();return T&&(r.reset=T),r};var Ko=new Map,Ow=null,am=null,JA=null;function Fa(t){t.batchAtomicCss&&(am=t.batchAtomicCss),t.compoundCssClass&&(JA=t.compoundCssClass)}var QA=new Set,_w=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function lm(t){try{let e=E();e&&(e.__domDocument=t)}catch{}t&&QA.add(t)}function jn(){try{let t=E();if(t){if(_w(t.__domDocument))return t.__domDocument;if(_w(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 Tf(){return{...Jt}}function fm(){for(let t in Jt)Jt[t]=0;Ef=!1}var Ef=!1,Cf=(t,e)=>`${t} ${e}${t===1?"":"s"}`;function tT(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 eT(){try{let t=uT();if(!t.length)return-1;let e=0;for(let r=0;r<t.length;r++)e+=t[r].cssRules?t[r].cssRules.length:0;return e}catch{return-1}}function rT(t,e){if(Ef)return!1;Ef=!0;let r="n/a \u2014 running from src/ (unbuilt), so no dist is in play",n="this IS the source",o="@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")}.
40
+ src: ${i};`},Fr=(t,e,r,n)=>`@font-face {${aa(t,e,r,n)}
41
+ }`,On=(t,e,r)=>Object.keys(e).map(o=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f}=e[o],u=Array.isArray(s)?s.map(d=>Se(d,r)||d):Se(s,r)||s;return aa(t,u,i,{fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f})}),kg=t=>Object.keys(t).map(r=>On(r,t[r].value)),rf=(t,e,r)=>{if(e&&e.isVariable){let s=Se(e.url,r)||e.url;return Io(s)?$o(s):Fr(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap",unicodeRange:e.unicodeRange})}if(e[0])return On(t,e,r).map(ef);let o=Array.isArray(e.url)?e.url.map(s=>Se(s,r)||s):Se(e.url,r)||e.url;return Fr(t,o,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch,unicodeRange:e.unicodeRange})},ca=(t,e)=>Object.keys(t).map(n=>rf(n,t[n].value,e));R();R();R();R();var Lo={};D(Lo,{animation:()=>Bg,breakpoints:()=>Ng,class:()=>Wg,color:()=>Pg,devices:()=>jg,document:()=>Xx,font:()=>Cg,fontFace:()=>Tg,fontFamily:()=>Eg,fontFamilyTypes:()=>Ag,gradient:()=>Dg,grid:()=>Hg,icons:()=>Lg,media:()=>Og,reset:()=>Zx,semanticIcons:()=>Mg,sequence:()=>hr,shadow:()=>$g,shape:()=>Gg,sizes:()=>Kg,spacing:()=>Rg,svg:()=>Ug,svgData:()=>Vg,templates:()=>zg,theme:()=>Ig,timing:()=>Fg,typography:()=>la,unit:()=>vg,vars:()=>qg});var hr={"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 vg={default:"em"};var RA={browserDefault:16,base:16,type:"font-size",ratio:hr["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},la=RA;var Cg={};var Eg={},Ag={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},Tg={};var Og={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var PA={base:la.base,type:"spacing",ratio:hr.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},Rg=PA;var Pg={},Dg={};var Ig={};var $g={};var Lg={},Mg={};var DA={default:150,base:150,type:"timing",ratio:hr["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},Fg=DA;var Xx={};var Ng={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},jg={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 Bg={};var Ug={},Vg={};var zg={};var IA={},Hg=IA;var Wg={};var Zx={},qg={},Kg={},Gg={};var af={},cf={},ae=new Set,nf=Lo,of={},ua=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in nf){let e=t.toLowerCase();of[e]=nf[t];let r=ua(e);r!==e&&(of[r]=nf[t]),e!==t&&(of[t]=nf[t])}var Rn={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:af,cssMediaVars:cf,CSS_VARS:af,CSS_MEDIA_VARS:cf,_scratchConfig:!0,...of},Mo=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return Ct(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let r=Ct(e)?e:t.globalTheme,n=Us(Ct(r)?r:"auto");return Object.defineProperty(t,"globalTheme",{get(){return n.get()},set(o){n.set(o)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"__globalThemeSignal",{value:n,enumerable:!1,configurable:!0,writable:!0}),n},Jx=t=>t?Mo(t):null,Fo=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return Ct(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let r=Ct(e)?e:t.resolvedTheme,n=Us(Ct(r)?r:null);return Object.defineProperty(t,"resolvedTheme",{get(){return n.get()},set(o){n.set(o)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"__resolvedThemeSignal",{value:n,enumerable:!1,configurable:!0,writable:!0}),n},Qx=t=>t?Fo(t):null;Mo(Rn);Fo(Rn);var sf=lt(Rn),ie={active:"0",0:Rn},tw=t=>(Ct(t)&&(ie.active=t),ie[t||ie.active]),fa=[],it=t=>{t&&t._scratchConfig&&fa.push(t)},nt=()=>{fa.pop()},E=t=>fa.length?fa[fa.length-1]:ie[t||ie.active]||Rn,lf=t=>{if(k(t))return ie.active="1",ie[1]=st(t,lt(sf),ae),No(ie[1]),Mo(ie[1]),Fo(ie[1]),t},$A=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],LA=["useVariable","globalTheme","verbose"],MA=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],No=t=>{for(let e of MA){let r;for(let n of e){let o=t[n];k(o)&&(r=r?st(r,o,ae):o)}if(r)for(let n of e)k(t[n])&&(t[n]=r)}},da=(t,e,{cleanBase:r=!1}={})=>{let n=r?null:E(),o=lt(!r&&n&&n._scratchConfig?n:sf);for(let i of $A)delete o[i];for(let i of LA)Object.prototype.hasOwnProperty.call(sf,i)?o[i]=sf[i]:delete o[i];let s=st(e||{},o,ae);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s._scratchConfig=!0,No(s),Mo(s),Fo(s),t&&(ie[t]=s),s};var Je={"-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"},Yg=(t,e)=>{let{key:r,variable:n,value:o,scaling:s,index:i,scalingVariable:a}=t;e.sequence[r]={key:r,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:a,variable:n},e.scales[r]=s;let c=ew.has(e.unit)?"rem":e.unit;e.vars[n]=s+c},gr=t=>{if(!t.includes("("))return t;let e=t.split("(")[0],r=t.slice(t.indexOf("(")+1,t.lastIndexOf(")"));return[e,r]},ew=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),pa=(t,e)=>{let{base:r,type:n,unit:o}=e,s=ew.has(o)?"rem":o,i=(pn(s)?1:r)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(n&&n.replace(".","-")),l=`${c}-ratio`;if(t>0){let f=Je[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=Je[t+1],u=Math.abs(t),d=Math.pow(rw,2*u),p=Je[u];return p?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${p}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},ff=(t,e,r,n)=>{let{type:o}=n,i=t===2&&e.length===2?t+1:t,l=`${"--"+(n.varPrefix?n.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${l+i}))`},ha=(t,e)=>{let n=(t*e-t)/1.618,o=t*e-n,s=t+n,i=(o+s)/2;return[o,i,s]},ga=(t,e)=>ha(t,e).map(r=>r/t),ma=(t,e)=>{let{key:r,base:n,value:o,ratio:s,variable:i,index:a}=t,l=~~(o*s)-~~o,f,[u,d,p]=ha(o,s);l>16?f=[u,d,p]:f=[u,p],f.forEach((h,g)=>{let m=~~(h/n*1e3)/1e3,b=i+(g+1),_=a+(g+1)/10,y=ff(g+1,f,i,e),x={key:r+(g+1),variable:b,value:h,scaling:m,scalingVariable:y,index:_};Yg(x,e)})},rw=1.618,FA=(t,e,r)=>{if(t>=0)return e*Math.pow(r,t);let n=Math.abs(t),o=e*Math.pow(r,t),s=e*Math.pow(r,n)/Math.pow(rw,2*n);return Math.max(o,s)},Xt=t=>{let{type:e,base:r,ratio:n,range:o,subSequence:s}=t,i=Math.abs(o[0])+Math.abs(o[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=o[1]-l,u=Je[f],d=FA(f,r,n),p=~~(d/r*100)/100,h=c+u,g=pa(f,t),m={key:u,variable:h,value:d,base:r,scaling:p,scalingVariable:g,ratio:n,index:f};Yg(m,t),s&&ma(m,t)}return t},Xg=(t,e=0)=>{let{type:r,base:n,ratio:o,subSequence:s}=t,i=S(e)?e:Je[e],a=S(e)?Object.entries(Je).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=n*Math.pow(o,a),f=~~(l/n*100)/100,p="--"+(t.varPrefix?t.varPrefix+"-":"")+(r&&r.replace(".","-"))+"-"+i,h=pa(a,t),g={key:i,variable:p,value:l,base:n,scaling:f,scalingVariable:h,ratio:o,index:a};return Yg(g,c),s&&ma(g,c),c},Pn=(t="A",e)=>{let r=E(),{unit:n}=r;if(S(t)&&yt(t))return`var(${t})`;if(S(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(S(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:o,unit:s=n.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(Vs(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+"-":""}${ta(e.type.replace(".","-"))}-`,p=t.toUpperCase(),h=p.slice(0,1)==="-"?"-":"",g=h?p.slice(1):p,m="";g.includes("_")&&(m="_"+g.split("_")[1].toLowerCase(),g=g.split("_")[0]);let b=y=>a.test(y)?`var(${d}${y}${m})`:y;if(g.includes("+")){let[y,x]=g.split("+"),w=`${b(y)} + ${b(x)}`;return h?`calc((${w}) * -1)`:`calc(${w})`}else if(g.includes("*")){let[y,x]=g.split("*"),w=`${b(y)} * ${b(x)}`;return h?`calc((${w}) * -1)`:`calc(${w})`}else if(g.includes("-")){let[y,x]=g.split("-"),w=`${b(y)} - ${b(x)}`;return h?`calc((${w}) * -1)`:`calc(${w})`}if(!o[g]&&g.length===2&&(r.verbose&&console.warn(g,"- value is not found because `subSequence` is set to false"),g=g.slice(0,1)),i||r.useVariable){let y=`var(${d}${g}${m})`;return h?`calc(${y} * -1)`:y}let _=o?o[g]:null;if(!_){if(console.warn("can't find",o,g),Et())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"?h+_.val+s:h+_.scaling+s},uf=(t,e)=>{if(!["+","-","*","/",","].filter(s=>t.includes(s+" ")).length)return t;let n=/(\s+-\s+|\s*[+*/,]\s*)/;return t.split(n).map(s=>{let i=s.trim();return!i||["+","-","*","/",","].includes(i)?s:Pn(i,e)}).join("")},Qe=(t,e,r,n)=>{if(typeof t!="string")return E().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!n&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let s=gr(t);n=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=uf(t,r):t=Pn(t,r),{[e]:n?`${n}(${t})`:t}},df=(t,e)=>Je[t-e],ya=t=>{let{h1Matches:e,sequence:r}=t;return new Array(6).fill(null).map((n,o)=>{let s=df(e,o);return r[s]})};R();var Zg=(t,e)=>{let r=E(),{cssVars:n}=r;N(t.value)||(n[t.var]=t.value)},ba=(t,e,r)=>{let n=E(),{unit:o}=n,s=e.unit||o.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,p,h]=ga(i,a);t[`${f}-sub-ratio-1`]=`calc(var(${f}-ratio) * ${d/a})`,t[`${f}-sub-ratio-2`]=`calc(var(${f}-ratio) * ${p/a})`,t[`${f}-sub-ratio-3`]=`calc(var(${f}-ratio) * ${h/a})`},nw=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),mr=(t,e={})=>{let r=E(),{unit:n,timing:o,cssVars:s}=r,i=t.unit||n.default,a=nw.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||ba(s,t,e);for(let u in l){let d=l[u],p=(t.type===o.type?l[u].val:f[u])+a;if(!c){s[d.variable+"_default"]=p,s[d.variable]=d.scalingVariable;continue}e.useDefault===!1?s[d.variable]=p:(s[d.variable+"_default"]=p,s[d.variable]=`var(${d.variable+"_default"})`)}},Nr=(t,e,r={})=>{let n=E(),{unit:o,media:s,cssVars:i}=n,a=e.slice(1),c=t[e],l=c.unit||t.unit||o.default,f=nw.has(l)?"rem":l,{mediaRegenerate:u}=t,{sequence:d,scales:p}=c,h=s[a];if(!h&&n.verbose&&console.warn("Can't find media query ",h),!u){let g=i[`@media ${h}`];g||(g=i[`@media ${h}`]={}),ba(g,c,r);let m=t.unit||o.default;if(f!==m&&d)for(let b in d){let _=d[b],y=p[b]+f;g[_.variable+"_default"]=y,g[_.variable]=y}return}for(let g in d){let m=d[g],b=(pn(f)?p[g]:d[g].val)+f;!h&&n.verbose&&console.warn("Can't find query ",h);let _=i[`@media ${h}`];_||(_=i[`@media ${h}`]={}),_[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=b}};R();var sw=bn(),jo=t=>{let e=E(),r="";for(let n in t)e.__svgCache[n]||(e.__svgCache[n]=!0,r+=t[n]);return r},NA=t=>{let e=t&&(t.default||t);if(!S(e))return sw&&console.warn("parseRootAttributes:",e,"is not a string"),{};let r=e.match(/<svg\s+(.*?)>/);if(!r||!r[1])return{};let o=r[1].match(/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|\s*\/?[>"']))+.)["']?/gm);return o?o.reduce((s,i)=>{let[a,c]=i.split("=");return s[a]=c.replace(/['"]/g,""),s},{}):{}},jA=(t,e)=>{let r=[];if(t.replace(/id="([^"]*)"/g,(o,s)=>(r.push(s),o)),!r.length)return t;let n=t;for(let o of r){let s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${e}-${o}`;n=n.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 n},ow=new Set,_a=(t,e)=>{let r=e&&e.default?e.default:e;if(!S(r))return sw&&!ow.has(t)&&(ow.add(t),console.warn("convertSvgToSymbol:",t,"is not a string")),"";e=r;let n=e.match(/^<symbol\b[^>]*\bid="([^"]*)"/);if(n){let u=n[1];return u===t?e:e.replace(`id="${u}"`,`id="${t}"`)}let o=NA(e),{width:s,height:i}=o,a=o.viewBox||`0 0 ${s||24} ${i||24}`,f=jA(e,t).replace("<svg",`<symbol id="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="${a}"`);return f=f.replace(/^<symbol\b[^>]*>/,u=>u.replace(/\s(width|height)="[^"]*"/g,"")),f=f.replace("</svg","</symbol"),f=VA(f),f},BA="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",UA=new RegExp(`<(${BA})\\b([^>]*?)\\s*/>`,"g"),VA=t=>t.replace(UA,"<$1$2></$1>");var Ho={};D(Ho,{STANDARD_SCHEME_QUERIES:()=>hf,appendSVGSprite:()=>Ia,appendSvgIconsSprite:()=>Mn,applyDocument:()=>Da,applyHeadings:()=>yf,applyReset:()=>$a,applySpacingSequence:()=>wa,applyTimingSequence:()=>Pa,applyTypographySequence:()=>Ta,checkIfBoxSize:()=>xa,getColor:()=>Q,getFontFamily:()=>Aa,getFontSizeByKey:()=>Oa,getMediaColor:()=>Dt,getMediaTheme:()=>Ce,getSafeInk:()=>gf,getSafeInkInfo:()=>tm,getShadow:()=>ka,getShapeByKey:()=>Ra,getSpacingBasedOnRatio:()=>ve,getSpacingByKey:()=>kt,getTheme:()=>om,getTimingByKey:()=>le,getTimingFunction:()=>Ee,isPlainColor:()=>Ur,quietColorProbe:()=>Dn,resolveBorderValue:()=>ce,resolveColorRgb:()=>In,resolveShadowValue:()=>$n,runThroughMedia:()=>mf,schemeGuardSelector:()=>zr,schemeMediaQuery:()=>Vr,setAdaptiveSchemeVar:()=>Hr,setColor:()=>Br,setFont:()=>Ea,setFontFamily:()=>Vo,setGradient:()=>Bo,setMediaTheme:()=>Uo,setSVG:()=>zo,setShadow:()=>Wr,setSvgIcon:()=>Ln,setTheme:()=>Ca,splitSpacedValue:()=>Sa});R();var hf={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},Vr=(t,e)=>{let r=e.media&&e.media[t]||hf[t];return r?"@media "+(r==="print"?`${r}`:`screen and ${r}`):null},zr=t=>{let e=t.scopeSelector||":root";return`${e===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`} &`},ke=new Set,lw=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"]),zA=/^(?:#[0-9a-f]{3,8}$|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix)\()/i,HA=/gradient\(|url\(|image-set\(|var\(/i,WA=new Set(["transparent","currentColor","currentcolor"]),Ur=t=>{if(!S(t))return!1;let e=t.trim();return HA.test(e)?!1:zA.test(e)?!0:lw.has(e)||WA.has(e)},pf=new Set,iw=t=>{if(!t)return!1;let{color:e,gradient:r}=t;return!!(k(e)&&Object.keys(e).length||k(r)&&Object.keys(r).length)},aw=new Set,Jg=0,Dn=t=>{Jg++;try{return t()}finally{Jg--}},qA=(t,e)=>{if(!S(t)||t.indexOf(" ")===-1)return null;let r=t.replace(/\s+/g,""),n=Nt(r);if(!n||n.passthrough||n.cssVar)return null;let{color:o,gradient:s}=e;return!o[n.name]&&!s[n.name]?null:r},Qg=(t,e,r)=>{let n=qA(t,r);if(n){if(!aw.has(t)){aw.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 \`${n}\`? 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 o=Nt(t);if(o&&o.name&&!o.passthrough&&!o.cssVar&&(o.alpha!==void 0||o.tone!==void 0)&&iw(r)&&!r.color[o.name]&&!r.gradient[o.name]){if(!Jg&&!pf.has(t)){pf.add(t);let i=r&&r.name?` (design system \`${r.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` does not resolve${i} \u2014 \`${o.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=S(e)?e.toLowerCase():"";if(!lw.has(s)||!iw(r))return t;if(!pf.has(s)){pf.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.`)}},fw=(t,e,r)=>{let n=e!==void 0?e:1;if(!r)return`rgb(from ${t} r g b / ${n})`;if(r.charCodeAt(0)===43||r.charCodeAt(0)===45){let s=parseFloat(r),i=s<0?"-":"+",a=Math.abs(s);return`rgb(from ${t} calc(r ${i} ${a}) calc(g ${i} ${a}) calc(b ${i} ${a}) / ${n})`}return`hsl(from ${t} h s ${r}% / ${n})`},Q=(t,e,r)=>{let n=r||E();if(!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(yt(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(O(t))[o,s,i]=t;else{let u=Nt(t);if(!u){let{color:d,gradient:p}=n,h=p[t]||d[t];return h?(e&&h[e]&&(h=h[e]),n.useVariable?`var(${h.var})`:h.value):Qg(t,t,n)}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}let{color:a,gradient:c}=n,l=a[o]||c[o];if(!l)return Qg(t,o,n);if(e)if(l[e]!==void 0)l=l[e];else if(O(l)){let u=e.charCodeAt(0)===64?e.slice(1):e;u==="dark"?l=l[1]!==void 0?l[1]:l[0]:(u!=="light"&&n.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 n.verbose&&console.warn(t," - does not have ",e);if(S(l)){if(ke.has(o))return l;ke.add(o);try{return Q(l,null,r)}finally{ke.delete(o)}}let f=l.rgb;if(!f){let u=n.useVariable?`var(${l.var})`:l.value;return(s||i)&&u?fw(u,s,i):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}, ${l.alpha!==void 0?l.alpha:1})`:n.useVariable?`var(${l.var})`:l.value!==void 0?l.value:`rgb(${f})`},cw=t=>{let e=we(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}},KA=(t,e)=>{if(!e)return t;let r=t.rgb;if(e.tone){let o=Ze(r,e.tone);r=S(o)?o.split(",").map(s=>parseFloat(s.trim())):o}let n=e.alpha!==void 0?parseFloat(e.alpha):t.alpha;return{rgb:r,alpha:n}},In=(t,e,r)=>{let n=e||E();if(!S(t))return null;let o=Nt(t);if(o){if(o.passthrough){let d=we(o.passthrough);return d&&d.length>=3?{rgb:[d[0],d[1],d[2]],alpha:d[3]!==void 0?d[3]:1}:null}if(o.cssVar)return null}let s=o?o.name:t,{color:i,gradient:a}=n,c=i[s]||a[s];if(!c)return cw(t);if(S(c)){let d;if(ke.has(s))d=cw(c);else{ke.add(s);try{d=In(c,n,r)}finally{ke.delete(s)}}return d?KA(d,o):null}if(c.rgb===void 0&&k(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;o&&o.tone&&(l=Ze(l,o.tone));let f=S(l)?l.split(",").map(d=>parseFloat(d.trim())):l,u=o&&o.alpha!==void 0?parseFloat(o.alpha):c.alpha!==void 0?c.alpha:1;return{rgb:f,alpha:u}},uw=t=>k(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0),dw=t=>{if(!k(t)||t.value!==void 0)return null;let e=[];for(let r in t)if(r!=="var"){if(r.charCodeAt(0)!==64||!uw(t[r]))return null;e.push(r.slice(1))}return e.length?e:null},GA=t=>S(t&&t.var)&&dw(t)!==null,YA=(t,e,r,n,o)=>{let s=dw(e);if(!s)return;if(S(e.var)){let c=`var(${e.var})`;return r||n?fw(c,r,n):c}if(s.length!==2||!s.includes("light")||!s.includes("dark"))return;let i=Q(t,"@light",o),a=Q(t,"@dark",o);if(!(!Ur(i)||!Ur(a)))return i===a?i:`light-dark(${i}, ${a})`},Dt=(t,e,r)=>{let n=r||E();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(yt(t))return`var(${t})`;let o,s,i;if(O(t))o=t[0];else{let u=Nt(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}else o=t}let{color:a,gradient:c}=n,l=a[o]||c[o],f=k(l);if(f&&l.value)return Q(t,`@${e}`,r);if(f){if(n.useVariable&&l.var)return s||i?Q(t,null,r):`var(${l.var})`;if(e){if(!n.useVariable&&a[o]===l){let u=YA(t,l,s,i,r);if(u!==void 0)return u}return Q(t,`@${e}`,r)}else{let u={},d=zr(n);for(let p in l){if(p.charCodeAt(0)!==64)continue;let h=p.slice(1),g=Q(t,p,r);if(g!==void 0&&(u[`[data-theme="${h}"] &`]=g,h==="light"||h==="dark")){let m=Vr(h,n);if(!m)continue;u[m]={[d]:g}}}return u}}else return Qg(t,o,n)},Hr=(t,e,r,n)=>{let s=`--${n.varPrefix?n.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){n.cssVars[s]=i,n.cssMediaVars||(n.cssMediaVars={});for(let c in a){let l=`[data-theme="${c}"]`;if(n.cssMediaVars[l]||(n.cssMediaVars[l]={}),n.cssMediaVars[l][s]=a[c],c==="light"||c==="dark"){let f=`@media (prefers-color-scheme: ${c})`;n.cssMediaVars[f]||(n.cssMediaVars[f]={}),n.cssMediaVars[f][s]=a[c]}}return t.var=s,s}},Br=(t,e,r)=>{let n=E();if(uw(t))return n.useVariable&&t.var&&(n.cssVars[t.var]=t.value),t;if(!n.useVariable&&GA(t))return t;if(S(t)&&yt(t)){let g=t.slice(2);if(t=Q(g),!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let m=g.split(" "),b=n.color[m[0]];if(b&&!b.value&&!b.rgb&&(S(b)||O(b)||k(b))&&!ke.has(m[0])){ke.add(m[0]);try{n.color[m[0]]=Br(b,m[0])}finally{ke.delete(m[0])}b=n.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=we(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(O(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),k(t)){let g={};for(let m in t)m!=="var"&&(g[m]=Br(t[m],e,m.slice(0,1)==="@"?m.slice(1):m));return n.useVariable&&Hr(g,"color",e,n),g}let s=`--${n.varPrefix?n.varPrefix+"-":""}color-${e}`+(r?`-${r}`:""),i=t.value||t;if(S(i)&&!i.includes("(")&&!i.startsWith("#")){let g=Nt(i);if(g&&g.name&&!g.passthrough&&!g.cssVar){let m=n.color[g.name];if(m&&!m.value&&!m.rgb&&(S(m)||O(m)||k(m))&&!ke.has(g.name)){ke.add(g.name);try{n.color[g.name]=Br(m,g.name)}finally{ke.delete(g.name)}}let b=n.color[g.name];if(b&&b.rgb){let _=b.rgb;g.tone&&(_=Ze(_,g.tone));let y=g.alpha!==void 0?parseFloat(g.alpha):b.alpha!==void 0?b.alpha:1;i=`rgba(${_}, ${y})`}}}let a=we(i),[c,l,f,u=1]=a,d=parseFloat(u.toFixed(2)),p=`${c}, ${l}, ${f}`,h=`rgba(${p}, ${d})`;return n.useVariable&&(n.cssVars[s]=h),{var:s,rgb:p,alpha:d,value:h}},Bo=(t,e,r)=>{let n=E();if(k(t)&&t.value!==void 0&&t.var!==void 0)return n.useVariable&&(n.cssVars[t.var]=t.value),t;if(S(t)&&yt(t)&&(t=Q(t.slice(2))),O(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),k(t)){let i={};for(let a in t)a!=="var"&&(i[a]=Bo(t[a],e,a.slice(0,1)==="@"?a.slice(1):a));return n.useVariable&&Hr(i,"gradient",e,n),i}let s=`--${n.varPrefix?n.varPrefix+"-":""}gradient-${e}`+(r?`-${r}`:"");return n.useVariable&&(n.cssVars[s]=t.value||t),{var:s,value:t.value||t}};R();var gf=(t,e,r={},n)=>{let o=n||E(),{min:s=4.5,large:i=!1,scheme:a,meta:c=!1,maxIterations:l=15}=r,f=i?3:s,u=a||(o.globalTheme&&o.globalTheme!=="auto"?o.globalTheme:"light"),d=S(e)?e:String(e),p=Nt(t),h=p&&!p.passthrough&&!p.cssVar?p.name:null,g=(Y,G)=>c?{value:Y,...G}:Y;if(h){let Y=o.color[`${h}Safe`];if(Y){let G=`${d}@${u}`,B=Y[G]!==void 0?Y[G]:Y[d];if(B!==void 0){let vt=B&&B.rgb!==void 0?o.useVariable&&B.var?`var(${B.var})`:B.value:Q(B,null,o);return g(vt,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=Q(t,u?`@${u}`:null,o),b=In(t,o,u),_=In(e,o,u);if(!b||!_)return o.verbose&&console.warn("getSafeInk: could not resolve",t,e,"\u2014 returning hue unchanged"),g(m,{ratio:null,deviation:0,derived:!1,overridden:!1,unresolved:!0});let y=An(_.rgb,_.alpha),x=An(b.rgb,b.alpha,y),w=Do(x,y);if(w>=f-.02)return g(m,{ratio:w,deviation:0,derived:!1,overridden:!1});let[v,P,$]=oa(b.rgb),[,I,A]=sa([v,P,$]),F=Cn(y)>.5,Mt=F?v:1-v,H=Y=>{let G=F?v-Y:v+Y,B=Math.max(0,Math.min(1,G));return{rgb:ia(B,I,A),L:B}},tt=Y=>{let{rgb:G}=H(Y),B=An(G.map(vt=>Math.round(vt)),b.alpha,y);return Do(B,y)},et=0,V=Mt,W=tt(V)>=f;if(W)for(let Y=0;Y<l;Y++){let G=(et+V)/2;tt(G)>=f?V=G:et=G}else et=V;let{rgb:Tt,L:z}=H(V),bt=Tt.map(Y=>Math.round(Y)),L=tt(V),ot=b.alpha<1?`rgba(${bt.join(", ")}, ${b.alpha})`:`rgb(${bt.join(", ")})`,gt=Math.abs(z-v)*100;return g(ot,{rgb:bt,ratio:L,startRatio:w,deviation:gt,derived:!0,overridden:!1,reachable:W})},tm=(t,e,r={},n)=>gf(t,e,{...r,meta:!0},n);R();R();var XA=t=>{let r=E().spacing||{},n=parseFloat(t.spacingRatio),o={...r,ratio:Number.isFinite(n)?n:r.ratio,sequence:{},scales:{}};return Xt(o),o},ZA=t=>{for(let e in t){let r=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;mt(r,{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),Xt(r),Nr(t,e)}},xa=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),n=e.includes("border")||e.includes("outline");return r&&!n},wa=()=>{let t=E(),{spacing:e}=t;Xt(e),mr(e),ZA(e)},JA=t=>{let e=E(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:Xt(t)},kt=(t,e="padding",r,n)=>{let o=JA(r);if(S(t)){if(!n&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!n&&t.includes("(")){let i=gr(t);n=i[0],t=i[1]}}let s=n?[t]:vn(t);if(O(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)=>Qe(s[f],e+l+i,o,n);return a[s.length].map((l,f)=>c(l,f))}return Qe(t,e,o,n)}},ve=(t,e,r,n)=>{let o=E(),{spacing:s}=o,i=r||t[e];if(!n&&S(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!n&&S(i)&&i.includes("(")){let a=gr(i);n=a[0],i=a[1]}if(t.spacingRatio){let a=XA(t);return kt(i,e,a,n)}return kt(i,e,s,n)},Sa=t=>{let e=r=>{let n=["+","-","*","/"].includes(r),o=so.some(i=>t.includes(i));return n||o?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 $n=(t,e,r)=>!S(t)||se.test(t)?t:pr(t).map(n=>(n=n.trim(),n.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(o.startsWith("--"))return`var(${o})`;let s=Dn(()=>Q(o,e));if(Ie(s))return s;if(/^\d/.test(o)||o==="0"||o.includes("px")||o.slice(-2)==="em"||o==="inset"||o==="none"||En.has(o.toLowerCase()))return o;r&&r(o);let i=kt(o,"shadow");return i&&i.shadow?i.shadow:o}).join(" "))).join(", "),Wr=(t,e,r,n)=>{let o=E();if(k(t)&&t.value!==void 0&&t.var!==void 0)return o.useVariable&&(o.cssVars[t.var]=t.value),t;if(O(t)){let a={"@light":Wr(t[0],e,"light"),"@dark":Wr(t[1],e,"dark")};return o.useVariable&&Hr(a,"shadow",e,o),a}if(k(t)){let a={};for(let c in t)a[c]=Wr(t[c],e,c.startsWith("@")?c.slice(1):c);return o.useVariable&&Hr(a,"shadow",e,o),a}S(t)&&!se.test(t)&&(t=$n(t));let i=`--${o.varPrefix?o.varPrefix+"-":""}shadow-${e}`+(r?`-${r}`:"");return o.useVariable&&(o.cssVars[i]=t),{var:i,value:t}},ka=(t,e)=>{let r=E();if(e||(e=r.globalTheme==="auto"?null:r.globalTheme),!S(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(yt(t))return`var(${t})`;let[n]=O(t)?t:t.split(" "),s=r.shadow[n],i=k(s);if(!s)return r.verbose&&console.warn("Can't find color ",n),t;if(i&&!s.value&&r.useVariable&&s.var)return`var(${s.var})`;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={},c=zr(r);for(let l in s){if(l.charCodeAt(0)!==64)continue;let f=l.slice(1),u=s[l],d=u&&(u.value!==void 0?u.value:u);if(d!==void 0&&(a[`[data-theme="${f}"] &`]=d,f==="light"||f==="dark")){let p=Vr(f,r);if(!p)continue;a[p]={[c]:d}}}return a}return r.verbose&&console.warn("Can't find color",t),t};var QA=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),tT=t=>QA.has(t),ce=(t,e,r)=>{if(t==null)return;let n=t+"";if(se.test(n))return n;let o=n.trim();return o==="none"||o==="0"||o==="initial"||o==="inherit"||o==="unset"?n:n.split(/\s+/).map(s=>{if(s=s.trim(),!s)return"";if(yt(s))return`var(${s})`;if(tT(s)||/^\d/.test(s)||s==="0")return s;let i=Dn(()=>Q(s,e));if(Ie(i))return i;if(En.has(s.toLowerCase()))return s;r&&r(s);let a=kt(s,"border");return a&&a.border?a.border:s}).join(" ")};R();var eT=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"]),pw=["color","Color","background","Background","fill","Fill","stroke","Stroke"],yw=t=>{for(let e=0;e<pw.length;e++)if(t.includes(pw[e]))return!0;return!1},rT={boxShadow:$n,textShadow:$n,border:ce,borderTop:ce,borderRight:ce,borderBottom:ce,borderLeft:ce,outline:ce,columnRule:ce},nT=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},hw=new Set,oT=(t,e,r,n,o,s)=>{if(!Et())return;let i=`${t}::${e}::${r||""}::${n}`;hw.has(i)||(hw.add(i),console.warn(`[smbls/scratch] theme param "${e}" on "${t}"`+(r?` (${r})`:"")+` did not fully resolve: "${n}" -> "${o}" 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.`))},nm=(t,e,r,n)=>{let o=rT[e];if(!o)return Q(r,n);let s=null,i=o(r,n,a=>{!s&&nT(a)&&(s=a)});return s&&oT(t,e,n,r,i,s),i},om=(t,e)=>Ce(t,e),sT=t=>k(t)&&N(t.value),iT=t=>{for(let e in t){let r=t[e];if(S(r)&&r.startsWith("var(--"))return!0}return!1},Ca=(t,e)=>{let r=E();return sT(t)?!r.useVariable&&iT(t)?t:Uo(t.value,e):Uo(t,e)},bw=(t,e)=>{let r=new Set;for(let n of e){let o=n.slice(0,1);if(!(o==="@"||o==="."||o===":")&&yw(n))for(let s in t){if(r.has(s))continue;let i=t[s]?.[n];if(i===void 0)continue;let a=Q(i,`@${s}`);a!==void 0&&S(a)&&/^[a-z][a-zA-Z]+$/.test(a)&&!eT.has(a)&&r.add(s)}}return r},aT=t=>t.startsWith("[data-theme=")||t.startsWith("@media"),va=(t,e)=>{for(let r in e){let n=e[r];k(n)?va(t[r]||(t[r]={}),n):t[r]=n}return t},gw=(t,e,r,n)=>{if(va(t,{[`[data-theme="${e}"] &`]:r}),e!=="light"&&e!=="dark")return;let o=Vr(e,n);o&&va(t,{[o]:{[zr(n)]:r}})},_w=(t,e,r,n)=>{let o=r.globalTheme!==void 0?r.globalTheme:"auto",s=o&&o!=="auto"?String(o).replace(/^'|'$/g,""):null,i=new Set(n?Object.keys(n):[]);for(let l in t)if(t[l])for(let f of Object.keys(t[l]))i.add(f);let a=bw(t,i),c={};for(let l of i){let f=l.slice(0,1);if(f==="@")continue;if(f==="."||f===":"){let b={};for(let x in t)N(t[x]?.[l])&&(b[x]=t[x][l]);let _=n&&N(n[l])?n[l]:void 0;if(!Object.keys(b).length&&!_)continue;let y=f==="."?l.slice(1):l.replace(/^:+/,"");c[l]=_w(b,`${e}-${y}`,r,_);continue}let u=n&&!N(n[l])?n[l]:void 0,d=new Set(Object.keys(t));u!==void 0&&(d.add("light"),d.add("dark"),s&&d.add(s));let p={},h;for(let b of d){if(a.has(b))continue;let _=t[b]?.[l];if((_===void 0||N(_))&&(_=u),_===void 0)continue;let y=nm(e,l,_,`@${b}`);y!==void 0&&(p[b]=y,(s&&b===s||!s&&(b==="light"||h===void 0))&&(h=y))}let g={},m=Object.keys(p).filter(b=>p[b]!==h);if(m.length){let b=p.light!==void 0?p.light:h,_=p.dark!==void 0?p.dark:h;if(yw(l)&&Ur(b)&&Ur(_)){g[l]=b===_?b:`light-dark(${b}, ${_})`;for(let y in p)y==="light"||y==="dark"||gw(g,y,{[l]:p[y]},r)}else{h!==void 0&&(g[l]=h);for(let y of m)gw(g,y,{[l]:p[y]},r)}}else{if(h===void 0)continue;g[l]=h}va(c,g),c[`.${l}`]=g}return(c.background||c.color||c.backgroundColor)&&(c[".inversed"]={color:c.background||c.backgroundColor,background:c.color}),c},em=(t,e,r)=>{let{cssVars:n}=r;r.cssMediaVars||(r.cssMediaVars={});let o=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=bw(t,a);for(let l of a){let f=l.slice(0,1),u=Object.values(t).some(d=>N(d?.[l]));if(f==="."&&u){let d=l.slice(1),p={};for(let h in t)N(t[h]?.[l])&&(p[h]=t[h][l]);i[l]=em(p,`${e}-${d}`,r)}else if(f===":"&&u){let d=l.replace(/^:+/,""),p={};for(let h in t)N(t[h]?.[l])&&(p[h]=t[h][l]);i[l]=em(p,`${e}-${d}`,r)}else if(f!=="@"&&f!=="."&&f!==":"){let p=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}-${l}`,h=s&&s!=="auto"?String(s).replace(/^'|'$/g,""):null,g;for(let m in t){if(c.has(m))continue;let b=t[m]?.[l];if(b===void 0)continue;let _=nm(e,l,b,`@${m}`);if(_===void 0)continue;(h&&m===h||!h&&(m==="light"||g===void 0))&&(g=_);let y=`[data-theme="${m}"]`;if(o[y]||(o[y]={}),o[y][p]=_,m==="dark"||m==="light"){let x=`@media (prefers-color-scheme: ${m})`;o[x]||(o[x]={}),o[x][p]=_}}g!==void 0&&(n[p]=g),i[l]=`var(${p})`,i[`.${l}`]={[l]:i[l]}}}return(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color}),i},Uo=(t,e,r,n)=>{let o=E(),{cssVars:s}=o,i={value:t},a=!r&&!n,c;if(N(t)){if(a&&o.useVariable){let l={};for(let f in t)f.startsWith("@")&&N(t[f])&&(l[f.slice(1)]=t[f]);if(Object.keys(l).length){let f=em(l,e,o);Object.assign(i,f)}}else if(a){let l={},f={};for(let u in t)u.startsWith("@")?N(t[u])&&(l[u.slice(1)]=t[u]):f[u]=t[u];c=_w(l,e,o,f),Object.assign(i,c)}for(let l in t){let f=l.slice(0,1),u=t[l];if(f==="@"||f===":"||f==="."){let d=f==="@"&&l;i[l]=Uo(u,e,l,n||d)}else if(!a){let d=nm(e,l,u,n),p=[...new Set([n,r].filter(b=>b).map(b=>b.slice(1)))],h=p.length?"-"+p.join("-"):"",m=`--${o.varPrefix?o.varPrefix+"-":""}theme-${e}${h}-${l}`;o.useVariable?(o.useThemeSuffixedVars&&(s[m]=d),i[l]=`var(${m})`):i[l]=d,i[`.${l}`]={[l]:i[l]}}}if(c)for(let l in c){let f=l.slice(0,1);(f==="."||f===":")&&N(t[l])&&(i[l]=c[l])}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(S(t)&&yt(t)){let f=o.theme[t.slice(2)];return Ce(f,n)}return i},rm=(t,e)=>{let r={};for(let n in t){let o=n.slice(0,1);if(N(t[n]))if(e&&aT(n))r[n]=va({},t[n]);else{if(o==="@")continue;o===":"?r[`&${n}`]=rm(t[n],e):o==="."&&(r[`&${n}`]=rm(t[n],e))}else r[n]=t[n]}return r},xw=(t,e)=>{let r=e.shift();return t[r]?xw(t[r],e):t},mw=(t,e)=>O(e)?xw(t,e):S(e)&&t[e]?t[e]:t;var Ce=(t,e)=>{let r=E();if(S(t)&&yt(t)&&(t=Ce(t.slice(2))),!t||!S(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[n,...o]=O(t)?t:t.split(" "),s=r.theme[n];return s&&o.length?s=mw(s,o):s&&e&&(s=mw(s,e)),rm(s,!r.useVariable)};R();R();var Ea=(t,e)=>{let r=E(),n=`--font-${e}`;if(!t||O(t)&&!t[0])return;let o;if(t.isVariable){let s=Se(t.url,r.files)||t.url;Io(s)?o=$o(s):o=Fr(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap",unicodeRange:t.unicodeRange})}else if(t[0])o=On(e,t,r.files);else{let s=Array.isArray(t.url)?t.url.map(i=>Se(i,r.files)||i):Se(t.url,r.files)||t.url;o=Fr(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch,unicodeRange:t.unicodeRange})}return{var:n,value:t,fontFace:o}},Aa=(t,e)=>{let r=E(),{fontFamily:n}=r;return Tn(e||n,t)},Vo=(t,e)=>{let r=E(),{fontFamily:n,fontFamilyTypes:o}=r,{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!n.default)&&(n.default=e),k(s)&&(s=vn(s));let a=`--font-family-${e}`,c=`${s.join(", ")}, ${o[i]}`;return{var:a,value:c,arr:s,type:i,isSystemFallback:!!t.isSystemFallback}};R();var mf=t=>{let e=E(),{typography:r,media:n}=e;for(let o in t){let s=o.slice(0,1)==="@",i=t[o];if(!s)continue;let{mediaRegenerate:a}=t,c=o.slice(1),{type:l,base:f,ratio:u,range:d,subSequence:p,h1Matches:h,unit:g}=t;mt(i,{type:l,base:f,ratio:u,range:d,subSequence:p,h1Matches:h,unit:g});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),b=i.unit||g,_=!i.unit&&m.has(g)?"rem":b,y=n[c],x="@media "+(y==="print"?`${y}`:`screen and ${y}`);if(r.templates[x]={fontSize:i.base/r.browserDefault+_},!a){mt(i,{sequence:{},scales:{},vars:{}}),Xt(i),Nr(t,o);continue}mt(i,{sequence:{},scales:{},templates:{},vars:{}}),Xt(i),Nr(t,o)}},yf=t=>{let e=E();if(t.h1Matches){let r=t.unit,n=ya(t),{templates:o}=t;for(let s in n){let i=`h${parseInt(s)+1}`,a=o[i];o[i]={fontSize:e.useVariable?`var(${n[s]?.variable})`:`${n[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}}}},Ta=()=>{let t=E(),{typography:e}=t;Xt(e),yf(e),mr(e),mf(e)},Oa=t=>{let e=E(),{typography:r}=e;return Qe(t,"fontSize",r)};R();var Ra=t=>{if(!S(t))return;let r=E().shape;if(r)return r[t]!==void 0?r[t]:r[t.toLowerCase()]};R();var Pa=()=>{let t=E(),{timing:e}=t;Xt(e),mr(e)},Ee=t=>{let e=E(),{timing:r}=e;return r[t]||r[Qi(t)]||t},le=(t,e="timing")=>{let r=E(),{timing:n}=r;return Qe(t,e,n)};R();var Da=()=>{let t=E(),{fontFamily:e,theme:r,typography:n}=t,o=t.document;return cr(o)?(Er(t,"document",o),o=t.document={}):o||(o=t.document={}),mt(o,{theme:r.document,fontFamily:Tn(e),fontSize:n.base,lineHeight:n.lineHeight})};R();var im={document:rt},zo=(t,e)=>{let r=E();if(!t){r.verbose&&console.warn("setSVG: val is not defined",e);return}return r.useSvgSprite?_a(e,t):t},Ia=(t,e=im)=>{let r=E(),n=Object.keys(t).length?{}:r.svg;for(let o in t)n[o]=t[o];Sw(n,e)},Ln=(t,e)=>{let r=E();return r.useIconSprite&&!r.semanticIcons?.[e]?zo(t,e):t},Mn=(t,e=im)=>{let r=E(),n=Object.keys(t).length?{}:r.icons;for(let o in t)n[o]=t[o];Sw(n,e)},sm=(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},cT=(t,e)=>{let r=typeof DOMParser<"u"?DOMParser:null;if(r){let n=`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,s=new r().parseFromString(n,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},ww=(t,e,r)=>{for(;e.firstChild;){let n=e.firstChild;r.appendChild(t.importNode(n,!0)),n.remove()}},Sw=(t,e=im)=>{let r=E(),n=e.document||rt;if(!n||!n.documentElement)return r.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),jo(t);let o=n.querySelector("#svgSprite"),s=jo(t),i=`<svg aria-hidden="true" width="0" height="0" style="position:absolute" id="svgSprite">${s}</svg>`,a=cT(n,s);if(o)if(a)ww(n,a,o);else if(n.body.insertAdjacentHTML)o.insertAdjacentHTML("beforeend",s);else{let c=sm(n,{isRoot:!1});c.innerHTML=s,o.append(...c.children)}else if(a){let c=sm(n);c&&c.nodeType&&(ww(n,a,c),n.body.prepend(c))}else if(n.body.insertAdjacentHTML)n.body.insertAdjacentHTML("afterbegin",i);else{let c=sm(n);c&&c.nodeType&&(c.innerHTML=s,n.body.prepend(c))}};R();var $a=(t={})=>{let e=E(),r=e.typography||{},n=e.document||{},o=k(e.reset)?e.reset:e.reset={};if(o[":root"]){let c=o,l=r.templates||{};c.body={...e.useDocumentTheme?Ce("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?Ce("document"):{};if(o.html&&Gt(o.html,a),r.unit)for(let c in i){if(c.slice(0,6)!=="@media")continue;let l=i[c];delete i[c],!(!l||!l.fontSize)&&(o[c]||(o[c]={}),o[c].html||(o[c].html={}),o[c].html.fontSize===void 0&&(o[c].html.fontSize=l.fontSize))}if(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,p=f.browserDefault||r.browserDefault,h=l.slice(1),g=c[h];if(!g)continue;let m="@media "+(g==="print"?g:"screen and "+g);o[m]||(o[m]={}),o[m].html||(o[m].html={}),o[m].html.fontSize=d/p+u}}return st(mt(o,t),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",textSizeAdjust:"100%",WebkitTextSizeAdjust:"100%",...a,fontSize:r.unit?r.base/r.browserDefault+r.unit:r.browserDefault+"px",fontFamily:n.fontFamily,lineHeight:n.lineHeight},body:{boxSizing:"border-box",height:"100%",margin:0,fontFamily:n.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}},ae)};R();var lT=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),kw=/^-?[A-Z][0-9]?$/,tr=t=>ce(t),bf=t=>{if(S(t))return se.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(yt(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=Q(e);return Ie(r)?r:e}).join(" ")},_f=(t,e)=>ka(t,e),La=(t,e)=>{if(S(t))return se.test(t)?t:pr(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(yt(n))return`var(${n})`;if(n==="inset"||n==="none")return n;let o=Q(n);if(Ie(o)){let i=Dt(n,e);return k(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em")return n;let s=kt(n,"shadow");return s&&s.shadow?s.shadow:n}).join(" "):"")).join(", ")},Ma=(t,e)=>{let r=t.indexOf("(");if(r===-1)return t;let n=t.slice(0,r+1),o=t.slice(r+1,t.lastIndexOf(")")),s=")",a=pr(o).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||lT.has(f)||f==="transparent"||se.test(f))return f;let u=Q(f);return Ie(u)?u:f}).join(" ")));return n+a.join(", ")+s},xf=(t,e)=>{if(!S(t))return;let r=E();return pr(t).map(n=>{let o=n.trim();if(yt(o))return`var(${o})`;if(/^var\(/.test(o)||o.includes("url"))return o;if(r.gradient?.[o]){let s=Dt(o,e);if(S(s))return s;if(k(s)){for(let i in s)if(S(s[i]))return s[i]}return o}return o.includes("gradient")?Ma(o,e):o.includes("/")||o.startsWith("http")||o.includes(".")&&!Nt(o)?`url(${o})`:o}).join(", ")},wf=t=>S(t)&&t.split(" ").map(e=>kt(e,"gap").gap).join(" "),Sf=t=>{if(!S(t))return t;let e=E();return na(t).map(r=>kw.test(r)?Pn(r,e.spacing):r).join(" ")},am=t=>{if(!S(t))return;let e=t.split(" ");return e.length?e.map(r=>yt(r)?`var(${r})`:r.length<3||r.includes("ms")?le(r).timing||r:Ee(r)?Ee(r):r).join(" "):t},Fa=(t,e,r)=>{if(S(t))return t.split(",").map(n=>le(n).timing||n).join(",")},kf=t=>{if(!S(t))return;let e=t.split(",");if(e.length)return e.map(am).join(",")};function xt(t,e,r={},n={}){let o=ft.call(this,e||r[t]);if(o==null)return;let s;if(S(o)){if(/^(?:env|var)\(/.test(o.trim()))return{[t]:o};if(o.includes("(")){let c=gr(o);s=c[0],o=c[1]}let i=r.scaleBoxSize,a=xa(t);!i&&a&&!n.ratio&&(o=Sa(o))}return n.ratio?ve(r,t,o,s):kt(o,t,void 0,s)}var M=(t,e=null,r)=>xt(t,e,r,{ratio:!0}),fT=(t,e,r)=>S(t)?t.split(" ").map(n=>kw.test(n)?ve(e,r,n)[r]:n).join(" "):t,yr=(t,e,r,n="borderRadius")=>{if(S(t))return{[n]:t.split(" ").map(o=>{let s=Ra(o);return s!==void 0?fT(s,e,r):ve(e,r,o)[r]}).join(" ")}};R();var Wo="__smblsThemeRootOwner",qo=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)},vw=(t,e,r)=>{if(!(!t||!e)){qo(t),t.__prefersListener=r,t.__prefersMq=e;try{e.addEventListener("change",r)}catch{e.addListener(r)}}},uT=(t,e)=>{let r=E(),{cssVars:n}=r,o=e.startsWith("--")?e:`--${e}`;return n[o]=t,t},Zt=t=>t,vf={color:Br,gradient:Bo,font:Ea,fontFamily:Vo,fontfamily:Vo,theme:Ca,icons:Ln,semanticIcons:Zt,semanticicons:Zt,svg:zo,svgData:Zt,typography:Zt,shadow:Wr,spacing:Zt,media:Zt,grid:Zt,class:Zt,timing:Zt,reset:Zt,unit:Zt,animation:Zt,vars:uT,sizes:Zt,shape:Zt},dT=(t,e,r,n)=>{Er(t,r,e);let o={};for(let s of n)t[s]===e&&(t[s]=o);return t.verbose&&console.warn("[scratch] design-system family",r,"resolved to a host object; parked it and allocated a plain bucket"),o},cm=(t,e,r)=>{let n=E(),o=ua(t),s=o.toLowerCase(),i=n[o]||n[s]||n[t],a=cr(i)?dT(n,i,s,[o,s,t]):i,c=vf[o]||vf[s];if(c)try{let l=c(e,r);return a&&(a[r]=l),a}catch(l){n.verbose&&console.warn("Error setting",s,"value",e,r,l)}if(!c){let l=a||(n[s]={});return l[r]=e,l}n.verbose&&console.warn("Can not find",s,"method in scratch")},lm=(t,e)=>{let r=E(),n=t.toLowerCase();return cr(e)?(Er(r,n,e),r.verbose&&console.warn("[scratch] ignoring host object passed as the",n,"design-system family"),r[n]||r[t]):e==null?(r.verbose&&console.warn("[scratch] skipping empty design-system family",n),r[n]||r[t]):(Object.keys(e).sort((s,i)=>{let a=k(e[s])||O(e[s])?1:0,c=k(e[i])||O(e[i])?1:0;return a-c}).forEach(s=>{try{return cm(n,e[s],s)}catch(i){r.verbose&&console.warn("Error setting",n,"value",e[s],s,i)}}),r[n]||r[t])},Cf=(t,e)=>{let r=e||E();r.globalTheme=t;let o=oo(r)||(typeof document<"u"?document:null),s=o&&o.defaultView||(typeof window<"u"?window:null);if(o){let a=r.themeRoot||o.documentElement,c=t&&t!=="auto";if(a[Wo]=r,c)qo(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",vw(r,f,l)}else qo(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(o&&r.cssVars){let a=r.scopeSelector||":root",c=o.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},pT={},Fn=(t,e=pT)=>{let r=e.config||E(),{version:n,verbose:o,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:c,useIconSprite:l,globalTheme:f,themeRoot:u,useDocumentTheme:d,useDefaultConfig:p,semanticIcons:h,hoverMedia:g,files:m,assets:b,..._}=t;e.newConfig&&(r=lf(e.newConfig)),ar(_.document)&&(r.__domDocument=_.document,delete _.document),ar(r.document)&&(r.__domDocument||(r.__domDocument=r.document),r.document={}),m!==void 0&&(r.files=m),b!==void 0&&(r.assets=b),o!==void 0&&(r.verbose=o),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),p!==void 0&&(r.useDefaultConfig=p),h!==void 0&&(r.semanticIcons=h),g!==void 0&&(r.hoverMedia=g),r.verbose&&console.log(r);let x=oo(r)||(typeof document<"u"?document:null),w=x&&x.defaultView||(typeof window<"u"?window:null),v=x&&(r.themeRoot||x.documentElement);if(v&&typeof v.setAttribute=="function")if(r.globalTheme&&r.globalTheme!=="auto")qo(r),v.setAttribute("data-theme",r.globalTheme),r.resolvedTheme=r.globalTheme,v[Wo]=r,r.globalTheme==="dark"||r.globalTheme==="light"?v.style.colorScheme=r.globalTheme:v.style.colorScheme="light dark";else if(v[Wo]&&v[Wo]!==r&&v.hasAttribute("data-theme"))qo(r),r.resolvedTheme=v.getAttribute("data-theme");else if(w&&w.matchMedia){let F=H=>{let tt=H.matches?"dark":"light";v.setAttribute("data-theme",tt),r.resolvedTheme=tt},Mt=w.matchMedia("(prefers-color-scheme: dark)");F(Mt),v.style.colorScheme="light dark",v[Wo]=r,vw(r,Mt,F)}else qo(r),v.setAttribute("data-theme","light"),r.resolvedTheme="light",v.style.colorScheme="light",v[Wo]=r;r.__svgCache||(r.__svgCache={}),No(_);let P=Object.keys(_).filter(A=>!A.startsWith("__")),$=new Set(P);if(P.forEach(A=>{let F=A.toLowerCase();F!==A&&$.has(F)&&st(_[F],_[A],ae)}),P.map(A=>{let F=A.toLowerCase();if(!(F!==A&&$.has(F)))return lm(A,_[A])}),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{Ta()}catch(A){r.verbose&&console.warn("Error applying typography sequence",A)}if(_.spacing)try{wa()}catch(A){r.verbose&&console.warn("Error applying spacing sequence",A)}if(_.timing)try{Pa()}catch(A){r.verbose&&console.warn("Error applying timing sequence",A)}Da();let I=$a();return I&&(r.reset=I),r};var Go=new Map,Mw=null,um=null,hT=null;function ja(t){t.batchAtomicCss&&(um=t.batchAtomicCss),t.compoundCssClass&&(hT=t.compoundCssClass)}var gT=new Set,Ew=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function pm(t){try{let e=E();e&&(e.__domDocument=t)}catch{}t&&gT.add(t)}function jn(){try{let t=E();if(t){if(Ew(t.__domDocument))return t.__domDocument;if(Ew(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 Rf(){return{...Jt}}function hm(){for(let t in Jt)Jt[t]=0;Tf=!1}var Tf=!1,Af=(t,e)=>`${t} ${e}${t===1?"":"s"}`;function mT(t){let e=Date.parse(t);if(!isFinite(e))return"";let r=Math.floor((Date.now()-e)/864e5);return r<1?" (today)":` (${Af(r,"day")} ago)`}function yT(){try{let t=AT();if(!t.length)return-1;let e=0;for(let r=0;r<t.length;r++)e+=t[r].cssRules?t[r].cssRules.length:0;return e}catch{return-1}}function bT(t,e){if(Tf)return!1;Tf=!0;let r="n/a \u2014 running from src/ (unbuilt), so no dist is in play",n="this IS the source",o="@symbo.ls/css";return console.error(`[@symbo.ls/css] CSS EMIT FAILURE (${t}) \u2014 the engine emitted ${Af(Jt.variable,"variable rule")} and ${Af(Jt.atomic,"atomic rule")}, while the design system held ${Af(e,"CSS variable")}.
42
42
  The document will render UNSTYLED and nothing else will report an error.
43
43
  This is what a STALE dist/ looks like: an obsolete emitter against a current design system.
44
44
  package : ${o}
45
45
  built : ${r}
46
46
  source : ${n}
47
47
  emitted : ${JSON.stringify(Jt)}
48
- sheets : the style[data-smbls] tiers currently hold ${eT()} rule(s)
48
+ sheets : the style[data-smbls] tiers currently hold ${yT()} rule(s)
49
49
  FIX : cd smbls && npm run check:stale # every package whose src is newer than its dist
50
50
  then rebuild the listed packages and clear the app's .parcel-cache
51
- Do NOT trust any browser measurement taken on this page until that reads clean.`),!0}function Rw(){try{let t=E(),e=t&&(t.CSS_VARS||t.cssVars);return e?Object.keys(e).length:0}catch{return 0}}function xw(t){Ef||Jt.variable>0||Jt.atomic>0||Pw(Math.max(t,Rw()))}function um(t){let e=t&&(t.CSS_VARS||t.cssVars);return Pw(e?Object.keys(e).length:Rw())}function Pw(t){let e=Tf();if(t===0)return{ok:!0,reason:"no-design-system",stats:e,varCount:t};if(!Of())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 rT(r,t),{ok:!1,reason:r,stats:e,varCount:t}}var nT={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 Nn(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Af(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 oT(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Af(e)}var sT={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select","mask-image":"-webkit-mask-image","mask-size":"-webkit-mask-size","mask-repeat":"-webkit-mask-repeat","mask-position":"-webkit-mask-position","mask-clip":"-webkit-mask-clip","mask-origin":"-webkit-mask-origin","background-clip":"-webkit-background-clip"};function qo(t,e){let r=sT[t];return r?`${t}:${e};${r}:${e};`:`${t}:${e};`}function cm(t){let e="";for(let r in t){let n=t[r];if(typeof n!="object"||n===null)continue;let o="";for(let s in n){let i=s.charCodeAt(0)===45&&s.charCodeAt(1)===45;o+=qo(i?s:Nn(s),n[s])}e+=`${r}{${o}}`}return e}var iT="@media (hover: hover)",aT=/(?:^|[^\\]):hover(?![\w-])/;function dm(){try{let t=E();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function br(t,e,r){return r===!1||!aT.test(e)||r===void 0&&!dm()?t:`${iT}{${t}}`}function ww(t,e,r){let n=(r?r+"":"")+t+":"+e,o=Ko.get(n),s=o?null:Nn(t);if(!o){let c=nT[t]||Af(t),l=oT(e);o=r?`_${r}_${c}-${l}`:`_${c}-${l}`,Ko.set(n,o)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return o;let i=s||Nn(t),a=`.${o}{${qo(i,e)}}`;return Ie(a,void 0,"atomic"),o}var Sw=new WeakMap,kw=new WeakMap;function Ie(t,e,r){let n=Of(e,cT(t));if(!n)return Jt.dropped++,"dropped";let o=Sw.get(n);if(o||(o=new Set,Sw.set(n,o)),o.has(t))return Jt.duplicate++,Jt[r||"global"]++,"duplicate";let s=kw.get(n);if(s&&s.has(t))return Jt.invalid++,"invalid";try{n.insertRule(t,n.cssRules.length)}catch{return s||(s=new Set,kw.set(n,s)),s.add(t),Jt.invalid++,"invalid"}return o.add(t),Jt[r||"global"]++,"inserted"}var $e="0:0",vw="1:0",Cw=/\((max|min)-width:\s*([\d.]+)(px|em|rem)?\)/g;function cT(t){if(typeof t!="string"||!t)return $e;if(t.charCodeAt(0)===64){if(!t.startsWith("@media")&&!t.startsWith("@supports")&&!t.startsWith("@container"))return $e;let e=1/0,r=-1/0;Cw.lastIndex=0;let n;for(;n=Cw.exec(t);){let o=parseFloat(n[2])*(n[3]==="em"||n[3]==="rem"?16:1);n[1]==="max"?e=Math.min(e,o):r=Math.max(r,o)}return e!==1/0?"2:"+-e:r!==-1/0?"3:"+r:vw}return t.charCodeAt(0)!==46||/^\.[\w-]+\{/.test(t)?$e:vw}var Ew=t=>{let e=t.indexOf(":");return[Number(t.slice(0,e)),Number(t.slice(e+1))]},lT=(t,e)=>{let[r,n]=Ew(t),[o,s]=Ew(e);return r!==o?r<o:n<s},fT=t=>t.getAttribute("data-tier")||$e,Aw=new WeakMap;function Of(t,e){let r=t||jn();if(!r||!r.head)return null;let n=e||$e,o=Aw.get(r);o||(o=new Map,Aw.set(r,o));let s=o.get(n);if(s&&s.ownerNode&&s.ownerNode.parentNode===r.head)return s;n!==$e&&Of(r,$e);let i=n===$e?r.head.querySelector("style[data-smbls]:not([data-tier])"):r.head.querySelector(`style[data-smbls][data-tier="${n}"]`);if(!i){i=r.createElement("style"),i.setAttribute("data-smbls",""),n!==$e&&i.setAttribute("data-tier",n);let c=r.head.querySelectorAll("style[data-smbls]"),l=null;for(let u=0;u<c.length;u++)if(lT(n,fT(c[u]))){l=c[u];break}let f=c.length?c[c.length-1]:null;l?r.head.insertBefore(i,l):f?r.head.insertBefore(i,f.nextSibling):r.head.appendChild(i)}let a=i.sheet;return o.set(n,a),n===$e&&(Ow=a),a}function uT(t){let e=t||jn();if(!e||!e.head)return[];let r=[],n=e.head.querySelectorAll("style[data-smbls]");for(let o=0;o<n.length;o++)n[o].sheet&&r.push(n[o].sheet);return r}var dT=8;function le(t,e,r){if(!t||typeof t!="object")return"";let n=null,o=0,s=[],i=[];for(let c in t){let l=t[c];l==null||l===!1||l===""||(typeof l=="object"?i.push([c,l]):am?(n||(n=[]),n.push(c,String(l)),o++):s.push(ww(c,String(l),r)))}if(n&&o>=dT){let c=n.join("\0"),l=am(c),f=l.indexOf("\0"),u=l.substring(0,f),d=l.substring(f+1);if(d){let p=d.split(`
52
- `);for(let h=0;h<p.length;h++)p[h]&&Ie(p[h],void 0,"atomic")}s.push(u)}else if(n)for(let c=0;c<n.length;c+=2)s.push(ww(n[c],n[c+1],r));let a=[];for(let c=0;c<i.length;c++)a.push(gT(i[c][0],i[c][1],r));return s.concat(a).join(" ").trim()}var Tw=new Map,pT=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function Ma(t){return/^@(media|supports|container)\b/.test(t)}function hT(t){return typeof t!="string"||!t||Ma(t)?!1:t.split(",").every(e=>pT.test(e.trim()))}function gT(t,e,r){let n=JSON.stringify(e),o=t.indexOf(":hover")!==-1||n.indexOf(":hover")!==-1,s=o&&dm(),i=(r?r+"":"")+t+n+(o&&!s?"rawhover":""),a=Ko.get(i);if(a){let _=Tw.get(a);if(_)for(let y=0;y<_.length;y++)Ie(_[y],void 0,"atomic");return a}a=r?`_${r}_c${Af(i)}`:`_c${Af(i)}`;let c=`.${a}`,l=hT(t)?`.${a}.${a}`:c,f="",u=[],d=_=>typeof _=="string"&&(_.indexOf("{")!==-1||_.indexOf("}")!==-1),p=(_,y)=>{let x="";for(let w in y){let v=y[w];if(v!=null)if(typeof v=="object")p([..._,w],v);else{if(d(v))continue;x+=qo(Nn(w),v)}}x&&(_.length===0?f+=x:u.push({chain:_,body:x}))};p([],e);let h=_=>_.startsWith(":")||_.startsWith("["),g=(_,y=!0)=>{let x=y&&_.length===1?l:c;if(!_.length)return x;let w=_[0].split(",").map(v=>v.trim()).map(v=>v.includes("&")?v.replace(/&/g,x):h(v)?`${x}${v}`:`${x} ${v}`);for(let v=1;v<_.length;v++){let D=_[v].split(",").map(T=>T.trim()),L=[];for(let T of w)for(let R of D)R.includes("&")?L.push(R.replace(/&/g,T)):h(R)?L.push(T+R):L.push(T+" "+R);w=L}return w.join(", ")},m=[],b=(_,y)=>{let x=_.filter(Ma),w=g(_.filter(D=>!Ma(D)),x.length===0),v=`${w}{${y}}`;for(let D=x.length-1;D>=0;D--)v=`${x[D]}{${v}}`;v=br(v,w,s),m.push(v),Ie(v,void 0,"atomic")};f&&b([t],f);for(let _ of u)b([t,..._.chain],_.body);return Tw.set(a,m),Ko.set(i,a),a}function xt(t){if(t==null||typeof t!="string"&&typeof t!="object")return;if(Of(),typeof t=="string"){let s=t.indexOf("--")!==-1;Ie(t,void 0,s?"variable":"global"),s&&xw(1);return}let e=dm(),r=0,n=Object.keys(t),o=s=>{let i=s.match(/max-width:\s*(\d+)/);return i?parseInt(i[1]):0};n.sort((s,i)=>{let a=s.startsWith("@media"),c=i.startsWith("@media");return!a&&!c?0:a?c?o(i)-o(s):1:-1});for(let s of n){let i=t[s];if(s.startsWith("@keyframes")){let a=cm(i);a&&Ie(`${s}{${a}}`,void 0,"keyframes");continue}if(Ma(s))for(let a in i){let c=i[a];if(a.startsWith("@keyframes")){let l=cm(c);l&&Ie(`${s}{${a}{${l}}}`,void 0,"keyframes");continue}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 p=d?u:Nn(u);l+=qo(p,c[u])}r+=f,Ie(br(`${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:Nn(a);Ie(`${s}{${qo(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 p=d?f:Nn(f);a+=qo(p,u)}}if(r+=l,a&&Ie(br(`${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&&(Ma(d)?f.push(d):u.push(d));f.sort((d,p)=>{let h=g=>{let m=g.match(/max-width:\s*(\d+)/);return m?parseInt(m[1]):0};return h(p)-h(d)});for(let d of u)xt({[`${s} ${d}`]:i[d]});for(let d of f)xt({[d]:{[s]:i[d]}})}}}r>0&&xw(r)}function Go(t,e){return Ie(`@keyframes ${t}{${cm(e)}}`,void 0,"keyframes"),t}function Dw(){Ko.clear(),Ow=null}function pm(){return Ko.size}P();var ay={};I(ay,{DELEGATED_EVENTS:()=>Qo,LIFECYCLE_EVENTS:()=>Gr,MIXINS:()=>Rf,NON_BUBBLING_EVENTS:()=>Pf,REGISTRY:()=>Nt,SVG_TAGS:()=>Zo,addDelegatedEvent:()=>Na,addMethods:()=>ss,applyExtends:()=>es,cacheNode:()=>Kr,create:()=>fe,createHTMLNode:()=>Xo,detectTag:()=>qr,dispose:()=>Xr,flushMounts:()=>qa,globalEventKeyInfo:()=>Df,isSvgTag:()=>Jo,isValidTag:()=>Yo,refreshContextProto:()=>Bf,registerEvent:()=>ts,registerGlobalEvent:()=>If,remove:()=>os,removeDelegatedEvent:()=>ja,update:()=>rs});var gm="http://www.w3.org/2000/svg",Zo=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"]),mT=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 Yo(t){return mT.has(t)||Zo.has(t)}function Jo(t){return Zo.has(t)}function qr(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"&&Yo(e))return e;if(!r||typeof r!="string")return"div";let n=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]),o=r.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),Yo(o)&&!n.has(o)?o:"div"}var Iw={};function Xo(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(Jo(t)){let n=e?.parent;if(t==="svg"||n?.node?.namespaceURI===gm)return r.createElementNS(gm,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Kr(t){let e=t.tag=qr(t),n=Jo(e)&&(e==="svg"||t.parent?.node?.namespaceURI===gm)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=Iw[n];if(s||(s=Iw[n]=Xo(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?Xo(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var Nt=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"]),Rf={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},Gr=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"]),Pf=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"]),mm=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),Qo=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 bm=new WeakMap,yT={passive:!0},bT={passive:!0,capture:!0},_m=(t,e)=>mm.has(t)?e?bT:yT:e||!1;function Mw(t){let e=bm.get(t);return e||(e={handlers:new Map,installed:new Set},bm.set(t,e)),e}function _T(t,e){let r=Mw(e);if(r.installed.has(t))return;r.installed.add(t);let n=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave"||t==="pointerenter"||t==="pointerleave",o=t==="mouseenter"||t==="mouseleave"||t==="pointerenter"||t==="pointerleave";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(o&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(c(s),s.cancelBubble)return}}i=i.parentNode}},_m(t,n))}function Na(t,e,r,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let o=Mw(n);_T(t,n),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,r)}function ja(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let n=bm.get(r);if(!n)return;let o=n.handlers.get(t);o&&o.delete(e)}function $w(t){return Qo.has(t)&&!Gr.has(t)}function Fw(t,e){let{context:r}=t,n=r?.designSystem;return o=>{n&&st(n);try{let s=e.call(t,o,t,t.state,r);if(s&&typeof s.then=="function"){s.catch(i=>{t.error=i,console.error("[DOMQL] Async event error:",i)}).finally(()=>{n&&rt()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),r?.strictMode)throw s}n&&rt()}}function ts(t,e,r){let{node:n,context:o}=e;if(!n)return;let s=Fw(e,r),i=Pf.has(t);if(!i&&$w(t)){let a=o?.rootNode||n.ownerDocument?.documentElement;Na(t,n,s,a)}else n.addEventListener(t,s,_m(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!i&&$w(t)){let a=o?.rootNode||n.ownerDocument?.documentElement;ja(t,n,a)}else n.removeEventListener(t,s,_m(t,!1))})}var ym=[["onDocument","document"],["onWindow","window"],["onVisualViewport","visualViewport"],["onMediaQuery","mediaQuery"]];function Df(t){if(typeof t!="string")return null;for(let e=0;e<ym.length;e++){let r=ym[e][0];if(t.length<=r.length||!t.startsWith(r))continue;let n=t.charCodeAt(r.length);if(!(n<65||n>90))return{target:ym[e][1],eventName:t.slice(r.length).toLowerCase()}}return null}var xT=/^[A-Za-z_$][\w$]*$/;function wT(t,e,r){let n=e,o=!1,s,i=!1,a=null;if(e&&typeof e=="object"&&typeof e!="function"&&(n=e.handler,o=!!e.capture,i=!!e.once,typeof e.passive=="boolean"&&(s=e.passive),typeof e.query=="string"&&(a=e.query)),typeof n=="string"&&xT.test(n)){let c=n;n=function(f){return t.call(c,f)}}return typeof n!="function"?null:(s===void 0&&(s=mm.has(r)),{handler:n,capture:o,passive:s,once:i,query:a})}function ST(t,e,r){let n=t.node?.ownerDocument||t.context?.document||(typeof document<"u"?document:null);if(!n||typeof n.addEventListener!="function")return null;if(e==="document")return n;let o=n.defaultView||(typeof window<"u"?window:null);if(!o)return null;if(e==="window")return typeof o.addEventListener=="function"?o:null;if(e==="visualViewport"){let s=o.visualViewport;return s&&typeof s.addEventListener=="function"?s:null}if(e==="mediaQuery"){let s=r&&r.query;if(typeof s!="string"||!s.trim()||typeof o.matchMedia!="function")return null;try{return o.matchMedia(s)||null}catch{return null}}return null}function kT(t,e,r,n){try{return t.addEventListener(e,r,n),!0}catch{return typeof t.addListener=="function"?(t.addListener(r),!0):!1}}function vT(t,e,r,n){try{t.removeEventListener(e,r,n)}catch{typeof t.removeListener=="function"&&t.removeListener(r)}}function CT(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 If(t,e,r){if(e.__ref){if(Array.isArray(r)){if(t.target!=="mediaQuery")return;for(let o=0;o<r.length;o++)Lw(t,e,r[o]);return}Lw(t,e,r)}}function Lw(t,e,r){let n=e.__ref,o=wT(e,r,t.eventName);if(!o||t.target==="mediaQuery"&&t.eventName!=="change")return;let s=ST(e,t.target,o);if(!s)return;let i=t.target+":"+(o.query?o.query+":":"")+t.eventName+":"+(o.capture?1:0);if(n.__globalEvents&&n.__globalEvents.has(i))return;let a=Fw(e,o.handler),c=f=>{CT(e)&&a(f)},l={capture:o.capture,passive:o.passive,once:o.once};kT(s,t.eventName,c,l)&&(n.__globalEvents||(n.__globalEvents=new Map),n.__globalEvents.set(i,{target:s,eventName:t.eventName,listener:c,options:l}),n.__eventCleanup||(n.__eventCleanup=[]),n.__eventCleanup.push(()=>{vT(s,t.eventName,c,l),n.__globalEvents&&n.__globalEvents.delete(i)}))}function Nw(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 es(t,e,r){let n=Nw(e);if(!n.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<n.length;i++){let a=jw(n[i],s);a&&a!==e&&Bw(t,a,r,new Set([e]))}}function jw(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(o=>o.trim()),n=e[r[0]]||e[`smbls.${r[0]}`];for(let o=1;o<r.length&&n;o++)n=n[r[o]];return n||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function Bw(t,e,r,n=new Set){if(n.has(e))return;n.add(e);let o=Nw(e);if(o.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<o.length;a++){let c=jw(o[a],i);c&&Bw(t,c,r,n)}}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]=Uw(t[s],i):t[s]=i}}function Uw(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Uw(o,s):r[n]=s}return r}_n();P();var ET=["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"],$f={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"]},zw=["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"],er=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()):Hw(t),AT=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate"]),Hw=t=>AT.has(t)?t.toLowerCase():null,TT=new Set(["draggable","contenteditable","spellcheck","autocorrect"]),rr=t=>typeof t=="string"&&(TT.has(t)||t.startsWith("aria-")),Qt=(t,e)=>e!==!0&&e!==!1?e:rr(t)?e?"true":"false":e===!0?"":e,nr=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||er(e)||$f.default.includes(e)?!0:Object.prototype.hasOwnProperty.call($f,t)?$f[t].includes(e):!1,wm=t=>{if(!S(t))return!1;let e=t.toLowerCase();return zw.includes(e)},OT=(t,e,r)=>{let n={};for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(r&&o in r)continue;if(o==="aria"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])Ct(e[o][a])&&(n["aria-"+a]=e[o][a]);continue}if(o==="data"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])if(Ct(e[o][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());n["data-"+c]=e[o][a]}continue}let s=nr(t,o),i=wm(o);if(Ct(e[o])&&(s||i)){let a=er(o)||o;n[a]=e[o]}}return n},RT=(t,e)=>{let r={};if(t.attr)for(let n in t.attr)r[n]=t.attr[n](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let n in t.aria){let o=t.aria[n];typeof o=="function"&&(r["aria-"+n]=o(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let n in t.data){let o=t.data[n];if(typeof o=="function"){let s=n.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());r["data-"+s]=o(e,e.state,e.context)}}return r},Yr=(t,e)=>{let r=t.call("exec",e,t);if(r)return S(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},xm=(t,e)=>{let r=(t.preSrc||"")+(Yr(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:n}=t;if(!n.files&&!n.assets)return r;if(r.startsWith("/assets/")){let o=r.slice(8),s=n.assets&&(n.assets[r]||n.assets[o]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let o=r.slice(7),s=n.files&&(n.files[r]||n.files[o]);return s&&s.content?s.content.src:r}if(n.assets){let o=n.assets[r];if(o&&o.content)return o.content.src}if(n.files){let o=n.files[r];if(o&&o.content)return o.content.src}return r},Bn={src:t=>xm(t,t.src),href:t=>Yr(t,t.href),action:t=>Yr(t,t.action),poster:t=>xm(t,t.poster),data:t=>Yr(t,t.data)},Sm=t=>{let e=t.tag||"div",r={};for(let n in Bn)if(t[n]!==void 0&&nr(e,n)){let o=Bn[n](t);o!==void 0&&(r[n]=o)}return r},Vw=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},PT=(t,e,r)=>{if(t==="$"){let o=Vw(e,r);return o===void 0&&(o=!!r[e]),o}let n=r[e]===!0||r.state[e];if(!n){let o=Vw(e,r);o!==void 0&&(n=o)}return t==="."?!!n:!n},DT=new Set(["$",".","!"]),IT=(t,e,r)=>{let n={},o=(s,i,a,c)=>{let l=i;n[s]=f=>{if(PT(a,c,f))return A(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!DT.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 p in a[l])o("aria-"+p,a[l][p],i,c);continue}if(l==="data"&&a[l]&&typeof a[l]=="object"){for(let p in a[l]){let h=p.replace(/([A-Z])/g,g=>"-"+g.toLowerCase());o("data-"+h,a[l][p],i,c)}continue}let f=nr(e,l),u=wm(l);if(!f&&!u)continue;let d=er(l)||l;o(d,a[l],i,c)}}return n};function rs(t={},e={}){let r=this,n=r.__ref;if(!n)return;if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof r.onBeforeUpdate=="function"&&km(n))try{let i=r.onBeforeUpdate(r,r.state,r.context,e);if(i&&typeof i.then=="function")i.then(()=>_r(n,!1),a=>{_r(n,!0),r.context?.plugins?.length&&At("error",r,{hook:"onBeforeUpdate",error:a})||console.error("[DOMQL] onBeforeUpdate error:",a)});else if(_r(n,!1),i===!1)return r}catch(i){throw _r(n,!0),i}let o=!t||Object.keys(t).length===0,s=[];Fc(()=>{if(t.state&&bt(r.state)&&r.state.$update(t.state),t.text!==void 0&&(r.text=t.text,!n.__exec.text&&r.node&&ns(r,t.text??"")),t.html!==void 0&&(r.html=t.html,!n.__exec.html&&r.node&&(r.node.innerHTML=t.html)),t.style&&r.node?.style){if(!n.__exec.style)for(let i in t.style){let a=t.style[i];if(a==null)continue;let c=i.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),l=String(a).replace(/\s*!important\s*$/,"");r.node.style.setProperty(c,l,"important")}r.style||(r.style={}),Object.assign(r.style,t.style)}if(t.attr&&r.node?.setAttribute){for(let i in t.attr){let a=t.attr[i];a==null||a===!1&&!rr(i)?r.node.removeAttribute(i):typeof a!="function"&&typeof a!="object"&&r.node.setAttribute(i,Qt(i,a))}r.attr||(r.attr={}),Object.assign(r.attr,t.attr)}if(t.data&&r.node?.dataset){for(let i in t.data)r.node.dataset[i]=t.data[i];r.data||(r.data={}),Object.assign(r.data,t.data)}for(let i in t){if(Nt.has(i)||i==="state")continue;let a=t[i],c=r[i];if(c&&c.__ref&&typeof c.update=="function")c.update(a,e);else if(typeof a=="object"&&a!==null){let l=i.charCodeAt(0);l>=65&&l<=90&&fe(a,r,i,e)}else i!=="text"&&i!=="html"&&i!=="style"&&i!=="attr"&&i!=="data"&&(r[i]=a,typeof a!="function"&&s.push(i))}});for(let i=0;i<s.length;i++)Ww(r,s[i]);if(r.node&&o&&n.__effects&&n.__effects.length)for(let i=0;i<n.__effects.length;i++){let a=n.__effects[i];a&&!a._disposed&&!a._isSubscribeToEffect&&typeof a._execute=="function"&&a._execute()}else if(r.node&&n.__conditionalRunners)for(let i of n.__conditionalRunners)i();return At("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}function Xr(t){if(!t)return;let e=t.__ref;if(!e)return;e.__disposed=!0;try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(n){console.error("[smbls] onBeforeRemove error:",n)}if(e.__effects){for(let n=0;n<e.__effects.length;n++)e.__effects[n].dispose();e.__effects.length=0}if(e.__eventCleanup){for(let n=0;n<e.__eventCleanup.length;n++)e.__eventCleanup[n]();e.__eventCleanup.length=0}if(e.__children){let n=e.__children.slice();e.__children.length=0;for(let o=0;o<n.length;o++){let s=t[n[o]];s&&s.__ref&&Xr(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 n=t.parent.__ref.__children.indexOf(t.key);n!==-1&&t.parent.__ref.__children.splice(n,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(n){console.error("[smbls] onRemove error:",n)}t.node=null,t.parent=null,t.__ref=null}function os(){Xr(this)}P();P();P();var $T=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],LT=["none","forwards","backwards","both"],MT=["normal","reverse","alternate","alternate-reverse"],FT=["running","paused"],NT=t=>/^[\d.]+m?s$/.test(t),jT=/^(?: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*\))$/,BT=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(n=>jT.test(n.replace(/\s+/g,"")))},qw=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),UT={transform:BT,translate:qw,rotate:t=>qw(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},VT=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},zT=t=>{if(!k(t))return null;let e=null,r=-1;for(let n in t){let o=VT(n);o==null||!k(t[n])||o>=r&&(r=o,e=t[n])}return e},HT=t=>{let e=zT(t);if(!e)return!1;let r=Object.keys(e);if(!r.length)return!1;for(let n of r){let o=UT[n];if(!o)return!1;let s=e[n];if(s==null||typeof s=="object"||typeof s=="function"||!o(s))return!1}return!0},WT=(t,e)=>{if(k(t))return t;let{animation:r}=e.context&&e.context.designSystem||{},n=r&&r[t];return k(n)?n:null},qT=["reverse","alternate","alternate-reverse"],Kw=(t,e,r)=>{let n=r||e.animationDirection;return n&&qT.includes(String(n))?"both":HT(WT(t,e))?"backwards":"both"},KT=0,Gw=new Map,vm=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(k(t)){let o=JSON.stringify(t),s=Gw.get(o);if(s)return s;let i=`smbls-anim-${KT++}`,a=Go(i,t);return Gw.set(o,a),a}let n=r&&r[t];return k(n)?Go(t,n):t},GT=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},n=t.split(/\s+/),o=null,s=[],i=null,a=null,c=null,l=null,f=null;for(let u of n)r&&r[u]?o=u:NT(u)?s.push(u):$T.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):MT.includes(u)?c=u:LT.includes(u)?l=u:FT.includes(u)?f=u:o||(o=u);return{name:o,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},Cm={animation:(t,e)=>{if(t!=null){if(S(t)&&t.includes(" ")){let r=GT(t,e);return{animationName:vm(r.name||t,e),animationDuration:r.durations[0]||ce(e.animationDuration||"A").timing,animationDelay:r.durations[1]||ce(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||Ce(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||Kw(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:vm(t,e),animationDuration:ce(e.animationDuration||"A").timing,animationDelay:ce(e.animationDelay||"0s").timing,animationTimingFunction:Ce(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||Kw(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}}},animationName:(t,e)=>({animationName:vm(t,e)}),animationDuration:t=>({animationDuration:ce(t).timing}),animationDelay:t=>({animationDelay:ce(t).timing}),animationTimingFunction:t=>({animationTimingFunction:Ce(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};P();var Em={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>M("height",t,e),width:(t,e)=>M("width",t,e),boxSizing:t=>Tt(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{..._t("height",e),..._t("width",r||e)}},inlineSize:(t,e)=>M("inlineSize",t,e),blockSize:(t,e)=>M("blockSize",t,e),minWidth:(t,e)=>M("minWidth",t,e),maxWidth:(t,e)=>M("maxWidth",t,e),widthRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{..._t("minWidth",e),..._t("maxWidth",r||e)}},minHeight:(t,e)=>M("minHeight",t,e),maxHeight:(t,e)=>M("maxHeight",t,e),heightRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{..._t("minHeight",e),..._t("maxHeight",r||e)}},size:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...M("inlineSize",e),...M("blockSize",r||e)}},minBlockSize:(t,e)=>M("minBlockSize",t,e),minInlineSize:(t,e)=>M("minInlineSize",t,e),maxBlockSize:(t,e)=>M("maxBlockSize",t,e),maxInlineSize:(t,e)=>M("maxInlineSize",t,e),minSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{..._t("minInlineSize",e),..._t("minBlockSize",r||e)}},maxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{..._t("maxInlineSize",e),..._t("maxBlockSize",r||e)}},borderWidth:(t,e)=>M("borderWidth",t,e),borderTopWidth:(t,e)=>M("borderTopWidth",t,e),borderRightWidth:(t,e)=>M("borderRightWidth",t,e),borderBottomWidth:(t,e)=>M("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>M("borderLeftWidth",t,e),textDecorationThickness:(t,e)=>M("textDecorationThickness",t,e),textUnderlineOffset:(t,e)=>M("textUnderlineOffset",t,e),padding:(t,e)=>M("padding",t,e),scrollPadding:(t,e)=>M("scrollPadding",t,e),paddingInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{..._t("paddingInlineStart",e),..._t("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{..._t("paddingBlockStart",e),..._t("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>M("paddingBlockStart",t,e),paddingBottom:(t,e)=>M("paddingBlockEnd",t,e),paddingLeft:(t,e)=>M("paddingInlineStart",t,e),paddingRight:(t,e)=>M("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>M("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>M("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>M("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>M("paddingInlineEnd",t,e),margin:(t,e)=>M("margin",t,e),marginInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{..._t("marginInlineStart",e),..._t("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!S(e.marginBlock))return;let[r,n]=e.marginBlock.split(" ");return{..._t("marginBlockStart",r),..._t("marginBlockEnd",n||r)}},marginTop:(t,e)=>M("marginBlockStart",t,e),marginBottom:(t,e)=>M("marginBlockEnd",t,e),marginLeft:(t,e)=>M("marginInlineStart",t,e),marginRight:(t,e)=>M("marginInlineEnd",t,e),marginInlineStart:(t,e)=>M("marginInlineStart",t,e),marginInlineEnd:(t,e)=>M("marginInlineEnd",t,e),marginBlockStart:(t,e)=>M("marginBlockStart",t,e),marginBlockEnd:(t,e)=>M("marginBlockEnd",t,e),gap:t=>({gap:_f(t)}),columnGap:(t,e)=>ke(e,"columnGap",t),rowGap:(t,e)=>ke(e,"rowGap",t),flexWrap:t=>{if(t!=null)return{display:"flex",flexWrap:t}},flexFlow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},flexAlign:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>yr(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>yr(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>yr(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>yr(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>yr(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>yr(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var Am={fontSize:t=>Aa(t)||t,fontFamily:t=>({fontFamily:Ca(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,n)=>{if(!t)return;let o=n.assets&&n.assets[t];if(o&&o.content)t=`url(${o.content.src})`;else{let s=n.files&&n.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 Om={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>vt(r,"k").k).join(" ")}},left:t=>vt(t,"left"),top:t=>vt(t,"top"),right:t=>vt(t,"right"),bottom:t=>vt(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>vt(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=>vt(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};P();var Lf=0,Mf=()=>{Lf++},Ff=()=>{Lf>0&&Lf--},ue=({context:t,state:e})=>{let r=t?.designSystem,n=e?.root?.globalTheme||r?.globalTheme;return n&&n!=="auto"?n:Lf>0?null:r&&r.resolvedTheme||null},te=(t,e)=>{if(e==null||e==="")return;if(!k(e))return{[t]:e};let r={},n=!1;for(let o in e){let s=e[o];if(!(s==null||s==="")){if(k(s)){let i=te(t,s);i&&(r[o]=i,n=!0);continue}r[o]={[t]:s},n=!0}}return n?r:void 0},Rm={theme:(t,e)=>{if(t)return e.themeModifier?ve(t,`@${e.themeModifier}`):ve(t)},color:(t,e)=>{let r=ue(e);if(t)return te("color",Pt(t,r))},background:(t,e)=>{let r=ue(e);if(t)return S(t)&&t.includes("gradient")&&t.includes("(")?{background:$a(t,r)}:te("background",Pt(t,r))},backgroundColor:(t,e)=>{let r=ue(e);if(t)return te("backgroundColor",Pt(t,r))},backgroundImage:(t,e,r,n)=>{let o=ue(e);if(!t)return;let s=n.assets&&n.assets[t];if(s&&s.content)t=s.content.src;else{let i=n.files&&n.files[t];i&&i.content&&(t=i.content.src)}return te("backgroundImage",bf(t,o))},textStroke:t=>{let e=mf(t);if(e!=null)return{WebkitTextStroke:e}},outline:t=>({outline:tr(t)}),outlineWidth:(t,e)=>M("outlineWidth",t,e),outlineColor:(t,e)=>{let r=ue(e);if(t)return te("outlineColor",Pt(t,r))},outlineOffset:(t,e)=>M("outlineOffset",t,e),border:t=>({border:tr(t)}),borderColor:(t,e)=>{let r=ue(e);if(t)return te("borderColor",Pt(t,r))},borderTopColor:(t,e)=>{let r=ue(e);if(t)return te("borderTopColor",Pt(t,r))},borderBottomColor:(t,e)=>{let r=ue(e);if(t)return te("borderBottomColor",Pt(t,r))},borderLeftColor:(t,e)=>{let r=ue(e);if(t)return te("borderLeftColor",Pt(t,r))},borderRightColor:(t,e)=>{let r=ue(e);if(t)return te("borderRightColor",Pt(t,r))},borderLeft:t=>({borderLeft:tr(t)}),borderTop:t=>({borderTop:tr(t)}),borderRight:t=>({borderRight:tr(t)}),borderBottom:t=>({borderBottom:tr(t)}),shadow:(t,e)=>{let r=ue(e);if(t)return te("boxShadow",yf(t,r))},boxShadow:(t,e)=>{if(!S(t))return;let[r,n]=t.split("!importan"),o=ue(e),s=n?" !important":"",i=Ia(r.trim(),o);return S(i)?{boxShadow:i+s}:te("boxShadow",i)},textShadow:(t,{context:e})=>te("textShadow",Ia(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:tr(t)})};var Ba={transition:t=>{let e=wf(t);if(e!=null)return{transition:e}},transitionDuration:t=>({transitionDuration:La(t)}),transitionDelay:t=>({transitionDelay:La(t)}),transitionTimingFunction:t=>({transitionTimingFunction:Ce(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};P();var Pm={flow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},wrap:(t,e)=>{if(t!=null)return{display:"flex",flexWrap:t}},align:(t,e)=>{if(!S(t))return;let[r,n]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:n}}};P();var YT=/(^|[^\w.-])([A-Za-z_][\w-]*)/g,Yw=t=>{if(!S(t))return t;let e=E().sizes;return e?t.replace(YT,(r,n,o)=>{let s=e[o];return s==null?r:n+String(s)}):t},or=t=>Yw(xf(t)),Dm={gridTemplateColumns:t=>({gridTemplateColumns:or(t)}),gridTemplateRows:t=>({gridTemplateRows:or(t)}),gridAutoColumns:t=>({gridAutoColumns:or(t)}),gridAutoRows:t=>({gridAutoRows:or(t)}),area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:or(t)}),templateColumns:t=>({gridTemplateColumns:or(t)}),autoColumns:t=>({gridAutoColumns:or(t)}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:or(t)}),templateRows:t=>({gridTemplateRows:or(t)}),autoRows:t=>({gridAutoRows:or(t)}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var pt={...Cm,...Em,...Am,...Tm,...Om,...Rm,...Ba,...Pm,...Dm};var ht=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationRange","animationRangeEnd","animationRangeStart","animationTimeline","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","interpolateSize","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"]);P();var XT=/^-?[A-Z][0-9]?$/,ZT=/^[a-z][0-9]?$/,Xw=/var\(\s*(--[A-Za-z0-9-]+)/g,JT=t=>{let e=new Set,r=new Set;if(!t||typeof t!="object")return{knownLetters:e,knownVars:r};for(let n in t){let o=t[n];if(!(!o||typeof o!="object")){if(o.sequence&&typeof o.sequence=="object")for(let s in o.sequence)e.add(s);if(o.vars&&typeof o.vars=="object")for(let s in o.vars)r.add(s)}}return{knownLetters:e,knownVars:r}},QT=(t,e)=>{if(!e.size)return[];let r=t.split(/[(),\s]+/).filter(Boolean),n=new Set;for(let o of r){if(!XT.test(o))continue;let s=o.charCodeAt(0)===45?o.slice(1):o;e.has(s)&&n.add(o)}return[...n]},tO=(t,e)=>{if(!e.size)return[];let r=[];Xw.lastIndex=0;let n;for(;n=Xw.exec(t);){let o=n[1];if(e.has(o))continue;let s=o.lastIndexOf("-");if(s===-1)continue;let i=o.slice(s+1);if(!ZT.test(i))continue;let a=o.slice(0,s+1)+i.toUpperCase();a!==o&&e.has(a)&&r.push({varName:o,corrected:a})}return r},Nf=new Set,Zw=(t,e,r)=>{if(!Et()||!S(e)||!e)return;let n;try{n=E()}catch{return}let{knownLetters:o,knownVars:s}=JT(n);if(!o.size&&!s.size)return;let i=QT(e,o),a=tO(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}`;Nf.has(f)||(Nf.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}`;Nf.has(u)||(Nf.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}"`))}};P();var eO=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,rO=(t,e,r)=>{let{context:n}=r;if(!n.designSystem?.media)return;let o=t.slice(1),s=n.designSystem.media[o],i=de(e,r);if(!s)return{[t]:i};if(/^@(media|supports|container)\b/.test(s))return{[s]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match(eO),c=a?a[1]||a[2]:o,l={[`${s} &`]:i};if(c==="dark"||c==="light"){let f=n.designSystem?.scopeSelector||":root",u=f===":root"?":root:not([data-theme])":`${f}:not([data-theme])`;l[`@media (prefers-color-scheme: ${c})`]={[`${u} &`]:i}}return l},Jw=(t,e,r)=>({[t]:de(e,r)}),Ua=(t,e,r)=>{let n=`&${t}`,o=de(e,r);if(t.includes(",")&&o){let s={},i={};for(let a in o)typeof o[a]=="object"&&o[a]!==null?i[a]=o[a]:s[a]=o[a];if(Object.keys(i).length){let a=n.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[n]=s);for(let l in i){let f=a.map(u=>`${u} ${l}`).join(", ");c[f]=i[l]}return c}}return{[n]:o}},Im=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},nO=(t,e,r)=>{let n=t.slice(1),o=Im(n,r);if(o===void 0&&(o=!!r[n]),!!o)return de(e,r)},oO=(t,e,r)=>({[t]:e}),sO=(t,e,r)=>{let n=t.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=Im(n,r);s!==void 0&&(o=s)}if(o)return de(e,r)},iO=(t,e,r)=>{let n=t.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=Im(n,r);s!==void 0&&(o=s)}if(!o)return de(e,r)},$m=(t,e)=>de(t,e),Lm={"@":rO,":":Ua,"[":Ua,"*":Ua,"+":Ua,"~":Ua,"&":Jw,">":Jw,$:nO,"-":oO,".":sO,"!":iO};var jf=Or(),Qw=(t,e,r)=>{let n=e?.context?.designSystem;n&&st(n);try{let o={},s={},i=(a,c)=>{if(r.unpack){o={...o,...c};return}o[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,p)=>gt(d,f[p]),{});o.designSystemClass=u}}else if(a==="true"){let l=ft(c,e);gt(o,$m(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),!jf&&k(o[a])&&(o[a].label=a)}else if(pt[a]){let l=ft(c,e);if(l===null)continue;O(l)&&(l=l.reduce((u,d)=>gt(u,d),{}));let f=pt[a](l,e,e.state,e.context);O(f)&&(f=f.reduce((u,d)=>gt(u,d),{})),f&&i(a,f),!jf&&k(o[a])&&(o[a].label=a)}else if(ht.has(a)){let l=ft(c,e);if(l===null)continue;typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),jf||Zw(a,l,e),i(a,{[a]:l}),!jf&&k(o[a])&&(o[a].label=a)}else s[a]=c}return[o,s]}finally{n&&rt()}},tS=(t,e)=>{let r={};for(let n in t){let o=Lm[n.slice(0,1)];if(o){let s=o(n,t[n],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]&&typeof r[i]=="object"&&typeof s[i]=="object"?Gt(r[i],s[i]):r[i]=s[i])}}return r},de=(t,e,r={unpack:!0})=>{let[n,o]=Qw(t,e,r),s=tS(o,e),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return ni(n,s);n._selectors=s}return n},aO=(t,e)=>{let r={};if(t.class)for(let n in t.class)r[n]=t.class[n](e);return r};P();var eS=t=>{if(k(t))return de(t,t)},cO=(t,e)=>{let r=eS(t);return typeof e=="function"?e(r):le(r)};P();function Fm(t,e,r){let n=t?.context?.analyze;if(!n||!n.emit||e==="warn"&&!n.shouldCapture("warnings")||e==="error"&&!n.shouldCapture("errors"))return;let o=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");n.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:o||null,args:r})}var rS=new Set;function lO(t,e,r){let n=String(e);if(rS.has(n))return;rS.add(n);let o=t?.__ref?.path,s=Array.isArray(o)&&o.length?o.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('${n}') at <${s}>: "${n}" ${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.`;Fm(t,"error",[a]),console.error(a)}function fO(...t){return Fm(this,"warn",t),Ui.apply(this,t)}function uO(...t){return Fm(this,"error",t),Sn.apply(this,t)}var nS={update:rs,remove:os,getDB:Wi,getQuery:qi,getRootData:Ni,getPath:$i,nextElement:Vi,previousElement:zi,verbose:_o,warn:fO,error:uO,variables:Hi,spotByPath:Ii,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 n=this.context?.__create;n&&n(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(r){r.__setLocked=!1;let n=r.__setQueued;n&&(r.__setQueued=null,this.set(n.content,n.options))}}},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,n=this.key,o=this.parse();return this.remove(),e(o,r,n,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 n=this[r];if(!n)continue;if(typeof t=="function"){if(t(n))return n}else if(typeof t=="string"&&n.key===t)return n;let o=n.lookdown?.(t);if(o)return o}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let n of r.__children){let o=this[n];o&&(typeof t=="function"?t(o)&&e.push(o):typeof t=="string"&&o.key===t&&e.push(o),o.lookdownAll?.(t,e))}return e},getRef(t){return t?this.__ref&&this.__ref[t]:this.__ref},getChildren(){let t=this.__ref&&this.__ref.__children;return Array.isArray(t)?t.map(e=>this[e]):[]},getRoot:Fi,getRootState:Mi,getRootContext:ji,getContext:Bi,parse(t){let e={},r=t?new Set(t):null,n=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!r?.has(o)){if(n&&n[o]!==void 0){e[o]=n[o];continue}typeof this[o]!="function"&&(e[o]=this[o])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let n of r.__children)this[n]?.parseDeep&&(e[n]=this[n].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 n=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(n,o,"important")}},call(t,...e){let r=this.context,n=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof n=="function")return n.call(this,...e);Et()&&lO(this,t,n)},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)}},Mm=new WeakMap;function dO(t){if(!t)return nS;let e=Mm.get(t);if(e)return e;e=Object.create(nS);let r=t.methods;if(r)for(let n in r)e[n]=r[n];return Mm.set(t,e),e}function ss(t){let e=dO(t.context);Object.setPrototypeOf(t,e)}function Bf(t){if(!t)return!1;let e=Mm.get(t);if(!e)return!1;let r=t.methods;if(!r)return!1;for(let n in r)e[n]=r[n];return!0}var Uf=[],Vf=!1,Zr=0;function zf(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function oS(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 Nm(){return Zr?zf()-Zr>=50:!1}var is=0;function jm(){is===0&&!Zr&&(Zr=zf()),is++}function Bm(){is>0&&is--,is===0&&!Vf&&(Zr=0)}function Um(t){Uf.push(t),Vf||(Vf=!0,oS(sS))}function sS(){for(Zr=zf();Uf.length;){let t=Uf.shift();try{t()}catch(e){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",e?.message||e)}if(zf()-Zr>=50)break}if(Uf.length){oS(sS);return}Vf=!1,Zr=0,is=0}P();_n();var qm={};I(qm,{STATE_METHODS:()=>iS,applyInitialState:()=>Wf,applyStateMethods:()=>pe,callStateMethod:()=>Va,createState:()=>zm,isTracking:()=>Wm,useHostState:()=>Hm});var iS=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"]),Hf=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},Le=(t,e,r,{onlyIfAbsent:n}={})=>{Hf(t,"$"+e,r),!(n&&Object.prototype.hasOwnProperty.call(t,e))&&Hf(t,e,r)},Va=(t,e,...r)=>{if(!t)return;let n=t["$"+e];if(typeof n=="function")return n.apply(t,r);let o=t[e];if(typeof o=="function")return o.apply(t,r)},pe=(t,e)=>{if(bt(e)){let o=e.__raw||e;Le(o,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),Le(o,"set",function(s,i={}){return e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,i),e},{onlyIfAbsent:!0}),Le(o,"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}),Le(o,"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}),Le(o,"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}),Le(o,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),Le(o,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),Le(o,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),Le(o,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&bt(a.parent);)a=a.parent;return Va(a,"update",s,i)}),Le(o,"parentUpdate",function(s,i={}){if(e.parent)return Va(e.parent,"update",s,i)}),Le(o,"quietReplace",function(s,i={}){return e.$replace(s,{quiet:!0,...i})}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=e,i=bt(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,bt(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o]},n={update(o){if(!o||typeof o!="object")return e;for(let s in o)e[s]=o[s];return e},apply(o){if(typeof o!="function")return e;let s=o(e);return s?e.$update(s):e},parse(){return{...e}},toggle(o){return e[o]=!e[o],e},set(o){if(!o||typeof o!="object")return e;r();for(let s in o)e[s]=o[s];return e},replace(o){return e.$set(o)},clean(){return r(),e}};for(let o in n)if(Hf(e,"$"+o,n[o]),typeof e[o]!="function"){if(Object.prototype.hasOwnProperty.call(e,o)){Bc(o,"");continue}Hf(e,o,n[o])}};var zm=function(t,e,r){return t.state=Wf(t,e,r),t.state},Wf=function(t,e,r){let{__ref:n}=t,o=t.state;if(o==null||o===!1){let s=e?.state||{};return pe(t,s),s}if(typeof o=="string")return n&&(n.__state=o),n.__stateType="string",pO(o,t,e);if(typeof o=="number"||typeof o=="boolean"){n&&(n.__state=o,n.__stateType=typeof o,n.__hasRootState=!0);let s=ir({value:o});return s.__element=t,e?.state&&(s.parent=e.state),pe(t,s),s}if(typeof o=="function"&&(o=o(t,e?.state)||{}),typeof o=="object"&&!bt(o)){n&&(n.__hasRootState=!0),o.isRootState&&n&&(n.__hasRootState=!0);let s=ir({...o});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)),pe(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,r),s}return bt(o)?(o.__element=t,o):e?.state||{}};function Vm(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function pO(t,e,r){if(!r?.state)return{};if(t===".")return r.state;if(t.startsWith("../")){let o=t.slice(3),s=r.state?.parent;return o&&s?Vm(s,o):s??r.state??{}}if(t.startsWith("~/")){let o=r.state;for(;o?.parent;)o=o.parent;let s=t.slice(2);return s?Vm(o,s):o??{}}let n=Vm(r.state,t);if(n&&typeof n=="object"&&!bt(n)&&!Object.getOwnPropertyDescriptor(n,"root")){let o=r.state?.root||r.state;Object.defineProperty(n,"root",{get:()=>o,enumerable:!1,configurable:!0})}return n}var Hm=(t,e)=>{if(!t)return cS;let r=gO(t,e);return!r||!r.state?cS:yO(r.state)},Wm=()=>Nc()!=null,hO=128;function gO(t,e){let r=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,n=t,o=null;for(let s=0;s<hO&&n;s++){if(r(n)&&n.state)return n;if(n.state&&!o&&(o=n),!n.parent||n.parent===n)break;n=n.parent}return o}var mO={get(t,e){return t[e]}},aS=new WeakMap,yO=t=>{let e=aS.get(t);return e||(e=new Proxy(t,mO),aS.set(t,e)),e},cS=new Proxy(Object.create(null),{get(){},has(){return!1}});var qf="3.14.788";var lS="__SMBLS_ELEMENT_ID_ENGINE__",fS=(t,e,r)=>{let n=e||qf,o=r||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[lS];return s&&s.engine&&s.version===n?s.engine:(s||(o[lS]={version:n,engine:t}),t)};var wS=fS({uniqId:1,scopedStyleId:0},qf),Ha=[],Xm=!1;function uS(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function bO(){return typeof document<"u"&&document.visibilityState==="hidden"}var _O=250;function SS(){if(!Xm){if(Xm=!0,typeof requestAnimationFrame!="function"){setTimeout(qa,0);return}bO()?setTimeout(qa,_O):requestAnimationFrame(qa)}}var xO=300,wO=15e4;function qa(){if(Xm=!1,!Ha.length)return;let t=Ha.splice(0,Ha.length);for(let e=0;e<t.length;e++){let r=t[e];if(r.node){if(!r.node.isConnected){let n=r.__ref||(r.__ref={});n.__mountAttempts=(n.__mountAttempts||0)+1,n.__mountFirstAttemptAt==null&&(n.__mountFirstAttemptAt=uS());let o=uS()-n.__mountFirstAttemptAt;n.__mountAttempts<=xO&&o<wO?(Ha.push(r),SS()):console.warn("[DOMQL] onMounted dropped after",n.__mountAttempts,"attempts /",o,"ms \u2014 node never connected:",r.key||r.tag||r);continue}ee("Mounted",r,r.__ref?.__mountOptions||{})}}}function Zm(t,e){typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,Ha.push(t),SS())}function dS(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&At("contentUpdate",t,e);let r=t.context?.designSystem;r&&st(r);try{t.onContentUpdate(t,t.state,t.context,e)}catch(n){if(t.context?.plugins?.length&&At("error",t,{hook:"onContentUpdate",error:n})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',n),t.context?.strictMode)throw n}finally{r&&rt()}}function Jr(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function SO(t){return t.charAt(2).toLowerCase()+t.slice(3)}function kO(t){return t.toLowerCase()}function Jm(t){let e=t.charCodeAt(0);return e===58||e===64||e===38||e===91}function Wa(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Wa(o,s):r[n]=s}return r}function Xf(t){if(typeof t=="string")return t||void 0;if(typeof t=="number"||typeof t=="bigint")return String(t)}function kS(t,e,r){return Xf(t)||(e&&typeof e=="object"?Xf(e.key):void 0)||String(r)}function fe(t,e,r,n={},o){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t}),r=Xf(r);let s=Xf(t.key),i=Object.create(null);i.key=r||s||`_${wS.uniqId++}`,i.parent=e||null,i.context=t.context||e?.context||n.context||{},i.context.__create||(i.context.__create=fe);let a=i.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||i,path:e?.__ref?.path?[...e.__ref.path,i.key]:[i.key],origin:t};if(r&&!t.extends&&!t.extend){let m=r.indexOf("_"),b=r.indexOf("."),_=m>0?m:-1;if(b>0&&(_<0||b<_)&&(_=b),_>0){let y=r.substring(0,_),x=i.context?.components;x&&(x[y]||x["smbls."+y])?t={...t,extends:y}:x&&Et()&&(/^[A-Z]\w*_\d+$/.test(r)||/^[A-Z]\w*\.\w+$/.test(r))&&console.warn(`[smbls] auto-extend: key "${r}" looks like an instance of "${y}" but neither "${y}" nor "smbls.${y}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}es(i,t,n);let c=new Set(["childProps","attr","style","scope","data"]),l=i.props&&typeof i.props=="object"?i.props:null;for(let m in t){if(m==="parent"||m==="node"||m==="__ref"||m==="extends"||m==="context"||m==="props")continue;if(m==="key"){s&&(i.key=s);continue}let b=t[m],_=i[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?i[m]=Wa(_,b):y&&c.has(m)?i[m]={..._,...b}:y&&Jm(m)?i[m]=Wa(_,b):i[m]=b}function f(m){for(let b in m){let _=m[b],y=i[b],x=y&&_&&typeof y=="object"&&typeof _=="object"&&!Array.isArray(y)&&!Array.isArray(_)&&typeof y!="function"&&typeof _!="function";x&&b.charCodeAt(0)>=65&&b.charCodeAt(0)<=90?i[b]=Wa(y,_):x&&c.has(b)?i[b]={...y,..._}:x&&Jm(b)?i[b]=Wa(y,_):i[b]=_}}l&&f(l),t.props&&typeof t.props=="object"&&f(t.props),t.data!==void 0&&(i.data=t.data),t.classlist!==void 0&&(i.classlist=t.classlist),t.text!==void 0&&(i.text=t.text),t.html!==void 0&&(i.html=t.html);let u=i.scope&&typeof i.scope=="object"?i.scope:null,d=e?.scope,p=i.context&&typeof i.context.globalScope=="object"&&i.context.globalScope||null,h=d||p||null;if(t.scope!==void 0||u){let m={};u&&Object.assign(m,u),t.scope!==void 0&&Object.assign(m,t.scope),i.scope=jc(m,h)}else h&&(i.scope=h);if(t.if!==void 0&&(i.if=t.if),ss(i),vO(i,e,t),i.if!=null){let m;if(typeof i.if=="function")try{m=i.if(i,i.state,i.context)}catch(b){if(m=!1,a.__ifError=b,typeof console<"u"&&console.warn){let _=i.key||i.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${_} \u2014 treating as false:`,b?.message||b)}}else m=i.if;a.__if=!!m}if(a.__if)typeof i.if=="function"&&(a.__ifInitialized=!0);else return e&&(e[i.key]=i),typeof i.if=="function"&&ES(i,a,i.if),i;i.tag||(i.tag=qr(i)),ee("Init",i,n);let g=i.node=Kr(i);if(!g)return i;if(i.tag==="fragment"){let b=(i.context?.document||globalThis.document).createComment("");g.appendChild(b),a.__fragmentAnchor=b}ee("AttachNode",i,n),g.setAttribute&&i.key&&g.setAttribute("data-key",i.key),e&&(e[i.key]=i,e.__ref?.__children&&(e.__ref.__children.includes(i.key)||e.__ref.__children.push(i.key))),g.setAttribute&&i.context?.scopeSelector&&i.context.scopeSelector!==":root"&&i.context.key&&i.key===i.context.key&&g.setAttribute("data-smbls-app",i.context.key),i.id&&g.setAttribute&&(g.id=i.id),IS(i,n),CS(i),Qm(i),PS(i),BO(i);try{$S(i,n)}catch(m){if(typeof console<"u"&&console.error){let b=i.__ref?.path?.join(".")||i.key||"<root>";console.error(`[smbls] createChildren failed at ${b}:`,m?.message||m,m?.stack?`
51
+ Do NOT trust any browser measurement taken on this page until that reads clean.`),!0}function Fw(){try{let t=E(),e=t&&(t.CSS_VARS||t.cssVars);return e?Object.keys(e).length:0}catch{return 0}}function Aw(t){Tf||Jt.variable>0||Jt.atomic>0||Nw(Math.max(t,Fw()))}function gm(t){let e=t&&(t.CSS_VARS||t.cssVars);return Nw(e?Object.keys(e).length:Fw())}function Nw(t){let e=Rf();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 bT(r,t),{ok:!1,reason:r,stats:e,varCount:t}}var _T={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 Nn(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Of(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 xT(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Of(e)}var wT={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select","mask-image":"-webkit-mask-image","mask-size":"-webkit-mask-size","mask-repeat":"-webkit-mask-repeat","mask-position":"-webkit-mask-position","mask-clip":"-webkit-mask-clip","mask-origin":"-webkit-mask-origin","background-clip":"-webkit-background-clip"};function Ko(t,e){let r=wT[t];return r?`${t}:${e};${r}:${e};`:`${t}:${e};`}function dm(t){let e="";for(let r in t){let n=t[r];if(typeof n!="object"||n===null)continue;let o="";for(let s in n){let i=s.charCodeAt(0)===45&&s.charCodeAt(1)===45;o+=Ko(i?s:Nn(s),n[s])}e+=`${r}{${o}}`}return e}var ST="@media (hover: hover)",kT=/(?:^|[^\\]):hover(?![\w-])/;function mm(){try{let t=E();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function br(t,e,r){return r===!1||!kT.test(e)||r===void 0&&!mm()?t:`${ST}{${t}}`}function Tw(t,e,r){let n=(r?r+"":"")+t+":"+e,o=Go.get(n),s=o?null:Nn(t);if(!o){let c=_T[t]||Of(t),l=xT(e);o=r?`_${r}_${c}-${l}`:`_${c}-${l}`,Go.set(n,o)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return o;let i=s||Nn(t),a=`.${o}{${Ko(i,e)}}`;return $e(a,void 0,"atomic"),o}var Ow=new WeakMap,Rw=new WeakMap;function $e(t,e,r){let n=Pf(e,vT(t));if(!n)return Jt.dropped++,"dropped";let o=Ow.get(n);if(o||(o=new Set,Ow.set(n,o)),o.has(t))return Jt.duplicate++,Jt[r||"global"]++,"duplicate";let s=Rw.get(n);if(s&&s.has(t))return Jt.invalid++,"invalid";try{n.insertRule(t,n.cssRules.length)}catch{return s||(s=new Set,Rw.set(n,s)),s.add(t),Jt.invalid++,"invalid"}return o.add(t),Jt[r||"global"]++,"inserted"}var Le="0:0",Pw="1:0",Dw=/\((max|min)-width:\s*([\d.]+)(px|em|rem)?\)/g;function vT(t){if(typeof t!="string"||!t)return Le;if(t.charCodeAt(0)===64){if(!t.startsWith("@media")&&!t.startsWith("@supports")&&!t.startsWith("@container"))return Le;let e=1/0,r=-1/0;Dw.lastIndex=0;let n;for(;n=Dw.exec(t);){let o=parseFloat(n[2])*(n[3]==="em"||n[3]==="rem"?16:1);n[1]==="max"?e=Math.min(e,o):r=Math.max(r,o)}return e!==1/0?"2:"+-e:r!==-1/0?"3:"+r:Pw}return t.charCodeAt(0)!==46||/^\.[\w-]+\{/.test(t)?Le:Pw}var Iw=t=>{let e=t.indexOf(":");return[Number(t.slice(0,e)),Number(t.slice(e+1))]},CT=(t,e)=>{let[r,n]=Iw(t),[o,s]=Iw(e);return r!==o?r<o:n<s},ET=t=>t.getAttribute("data-tier")||Le,$w=new WeakMap;function Pf(t,e){let r=t||jn();if(!r||!r.head)return null;let n=e||Le,o=$w.get(r);o||(o=new Map,$w.set(r,o));let s=o.get(n);if(s&&s.ownerNode&&s.ownerNode.parentNode===r.head)return s;n!==Le&&Pf(r,Le);let i=n===Le?r.head.querySelector("style[data-smbls]:not([data-tier])"):r.head.querySelector(`style[data-smbls][data-tier="${n}"]`);if(!i){i=r.createElement("style"),i.setAttribute("data-smbls",""),n!==Le&&i.setAttribute("data-tier",n);let c=r.head.querySelectorAll("style[data-smbls]"),l=null;for(let u=0;u<c.length;u++)if(CT(n,ET(c[u]))){l=c[u];break}let f=c.length?c[c.length-1]:null;l?r.head.insertBefore(i,l):f?r.head.insertBefore(i,f.nextSibling):r.head.appendChild(i)}let a=i.sheet;return o.set(n,a),n===Le&&(Mw=a),a}function AT(t){let e=t||jn();if(!e||!e.head)return[];let r=[],n=e.head.querySelectorAll("style[data-smbls]");for(let o=0;o<n.length;o++)n[o].sheet&&r.push(n[o].sheet);return r}var TT=8;function fe(t,e,r){if(!t||typeof t!="object")return"";let n=null,o=0,s=[],i=[];for(let c in t){let l=t[c];l==null||l===!1||l===""||(typeof l=="object"?i.push([c,l]):um?(n||(n=[]),n.push(c,String(l)),o++):s.push(Tw(c,String(l),r)))}if(n&&o>=TT){let c=n.join("\0"),l=um(c),f=l.indexOf("\0"),u=l.substring(0,f),d=l.substring(f+1);if(d){let p=d.split(`
52
+ `);for(let h=0;h<p.length;h++)p[h]&&$e(p[h],void 0,"atomic")}s.push(u)}else if(n)for(let c=0;c<n.length;c+=2)s.push(Tw(n[c],n[c+1],r));let a=[];for(let c=0;c<i.length;c++)a.push(PT(i[c][0],i[c][1],r));return s.concat(a).join(" ").trim()}var Lw=new Map,OT=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function Na(t){return/^@(media|supports|container)\b/.test(t)}function RT(t){return typeof t!="string"||!t||Na(t)?!1:t.split(",").every(e=>OT.test(e.trim()))}function PT(t,e,r){let n=JSON.stringify(e),o=t.indexOf(":hover")!==-1||n.indexOf(":hover")!==-1,s=o&&mm(),i=(r?r+"":"")+t+n+(o&&!s?"rawhover":""),a=Go.get(i);if(a){let _=Lw.get(a);if(_)for(let y=0;y<_.length;y++)$e(_[y],void 0,"atomic");return a}a=r?`_${r}_c${Of(i)}`:`_c${Of(i)}`;let c=`.${a}`,l=RT(t)?`.${a}.${a}`:c,f="",u=[],d=_=>typeof _=="string"&&(_.indexOf("{")!==-1||_.indexOf("}")!==-1),p=(_,y)=>{let x="";for(let w in y){let v=y[w];if(v!=null)if(typeof v=="object")p([..._,w],v);else{if(d(v))continue;x+=Ko(Nn(w),v)}}x&&(_.length===0?f+=x:u.push({chain:_,body:x}))};p([],e);let h=_=>_.startsWith(":")||_.startsWith("["),g=(_,y=!0)=>{let x=y&&_.length===1?l:c;if(!_.length)return x;let w=_[0].split(",").map(v=>v.trim()).map(v=>v.includes("&")?v.replace(/&/g,x):h(v)?`${x}${v}`:`${x} ${v}`);for(let v=1;v<_.length;v++){let P=_[v].split(",").map(I=>I.trim()),$=[];for(let I of w)for(let A of P)A.includes("&")?$.push(A.replace(/&/g,I)):h(A)?$.push(I+A):$.push(I+" "+A);w=$}return w.join(", ")},m=[],b=(_,y)=>{let x=_.filter(Na),w=g(_.filter(P=>!Na(P)),x.length===0),v=`${w}{${y}}`;for(let P=x.length-1;P>=0;P--)v=`${x[P]}{${v}}`;v=br(v,w,s),m.push(v),$e(v,void 0,"atomic")};f&&b([t],f);for(let _ of u)b([t,..._.chain],_.body);return Lw.set(a,m),Go.set(i,a),a}function wt(t){if(t==null||typeof t!="string"&&typeof t!="object")return;if(Pf(),typeof t=="string"){let s=t.indexOf("--")!==-1;$e(t,void 0,s?"variable":"global"),s&&Aw(1);return}let e=mm(),r=0,n=Object.keys(t),o=s=>{let i=s.match(/max-width:\s*(\d+)/);return i?parseInt(i[1]):0};n.sort((s,i)=>{let a=s.startsWith("@media"),c=i.startsWith("@media");return!a&&!c?0:a?c?o(i)-o(s):1:-1});for(let s of n){let i=t[s];if(s.startsWith("@keyframes")){let a=dm(i);a&&$e(`${s}{${a}}`,void 0,"keyframes");continue}if(Na(s))for(let a in i){let c=i[a];if(a.startsWith("@keyframes")){let l=dm(c);l&&$e(`${s}{${a}{${l}}}`,void 0,"keyframes");continue}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 p=d?u:Nn(u);l+=Ko(p,c[u])}r+=f,$e(br(`${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:Nn(a);$e(`${s}{${Ko(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 p=d?f:Nn(f);a+=Ko(p,u)}}if(r+=l,a&&$e(br(`${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&&(Na(d)?f.push(d):u.push(d));f.sort((d,p)=>{let h=g=>{let m=g.match(/max-width:\s*(\d+)/);return m?parseInt(m[1]):0};return h(p)-h(d)});for(let d of u)wt({[`${s} ${d}`]:i[d]});for(let d of f)wt({[d]:{[s]:i[d]}})}}}r>0&&Aw(r)}function Yo(t,e){return $e(`@keyframes ${t}{${dm(e)}}`,void 0,"keyframes"),t}function jw(){Go.clear(),Mw=null}function ym(){return Go.size}R();var uy={};D(uy,{DELEGATED_EVENTS:()=>ts,LIFECYCLE_EVENTS:()=>Gr,MIXINS:()=>Df,NON_BUBBLING_EVENTS:()=>If,REGISTRY:()=>jt,SVG_TAGS:()=>Jo,addDelegatedEvent:()=>Ba,addMethods:()=>is,applyExtends:()=>rs,cacheNode:()=>Kr,create:()=>ue,createHTMLNode:()=>Zo,detectTag:()=>qr,dispose:()=>Xr,flushMounts:()=>Ga,globalEventKeyInfo:()=>$f,isSvgTag:()=>Qo,isValidTag:()=>Xo,refreshContextProto:()=>Vf,registerEvent:()=>es,registerGlobalEvent:()=>Lf,remove:()=>ss,removeDelegatedEvent:()=>Ua,update:()=>ns});var _m="http://www.w3.org/2000/svg",Jo=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"]),DT=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 Xo(t){return DT.has(t)||Jo.has(t)}function Qo(t){return Jo.has(t)}function qr(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"&&Xo(e))return e;if(!r||typeof r!="string")return"div";let n=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]),o=r.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),Xo(o)&&!n.has(o)?o:"div"}var Bw={};function Zo(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(Qo(t)){let n=e?.parent;if(t==="svg"||n?.node?.namespaceURI===_m)return r.createElementNS(_m,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Kr(t){let e=t.tag=qr(t),n=Qo(e)&&(e==="svg"||t.parent?.node?.namespaceURI===_m)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=Bw[n];if(s||(s=Bw[n]=Zo(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?Zo(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"]),Df={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},Gr=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"]),If=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"]),xm=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),ts=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 Sm=new WeakMap,IT={passive:!0},$T={passive:!0,capture:!0},km=(t,e)=>xm.has(t)?e?$T:IT:e||!1;function zw(t){let e=Sm.get(t);return e||(e={handlers:new Map,installed:new Set},Sm.set(t,e)),e}function LT(t,e){let r=zw(e);if(r.installed.has(t))return;r.installed.add(t);let n=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave"||t==="pointerenter"||t==="pointerleave",o=t==="mouseenter"||t==="mouseleave"||t==="pointerenter"||t==="pointerleave";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(o&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(c(s),s.cancelBubble)return}}i=i.parentNode}},km(t,n))}function Ba(t,e,r,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let o=zw(n);LT(t,n),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,r)}function Ua(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let n=Sm.get(r);if(!n)return;let o=n.handlers.get(t);o&&o.delete(e)}function Uw(t){return ts.has(t)&&!Gr.has(t)}function Hw(t,e){let{context:r}=t,n=r?.designSystem;return o=>{n&&it(n);try{let s=e.call(t,o,t,t.state,r);if(s&&typeof s.then=="function"){s.catch(i=>{t.error=i,console.error("[DOMQL] Async event error:",i)}).finally(()=>{n&&nt()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),r?.strictMode)throw s}n&&nt()}}function es(t,e,r){let{node:n,context:o}=e;if(!n)return;let s=Hw(e,r),i=If.has(t);if(!i&&Uw(t)){let a=o?.rootNode||n.ownerDocument?.documentElement;Ba(t,n,s,a)}else n.addEventListener(t,s,km(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!i&&Uw(t)){let a=o?.rootNode||n.ownerDocument?.documentElement;Ua(t,n,a)}else n.removeEventListener(t,s,km(t,!1))})}var wm=[["onDocument","document"],["onWindow","window"],["onVisualViewport","visualViewport"],["onMediaQuery","mediaQuery"]];function $f(t){if(typeof t!="string")return null;for(let e=0;e<wm.length;e++){let r=wm[e][0];if(t.length<=r.length||!t.startsWith(r))continue;let n=t.charCodeAt(r.length);if(!(n<65||n>90))return{target:wm[e][1],eventName:t.slice(r.length).toLowerCase()}}return null}var MT=/^[A-Za-z_$][\w$]*$/;function FT(t,e,r){let n=e,o=!1,s,i=!1,a=null;if(e&&typeof e=="object"&&typeof e!="function"&&(n=e.handler,o=!!e.capture,i=!!e.once,typeof e.passive=="boolean"&&(s=e.passive),typeof e.query=="string"&&(a=e.query)),typeof n=="string"&&MT.test(n)){let c=n;n=function(f){return t.call(c,f)}}return typeof n!="function"?null:(s===void 0&&(s=xm.has(r)),{handler:n,capture:o,passive:s,once:i,query:a})}function NT(t,e,r){let n=t.node?.ownerDocument||t.context?.document||(typeof document<"u"?document:null);if(!n||typeof n.addEventListener!="function")return null;if(e==="document")return n;let o=n.defaultView||(typeof window<"u"?window:null);if(!o)return null;if(e==="window")return typeof o.addEventListener=="function"?o:null;if(e==="visualViewport"){let s=o.visualViewport;return s&&typeof s.addEventListener=="function"?s:null}if(e==="mediaQuery"){let s=r&&r.query;if(typeof s!="string"||!s.trim()||typeof o.matchMedia!="function")return null;try{return o.matchMedia(s)||null}catch{return null}}return null}function jT(t,e,r,n){try{return t.addEventListener(e,r,n),!0}catch{return typeof t.addListener=="function"?(t.addListener(r),!0):!1}}function BT(t,e,r,n){try{t.removeEventListener(e,r,n)}catch{typeof t.removeListener=="function"&&t.removeListener(r)}}function UT(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 Lf(t,e,r){if(e.__ref){if(Array.isArray(r)){if(t.target!=="mediaQuery")return;for(let o=0;o<r.length;o++)Vw(t,e,r[o]);return}Vw(t,e,r)}}function Vw(t,e,r){let n=e.__ref,o=FT(e,r,t.eventName);if(!o||t.target==="mediaQuery"&&t.eventName!=="change")return;let s=NT(e,t.target,o);if(!s)return;let i=t.target+":"+(o.query?o.query+":":"")+t.eventName+":"+(o.capture?1:0);if(n.__globalEvents&&n.__globalEvents.has(i))return;let a=Hw(e,o.handler),c=f=>{UT(e)&&a(f)},l={capture:o.capture,passive:o.passive,once:o.once};jT(s,t.eventName,c,l)&&(n.__globalEvents||(n.__globalEvents=new Map),n.__globalEvents.set(i,{target:s,eventName:t.eventName,listener:c,options:l}),n.__eventCleanup||(n.__eventCleanup=[]),n.__eventCleanup.push(()=>{BT(s,t.eventName,c,l),n.__globalEvents&&n.__globalEvents.delete(i)}))}function Ww(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 rs(t,e,r){let n=Ww(e);if(!n.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<n.length;i++){let a=qw(n[i],s);a&&a!==e&&Kw(t,a,r,new Set([e]))}}function qw(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(o=>o.trim()),n=e[r[0]]||e[`smbls.${r[0]}`];for(let o=1;o<r.length&&n;o++)n=n[r[o]];return n||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function Kw(t,e,r,n=new Set){if(n.has(e))return;n.add(e);let o=Ww(e);if(o.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<o.length;a++){let c=qw(o[a],i);c&&Kw(t,c,r,n)}}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]=Gw(t[s],i):t[s]=i}}function Gw(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Gw(o,s):r[n]=s}return r}_n();R();var VT=["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"],Mf={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"]},Xw=["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"],er=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()):Zw(t),zT=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate"]),Zw=t=>zT.has(t)?t.toLowerCase():null,HT=new Set(["draggable","contenteditable","spellcheck","autocorrect"]),rr=t=>typeof t=="string"&&(HT.has(t)||t.startsWith("aria-")),Qt=(t,e)=>e!==!0&&e!==!1?e:rr(t)?e?"true":"false":e===!0?"":e,nr=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||er(e)||Mf.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(Mf,t)?Mf[t].includes(e):!1,Cm=t=>{if(!S(t))return!1;let e=t.toLowerCase();return Xw.includes(e)},WT=(t,e,r)=>{let n={};for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(r&&o in r)continue;if(o==="aria"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])Ct(e[o][a])&&(n["aria-"+a]=e[o][a]);continue}if(o==="data"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])if(Ct(e[o][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());n["data-"+c]=e[o][a]}continue}let s=nr(t,o),i=Cm(o);if(Ct(e[o])&&(s||i)){let a=er(o)||o;n[a]=e[o]}}return n},qT=(t,e)=>{let r={};if(t.attr)for(let n in t.attr)r[n]=t.attr[n](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let n in t.aria){let o=t.aria[n];typeof o=="function"&&(r["aria-"+n]=o(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let n in t.data){let o=t.data[n];if(typeof o=="function"){let s=n.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());r["data-"+s]=o(e,e.state,e.context)}}return r},Yr=(t,e)=>{let r=t.call("exec",e,t);if(r)return S(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},vm=(t,e)=>{let r=(t.preSrc||"")+(Yr(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:n}=t;if(!n.files&&!n.assets)return r;if(r.startsWith("/assets/")){let o=r.slice(8),s=n.assets&&(n.assets[r]||n.assets[o]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let o=r.slice(7),s=n.files&&(n.files[r]||n.files[o]);return s&&s.content?s.content.src:r}if(n.assets){let o=n.assets[r];if(o&&o.content)return o.content.src}if(n.files){let o=n.files[r];if(o&&o.content)return o.content.src}return r},Bn={src:t=>vm(t,t.src),href:t=>Yr(t,t.href),action:t=>Yr(t,t.action),poster:t=>vm(t,t.poster),data:t=>Yr(t,t.data)},Em=t=>{let e=t.tag||"div",r={};for(let n in Bn)if(t[n]!==void 0&&nr(e,n)){let o=Bn[n](t);o!==void 0&&(r[n]=o)}return r},Yw=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return T(r)?r.call(e,e):!!r},KT=(t,e,r)=>{if(t==="$"){let o=Yw(e,r);return o===void 0&&(o=!!r[e]),o}let n=r[e]===!0||r.state[e];if(!n){let o=Yw(e,r);o!==void 0&&(n=o)}return t==="."?!!n:!n},GT=new Set(["$",".","!"]),YT=(t,e,r)=>{let n={},o=(s,i,a,c)=>{let l=i;n[s]=f=>{if(KT(a,c,f))return T(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!GT.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 p in a[l])o("aria-"+p,a[l][p],i,c);continue}if(l==="data"&&a[l]&&typeof a[l]=="object"){for(let p in a[l]){let h=p.replace(/([A-Z])/g,g=>"-"+g.toLowerCase());o("data-"+h,a[l][p],i,c)}continue}let f=nr(e,l),u=Cm(l);if(!f&&!u)continue;let d=er(l)||l;o(d,a[l],i,c)}}return n};function ns(t={},e={}){let r=this,n=r.__ref;if(!n)return;if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof r.onBeforeUpdate=="function"&&Am(n))try{let i=r.onBeforeUpdate(r,r.state,r.context,e);if(i&&typeof i.then=="function")i.then(()=>_r(n,!1),a=>{_r(n,!0),r.context?.plugins?.length&&At("error",r,{hook:"onBeforeUpdate",error:a})||console.error("[DOMQL] onBeforeUpdate error:",a)});else if(_r(n,!1),i===!1)return r}catch(i){throw _r(n,!0),i}let o=!t||Object.keys(t).length===0,s=[];jc(()=>{if(t.state&&_t(r.state)&&r.state.$update(t.state),t.text!==void 0&&(r.text=t.text,!n.__exec.text&&r.node&&os(r,t.text??"")),t.html!==void 0&&(r.html=t.html,!n.__exec.html&&r.node&&(r.node.innerHTML=t.html)),t.style&&r.node?.style){if(!n.__exec.style)for(let i in t.style){let a=t.style[i];if(a==null)continue;let c=i.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),l=String(a).replace(/\s*!important\s*$/,"");r.node.style.setProperty(c,l,"important")}r.style||(r.style={}),Object.assign(r.style,t.style)}if(t.attr&&r.node?.setAttribute){for(let i in t.attr){let a=t.attr[i];a==null||a===!1&&!rr(i)?r.node.removeAttribute(i):typeof a!="function"&&typeof a!="object"&&r.node.setAttribute(i,Qt(i,a))}r.attr||(r.attr={}),Object.assign(r.attr,t.attr)}if(t.data&&r.node?.dataset){for(let i in t.data)r.node.dataset[i]=t.data[i];r.data||(r.data={}),Object.assign(r.data,t.data)}for(let i in t){if(jt.has(i)||i==="state")continue;let a=t[i],c=r[i];if(c&&c.__ref&&typeof c.update=="function")c.update(a,e);else if(typeof a=="object"&&a!==null){let l=i.charCodeAt(0);l>=65&&l<=90&&ue(a,r,i,e)}else i!=="text"&&i!=="html"&&i!=="style"&&i!=="attr"&&i!=="data"&&(r[i]=a,typeof a!="function"&&s.push(i))}});for(let i=0;i<s.length;i++)Jw(r,s[i]);if(r.node&&o&&n.__effects&&n.__effects.length)for(let i=0;i<n.__effects.length;i++){let a=n.__effects[i];a&&!a._disposed&&!a._isSubscribeToEffect&&typeof a._execute=="function"&&a._execute()}else if(r.node&&n.__conditionalRunners)for(let i of n.__conditionalRunners)i();return At("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}function Xr(t){if(!t)return;let e=t.__ref;if(!e)return;e.__disposed=!0;try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(n){console.error("[smbls] onBeforeRemove error:",n)}if(e.__effects){for(let n=0;n<e.__effects.length;n++)e.__effects[n].dispose();e.__effects.length=0}if(e.__eventCleanup){for(let n=0;n<e.__eventCleanup.length;n++)e.__eventCleanup[n]();e.__eventCleanup.length=0}if(e.__children){let n=e.__children.slice();e.__children.length=0;for(let o=0;o<n.length;o++){let s=t[n[o]];s&&s.__ref&&Xr(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 n=t.parent.__ref.__children.indexOf(t.key);n!==-1&&t.parent.__ref.__children.splice(n,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(n){console.error("[smbls] onRemove error:",n)}t.node=null,t.parent=null,t.__ref=null}function ss(){Xr(this)}R();R();R();var XT=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],ZT=["none","forwards","backwards","both"],JT=["normal","reverse","alternate","alternate-reverse"],QT=["running","paused"],tO=t=>/^[\d.]+m?s$/.test(t),eO=/^(?: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*\))$/,rO=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(n=>eO.test(n.replace(/\s+/g,"")))},Qw=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),nO={transform:rO,translate:Qw,rotate:t=>Qw(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},oO=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},sO=t=>{if(!k(t))return null;let e=null,r=-1;for(let n in t){let o=oO(n);o==null||!k(t[n])||o>=r&&(r=o,e=t[n])}return e},iO=t=>{let e=sO(t);if(!e)return!1;let r=Object.keys(e);if(!r.length)return!1;for(let n of r){let o=nO[n];if(!o)return!1;let s=e[n];if(s==null||typeof s=="object"||typeof s=="function"||!o(s))return!1}return!0},aO=(t,e)=>{if(k(t))return t;let{animation:r}=e.context&&e.context.designSystem||{},n=r&&r[t];return k(n)?n:null},cO=["reverse","alternate","alternate-reverse"],tS=(t,e,r)=>{let n=r||e.animationDirection;return n&&cO.includes(String(n))?"both":iO(aO(t,e))?"backwards":"both"},lO=0,eS=new Map,Tm=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(k(t)){let o=JSON.stringify(t),s=eS.get(o);if(s)return s;let i=`smbls-anim-${lO++}`,a=Yo(i,t);return eS.set(o,a),a}let n=r&&r[t];return k(n)?Yo(t,n):t},fO=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},n=t.split(/\s+/),o=null,s=[],i=null,a=null,c=null,l=null,f=null;for(let u of n)r&&r[u]?o=u:tO(u)?s.push(u):XT.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):JT.includes(u)?c=u:ZT.includes(u)?l=u:QT.includes(u)?f=u:o||(o=u);return{name:o,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},Om={animation:(t,e)=>{if(t!=null){if(S(t)&&t.includes(" ")){let r=fO(t,e);return{animationName:Tm(r.name||t,e),animationDuration:r.durations[0]||le(e.animationDuration||"A").timing,animationDelay:r.durations[1]||le(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||Ee(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||tS(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:Tm(t,e),animationDuration:le(e.animationDuration||"A").timing,animationDelay:le(e.animationDelay||"0s").timing,animationTimingFunction:Ee(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||tS(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}}},animationName:(t,e)=>({animationName:Tm(t,e)}),animationDuration:t=>({animationDuration:le(t).timing}),animationDelay:t=>({animationDelay:le(t).timing}),animationTimingFunction:t=>({animationTimingFunction:Ee(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};R();var Rm={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>M("height",t,e),width:(t,e)=>M("width",t,e),boxSizing:t=>Ot(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...xt("height",e),...xt("width",r||e)}},inlineSize:(t,e)=>M("inlineSize",t,e),blockSize:(t,e)=>M("blockSize",t,e),minWidth:(t,e)=>M("minWidth",t,e),maxWidth:(t,e)=>M("maxWidth",t,e),widthRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...xt("minWidth",e),...xt("maxWidth",r||e)}},minHeight:(t,e)=>M("minHeight",t,e),maxHeight:(t,e)=>M("maxHeight",t,e),heightRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...xt("minHeight",e),...xt("maxHeight",r||e)}},size:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...M("inlineSize",e),...M("blockSize",r||e)}},minBlockSize:(t,e)=>M("minBlockSize",t,e),minInlineSize:(t,e)=>M("minInlineSize",t,e),maxBlockSize:(t,e)=>M("maxBlockSize",t,e),maxInlineSize:(t,e)=>M("maxInlineSize",t,e),minSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...xt("minInlineSize",e),...xt("minBlockSize",r||e)}},maxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...xt("maxInlineSize",e),...xt("maxBlockSize",r||e)}},borderWidth:(t,e)=>M("borderWidth",t,e),borderTopWidth:(t,e)=>M("borderTopWidth",t,e),borderRightWidth:(t,e)=>M("borderRightWidth",t,e),borderBottomWidth:(t,e)=>M("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>M("borderLeftWidth",t,e),textDecorationThickness:(t,e)=>M("textDecorationThickness",t,e),textUnderlineOffset:(t,e)=>M("textUnderlineOffset",t,e),padding:(t,e)=>M("padding",t,e),scrollPadding:(t,e)=>M("scrollPadding",t,e),paddingInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...xt("paddingInlineStart",e),...xt("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...xt("paddingBlockStart",e),...xt("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>M("paddingBlockStart",t,e),paddingBottom:(t,e)=>M("paddingBlockEnd",t,e),paddingLeft:(t,e)=>M("paddingInlineStart",t,e),paddingRight:(t,e)=>M("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>M("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>M("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>M("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>M("paddingInlineEnd",t,e),margin:(t,e)=>M("margin",t,e),marginInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...xt("marginInlineStart",e),...xt("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!S(e.marginBlock))return;let[r,n]=e.marginBlock.split(" ");return{...xt("marginBlockStart",r),...xt("marginBlockEnd",n||r)}},marginTop:(t,e)=>M("marginBlockStart",t,e),marginBottom:(t,e)=>M("marginBlockEnd",t,e),marginLeft:(t,e)=>M("marginInlineStart",t,e),marginRight:(t,e)=>M("marginInlineEnd",t,e),marginInlineStart:(t,e)=>M("marginInlineStart",t,e),marginInlineEnd:(t,e)=>M("marginInlineEnd",t,e),marginBlockStart:(t,e)=>M("marginBlockStart",t,e),marginBlockEnd:(t,e)=>M("marginBlockEnd",t,e),gap:t=>({gap:wf(t)}),columnGap:(t,e)=>ve(e,"columnGap",t),rowGap:(t,e)=>ve(e,"rowGap",t),flexWrap:t=>{if(t!=null)return{display:"flex",flexWrap:t}},flexFlow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},flexAlign:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>yr(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>yr(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>yr(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>yr(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>yr(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>yr(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var Pm={fontSize:t=>Oa(t)||t,fontFamily:t=>({fontFamily:Aa(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 Dm={overflow:t=>({overflow:t}),cursor:(t,e,r,n)=>{if(!t)return;let o=n.assets&&n.assets[t];if(o&&o.content)t=`url(${o.content.src})`;else{let s=n.files&&n.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 Im={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>kt(r,"k").k).join(" ")}},left:t=>kt(t,"left"),top:t=>kt(t,"top"),right:t=>kt(t,"right"),bottom:t=>kt(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>kt(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=>kt(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};R();var Ff=0,Nf=()=>{Ff++},jf=()=>{Ff>0&&Ff--},de=({context:t,state:e})=>{let r=t?.designSystem,n=e?.root?.globalTheme||r?.globalTheme;return n&&n!=="auto"?n:Ff>0?null:r&&r.resolvedTheme||null},te=(t,e)=>{if(e==null||e==="")return;if(!k(e))return{[t]:e};let r={},n=!1;for(let o in e){let s=e[o];if(!(s==null||s==="")){if(k(s)){let i=te(t,s);i&&(r[o]=i,n=!0);continue}r[o]={[t]:s},n=!0}}return n?r:void 0},$m={theme:(t,e)=>{if(t)return e.themeModifier?Ce(t,`@${e.themeModifier}`):Ce(t)},color:(t,e)=>{let r=de(e);if(t)return te("color",Dt(t,r))},background:(t,e)=>{let r=de(e);if(t)return S(t)&&t.includes("gradient")&&t.includes("(")?{background:Ma(t,r)}:te("background",Dt(t,r))},backgroundColor:(t,e)=>{let r=de(e);if(t)return te("backgroundColor",Dt(t,r))},backgroundImage:(t,e,r,n)=>{let o=de(e);if(!t)return;let s=n.assets&&n.assets[t];if(s&&s.content)t=s.content.src;else{let i=n.files&&n.files[t];i&&i.content&&(t=i.content.src)}return te("backgroundImage",xf(t,o))},textStroke:t=>{let e=bf(t);if(e!=null)return{WebkitTextStroke:e}},outline:t=>({outline:tr(t)}),outlineWidth:(t,e)=>M("outlineWidth",t,e),outlineColor:(t,e)=>{let r=de(e);if(t)return te("outlineColor",Dt(t,r))},outlineOffset:(t,e)=>M("outlineOffset",t,e),border:t=>({border:tr(t)}),borderColor:(t,e)=>{let r=de(e);if(t)return te("borderColor",Dt(t,r))},borderTopColor:(t,e)=>{let r=de(e);if(t)return te("borderTopColor",Dt(t,r))},borderBottomColor:(t,e)=>{let r=de(e);if(t)return te("borderBottomColor",Dt(t,r))},borderLeftColor:(t,e)=>{let r=de(e);if(t)return te("borderLeftColor",Dt(t,r))},borderRightColor:(t,e)=>{let r=de(e);if(t)return te("borderRightColor",Dt(t,r))},borderLeft:t=>({borderLeft:tr(t)}),borderTop:t=>({borderTop:tr(t)}),borderRight:t=>({borderRight:tr(t)}),borderBottom:t=>({borderBottom:tr(t)}),shadow:(t,e)=>{let r=de(e);if(t)return te("boxShadow",_f(t,r))},boxShadow:(t,e)=>{if(!S(t))return;let[r,n]=t.split("!importan"),o=de(e),s=n?" !important":"",i=La(r.trim(),o);return S(i)?{boxShadow:i+s}:te("boxShadow",i)},textShadow:(t,{context:e})=>te("textShadow",La(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:tr(t)})};var Va={transition:t=>{let e=kf(t);if(e!=null)return{transition:e}},transitionDuration:t=>({transitionDuration:Fa(t)}),transitionDelay:t=>({transitionDelay:Fa(t)}),transitionTimingFunction:t=>({transitionTimingFunction:Ee(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};R();var Lm={flow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},wrap:(t,e)=>{if(t!=null)return{display:"flex",flexWrap:t}},align:(t,e)=>{if(!S(t))return;let[r,n]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:n}}};R();var uO=/(^|[^\w.-])([A-Za-z_][\w-]*)/g,rS=t=>{if(!S(t))return t;let e=E().sizes;return e?t.replace(uO,(r,n,o)=>{let s=e[o];return s==null?r:n+String(s)}):t},or=t=>rS(Sf(t)),Mm={gridTemplateColumns:t=>({gridTemplateColumns:or(t)}),gridTemplateRows:t=>({gridTemplateRows:or(t)}),gridAutoColumns:t=>({gridAutoColumns:or(t)}),gridAutoRows:t=>({gridAutoRows:or(t)}),area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:or(t)}),templateColumns:t=>({gridTemplateColumns:or(t)}),autoColumns:t=>({gridAutoColumns:or(t)}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:or(t)}),templateRows:t=>({gridTemplateRows:or(t)}),autoRows:t=>({gridAutoRows:or(t)}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var pt={...Om,...Rm,...Pm,...Dm,...Im,...$m,...Va,...Lm,...Mm};var ht=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationRange","animationRangeEnd","animationRangeStart","animationTimeline","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","interpolateSize","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 dO=/^-?[A-Z][0-9]?$/,pO=/^[a-z][0-9]?$/,nS=/var\(\s*(--[A-Za-z0-9-]+)/g,hO=t=>{let e=new Set,r=new Set;if(!t||typeof t!="object")return{knownLetters:e,knownVars:r};for(let n in t){let o=t[n];if(!(!o||typeof o!="object")){if(o.sequence&&typeof o.sequence=="object")for(let s in o.sequence)e.add(s);if(o.vars&&typeof o.vars=="object")for(let s in o.vars)r.add(s)}}return{knownLetters:e,knownVars:r}},gO=(t,e)=>{if(!e.size)return[];let r=t.split(/[(),\s]+/).filter(Boolean),n=new Set;for(let o of r){if(!dO.test(o))continue;let s=o.charCodeAt(0)===45?o.slice(1):o;e.has(s)&&n.add(o)}return[...n]},mO=(t,e)=>{if(!e.size)return[];let r=[];nS.lastIndex=0;let n;for(;n=nS.exec(t);){let o=n[1];if(e.has(o))continue;let s=o.lastIndexOf("-");if(s===-1)continue;let i=o.slice(s+1);if(!pO.test(i))continue;let a=o.slice(0,s+1)+i.toUpperCase();a!==o&&e.has(a)&&r.push({varName:o,corrected:a})}return r},Bf=new Set,oS=(t,e,r)=>{if(!Et()||!S(e)||!e)return;let n;try{n=E()}catch{return}let{knownLetters:o,knownVars:s}=hO(n);if(!o.size&&!s.size)return;let i=gO(e,o),a=mO(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}`;Bf.has(f)||(Bf.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}`;Bf.has(u)||(Bf.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 yO=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,bO=(t,e,r)=>{let{context:n}=r;if(!n.designSystem?.media)return;let o=t.slice(1),s=n.designSystem.media[o],i=pe(e,r);if(!s)return{[t]:i};if(/^@(media|supports|container)\b/.test(s))return{[s]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match(yO),c=a?a[1]||a[2]:o,l={[`${s} &`]:i};if(c==="dark"||c==="light"){let f=n.designSystem?.scopeSelector||":root",u=f===":root"?":root:not([data-theme])":`${f}:not([data-theme])`;l[`@media (prefers-color-scheme: ${c})`]={[`${u} &`]:i}}return l},sS=(t,e,r)=>({[t]:pe(e,r)}),za=(t,e,r)=>{let n=`&${t}`,o=pe(e,r);if(t.includes(",")&&o){let s={},i={};for(let a in o)typeof o[a]=="object"&&o[a]!==null?i[a]=o[a]:s[a]=o[a];if(Object.keys(i).length){let a=n.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[n]=s);for(let l in i){let f=a.map(u=>`${u} ${l}`).join(", ");c[f]=i[l]}return c}}return{[n]:o}},Fm=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return T(r)?r.call(e,e):!!r},_O=(t,e,r)=>{let n=t.slice(1),o=Fm(n,r);if(o===void 0&&(o=!!r[n]),!!o)return pe(e,r)},xO=(t,e,r)=>({[t]:e}),wO=(t,e,r)=>{let n=t.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=Fm(n,r);s!==void 0&&(o=s)}if(o)return pe(e,r)},SO=(t,e,r)=>{let n=t.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=Fm(n,r);s!==void 0&&(o=s)}if(!o)return pe(e,r)},Nm=(t,e)=>pe(t,e),jm={"@":bO,":":za,"[":za,"*":za,"+":za,"~":za,"&":sS,">":sS,$:_O,"-":xO,".":wO,"!":SO};var Uf=Or(),iS=(t,e,r)=>{let n=e?.context?.designSystem;n&&it(n);try{let o={},s={},i=(a,c)=>{if(r.unpack){o={...o,...c};return}o[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,p)=>mt(d,f[p]),{});o.designSystemClass=u}}else if(a==="true"){let l=ft(c,e);mt(o,Nm(l,e))}else if(e.classlist[a]){let l=e.classlist[a],f=T(l)?l(e,e.state,e.context):l;f&&i(a,f),!Uf&&k(o[a])&&(o[a].label=a)}else if(pt[a]){let l=ft(c,e);if(l===null)continue;O(l)&&(l=l.reduce((u,d)=>mt(u,d),{}));let f=pt[a](l,e,e.state,e.context);O(f)&&(f=f.reduce((u,d)=>mt(u,d),{})),f&&i(a,f),!Uf&&k(o[a])&&(o[a].label=a)}else if(ht.has(a)){let l=ft(c,e);if(l===null)continue;typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),Uf||oS(a,l,e),i(a,{[a]:l}),!Uf&&k(o[a])&&(o[a].label=a)}else s[a]=c}return[o,s]}finally{n&&nt()}},aS=(t,e)=>{let r={};for(let n in t){let o=jm[n.slice(0,1)];if(o){let s=o(n,t[n],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]&&typeof r[i]=="object"&&typeof s[i]=="object"?Gt(r[i],s[i]):r[i]=s[i])}}return r},pe=(t,e,r={unpack:!0})=>{let[n,o]=iS(t,e,r),s=aS(o,e),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return si(n,s);n._selectors=s}return n},kO=(t,e)=>{let r={};if(t.class)for(let n in t.class)r[n]=t.class[n](e);return r};R();var cS=t=>{if(k(t))return pe(t,t)},vO=(t,e)=>{let r=cS(t);return typeof e=="function"?e(r):fe(r)};R();function Um(t,e,r){let n=t?.context?.analyze;if(!n||!n.emit||e==="warn"&&!n.shouldCapture("warnings")||e==="error"&&!n.shouldCapture("errors"))return;let o=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");n.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:o||null,args:r})}var lS=new Set;function CO(t,e,r){let n=String(e);if(lS.has(n))return;lS.add(n);let o=t?.__ref?.path,s=Array.isArray(o)&&o.length?o.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('${n}') at <${s}>: "${n}" ${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 EO(...t){return Um(this,"warn",t),zi.apply(this,t)}function AO(...t){return Um(this,"error",t),Sn.apply(this,t)}var fS={update:ns,remove:ss,getDB:Ki,getQuery:Gi,getRootData:Bi,getPath:Mi,nextElement:Hi,previousElement:Wi,verbose:xo,warn:EO,error:AO,variables:qi,spotByPath:Li,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 n=this.context?.__create;n&&n(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(r){r.__setLocked=!1;let n=r.__setQueued;n&&(r.__setQueued=null,this.set(n.content,n.options))}}},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,n=this.key,o=this.parse();return this.remove(),e(o,r,n,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 n=this[r];if(!n)continue;if(typeof t=="function"){if(t(n))return n}else if(typeof t=="string"&&n.key===t)return n;let o=n.lookdown?.(t);if(o)return o}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let n of r.__children){let o=this[n];o&&(typeof t=="function"?t(o)&&e.push(o):typeof t=="string"&&o.key===t&&e.push(o),o.lookdownAll?.(t,e))}return e},getRef(t){return t?this.__ref&&this.__ref[t]:this.__ref},getChildren(){let t=this.__ref&&this.__ref.__children;return Array.isArray(t)?t.map(e=>this[e]):[]},getRoot:ji,getRootState:Ni,getRootContext:Ui,getContext:Vi,parse(t){let e={},r=t?new Set(t):null,n=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!r?.has(o)){if(n&&n[o]!==void 0){e[o]=n[o];continue}typeof this[o]!="function"&&(e[o]=this[o])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let n of r.__children)this[n]?.parseDeep&&(e[n]=this[n].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 n=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(n,o,"important")}},call(t,...e){let r=this.context,n=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof n=="function")return n.call(this,...e);Et()&&CO(this,t,n)},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)}},Bm=new WeakMap;function TO(t){if(!t)return fS;let e=Bm.get(t);if(e)return e;e=Object.create(fS);let r=t.methods;if(r)for(let n in r)e[n]=r[n];return Bm.set(t,e),e}function is(t){let e=TO(t.context);Object.setPrototypeOf(t,e)}function Vf(t){if(!t)return!1;let e=Bm.get(t);if(!e)return!1;let r=t.methods;if(!r)return!1;for(let n in r)e[n]=r[n];return!0}var zf=[],Hf=!1,Zr=0;function Wf(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function uS(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 Vm(){return Zr?Wf()-Zr>=50:!1}var as=0;function zm(){as===0&&!Zr&&(Zr=Wf()),as++}function Hm(){as>0&&as--,as===0&&!Hf&&(Zr=0)}function Wm(t){zf.push(t),Hf||(Hf=!0,uS(dS))}function dS(){for(Zr=Wf();zf.length;){let t=zf.shift();try{t()}catch(e){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",e?.message||e)}if(Wf()-Zr>=50)break}if(zf.length){uS(dS);return}Hf=!1,Zr=0,as=0}R();_n();var Xm={};D(Xm,{STATE_METHODS:()=>pS,applyInitialState:()=>Kf,applyStateMethods:()=>he,callStateMethod:()=>Ha,createState:()=>Km,isTracking:()=>Ym,useHostState:()=>Gm});var pS=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"]),qf=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},Me=(t,e,r,{onlyIfAbsent:n}={})=>{qf(t,"$"+e,r),!(n&&Object.prototype.hasOwnProperty.call(t,e))&&qf(t,e,r)},Ha=(t,e,...r)=>{if(!t)return;let n=t["$"+e];if(typeof n=="function")return n.apply(t,r);let o=t[e];if(typeof o=="function")return o.apply(t,r)},he=(t,e)=>{if(_t(e)){let o=e.__raw||e;Me(o,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),Me(o,"set",function(s,i={}){return e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,i),e},{onlyIfAbsent:!0}),Me(o,"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}),Me(o,"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}),Me(o,"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}),Me(o,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),Me(o,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),Me(o,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),Me(o,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&_t(a.parent);)a=a.parent;return Ha(a,"update",s,i)}),Me(o,"parentUpdate",function(s,i={}){if(e.parent)return Ha(e.parent,"update",s,i)}),Me(o,"quietReplace",function(s,i={}){return e.$replace(s,{quiet:!0,...i})}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=e,i=_t(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,_t(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o]},n={update(o){if(!o||typeof o!="object")return e;for(let s in o)e[s]=o[s];return e},apply(o){if(typeof o!="function")return e;let s=o(e);return s?e.$update(s):e},parse(){return{...e}},toggle(o){return e[o]=!e[o],e},set(o){if(!o||typeof o!="object")return e;r();for(let s in o)e[s]=o[s];return e},replace(o){return e.$set(o)},clean(){return r(),e}};for(let o in n)if(qf(e,"$"+o,n[o]),typeof e[o]!="function"){if(Object.prototype.hasOwnProperty.call(e,o)){Vc(o,"");continue}qf(e,o,n[o])}};var Km=function(t,e,r){return t.state=Kf(t,e,r),t.state},Kf=function(t,e,r){let{__ref:n}=t,o=t.state;if(o==null||o===!1){let s=e?.state||{};return he(t,s),s}if(typeof o=="string")return n&&(n.__state=o),n.__stateType="string",OO(o,t,e);if(typeof o=="number"||typeof o=="boolean"){n&&(n.__state=o,n.__stateType=typeof o,n.__hasRootState=!0);let s=ir({value:o});return s.__element=t,e?.state&&(s.parent=e.state),he(t,s),s}if(typeof o=="function"&&(o=o(t,e?.state)||{}),typeof o=="object"&&!_t(o)){n&&(n.__hasRootState=!0),o.isRootState&&n&&(n.__hasRootState=!0);let s=ir({...o});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)),he(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,r),s}return _t(o)?(o.__element=t,o):e?.state||{}};function qm(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function OO(t,e,r){if(!r?.state)return{};if(t===".")return r.state;if(t.startsWith("../")){let o=t.slice(3),s=r.state?.parent;return o&&s?qm(s,o):s??r.state??{}}if(t.startsWith("~/")){let o=r.state;for(;o?.parent;)o=o.parent;let s=t.slice(2);return s?qm(o,s):o??{}}let n=qm(r.state,t);if(n&&typeof n=="object"&&!_t(n)&&!Object.getOwnPropertyDescriptor(n,"root")){let o=r.state?.root||r.state;Object.defineProperty(n,"root",{get:()=>o,enumerable:!1,configurable:!0})}return n}var Gm=(t,e)=>{if(!t)return gS;let r=PO(t,e);return!r||!r.state?gS:IO(r.state)},Ym=()=>Bc()!=null,RO=128;function PO(t,e){let r=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,n=t,o=null;for(let s=0;s<RO&&n;s++){if(r(n)&&n.state)return n;if(n.state&&!o&&(o=n),!n.parent||n.parent===n)break;n=n.parent}return o}var DO={get(t,e){return t[e]}},hS=new WeakMap,IO=t=>{let e=hS.get(t);return e||(e=new Proxy(t,DO),hS.set(t,e)),e},gS=new Proxy(Object.create(null),{get(){},has(){return!1}});var Gf="3.14.788";var mS="__SMBLS_ELEMENT_ID_ENGINE__",yS=(t,e,r)=>{let n=e||Gf,o=r||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[mS];return s&&s.engine&&s.version===n?s.engine:(s||(o[mS]={version:n,engine:t}),t)};var TS=yS({uniqId:1,scopedStyleId:0},Gf),qa=[],ty=!1;function bS(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function $O(){return typeof document<"u"&&document.visibilityState==="hidden"}var LO=250;function OS(){if(!ty){if(ty=!0,typeof requestAnimationFrame!="function"){setTimeout(Ga,0);return}$O()?setTimeout(Ga,LO):requestAnimationFrame(Ga)}}var MO=300,FO=15e4;function Ga(){if(ty=!1,!qa.length)return;let t=qa.splice(0,qa.length);for(let e=0;e<t.length;e++){let r=t[e];if(r.node){if(!r.node.isConnected){let n=r.__ref||(r.__ref={});n.__mountAttempts=(n.__mountAttempts||0)+1,n.__mountFirstAttemptAt==null&&(n.__mountFirstAttemptAt=bS());let o=bS()-n.__mountFirstAttemptAt;n.__mountAttempts<=MO&&o<FO?(qa.push(r),OS()):console.warn("[DOMQL] onMounted dropped after",n.__mountAttempts,"attempts /",o,"ms \u2014 node never connected:",r.key||r.tag||r);continue}ee("Mounted",r,r.__ref?.__mountOptions||{})}}}function ey(t,e){typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,qa.push(t),OS())}function _S(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(n){if(t.context?.plugins?.length&&At("error",t,{hook:"onContentUpdate",error:n})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',n),t.context?.strictMode)throw n}finally{r&&nt()}}function Jr(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function NO(t){return t.charAt(2).toLowerCase()+t.slice(3)}function jO(t){return t.toLowerCase()}function ry(t){let e=t.charCodeAt(0);return e===58||e===64||e===38||e===91}function Ka(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Ka(o,s):r[n]=s}return r}function Jf(t){if(typeof t=="string")return t||void 0;if(typeof t=="number"||typeof t=="bigint")return String(t)}function RS(t,e,r){return Jf(t)||(e&&typeof e=="object"?Jf(e.key):void 0)||String(r)}function ue(t,e,r,n={},o){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t}),r=Jf(r);let s=Jf(t.key),i=Object.create(null);i.key=r||s||`_${TS.uniqId++}`,i.parent=e||null,i.context=t.context||e?.context||n.context||{},i.context.__create||(i.context.__create=ue);let a=i.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||i,path:e?.__ref?.path?[...e.__ref.path,i.key]:[i.key],origin:t};if(r&&!t.extends&&!t.extend){let m=r.indexOf("_"),b=r.indexOf("."),_=m>0?m:-1;if(b>0&&(_<0||b<_)&&(_=b),_>0){let y=r.substring(0,_),x=i.context?.components;x&&(x[y]||x["smbls."+y])?t={...t,extends:y}:x&&Et()&&(/^[A-Z]\w*_\d+$/.test(r)||/^[A-Z]\w*\.\w+$/.test(r))&&console.warn(`[smbls] auto-extend: key "${r}" looks like an instance of "${y}" but neither "${y}" nor "smbls.${y}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}rs(i,t,n);let c=new Set(["childProps","attr","style","scope","data"]),l=i.props&&typeof i.props=="object"?i.props:null;for(let m in t){if(m==="parent"||m==="node"||m==="__ref"||m==="extends"||m==="context"||m==="props")continue;if(m==="key"){s&&(i.key=s);continue}let b=t[m],_=i[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?i[m]=Ka(_,b):y&&c.has(m)?i[m]={..._,...b}:y&&ry(m)?i[m]=Ka(_,b):i[m]=b}function f(m){for(let b in m){let _=m[b],y=i[b],x=y&&_&&typeof y=="object"&&typeof _=="object"&&!Array.isArray(y)&&!Array.isArray(_)&&typeof y!="function"&&typeof _!="function";x&&b.charCodeAt(0)>=65&&b.charCodeAt(0)<=90?i[b]=Ka(y,_):x&&c.has(b)?i[b]={...y,..._}:x&&ry(b)?i[b]=Ka(y,_):i[b]=_}}l&&f(l),t.props&&typeof t.props=="object"&&f(t.props),t.data!==void 0&&(i.data=t.data),t.classlist!==void 0&&(i.classlist=t.classlist),t.text!==void 0&&(i.text=t.text),t.html!==void 0&&(i.html=t.html);let u=i.scope&&typeof i.scope=="object"?i.scope:null,d=e?.scope,p=i.context&&typeof i.context.globalScope=="object"&&i.context.globalScope||null,h=d||p||null;if(t.scope!==void 0||u){let m={};u&&Object.assign(m,u),t.scope!==void 0&&Object.assign(m,t.scope),i.scope=Uc(m,h)}else h&&(i.scope=h);if(t.if!==void 0&&(i.if=t.if),is(i),BO(i,e,t),i.if!=null){let m;if(typeof i.if=="function")try{m=i.if(i,i.state,i.context)}catch(b){if(m=!1,a.__ifError=b,typeof console<"u"&&console.warn){let _=i.key||i.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${_} \u2014 treating as false:`,b?.message||b)}}else m=i.if;a.__if=!!m}if(a.__if)typeof i.if=="function"&&(a.__ifInitialized=!0);else return e&&(e[i.key]=i),typeof i.if=="function"&&IS(i,a,i.if),i;i.tag||(i.tag=qr(i)),ee("Init",i,n);let g=i.node=Kr(i);if(!g)return i;if(i.tag==="fragment"){let b=(i.context?.document||globalThis.document).createComment("");g.appendChild(b),a.__fragmentAnchor=b}ee("AttachNode",i,n),g.setAttribute&&i.key&&g.setAttribute("data-key",i.key),e&&(e[i.key]=i,e.__ref?.__children&&(e.__ref.__children.includes(i.key)||e.__ref.__children.push(i.key))),g.setAttribute&&i.context?.scopeSelector&&i.context.scopeSelector!==":root"&&i.context.key&&i.key===i.context.key&&g.setAttribute("data-smbls-app",i.context.key),i.id&&g.setAttribute&&(g.id=i.id),BS(i,n),DS(i),ny(i),NS(i),rR(i);try{US(i,n)}catch(m){if(typeof console<"u"&&console.error){let b=i.__ref?.path?.join(".")||i.key||"<root>";console.error(`[smbls] createChildren failed at ${b}:`,m?.message||m,m?.stack?`
53
53
  `+m.stack.split(`
54
54
  `).slice(0,6).join(`
55
- `):"")}}if(Zf(i,!0),LS(i,e,o),typeof i.html=="function"&&i.node&&!i.node.innerHTML){let m=i.context?.designSystem;m&&st(m);try{let b=i.html(i,i.state,i.context);b!=null&&typeof b!="function"&&(i.node.innerHTML=b)}catch{}finally{m&&rt()}}if(ee("Create",i,n),ee("Complete",i,n),ee("Render",i,n),ee("RenderRouter",i,n),Zm(i,n),typeof i.onFrame=="function"){let m=i.onFrame,b=i.context?.designSystem,_=()=>{if(i.node){if(i.node.isConnected){b&&st(b);try{m(i,i.state,i.context)}catch(y){console.error("[DOMQL] onFrame error:",y)}finally{b&&rt()}}requestAnimationFrame(_)}};requestAnimationFrame(_)}return i}function vO(t,e,r){let n=!e,o=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=n&&o&&t.context?.state,i=r.state!==void 0&&!s?r.state:t.state&&!bt(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,pe(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,p=(m,b)=>{d.has(m)||ur(f,m,c)&&(c[m]=b,d.add(m),Ge(f,m))},h=l.translations[u];if(h&&typeof h=="object")for(let m in h)p(m,h[m]);let g=new Set(l.languages||[]);for(let m in l.translations)g.has(m)||p(m,l.translations[m])}t.state=bt(c)?c:ir(c),t.state.__element=t,t.state.root=t.state,pe(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),pe(t,t.state);return}if(typeof i=="string"){if(t.state=vS(i,e),t.state&&typeof t.state=="object"&&!bt(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}pe(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=bt(a)?a:ir(a||{})}else bt(i)?t.state=i:t.state=ir({...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,pe(t,t.state)}function Km(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function vS(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let o=t.slice(3);return o?Km(e.state,o):e.state??{}}if(t.startsWith("~/")){let o=e.state?.root||e.state,s=t.slice(2);return s?Km(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=Km(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let n=e.context?.polyglot;if(n?.translations){let o=e.state?.root?.lang||n.defaultLang||"en",s=n.translations[o];if(s?.[t]!==void 0)return s[t];if(n.translations[t]!==void 0)return n.translations[t]}return{}}var CO=new Set(["s","state","ctx","context"]);function EO(t){try{let r=Function.prototype.toString.call(t).match(/^[^(]*\(([^)]*)\)/);return r?r[1].split(",").map(n=>n.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function AO(t){if(typeof t!="function"||t.length!==2)return!1;let e=EO(t);if(e.length<2)return!1;let r=e[1].replace(/[{}[\]]/g,"").trim();return r.length>0&&!CO.has(r)}function TO(t){let e=t.__ref,r=t.tag||"div",n=t.context?.designSystem,o=[],s=Object.keys(t);for(let i=0;i<s.length;i++){let a=s[i];if(typeof t[a]!="function"||Nt.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||Jr(a)||pt[a]||ht&&ht.has(a)||nr(r,a)||(Et()&&AO(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).`),o.push({prop:a,fn:t[a]}))}for(let i=0;i<o.length;i++){let{prop:a,fn:c}=o[i];e.__exec[a]=c,Object.defineProperty(t,a,{get(){n&&st(n);try{return c(t,t.state,t.context)}catch{return}finally{n&&rt()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function OO(t,e){if(!(!Array.isArray(e)||e.length===0))for(let r=0;r<e.length;r++){let n=e[r];try{typeof n=="function"?n(t,t.state,t.context):typeof n=="string"&&t.state?.[n]}catch{}}}function jt(t,e,r){return!Array.isArray(e)||e.length===0?r:function(...n){return OO(t,e),r.apply(this,n)}}function za(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function ut(t,e){return()=>t.path.join(".")+"::"+e}var pS=new Set;function he(t,e,r){if(!Et())return;let n=ut(t,e)();pS.has(n)||(pS.add(n),console.warn(`[smbls] "${e}" effect threw on ${t.path.join(".")} \u2014 keeping previous value:`,r?.message||r))}function CS(t,e){let r=t.__ref,n=!!(e&&e.skipIfEffect);if(TO(t),typeof t.text=="function"){let i=t.text,a=jt(t,t.textDeps,i),c=K(()=>{if(!r.contentManaged)try{let l=a(t,t.state,t.context);t.node&&l!=null&&typeof l!="function"&&typeof l!="object"&&(typeof l=="string"&&l.includes("{{")&&(l=Dt.call(t,l,t.state)),ns(t,l))}catch(l){he(r,"text",l)}},{depth:r.path.length,label:ut(r,"text")});r.__effects.push(c),r.__exec.text=i}else if(typeof t.text=="string"&&t.text.includes("{{")){let i=t.text,a=K(()=>{if(r.contentManaged)return;let c=Dt.call(t,i,t.state);c!=null&&(t.text=c),t.node&&ns(t,c??"")},{depth:r.path.length,label:ut(r,"text")});r.__effects.push(a),r.__exec.text=i}for(let i of Object.keys(t))if(typeof t[i]=="function"&&!Nt.has(i)&&!Jr(i)&&!r.__exec[i]){if(pt[i]){let a=t[i],c=jt(t,t[i+"Deps"],a),l=i,f,u=null,d=null,p,h=K(()=>{let g=t.context?.designSystem;g&&st(g);try{let m=c(t,t.state,t.context);Mf();let b;try{b=pt[l](m,t,t.state,t.context)}finally{Ff()}if(Array.isArray(b)){let y={};for(let x of b)if(x)for(let w in x)y[w]=x[w];b=y}let _=l==="show"||l==="hide";if(b&&t.node&&RO(b)){let y=Yf(b);if(y===null||y!==p){p=y;let x=le(b,null,t.context?.cssPrefix),w=x?x.split(" ").filter(Boolean):null;if(t.node.classList){if(d)for(let v of d)t.node.classList.remove(v);if(w&&w.length)for(let v of w)t.node.classList.add(v);d=w}}f=void 0,u=null}else if(b&&t.node){if(d){for(let x of d)t.node.classList.remove(x);d=null,p=void 0}let y=Yf(b);(y===null||y!==f||!Gf(t.node,u))&&(f=y,as(t.node,b),u=Kf(t.node,b))}else if(t.node&&_){f=void 0,u=null;let y=r.__explicitDisplay;t.node.style.display=typeof y=="string"?y:""}}finally{g&&rt()}},{depth:r.path.length,label:ut(r,l)});r.__effects.push(h),r.__exec[i]=a}else if(ht&&ht.has(i)){let a=t[i],c=jt(t,t[i+"Deps"],a),l=i,f,u=null,d=K(()=>{let p=t.context?.designSystem;p&&st(p);try{let h=c(t,t.state,t.context);if(t.node)if(h!=null){let g=l+":"+String(h);if(g!==f||!Gf(t.node,u)){f=g;let m={[l]:h};as(t.node,m),u=Kf(t.node,m)}}else f=void 0,u=null,t.node.style[l]=""}finally{p&&rt()}},{depth:r.path.length,label:ut(r,l)});r.__effects.push(d),r.__exec[i]=a}}if(typeof t.html=="function"){let i=t.html,a=jt(t,t.htmlDeps,i),c=K(()=>{let l=t.context?.designSystem;l&&st(l);try{let f=a(t,t.state,t.context);t.node&&f!=null&&typeof f!="function"&&(t.node.innerHTML=f)}finally{l&&rt()}},{depth:r.path.length,label:ut(r,"html")});r.__effects.push(c),r.__exec.html=i}if(typeof t.value=="function"){let i=t.value,a=jt(t,t.valueDeps,i),c=K(()=>{try{let l=a(t,t.state,t.context);typeof l=="string"&&l.includes("{{")&&(l=Dt.call(t,l,t.state)),gS(t,l)}catch(l){he(r,"value",l)}},{depth:r.path.length,label:ut(r,"value")});r.__effects.push(c),r.__exec.value=i}else if(typeof t.value=="string"&&t.value.includes("{{")){let i=t.value,a=K(()=>{try{gS(t,Dt.call(t,i,t.state))}catch(c){he(r,"value",c)}},{depth:r.path.length,label:ut(r,"value")});r.__effects.push(a),r.__exec.value=i}if(typeof t.style=="function"){let i=t.style,a=jt(t,t.styleDeps,i),c,l=null,f=K(()=>{let u=a(t,t.state,t.context),d=Yf(u);(d===null||d!==c||!Gf(t.node,l))&&(c=d,as(t.node,u),l=Kf(t.node,u))},{depth:r.path.length,label:ut(r,"style")});r.__effects.push(f),r.__exec.style=i}else if(t.style&&typeof t.style=="object")for(let i in t.style){let a=t.style[i];if(typeof a!="function")continue;let c=jt(t,za(t.styleDeps,i),a),l,f=null,u=K(()=>{try{let d=c(t,t.state,t.context);if(t.node){let p=i+":"+String(d);if(p!==l||!Gf(t.node,f)){l=p;let h={[i]:d};as(t.node,h),f=Kf(t.node,h)}}}catch(d){he(r,"style."+i,d)}},{depth:r.path.length,label:ut(r,"style."+i)});r.__effects.push(u)}if(t.attr&&typeof t.attr=="object"){for(let i in t.attr)if(typeof t.attr[i]=="function"){let a=jt(t,za(t.attrDeps,i),t.attr[i]),c=i,l=K(()=>{try{let f=a(t,t.state,t.context);typeof f=="string"&&f.includes("{{")&&(f=Dt.call(t,f,t.state)),t.node?.setAttribute&&(f==null||f===!1&&!rr(c)?t.node.removeAttribute(c):typeof f!="function"&&typeof f!="object"&&t.node.setAttribute(c,Qt(c,f)))}catch(f){he(r,"attr."+c,f)}},{depth:r.path.length,label:ut(r,"attr."+c)});l._attrName=c.toLowerCase(),r.__effects.push(l)}else if(typeof t.attr[i]=="string"&&t.attr[i].includes("{{")){let a=t.attr[i],c=i,l=K(()=>{try{let f=Dt.call(t,a,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(c,Qt(c,f??""))}catch(f){he(r,"attr."+c,f)}},{depth:r.path.length,label:ut(r,"attr."+c)});l._attrName=c.toLowerCase(),r.__effects.push(l)}}if(t.aria&&typeof t.aria=="object")for(let i in t.aria){let a=t.aria[i];if(typeof a=="string"&&a.includes("{{")){let u=a,d="aria-"+i.replace(/[A-Z]/g,h=>"-"+h.toLowerCase()),p=K(()=>{try{let h=Dt.call(t,u,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(d,Qt(d,h??""))}catch(h){he(r,"aria."+i,h)}},{depth:r.path.length,label:ut(r,"aria."+i)});p._attrName=d,r.__effects.push(p);continue}if(typeof a!="function")continue;let c=jt(t,za(t.ariaDeps,i),t.aria[i]),l="aria-"+i.replace(/[A-Z]/g,u=>"-"+u.toLowerCase()),f=K(()=>{try{let u=c(t,t.state,t.context);if(!t.node?.setAttribute)return;u==null?t.node.removeAttribute(l):typeof u!="function"&&typeof u!="object"&&t.node.setAttribute(l,Qt(l,u))}catch(u){he(r,"aria."+i,u)}},{depth:r.path.length,label:ut(r,"aria."+i)});f._attrName=l,r.__effects.push(f)}if(t.data&&typeof t.data=="object")for(let i in t.data){let a=t.data[i];if(typeof a=="string"&&a.includes("{{")){let d=a,p="data-"+i.replace(/[A-Z]/g,g=>"-"+g.toLowerCase()),h=K(()=>{try{let g=Dt.call(t,d,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(p,g??"")}catch(g){he(r,"data."+i,g)}},{depth:r.path.length,label:ut(r,"data."+i)});h._attrName=p,r.__effects.push(h);continue}if(typeof a!="function")continue;let c=jt(t,za(t.dataDeps,i),t.data[i]),f="data-"+i.replace(/[A-Z]/g,d=>"-"+d.toLowerCase()),u=K(()=>{try{let d=c(t,t.state,t.context);if(!t.node?.setAttribute)return;d==null||d===!1?t.node.removeAttribute(f):typeof d!="function"&&typeof d!="object"&&t.node.setAttribute(f,d===!0?"":d)}catch(d){he(r,"data."+i,d)}},{depth:r.path.length,label:ut(r,"data."+i)});u._attrName=f,r.__effects.push(u)}let o=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(o)for(let i in o){if(typeof o[i]!="function")continue;let a=jt(t,za(t.classDeps,i),o[i]),c=K(()=>{try{let l=a(t,t.state,t.context);if(!t.node?.classList)return;typeof l=="string"?t.node.classList.add(l):l?t.node.classList.add(i):t.node.classList.remove(i)}catch(l){he(r,"class."+i,l)}},{depth:r.path.length,label:ut(r,"class."+i)});r.__effects.push(c)}!n&&typeof t.if=="function"&&ES(t,r,t.if);for(let i of Object.keys(t)){if(Nt.has(i)||typeof t[i]!="function")continue;let a=i.charCodeAt(0);if(a>=65&&a<=90||Jr(i))continue;let c=t[i];r.__exec[i]=c;let l=t.tag||"div";if(nr(l,i)&&!pt[i]&&!(ht&&ht.has(i))){let f=er(i)||i,u=jt(t,t[i+"Deps"],c),d=K(()=>{try{let p=u(t,t.state,t.context);typeof p=="string"&&p.includes("{{")&&(p=Dt.call(t,p,t.state)),t.node?.setAttribute&&(p==null||p===!1&&!rr(f)?t.node.removeAttribute(f):typeof p!="function"&&typeof p!="object"&&(f==="src"&&"src"in t.node?t.node.src=p:t.node.setAttribute(f,Qt(f,p))))}catch(p){he(r,i,p)}},{depth:r.path.length,label:ut(r,i)});d._attrName=f.toLowerCase(),r.__effects.push(d)}}let s=t.tag||"div";for(let i of Object.keys(t)){if(Nt.has(i))continue;let a=t[i];if(typeof a!="string"||!a.includes("{{"))continue;let c=i.charCodeAt(0);if(c>=65&&c<=90||Jr(i)||pt[i]||ht&&ht.has(i)||Bn[i]||!nr(s,i))continue;let l=er(i)||i,f=K(()=>{try{let u=Dt.call(t,a,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(l,Qt(l,u??""))}catch(u){he(r,i,u)}},{depth:r.path.length,label:ut(r,i)});f._attrName=l.toLowerCase(),r.__effects.push(f)}if(IO(t),MO(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let i=t.onStateUpdate,a=t.stateDeps,c=!1,l=[],f=K(()=>{let u=[];for(let g=0;g<a.length;g++){let m=a[g];try{u[g]=typeof m=="function"?m(t,t.state,t.context):t.state?.[m]}catch{u[g]=void 0}}if(!c){c=!0,l=u;return}let d=u.length!==l.length;for(let g=0;!d&&g<u.length;g++)u[g]!==l[g]&&(d=!0);let p=l;if(l=u,!d)return;let h=t.context?.designSystem;h&&st(h);try{i(t,t.state,t.context,{prev:p,next:u})}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&&rt()}},{depth:r.path.length,label:ut(r,"onStateUpdate")});r.__effects.push(f)}LO(t)}function hS(t){let e=t.parent,r=e?.node;if(!r||!t.node){LS(t,t.parent);return}let n=null,o=Object.keys(e),s=o.indexOf(t.key);for(let i=s+1;i<o.length;i++){let a=e[o[i]];if(a?.node?.parentNode===r){n=a.node;break}}n?r.insertBefore(t.node,n):r.appendChild(t.node)}function ES(t,e,r){let n=jt(t,t.ifDeps,r),o=K(()=>{let s;try{s=n(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();try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(a){console.error("[smbls] onRemove error:",a)}}else if(!i&&e.__if)if(e.__ifInitialized)t.node||(t.node=Kr(t)),t.node&&(t.node.ref=t),hS(t),Qm(t),ee("Render",t,{}),Zm(t,{});else{if(e.__ifInitialized=!0,t.tag||(t.tag=qr(t)),ee("Init",t,{}),t.node||(t.node=Kr(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}ee("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),IS(t,{}),CS(t,{skipIfEffect:!0}),Qm(t),PS(t),$S(t,{}),hS(t),ee("Create",t,{}),ee("Complete",t,{}),ee("Render",t,{}),ee("RenderRouter",t,{}),Zm(t,{})}},{depth:e.path.length,label:ut(e,"if")});e.__effects.push(o)}function ns(t,e){let r=t.node;if(!r)return;let n=e==null||typeof e=="object"?"":String(e);if(t.tag==="string"){r.nodeValue!==n&&(r.nodeValue=n);return}let o=t.__ref,s=o?o.__textNode:null;if(s&&s.parentNode!==r&&(s=null),!s){let i=r.firstChild;i&&i.nodeType===3&&(s=i)}s?s.nodeValue!==n&&(s.nodeValue=n):r.firstChild?(s=(r.ownerDocument||t.context?.document||globalThis.document).createTextNode(n),r.insertBefore(s,r.firstChild)):(r.textContent=n,s=r.firstChild&&r.firstChild.nodeType===3?r.firstChild:null),o&&(o.__textNode=s||null)}function gS(t,e){let r=t.node;if(!r||!("value"in r))return;let n=e==null?"":String(e);if(r.value===n)return;let o=typeof document<"u"&&document.activeElement===r,s=o&&typeof r.selectionStart=="number"?r.selectionStart:null,i=o&&typeof r.selectionEnd=="number"?r.selectionEnd:null;if(r.value=n,o&&s!=null&&i!=null)try{r.setSelectionRange(s,i)}catch{}}function Qm(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&ns(t,t.text),NO(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&!(typeof t.value=="string"&&t.value.includes("{{"))&&"value"in e){let r=String(t.value);e.value!==r&&(e.value=r)}if(t.style&&typeof t.style=="object"){let r=t.style;for(let n in t.style)if(typeof t.style[n]=="function"){r={};for(let o in t.style)typeof t.style[o]!="function"&&(r[o]=t.style[o]);break}as(e,r)}if(t.attr&&typeof t.attr=="object")for(let r in t.attr){let n=t.attr[r];typeof n=="function"||typeof n=="object"||n!=null&&(typeof n=="string"&&n.includes("{{")||n===!1&&!rr(r)||e.setAttribute&&e.setAttribute(r,Qt(r,n)))}if(t.data&&typeof t.data=="object")for(let r in t.data){let n=t.data[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||typeof n=="string"&&n.includes("{{")||e.dataset&&(e.dataset[r]=n===!0?"":n)}if(t.classlist||t.class){let r=t.classlist||t.class;if(typeof r=="string")r.split(" ").forEach(n=>n&&e.classList.add(n));else if(typeof r=="object")for(let n in r){let o=typeof r[n]=="function"?r[n](t,t.state,t.context):r[n];o&&e.classList.add(typeof o=="string"?o:n)}}}}function Yf(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function RO(t){if(!t||typeof t!="object")return!1;for(let e in t){let r=t[e];if(r&&typeof r=="object"&&!Array.isArray(r))return!0}return!1}function Kf(t,e){if(!t||!t.style||!e)return null;let r=t.style,n=[];for(let o in e){if(e[o]==null||o.charAt(0)==="&")continue;let i=o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());n.push(i,AS(r,i),TS(r,i))}return n}function AS(t,e){return typeof t.getPropertyValue=="function"?t.getPropertyValue(e):""}function TS(t,e){return typeof t.getPropertyPriority=="function"?t.getPropertyPriority(e):""}function Gf(t,e){if(!e||!t||!t.style)return!1;let r=t.style;for(let n=0;n<e.length;n+=3)if(AS(r,e[n])!==e[n+1]||TS(r,e[n])!==e[n+2])return!1;return!0}var ty=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45;function as(t,e){if(!t||!e||!t.style)return;let r=null;for(let n in e){let o=e[n];if(o!=null){if(n.charAt(0)==="&"&&typeof o=="object"){r||(r={}),r[n]=o;continue}try{let s=String(o),i=ty(n)?n:n.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&&PO(t,r)}function PO(t,e){let r=`_ds${wS.scopedStyleId++}`;t.classList.add(r);let n=t.ownerDocument,o=n.querySelector("style[data-smbls-scoped]");o||(o=n.createElement("style"),o.setAttribute("data-smbls-scoped",""),n.head.appendChild(o));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 p=l[d];if(typeof p=="object"){let h=d.includes("&")?c.split(", ").map(m=>d.replace(/&/g,m)).join(", "):c.split(", ").map(m=>`${m} ${d}`).join(", "),g="";for(let m in p)g+=`${m.replace(/[A-Z]/g,b=>"-"+b.toLowerCase())}: ${p[m]};`;u+=br(`${h} { ${g} }`,h)+`
55
+ `):"")}}if(Qf(i,!0),VS(i,e,o),typeof i.html=="function"&&i.node&&!i.node.innerHTML){let m=i.context?.designSystem;m&&it(m);try{let b=i.html(i,i.state,i.context);b!=null&&typeof b!="function"&&(i.node.innerHTML=b)}catch{}finally{m&&nt()}}if(ee("Create",i,n),ee("Complete",i,n),ee("Render",i,n),ee("RenderRouter",i,n),ey(i,n),typeof i.onFrame=="function"){let m=i.onFrame,b=i.context?.designSystem,_=()=>{if(i.node){if(i.node.isConnected){b&&it(b);try{m(i,i.state,i.context)}catch(y){console.error("[DOMQL] onFrame error:",y)}finally{b&&nt()}}requestAnimationFrame(_)}};requestAnimationFrame(_)}return i}function BO(t,e,r){let n=!e,o=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=n&&o&&t.context?.state,i=r.state!==void 0&&!s?r.state:t.state&&!_t(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,he(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,p=(m,b)=>{d.has(m)||ur(f,m,c)&&(c[m]=b,d.add(m),Ge(f,m))},h=l.translations[u];if(h&&typeof h=="object")for(let m in h)p(m,h[m]);let g=new Set(l.languages||[]);for(let m in l.translations)g.has(m)||p(m,l.translations[m])}t.state=_t(c)?c:ir(c),t.state.__element=t,t.state.root=t.state,he(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),he(t,t.state);return}if(typeof i=="string"){if(t.state=PS(i,e),t.state&&typeof t.state=="object"&&!_t(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}he(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=_t(a)?a:ir(a||{})}else _t(i)?t.state=i:t.state=ir({...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,he(t,t.state)}function Zm(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function PS(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let o=t.slice(3);return o?Zm(e.state,o):e.state??{}}if(t.startsWith("~/")){let o=e.state?.root||e.state,s=t.slice(2);return s?Zm(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=Zm(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let n=e.context?.polyglot;if(n?.translations){let o=e.state?.root?.lang||n.defaultLang||"en",s=n.translations[o];if(s?.[t]!==void 0)return s[t];if(n.translations[t]!==void 0)return n.translations[t]}return{}}var UO=new Set(["s","state","ctx","context"]);function VO(t){try{let r=Function.prototype.toString.call(t).match(/^[^(]*\(([^)]*)\)/);return r?r[1].split(",").map(n=>n.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function zO(t){if(typeof t!="function"||t.length!==2)return!1;let e=VO(t);if(e.length<2)return!1;let r=e[1].replace(/[{}[\]]/g,"").trim();return r.length>0&&!UO.has(r)}function HO(t){let e=t.__ref,r=t.tag||"div",n=t.context?.designSystem,o=[],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||Jr(a)||pt[a]||ht&&ht.has(a)||nr(r,a)||(Et()&&zO(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).`),o.push({prop:a,fn:t[a]}))}for(let i=0;i<o.length;i++){let{prop:a,fn:c}=o[i];e.__exec[a]=c,Object.defineProperty(t,a,{get(){n&&it(n);try{return c(t,t.state,t.context)}catch{return}finally{n&&nt()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function WO(t,e){if(!(!Array.isArray(e)||e.length===0))for(let r=0;r<e.length;r++){let n=e[r];try{typeof n=="function"?n(t,t.state,t.context):typeof n=="string"&&t.state?.[n]}catch{}}}function Bt(t,e,r){return!Array.isArray(e)||e.length===0?r:function(...n){return WO(t,e),r.apply(this,n)}}function Wa(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function ut(t,e){return()=>t.path.join(".")+"::"+e}var xS=new Set;function ge(t,e,r){if(!Et())return;let n=ut(t,e)();xS.has(n)||(xS.add(n),console.warn(`[smbls] "${e}" effect threw on ${t.path.join(".")} \u2014 keeping previous value:`,r?.message||r))}function DS(t,e){let r=t.__ref,n=!!(e&&e.skipIfEffect);if(HO(t),typeof t.text=="function"){let i=t.text,a=Bt(t,t.textDeps,i),c=K(()=>{if(!r.contentManaged)try{let l=a(t,t.state,t.context);t.node&&l!=null&&typeof l!="function"&&typeof l!="object"&&(typeof l=="string"&&l.includes("{{")&&(l=It.call(t,l,t.state)),os(t,l))}catch(l){ge(r,"text",l)}},{depth:r.path.length,label:ut(r,"text")});r.__effects.push(c),r.__exec.text=i}else if(typeof t.text=="string"&&t.text.includes("{{")){let i=t.text,a=K(()=>{if(r.contentManaged)return;let c=It.call(t,i,t.state);c!=null&&(t.text=c),t.node&&os(t,c??"")},{depth:r.path.length,label:ut(r,"text")});r.__effects.push(a),r.__exec.text=i}for(let i of Object.keys(t))if(typeof t[i]=="function"&&!jt.has(i)&&!Jr(i)&&!r.__exec[i]){if(pt[i]){let a=t[i],c=Bt(t,t[i+"Deps"],a),l=i,f,u=null,d=null,p,h=K(()=>{let g=t.context?.designSystem;g&&it(g);try{let m=c(t,t.state,t.context);Nf();let b;try{b=pt[l](m,t,t.state,t.context)}finally{jf()}if(Array.isArray(b)){let y={};for(let x of b)if(x)for(let w in x)y[w]=x[w];b=y}let _=l==="show"||l==="hide";if(b&&t.node&&qO(b)){let y=Zf(b);if(y===null||y!==p){p=y;let x=fe(b,null,t.context?.cssPrefix),w=x?x.split(" ").filter(Boolean):null;if(t.node.classList){if(d)for(let v of d)t.node.classList.remove(v);if(w&&w.length)for(let v of w)t.node.classList.add(v);d=w}}f=void 0,u=null}else if(b&&t.node){if(d){for(let x of d)t.node.classList.remove(x);d=null,p=void 0}let y=Zf(b);(y===null||y!==f||!Xf(t.node,u))&&(f=y,cs(t.node,b),u=Yf(t.node,b))}else if(t.node&&_){f=void 0,u=null;let y=r.__explicitDisplay;t.node.style.display=typeof y=="string"?y:""}}finally{g&&nt()}},{depth:r.path.length,label:ut(r,l)});r.__effects.push(h),r.__exec[i]=a}else if(ht&&ht.has(i)){let a=t[i],c=Bt(t,t[i+"Deps"],a),l=i,f,u=null,d=K(()=>{let p=t.context?.designSystem;p&&it(p);try{let h=c(t,t.state,t.context);if(t.node)if(h!=null){let g=l+":"+String(h);if(g!==f||!Xf(t.node,u)){f=g;let m={[l]:h};cs(t.node,m),u=Yf(t.node,m)}}else f=void 0,u=null,t.node.style[l]=""}finally{p&&nt()}},{depth:r.path.length,label:ut(r,l)});r.__effects.push(d),r.__exec[i]=a}}if(typeof t.html=="function"){let i=t.html,a=Bt(t,t.htmlDeps,i),c=K(()=>{let l=t.context?.designSystem;l&&it(l);try{let f=a(t,t.state,t.context);t.node&&f!=null&&typeof f!="function"&&(t.node.innerHTML=f)}finally{l&&nt()}},{depth:r.path.length,label:ut(r,"html")});r.__effects.push(c),r.__exec.html=i}if(typeof t.value=="function"){let i=t.value,a=Bt(t,t.valueDeps,i),c=K(()=>{try{let l=a(t,t.state,t.context);typeof l=="string"&&l.includes("{{")&&(l=It.call(t,l,t.state)),SS(t,l)}catch(l){ge(r,"value",l)}},{depth:r.path.length,label:ut(r,"value")});r.__effects.push(c),r.__exec.value=i}else if(typeof t.value=="string"&&t.value.includes("{{")){let i=t.value,a=K(()=>{try{SS(t,It.call(t,i,t.state))}catch(c){ge(r,"value",c)}},{depth:r.path.length,label:ut(r,"value")});r.__effects.push(a),r.__exec.value=i}if(typeof t.style=="function"){let i=t.style,a=Bt(t,t.styleDeps,i),c,l=null,f=K(()=>{let u=a(t,t.state,t.context),d=Zf(u);(d===null||d!==c||!Xf(t.node,l))&&(c=d,cs(t.node,u),l=Yf(t.node,u))},{depth:r.path.length,label:ut(r,"style")});r.__effects.push(f),r.__exec.style=i}else if(t.style&&typeof t.style=="object")for(let i in t.style){let a=t.style[i];if(typeof a!="function")continue;let c=Bt(t,Wa(t.styleDeps,i),a),l,f=null,u=K(()=>{try{let d=c(t,t.state,t.context);if(t.node){let p=i+":"+String(d);if(p!==l||!Xf(t.node,f)){l=p;let h={[i]:d};cs(t.node,h),f=Yf(t.node,h)}}}catch(d){ge(r,"style."+i,d)}},{depth:r.path.length,label:ut(r,"style."+i)});r.__effects.push(u)}if(t.attr&&typeof t.attr=="object"){for(let i in t.attr)if(typeof t.attr[i]=="function"){let a=Bt(t,Wa(t.attrDeps,i),t.attr[i]),c=i,l=K(()=>{try{let f=a(t,t.state,t.context);typeof f=="string"&&f.includes("{{")&&(f=It.call(t,f,t.state)),t.node?.setAttribute&&(f==null||f===!1&&!rr(c)?t.node.removeAttribute(c):typeof f!="function"&&typeof f!="object"&&t.node.setAttribute(c,Qt(c,f)))}catch(f){ge(r,"attr."+c,f)}},{depth:r.path.length,label:ut(r,"attr."+c)});l._attrName=c.toLowerCase(),r.__effects.push(l)}else if(typeof t.attr[i]=="string"&&t.attr[i].includes("{{")){let a=t.attr[i],c=i,l=K(()=>{try{let f=It.call(t,a,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(c,Qt(c,f??""))}catch(f){ge(r,"attr."+c,f)}},{depth:r.path.length,label:ut(r,"attr."+c)});l._attrName=c.toLowerCase(),r.__effects.push(l)}}if(t.aria&&typeof t.aria=="object")for(let i in t.aria){let a=t.aria[i];if(typeof a=="string"&&a.includes("{{")){let u=a,d="aria-"+i.replace(/[A-Z]/g,h=>"-"+h.toLowerCase()),p=K(()=>{try{let h=It.call(t,u,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(d,Qt(d,h??""))}catch(h){ge(r,"aria."+i,h)}},{depth:r.path.length,label:ut(r,"aria."+i)});p._attrName=d,r.__effects.push(p);continue}if(typeof a!="function")continue;let c=Bt(t,Wa(t.ariaDeps,i),t.aria[i]),l="aria-"+i.replace(/[A-Z]/g,u=>"-"+u.toLowerCase()),f=K(()=>{try{let u=c(t,t.state,t.context);if(!t.node?.setAttribute)return;u==null?t.node.removeAttribute(l):typeof u!="function"&&typeof u!="object"&&t.node.setAttribute(l,Qt(l,u))}catch(u){ge(r,"aria."+i,u)}},{depth:r.path.length,label:ut(r,"aria."+i)});f._attrName=l,r.__effects.push(f)}if(t.data&&typeof t.data=="object")for(let i in t.data){let a=t.data[i];if(typeof a=="string"&&a.includes("{{")){let d=a,p="data-"+i.replace(/[A-Z]/g,g=>"-"+g.toLowerCase()),h=K(()=>{try{let g=It.call(t,d,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(p,g??"")}catch(g){ge(r,"data."+i,g)}},{depth:r.path.length,label:ut(r,"data."+i)});h._attrName=p,r.__effects.push(h);continue}if(typeof a!="function")continue;let c=Bt(t,Wa(t.dataDeps,i),t.data[i]),f="data-"+i.replace(/[A-Z]/g,d=>"-"+d.toLowerCase()),u=K(()=>{try{let d=c(t,t.state,t.context);if(!t.node?.setAttribute)return;d==null||d===!1?t.node.removeAttribute(f):typeof d!="function"&&typeof d!="object"&&t.node.setAttribute(f,d===!0?"":d)}catch(d){ge(r,"data."+i,d)}},{depth:r.path.length,label:ut(r,"data."+i)});u._attrName=f,r.__effects.push(u)}let o=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(o)for(let i in o){if(typeof o[i]!="function")continue;let a=Bt(t,Wa(t.classDeps,i),o[i]),c=K(()=>{try{let l=a(t,t.state,t.context);if(!t.node?.classList)return;typeof l=="string"?t.node.classList.add(l):l?t.node.classList.add(i):t.node.classList.remove(i)}catch(l){ge(r,"class."+i,l)}},{depth:r.path.length,label:ut(r,"class."+i)});r.__effects.push(c)}!n&&typeof t.if=="function"&&IS(t,r,t.if);for(let i of Object.keys(t)){if(jt.has(i)||typeof t[i]!="function")continue;let a=i.charCodeAt(0);if(a>=65&&a<=90||Jr(i))continue;let c=t[i];r.__exec[i]=c;let l=t.tag||"div";if(nr(l,i)&&!pt[i]&&!(ht&&ht.has(i))){let f=er(i)||i,u=Bt(t,t[i+"Deps"],c),d=K(()=>{try{let p=u(t,t.state,t.context);typeof p=="string"&&p.includes("{{")&&(p=It.call(t,p,t.state)),t.node?.setAttribute&&(p==null||p===!1&&!rr(f)?t.node.removeAttribute(f):typeof p!="function"&&typeof p!="object"&&(f==="src"&&"src"in t.node?t.node.src=p:t.node.setAttribute(f,Qt(f,p))))}catch(p){ge(r,i,p)}},{depth:r.path.length,label:ut(r,i)});d._attrName=f.toLowerCase(),r.__effects.push(d)}}let s=t.tag||"div";for(let i of Object.keys(t)){if(jt.has(i))continue;let a=t[i];if(typeof a!="string"||!a.includes("{{"))continue;let c=i.charCodeAt(0);if(c>=65&&c<=90||Jr(i)||pt[i]||ht&&ht.has(i)||Bn[i]||!nr(s,i))continue;let l=er(i)||i,f=K(()=>{try{let u=It.call(t,a,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(l,Qt(l,u??""))}catch(u){ge(r,i,u)}},{depth:r.path.length,label:ut(r,i)});f._attrName=l.toLowerCase(),r.__effects.push(f)}if(YO(t),JO(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let i=t.onStateUpdate,a=t.stateDeps,c=!1,l=[],f=K(()=>{let u=[];for(let g=0;g<a.length;g++){let m=a[g];try{u[g]=typeof m=="function"?m(t,t.state,t.context):t.state?.[m]}catch{u[g]=void 0}}if(!c){c=!0,l=u;return}let d=u.length!==l.length;for(let g=0;!d&&g<u.length;g++)u[g]!==l[g]&&(d=!0);let p=l;if(l=u,!d)return;let h=t.context?.designSystem;h&&it(h);try{i(t,t.state,t.context,{prev:p,next:u})}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&&nt()}},{depth:r.path.length,label:ut(r,"onStateUpdate")});r.__effects.push(f)}ZO(t)}function wS(t){let e=t.parent,r=e?.node;if(!r||!t.node){VS(t,t.parent);return}let n=null,o=Object.keys(e),s=o.indexOf(t.key);for(let i=s+1;i<o.length;i++){let a=e[o[i]];if(a?.node?.parentNode===r){n=a.node;break}}n?r.insertBefore(t.node,n):r.appendChild(t.node)}function IS(t,e,r){let n=Bt(t,t.ifDeps,r),o=K(()=>{let s;try{s=n(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();try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(a){console.error("[smbls] onRemove error:",a)}}else if(!i&&e.__if)if(e.__ifInitialized)t.node||(t.node=Kr(t)),t.node&&(t.node.ref=t),wS(t),ny(t),ee("Render",t,{}),ey(t,{});else{if(e.__ifInitialized=!0,t.tag||(t.tag=qr(t)),ee("Init",t,{}),t.node||(t.node=Kr(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}ee("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),BS(t,{}),DS(t,{skipIfEffect:!0}),ny(t),NS(t),US(t,{}),wS(t),ee("Create",t,{}),ee("Complete",t,{}),ee("Render",t,{}),ee("RenderRouter",t,{}),ey(t,{})}},{depth:e.path.length,label:ut(e,"if")});e.__effects.push(o)}function os(t,e){let r=t.node;if(!r)return;let n=e==null||typeof e=="object"?"":String(e);if(t.tag==="string"){r.nodeValue!==n&&(r.nodeValue=n);return}let o=t.__ref,s=o?o.__textNode:null;if(s&&s.parentNode!==r&&(s=null),!s){let i=r.firstChild;i&&i.nodeType===3&&(s=i)}s?s.nodeValue!==n&&(s.nodeValue=n):r.firstChild?(s=(r.ownerDocument||t.context?.document||globalThis.document).createTextNode(n),r.insertBefore(s,r.firstChild)):(r.textContent=n,s=r.firstChild&&r.firstChild.nodeType===3?r.firstChild:null),o&&(o.__textNode=s||null)}function SS(t,e){let r=t.node;if(!r||!("value"in r))return;let n=e==null?"":String(e);if(r.value===n)return;let o=typeof document<"u"&&document.activeElement===r,s=o&&typeof r.selectionStart=="number"?r.selectionStart:null,i=o&&typeof r.selectionEnd=="number"?r.selectionEnd:null;if(r.value=n,o&&s!=null&&i!=null)try{r.setSelectionRange(s,i)}catch{}}function ny(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&os(t,t.text),tR(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&!(typeof t.value=="string"&&t.value.includes("{{"))&&"value"in e){let r=String(t.value);e.value!==r&&(e.value=r)}if(t.style&&typeof t.style=="object"){let r=t.style;for(let n in t.style)if(typeof t.style[n]=="function"){r={};for(let o in t.style)typeof t.style[o]!="function"&&(r[o]=t.style[o]);break}cs(e,r)}if(t.attr&&typeof t.attr=="object")for(let r in t.attr){let n=t.attr[r];typeof n=="function"||typeof n=="object"||n!=null&&(typeof n=="string"&&n.includes("{{")||n===!1&&!rr(r)||e.setAttribute&&e.setAttribute(r,Qt(r,n)))}if(t.data&&typeof t.data=="object")for(let r in t.data){let n=t.data[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||typeof n=="string"&&n.includes("{{")||e.dataset&&(e.dataset[r]=n===!0?"":n)}if(t.classlist||t.class){let r=t.classlist||t.class;if(typeof r=="string")r.split(" ").forEach(n=>n&&e.classList.add(n));else if(typeof r=="object")for(let n in r){let o=typeof r[n]=="function"?r[n](t,t.state,t.context):r[n];o&&e.classList.add(typeof o=="string"?o:n)}}}}function Zf(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function qO(t){if(!t||typeof t!="object")return!1;for(let e in t){let r=t[e];if(r&&typeof r=="object"&&!Array.isArray(r))return!0}return!1}function Yf(t,e){if(!t||!t.style||!e)return null;let r=t.style,n=[];for(let o in e){if(e[o]==null||o.charAt(0)==="&")continue;let i=o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());n.push(i,$S(r,i),LS(r,i))}return n}function $S(t,e){return typeof t.getPropertyValue=="function"?t.getPropertyValue(e):""}function LS(t,e){return typeof t.getPropertyPriority=="function"?t.getPropertyPriority(e):""}function Xf(t,e){if(!e||!t||!t.style)return!1;let r=t.style;for(let n=0;n<e.length;n+=3)if($S(r,e[n])!==e[n+1]||LS(r,e[n])!==e[n+2])return!1;return!0}var oy=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45;function cs(t,e){if(!t||!e||!t.style)return;let r=null;for(let n in e){let o=e[n];if(o!=null){if(n.charAt(0)==="&"&&typeof o=="object"){r||(r={}),r[n]=o;continue}try{let s=String(o),i=oy(n)?n:n.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&&KO(t,r)}function KO(t,e){let r=`_ds${TS.scopedStyleId++}`;t.classList.add(r);let n=t.ownerDocument,o=n.querySelector("style[data-smbls-scoped]");o||(o=n.createElement("style"),o.setAttribute("data-smbls-scoped",""),n.head.appendChild(o));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 p=l[d];if(typeof p=="object"){let h=d.includes("&")?c.split(", ").map(m=>d.replace(/&/g,m)).join(", "):c.split(", ").map(m=>`${m} ${d}`).join(", "),g="";for(let m in p)g+=`${m.replace(/[A-Z]/g,b=>"-"+b.toLowerCase())}: ${p[m]};`;u+=br(`${h} { ${g} }`,h)+`
56
56
  `}else f+=`${d.replace(/[A-Z]/g,h=>"-"+h.toLowerCase())}: ${p};`}f&&(s+=br(`${c} { ${f} }`,c)+`
57
- `),u&&(s+=u)}}s&&(o.textContent+=s)}var mS=new Set;function yS(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 DO(t,e,r){let n=yS(r);queueMicrotask(()=>{if(!t.__ref)return;let o;try{o=e(t,t.state,t.context)}catch{return}if(yS(o)===n)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";mS.has(s)||(mS.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(o)?o.join(", "):String(o)}]. 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 IO(t){let e=t.subscribeTo,r=typeof e=="function",n=e;if(r)try{n=e(t,t.state,t.context)}catch{n=null}if(r&&Et()&&DO(t,e,Array.isArray(n)?n:[]),!Array.isArray(n)||n.length===0)return;let o=t.__ref;for(let s=0;s<n.length;s++){let i=n[s];if(typeof i!="string"||i.length===0)continue;let a=i.split("."),c=a[0],l=a.slice(1),f={value:!1},u=K(()=>{let d=t.state&&(bt(t.state)?t.state.root:null);if(!d||!bt(d))return;let p=d;p=p[c];for(let g=0;g<l.length&&!(p==null||typeof p!="object");g++)if(bt(p))p=p[l[g]];else break;if(!f.value)return;let h=!1;if(typeof t.onBeforeUpdate=="function"){let g=t.context?.designSystem;g&&st(g);try{if(km(o)){let m=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});m&&typeof m.then=="function"?m.then(()=>_r(o,!1),b=>{_r(o,!0),t.context?.plugins?.length&&At("error",t,{hook:"onBeforeUpdate",error:b})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",b)}):(_r(o,!1),m===!1&&(h=!0))}}catch(m){_r(o,!0),t.context?.plugins?.length&&At("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}finally{g&&rt()}}if(!h&&t.node&&o.__effects)for(let g=0;g<o.__effects.length;g++){let m=o.__effects[g];m&&m!==u&&!m._disposed&&!m._isSubscribeToEffect&&typeof m._execute=="function"&&m._execute()}if(!h&&typeof t.onUpdate=="function"){let g=t.context?.designSystem;g&&st(g);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{g&&rt()}}},{depth:o.path.length,label:ut(o,"subscribeTo("+i+")")});f.value=!0,u._isSubscribeToEffect=!0,o.__effects.push(u)}}function oy(t,e){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&!t.startsWith("@container")&&(t==="@dark"||t==="@light"||!e.context?.designSystem?.media?.[t.slice(1)])}function sy(t,e){if(t.charCodeAt(0)!==64||/^@(media|supports|container|keyframes)\b/.test(t))return t;let r=e.context?.designSystem?.media?.[t.slice(1)];return r?/^@(media|supports|container)\b/.test(r)?r:`@media ${r}`:t}var bS=new Set;function $O(t,e){let r=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",n=r+"::"+t;bS.has(n)||(bS.add(n),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 cs(t,e,r){let n={},o=new Set,s=(i,a,c)=>{let l=c?new Set(Object.keys(n)):null;if(pt[i]){let f=pt[i](a,e,e.state,e.context);if(f){let u=Array.isArray(f)?f:[f];for(let d of u)d&&Object.assign(n,d)}}else n[i]=a;if(c)for(let f in n)l.has(f)||o.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 p=typeof e[u]=="function"&&(pt[u]||ht&&ht.has(u));s(u,d,p)}continue}if(oy(i,e)){let u=cs(a,e,!1);Object.keys(u).length&&(n[`[data-theme="${i.slice(1)}"] &`]=u);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(i)){Et()&&$O(i,e);continue}let l=sy(i,e),f=cs(a,e,!1);Object.keys(f).length&&(n[l]=f);continue}let c=typeof e[i]=="function"&&(pt[i]||ht&&ht.has(i));s(i,a,c)}if(r)for(let i in n)o.add(i);for(let i of o){let a=n[i];typeof a=="string"&&!a.includes("!important")&&(n[i]=a+" !important")}return n}function iy(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)&&iy(t[r],e+1))return!0}return!1}function OS(t,e,r){if(!e||typeof e!="object"||Array.isArray(e))return null;if(oy(t,r)){let s=cs(e,r,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let n=sy(t,r),o=cs(e,r,!1);return Object.keys(o).length?{cssProp:n,block:o}:null}function LO(t){let e=t.__ref;for(let r of Object.keys(t)){if(!Jm(r))continue;let n=t[r];if(!n||typeof n!="object"||Array.isArray(n)||!iy(n))continue;let o=null,s,i=K(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&st(a);let c,l=!1;try{let f=OS(r,n,t),u=f?Yf(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=le({[f.cssProp]:f.block},null,t.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&rt()}if(!(l||!t.node.classList)){if(o)for(let f of o)t.node.classList.remove(f);if(c&&c.length)for(let f of c)t.node.classList.add(f);o=c}},{depth:e.path.length,label:ut(e,"cssBlock("+r+")")});e.__effects.push(i)}}function MO(t){let e=t.__ref;e.__conditionalRunners=[];let r=new Map;for(let n of Object.keys(t)){let o=n.charAt(0);if(o!=="."&&o!=="!")continue;let s=n.slice(1);if(!s)continue;if(/[:@\s>~+[\]]/.test(s)){if(typeof console<"u"&&console.warn){let p=s.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${n}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${o}\` is read as one prop name. Nest the selector inside instead: \`${o}${p}: { '${s.slice(p.length)}': {...} }\`.`)}continue}let i=t[n];if(!i||typeof i!="object")continue;let a=o==="!",c={lastMatch:!1,appliedKeys:null,appliedClasses:null},l=()=>{let p,h=t[s];if(h===void 0){let b=!!t.state&&s in t.state,_=t.state?t.state[s]:void 0;if(b||_!==void 0)p=_;else{let y=t.context?.cases?.[s];if(y===void 0)return;try{p=typeof y=="function"?y.call(t,t):y}catch(x){p=!1,e.__conditionalError=x,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${n}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,x?.message||x)}}}else if(typeof h=="function")try{p=h(t,t.state,t.context)}catch(b){p=!1,e.__conditionalError=b,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${n}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,b?.message||b)}else p=h;let g=a?!p:!!p;if(!t.node||g===c.lastMatch)return;c.lastMatch=g;let m=t.context?.designSystem;m&&st(m);try{if(g){let b={},_={},y=!1;for(let w in i){if(!Object.prototype.hasOwnProperty.call(i,w))continue;let v=i[w],D=w.charAt(0);if((D===":"||D==="@"||D==="&"||D==="[")&&v&&typeof v=="object"&&!Array.isArray(v)){if(oy(w,t)){let T=cs(v,t,!1);Object.keys(T).length&&(_[`[data-theme="${w.slice(1)}"] &`]=T,y=!0)}else{let T=sy(w,t),R=cs(v,t,!1);Object.keys(R).length&&(_[T]=R,y=!0)}continue}let L=typeof v=="function"?v(t,t.state,t.context):v;if(L!=null)if(pt[w]){let T=pt[w](L,t,t.state,t.context);if(T){let R=Array.isArray(T)?T:[T];for(let V of R)V&&Object.assign(b,V)}}else(ht&&ht.has(w)||ty(w))&&(b[w]=L)}let x=Object.keys(b);if(x.length){as(t.node,b);for(let w of x)r.set(w,n);c.appliedKeys=x}else c.appliedKeys=null;if(y){let w=le(_,null,t.context?.cssPrefix),v=w?w.split(" ").filter(Boolean):[];if(v.length&&t.node.classList){for(let D of v)t.node.classList.add(D);c.appliedClasses=v}else c.appliedClasses=null}else if(c.appliedClasses){for(let w of c.appliedClasses)t.node.classList.remove(w);c.appliedClasses=null}}else{if(c.appliedKeys){for(let b of c.appliedKeys)r.get(b)===n&&(ty(b)?t.node.style.removeProperty(b):t.node.style[b]="",r.delete(b));c.appliedKeys=null}if(c.appliedClasses){for(let b of c.appliedClasses)t.node.classList.remove(b);c.appliedClasses=null}}}finally{m&&rt()}};e.__conditionalRunners.push(l);let f=jt(t,t[s+"Deps"],l),u=K(f,{depth:e.path.length,label:ut(e,"conditional("+n+")")}),d=e.__exec&&e.__exec[s]||t[s];u._sources.size===0&&typeof d=="function"&&Et()&&console.warn(`[smbls] conditional \`${n}\` on ${t.key||"?"} subscribed to nothing \u2014 its predicate tracked no reactive read on its first run, so no state write will ever re-evaluate it (only a direct element.update() on this element re-runs it). If the predicate guards its state reads (\`in\`, short-circuits, \`?.\`), declare \`${s}Deps: [...]\` (state-key strings or \`(el, s) => \u2026\` selectors) so the subscription is armed unconditionally.`),e.__effects.push(u)}}var Gm=new WeakSet;function FO(t){let e=t.ownerDocument;!e||Gm.has(e)||(Gm.add(e),queueMicrotask(()=>{Gm.delete(e);let r=e.body||e.documentElement;r&&r.offsetWidth}))}var Ym=new WeakSet,_S=!1;function xS(t){return t.startsWith("[data-theme=")||t.startsWith("@media")&&t.includes("prefers-color-scheme")}function ey(t,e){let r={...t};for(let n in e){let o=e[n],s=r[n];r[n]=o&&typeof o=="object"&&s&&typeof s=="object"?ey(s,o):o}return r}function RS(t,e){let r={};for(let n in t){let o=t[n];if(o&&typeof o=="object"){let s=RS(o,e);Object.keys(s).length&&(r[n]=s)}else e.has(n)||(r[n]=o)}return r}function NO(t){let{node:e}=t;if(!e)return;if(_S||(_S=!0,le({display:"none"})),Ym.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}Ym.add(t);let r=t.context?.designSystem;r&&st(r),Mf();try{let n={},o=!1,s=null,i=null,a=null,c=(l,f)=>{if(f&&typeof f=="object"&&xS(l)){i||(i={});let u=i[l];u&&(f=ey(u,f)),i[l]=f}else(f===null||typeof f!="object")&&(a||(a=new Set),a.add(l));n[l]=f};if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&pt.theme){let l=pt.theme(t.theme,t,t.state,t.context);if(l){let f=u=>{for(let d in u){let p=u[d];p&&typeof p=="object"&&xS(d)&&(s||(s={}),s[d]=p),n[d]=p}};if(Array.isArray(l))for(let u of l)u&&f(u);else f(l);o=!0}}for(let l of Object.keys(t)){if(typeof t[l]=="function"||Nt.has(l)||l==="theme")continue;let f=l.charCodeAt(0);if(!(f>=65&&f<=90)&&!Jr(l)){if(pt[l]){let u=t[l],d=pt[l](u,t,t.state,t.context);if(d){if(Array.isArray(d)){for(let p of d)if(p)for(let h in p)c(h,p[h])}else for(let p in d)c(p,d[p]);o=!0}}else if(ht&&ht.has(l)){let u=t[l];u!=null&&typeof u!="object"&&(c(l,u),o=!0)}else if(l.charCodeAt(0)===45){let u=t[l];u!=null&&typeof u!="object"&&(c(l,u),o=!0)}else if(l.charAt(0)==="&"||l.charAt(0)==="@"||l.charAt(0)===":"||l.charAt(0)==="["){let u=t[l];if(u&&typeof u=="object"&&!Array.isArray(u)){if(iy(u))continue;let d=OS(l,u,t);d&&(c(d.cssProp,d.block),o=!0)}}}}if(s)for(let l in s){let f=a?RS(s[l],a):s[l];i&&i[l]&&(f=ey(f,i[l])),Object.keys(f).length?n[l]=f:delete n[l]}if(o){n.display&&String(n.display).includes("!important")&&(e.style.setProperty("display",String(n.display).replace(/\s*!important\s*$/,""),"important"),delete n.display);let l=le(n,null,t.context?.cssPrefix);if(l&&e.classList){let u=l.split(" ").filter(Boolean),d=!1;for(let p of u)e.classList.add(p),d||(p.charCodeAt(0)===95&&p.charCodeAt(1)===99||p.charCodeAt(0)===95&&p.indexOf("_c",1)!==-1)&&(d=!0);d&&FO(e)}let f=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(f!=null){let u=n.display;if(u&&u!==f)if(f==="none"){let d=[];for(let p of e.classList)p.startsWith("_d-")&&p!=="_d-none"&&d.push(p);for(let p of d)e.classList.remove(p);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{Ff(),r&&rt(),Ym.delete(t)}}function PS(t){let{node:e}=t;if(!e||!e.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let s=t.aria[o];if(typeof s=="function"||typeof s=="object"||s==null||typeof s=="string"&&s.includes("{{"))continue;let i="aria-"+o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());e.setAttribute(i,Qt(i,s))}let r=Sm(t);for(let o in r){let s=r[o];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(o,s===!0?"":s)}let n=t.tag||"div";for(let o of Object.keys(t)){if(typeof t[o]=="function"||Nt.has(o)||o==="on"||r[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!Jr(o)&&!(pt[o]||ht&&ht.has(o))&&nr(n,o)){let i=t[o];if(i==null)continue;if(typeof i=="string"&&i.includes("{{")){if(!Bn[o])continue;i=Dt.call(t,i,t.state)}if(i==null||typeof i=="function"||typeof i=="object"||i===!1&&!rr(er(o)||o))continue;let a=er(o)||o;e.setAttribute(a,Qt(a,i))}}}function Ww(t,e){let{node:r}=t;if(!r||!r.setAttribute)return;let n=e.charCodeAt(0);if(n>=65&&n<=90||Jr(e)||pt[e]||ht&&ht.has(e)||!nr(t.tag||"div",e))return;let o=er(e)||e,s=o.toLowerCase(),i=t.__ref&&t.__ref.__effects,a=!1;if(i)for(let f=0;f<i.length;f++){let u=i[f];u&&u._attrName===s&&!u._disposed&&typeof u._execute=="function"&&(a=!0,u._execute())}if(a)return;let c=t[e],l=Bn[e];if(l&&c!=null){let f=l(t);f!==void 0&&(c=f)}typeof c=="string"&&c.includes("{{")&&(c=Dt.call(t,c,t.state)),c==null||c===!1&&!rr(o)?r.removeAttribute(o):typeof c!="function"&&typeof c!="object"&&r.setAttribute(o,Qt(o,c))}function jO(t,e){let r=t.node,n=t.__ref,o=n.__autoGrow;if(!e){if(o&&o.active){try{r.removeEventListener("input",o.resize)}catch{}r.style.height="",o.appliedMax!=null&&r.style.maxHeight===o.appliedMax&&(r.style.maxHeight=""),o.active=!1,o.appliedMax=null,o.lastMeasure=0}return}o||(o=n.__autoGrow={active:!1,appliedMax:null,lastMeasure:0,resize:()=>{if(r.scrollHeight===0&&o.lastMeasure>0)return;r.style.height="auto";let i=r.scrollHeight;r.style.height=i+"px",i>0&&(o.lastMeasure=i)}},n.__eventCleanup||(n.__eventCleanup=[]),n.__eventCleanup.push(()=>{try{r.removeEventListener("input",o.resize)}catch{}})),o.active||(r.addEventListener("input",o.resize),o.active=!0);let s=typeof e=="object"&&e.max!=null?String(e.max):null;s!==o.appliedMax&&(s==null?o.appliedMax!=null&&r.style.maxHeight===o.appliedMax&&(r.style.maxHeight=""):r.style.maxHeight=s,o.appliedMax=s),o.resize()}function BO(t){if(!t.autoGrow)return;let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let r=t.__ref,n=t.autoGrow,o=typeof n=="function"?jt(t,t.autoGrowDeps,n):null,s=K(()=>{let i=t.autoGrow,a=i;if(typeof i=="function")try{a=(i===n&&o?o:i)(t,t.state,t.context)}catch{a=null}jO(t,a)},{depth:r.path.length,label:ut(r,"autoGrow")});r.__effects||(r.__effects=[]),r.__effects.push(s),o&&(r.__exec.autoGrow=n)}var DS=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function IS(t,e){for(let r of Object.keys(t)){if(!Jr(r)||DS.has(r))continue;let n=Df(r);if(n){If(n,t,t[r]);continue}let o=t[r];if(typeof o=="string"&&/^[A-Za-z_$][\w$]*$/.test(o)){let i=o;o=function(c){return t.call(i,c)}}if(typeof o!="function")continue;let s=SO(r);Gr.has(s)||ts(kO(s),t,o)}UO(t)}function UO(t){let e=t.node;if(!e||!e.addEventListener)return;let r={},n=!1;for(let d of DS){let p=t[d];typeof p=="function"&&(r[d]=p,n=!0)}if(!n)return;let o=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 p=d.touches&&d.touches[0]||d.changedTouches&&d.changedTouches[0];p&&(i=p.clientX,a=p.clientY,c=Date.now(),l=!0)},u=d=>{if(!l)return;l=!1;let p=d.changedTouches&&d.changedTouches[0]||d.touches&&d.touches[0];if(!p)return;let h=p.clientX-i,g=p.clientY-a,m=Date.now()-c;if(m>s)return;let b=Math.abs(h),_=Math.abs(g);if(Math.max(b,_)<o)return;let y;if(b>_*1.2)y=h<0?"left":"right";else if(_>b*1.2)y=g<0?"up":"down";else return;let x="onSwipe"+y.charAt(0).toUpperCase()+y.slice(1),w=r[x],v=r.onSwipe;w&&w.call(t,d,t,t.state,t.context),v&&v.call(t,{direction:y,dx:h,dy:g,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 Ka(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Ka(o,s):r[n]=s}return r}function ry(t,e,r,n){if(!e||!t.node)return;let o=t.childExtends;if(Array.isArray(e)){let s=t.tag==="fragment",i=t.context?.document||globalThis.document,a=s?null:i?.createDocumentFragment();if(!s&&!a)return;let c=t.childProps,l=t.childrenAs,f=m=>{let b=e[m],_=b;(typeof b=="string"||typeof b=="number")&&(b={text:b});let y=c;if(typeof c=="function")try{y=c(t,b)}catch{y=null}if(l==="state"){let w=_;(typeof _=="string"||typeof _=="number")&&(w={value:_,text:_}),b=y?{...y,state:w}:{state:w}}else y&&(b=Ka(y,b));if(o&&!b.ignoreChildExtends)if(b.extends){let w=Array.isArray(b.extends)?b.extends:[b.extends],v=Array.isArray(o)?o:[o];b={...b,extends:[...v,...w]}}else b={...b,extends:o};let x=kS(b?.key,_,m);try{return fe(b,t,x,r)}catch(w){if(typeof console<"u"&&console.error){let v=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${x}" failed to construct at ${v} (initial render, skipping this row):`,w?.message||w)}return null}},u=t.__ref;if(!(n===!0&&!s&&!!u&&(r?.mountYield===!0||t.yieldChildren===!0))){for(let m=0;m<e.length;m++){let b=f(m);!s&&b?.node&&a.appendChild(b.node)}return s||t.node.appendChild(a),!0}let p=u.__childrenChunkGen=(u.__childrenChunkGen||0)+1;jm();let h=null,g=m=>{if(u.__disposed||u.__childrenChunkGen!==p){h&&h.parentNode&&h.remove();return}for(let b=m;b<e.length;b++){let _=f(b);if(_?.node&&(h?t.node.insertBefore(_.node,h):a.appendChild(_.node)),b+1<e.length&&Nm()){h||(h=i.createComment("smbls-mount"),a.appendChild(h),t.node.appendChild(a));let y=b+1;Um(()=>g(y));return}}h?(h.remove(),t.node.tagName==="SELECT"&&Zf(t,!0)):t.node.appendChild(a)};return g(0),Bm(),!0}if(typeof e=="string"){let s=vS(e,t);if(Array.isArray(s))return ry(t,s,r,n)}if(typeof e=="object")for(let s in e){if(Nt.has(s))continue;let i=e[s];if(!(i==null||i===!1)){if((typeof i=="string"||typeof i=="number")&&(i={text:i}),t.childProps&&(i=Ka(t.childProps,i)),o&&!i.ignoreChildExtends)if(i.extends){let a=Array.isArray(i.extends)?i.extends:[i.extends],c=Array.isArray(o)?o:[o];i={...i,extends:[...c,...a]}}else i={...i,extends:o};fe(i,t,s,r)}}}function Zf(t,e){let r=t.node;if(!r||r.tagName!=="SELECT")return;let n=r.options;if(!n||!n.length)return;let o=t.__ref,s=o&&o.__exec&&o.__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,typeof f=="string"&&f.includes("{{")&&(f=Dt.call(t,f,t.state));let u=f==null?"":String(f);r.value!==u&&(r.value=u);return}let c=e||!(o&&o.__selectSynced);if(o&&(o.__selectSynced=!0),!c)return;let l=-1;for(let f=0;f<n.length;f++)n[f].defaultSelected&&(l=f);l>=0&&r.selectedIndex!==l&&(r.selectedIndex=l)}function $S(t,e){let{children:r,content:n}=t,o=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,p=!1,h=jt(t,t.childrenDeps,u),g=K(()=>{let m=p;p=!0;let b;try{b=h(t,t.state,t.context)}catch(T){if(typeof console<"u"&&console.error){let R=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${R}${m?"":" (initial tracking run)"}:`,T?.message||T)}return}if(!m||b===t.children)return;t.children=b,d.__childrenChunkGen!=null&&d.__childrenChunkGen++;let _=typeof t.onContentUpdate=="function",y=_?[]:null,x=_?[]:null,w=_?[]:null;if(Array.isArray(b)&&t.childrenAs==="state"){let T=t.childProps,R=[],V=new Map;for(let W=0;W<b.length;W++){let yt=b[W],F=T;if(typeof T=="function")try{F=T(t,yt)}catch{F=null}let J=kS(F&&F.key,yt,W);R.push(J),V.set(J,{rawChild:yt,childProps:F})}let Bt=new Set(R),z=d.__children.slice();for(let W of z)if(!Bt.has(W)){let yt=t[W];yt?.remove&&yt.remove(),delete t[W],x&&x.push(W)}let H=t.childExtends,nt=t.tag==="fragment",B=t.context?.document||globalThis.document,Z=nt?null:B?.createDocumentFragment(),Lt=new Set;for(let W of R){let yt=V.get(W),F=yt.rawChild,J=t[W];if(J&&J.state){if(F&&typeof F=="object"){let it=J.state,Be=it.$replace||it.replace,_d=it.$update||it.update;try{if(typeof Be=="function")Be.call(it,F);else if(typeof _d=="function"){for(let Mt in it)if(!(Mt==="__element"||Mt==="root"||Mt==="parent"||Mt==="update")&&!Object.prototype.hasOwnProperty.call(F,Mt))try{it[Mt]=void 0}catch{}_d.call(it,F)}else for(let Mt in F)it[Mt]=F[Mt]}catch(Mt){if(typeof console<"u"&&console.error){let at=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${W}" failed to patch at ${at} (reconcile, keeping its previous data for this pass):`,Mt?.message||Mt)}}}w&&w.push(W);continue}let wt=F;(typeof F=="string"||typeof F=="number")&&(wt={value:F,text:F});let G=yt.childProps,$=G?{...G,state:wt}:{state:wt};if(H&&!$.ignoreChildExtends)if($.extends){let it=Array.isArray($.extends)?$.extends:[$.extends],Be=Array.isArray(H)?H:[H];$={...$,extends:[...Be,...it]}}else $={...$,extends:H};let St;try{St=fe($,t,W,e)}catch(it){if(typeof console<"u"&&console.error){let Be=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${W}" failed to construct at ${Be} (reconcile, skipping this row):`,it?.message||it)}Lt.add(W);continue}!nt&&St?.node&&Z&&Z.appendChild(St.node),y&&y.push(W)}if(!nt&&Z&&Z.childNodes.length&&t.node&&t.node.appendChild(Z),!nt&&t.node){let W=null;for(let yt of R){let F=t[yt]?.node;if(!F)continue;let J=W?W.nextSibling:t.node.firstChild;F!==J&&t.node.insertBefore(F,J),W=F}}d.__children=Lt.size?R.filter(W=>!Lt.has(W)):R,_&&(y.length||x.length)&&dS(t,{added:y,removed:x,kept:w}),Zf(t,!1);return}let L=_?[...d.__children]:null;for(let T of[...d.__children]){let R=t[T];R?.remove&&R.remove(),delete t[T]}d.__children=[],ry(t,b,e),Zf(t,!1),_&&dS(t,{added:[...d.__children],removed:L,kept:[]})},{depth:d.path.length,label:ut(d,"children")});d.__effects.push(g)}let s=ry(t,r,e,!0);if(n!=null&&!(n&&n.__ref)){let u=n;if(typeof u=="string"||typeof u=="number"?u={text:u}:typeof u!="object"&&(u={}),t.childProps&&(u=Ka(t.childProps,u)),o&&!u.ignoreChildExtends)if(u.extends){let d=Array.isArray(u.extends)?u.extends:[u.extends],p=Array.isArray(o)?o:[o];u={...u,extends:[...p,...d]}}else u={...u,extends:o};fe(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 p=u[d];if(!p.endsWith("Extends")||typeof t[p]!="string")continue;let h=p.slice(0,-7);if(!h||h.charCodeAt(0)<65||h.charCodeAt(0)>90)continue;let g={extends:t[p]};delete t[p];for(let m=d+1;m<u.length;m++){let b=u[m],_=b.charCodeAt(0);if(_>=65&&_<=90||Nt.has(b)||typeof t[b]=="function"&&(b.startsWith("on")||b.startsWith(".")))break;let y=t[b];y!==void 0&&(g[b]=y,delete t[b])}t[h]&&typeof t[h]=="object"?t[h]={...g,...t[h]}:t[h]=g}}let a=e?.mountYield===!0||t.yieldChildren===!0,c=Object.keys(t),l=u=>{if(Nt.has(u)||typeof t[u]!="object"||t[u]===null)return;let d=u.charCodeAt(0);if(d<65||d>90)return;let p=t[u];if(!p.__ref){if(!p.extends&&!p.extend){let h=i[u]||i[`smbls.${u}`];h&&(p={...p,extends:h})}if(t.childProps&&(p=Ka(t.childProps,p)),o&&!p.ignoreChildExtends)if(p.extends){let h=Array.isArray(p.extends)?p.extends:[p.extends],g=Array.isArray(o)?o:[o];p={...p,extends:[...g,...h]}}else p={...p,extends:o};fe(p,t,u,e)}};if(!a){for(let u of c)l(u);return}jm();let f=u=>{for(let d=u;d<c.length;d++)if(l(c[d]),d+1<c.length&&Nm()){let p=d+1;Um(()=>f(p));return}};f(0),Bm()}function LS(t,e,r){let{node:n}=t;if(!n)return;n.ref=t;let o=e?.tag==="fragment"?e.__ref?.__fragmentAnchor:null;if(o){let i=o.parentNode;if(i){if(r?.position==="before"&&r.node)i.insertBefore(n,r.node);else if(r?.position==="after"&&r.node){let a=r.node.nextSibling;i.insertBefore(n,a||o)}else i.insertBefore(n,o);return}}let s=e?.node||(e?.nodeType?e:null);if(s)if(r?.position==="before"&&r.node)s.insertBefore(n,r.node);else if(r?.position==="after"&&r.node){let i=r.node.nextSibling;i?s.insertBefore(n,i):s.appendChild(n)}else s.appendChild(n)}var ny=3;function km(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=ny?!1:(t.__inBeforeUpdate=!0,!0)}function _r(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===ny&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${ny}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function ee(t,e,r){let n=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&At(n,e,r);let o="on"+t,s=e[o];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&&st(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(p=>{e.context?.plugins?.length&&At("error",e,{hook:o,error:p})||console.error(`[DOMQL] Lifecycle "${o}" error:`,p)}).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:o,error:u})||console.error(`[DOMQL] Lifecycle "${o}" error:`,u),e.context?.strictMode)throw u}finally{l&&rt(),f&&e.__ref&&(e.__ref[c]=!1)}}return!0}var MS={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"]},FS={"gradient-blue-light":`linear-gradient(to right,
57
+ `),u&&(s+=u)}}s&&(o.textContent+=s)}var kS=new Set;function vS(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 GO(t,e,r){let n=vS(r);queueMicrotask(()=>{if(!t.__ref)return;let o;try{o=e(t,t.state,t.context)}catch{return}if(vS(o)===n)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";kS.has(s)||(kS.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(o)?o.join(", "):String(o)}]. 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 YO(t){let e=t.subscribeTo,r=typeof e=="function",n=e;if(r)try{n=e(t,t.state,t.context)}catch{n=null}if(r&&Et()&&GO(t,e,Array.isArray(n)?n:[]),!Array.isArray(n)||n.length===0)return;let o=t.__ref;for(let s=0;s<n.length;s++){let i=n[s];if(typeof i!="string"||i.length===0)continue;let a=i.split("."),c=a[0],l=a.slice(1),f={value:!1},u=K(()=>{let d=t.state&&(_t(t.state)?t.state.root:null);if(!d||!_t(d))return;let p=d;p=p[c];for(let g=0;g<l.length&&!(p==null||typeof p!="object");g++)if(_t(p))p=p[l[g]];else break;if(!f.value)return;let h=!1;if(typeof t.onBeforeUpdate=="function"){let g=t.context?.designSystem;g&&it(g);try{if(Am(o)){let m=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});m&&typeof m.then=="function"?m.then(()=>_r(o,!1),b=>{_r(o,!0),t.context?.plugins?.length&&At("error",t,{hook:"onBeforeUpdate",error:b})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",b)}):(_r(o,!1),m===!1&&(h=!0))}}catch(m){_r(o,!0),t.context?.plugins?.length&&At("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}finally{g&&nt()}}if(!h&&t.node&&o.__effects)for(let g=0;g<o.__effects.length;g++){let m=o.__effects[g];m&&m!==u&&!m._disposed&&!m._isSubscribeToEffect&&typeof m._execute=="function"&&m._execute()}if(!h&&typeof t.onUpdate=="function"){let g=t.context?.designSystem;g&&it(g);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{g&&nt()}}},{depth:o.path.length,label:ut(o,"subscribeTo("+i+")")});f.value=!0,u._isSubscribeToEffect=!0,o.__effects.push(u)}}function cy(t,e){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&!t.startsWith("@container")&&(t==="@dark"||t==="@light"||!e.context?.designSystem?.media?.[t.slice(1)])}function ly(t,e){if(t.charCodeAt(0)!==64||/^@(media|supports|container|keyframes)\b/.test(t))return t;let r=e.context?.designSystem?.media?.[t.slice(1)];return r?/^@(media|supports|container)\b/.test(r)?r:`@media ${r}`:t}var CS=new Set;function XO(t,e){let r=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",n=r+"::"+t;CS.has(n)||(CS.add(n),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 ls(t,e,r){let n={},o=new Set,s=(i,a,c)=>{let l=c?new Set(Object.keys(n)):null;if(pt[i]){let f=pt[i](a,e,e.state,e.context);if(f){let u=Array.isArray(f)?f:[f];for(let d of u)d&&Object.assign(n,d)}}else n[i]=a;if(c)for(let f in n)l.has(f)||o.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 p=typeof e[u]=="function"&&(pt[u]||ht&&ht.has(u));s(u,d,p)}continue}if(cy(i,e)){let u=ls(a,e,!1);Object.keys(u).length&&(n[`[data-theme="${i.slice(1)}"] &`]=u);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(i)){Et()&&XO(i,e);continue}let l=ly(i,e),f=ls(a,e,!1);Object.keys(f).length&&(n[l]=f);continue}let c=typeof e[i]=="function"&&(pt[i]||ht&&ht.has(i));s(i,a,c)}if(r)for(let i in n)o.add(i);for(let i of o){let a=n[i];typeof a=="string"&&!a.includes("!important")&&(n[i]=a+" !important")}return n}function fy(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)&&fy(t[r],e+1))return!0}return!1}function MS(t,e,r){if(!e||typeof e!="object"||Array.isArray(e))return null;if(cy(t,r)){let s=ls(e,r,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let n=ly(t,r),o=ls(e,r,!1);return Object.keys(o).length?{cssProp:n,block:o}:null}function ZO(t){let e=t.__ref;for(let r of Object.keys(t)){if(!ry(r))continue;let n=t[r];if(!n||typeof n!="object"||Array.isArray(n)||!fy(n))continue;let o=null,s,i=K(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&it(a);let c,l=!1;try{let f=MS(r,n,t),u=f?Zf(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=fe({[f.cssProp]:f.block},null,t.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&nt()}if(!(l||!t.node.classList)){if(o)for(let f of o)t.node.classList.remove(f);if(c&&c.length)for(let f of c)t.node.classList.add(f);o=c}},{depth:e.path.length,label:ut(e,"cssBlock("+r+")")});e.__effects.push(i)}}function JO(t){let e=t.__ref;e.__conditionalRunners=[];let r=new Map;for(let n of Object.keys(t)){let o=n.charAt(0);if(o!=="."&&o!=="!")continue;let s=n.slice(1);if(!s)continue;if(/[:@\s>~+[\]]/.test(s)){if(typeof console<"u"&&console.warn){let p=s.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${n}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${o}\` is read as one prop name. Nest the selector inside instead: \`${o}${p}: { '${s.slice(p.length)}': {...} }\`.`)}continue}let i=t[n];if(!i||typeof i!="object")continue;let a=o==="!",c={lastMatch:!1,appliedKeys:null,appliedClasses:null},l=()=>{let p,h=t[s];if(h===void 0){let b=!!t.state&&s in t.state,_=t.state?t.state[s]:void 0;if(b||_!==void 0)p=_;else{let y=t.context?.cases?.[s];if(y===void 0)return;try{p=typeof y=="function"?y.call(t,t):y}catch(x){p=!1,e.__conditionalError=x,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${n}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,x?.message||x)}}}else if(typeof h=="function")try{p=h(t,t.state,t.context)}catch(b){p=!1,e.__conditionalError=b,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${n}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,b?.message||b)}else p=h;let g=a?!p:!!p;if(!t.node||g===c.lastMatch)return;c.lastMatch=g;let m=t.context?.designSystem;m&&it(m);try{if(g){let b={},_={},y=!1;for(let w in i){if(!Object.prototype.hasOwnProperty.call(i,w))continue;let v=i[w],P=w.charAt(0);if((P===":"||P==="@"||P==="&"||P==="[")&&v&&typeof v=="object"&&!Array.isArray(v)){if(cy(w,t)){let I=ls(v,t,!1);Object.keys(I).length&&(_[`[data-theme="${w.slice(1)}"] &`]=I,y=!0)}else{let I=ly(w,t),A=ls(v,t,!1);Object.keys(A).length&&(_[I]=A,y=!0)}continue}let $=typeof v=="function"?v(t,t.state,t.context):v;if($!=null)if(pt[w]){let I=pt[w]($,t,t.state,t.context);if(I){let A=Array.isArray(I)?I:[I];for(let F of A)F&&Object.assign(b,F)}}else(ht&&ht.has(w)||oy(w))&&(b[w]=$)}let x=Object.keys(b);if(x.length){cs(t.node,b);for(let w of x)r.set(w,n);c.appliedKeys=x}else c.appliedKeys=null;if(y){let w=fe(_,null,t.context?.cssPrefix),v=w?w.split(" ").filter(Boolean):[];if(v.length&&t.node.classList){for(let P of v)t.node.classList.add(P);c.appliedClasses=v}else c.appliedClasses=null}else if(c.appliedClasses){for(let w of c.appliedClasses)t.node.classList.remove(w);c.appliedClasses=null}}else{if(c.appliedKeys){for(let b of c.appliedKeys)r.get(b)===n&&(oy(b)?t.node.style.removeProperty(b):t.node.style[b]="",r.delete(b));c.appliedKeys=null}if(c.appliedClasses){for(let b of c.appliedClasses)t.node.classList.remove(b);c.appliedClasses=null}}}finally{m&&nt()}};e.__conditionalRunners.push(l);let f=Bt(t,t[s+"Deps"],l),u=K(f,{depth:e.path.length,label:ut(e,"conditional("+n+")")}),d=e.__exec&&e.__exec[s]||t[s];u._sources.size===0&&typeof d=="function"&&Et()&&console.warn(`[smbls] conditional \`${n}\` on ${t.key||"?"} subscribed to nothing \u2014 its predicate tracked no reactive read on its first run, so no state write will ever re-evaluate it (only a direct element.update() on this element re-runs it). If the predicate guards its state reads (\`in\`, short-circuits, \`?.\`), declare \`${s}Deps: [...]\` (state-key strings or \`(el, s) => \u2026\` selectors) so the subscription is armed unconditionally.`),e.__effects.push(u)}}var Jm=new WeakSet;function QO(t){let e=t.ownerDocument;!e||Jm.has(e)||(Jm.add(e),queueMicrotask(()=>{Jm.delete(e);let r=e.body||e.documentElement;r&&r.offsetWidth}))}var Qm=new WeakSet,ES=!1;function AS(t){return t.startsWith("[data-theme=")||t.startsWith("@media")&&t.includes("prefers-color-scheme")}function sy(t,e){let r={...t};for(let n in e){let o=e[n],s=r[n];r[n]=o&&typeof o=="object"&&s&&typeof s=="object"?sy(s,o):o}return r}function FS(t,e){let r={};for(let n in t){let o=t[n];if(o&&typeof o=="object"){let s=FS(o,e);Object.keys(s).length&&(r[n]=s)}else e.has(n)||(r[n]=o)}return r}function tR(t){let{node:e}=t;if(!e)return;if(ES||(ES=!0,fe({display:"none"})),Qm.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}Qm.add(t);let r=t.context?.designSystem;r&&it(r),Nf();try{let n={},o=!1,s=null,i=null,a=null,c=(l,f)=>{if(f&&typeof f=="object"&&AS(l)){i||(i={});let u=i[l];u&&(f=sy(u,f)),i[l]=f}else(f===null||typeof f!="object")&&(a||(a=new Set),a.add(l));n[l]=f};if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&pt.theme){let l=pt.theme(t.theme,t,t.state,t.context);if(l){let f=u=>{for(let d in u){let p=u[d];p&&typeof p=="object"&&AS(d)&&(s||(s={}),s[d]=p),n[d]=p}};if(Array.isArray(l))for(let u of l)u&&f(u);else f(l);o=!0}}for(let l of Object.keys(t)){if(typeof t[l]=="function"||jt.has(l)||l==="theme")continue;let f=l.charCodeAt(0);if(!(f>=65&&f<=90)&&!Jr(l)){if(pt[l]){let u=t[l],d=pt[l](u,t,t.state,t.context);if(d){if(Array.isArray(d)){for(let p of d)if(p)for(let h in p)c(h,p[h])}else for(let p in d)c(p,d[p]);o=!0}}else if(ht&&ht.has(l)){let u=t[l];u!=null&&typeof u!="object"&&(c(l,u),o=!0)}else if(l.charCodeAt(0)===45){let u=t[l];u!=null&&typeof u!="object"&&(c(l,u),o=!0)}else if(l.charAt(0)==="&"||l.charAt(0)==="@"||l.charAt(0)===":"||l.charAt(0)==="["){let u=t[l];if(u&&typeof u=="object"&&!Array.isArray(u)){if(fy(u))continue;let d=MS(l,u,t);d&&(c(d.cssProp,d.block),o=!0)}}}}if(s)for(let l in s){let f=a?FS(s[l],a):s[l];i&&i[l]&&(f=sy(f,i[l])),Object.keys(f).length?n[l]=f:delete n[l]}if(o){n.display&&String(n.display).includes("!important")&&(e.style.setProperty("display",String(n.display).replace(/\s*!important\s*$/,""),"important"),delete n.display);let l=fe(n,null,t.context?.cssPrefix);if(l&&e.classList){let u=l.split(" ").filter(Boolean),d=!1;for(let p of u)e.classList.add(p),d||(p.charCodeAt(0)===95&&p.charCodeAt(1)===99||p.charCodeAt(0)===95&&p.indexOf("_c",1)!==-1)&&(d=!0);d&&QO(e)}let f=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(f!=null){let u=n.display;if(u&&u!==f)if(f==="none"){let d=[];for(let p of e.classList)p.startsWith("_d-")&&p!=="_d-none"&&d.push(p);for(let p of d)e.classList.remove(p);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{jf(),r&&nt(),Qm.delete(t)}}function NS(t){let{node:e}=t;if(!e||!e.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let s=t.aria[o];if(typeof s=="function"||typeof s=="object"||s==null||typeof s=="string"&&s.includes("{{"))continue;let i="aria-"+o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());e.setAttribute(i,Qt(i,s))}let r=Em(t);for(let o in r){let s=r[o];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(o,s===!0?"":s)}let n=t.tag||"div";for(let o of Object.keys(t)){if(typeof t[o]=="function"||jt.has(o)||o==="on"||r[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!Jr(o)&&!(pt[o]||ht&&ht.has(o))&&nr(n,o)){let i=t[o];if(i==null)continue;if(typeof i=="string"&&i.includes("{{")){if(!Bn[o])continue;i=It.call(t,i,t.state)}if(i==null||typeof i=="function"||typeof i=="object"||i===!1&&!rr(er(o)||o))continue;let a=er(o)||o;e.setAttribute(a,Qt(a,i))}}}function Jw(t,e){let{node:r}=t;if(!r||!r.setAttribute)return;let n=e.charCodeAt(0);if(n>=65&&n<=90||Jr(e)||pt[e]||ht&&ht.has(e)||!nr(t.tag||"div",e))return;let o=er(e)||e,s=o.toLowerCase(),i=t.__ref&&t.__ref.__effects,a=!1;if(i)for(let f=0;f<i.length;f++){let u=i[f];u&&u._attrName===s&&!u._disposed&&typeof u._execute=="function"&&(a=!0,u._execute())}if(a)return;let c=t[e],l=Bn[e];if(l&&c!=null){let f=l(t);f!==void 0&&(c=f)}typeof c=="string"&&c.includes("{{")&&(c=It.call(t,c,t.state)),c==null||c===!1&&!rr(o)?r.removeAttribute(o):typeof c!="function"&&typeof c!="object"&&r.setAttribute(o,Qt(o,c))}function eR(t,e){let r=t.node,n=t.__ref,o=n.__autoGrow;if(!e){if(o&&o.active){try{r.removeEventListener("input",o.resize)}catch{}r.style.height="",o.appliedMax!=null&&r.style.maxHeight===o.appliedMax&&(r.style.maxHeight=""),o.active=!1,o.appliedMax=null,o.lastMeasure=0}return}o||(o=n.__autoGrow={active:!1,appliedMax:null,lastMeasure:0,resize:()=>{if(r.scrollHeight===0&&o.lastMeasure>0)return;r.style.height="auto";let i=r.scrollHeight;r.style.height=i+"px",i>0&&(o.lastMeasure=i)}},n.__eventCleanup||(n.__eventCleanup=[]),n.__eventCleanup.push(()=>{try{r.removeEventListener("input",o.resize)}catch{}})),o.active||(r.addEventListener("input",o.resize),o.active=!0);let s=typeof e=="object"&&e.max!=null?String(e.max):null;s!==o.appliedMax&&(s==null?o.appliedMax!=null&&r.style.maxHeight===o.appliedMax&&(r.style.maxHeight=""):r.style.maxHeight=s,o.appliedMax=s),o.resize()}function rR(t){if(!t.autoGrow)return;let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let r=t.__ref,n=t.autoGrow,o=typeof n=="function"?Bt(t,t.autoGrowDeps,n):null,s=K(()=>{let i=t.autoGrow,a=i;if(typeof i=="function")try{a=(i===n&&o?o:i)(t,t.state,t.context)}catch{a=null}eR(t,a)},{depth:r.path.length,label:ut(r,"autoGrow")});r.__effects||(r.__effects=[]),r.__effects.push(s),o&&(r.__exec.autoGrow=n)}var jS=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function BS(t,e){for(let r of Object.keys(t)){if(!Jr(r)||jS.has(r))continue;let n=$f(r);if(n){Lf(n,t,t[r]);continue}let o=t[r];if(typeof o=="string"&&/^[A-Za-z_$][\w$]*$/.test(o)){let i=o;o=function(c){return t.call(i,c)}}if(typeof o!="function")continue;let s=NO(r);Gr.has(s)||es(jO(s),t,o)}nR(t)}function nR(t){let e=t.node;if(!e||!e.addEventListener)return;let r={},n=!1;for(let d of jS){let p=t[d];typeof p=="function"&&(r[d]=p,n=!0)}if(!n)return;let o=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 p=d.touches&&d.touches[0]||d.changedTouches&&d.changedTouches[0];p&&(i=p.clientX,a=p.clientY,c=Date.now(),l=!0)},u=d=>{if(!l)return;l=!1;let p=d.changedTouches&&d.changedTouches[0]||d.touches&&d.touches[0];if(!p)return;let h=p.clientX-i,g=p.clientY-a,m=Date.now()-c;if(m>s)return;let b=Math.abs(h),_=Math.abs(g);if(Math.max(b,_)<o)return;let y;if(b>_*1.2)y=h<0?"left":"right";else if(_>b*1.2)y=g<0?"up":"down";else return;let x="onSwipe"+y.charAt(0).toUpperCase()+y.slice(1),w=r[x],v=r.onSwipe;w&&w.call(t,d,t,t.state,t.context),v&&v.call(t,{direction:y,dx:h,dy:g,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 Ya(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Ya(o,s):r[n]=s}return r}function iy(t,e,r,n){if(!e||!t.node)return;let o=t.childExtends;if(Array.isArray(e)){let s=t.tag==="fragment",i=t.context?.document||globalThis.document,a=s?null:i?.createDocumentFragment();if(!s&&!a)return;let c=t.childProps,l=t.childrenAs,f=m=>{let b=e[m],_=b;(typeof b=="string"||typeof b=="number")&&(b={text:b});let y=c;if(typeof c=="function")try{y=c(t,b)}catch{y=null}if(l==="state"){let w=_;(typeof _=="string"||typeof _=="number")&&(w={value:_,text:_}),b=y?{...y,state:w}:{state:w}}else y&&(b=Ya(y,b));if(o&&!b.ignoreChildExtends)if(b.extends){let w=Array.isArray(b.extends)?b.extends:[b.extends],v=Array.isArray(o)?o:[o];b={...b,extends:[...v,...w]}}else b={...b,extends:o};let x=RS(b?.key,_,m);try{return ue(b,t,x,r)}catch(w){if(typeof console<"u"&&console.error){let v=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${x}" failed to construct at ${v} (initial render, skipping this row):`,w?.message||w)}return null}},u=t.__ref;if(!(n===!0&&!s&&!!u&&(r?.mountYield===!0||t.yieldChildren===!0))){for(let m=0;m<e.length;m++){let b=f(m);!s&&b?.node&&a.appendChild(b.node)}return s||t.node.appendChild(a),!0}let p=u.__childrenChunkGen=(u.__childrenChunkGen||0)+1;zm();let h=null,g=m=>{if(u.__disposed||u.__childrenChunkGen!==p){h&&h.parentNode&&h.remove();return}for(let b=m;b<e.length;b++){let _=f(b);if(_?.node&&(h?t.node.insertBefore(_.node,h):a.appendChild(_.node)),b+1<e.length&&Vm()){h||(h=i.createComment("smbls-mount"),a.appendChild(h),t.node.appendChild(a));let y=b+1;Wm(()=>g(y));return}}h?(h.remove(),t.node.tagName==="SELECT"&&Qf(t,!0)):t.node.appendChild(a)};return g(0),Hm(),!0}if(typeof e=="string"){let s=PS(e,t);if(Array.isArray(s))return iy(t,s,r,n)}if(typeof e=="object")for(let s in e){if(jt.has(s))continue;let i=e[s];if(!(i==null||i===!1)){if((typeof i=="string"||typeof i=="number")&&(i={text:i}),t.childProps&&(i=Ya(t.childProps,i)),o&&!i.ignoreChildExtends)if(i.extends){let a=Array.isArray(i.extends)?i.extends:[i.extends],c=Array.isArray(o)?o:[o];i={...i,extends:[...c,...a]}}else i={...i,extends:o};ue(i,t,s,r)}}}function Qf(t,e){let r=t.node;if(!r||r.tagName!=="SELECT")return;let n=r.options;if(!n||!n.length)return;let o=t.__ref,s=o&&o.__exec&&o.__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,typeof f=="string"&&f.includes("{{")&&(f=It.call(t,f,t.state));let u=f==null?"":String(f);r.value!==u&&(r.value=u);return}let c=e||!(o&&o.__selectSynced);if(o&&(o.__selectSynced=!0),!c)return;let l=-1;for(let f=0;f<n.length;f++)n[f].defaultSelected&&(l=f);l>=0&&r.selectedIndex!==l&&(r.selectedIndex=l)}function US(t,e){let{children:r,content:n}=t,o=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,p=!1,h=Bt(t,t.childrenDeps,u),g=K(()=>{let m=p;p=!0;let b;try{b=h(t,t.state,t.context)}catch(I){if(typeof console<"u"&&console.error){let A=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${A}${m?"":" (initial tracking run)"}:`,I?.message||I)}return}if(!m||b===t.children)return;t.children=b,d.__childrenChunkGen!=null&&d.__childrenChunkGen++;let _=typeof t.onContentUpdate=="function",y=_?[]:null,x=_?[]:null,w=_?[]:null;if(Array.isArray(b)&&t.childrenAs==="state"){let I=t.childProps,A=[],F=new Map;for(let z=0;z<b.length;z++){let bt=b[z],L=I;if(typeof I=="function")try{L=I(t,bt)}catch{L=null}let ot=RS(L&&L.key,bt,z);A.push(ot),F.set(ot,{rawChild:bt,childProps:L})}let Mt=new Set(A),H=d.__children.slice();for(let z of H)if(!Mt.has(z)){let bt=t[z];bt?.remove&&bt.remove(),delete t[z],x&&x.push(z)}let tt=t.childExtends,et=t.tag==="fragment",V=t.context?.document||globalThis.document,W=et?null:V?.createDocumentFragment(),Tt=new Set;for(let z of A){let bt=F.get(z),L=bt.rawChild,ot=t[z];if(ot&&ot.state){if(L&&typeof L=="object"){let vt=ot.state,Ft=vt.$replace||vt.replace,Qn=vt.$update||vt.update;try{if(typeof Ft=="function")Ft.call(vt,L);else if(typeof Qn=="function"){for(let oe in vt)if(!(oe==="__element"||oe==="root"||oe==="parent"||oe==="update")&&!Object.prototype.hasOwnProperty.call(L,oe))try{vt[oe]=void 0}catch{}Qn.call(vt,L)}else for(let oe in L)vt[oe]=L[oe]}catch(oe){if(typeof console<"u"&&console.error){let Ms=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${z}" failed to patch at ${Ms} (reconcile, keeping its previous data for this pass):`,oe?.message||oe)}}}w&&w.push(z);continue}let gt=L;(typeof L=="string"||typeof L=="number")&&(gt={value:L,text:L});let Y=bt.childProps,G=Y?{...Y,state:gt}:{state:gt};if(tt&&!G.ignoreChildExtends)if(G.extends){let vt=Array.isArray(G.extends)?G.extends:[G.extends],Ft=Array.isArray(tt)?tt:[tt];G={...G,extends:[...Ft,...vt]}}else G={...G,extends:tt};let B;try{B=ue(G,t,z,e)}catch(vt){if(typeof console<"u"&&console.error){let Ft=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${z}" failed to construct at ${Ft} (reconcile, skipping this row):`,vt?.message||vt)}Tt.add(z);continue}!et&&B?.node&&W&&W.appendChild(B.node),y&&y.push(z)}if(!et&&W&&W.childNodes.length&&t.node&&t.node.appendChild(W),!et&&t.node){let z=null;for(let bt of A){let L=t[bt]?.node;if(!L)continue;let ot=z?z.nextSibling:t.node.firstChild;L!==ot&&t.node.insertBefore(L,ot),z=L}}d.__children=Tt.size?A.filter(z=>!Tt.has(z)):A,_&&(y.length||x.length)&&_S(t,{added:y,removed:x,kept:w}),Qf(t,!1);return}let $=_?[...d.__children]:null;for(let I of[...d.__children]){let A=t[I];A?.remove&&A.remove(),delete t[I]}d.__children=[],iy(t,b,e),Qf(t,!1),_&&_S(t,{added:[...d.__children],removed:$,kept:[]})},{depth:d.path.length,label:ut(d,"children")});d.__effects.push(g)}let s=iy(t,r,e,!0);if(n!=null&&!(n&&n.__ref)){let u=n;if(typeof u=="string"||typeof u=="number"?u={text:u}:typeof u!="object"&&(u={}),t.childProps&&(u=Ya(t.childProps,u)),o&&!u.ignoreChildExtends)if(u.extends){let d=Array.isArray(u.extends)?u.extends:[u.extends],p=Array.isArray(o)?o:[o];u={...u,extends:[...p,...d]}}else u={...u,extends:o};ue(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 p=u[d];if(!p.endsWith("Extends")||typeof t[p]!="string")continue;let h=p.slice(0,-7);if(!h||h.charCodeAt(0)<65||h.charCodeAt(0)>90)continue;let g={extends:t[p]};delete t[p];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&&(g[b]=y,delete t[b])}t[h]&&typeof t[h]=="object"?t[h]={...g,...t[h]}:t[h]=g}}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 p=t[u];if(!p.__ref){if(!p.extends&&!p.extend){let h=i[u]||i[`smbls.${u}`];h&&(p={...p,extends:h})}if(t.childProps&&(p=Ya(t.childProps,p)),o&&!p.ignoreChildExtends)if(p.extends){let h=Array.isArray(p.extends)?p.extends:[p.extends],g=Array.isArray(o)?o:[o];p={...p,extends:[...g,...h]}}else p={...p,extends:o};ue(p,t,u,e)}};if(!a){for(let u of c)l(u);return}zm();let f=u=>{for(let d=u;d<c.length;d++)if(l(c[d]),d+1<c.length&&Vm()){let p=d+1;Wm(()=>f(p));return}};f(0),Hm()}function VS(t,e,r){let{node:n}=t;if(!n)return;n.ref=t;let o=e?.tag==="fragment"?e.__ref?.__fragmentAnchor:null;if(o){let i=o.parentNode;if(i){if(r?.position==="before"&&r.node)i.insertBefore(n,r.node);else if(r?.position==="after"&&r.node){let a=r.node.nextSibling;i.insertBefore(n,a||o)}else i.insertBefore(n,o);return}}let s=e?.node||(e?.nodeType?e:null);if(s)if(r?.position==="before"&&r.node)s.insertBefore(n,r.node);else if(r?.position==="after"&&r.node){let i=r.node.nextSibling;i?s.insertBefore(n,i):s.appendChild(n)}else s.appendChild(n)}var ay=3;function Am(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=ay?!1:(t.__inBeforeUpdate=!0,!0)}function _r(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===ay&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${ay}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function ee(t,e,r){let n=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&At(n,e,r);let o="on"+t,s=e[o];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(p=>{e.context?.plugins?.length&&At("error",e,{hook:o,error:p})||console.error(`[DOMQL] Lifecycle "${o}" error:`,p)}).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:o,error:u})||console.error(`[DOMQL] Lifecycle "${o}" error:`,u),e.context?.strictMode)throw u}finally{l&&nt(),f&&e.__ref&&(e.__ref[c]=!1)}}return!0}var zS={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"]},HS={"gradient-blue-light":`linear-gradient(to right,
58
58
  rgba(4, 116, 242, 1),
59
59
  rgba(0, 48, 103, 1)
60
60
  )`,"gradient-blue-dark":`linear-gradient(to right,
@@ -80,28 +80,28 @@ FROM ${a}${l}`},KE=t=>{let e=[],r=(n,o)=>{for(let s in n){let i=o?`${o}/${s}`:s;
80
80
  #1E54F0 36%,
81
81
  #8B4CCA 69%,
82
82
  #C66894 100%
83
- )`};var VO={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"}}}},zO={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},HO={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"}}},NS={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...VO,...zO,...HO,none:{color:"none",background:"none"},transparent:{color:"currentColor",background:"transparent"}};var jS={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var BS={ratio:1.618,subSequence:!0};var US={SourceSans:[{url:""}]},VS={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 zS={symbols:'<svg xmlns="http://www.w3.org/2000/svg" width="41" height="42" viewBox="0 0 41 42"><path fill="currentColor" fill-rule="evenodd" d="M26.6448969,0.699064106 C31.4862479,1.83000067 35.6718819,4.48073656 38.3104478,8.91022511 C40.5212645,12.5974948 41.4936378,17.0951724 40.5085112,21.3679841 C39.7174644,25.0315254 37.8558379,27.853625 34.8002871,29.8369535 C31.9792925,31.7073227 27.90737,32.069064 24.6776501,31.3213124 C23.2887047,30.9944607 20.6411869,29.9775216 19.044333,28.0178349 C17.5928447,26.2365433 17.1250067,23.5192397 17.0461096,22.8419583 C16.9044422,21.6258334 17.1065683,20.249997 17.3800113,19.0276209 C17.9614095,16.4655592 18.9984397,14.7924534 21.1401118,13.3818866 C22.95018,12.1750388 24.6834696,11.8738651 26.7601335,12.3496124 C28.1855093,12.6880929 29.4520072,13.526716 30.3514025,14.7276098 C30.6271426,15.093878 30.8260324,15.4389318 31.059655,15.8362933 L30.9598079,15.7715366 C29.6377659,14.9422902 28.1654404,14.6590001 26.6448969,15.0752526 C25.2996601,15.4486698 24.1453463,16.3687006 23.4390969,17.6304467 C22.6973258,18.9448239 22.4839364,20.5087166 22.8465467,21.9733145 C23.2152637,23.4394215 24.1276197,24.6832715 25.381967,25.429977 C26.7647836,26.2608222 28.5893081,26.47537 30.1320438,26.0161118 C32.0344739,25.4497656 33.5958796,24.1165457 34.5824098,22.3233381 C35.8078311,20.0959926 36.0316242,17.5753145 35.4197363,15.1376991 C34.8712232,12.9726344 33.491011,11.1258939 31.7578503,9.86101942 C28.3978494,7.40873928 23.8145474,6.88014849 19.8961329,8.1555193 C16.9596954,9.11146975 14.399202,11.0657028 12.6221782,13.707146 C10.5375814,16.8894059 9.73736372,20.794518 10.3986926,24.5579956 C10.9302311,27.7327705 12.5716868,31.0242929 14.8485647,33.1339502 C15.5517576,33.7855358 16.0056239,34.2996296 16.8186608,34.9238068 C16.1252729,35.6670587 15.729719,36.1210912 15.0276006,36.8553491 L10.5425168,41.6144377 C8.59431563,40.2572487 6.84060794,38.6181461 5.33246714,36.7448351 C1.65619854,32.1632109 -0.0655234106,26.1858125 0.562658817,20.1851649 C1.1000136,14.4158268 3.81414269,9.08050481 8.0996615,5.36924966 C12.3107417,1.69300072 17.6911238,0.0107792851 23.1108097,0.299129816 C25.006381,0.458182488 26.18441,0.591493918 26.6448969,0.699064106 Z"/></svg>',logo:'<svg xmlns="http://www.w3.org/2000/svg" width="41" height="42" viewBox="0 0 41 42"><path fill="currentColor" fill-rule="evenodd" d="M26.6448969,0.699064106 C31.4862479,1.83000067 35.6718819,4.48073656 38.3104478,8.91022511 C40.5212645,12.5974948 41.4936378,17.0951724 40.5085112,21.3679841 C39.7174644,25.0315254 37.8558379,27.853625 34.8002871,29.8369535 C31.9792925,31.7073227 27.90737,32.069064 24.6776501,31.3213124 C23.2887047,30.9944607 20.6411869,29.9775216 19.044333,28.0178349 C17.5928447,26.2365433 17.1250067,23.5192397 17.0461096,22.8419583 C16.9044422,21.6258334 17.1065683,20.249997 17.3800113,19.0276209 C17.9614095,16.4655592 18.9984397,14.7924534 21.1401118,13.3818866 C22.95018,12.1750388 24.6834696,11.8738651 26.7601335,12.3496124 C28.1855093,12.6880929 29.4520072,13.526716 30.3514025,14.7276098 C30.6271426,15.093878 30.8260324,15.4389318 31.059655,15.8362933 L30.9598079,15.7715366 C29.6377659,14.9422902 28.1654404,14.6590001 26.6448969,15.0752526 C25.2996601,15.4486698 24.1453463,16.3687006 23.4390969,17.6304467 C22.6973258,18.9448239 22.4839364,20.5087166 22.8465467,21.9733145 C23.2152637,23.4394215 24.1276197,24.6832715 25.381967,25.429977 C26.7647836,26.2608222 28.5893081,26.47537 30.1320438,26.0161118 C32.0344739,25.4497656 33.5958796,24.1165457 34.5824098,22.3233381 C35.8078311,20.0959926 36.0316242,17.5753145 35.4197363,15.1376991 C34.8712232,12.9726344 33.491011,11.1258939 31.7578503,9.86101942 C28.3978494,7.40873928 23.8145474,6.88014849 19.8961329,8.1555193 C16.9596954,9.11146975 14.399202,11.0657028 12.6221782,13.707146 C10.5375814,16.8894059 9.73736372,20.794518 10.3986926,24.5579956 C10.9302311,27.7327705 12.5716868,31.0242929 14.8485647,33.1339502 C15.5517576,33.7855358 16.0056239,34.2996296 16.8186608,34.9238068 C16.1252729,35.6670587 15.729719,36.1210912 15.0276006,36.8553491 L10.5425168,41.6144377 C8.59431563,40.2572487 6.84060794,38.6181461 5.33246714,36.7448351 C1.65619854,32.1632109 -0.0655234106,26.1858125 0.562658817,20.1851649 C1.1000136,14.4158268 3.81414269,9.08050481 8.0996615,5.36924966 C12.3107417,1.69300072 17.6911238,0.0107792851 23.1108097,0.299129816 C25.006381,0.458182488 26.18441,0.591493918 26.6448969,0.699064106 Z"/></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 HS={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 WS={base:150,ratio:1.333,unit:"ms",subSequence:!0};var qS={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var Ga={version:"0.0.1",color:MS,gradient:FS,theme:NS,typography:jS,spacing:BS,font:US,fontFamily:VS,timing:WS,icons:zS,media:HS,sizes:qS,reset:{html:{},body:{}},animation:{fadeIn:{from:{opacity:0},to:{opacity:1}}},devices:{},class:{},svg:{},grid:{},shape:{}};var fs={};I(fs,{A:()=>lk,AssetPicture:()=>f0,Audio:()=>p0,Avatar:()=>vk,B:()=>D0,Block:()=>KS,Box:()=>ru,Br:()=>M0,Button:()=>dk,ButtonSet:()=>mk,COMPONENTS:()=>Un,Caption:()=>k0,Checkbox:()=>q0,CheckboxHgroup:()=>K0,Circle:()=>a0,CircleButton:()=>hk,Clickable:()=>o0,Data:()=>$0,Dialog:()=>bk,DialogFooter:()=>xk,DialogHeader:()=>_k,Dropdown:()=>Ek,DropdownList:()=>Ak,DropdownParent:()=>Tk,DropdownParentFocus:()=>Ok,DropdownSiblingFocus:()=>Rk,FileIcon:()=>sk,Flex:()=>YS,Focusable:()=>s0,FocusableComponent:()=>i0,Footnote:()=>P0,Form:()=>e0,Grid:()=>ZS,Gutter:()=>QS,H1:()=>m0,H2:()=>y0,H3:()=>b0,H4:()=>_0,H5:()=>x0,H6:()=>w0,Headline:()=>O0,Hgroup:()=>U0,HgroupButton:()=>z0,HgroupRows:()=>V0,Hoverable:()=>n0,Hr:()=>L0,I:()=>I0,Icon:()=>nk,IconButton:()=>yk,IconText:()=>ok,Iframe:()=>r0,Img:()=>t0,Inline:()=>GS,InlineFlex:()=>XS,InlineGrid:()=>JS,Input:()=>H0,Italic:()=>A0,KangorooButton:()=>gk,Li:()=>F0,Link:()=>My,Notification:()=>Pk,NumberInput:()=>W0,Ol:()=>j0,P:()=>S0,Picture:()=>l0,Radio:()=>G0,RadioHgroup:()=>Y0,Range:()=>Ck,RouteLink:()=>fk,RouterLink:()=>Fy,SHAPES:()=>tu,Select:()=>uk,Shape:()=>py,Span:()=>g0,SquareButton:()=>pk,Strong:()=>v0,Subhead:()=>R0,Svg:()=>u0,Text:()=>h0,Textarea:()=>J0,TextareaWithButton:()=>Q0,Theme:()=>c0,Title:()=>T0,Toggle:()=>X0,ToggleHgroup:()=>Z0,Tooltip:()=>wk,TooltipHidden:()=>Sk,TooltipParent:()=>kk,U:()=>C0,Ul:()=>N0,Underline:()=>E0,Video:()=>d0,depth:()=>eu,focusableRingEnabled:()=>Jf,getSystemGlobalTheme:()=>Ya});var cy={};I(cy,{Block:()=>KS,Flex:()=>YS,Grid:()=>ZS,Gutter:()=>QS,Inline:()=>GS,InlineFlex:()=>XS,InlineGrid:()=>JS});var KS={display:"block"},GS={display:"inline"},YS={display:"flex"},XS={display:"inline-flex"},ZS={display:"grid"},JS={display:"inline-grid"},QS={boxSize:"C1"};var ly={};I(ly,{Img:()=>t0});P();var t0={tag:"img",attr:{title:t=>t.title||t.alt,alt:t=>t.alt!=null?t.alt:t.title||"",src:t=>{let e=Yt(t);return e&&e.src||t.src},srcset:t=>{let e=Yt(t);return(e?Qi(e):"")||t.srcset}}};var fy={};I(fy,{Form:()=>e0});var e0={tag:"form"};var uy={};I(uy,{Iframe:()=>r0});var r0={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var dy={};I(dy,{Clickable:()=>o0,Focusable:()=>s0,FocusableComponent:()=>i0,Hoverable:()=>n0,focusableRingEnabled:()=>Jf});var WO={appearance:"none",fontFamily:"inherit"},n0={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}}},o0={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}};function Jf(t){let e=t.context&&t.context.designSystem;return!e||e.focusableRing!==!1}var s0={border:"none",outline:t=>Jf(t)?"solid 0 currentColor":"none",":focus-visible":{opacity:1,outline:t=>Jf(t)?"solid X currentColor":"none"},attr:{tabIndex:t=>t.tabIndex}},i0={extends:"Focusable",tag:"button",fontSize:"A",type:"button",border:"none",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",fontFamily:"inherit",cursor:"pointer",":disabled":{cursor:"not-allowed"},style:WO};var my={};I(my,{Picture:()=>l0});var gy={};I(gy,{Theme:()=>c0,getSystemGlobalTheme:()=>Ya});var hy={};I(hy,{Circle:()=>a0,SHAPES:()=>tu,Shape:()=>py,default:()=>qO,depth:()=>eu});P();var Ee=E(),eu={4:{boxShadow:`rgba(0,0,0,.10) 0 2${Ee.unit.default} 4${Ee.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${Ee.unit.default} 6${Ee.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${Ee.unit.default} 10${Ee.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${Ee.unit.default} 16${Ee.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${Ee.unit.default} 26${Ee.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${Ee.unit.default} 42${Ee.unit.default}`}},ls=t=>tt(t.shapeDirectionColor)||tt(t.borderColor)||tt(t.backgroundColor)||tt(t.background),Qf=t=>{let e=Ba.transition(t.transition,t);return e&&e.transition},tu={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:ls(t),transition:Qf(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:ls(t),transition:Qf(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:ls(t),transition:Qf(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:Qf(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${ls(t)} 25%, transparent 25%), linear-gradient(315deg, ${ls(t)} 25%, transparent 25%)`},"&:after":{background:ls(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)"}}}},py={deps:{exec:ft,getSpacingBasedOnRatio:ke,getMediaColor:Pt},classlist:{shape:t=>t.deps.exec(tu[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=tu[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}}},a0={round:"100%"},qO=py;P();var Ya=({context:t,state:e})=>{let r=e&&e.root,n=r&&r.globalTheme||t.designSystem&&t.designSystem.globalTheme;return n==="auto"?null:n},c0={deps:{depth:eu},classlist:{depth:t=>!Tt(t.depth)&&t.deps.depth[t.depth]}};var l0={deps:{getSystemGlobalTheme:Ya},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:Ya},tag:"source",attr:{media:t=>{let{key:e,context:r,deps:n}=t,{media:o}=r.designSystem,s=n.getSystemGlobalTheme(t),i=(t.media||e).slice(1);return i===s?"(min-width: 0px)":i==="dark"||i==="light"?"(max-width: 0px)":o[i]}}},Img:{width:"inherit",ignoreChildExtends:!0,height:"inherit",src:(t,e)=>t.parent?.src||e.src}};var yy={};I(yy,{AssetPicture:()=>f0});P();var f0={tag:"picture",children:t=>{let e=Yt(t);if(e)return ta(e,t.alt)}};var by={};I(by,{Svg:()=>u0});var u0={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:n}=e,o=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 p=d[1],h=e.document||(typeof document<"u"?document:null);if(!(h&&typeof h.getElementById=="function"&&h.getElementById(p))){let m=n&&n.scratchSystem&&n.scratchSystem.appendSVGSprite;r&&!r.__svgCache&&(r.__svgCache={}),typeof m=="function"?m({[p]:i},{document:h}):n&&typeof n.init=="function"&&n.init({svg:{[p]:i}},{document:h,emotion:e.emotion})}return a(p)}}if(!s&&i)return i;let c=t.spriteId;if(c)return a(c);if(o&&o[i])return a(i);let l=Symbol.for(i),f=o[l];if(f&&o[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=o[l]=`svg-${(u>>>0).toString(36)}`,n.init({svg:{[f]:i}},{document:e.document,emotion:e.emotion}),a(f)}};var _y={};I(_y,{Video:()=>d0});P();var d0={tag:"video",controls:!0,attr:{src:t=>{let e=Yt(t);return e&&e.src||t.src}},children:t=>{let e=Yt(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 xy={};I(xy,{Audio:()=>p0});P();var p0={tag:"audio",controls:!0,attr:{src:t=>{let e=Yt(t);return e&&e.src||t.src}},children:t=>{let e=Yt(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 wy={};I(wy,{B:()=>D0,Caption:()=>k0,Data:()=>$0,Footnote:()=>P0,H1:()=>m0,H2:()=>y0,H3:()=>b0,H4:()=>_0,H5:()=>x0,H6:()=>w0,Headline:()=>O0,I:()=>I0,Italic:()=>A0,P:()=>S0,Span:()=>g0,Strong:()=>v0,Subhead:()=>R0,Text:()=>h0,Title:()=>T0,U:()=>C0,Underline:()=>E0});var h0={},g0={tag:"span"},m0={tag:"h1"},y0={tag:"h2"},b0={tag:"h3"},_0={tag:"h4"},x0={tag:"h5"},w0={tag:"h6"},S0={tag:"p"},k0={tag:"caption"},v0={tag:"strong",fontWeight:"700"},C0={tag:"u"},E0={tag:"u"},A0={tag:"i"},T0={},O0={tag:"h6",fontSize:"B",fontWeight:500},R0={tag:"span",fontSize:"Z1"},P0={tag:"span",fontSize:"Z"},D0={tag:"b"},I0={tag:"i"},$0={tag:"data"};var Sy={};I(Sy,{Box:()=>ru,Br:()=>M0,Hr:()=>L0,Li:()=>F0,Ol:()=>j0,Ul:()=>N0});var KO=t=>{if(!t.context)return;let{props:e,__ref:r}=t,n=de(e,t,{unpack:!1});r.__class=n},ru={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:KO},L0={tag:"hr",margin:"C1 0"},M0={tag:"br"},F0={tag:"li"},N0={tag:"ul",childExtends:{extends:"Li"}},j0={tag:"ol",childExtends:{extends:"Li"}};var ky={};I(ky,{Hgroup:()=>U0,HgroupButton:()=>z0,HgroupRows:()=>V0});var B0=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},U0={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:B0,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:B0,margin:"0",color:"paragraph"}},V0={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},z0={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var vy={};I(vy,{Input:()=>H0});var H0={extends:["Focusable"],tag:"input",border:"none",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 Cy={};I(Cy,{NumberInput:()=>W0});var W0={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 Ey={};I(Ey,{Checkbox:()=>q0,CheckboxHgroup:()=>K0});var q0={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 currentColor",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"}}},K0={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var Ay={};I(Ay,{Radio:()=>G0,RadioHgroup:()=>Y0});var G0={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}},Y0={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var Ty={};I(Ty,{Toggle:()=>X0,ToggleHgroup:()=>Z0});var X0={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}},Z0={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var Oy={};I(Oy,{Textarea:()=>J0,TextareaWithButton:()=>Q0});var J0={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"}},Q0={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 Ry={};I(Ry,{FileIcon:()=>sk,Icon:()=>nk,IconText:()=>ok});var tk=new Set,ek=(t,e)=>{if(!tk.has(t)&&(tk.add(t),typeof console<"u"&&console.warn)){let r=e&&e.__ref&&e.__ref.path,n=r&&r.length?` at <${r.join(".")}>`:"";console.warn(`[Icon] Unknown icon name "${t}"${n} \u2014 not registered in designSystem.icons, rendering the noIcon placeholder. Fix the name or register the icon in the design system.`)}},rk=new WeakMap,GO=t=>{let e=rk.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},rk.set(t,e)),e},YO=(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},XO=(t,e,r)=>{let n=r&&r.context&&r.context.document||(typeof document<"u"?document:null);st(t);try{let o=E();o&&!o.__svgCache&&(o.__svgCache={}),t.__svgCache||(t.__svgCache={});let s={};for(let i in e){let a=Ln(e[i],i);a&&(t.icons[i]=a,s[i]=a)}return t.useIconSprite&&n&&Object.keys(s).length&&Mn(s,{document:n}),Object.keys(s).length>0}finally{rt()}},ZO=(t,e,r,n,o)=>{let s=t&&t.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=GO(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(o),a.pending.has(e))return!0;let l=Promise.resolve().then(()=>i(e,t)).then(f=>{let u=YO(f,r);return u?XO(s,u,n):!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(p){console.error("[Icon] repaint error:",p)}})});return a.pending.set(e,l),!0},nk={extends:"Svg",width:"A",height:"A",display:"inline-block",style:{fill:"currentColor","*":{fill:"currentColor"}},onInit:(t,e,r)=>{let{parent:n}=t,{icons:o,useIconSprite:s,verbose:i}=r&&r.designSystem,{toCamelCase:a}=r&&r.utils,c=h=>{let g=h[".isActive"];if(g)return h.call("exec",g.name||g.icon)},l=(h,g,m)=>{let{semanticIcons:b}=m&&m.designSystem,{toCamelCase:_}=m&&m.utils,y=f(h,g),w=_(y).split(/([a-z])([A-Z])/g),v=w[1]?w[0]:y.split(".")[0].split(" ")[0],D=b&&b[v];if(D){let L=y.includes(".")?"sfsymbols."+y.split(".").slice(1).join("."):"sfsymbols";return y=D[L]||D[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=(h,g)=>{let{key:m}=h,b=h.call("exec",h.name||h.icon||m,h);return h.call("isString",b)&&b.includes("{{")&&(b=h.call("replaceLiteralsWithObjectFields",b)),h.call("isString",b)?b:m},u=t.src,d,p=()=>{let h=f(t,e),g=h;if(h.includes(" ")){let R=h.split(" ");h=R[0]+R.slice(1).map(V=>V.charAt(0).toUpperCase()+V.slice(1)).join("")}let m=a(h),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=n[".isActive"];n&&n.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 w;o[y]&&(w=y),o[m]?w=m:o[b[0]+b[1]]?w=b[0]+b[1]:o[b[0]]?w=b[0]:i&&t.warn("Can't find icon:",h,w);let v=o[w],D=n&&n.src||u;!v&&!D&&(ZO(r,g,m,t,V=>{if(!(d&&d._disposed)){if(!V)return ek(g,t);p()}})||ek(g,t));let L=s&&w,T=v||D||o.noIcon;if(!(t.spriteId===L&&t.src===T&&t.node&&t.node.innerHTML)&&(t.spriteId=L,t.src=T,typeof t.html=="function"&&t.node)){let R=t.context&&t.context.designSystem;R&&st(R);try{let V=t.html(t,t.state,t.context);V!=null&&typeof V!="function"&&(t.node.innerHTML=V)}finally{R&&rt()}}};d=K(p,{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"}},ok={display:"flex",align:"center center",lineHeight:1,".reversed":{flow:"row-reverse"},".vertical":{flow:"column"},Icon:{if:t=>{let{parent:e}=t,r=t.call("exec",t.icon,t);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},sk={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var Ny={};I(Ny,{A:()=>lk,Link:()=>My,RouteLink:()=>fk,RouterLink:()=>Fy});var Xa={};I(Xa,{default:()=>rR,getActiveRoute:()=>Ly,lastLevel:()=>ou,lastPathname:()=>nu,matchRoute:()=>Dy,parseQuery:()=>Iy,parseRoutePattern:()=>Py,router:()=>sr,runGuards:()=>$y});P();var ak=/^:(.+)/,ck=/^\*$/,ik=new Map,Py=t=>{let e=ik.get(t);if(e)return e;let r=t.replace(/^\//,"").split("/"),n=[],o=!1;for(let i=0;i<r.length;i++){let a=r[i].match(ak);a?n.push({index:i,name:a[1]}):ck.test(r[i])&&(o=!0)}let s={segments:r,params:n,hasWildcard:o,pattern:t};return ik.set(t,s),s},Dy=(t,e,r=0)=>{let o=t.replace(/^\//,"").split("/").filter(Boolean).slice(r),s="/"+(o[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=Py(l),u=JO(o,f);u>a&&(a=u,i=l,c=QO(o,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},JO=(t,e)=>{let{segments:r,hasWildcard:n}=e;if(!n&&r.length!==t.length&&r.length!==1&&r.length>t.length)return-1;let o=0,s=Math.min(r.length,t.length);for(let i=0;i<s;i++)if(r[i]===t[i])o+=3;else if(ak.test(r[i]))o+=1;else if(ck.test(r[i]))o+=.5;else return-1;return o},QO=(t,e)=>{let r={};for(let{index:n,name:o}of e.params)t[n]&&(r[o]=decodeURIComponent(t[n]));return r},Iy=t=>{if(!t||t==="?")return{};let e={};return new URLSearchParams(t).forEach((n,o)=>{e[o]!==void 0?(Array.isArray(e[o])||(e[o]=[e[o]]),e[o].push(n)):e[o]=n}),e},$y=async(t,e)=>{if(!t||!t.length)return!0;for(let r of t){let n=await r(e);if(n===!1)return!1;if(typeof n=="string")return n}return!0},Ly=(t=0,e)=>{e||(e=typeof C<"u"?C.location.pathname:"/");let n=e.split("/")[t+1];if(n)return`/${n}`},nu,ou=0,tR=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,eR={level:ou,pushState:!0,replace:!1,initialRender:!1,scrollToTop:!0,scrollToNode:!1,get scrollNode(){return typeof et<"u"&&(et.scrollingElement||et.documentElement)||null},scrollBody:!1,useFragment:!1,updateState:!0,scrollToOffset:0,contentElementKey:"content",scrollToOptions:{behavior:"smooth"},useParamsMatching:!0},sr=async(t,e,r={},n={})=>{let o=e||void 0,s=o?.context?.window||C,i=o?.context?.document||et,a={...eR,...o.context.routerOptions,...n};ou=a.lastLevel;let c=o.__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=tR(t);let u=typeof s.URL=="function"?s.URL:typeof globalThis<"u"&&globalThis.URL||URL,d=new u(f+t),{pathname:p,search:h,hash:g}=d,m=Iy(h),b=o.node,_=g&&g!==s.location.hash.slice(1),y=p!==nu;nu=p;let x=c.__routerRendered,w,v,D,L;if(a.useParamsMatching){let z=Dy(p,o.routes,a.level);w=z.key,v=z.routePath,D=z.content,L=z.params}else{w=Ly(a.level,p),v=w;let z=o.routes;D=z?z[w||"/"]||z["/*"]:null,L={}}let T=a.scrollToNode?b:a.scrollNode;if(o.state?.root?.debugging){o.state.root.debugging=!1;return}if(!D){a.onNotFound?a.onNotFound({pathname:p,route:w,element:o}):a.silent||console.warn("[smbls/router] no content matched for path",p,"\u2014 available routes:",Object.keys(o.routes||{}));return}if(a.guards&&a.guards.length){let z={pathname:p,route:w,params:L,query:m,hash:g,element:o,state:r},H=await $y(a.guards,z);if(H===!1)return;if(typeof H=="string")return sr(H,e,r,{...n,guards:[]})}if(a.pushState){let z=p+(h||"")+(g||"");try{a.replace?s.history.replaceState(r,null,z):s.history.pushState(r,null,z)}catch{}}if(y||!_){let z={route:w,routePath:v,hash:g,params:L,query:m,debugging:!1};a.updateState&&o.state.update(z,{preventContentUpdate:!0})}let R=!x||x.content!==D||x.route!==w;if(y||R||a.force===!0){l&&a.removeOldElement&&o[l].remove();let z=o.__ref?.origin?.content,H={};if(z)for(let B in z){let Z=z[B];B==="__ref"||B==="props"||B==="node"||B==="parent"||B==="key"||(typeof Z=="string"||typeof Z=="number"||typeof Z=="boolean"||typeof Z=="object"&&Z!==null&&!Z.node&&!Z.__ref)&&(H[B]=Z)}let nt={...H,...typeof D=="object"?D:{extends:D}};a.useFragment&&(nt.tag="fragment");try{if(typeof o?.set!="function")return;o.set(nt,{contentElementKey:l}),c.__routerRendered={content:D,route:w}}catch(B){console.error("[smbls/router] failed to render route content",p,B)}}let Bt=!y&&_;if(a.scrollToTop&&!Bt&&T?.scrollTo&&T.scrollTo({...a.scrollToOptions||{},top:0,left:0}),a.scrollToNode&&D[l]?.node?.scrollTo&&D[l].node.scrollTo({...a.scrollToOptions||{},top:0,left:0}),g){let z=i.getElementById(g.slice(1));if(z&&T?.scrollTo){let H=s.getComputedStyle?s.getComputedStyle(z):null,nt=H&&parseFloat(H.scrollMarginTop)||0,B=z.getBoundingClientRect().top+T.scrollTop-nt-(a.scrollToOffset||0);T.scrollTo({...a.scrollToOptions||{},top:B,left:0})}}Pr("routeChanged",o,a)},rR=sr;var nR=(t,e,r)=>{let{context:n}=e,{href:o,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",o,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}=n,d=e.__ref.root,p=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&&!p){t.preventDefault();try{let h=d;if(u&&u.customRouterElement){let g=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let b of g){if(!m||!m[b]){m=null;break}m=m[b]}m&&(h=m,d.routes&&(h.routes=d.routes))}(f.router||l.router||c.router||sr)(a,h,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(h){console.warn(h)}}},My={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:t=>Yr(t,t.href)||Yr(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:nR},lk={extends:"Link"},Fy={onClick:(t,e,r)=>{let{context:n}=e,{href:o,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",o,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}=n,d=e.__ref.root,p=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&&!p){t.preventDefault();try{let h=d;if(u&&u.customRouterElement){let g=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let b of g){if(!m||!m[b]){m=null;break}m=m[b]}m&&(h=m,d.routes&&(h.routes=d.routes))}(f.router||l.router||c.router||sr)(a,h,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(h){console.warn(h)}}}},fk={extends:[My,Fy]};var jy={};I(jy,{Select:()=>uk});var uk={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 By={};I(By,{Button:()=>dk,ButtonSet:()=>mk,CircleButton:()=>hk,IconButton:()=>yk,KangorooButton:()=>gk,SquareButton:()=>pk});var dk={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)},pk={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"},hk={extends:"SquareButton",round:"C"},gk={extends:"Button",childExtends:"IconText"},mk={tag:"nav",display:"flex",childExtends:"SquareButton"},yk={extends:["SquareButton","ClickableItem"],round:"Z"};var Uy={};I(Uy,{Dialog:()=>bk,DialogFooter:()=>xk,DialogHeader:()=>_k});var bk={display:"flex",tag:"dialog",flow:"column",border:"0",theme:"dialog",round:"Z2"},_k={extends:"Hgroup",minWidth:"100%",gap:"A",Title:{align:"center space-between",Text:{text:"Title"},SquareButton:{icon:"x",theme:"transparent"}},Paragraph:{color:"caption"}},xk={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 Vy={};I(Vy,{Tooltip:()=>wk,TooltipHidden:()=>Sk,TooltipParent:()=>kk});P();var wk={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=>Ct(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)}},Sk={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)}},kk={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:r}=t,n=e||r;if(!n)return;let o=n&&n[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":o||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var zy={};I(zy,{Avatar:()=>vk});var oR=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)},vk={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=oR(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 Hy={};I(Hy,{Range:()=>Ck});var Ck={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:Ro("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:Ro("#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 n=t.call("exec",t[e],t);return(t.call("isFunction",n)?n(t,t.state):n!==void 0?n: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 Wy={};I(Wy,{Dropdown:()=>Ek,DropdownList:()=>Ak,DropdownParent:()=>Tk,DropdownParentFocus:()=>Ok,DropdownSiblingFocus:()=>Rk});var Ek={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"},Ak={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"}}},Tk={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},Ok={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()}}},Rk={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 qy={};I(qy,{Notification:()=>Pk});var Pk={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 Un=Object.assign({},cy,ly,fy,uy,dy,my,yy,by,hy,_y,xy,gy,wy,Sy,ky,vy,Cy,Ey,Ay,Ty,Oy,Ry,Ny,jy,By,Uy,Vy,zy,Hy,Wy,qy);function su(t){if(t==null)return 0;if(typeof t!="object")return Dk(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let n=0;n<t.length;n++)e=(e^su(t[n]))*16777619;return e>>>0}let r=Object.keys(t).sort();for(let n=0;n<r.length;n++)e=(e^Dk(r[n]))*16777619,e=(e^su(t[r[n]]))*16777619;return e>>>0}function Dk(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e}function iu(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 o=0;o<t.length;o++)if(!iu(t[o],e[o]))return!1;return!0}let r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(let o=0;o<r.length;o++){let s=r[o];if(!Object.prototype.hasOwnProperty.call(e,s)||!iu(t[s],e[s]))return!1}return!0}function Ky(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,n={};for(let o in t)if(o in e){let s=Ky(t[o],e[o]);n[o]=s,s!==t[o]&&(r=!0)}else n[o]=t[o];for(let o in e)o in t||(n[o]=e[o],r=!0);return r?n:t}function Gy(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 n in e){let o=e[n];o&&typeof o=="object"&&!Array.isArray(o)&&t[n]&&typeof t[n]=="object"&&!Array.isArray(t[n])?Gy(t[n],o,r):t[n]=o}return t}function Qr(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 us(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Za(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Qr(e)}function Ik(t){return t.split(`
83
+ )`};var oR={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"}}}},sR={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},iR={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"}}},WS={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...oR,...sR,...iR,none:{color:"none",background:"none"},transparent:{color:"currentColor",background:"transparent"}};var qS={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var KS={ratio:1.618,subSequence:!0};var GS={SourceSans:[{url:""}]},YS={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 XS={symbols:'<svg xmlns="http://www.w3.org/2000/svg" width="41" height="42" viewBox="0 0 41 42"><path fill="currentColor" fill-rule="evenodd" d="M26.6448969,0.699064106 C31.4862479,1.83000067 35.6718819,4.48073656 38.3104478,8.91022511 C40.5212645,12.5974948 41.4936378,17.0951724 40.5085112,21.3679841 C39.7174644,25.0315254 37.8558379,27.853625 34.8002871,29.8369535 C31.9792925,31.7073227 27.90737,32.069064 24.6776501,31.3213124 C23.2887047,30.9944607 20.6411869,29.9775216 19.044333,28.0178349 C17.5928447,26.2365433 17.1250067,23.5192397 17.0461096,22.8419583 C16.9044422,21.6258334 17.1065683,20.249997 17.3800113,19.0276209 C17.9614095,16.4655592 18.9984397,14.7924534 21.1401118,13.3818866 C22.95018,12.1750388 24.6834696,11.8738651 26.7601335,12.3496124 C28.1855093,12.6880929 29.4520072,13.526716 30.3514025,14.7276098 C30.6271426,15.093878 30.8260324,15.4389318 31.059655,15.8362933 L30.9598079,15.7715366 C29.6377659,14.9422902 28.1654404,14.6590001 26.6448969,15.0752526 C25.2996601,15.4486698 24.1453463,16.3687006 23.4390969,17.6304467 C22.6973258,18.9448239 22.4839364,20.5087166 22.8465467,21.9733145 C23.2152637,23.4394215 24.1276197,24.6832715 25.381967,25.429977 C26.7647836,26.2608222 28.5893081,26.47537 30.1320438,26.0161118 C32.0344739,25.4497656 33.5958796,24.1165457 34.5824098,22.3233381 C35.8078311,20.0959926 36.0316242,17.5753145 35.4197363,15.1376991 C34.8712232,12.9726344 33.491011,11.1258939 31.7578503,9.86101942 C28.3978494,7.40873928 23.8145474,6.88014849 19.8961329,8.1555193 C16.9596954,9.11146975 14.399202,11.0657028 12.6221782,13.707146 C10.5375814,16.8894059 9.73736372,20.794518 10.3986926,24.5579956 C10.9302311,27.7327705 12.5716868,31.0242929 14.8485647,33.1339502 C15.5517576,33.7855358 16.0056239,34.2996296 16.8186608,34.9238068 C16.1252729,35.6670587 15.729719,36.1210912 15.0276006,36.8553491 L10.5425168,41.6144377 C8.59431563,40.2572487 6.84060794,38.6181461 5.33246714,36.7448351 C1.65619854,32.1632109 -0.0655234106,26.1858125 0.562658817,20.1851649 C1.1000136,14.4158268 3.81414269,9.08050481 8.0996615,5.36924966 C12.3107417,1.69300072 17.6911238,0.0107792851 23.1108097,0.299129816 C25.006381,0.458182488 26.18441,0.591493918 26.6448969,0.699064106 Z"/></svg>',logo:'<svg xmlns="http://www.w3.org/2000/svg" width="41" height="42" viewBox="0 0 41 42"><path fill="currentColor" fill-rule="evenodd" d="M26.6448969,0.699064106 C31.4862479,1.83000067 35.6718819,4.48073656 38.3104478,8.91022511 C40.5212645,12.5974948 41.4936378,17.0951724 40.5085112,21.3679841 C39.7174644,25.0315254 37.8558379,27.853625 34.8002871,29.8369535 C31.9792925,31.7073227 27.90737,32.069064 24.6776501,31.3213124 C23.2887047,30.9944607 20.6411869,29.9775216 19.044333,28.0178349 C17.5928447,26.2365433 17.1250067,23.5192397 17.0461096,22.8419583 C16.9044422,21.6258334 17.1065683,20.249997 17.3800113,19.0276209 C17.9614095,16.4655592 18.9984397,14.7924534 21.1401118,13.3818866 C22.95018,12.1750388 24.6834696,11.8738651 26.7601335,12.3496124 C28.1855093,12.6880929 29.4520072,13.526716 30.3514025,14.7276098 C30.6271426,15.093878 30.8260324,15.4389318 31.059655,15.8362933 L30.9598079,15.7715366 C29.6377659,14.9422902 28.1654404,14.6590001 26.6448969,15.0752526 C25.2996601,15.4486698 24.1453463,16.3687006 23.4390969,17.6304467 C22.6973258,18.9448239 22.4839364,20.5087166 22.8465467,21.9733145 C23.2152637,23.4394215 24.1276197,24.6832715 25.381967,25.429977 C26.7647836,26.2608222 28.5893081,26.47537 30.1320438,26.0161118 C32.0344739,25.4497656 33.5958796,24.1165457 34.5824098,22.3233381 C35.8078311,20.0959926 36.0316242,17.5753145 35.4197363,15.1376991 C34.8712232,12.9726344 33.491011,11.1258939 31.7578503,9.86101942 C28.3978494,7.40873928 23.8145474,6.88014849 19.8961329,8.1555193 C16.9596954,9.11146975 14.399202,11.0657028 12.6221782,13.707146 C10.5375814,16.8894059 9.73736372,20.794518 10.3986926,24.5579956 C10.9302311,27.7327705 12.5716868,31.0242929 14.8485647,33.1339502 C15.5517576,33.7855358 16.0056239,34.2996296 16.8186608,34.9238068 C16.1252729,35.6670587 15.729719,36.1210912 15.0276006,36.8553491 L10.5425168,41.6144377 C8.59431563,40.2572487 6.84060794,38.6181461 5.33246714,36.7448351 C1.65619854,32.1632109 -0.0655234106,26.1858125 0.562658817,20.1851649 C1.1000136,14.4158268 3.81414269,9.08050481 8.0996615,5.36924966 C12.3107417,1.69300072 17.6911238,0.0107792851 23.1108097,0.299129816 C25.006381,0.458182488 26.18441,0.591493918 26.6448969,0.699064106 Z"/></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 ZS={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 JS={base:150,ratio:1.333,unit:"ms",subSequence:!0};var QS={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var Xa={version:"0.0.1",color:zS,gradient:HS,theme:WS,typography:qS,spacing:KS,font:GS,fontFamily:YS,timing:JS,icons:XS,media:ZS,sizes:QS,reset:{html:{},body:{}},animation:{fadeIn:{from:{opacity:0},to:{opacity:1}}},devices:{},class:{},svg:{},grid:{},shape:{}};var us={};D(us,{A:()=>mk,AssetPicture:()=>y0,Audio:()=>x0,Avatar:()=>Pk,B:()=>j0,Block:()=>t0,Box:()=>ou,Br:()=>z0,Button:()=>_k,ButtonSet:()=>kk,COMPONENTS:()=>Un,Caption:()=>R0,Checkbox:()=>Q0,CheckboxHgroup:()=>tk,Circle:()=>h0,CircleButton:()=>wk,Clickable:()=>u0,Data:()=>U0,Dialog:()=>Ck,DialogFooter:()=>Ak,DialogHeader:()=>Ek,Dropdown:()=>Ik,DropdownList:()=>$k,DropdownParent:()=>Lk,DropdownParentFocus:()=>Mk,DropdownSiblingFocus:()=>Fk,FileIcon:()=>dk,Flex:()=>r0,Focusable:()=>d0,FocusableComponent:()=>p0,Footnote:()=>N0,Form:()=>c0,Grid:()=>o0,Gutter:()=>i0,H1:()=>k0,H2:()=>v0,H3:()=>C0,H4:()=>E0,H5:()=>A0,H6:()=>T0,Headline:()=>M0,Hgroup:()=>G0,HgroupButton:()=>X0,HgroupRows:()=>Y0,Hoverable:()=>f0,Hr:()=>V0,I:()=>B0,Icon:()=>fk,IconButton:()=>vk,IconText:()=>uk,Iframe:()=>l0,Img:()=>a0,Inline:()=>e0,InlineFlex:()=>n0,InlineGrid:()=>s0,Input:()=>Z0,Italic:()=>$0,KangorooButton:()=>Sk,Li:()=>H0,Link:()=>By,Notification:()=>Nk,NumberInput:()=>J0,Ol:()=>q0,P:()=>O0,Picture:()=>m0,Radio:()=>ek,RadioHgroup:()=>rk,Range:()=>Dk,RouteLink:()=>yk,RouterLink:()=>Uy,SHAPES:()=>ru,Select:()=>bk,Shape:()=>yy,Span:()=>S0,SquareButton:()=>xk,Strong:()=>P0,Subhead:()=>F0,Svg:()=>b0,Text:()=>w0,Textarea:()=>sk,TextareaWithButton:()=>ik,Theme:()=>g0,Title:()=>L0,Toggle:()=>nk,ToggleHgroup:()=>ok,Tooltip:()=>Tk,TooltipHidden:()=>Ok,TooltipParent:()=>Rk,U:()=>D0,Ul:()=>W0,Underline:()=>I0,Video:()=>_0,depth:()=>nu,focusableRingEnabled:()=>tu,getSystemGlobalTheme:()=>Za});var dy={};D(dy,{Block:()=>t0,Flex:()=>r0,Grid:()=>o0,Gutter:()=>i0,Inline:()=>e0,InlineFlex:()=>n0,InlineGrid:()=>s0});var t0={display:"block"},e0={display:"inline"},r0={display:"flex"},n0={display:"inline-flex"},o0={display:"grid"},s0={display:"inline-grid"},i0={boxSize:"C1"};var py={};D(py,{Img:()=>a0});R();var a0={tag:"img",attr:{title:t=>t.title||t.alt,alt:t=>t.alt!=null?t.alt:t.title||"",src:t=>{let e=Yt(t);return e&&e.src||t.src},srcset:t=>{let e=Yt(t);return(e?ea(e):"")||t.srcset}}};var hy={};D(hy,{Form:()=>c0});var c0={tag:"form"};var gy={};D(gy,{Iframe:()=>l0});var l0={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var my={};D(my,{Clickable:()=>u0,Focusable:()=>d0,FocusableComponent:()=>p0,Hoverable:()=>f0,focusableRingEnabled:()=>tu});var aR={appearance:"none",fontFamily:"inherit"},f0={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}}},u0={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}};function tu(t){let e=t.context&&t.context.designSystem;return!e||e.focusableRing!==!1}var d0={border:"none",outline:t=>tu(t)?"solid 0 currentColor":"none",":focus-visible":{opacity:1,outline:t=>tu(t)?"solid X currentColor":"none"},attr:{tabIndex:t=>t.tabIndex}},p0={extends:"Focusable",tag:"button",fontSize:"A",type:"button",border:"none",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",fontFamily:"inherit",cursor:"pointer",":disabled":{cursor:"not-allowed"},style:aR};var xy={};D(xy,{Picture:()=>m0});var _y={};D(_y,{Theme:()=>g0,getSystemGlobalTheme:()=>Za});var by={};D(by,{Circle:()=>h0,SHAPES:()=>ru,Shape:()=>yy,default:()=>cR,depth:()=>nu});R();var Ae=E(),nu={4:{boxShadow:`rgba(0,0,0,.10) 0 2${Ae.unit.default} 4${Ae.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${Ae.unit.default} 6${Ae.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${Ae.unit.default} 10${Ae.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${Ae.unit.default} 16${Ae.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${Ae.unit.default} 26${Ae.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${Ae.unit.default} 42${Ae.unit.default}`}},fs=t=>Q(t.shapeDirectionColor)||Q(t.borderColor)||Q(t.backgroundColor)||Q(t.background),eu=t=>{let e=Va.transition(t.transition,t);return e&&e.transition},ru={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:fs(t),transition:eu(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:fs(t),transition:eu(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:fs(t),transition:eu(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:eu(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${fs(t)} 25%, transparent 25%), linear-gradient(315deg, ${fs(t)} 25%, transparent 25%)`},"&:after":{background:fs(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)"}}}},yy={deps:{exec:ft,getSpacingBasedOnRatio:ve,getMediaColor:Dt},classlist:{shape:t=>t.deps.exec(ru[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=ru[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}}},h0={round:"100%"},cR=yy;R();var Za=({context:t,state:e})=>{let r=e&&e.root,n=r&&r.globalTheme||t.designSystem&&t.designSystem.globalTheme;return n==="auto"?null:n},g0={deps:{depth:nu},classlist:{depth:t=>!Ot(t.depth)&&t.deps.depth[t.depth]}};var m0={deps:{getSystemGlobalTheme:Za},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:Za},tag:"source",attr:{media:t=>{let{key:e,context:r,deps:n}=t,{media:o}=r.designSystem,s=n.getSystemGlobalTheme(t),i=(t.media||e).slice(1);return i===s?"(min-width: 0px)":i==="dark"||i==="light"?"(max-width: 0px)":o[i]}}},Img:{width:"inherit",ignoreChildExtends:!0,height:"inherit",src:(t,e)=>t.parent?.src||e.src}};var wy={};D(wy,{AssetPicture:()=>y0});R();var y0={tag:"picture",children:t=>{let e=Yt(t);if(e)return ra(e,t.alt)}};var Sy={};D(Sy,{Svg:()=>b0});var b0={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:n}=e,o=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 p=d[1],h=e.document||(typeof document<"u"?document:null);if(!(h&&typeof h.getElementById=="function"&&h.getElementById(p))){let m=n&&n.scratchSystem&&n.scratchSystem.appendSVGSprite;r&&!r.__svgCache&&(r.__svgCache={}),typeof m=="function"?m({[p]:i},{document:h}):n&&typeof n.init=="function"&&n.init({svg:{[p]:i}},{document:h,emotion:e.emotion})}return a(p)}}if(!s&&i)return i;let c=t.spriteId;if(c)return a(c);if(o&&o[i])return a(i);let l=Symbol.for(i),f=o[l];if(f&&o[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=o[l]=`svg-${(u>>>0).toString(36)}`,n.init({svg:{[f]:i}},{document:e.document,emotion:e.emotion}),a(f)}};var ky={};D(ky,{Video:()=>_0});R();var _0={tag:"video",controls:!0,attr:{src:t=>{let e=Yt(t);return e&&e.src||t.src}},children:t=>{let e=Yt(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 vy={};D(vy,{Audio:()=>x0});R();var x0={tag:"audio",controls:!0,attr:{src:t=>{let e=Yt(t);return e&&e.src||t.src}},children:t=>{let e=Yt(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 Cy={};D(Cy,{B:()=>j0,Caption:()=>R0,Data:()=>U0,Footnote:()=>N0,H1:()=>k0,H2:()=>v0,H3:()=>C0,H4:()=>E0,H5:()=>A0,H6:()=>T0,Headline:()=>M0,I:()=>B0,Italic:()=>$0,P:()=>O0,Span:()=>S0,Strong:()=>P0,Subhead:()=>F0,Text:()=>w0,Title:()=>L0,U:()=>D0,Underline:()=>I0});var w0={},S0={tag:"span"},k0={tag:"h1"},v0={tag:"h2"},C0={tag:"h3"},E0={tag:"h4"},A0={tag:"h5"},T0={tag:"h6"},O0={tag:"p"},R0={tag:"caption"},P0={tag:"strong",fontWeight:"700"},D0={tag:"u"},I0={tag:"u"},$0={tag:"i"},L0={},M0={tag:"h6",fontSize:"B",fontWeight:500},F0={tag:"span",fontSize:"Z1"},N0={tag:"span",fontSize:"Z"},j0={tag:"b"},B0={tag:"i"},U0={tag:"data"};var Ey={};D(Ey,{Box:()=>ou,Br:()=>z0,Hr:()=>V0,Li:()=>H0,Ol:()=>q0,Ul:()=>W0});var lR=t=>{if(!t.context)return;let{props:e,__ref:r}=t,n=pe(e,t,{unpack:!1});r.__class=n},ou={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:lR},V0={tag:"hr",margin:"C1 0"},z0={tag:"br"},H0={tag:"li"},W0={tag:"ul",childExtends:{extends:"Li"}},q0={tag:"ol",childExtends:{extends:"Li"}};var Ay={};D(Ay,{Hgroup:()=>G0,HgroupButton:()=>X0,HgroupRows:()=>Y0});var K0=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},G0={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:K0,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:K0,margin:"0",color:"paragraph"}},Y0={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},X0={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var Ty={};D(Ty,{Input:()=>Z0});var Z0={extends:["Focusable"],tag:"input",border:"none",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 Oy={};D(Oy,{NumberInput:()=>J0});var J0={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 Ry={};D(Ry,{Checkbox:()=>Q0,CheckboxHgroup:()=>tk});var Q0={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 currentColor",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"}}},tk={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var Py={};D(Py,{Radio:()=>ek,RadioHgroup:()=>rk});var ek={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}},rk={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var Dy={};D(Dy,{Toggle:()=>nk,ToggleHgroup:()=>ok});var nk={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}},ok={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var Iy={};D(Iy,{Textarea:()=>sk,TextareaWithButton:()=>ik});var sk={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"}},ik={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 $y={};D($y,{FileIcon:()=>dk,Icon:()=>fk,IconText:()=>uk});var ak=new Set,ck=(t,e)=>{if(!ak.has(t)&&(ak.add(t),typeof console<"u"&&console.warn)){let r=e&&e.__ref&&e.__ref.path,n=r&&r.length?` at <${r.join(".")}>`:"";console.warn(`[Icon] Unknown icon name "${t}"${n} \u2014 not registered in designSystem.icons, rendering the noIcon placeholder. Fix the name or register the icon in the design system.`)}},lk=new WeakMap,fR=t=>{let e=lk.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},lk.set(t,e)),e},uR=(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},dR=(t,e,r)=>{let n=r&&r.context&&r.context.document||(typeof document<"u"?document:null);it(t);try{let o=E();o&&!o.__svgCache&&(o.__svgCache={}),t.__svgCache||(t.__svgCache={});let s={};for(let i in e){let a=Ln(e[i],i);a&&(t.icons[i]=a,s[i]=a)}return t.useIconSprite&&n&&Object.keys(s).length&&Mn(s,{document:n}),Object.keys(s).length>0}finally{nt()}},pR=(t,e,r,n,o)=>{let s=t&&t.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=fR(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(o),a.pending.has(e))return!0;let l=Promise.resolve().then(()=>i(e,t)).then(f=>{let u=uR(f,r);return u?dR(s,u,n):!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(p){console.error("[Icon] repaint error:",p)}})});return a.pending.set(e,l),!0},fk={extends:"Svg",width:"A",height:"A",display:"inline-block",style:{fill:"currentColor","*":{fill:"currentColor"}},onInit:(t,e,r)=>{let{parent:n}=t,{icons:o,useIconSprite:s,verbose:i}=r&&r.designSystem,{toCamelCase:a}=r&&r.utils,c=h=>{let g=h[".isActive"];if(g)return h.call("exec",g.name||g.icon)},l=(h,g,m)=>{let{semanticIcons:b}=m&&m.designSystem,{toCamelCase:_}=m&&m.utils,y=f(h,g),w=_(y).split(/([a-z])([A-Z])/g),v=w[1]?w[0]:y.split(".")[0].split(" ")[0],P=b&&b[v];if(P){let $=y.includes(".")?"sfsymbols."+y.split(".").slice(1).join("."):"sfsymbols";return y=P[$]||P[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=(h,g)=>{let{key:m}=h,b=h.call("exec",h.name||h.icon||m,h);return h.call("isString",b)&&b.includes("{{")&&(b=h.call("replaceLiteralsWithObjectFields",b)),h.call("isString",b)?b:m},u=t.src,d,p=()=>{let h=f(t,e),g=h;if(h.includes(" ")){let A=h.split(" ");h=A[0]+A.slice(1).map(F=>F.charAt(0).toUpperCase()+F.slice(1)).join("")}let m=a(h),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=n[".isActive"];n&&n.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 w;o[y]&&(w=y),o[m]?w=m:o[b[0]+b[1]]?w=b[0]+b[1]:o[b[0]]?w=b[0]:i&&t.warn("Can't find icon:",h,w);let v=o[w],P=n&&n.src||u;!v&&!P&&(pR(r,g,m,t,F=>{if(!(d&&d._disposed)){if(!F)return ck(g,t);p()}})||ck(g,t));let $=s&&w,I=v||P||o.noIcon;if(!(t.spriteId===$&&t.src===I&&t.node&&t.node.innerHTML)&&(t.spriteId=$,t.src=I,typeof t.html=="function"&&t.node)){let A=t.context&&t.context.designSystem;A&&it(A);try{let F=t.html(t,t.state,t.context);F!=null&&typeof F!="function"&&(t.node.innerHTML=F)}finally{A&&nt()}}};d=K(p,{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"}},uk={display:"flex",align:"center center",lineHeight:1,".reversed":{flow:"row-reverse"},".vertical":{flow:"column"},Icon:{if:t=>{let{parent:e}=t,r=t.call("exec",t.icon,t);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},dk={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var Vy={};D(Vy,{A:()=>mk,Link:()=>By,RouteLink:()=>yk,RouterLink:()=>Uy});var Ja={};D(Ja,{default:()=>bR,getActiveRoute:()=>jy,lastLevel:()=>iu,lastPathname:()=>su,matchRoute:()=>My,parseQuery:()=>Fy,parseRoutePattern:()=>Ly,router:()=>sr,runGuards:()=>Ny});R();var hk=/^:(.+)/,gk=/^\*$/,pk=new Map,Ly=t=>{let e=pk.get(t);if(e)return e;let r=t.replace(/^\//,"").split("/"),n=[],o=!1;for(let i=0;i<r.length;i++){let a=r[i].match(hk);a?n.push({index:i,name:a[1]}):gk.test(r[i])&&(o=!0)}let s={segments:r,params:n,hasWildcard:o,pattern:t};return pk.set(t,s),s},My=(t,e,r=0)=>{let o=t.replace(/^\//,"").split("/").filter(Boolean).slice(r),s="/"+(o[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=Ly(l),u=hR(o,f);u>a&&(a=u,i=l,c=gR(o,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},hR=(t,e)=>{let{segments:r,hasWildcard:n}=e;if(!n&&r.length!==t.length&&r.length!==1&&r.length>t.length)return-1;let o=0,s=Math.min(r.length,t.length);for(let i=0;i<s;i++)if(r[i]===t[i])o+=3;else if(hk.test(r[i]))o+=1;else if(gk.test(r[i]))o+=.5;else return-1;return o},gR=(t,e)=>{let r={};for(let{index:n,name:o}of e.params)t[n]&&(r[o]=decodeURIComponent(t[n]));return r},Fy=t=>{if(!t||t==="?")return{};let e={};return new URLSearchParams(t).forEach((n,o)=>{e[o]!==void 0?(Array.isArray(e[o])||(e[o]=[e[o]]),e[o].push(n)):e[o]=n}),e},Ny=async(t,e)=>{if(!t||!t.length)return!0;for(let r of t){let n=await r(e);if(n===!1)return!1;if(typeof n=="string")return n}return!0},jy=(t=0,e)=>{e||(e=typeof C<"u"?C.location.pathname:"/");let n=e.split("/")[t+1];if(n)return`/${n}`},su,iu=0,mR=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,yR={level:iu,pushState:!0,replace:!1,initialRender:!1,scrollToTop:!0,scrollToNode:!1,get scrollNode(){return typeof rt<"u"&&(rt.scrollingElement||rt.documentElement)||null},scrollBody:!1,useFragment:!1,updateState:!0,scrollToOffset:0,contentElementKey:"content",scrollToOptions:{behavior:"smooth"},useParamsMatching:!0},sr=async(t,e,r={},n={})=>{let o=e||void 0,s=o?.context?.window||C,i=o?.context?.document||rt,a={...yR,...o.context.routerOptions,...n};iu=a.lastLevel;let c=o.__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=mR(t);let u=typeof s.URL=="function"?s.URL:typeof globalThis<"u"&&globalThis.URL||URL,d=new u(f+t),{pathname:p,search:h,hash:g}=d,m=Fy(h),b=o.node,_=g&&g!==s.location.hash.slice(1),y=p!==su;su=p;let x=c.__routerRendered,w,v,P,$;if(a.useParamsMatching){let H=My(p,o.routes,a.level);w=H.key,v=H.routePath,P=H.content,$=H.params}else{w=jy(a.level,p),v=w;let H=o.routes;P=H?H[w||"/"]||H["/*"]:null,$={}}let I=a.scrollToNode?b:a.scrollNode;if(o.state?.root?.debugging){o.state.root.debugging=!1;return}if(!P){a.onNotFound?a.onNotFound({pathname:p,route:w,element:o}):a.silent||console.warn("[smbls/router] no content matched for path",p,"\u2014 available routes:",Object.keys(o.routes||{}));return}if(a.guards&&a.guards.length){let H={pathname:p,route:w,params:$,query:m,hash:g,element:o,state:r},tt=await Ny(a.guards,H);if(tt===!1)return;if(typeof tt=="string")return sr(tt,e,r,{...n,guards:[]})}if(a.pushState){let H=p+(h||"")+(g||"");try{a.replace?s.history.replaceState(r,null,H):s.history.pushState(r,null,H)}catch{}}if(y||!_){let H={route:w,routePath:v,hash:g,params:$,query:m,debugging:!1};a.updateState&&o.state.update(H,{preventContentUpdate:!0})}let A=!x||x.content!==P||x.route!==w;if(y||A||a.force===!0){l&&a.removeOldElement&&o[l].remove();let H=o.__ref?.origin?.content,tt={};if(H)for(let V in H){let W=H[V];V==="__ref"||V==="props"||V==="node"||V==="parent"||V==="key"||(typeof W=="string"||typeof W=="number"||typeof W=="boolean"||typeof W=="object"&&W!==null&&!W.node&&!W.__ref)&&(tt[V]=W)}let et={...tt,...typeof P=="object"?P:{extends:P}};a.useFragment&&(et.tag="fragment");try{if(typeof o?.set!="function")return;o.set(et,{contentElementKey:l}),c.__routerRendered={content:P,route:w}}catch(V){console.error("[smbls/router] failed to render route content",p,V)}}let Mt=!y&&_;if(a.scrollToTop&&!Mt&&I?.scrollTo&&I.scrollTo({...a.scrollToOptions||{},top:0,left:0}),a.scrollToNode&&P[l]?.node?.scrollTo&&P[l].node.scrollTo({...a.scrollToOptions||{},top:0,left:0}),g){let H=i.getElementById(g.slice(1));if(H&&I?.scrollTo){let tt=s.getComputedStyle?s.getComputedStyle(H):null,et=tt&&parseFloat(tt.scrollMarginTop)||0,V=H.getBoundingClientRect().top+I.scrollTop-et-(a.scrollToOffset||0);I.scrollTo({...a.scrollToOptions||{},top:V,left:0})}}Pr("routeChanged",o,a)},bR=sr;var _R=(t,e,r)=>{let{context:n}=e,{href:o,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",o,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}=n,d=e.__ref.root,p=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&&!p){t.preventDefault();try{let h=d;if(u&&u.customRouterElement){let g=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let b of g){if(!m||!m[b]){m=null;break}m=m[b]}m&&(h=m,d.routes&&(h.routes=d.routes))}(f.router||l.router||c.router||sr)(a,h,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(h){console.warn(h)}}},By={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:t=>Yr(t,t.href)||Yr(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:_R},mk={extends:"Link"},Uy={onClick:(t,e,r)=>{let{context:n}=e,{href:o,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",o,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}=n,d=e.__ref.root,p=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&&!p){t.preventDefault();try{let h=d;if(u&&u.customRouterElement){let g=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let b of g){if(!m||!m[b]){m=null;break}m=m[b]}m&&(h=m,d.routes&&(h.routes=d.routes))}(f.router||l.router||c.router||sr)(a,h,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(h){console.warn(h)}}}},yk={extends:[By,Uy]};var zy={};D(zy,{Select:()=>bk});var bk={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 Hy={};D(Hy,{Button:()=>_k,ButtonSet:()=>kk,CircleButton:()=>wk,IconButton:()=>vk,KangorooButton:()=>Sk,SquareButton:()=>xk});var _k={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)},xk={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"},wk={extends:"SquareButton",round:"C"},Sk={extends:"Button",childExtends:"IconText"},kk={tag:"nav",display:"flex",childExtends:"SquareButton"},vk={extends:["SquareButton","ClickableItem"],round:"Z"};var Wy={};D(Wy,{Dialog:()=>Ck,DialogFooter:()=>Ak,DialogHeader:()=>Ek});var Ck={display:"flex",tag:"dialog",flow:"column",border:"0",theme:"dialog",round:"Z2"},Ek={extends:"Hgroup",minWidth:"100%",gap:"A",Title:{align:"center space-between",Text:{text:"Title"},SquareButton:{icon:"x",theme:"transparent"}},Paragraph:{color:"caption"}},Ak={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 qy={};D(qy,{Tooltip:()=>Tk,TooltipHidden:()=>Ok,TooltipParent:()=>Rk});R();var Tk={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=>Ct(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)}},Ok={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)}},Rk={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:r}=t,n=e||r;if(!n)return;let o=n&&n[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":o||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var Ky={};D(Ky,{Avatar:()=>Pk});var xR=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)},Pk={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=xR(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={};D(Gy,{Range:()=>Dk});var Dk={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:Po("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:Po("#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 n=t.call("exec",t[e],t);return(t.call("isFunction",n)?n(t,t.state):n!==void 0?n: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 Yy={};D(Yy,{Dropdown:()=>Ik,DropdownList:()=>$k,DropdownParent:()=>Lk,DropdownParentFocus:()=>Mk,DropdownSiblingFocus:()=>Fk});var Ik={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"},$k={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"}}},Lk={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},Mk={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()}}},Fk={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 Xy={};D(Xy,{Notification:()=>Nk});var Nk={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 Un=Object.assign({},dy,py,hy,gy,my,xy,wy,Sy,by,ky,vy,_y,Cy,Ey,Ay,Ty,Oy,Ry,Py,Dy,Iy,$y,Vy,zy,Hy,Wy,qy,Ky,Gy,Yy,Xy);function au(t){if(t==null)return 0;if(typeof t!="object")return jk(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let n=0;n<t.length;n++)e=(e^au(t[n]))*16777619;return e>>>0}let r=Object.keys(t).sort();for(let n=0;n<r.length;n++)e=(e^jk(r[n]))*16777619,e=(e^au(t[r[n]]))*16777619;return e>>>0}function jk(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e}function cu(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 o=0;o<t.length;o++)if(!cu(t[o],e[o]))return!1;return!0}let r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(let o=0;o<r.length;o++){let s=r[o];if(!Object.prototype.hasOwnProperty.call(e,s)||!cu(t[s],e[s]))return!1}return!0}function Zy(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,n={};for(let o in t)if(o in e){let s=Zy(t[o],e[o]);n[o]=s,s!==t[o]&&(r=!0)}else n[o]=t[o];for(let o in e)o in t||(n[o]=e[o],r=!0);return r?n:t}function Jy(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 n in e){let o=e[n];o&&typeof o=="object"&&!Array.isArray(o)&&t[n]&&typeof t[n]=="object"&&!Array.isArray(t[n])?Jy(t[n],o,r):t[n]=o}return t}function Qr(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 ds(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Qa(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Qr(e)}function Bk(t){return t.split(`
84
84
  `).map(Qr).join(`
85
- `)}var $k={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 Lk(t,e){let r=$k[t]||Qr(t),n=Za(e),o=`_${r}-${n}`,s=us(t),i=cR[s],a=i?`${s}: ${e};${i}: ${e}`:`${s}: ${e}`,c=`.${o}{${a}}`;return`${o}
86
- ${c}`}var cR={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select","mask-image":"-webkit-mask-image","mask-size":"-webkit-mask-size","mask-repeat":"-webkit-mask-repeat","mask-position":"-webkit-mask-position","mask-clip":"-webkit-mask-clip","mask-origin":"-webkit-mask-origin","background-clip":"-webkit-background-clip"},lR="@media (hover: hover)",fR=/(?:^|[^\\]):hover(?![\w-])/,Mk=t=>typeof t=="string"&&(t.indexOf("{")!==-1||t.indexOf("}")!==-1);function Fk(t){let e=t.split("\0"),r=[],n=[];for(let o=0;o+1<e.length;o+=2){let s=e[o],i=e[o+1];if(!i||Mk(i))continue;let a=$k[s]||Qr(s),c=Za(i),l=`_${a}-${c}`,f=us(s);r.push(l),n.push(`.${l}{${f}:${i}}`)}return r.join(" ")+"\0"+n.join(`
87
- `)}function Nk(t,e,r){let n=t+e,o=`_c${Qr(n)}`,s=e.split("\0"),i="";for(let l=0;l+1<s.length;l+=2){let f=s[l],u=s[l+1];u&&(Mk(u)||(i+=`${us(f)}:${u};`))}let a,c;if(t.startsWith("@media"))c=`.${o}`,a=`${t}{${c}{${i}}}`;else if(t.startsWith(":")||t.startsWith("&")||t.startsWith("[")&&!t.includes("&")){let l=t.startsWith("&")?t.slice(1):t;c=`.${o}${l}`,a=`${c}{${i}}`}else t.includes("&")?(c=t.replace("&",`.${o}`),a=`${c}{${i}}`):(c=`.${o} ${t}`,a=`${c}{${i}}`);return r!==!1&&fR.test(c)&&(a=`${lR}{${a}}`),`${o}
88
- ${a}`}var Yy=null;function cu(t){Yy=t}var Me={structuralHash:su,deepEqual:iu,mergeStructural:Ky,overwriteDeep:Gy,shortHash:Qr,toKebab:us,sanitizeValue:Za,batchShortHash:Ik,atomicCssClass:Lk,batchAtomicCss:Fk,compoundCssClass:Nk},jk=!1,au=null;function Bk(t){return au||(au=import(t||"@symbo.ls/wasm/pkg").then(e=>(e.structuralHash&&(Me.structuralHash=e.structuralHash),e.deepEqual&&(Me.deepEqual=e.deepEqual),e.mergeStructural&&(Me.mergeStructural=e.mergeStructural),e.overwriteDeep&&(Me.overwriteDeep=e.overwriteDeep),e.shortHash&&(Me.shortHash=e.shortHash),e.toKebab&&(Me.toKebab=e.toKebab),e.sanitizeValue&&(Me.sanitizeValue=e.sanitizeValue),e.batchShortHash&&(Me.batchShortHash=e.batchShortHash),e.atomicCssClass&&(Me.atomicCssClass=e.atomicCssClass),e.batchAtomicCss&&(Me.batchAtomicCss=e.batchAtomicCss),e.compoundCssClass&&(Me.compoundCssClass=e.compoundCssClass),jk=!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)),au)}function Uk(){return jk}P();var Ja={};I(Ja,{CDN_PROVIDERS:()=>_e,DOMQL_EVENTS:()=>fp,DOMQ_PROPERTIES:()=>Ar,ENV:()=>Ep,HTML_TAGS:()=>po,METHODS:()=>co,METHODS_EXL:()=>Js,NODE_ENV:()=>Oe,OPTIONS:()=>vi,PACKAGE_MANAGER_TO_CDN:()=>Lr,PARSED_DOMQ_PROPERTIES:()=>Zs,PROPS_METHODS:()=>Tr,STATE_METHODS:()=>gn,STATE_PROPERTIES:()=>lp,SVG_TAGS:()=>V_,TYPES:()=>Hs,UNIVERSAL_RESERVED_KEYS:()=>$l,addCaching:()=>ml,addContext:()=>gl,addExtend:()=>Xp,addExtends:()=>We,addItemAfterEveryElement:()=>Xd,addProtoToArray:()=>Ks,addRef:()=>dl,applyCSS:()=>Zy,applyDependentState:()=>gh,applyEvent:()=>Sl,applyEventUpdate:()=>kl,applyExtends:()=>W_,applyProps:()=>yi,arrayContainsOtherArray:()=>zd,arraysEqual:()=>Jd,arrayzeValue:()=>vn,buildImgSrcset:()=>Qi,buildSourcesAndImg:()=>ta,cache:()=>xh,call:()=>jh,captureSnapshot:()=>Uh,checkForStateTypes:()=>uh,checkIfInherits:()=>wl,checkIfStringIsInArray:()=>ep,clone:()=>dp,cloneAndMergeArrayExtend:()=>li,cloneFunction:()=>$p,collectExtendsList:()=>ho,concatAddExtends:()=>Kp,copyJavaScriptToClipboard:()=>ag,copyStringToClipboard:()=>ig,createBasedOnType:()=>ul,createElement:()=>fh,createElementExtends:()=>Qc,createExtends:()=>ui,createExtendsFromKeys:()=>go,createExtendsStack:()=>nl,createIfConditionFlag:()=>Lp,createInheritedState:()=>dh,createKey:()=>ii,createNestedObject:()=>_p,createNestedObjectByKeyPath:()=>hh,createObjectWithoutPrototype:()=>qc,createParent:()=>pl,createPath:()=>hl,createProps:()=>bi,createPropsStack:()=>ll,createRoot:()=>lh,createScope:()=>yh,createSnapshotId:()=>si,customDecodeURIComponent:()=>cp,customEncodeURIComponent:()=>ap,cutArrayAfterValue:()=>Gd,cutArrayBeforeValue:()=>Kd,debounce:()=>ai,debounceOnContext:()=>Dp,decodeNewlines:()=>ip,deepClone:()=>lt,deepContains:()=>yp,deepDefaults:()=>Yi,deepDestringifyFunctions:()=>me,deepExtend:()=>Jc,deepMerge:()=>ot,deepMergeExtends:()=>qe,deepStringifyFunctions:()=>ti,defineSetter:()=>Fh,destringifyGlobalScope:()=>ri,detectHeightOnInit:()=>qh,detectInfiniteLoop:()=>kp,document:()=>et,encodeNewlines:()=>sp,error:()=>Sn,excludeKeysFromObject:()=>Cp,exec:()=>ft,extendCachedRegistry:()=>Gp,extendStackRegistry:()=>di,extractArrayExtend:()=>hi,fetchLibraryData:()=>jl,fibonacciNumberByIndex:()=>Kh,filterArrays:()=>Qd,filterArraysFast:()=>tp,finalizeExtends:()=>ol,findClosestNumber:()=>Nl,findClosestNumberInFactory:()=>ng,findInheritedState:()=>xl,findKeyPosition:()=>np,flattenExtend:()=>mo,formatDate:()=>Wh,generateHash:()=>Yc,generateHeadArrayTags:()=>Fl,generateKey:()=>oi,generateMetaTags:()=>eg,get:()=>Ih,getActiveRoute:()=>Ly,getCDNDirUrl:()=>Ll,getCDNUrl:()=>Pe,getCapitalCaseKeys:()=>Qp,getCdnProviderFromConfig:()=>So,getChildStateInKey:()=>_l,getChildren:()=>Mh,getContext:()=>Bi,getCookie:()=>Bp,getDB:()=>Wi,getEmotionStylesheet:()=>ug,getExtendsInElement:()=>Zp,getExtendsStack:()=>fi,getExtendsStackRegistry:()=>Zc,getFrequencyInArray:()=>Hd,getHashedExtend:()=>pi,getImportMapScript:()=>Hh,getInObjectByPath:()=>Sp,getLocalStorage:()=>Vp,getNev:()=>Rp,getPageMetadata:()=>rg,getParentStateInKey:()=>bl,getPath:()=>$i,getQuery:()=>qi,getRef:()=>Lh,getRoot:()=>Fi,getRootContext:()=>ji,getRootData:()=>Ni,getRootState:()=>Mi,getRootStateInKey:()=>yl,getSpreadChildren:()=>th,global:()=>Bd,hasFunction:()=>He,hasHandlerPlugin:()=>fo,hasOwnProperty:()=>hp,hashContent:()=>Eo,inheritChildExtends:()=>el,inheritChildPropsExtends:()=>tl,inheritParentProps:()=>_i,inheritRecursiveChildExtends:()=>rl,init:()=>xr,initProps:()=>ih,is:()=>Kt,isArray:()=>O,isBoolean:()=>Uc,isContextComponent:()=>eh,isCyclic:()=>vp,isDOMNode:()=>qt,isDate:()=>zc,isDefined:()=>Ct,isDevelopment:()=>Rr,isEmpty:()=>Hc,isEmptyObject:()=>gp,isEqualDeep:()=>Wc,isFunction:()=>A,isHtmlElement:()=>Vs,isLocal:()=>Op,isLoudDevRuntime:()=>Et,isMalformedDependency:()=>ko,isMethod:()=>Bh,isMobile:()=>Np,isNode:()=>lr,isNot:()=>Vd,isNotProduction:()=>bn,isNull:()=>Vc,isNumber:()=>ze,isObject:()=>k,isObjectLike:()=>N,isPhoto:()=>Gh,isPolyglotWritableKey:()=>ur,isProduction:()=>Or,isStaging:()=>Tp,isState:()=>ph,isString:()=>S,isStringFunction:()=>ci,isTest:()=>Gc,isTesting:()=>Ap,isUndefined:()=>Tt,isUniversallyReservedKey:()=>Vh,isUnresolvableDependency:()=>kn,isValidDependencyMap:()=>vo,isValidHtmlTag:()=>Hp,isWrappedLibrary:()=>Xe,joinArrays:()=>so,jointStacks:()=>Yp,keys:()=>Dl,lastLevel:()=>ou,lastPathname:()=>nu,loadCssFile:()=>Jh,loadJavascript:()=>Qh,loadJavascriptFile:()=>Yh,loadJavascriptFileEmbedSync:()=>Zh,loadJavascriptFileSync:()=>Xh,loadRemoteCSS:()=>tg,loadRemoteScript:()=>Co,log:()=>Nh,logGroupIf:()=>Fp,logIf:()=>Mp,lookdown:()=>Ph,lookdownAll:()=>Dh,lookup:()=>Rh,lowercaseFirstLetter:()=>hn,makeObjectWithoutPrototype:()=>mp,map:()=>up,mapStringsWithContextComponents:()=>gi,markPolyglotSeeded:()=>Ge,matchRoute:()=>Dy,matchesComponentNaming:()=>Ke,memoize:()=>Ip,merge:()=>gt,mergeSharedLibraries:()=>Xi,nextElement:()=>Vi,normalizeIgnoreList:()=>Mr,normalizeLibraryKey:()=>Ao,objectToString:()=>ei,objectizeStringProperty:()=>mi,overwrite:()=>ni,overwriteDeep:()=>Gt,overwriteShallow:()=>yn,overwriteState:()=>mh,parse:()=>Il,parseDeep:()=>Di,parseQuery:()=>Iy,parseRoutePattern:()=>Py,pickupElementFromProps:()=>al,pickupPropsFromElement:()=>il,polyglotSeededKeys:()=>ki,previousElement:()=>zi,propExists:()=>oh,propertizeElement:()=>cl,propertizeUpdate:()=>nh,reinit:()=>Xy,remove:()=>yx,removeChars:()=>cg,removeCookie:()=>Up,removeDuplicateProps:()=>wi,removeDuplicatesInArray:()=>io,removeFromArray:()=>Wd,removeFromObject:()=>bp,removeNestedKeyByPath:()=>xp,removeValueFromArray:()=>qs,removeValueFromArrayAll:()=>Yd,reorderArrayByValues:()=>Zd,replaceLiteralsWithObjectFields:()=>Dt,replaceOctalEscapeSequences:()=>op,resolveAsset:()=>Yt,resolveHandler:()=>uo,resolveSharedLibraries:()=>sg,returnValueAsText:()=>fl,router:()=>sr,runGuards:()=>$y,runPluginHook:()=>At,scratchSystem:()=>zo,scratchUtils:()=>jr,self:()=>Ud,set:()=>Fn,setActiveRootState:()=>Li,setCookie:()=>jp,setHashedExtend:()=>Xc,setInObjectByPath:()=>wp,setLocalStorage:()=>zp,setNodeStyles:()=>Pl,setProps:()=>$h,setPropsPrototype:()=>xi,sharedLibrary:()=>og,splitPackageSpecifier:()=>Ki,spotByPath:()=>Ii,srcsetFor:()=>To,stringIncludesAny:()=>Ys,stringToObject:()=>pp,stripVersionRangePrefix:()=>Gi,swapItemsInArray:()=>qd,syncProps:()=>Si,toCamelCase:()=>Zi,toDashCase:()=>Ji,toDescriptionCase:()=>fg,toPriorityOrder:()=>ye,toTitleCase:()=>lg,toggleFullscreen:()=>zh,triggerEventOn:()=>Pr,triggerEventOnUpdate:()=>bh,trimStringFromSymbols:()=>rp,unstackArrayOfObjects:()=>Ws,update:()=>sh,updateProps:()=>ah,variables:()=>Hi,verbose:()=>_o,warn:()=>Ui,window:()=>C});P();P();var dR=E(),Vk=(t=dR,e)=>{let r=k(e.localFile)?e.localFile:{},n=lt(r.designSystem||{});return ot(t,n,ie)},pR={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},ds=(t,e)=>{let r=!e||e===":root",n={};for(let o in t)if(o.startsWith("@media")){let s=r?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`;n[o]={[s]:t[o]}}else r?n[o]=t[o]:n[`${e}${o}, ${o} ${e}`]=t[o];return n},xr=(t,e=pR)=>{let r=Vk(t||{},e),n=e.scopeSelector||":root",o=e.globalTheme;if(typeof window<"u"&&window.location){let g=new URLSearchParams(window.location.search).get("globalTheme");g&&(o=g)}let s=Fn({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:o,themeRoot:e.themeRoot,files:e.files,assets:e.assets,...r},{newConfig:e.newConfig,config:e.config});s&&(s.scopeSelector=n);let i=ia(s.font,s.files),a=s.useReset,c=s.useVariable,l=s.useFontImport,f=s.useSvgSprite,u=t.svg,d=s.useIconSprite,p=t.icons;l&&xt(i),c&&(xt({[n]:s.CSS_VARS}),s.CSS_MEDIA_VARS&&xt(ds(s.CSS_MEDIA_VARS,n))),a&&xt(s.reset);let h=s.animation;if(h){let g={};for(let m in h)g[`@keyframes ${m}`]=h[m];xt(g)}return(u||f)&&Pa(s.svg,{document:e.document}),(p||d)&&Mn(s.icons,{document:e.document}),s},lu={},Xy=(t,e=lu)=>{let r=Vk(t||{},e),n=e.scopeSelector||":root",o=Fn({verbose:!1,...r});return e.preventInject||(xt({[n]:o.CSS_VARS}),o.CSS_MEDIA_VARS&&xt(ds(o.CSS_MEDIA_VARS,n)),xt(o.reset)),o},Zy=(t,e=lu)=>{xt(t)},hR=(t,e=lu)=>{let r=e.scopeSelector||":root";xt({[r]:t.CSS_VARS}),t.CSS_MEDIA_VARS&&xt(ds(t.CSS_MEDIA_VARS,r))};var gR=(t,e=lu)=>{};P();var zk=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,mR=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},Jy={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},Qa=(t,e)=>{if(!e)return t;let r=Array.isArray(e)?e:e.split("."),n=t;for(let o of r){if(!n||!n[o])return null;n=n[o]}return n},Hk=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=Jy:e.router=gt(e.router||{},Jy);let r=e.router,n=async(s,i)=>{let a=s.context?.window||C,c=mR(r);if(!c){if(!a.location)return;let{pathname:f,search:u,hash:d}=a.location;f=zk(f),c=f+u+d}let l=s;if(r.customRouterElement){let f=Qa(s,r.customRouterElement);f&&(l=f,s.routes&&(l.routes=s.routes))}l.routes&&await sr(c,l,{},{initialRender:!0,pushState:!1})},o=!Tt(t.onRenderRouter);return r&&r.initRouter&&!o&&(t.onRenderRouter=n),yR(e,r),r},Qy=(t,e)=>{if(e.router===!1)return;let r=e.router||Jy;if(!r.popState)return;let n=e.utils&&e.utils.router?e.utils.router:sr,o=e.window||C,s=async i=>{let{pathname:a,search:c,hash:l}=o.location;a=zk(a);let f=a+c+l,u=t;if(r.customRouterElement){let d=Qa(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})};o.addEventListener("popstate",s),e.__teardowns=e.__teardowns||[],e.__teardowns.push(()=>o.removeEventListener("popstate",s))},yR=(t,e)=>{let{components:r}=t;if(e&&e.injectRouterInLinkComponent)return ot(r.Link||r["smbls.Link"],r.RouterLink||r["smbls.RouterLink"])};P();var tb=C&&C.location?C.location.host.includes("dev."):Rr(),Wk=tb?"http://localhost:8080/get":"https://api.symbols.app/get",bR={endpoint:Wk},qk=async(t,e=bR)=>{let r=e.endpoint||Wk,n=e.serviceRoute?O(e.serviceRoute)?e.serviceRoute.map(s=>s.toLowerCase()+"=true").join("&"):e.serviceRoute:"",o;try{return o=await globalThis.fetch(r+"/?"+n,{method:"GET",headers:{"Content-Type":"application/json","X-AppKey":t,"X-Metadata":e.metadata}}),await o.json()}catch(s){if(A(e.onError))return e.onError(s);console.error(s)}},_R=async(t,e)=>{let{editor:r}=e;if(r&&r.remote){let n=await qk(t,r),o=tb||e.isDevelopment?me(n):me(n.releases[0]);r.serviceRoute?O(r.serviceRoute)?r.serviceRoute.forEach(s=>{Gt(e[s],o[s.toLowerCase()])}):Gt(e[r.serviceRoute],o):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{Gt(e[s],o[s.toLowerCase()])})}return e},xR=async(t,e,r)=>{let{editor:n}=e;if(n&&n.remote){let o=await qk(t,n),s=tb||e.isDevelopment?me(o):me(o.releases[0]);r(s)}},Kk=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await _R(t,e)}catch(r){console.error(r)}},Gk=(t,e,r,n)=>{if(e&&r.editor)try{r.editor.async&&xR(e,r,n||(o=>{let s=o.designSystem;k(s)&&r.utils.init(s),k(o.state)&&t.state.set(o.state)}))}catch(o){console.error(o)}};var tc=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(n){console.error("[smbls] destroy teardown error:",n)}e.__teardowns.length=0}try{Xr(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 rb={};I(rb,{Helmet:()=>Zk,applyMetadata:()=>gs,default:()=>TR,extractMetadata:()=>CR,generateHeadHtml:()=>AR,helmetPlugin:()=>eb,resolveMetadata:()=>tn});P();var wR={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"}},SR=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}"]`},Yk=t=>me({v:t}).v,Xk=(t,e,r,n)=>{try{return ft(t,e,r)}catch(o){console.warn(`[helmet] metadata factory for "${n}" threw; treating as unset:`,o&&o.message||o);return}},tn=(t,e,r)=>{if(!t)return{};let n=t;S(n)&&He(n)&&(n=Yk(n));let o=A(n)?Xk(n,e,r,"metadata"):k(n)?{...n}:{};if(!k(o))return{};for(let s in o){let i=o[s];S(i)&&He(i)&&(i=Yk(i)),A(i)?i=Xk(i,e,r,s):S(i)&&He(i)&&(i=void 0),S(i)&&i.includes("{{")&&e?.call&&(i=e.call("replaceLiteralsWithObjectFields",i,r)),o[s]=i}return o},kR=t=>!!t&&typeof t=="object"&&(t.notFound===!0||t.metadata?.notFound===!0),vR=(t,e)=>{if(Object.prototype.hasOwnProperty.call(t,e))return t[e];if(t["/*"])return t["/*"];if(t["*"])return t["*"];for(let r in t)if(kR(t[r]))return t[r]},CR=(t,e="/",r,n)=>{let o=t.pages||{},s=vR(o,e),i={};if(t.integrations?.seo&&(i={...t.integrations.seo}),t.app?.metadata){let c=tn(t.app.metadata,r,n);i={...i,...c}}let a=new Set;if(s){let c=s.metadata||s.helmet||{},l=tn(c,r,n);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},ER=(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},hs=t=>{let e=5381,r=String(t);for(let n=0;n<r.length;n++)e=(e*33^r.charCodeAt(n))>>>0;return e.toString(36)},ps=(t,e,r,n)=>{let o=t.head||t.querySelector("head");if(!o)return;let s=new Map;for(let a of o.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=n(a);c&&(c.setAttribute(e,a),o.appendChild(c))}},gs=(t,e)=>{if(!(!k(t)||!e)){for(let r in t){let n=t[r];if(n==null||r==="jsonLd"||r==="styles"||r==="scripts"||r==="alternate"||r==="favicons"||r==="icon"||r==="favicon")continue;let o=wR[r];if(!o)continue;let s=SR(o),i=e.querySelector(s)||ER(o,e);i&&(r==="title"?i.textContent=n:o.valueAttr?i.setAttribute(o.valueAttr,n):i.setAttribute("content",n))}if(Array.isArray(t.jsonLd)){let n=t.jsonLd.filter(s=>s!=null).map(s=>S(s)?s:JSON.stringify(s)),o=n.map(hs);ps(e,"data-smbls-jsonld",o,s=>{let i=o.indexOf(s),a=e.createElement("script");return a.setAttribute("type","application/ld+json"),a.textContent=n[i],a})}if(Array.isArray(t.styles)){let r=t.styles.filter(o=>o!=null&&String(o).trim()),n=r.map(hs);ps(e,"data-smbls-style",n,o=>{let s=n.indexOf(o),i=e.createElement("style");return i.textContent=String(r[s]),i})}if(Array.isArray(t.scripts)){let r=t.scripts.filter(o=>o&&(S(o)?o.trim():o.src)),n=r.map(o=>S(o)?o:String(o.src));ps(e,"data-smbls-script",n,o=>{let s=n.indexOf(o),i=r[s],a=e.createElement("script");return S(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})}if(Array.isArray(t.alternate)){let r=t.alternate.filter(o=>k(o)),n=r.map(o=>`${o.hreflang||""}|${o.href||""}`);ps(e,"data-smbls-alternate",n,o=>{let s=n.indexOf(o),i=e.createElement("link");i.setAttribute("rel","alternate");for(let[a,c]of Object.entries(r[s]))i.setAttribute(a,c);return i})}if(Array.isArray(t.favicons)){let r=t.favicons.filter(o=>o!=null),n=r.map(o=>k(o)?hs(JSON.stringify(o)):String(o));ps(e,"data-smbls-favicon",n,o=>{let s=n.indexOf(o),i=r[s],a=e.createElement("link");if(a.setAttribute("rel","icon"),k(i))for(let[c,l]of Object.entries(i))a.setAttribute(c,l);else a.setAttribute("href",String(i));return a})}if(t.icon||t.favicon){let r=String(t.icon||t.favicon),n=r.endsWith(".svg")?"image/svg+xml":r.endsWith(".png")?"image/png":"";ps(e,"data-smbls-single-icon",[r],o=>{let s=e.createElement("link");return s.setAttribute("rel","icon"),s.setAttribute("href",o),n&&s.setAttribute("type",n),s})}}},ct=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,r=>e[r])},AR=t=>{let e=['<meta charset="UTF-8">'],r=new Set(["charset","jsonLd","styles","scripts"]),n=!1;for(let[o,s]of Object.entries(t)){if(!s&&s!==0&&s!==!1||r.has(o)||typeof s=="function")continue;if(o==="title"){e.push(`<title>${ct(s)}</title>`);continue}if(o==="viewport"){n||(e.push(`<meta name="viewport" content="${ct(s)}">`),n=!0);continue}if(o==="canonical"){e.push(`<link rel="canonical" href="${ct(s)}">`);continue}if(o==="icon"||o==="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(o==="favicons"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,p])=>`${d}="${ct(p)}"`).join(" ");e.push(`<link rel="icon" ${u}>`)}else typeof f=="string"&&e.push(`<link rel="icon" href="${ct(f)}">`)});continue}if(o==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,p])=>`${d}="${ct(p)}"`).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=>o.startsWith(f)),l=a.some(f=>o.startsWith(f));if(o.startsWith("http-equiv:")){let f=o.replace("http-equiv:","");e.push(`<meta http-equiv="${ct(f)}" content="${ct(s)}">`)}else if(o.startsWith("itemprop:")){let f=o.replace("itemprop:","");e.push(`<meta itemprop="${ct(f)}" content="${ct(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>e.push(`<meta property="${ct(o)}" content="${ct(f)}">`)):e.push(`<meta property="${ct(o)}" content="${ct(s)}">`):l?e.push(`<meta name="${ct(o)}" content="${ct(s)}">`):Array.isArray(s)?s.forEach(f=>e.push(`<meta name="${ct(o)}" content="${ct(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.push(`<meta name="${ct(o)}" content="${ct(s)}">`)}if(n||e.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),Array.isArray(t.jsonLd))for(let o of t.jsonLd){if(o==null)continue;let s=typeof o=="string"?o:JSON.stringify(o),i=String(s).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${hs(s)}">${i}<\/script>`)}if(Array.isArray(t.styles))for(let o of t.styles){if(o==null||!String(o).trim())continue;let s=String(o).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${hs(s)}">${s}</style>`)}if(Array.isArray(t.scripts))for(let o of t.scripts){if(!o)continue;let s=typeof o=="string",i=s?o:o.src;if(!i&&!(o&&o.body))continue;let a=[];i&&a.push(`src="${ct(i)}"`),s||(o.type&&a.push(`type="${ct(o.type)}"`),o.async&&a.push("async"),o.defer&&a.push("defer"),o.integrity&&a.push(`integrity="${ct(o.integrity)}"`),o.crossorigin&&a.push(`crossorigin="${ct(o.crossorigin)}"`),o.referrerpolicy&&a.push(`referrerpolicy="${ct(o.referrerpolicy)}"`),o.nomodule&&a.push("nomodule"));let c=` data-smbls-script="${ct(i||hs(o.body||""))}"`;if(!s&&o.body){let l=String(o.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${a.join(" ")}${c}>${l}<\/script>`)}else e.push(`<script ${a.join(" ")}${c}><\/script>`)}return e.join(`
89
- `)},Zk={define:{metadata:(t,e,r)=>{let n=e.context?.document||typeof document<"u"&&document;if(!n)return;let o=K(()=>{let s=tn(t,e,e.state);gs(s,n);let i=e.state?.root;k(i)&&(i.$helmet=s)});e.__ref?.__effects&&e.__ref.__effects.push(o)}}},eb={name:"helmet",create(t){if(!t.metadata)return;let e=t.context?.document||typeof document<"u"&&document;if(!e)return;let r=K(()=>{let n=t.metadata;if(!n)return;let o=tn(n,t,t.state);gs(o,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 n=tn(e,t,t.state);gs(n,r)}},TR=Zk;Ir();var Jk=(t,e,r,n)=>{t&&Pi(t,e,r,n)},Qk=(t,e,r)=>{if(!t)return;let n=e.context?.document||typeof document<"u"&&document;if(!n)return;let o=tn(t,e,r);gs(o,n)},tv=async(t,e)=>{if(!t)return;let r={tag:"fragment",...t},n=async()=>{await e.set(r,{preventDefineUpdate:"$router"})};return e.lazyLoad?window.requestAnimationFrame(n):await n(),r},ms={routes:t=>t,metadata:Qk,fetch:Jk,$router:tv},ev=(t={})=>{let e={routes:r=>r};return t.metadata!==!1&&(e.metadata=Qk),t.fetch!==!1&&(e.fetch=Jk),t.router!==!1&&(e.$router=tv),e};var nb={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},fu={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},uu={...nb,router:fu},OR={state:{},pages:{},components:{},router:fu,define:ms},en=OR;P();P();var rv=(t,e)=>N(t.extends)?t.extends:[];P();var ob={};I(ob,{default:()=>DR,getActiveLang:()=>rn,getLanguages:()=>rc,getLocalStateLang:()=>ac,initPolyglot:()=>pu,loadTranslations:()=>oc,polyglotPlugin:()=>bs,setLang:()=>sc,translate:()=>nc,upsertTranslation:()=>ic});P();var ov="smbls_lang",RR="smbls_t_",PR="smbls_tv_",ys={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)}}},ec={};function rn(){let t=this?.context,e=t?.polyglot;return(this?.state?.root||t?.state?.root)?.lang||t?.state?.lang||e?.defaultLang||"en"}function rc(){let t=this?.context?.polyglot;return t?t.languages?t.languages:t.translations?Object.keys(t.translations):[]:[]}var du=(t,e)=>{if(!t||!e)return;if(t[e]!==void 0)return t[e];if(e.indexOf(".")===-1)return;let r=e.split("."),n=t;for(let o=0;o<r.length;o++){if(n==null)return;n=n[r[o]]}return n},nv=(t,e,r)=>{let n=e.lastIndexOf(".");if(n===-1)return t[e+"_"+r];let o=du(t,e.substring(0,n));if(o!=null)return o[e.substring(n+1)+"_"+r]};function nc(t,e){if(!t)return"";let r=this?.context,n=r?.polyglot,o=e||this.call("getActiveLang"),s=this?.state;if(s){let l=nv(s,t,o);if(l!==void 0)return l}if(n?.translations){let l=n.translations[o];if(l){let f=du(l,t);if(f!==void 0)return f}}let a=(s?.root||r?.state?.root)?.translations;if(a){let l=a[o];if(l){let f=du(l,t);if(f!==void 0)return f}}let c=n?.defaultLang||"en";if(s){let l=nv(s,t,c);if(l!==void 0)return l}if(n?.translations){let l=n.translations[c];if(l){let f=du(l,t);if(f!==void 0)return f}}return t}async function oc(t){let e=this?.context,r=e?.polyglot,n=this?.state?.root||e?.state?.root;if(!r||!n)return;let o=r.storagePrefix||RR,s=r.storageVersionPrefix||(r.storagePrefix?r.storagePrefix.replace(/_$/,"v_"):PR);if(r.translations&&r.translations[t]&&!r.fetch||!r.fetch||r._fetchFailed?.[t])return;if(!n.translations?.[t]){let c=ys.get(o+t);if(c)try{let l=JSON.parse(c),f={translations:{...n.translations||{}}};f.translations[t]=l,n.update&&n.update(f)}catch(l){console.warn("[polyglot] Failed to apply language update:",l.message)}}let i=(r.storagePrefix||"smbls")+":"+t;if(ec[i])return ec[i];let a=this;return ec[i]=(async()=>{try{let c=r.fetch,l=parseInt(ys.get(s+t),10)||0,f,u,d;if(A(c)){let h=await c(t,l,a);if(!h||h.changed===!1)return;f=h.translations||h.data||h,u=h.version||0,d=!0}else if(k(c)){let h=a.getDB||(()=>e.fetch),g=A(h)?await h.call(a):e.fetch;if(!g)return;let m=c.rpc||c.from||"get_translations_if_changed",b={p_lang:t,p_cached_version:l,...c.params||{}},_=await g.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;ys.set(o+t,JSON.stringify(f)),u&&ys.set(s+t,String(u));let p={translations:{...n.translations||{}}};p.translations[t]=f,n.update&&n.update(p)}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 ec[i]}})(),ec[i]}async function sc(t){let e=this?.context,r=e?.polyglot,n=this?.state?.root||e?.state?.root,o=e?.document||globalThis.document;if(!n)return;let s=r?.storageLangKey||ov;if(ys.set(s,t),o?.documentElement&&(o.documentElement.lang=t),this.call("getActiveLang")===t)return;r?.fetch&&await this.call("loadTranslations",t),e?.state&&(e.state.lang=t);let i=r?.translations?.[t],a={lang:t},c=l=>ur(e,l,n);if(i&&typeof i=="object")for(let l in i){if(!c(l))continue;let f=i[l];(Array.isArray(f)||typeof f=="string"||typeof f=="number")&&(a[l]=f)}n.update&&n.update(a);for(let l in a)l!=="lang"&&Ge(e,l);if(i&&typeof i=="object")for(let l in i){if(!c(l))continue;let f=i[l];if(f&&typeof f=="object"&&!Array.isArray(f)&&n[l]&&typeof n[l]=="object"&&!Array.isArray(n[l])){for(let u in f)n[l][u]=f[u];Ge(e,l)}}if(o&&i){let l=o.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 p=u.call("replaceLiteralsWithObjectFields",d,u.state);p!=null&&f.textContent!==p&&(f.textContent=p)}catch{}}}}async function ic(t,e,r){let n=this?.context,o=n?.polyglot,s=this?.state?.root||n?.state?.root;if(s?.translations?.[e]&&(s.translations[e][t]=r),o?.translations?.[e]&&(o.translations[e][t]=r),o?.fetch&&k(o.fetch)){let i=this.getDB||(()=>n.fetch),a=A(i)?await i.call(this):n.fetch;if(!a)return;let c=o.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 pu(){let t=this?.context,e=t?.polyglot;if(!e)return;let r=this?.state?.root||t?.state?.root;if(!r)return;let n=e.storageLangKey||ov,s=ys.get(n)||rn.call(this),i=t?.document||globalThis.document;i?.documentElement&&(i.documentElement.lang=s),r.update&&r.lang!==s&&r.update({lang:s}),e.fetch&&!(e.translations&&e.translations[s])&&await this.call("loadTranslations",s)}function ac(t){try{let e=rn.call(this),r=this?.state;if(!r)return"";let n=t.lastIndexOf(".");if(n===-1)return r[t+e]??"";let o=t.substring(0,n).split("."),s=r;for(let i=0;i<o.length;i++){if(s==null)return"";s=s[o[i]]}return s==null?"":s[t.substring(n+1)+e]??""}catch{return""}}var bs={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,pu.call(t))}},DR=bs;Ir();var ib={};I(ib,{SYSTEM_METRICS:()=>cc,capsizeHandler:()=>sb,capsizePlugin:()=>gu,computeCapsize:()=>sv,default:()=>IR,resolveFontSizePx:()=>iv,resolveMetrics:()=>av});var cc={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}},hu=t=>parseFloat(t.toFixed(4)),sv=(t,e,r)=>{let{ascent:n,descent:o,lineGap:s,unitsPerEm:i,capHeight:a}=e,c=Math.abs(o),l=n+c+s,f=r!==void 0?r:l/i*t,u=f/t,d=l/i,p=(n-a+s/2)/i-(u-d)/2,h=(c+s/2)/i-(u-d)/2;return{fontSize:`${hu(t/16)}rem`,lineHeight:`${hu(f)}px`,capHeightTrim:`${hu(-p)}em`,baselineTrim:`${hu(-h)}em`}},iv=(t,e)=>{if(typeof t=="number")return t;let r=e?.designSystem;if(!r)return null;let{typography:n}=r;if(n?.sequence){let s=String(t).toUpperCase(),i=n.sequence[s];if(i)return i.decimal||i.val}let o=parseFloat(t);return isNaN(o)?null:typeof t=="string"&&t.endsWith("rem")?o*(r.typography?.browserDefault||16):o},av=(t,e)=>{let n=e?.designSystem?.font_family||{};if(t){let s=n[t];if(s?.metrics)return s.metrics;let i=String(t).toLowerCase().replace(/['"]/g,"").trim();if(cc[i])return cc[i]}let o=n.default||Object.keys(n)[0];if(o){let s=n[o];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(cc[a])return cc[a]}}return null},sb=(t,e,r,n)=>{if(!t)return;let o=iv(e.fontSize,n);if(!o)return;let s=av(e.fontFamily,n);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=sv(o,s,i),f={};return e.lineHeight||(f.lineHeight=a),f["::before"]={content:'""',marginBottom:c,display:"table"},f["::after"]={content:'""',marginTop:l,display:"table"},f},gu={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},IR=gu;var pb={};I(pb,{PRESERVE_VALUE_KEYS:()=>$t,SKIP_INLINE_KEYS:()=>nn,abbrToProp:()=>It,decode:()=>dv,encode:()=>lv,expand:()=>zn,isComponentKey:()=>Fe,isSelectorKey:()=>Ne,parse:()=>Hn,parseFurther:()=>qn,propToAbbr:()=>Ae,shorten:()=>lc,shorthandPlugin:()=>fc,stringify:()=>Vn,stringifyFurther:()=>Wn});var Ae={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"},It=Object.create(null);for(let t in Ae)It[Ae[t]]=t;var ab=Object.create(null);for(let t in Ae){let e=Ae[t];if(ab[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${ab[e]}"`);ab[e]=t}var $t=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),nn=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function Fe(t){return/^[A-Z]/.test(t)}function Ne(t){return/^[:@.!$>&]/.test(t)||t.startsWith("> ")}function lv(t){if(!t||typeof t!="object")return"";let e=[];for(let r in t){let n=t[r];if(typeof n=="function"||n!==null&&typeof n=="object"&&!Array.isArray(n)||n===void 0)continue;let o=Ae[r]||r;if(n===!0)e.push(o);else if(n===!1)e.push("!"+o);else if(Array.isArray(n)){let s=n.map(i=>mu(i));e.push(o+":"+s.join(","))}else e.push(o+":"+mu(n))}return e.join(" ")}function mu(t){return String(t).replace(/ /g,"_")}function lc(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?lc(r):r});let e={};for(let r in t){let n=t[r];if(Fe(r)){e[r]=cb(n);continue}if(Ne(r)){e[r]=cb(n);continue}let o=Ae[r]||r;if($t.has(r)||$t.has(o)){e[o]=n;continue}e[o]=cb(n)}return e}function cb(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?lc(e):e}):typeof t=="object"?lc(t):t}function Vn(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?Vn(n):n});let e={},r=[];for(let n in t){let o=t[n];if(Fe(n)){e[n]=cv(o);continue}if(Ne(n)){e[n]=cv(o);continue}let s=Ae[n]||n;if($t.has(n)||$t.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(nn.has(n)||nn.has(s)){e[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){e[s]=o.map(function(a){return a!==null&&typeof a=="object"?Vn(a):a});continue}if(o.length<=1){e[s]=o;continue}r.push(s+":"+o.map(mu).join(","));continue}if(typeof o=="object"){e[s]=Vn(o);continue}o===!0?r.push(s):o===!1?r.push("!"+s):typeof o=="number"||typeof o=="string"&&(o.includes(",")||o.includes("_"))?e[s]=o:r.push(s+":"+mu(o))}return r.length&&(e.in=r.join(" ")),e}function cv(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Vn(e):e}):typeof t=="object"?Vn(t):t}function dv(t){if(!t||typeof t!="string")return{};let e={},r=pv(t);for(let n of r){if(n.startsWith("!")){let c=n.slice(1),l=It[c]||c;e[l]=!1;continue}let o=n.indexOf(":");if(o===-1){let c=It[n]||n;e[c]=!0;continue}let s=n.slice(0,o),i=n.slice(o+1),a=It[s]||s;if(i.includes(",")){e[a]=i.split(",").map(fv);continue}e[a]=fv(i)}return e}function pv(t){return t.trim().split(/\s+/).filter(Boolean)}function fv(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function uv(t){return t.replace(/_/g," ")}function $R(t){if(!t||typeof t!="string")return{};let e={},r=pv(t);for(let n of r){if(n.startsWith("!")){let c=n.slice(1),l=It[c]||c;e[l]=!1;continue}let o=n.indexOf(":");if(o===-1){let c=It[n]||n;e[c]=!0;continue}let s=n.slice(0,o),i=n.slice(o+1),a=It[s]||s;if(i.includes(",")){e[a]=i.split(",").map(uv);continue}e[a]=uv(i)}return e}function zn(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?zn(r):r});let e={};for(let r in t){let n=t[r];if(Fe(r)){e[r]=lb(n);continue}let o=It[r]||r;if(Ne(r)&&o===r){e[r]=lb(n);continue}if($t.has(o)||$t.has(r)){e[o]=n;continue}e[o]=lb(n)}return e}function lb(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?zn(e):e}):typeof t=="object"?zn(t):t}function Hn(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Hn(r):r});let e={};if(typeof t.in=="string"){let r=$R(t.in);for(let n in r)e[n]=r[n]}for(let r in t){if(r==="in")continue;let n=t[r];if(Fe(r)){e[r]=fb(n);continue}let o=It[r]||r;if(Ne(r)&&o===r){e[r]=fb(n);continue}if($t.has(o)||$t.has(r)){e[o]=n;continue}e[o]=fb(n)}return e}function fb(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Hn(e):e}):typeof t=="object"?Hn(t):t}function hv(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function LR(t){let e="",r=0;for(;r<t.length;){if(t[r]==="\\"&&r+1<t.length){let n=t[r+1];if(n===","||n==="_"||n==="\\"){e+=n,r+=2;continue}}t[r]==="_"?e+=" ":e+=t[r],r++}return e}function MR(t){let e=[],r="",n=0;for(;n<t.length;){if(t[n]==="\\"&&n+1<t.length){r+=t[n]+t[n+1],n+=2;continue}if(t[n]===","){e.push(r),r="",n++;continue}r+=t[n],n++}return e.push(r),e}function gv(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 Wn(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?Wn(n):n});let e={},r=[];for(let n in t){let o=t[n];if(Fe(n)){let i=mv(o);e[n]=gv(i)?i.in:i;continue}if(Ne(n)){let i=mv(o);e[n]=gv(i)?i.in:i;continue}let s=Ae[n]||n;if($t.has(n)||$t.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(nn.has(n)||nn.has(s)){e[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){e[s]=o.map(function(a){return a!==null&&typeof a=="object"?Wn(a):a});continue}if(o.length<=1){e[s]=o;continue}r.push(s+":"+o.map(hv).join(","));continue}if(typeof o=="object"){e[s]=Wn(o);continue}if(o===!0){r.push(s);continue}if(o===!1){r.push("!"+s);continue}if(typeof o=="number"){r.push(s+":#"+o);continue}r.push(s+":"+hv(o))}return r.length&&(e.in=r.join(" ")),e}function mv(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Wn(e):e}):typeof t=="object"?Wn(t):t}function yv(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):LR(t)}function ub(t){if(!t||typeof t!="string")return{};let e={},r=t.trim().split(/\s+/).filter(Boolean);for(let n of r){if(n.startsWith("!")){let l=n.slice(1),f=It[l]||l;e[f]=!1;continue}let o=n.indexOf(":");if(o===-1){let l=It[n]||n;e[l]=!0;continue}let s=n.slice(0,o),i=n.slice(o+1),a=It[s]||s,c=MR(i);if(c.length>1){e[a]=c.map(yv);continue}e[a]=yv(i)}return e}function qn(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?qn(r):r});let e={};if(typeof t.in=="string"){let r=ub(t.in);for(let n in r)e[n]=r[n]}for(let r in t){if(r==="in")continue;let n=t[r];if(Fe(r)){typeof n=="string"?e[r]=ub(n):e[r]=db(n);continue}let o=It[r]||r;if(Ne(r)&&o===r){typeof n=="string"?e[r]=ub(n):e[r]=db(n);continue}if($t.has(o)||$t.has(r)){e[o]=n;continue}e[o]=db(n)}return e}function db(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?qn(e):e}):typeof t=="object"?qn(t):t}var FR={shorten:zn,stringify:Hn,stringifyFurther:qn};function NR(t,e){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(n=>e(n));let r={};for(let n in t){let o=t[n];r[n]=o&&typeof o=="object"?e(o):o}return r}var jR=["components","pages","snippets"],fc={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let n=FR[e===!0?"shorten":e];if(n){for(let o of jR)t[o]&&(t[o]=NR(t[o],n));t.app&&typeof t.app=="object"&&(t.app=n(t.app))}}};var Cb={};I(Cb,{LEVELS:()=>uc,analyzePlugin:()=>xs,attachBrowserListeners:()=>Cu,attachNetworkListeners:()=>pc,classifyEvent:()=>xb,createAnalyzeState:()=>Eu,createBeaconSink:()=>kb,createConsoleSink:()=>wb,createDedupe:()=>yb,createEnrich:()=>gb,createMemorySink:()=>Sb,createPipeline:()=>xu,createRedact:()=>_u,createRemoteSink:()=>Su,createSample:()=>bb,createSummarize:()=>mb,default:()=>xs,emitFetchEvent:()=>Cv,makeEvent:()=>Y,meetsLevel:()=>yu,normalizeLevel:()=>dc,resolveSinks:()=>vu,summarizeElement:()=>Kn});var BR=0,UR=()=>`${Date.now().toString(36)}-${(BR++).toString(36)}`,Y=(t,e,r={})=>({id:UR(),ts:Date.now(),type:t,level:e,...r}),VR=t=>{let e=[],r=t,n=0;for(;r&&n<32;)r.key!=null&&e.unshift(String(r.key)),r=r.parent,n++;return e.join(" > ")},Kn=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:VR(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var _s=t=>t?.context?.analyze,zR={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"}},HR=(t,{category:e,type:r,level:n})=>o=>{let s=_s(o);!s||!s.shouldCapture(e)||s.emit(Y(r,n,{hook:t,element:Kn(o)}))},bv=t=>(e,r)=>{let n=_s(e);!n||!n.shouldCapture("state")||n.emit(Y("state","debug",{hook:t,element:Kn(e),changedKeys:r?.changedKeys||null}))},xs={name:"analyze",error(t,e){let r=_s(t);if(!r||r.config.enabled===!1||!r.shouldCapture("errors"))return;let n=e?.error||e?.err||(e instanceof Error?e:null);r.emit(Y("error","error",{hook:e?.hook||"error",element:Kn(t),error:n,message:n?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=_s(t);e&&(!e.shouldCapture("navigation")&&!e.shouldCapture("lifecycle")||e.emit(Y("navigation","info",{hook:"renderRouter",route:t.context?.routerOptions?.currentRoute||null})))},beforeUpdate(t){let e=_s(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=_s(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(Y("update","debug",{hook:"update",element:Kn(t),durationMs:r}))},beforeStateUpdate:bv("beforeStateUpdate"),stateUpdate:bv("stateUpdate")};for(let[t,e]of Object.entries(zR))xs[t]=HR(t,e);P();var uc={error:0,warn:1,info:2,debug:3,trace:4};var yu=(t,e)=>{let r=uc[t],n=uc[e];return r==null||n==null?!0:r<=n},dc=t=>uc[t]!=null?t:"warn";P();var bu=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var WR=(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},qR=(t,e)=>{if(e!=="redact"){if(e==="hash"){let r=0,n=String(t);for(let o=0;o<n.length;o++)r=(r<<5)-r+n.charCodeAt(o)|0;return`#${(r>>>0).toString(36)}`}return"***"}},hb=(t,e,r,n)=>{if(n>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>hb(s,e,r,n+1));let o={};for(let s of Object.keys(t))if(WR(s,e)||bu.test(s)){let a=qR(t[s],r);a!==void 0&&(o[s]=a)}else o[s]=hb(t[s],e,r,n+1);return o},_u=(t=[],e="mask")=>{let r=Array.isArray(t)?t:[t];return n=>{if(!n)return n;let{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:p,...h}=n,g=hb(h,r,e,0);return{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:p,...g}}};var gb=t=>{let e=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,r=typeof navigator<"u"?navigator.userAgent:null,n=t.config.buildHash||null,o=t.config.appId||null;return s=>{if(!s)return s;let i=t.context?.routerOptions?.currentRoute||null,a=C,c=a&&a.innerWidth?{w:a.innerWidth,h:a.innerHeight}:null;return{...s,session:e,app:{id:o,build:n,route:i},meta:{ua:r,viewport:c}}}},mb=()=>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},yb=(t=1e3,e=500)=>{let r=new Map;return n=>{if(!n)return n;let o=`${n.type}:${n.level}:${n.message||""}:${n.error?.message||""}`,s=r.get(o),i=n.ts||Date.now();if(s&&i-s<t)return null;if(r.set(o,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 n}},bb=t=>e=>{if(!e)return e;let r=t[e.type];return r==null||r>=1?e:Math.random()>r?null:e},_v={redact:t=>_u(t.config.redact||[],t.config.maskStrategy),enrich:t=>gb(t),summarize:()=>mb(),dedupe:t=>yb(t.config.cache?.dedupeWindowMs||1e3),sample:t=>bb(t.config.sample||{})},KR=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let r=_v[t];return r?r(e):null}return null},xu=t=>{let e=t.config,r=Array.isArray(e.transformers)?e.transformers.slice():[],n=r.findIndex(s=>s==="redact");n>=0&&r.splice(n,1);let o=[];e.redact!==!1&&o.push(_v.redact(t));for(let s of r){let i=KR(s,t);i&&o.push(i)}return s=>{let i=s;for(let a of o){if(i==null)return null;let c=a(i);if(c==null)return null;if(Array.isArray(c)){let l=o.slice(o.indexOf(a)+1),f=[];for(let u of c){let d=u,p=!1;for(let h of l)if(d=h(d),d==null){p=!0;break}!p&&d!=null&&f.push(d)}return f}i=c}return i}};P();P();var wu=typeof C<"u"&&typeof C.document<"u",GR=5e3,YR=50,XR=3,ZR=1500,JR=1e3,xb=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",QR=t=>{try{return JSON.stringify(t)}catch{return null}},tP=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},eP=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}},rP=()=>{if(!wu)return null;try{let t=C.document?.documentElement?.getAttribute("data-theme")||null,e=typeof C.matchMedia=="function"?C.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}},nP=()=>{if(!wu)return null;let t=C.location,e=typeof navigator<"u"?navigator:null,r=typeof screen<"u"?screen:null;return{url:t?.href||null,path:t?.pathname||null,referrer:C.document?.referrer||null,title:C.document?.title||null,ua:e?.userAgent||null,browser:eP(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:tP(),viewport:C.innerWidth?{w:C.innerWidth,h:C.innerHeight,dpr:C.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:rP()}},Su=(t={})=>{let e=t.url,r=typeof t.transport=="function"?t.transport:null,n=typeof t.syncTransport=="function"?t.syncTransport:null;if(!e&&!r)return()=>{};let o=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:xb,p=typeof t.beforeSend=="function"?t.beforeSend:null,h=t.debug===!0,g=typeof t.getDebug=="function"?t.getDebug:null,m=t.batchMs!=null?t.batchMs:GR,b=t.maxBatch||YR,_=t.maxRetries!=null?t.maxRetries:XR,y=t.backoffMs||ZR,x=t.queueLimit||JR,w=t.sampleRate!=null?t.sampleRate:1,v=()=>typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,D=t.sessionId||v(),L=[],T=[],R=null,V=null,Bt=()=>{R||!L.length||(R=setTimeout(B,m))},z=F=>{if(V)return;let J=y*Math.pow(2,Math.max(0,F-1));V=setTimeout(()=>{if(V=null,!T.length)return;let wt=T.shift();nt(wt.envelope,wt.attempt)},J)},H=(F,J=!1)=>{let wt=u?_b(u):null,G={id:D,sentAt:Date.now()};J&&(G.endedAt=Date.now());let $={v:1,session:G,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:nP(),user:wt?.user||null,traits:wt?.traits||null,tags:wt?.tags||null,events:F};if((g?_b(g)===!0:h)&&($.app.debug=!0),p)try{return p($)||null}catch{return $}return $},nt=async(F,J=1)=>{if(F)try{let wt=!0;if(r){let G=await r(F);wt=G!==!1&&G?.ok!==!1}else wt=await oP(e,F,{apiKey:o,getAuth:f});!wt&&J<_&&(T.push({envelope:F,attempt:J+1}),z(J+1))}catch{J<_&&(T.push({envelope:F,attempt:J+1}),z(J+1))}},B=(F=!1,J=!1)=>{if(R&&(clearTimeout(R),R=null),!L.length&&!J)return;let wt=L;L=[];let G=H(wt,J);if(G){if(F&&wu){if(typeof n=="function"&&_b(()=>n(G)))return;if(navigator.sendBeacon&&e){let $=QR(G);if($)try{navigator.sendBeacon(e,new C.Blob([$],{type:"application/json"}));return}catch{}}}nt(G)}},Z=!1,Lt=()=>{Z||(Z=!0,B(!0,!0))};wu&&(C.addEventListener("pagehide",Lt,{passive:!0}),C.addEventListener("beforeunload",Lt,{passive:!0}),C.addEventListener("visibilitychange",()=>{C.document.visibilityState==="hidden"&&B(!0)},{passive:!0}));let W=F=>{if(!F||w<1&&Math.random()>w)return;Z&&(Z=!1);let J={...F,log_type:d(F)};L.push(J),L.length>x&&(L=L.slice(-x)),L.length>=b?B():Bt()},yt=F=>(B(!1,!0),D=F||v(),Z=!1,W.sessionId=D,D);return W.flush=()=>B(!1),W.endSession=Lt,W.startNewSession=yt,W.sessionId=D,W},_b=t=>{try{return t()}catch{return null}},oP=async(t,e,{apiKey:r,getAuth:n})=>{let o={"Content-Type":"application/json","X-Analyze-Beacon":"1"};if(r&&(o["X-Analyze-Key"]=r),n)try{let s=await n();s&&(o.Authorization=`Bearer ${s}`)}catch{}try{return(await fetch(t,{method:"POST",headers:o,body:JSON.stringify(e),keepalive:!0,credentials:"omit",mode:"cors"})).ok}catch{return!1}};var sP={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},iP="\x1B[0m",ku=typeof C<"u"&&typeof C.document<"u",wb=(t={})=>{let e=t.minLevel||null,r=console.error.bind(console),n=console.warn.bind(console),o=console.log.bind(console);return s=>{if(!s)return;let i=s.level==="error"?r:s.level==="warn"?n:o,a=`[analyze:${s.type}]`;if(ku)i(a,s);else{let c=sP[s.level]||"";i(`${c}${a}${iP}`,s)}}},Sb=(t,e={})=>{let r=e.max||t.config.cache?.max||500,n=new Array(r),o=0,s=0,i=a=>{n[o]=a,o=(o+1)%r,s<r&&s++};return t.__memory={push:i,snapshot:()=>{let a=new Array(s),c=(o-s+r)%r;for(let l=0;l<s;l++)a[l]=n[(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:()=>{o=0,s=0}},i},kb=(t={})=>{let e=t.url,r=t.batchMs!=null?t.batchMs:5e3,n=t.maxBatch||50;if(!e)return()=>{};let o=[],s=null,i=()=>{if(s&&(clearTimeout(s),s=null),!o.length)return;let c=JSON.stringify({events:o});o=[];let l=ku?new C.Blob([c],{type:"application/json"}):c;if(ku&&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(()=>{})};ku&&(C.addEventListener("pagehide",i,{passive:!0}),C.addEventListener("beforeunload",i,{passive:!0}));let a=c=>{c&&(o.push(c),o.length>=n?i():s||(s=setTimeout(i,r)))};return a.flush=i,a},xv={console:wb,memory:Sb,beacon:kb,remote:Su},wv=(t,e)=>e.getDebug!=null||e.debug!=null?e:{...e,getDebug:()=>t.config.debug===!0},vu=t=>{let e=Array.isArray(t.config.sinks)?t.config.sinks:["console"],r=[];for(let n of e)if(typeof n=="function")r.push(n);else if(typeof n=="string"){let o=xv[n];if(!o)continue;r.push(n==="memory"?o(t,{}):o(n==="remote"?wv(t,{}):{}))}else if(n&&typeof n=="object"&&n.type){let o=xv[n.type];if(!o)continue;r.push(n.type==="memory"?o(t,n):o(n.type==="remote"?wv(t,n):n))}return r};P();var aP=typeof C<"u"&&typeof C.document<"u",cP=new Set(["password","hidden"]),Sv=(t,e)=>{let r=0,n=null,o=null;return(...s)=>{let i=Date.now();i-r>=e?(r=i,t(...s)):(o=s,n||(n=setTimeout(()=>{r=Date.now(),n=null,o&&(t(...o),o=null)},e-(i-r))))}},vb="__analyzeKeyPath",ws=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[vb])return e[vb];let r=[],n=e,o=0,s=null;for(;n&&o<64;){if(n.getAttribute){let a=n.getAttribute("data-key");a&&(s==null&&(s=a),r.unshift(a))}n=n.parentNode,o++}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[vb]=i}catch{}return i},lP=(t,e)=>{if(e==="mask")return"***";if(e!=="redact"){if(e==="hash"){let r=0,n=String(t||"");for(let o=0;o<n.length;o++)r=(r<<5)-r+n.charCodeAt(o)|0;return`#${(r>>>0).toString(36)}`}return"***"}},fP=t=>!!(!t||t.tagName==="INPUT"&&cP.has(t.type)||bu.test(t.name||"")||bu.test(t.id||"")||t.dataset?.analyze==="skip"),Cu=t=>{if(!aP)return;let e=t.config.capture,r=t.config.throttle,n=t.__teardown,o=(s,i,a,c)=>{s.addEventListener(i,a,c),n.push(()=>s.removeEventListener(i,a,c))};if(e.errors&&(o(C,"error",s=>{t.emit(Y("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}))}),o(C,"unhandledrejection",s=>{let i=s.reason,a=i instanceof Error?i:null;t.emit(Y("error","error",{hook:"unhandledrejection",message:a?.message||(typeof i=="string"?i:"Unhandled promise rejection"),error:a}))})),e.pointer){o(C,"click",i=>{t.emit(Y("pointer","info",{hook:"click",target:ws(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:kv(i)}))},{passive:!0,capture:!0}),o(C,"dblclick",i=>{t.emit(Y("pointer","info",{hook:"dblclick",target:ws(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),o(C,"contextmenu",i=>{t.emit(Y("pointer","info",{hook:"contextmenu",target:ws(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=Sv(i=>{t.emit(Y("pointer","trace",{hook:"pointermove",x:i.clientX,y:i.clientY}))},r.pointermove);o(C,"pointermove",s,{passive:!0})}if(e.keyboard&&o(C,"keydown",s=>{t.emit(Y("keyboard","info",{hook:"keydown",code:s.code,key:s.key&&s.key.length===1?"\xB7":s.key,modifiers:kv(s),target:ws(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=fP(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=lP(a.value,t.config.maskStrategy)),t.emit(Y("forms","info",{hook:i.type,target:ws(i),field:{name:a.name||null,type:a.type||a.tagName.toLowerCase()},value:u}))};o(C,"input",s,{passive:!0,capture:!0}),o(C,"change",s,{passive:!0,capture:!0}),o(C,"submit",i=>{t.emit(Y("forms","info",{hook:"submit",target:ws(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=Sv(()=>{t.emit(Y("scroll","trace",{hook:"scroll",x:C.scrollX,y:C.scrollY}))},r.scroll);o(C,"scroll",s,{passive:!0,capture:!0})}if(e.viewport){let s=ai(()=>{t.emit(Y("viewport","info",{hook:"resize",w:C.innerWidth,h:C.innerHeight,dpr:C.devicePixelRatio||1}))},r.resize);o(C,"resize",s,{passive:!0}),o(C,"orientationchange",()=>{t.emit(Y("viewport","info",{hook:"orientationchange",orientation:typeof screen<"u"&&screen.orientation?screen.orientation.type:null}))},{passive:!0}),o(C.document,"visibilitychange",()=>{t.emit(Y("viewport","info",{hook:"visibilitychange",hidden:C.document.hidden}))},{passive:!0}),t.emit(Y("viewport","info",{hook:"initial",w:C.innerWidth,h:C.innerHeight,dpr:C.devicePixelRatio||1}))}if(e.console)for(let s of["log","warn","error","debug"]){let i=console[s];console[s]=function(...a){try{t.emit(Y("console",s==="error"?"error":s==="warn"?"warn":"debug",{hook:`console.${s}`,args:a.map(vv)}))}catch{}return i.apply(console,a)},n.push(()=>{console[s]=i})}if(e.performance&&typeof PerformanceObserver<"u")try{let s=new PerformanceObserver(a=>{for(let c of a.getEntries())t.emit(Y("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{}n.push(()=>s.disconnect())}catch{}},kv=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),uP=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=vv(t.cause)),e},vv=t=>{if(t==null)return t;if(t instanceof Error)return uP(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};P();var dP=typeof C<"u"&&typeof C.document<"u",Cv=(t,e)=>{let r=t?.analyze;if(!r||!r.shouldCapture("network"))return;let n=e.phase==="error"?"error":"info";r.emit(Y("network",n,{hook:`fetch.${e.phase}`,source:"symbo-fetch",...e}))},pc=t=>{if(dP&&t.config.capture.network&&!t.__networkListeners){if(t.__networkListeners=!0,t.__teardown.push(()=>{t.__networkListeners=!1}),typeof C.fetch=="function"){let e=C.fetch.bind(C),r=function(n,o){if(o?.headers?.["X-Analyze-Beacon"]||!t.shouldCapture("network"))return e(n,o);let s=typeof n=="string"?n:n&&n.url||"",i=(o?.method||typeof n=="object"&&n?.method||"GET").toUpperCase(),a=typeof performance<"u"?performance.now():Date.now();return t.emit(Y("network","info",{hook:"fetch.start",source:"window.fetch",url:s,method:i})),e(n,o).then(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;return t.emit(Y("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(Y("network","error",{hook:"fetch.error",source:"window.fetch",url:s,method:i,error:c,durationMs:l})),c})};C.fetch=r,t.__teardown.push(()=>{C.fetch=e})}if(typeof C.XMLHttpRequest=="function"){let e=C.XMLHttpRequest,r=e.prototype.open,n=e.prototype.send;e.prototype.open=function(o,s){return this.__analyze={method:String(o).toUpperCase(),url:String(s)},r.apply(this,arguments)},e.prototype.send=function(o){let s=this.__analyze;if(!s||!t.shouldCapture("network"))return n.apply(this,arguments);let i=typeof performance<"u"?performance.now():Date.now();t.emit(Y("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(Y("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(Y("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),n.apply(this,arguments)},t.__teardown.push(()=>{e.prototype.open=r,e.prototype.send=n})}}};var pP={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},hP={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},gP={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},mP={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},yP=t=>{let e={...pP,...t};return e.replay&&Object.assign(e,hP),e.telemetry&&Object.assign(e,gP),e.remote&&Object.assign(e,mP),Object.assign(e,t),e},bP=64,_P=()=>{if(typeof C>"u"||!C.location)return null;try{let e=new URLSearchParams(C.location.search).get("analyze");return e||null}catch{return null}},Eu=(t={})=>{let e=t===!0?{}:{...t};e.capture=yP(e.capture||{});let r=_P();(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=dc(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 n={config:e,context:null,__ready:!1,__paused:!1,__preBuffer:[],__teardown:[],__pipeline:null,__sinks:null,__memory:null,__initialSnapshot:null},o=()=>{n.__pipeline||(n.__pipeline=xu(n),n.__sinks=vu(n))};return n.shouldCapture=s=>n.config.enabled===!1?!1:!!n.config.capture[s],n.emit=s=>{if(s&&n.config.enabled!==!1&&!n.__paused&&yu(s.level,n.config.level)){if(!n.__ready){if(s.level!=="error"&&!n.config.captureDuringHydration)return;n.__preBuffer.length<bP&&n.__preBuffer.push(s);return}o(),Ev(n,s)}},n.activate=s=>{if(n.context==null&&(n.context=s||null),n.__ready)return;n.__ready=!0;let i=n.__preBuffer;if(n.__preBuffer=[],i.length){o();for(let a of i)Ev(n,a)}try{Cu(n)}catch(a){console.error("[analyze] browser attach error:",a)}try{pc(n)}catch(a){console.error("[analyze] network attach error:",a)}for(let a of n.__onActivate||[])try{a(n)}catch(c){console.error("[analyze] onActivate error:",c)}},n.pause=()=>{n.__paused=!0},n.resume=()=>{n.__paused=!1},n.setLevel=s=>{n.config.level=dc(s)},n.setCapture=(s,i)=>{if(n.config.capture[s]=!!i,s==="network"&&i&&n.__ready)try{pc(n)}catch(a){console.error("[analyze] network attach error:",a)}},n.query=s=>n.__memory?n.__memory.query(s):[],n.snapshot=()=>n.__memory?n.__memory.snapshot():[],n.emitNetwork=s=>{if(!n.shouldCapture("network"))return;let i=s?.phase,a=i==="error"?"error":i==="success"&&s.ok===!1?"warn":"info";n.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})},n.flush=()=>{if(n.__sinks)for(let s of n.__sinks)typeof s.flush=="function"&&s.flush()},n.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(n.config.sinks)?n.config.sinks:[];for(let c of a)c&&typeof c=="object"&&c.type==="remote"&&(c.sessionId=i);if(n.__sinks)for(let c of n.__sinks)typeof c.startNewSession=="function"&&c.startNewSession(i);return i},n.replay=()=>({initialSnapshot:n.__initialSnapshot,events:n.snapshot()}),n.destroy=()=>{for(let s of n.__teardown)try{s()}catch{}n.__teardown=[],n.__ready=!1,n.__paused=!0},n.__onActivate=[],n.onActivate=s=>{n.__onActivate.push(s)},n},Ev=(t,e)=>{let r=t.__pipeline(e);if(r==null)return;let n=Array.isArray(r)?r:[r];for(let o of n){if(typeof t.config.onEvent=="function")try{t.config.onEvent(o)}catch{}for(let s of t.__sinks)try{s(o)}catch(i){console.error("[analyze] sink error:",i)}}};var Tb={};I(Tb,{Inspect:()=>Au,inspectPlugin:()=>Ab});P();function Av(t){return S(t)?t:O(t)?t.find(e=>S(e)):""}function Eb(t){if(!t)return;let e=t.__ref.__componentKey,r=t.extends&&Av(t.extends),n=t.parent&&t.parent.childExtends&&Av(t.parent.childExtends);return(e||r||n||"").split("_")[0].split(".")[0].split("+")[0]}function Tu(t){if(!t||!t.__ref)return;let{components:e,pages:r,editor:n}=t.context,o=Eb(t);return n&&n.onInitInspect&&!n.onInitInspect(o,t,t.state)?Tu(t.parent):o&&(e[o]||r[o])?t:Tu(t.parent)}var xP=(t,e,r)=>{let n=r.window||window;n.onkeydown=o=>{o.altKey&&o.shiftKey&&t.state.update({debugging:!0,preventSelect:!0},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0})},n.onkeyup=o=>{t.state.preventSelect&&(!o.altKey||!o.shiftKey)&&(t.state.replace({debugging:!1,preventSelect:!1},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0}),t.Inspector.state.update({area:!1}))}},Au={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:xP,onMousemove:(t,e,r)=>{let n=t.target.ref,o=Tu(n),s=e.Inspector.state;if(!o||!r.debugging||!o.__ref)return s.update({area:!1});let i=Eb(o),a=l=>{s.update({area:l,focusKey:i})},c=()=>{if(t.altKey&&t.shiftKey){let{x:l,y:f,width:u,height:d}=o.node.getBoundingClientRect(),p={x:l,y:f,width:u,height:d};if(!s.area)return a(p);s.area.x!==p.x&&a(p)}else s.area&&s.update({area:!1})};window.requestAnimationFrame(()=>{c(),window.requestAnimationFrame(c)})},onMousedown:(t,e,r)=>{if(!r.debugging)return;let n=t.target.ref,o=Tu(n);if(!o)return;let s=Eb(o);if(!s)return;let i=n.context.editor;if(i&&i.onInspect)return i.onInspect(s,n,n.state,{allowRouterWhileInspect:!0});let a=JSON.stringify({componentKey:`${s}`});return n.context.socket?.emit&&n.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(k(e)){let{Content:r,...n}=e;for(let o in n)fs[o]||(n[o].__ref||(n[o].__ref={}),n[o].__ref.__componentKey||(n[o].__ref.__componentKey=o))}},onBeforeUpdate:(t,e,r)=>{let{area:n}=r,o=r.area&&r.parent.debugging,s;if(!o)s="display: none !important";else if(n){let{x:i,y:a,width:c,height:l}=n;s=`
85
+ `)}var Uk={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 Vk(t,e){let r=Uk[t]||Qr(t),n=Qa(e),o=`_${r}-${n}`,s=ds(t),i=vR[s],a=i?`${s}: ${e};${i}: ${e}`:`${s}: ${e}`,c=`.${o}{${a}}`;return`${o}
86
+ ${c}`}var vR={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select","mask-image":"-webkit-mask-image","mask-size":"-webkit-mask-size","mask-repeat":"-webkit-mask-repeat","mask-position":"-webkit-mask-position","mask-clip":"-webkit-mask-clip","mask-origin":"-webkit-mask-origin","background-clip":"-webkit-background-clip"},CR="@media (hover: hover)",ER=/(?:^|[^\\]):hover(?![\w-])/,zk=t=>typeof t=="string"&&(t.indexOf("{")!==-1||t.indexOf("}")!==-1);function Hk(t){let e=t.split("\0"),r=[],n=[];for(let o=0;o+1<e.length;o+=2){let s=e[o],i=e[o+1];if(!i||zk(i))continue;let a=Uk[s]||Qr(s),c=Qa(i),l=`_${a}-${c}`,f=ds(s);r.push(l),n.push(`.${l}{${f}:${i}}`)}return r.join(" ")+"\0"+n.join(`
87
+ `)}function Wk(t,e,r){let n=t+e,o=`_c${Qr(n)}`,s=e.split("\0"),i="";for(let l=0;l+1<s.length;l+=2){let f=s[l],u=s[l+1];u&&(zk(u)||(i+=`${ds(f)}:${u};`))}let a,c;if(t.startsWith("@media"))c=`.${o}`,a=`${t}{${c}{${i}}}`;else if(t.startsWith(":")||t.startsWith("&")||t.startsWith("[")&&!t.includes("&")){let l=t.startsWith("&")?t.slice(1):t;c=`.${o}${l}`,a=`${c}{${i}}`}else t.includes("&")?(c=t.replace("&",`.${o}`),a=`${c}{${i}}`):(c=`.${o} ${t}`,a=`${c}{${i}}`);return r!==!1&&ER.test(c)&&(a=`${CR}{${a}}`),`${o}
88
+ ${a}`}var Qy=null;function fu(t){Qy=t}var Fe={structuralHash:au,deepEqual:cu,mergeStructural:Zy,overwriteDeep:Jy,shortHash:Qr,toKebab:ds,sanitizeValue:Qa,batchShortHash:Bk,atomicCssClass:Vk,batchAtomicCss:Hk,compoundCssClass:Wk},qk=!1,lu=null;function Kk(t){return lu||(lu=import(t||"@symbo.ls/wasm/pkg").then(e=>(e.structuralHash&&(Fe.structuralHash=e.structuralHash),e.deepEqual&&(Fe.deepEqual=e.deepEqual),e.mergeStructural&&(Fe.mergeStructural=e.mergeStructural),e.overwriteDeep&&(Fe.overwriteDeep=e.overwriteDeep),e.shortHash&&(Fe.shortHash=e.shortHash),e.toKebab&&(Fe.toKebab=e.toKebab),e.sanitizeValue&&(Fe.sanitizeValue=e.sanitizeValue),e.batchShortHash&&(Fe.batchShortHash=e.batchShortHash),e.atomicCssClass&&(Fe.atomicCssClass=e.atomicCssClass),e.batchAtomicCss&&(Fe.batchAtomicCss=e.batchAtomicCss),e.compoundCssClass&&(Fe.compoundCssClass=e.compoundCssClass),qk=!0,Qy&&e.batchAtomicCss&&Qy({batchAtomicCss:e.batchAtomicCss,compoundCssClass:e.compoundCssClass}),!0)).catch(e=>(console.debug("[smbls] WASM not available, using JS fallbacks:",e.message),!1)),lu)}function Gk(){return qk}R();var tc={};D(tc,{CDN_PROVIDERS:()=>xe,DOMQL_EVENTS:()=>up,DOMQ_PROPERTIES:()=>Ar,ENV:()=>Ap,HTML_TAGS:()=>ho,METHODS:()=>lo,METHODS_EXL:()=>ti,NODE_ENV:()=>Re,OPTIONS:()=>Ei,PACKAGE_MANAGER_TO_CDN:()=>Lr,PARSED_DOMQ_PROPERTIES:()=>Qs,PROPS_METHODS:()=>Tr,STATE_METHODS:()=>gn,STATE_PROPERTIES:()=>fp,SVG_TAGS:()=>q_,TYPES:()=>qs,UNIVERSAL_RESERVED_KEYS:()=>Ml,addCaching:()=>bl,addContext:()=>yl,addExtend:()=>Zp,addExtends:()=>We,addItemAfterEveryElement:()=>Zd,addProtoToArray:()=>Ys,addRef:()=>hl,applyCSS:()=>eb,applyDependentState:()=>mh,applyEvent:()=>vl,applyEventUpdate:()=>Cl,applyExtends:()=>Y_,applyProps:()=>_i,arrayContainsOtherArray:()=>Hd,arraysEqual:()=>Qd,arrayzeValue:()=>vn,buildImgSrcset:()=>ea,buildSourcesAndImg:()=>ra,cache:()=>wh,call:()=>zh,captureSnapshot:()=>Wh,checkForStateTypes:()=>dh,checkIfInherits:()=>kl,checkIfStringIsInArray:()=>rp,clone:()=>pp,cloneAndMergeArrayExtend:()=>ui,cloneFunction:()=>Lp,collectExtendsList:()=>go,concatAddExtends:()=>Gp,copyJavaScriptToClipboard:()=>ug,copyStringToClipboard:()=>fg,createBasedOnType:()=>pl,createElement:()=>uh,createElementExtends:()=>el,createExtends:()=>pi,createExtendsFromKeys:()=>mo,createExtendsStack:()=>sl,createIfConditionFlag:()=>Mp,createInheritedState:()=>ph,createKey:()=>ci,createNestedObject:()=>xp,createNestedObjectByKeyPath:()=>gh,createObjectWithoutPrototype:()=>Gc,createParent:()=>gl,createPath:()=>ml,createProps:()=>xi,createPropsStack:()=>ul,createRoot:()=>fh,createScope:()=>bh,createSnapshotId:()=>ai,customDecodeURIComponent:()=>lp,customEncodeURIComponent:()=>cp,cutArrayAfterValue:()=>Yd,cutArrayBeforeValue:()=>Gd,debounce:()=>li,debounceOnContext:()=>Ip,decodeNewlines:()=>ap,deepClone:()=>lt,deepContains:()=>bp,deepDefaults:()=>Zi,deepDestringifyFunctions:()=>ye,deepExtend:()=>tl,deepMerge:()=>st,deepMergeExtends:()=>qe,deepStringifyFunctions:()=>ri,defineSetter:()=>Uh,destringifyGlobalScope:()=>oi,detectHeightOnInit:()=>Xh,detectInfiniteLoop:()=>vp,document:()=>rt,encodeNewlines:()=>ip,error:()=>Sn,excludeKeysFromObject:()=>Ep,exec:()=>ft,extendCachedRegistry:()=>Yp,extendStackRegistry:()=>hi,extractArrayExtend:()=>mi,fetchLibraryData:()=>Ul,fibonacciNumberByIndex:()=>Zh,filterArrays:()=>tp,filterArraysFast:()=>ep,finalizeExtends:()=>il,findClosestNumber:()=>Bl,findClosestNumberInFactory:()=>ag,findInheritedState:()=>Sl,findKeyPosition:()=>op,flattenExtend:()=>yo,formatDate:()=>Yh,generateHash:()=>Zc,generateHeadArrayTags:()=>jl,generateKey:()=>ii,generateMetaTags:()=>sg,get:()=>Fh,getActiveRoute:()=>jy,getCDNDirUrl:()=>Fl,getCDNUrl:()=>De,getCapitalCaseKeys:()=>th,getCdnProviderFromConfig:()=>ko,getChildStateInKey:()=>wl,getChildren:()=>Bh,getContext:()=>Vi,getCookie:()=>Up,getDB:()=>Ki,getEmotionStylesheet:()=>gg,getExtendsInElement:()=>Jp,getExtendsStack:()=>di,getExtendsStackRegistry:()=>Qc,getFrequencyInArray:()=>Wd,getHashedExtend:()=>gi,getImportMapScript:()=>Gh,getInObjectByPath:()=>kp,getLocalStorage:()=>zp,getNev:()=>Pp,getPageMetadata:()=>ig,getParentStateInKey:()=>xl,getPath:()=>Mi,getQuery:()=>Gi,getRef:()=>jh,getRoot:()=>ji,getRootContext:()=>Ui,getRootData:()=>Bi,getRootState:()=>Ni,getRootStateInKey:()=>_l,getSpreadChildren:()=>eh,global:()=>Ud,hasFunction:()=>He,hasHandlerPlugin:()=>uo,hasOwnProperty:()=>gp,hashContent:()=>Ao,inheritChildExtends:()=>nl,inheritChildPropsExtends:()=>rl,inheritParentProps:()=>wi,inheritRecursiveChildExtends:()=>ol,init:()=>xr,initProps:()=>ah,is:()=>Kt,isArray:()=>O,isBoolean:()=>zc,isContextComponent:()=>rh,isCyclic:()=>Cp,isDOMNode:()=>qt,isDate:()=>Wc,isDefined:()=>Ct,isDevelopment:()=>Rr,isEmpty:()=>qc,isEmptyObject:()=>mp,isEqualDeep:()=>Kc,isFunction:()=>T,isHtmlElement:()=>Hs,isLocal:()=>Rp,isLoudDevRuntime:()=>Et,isMalformedDependency:()=>vo,isMethod:()=>Hh,isMobile:()=>jp,isNode:()=>lr,isNot:()=>zd,isNotProduction:()=>bn,isNull:()=>Hc,isNumber:()=>ze,isObject:()=>k,isObjectLike:()=>N,isPhoto:()=>Jh,isPolyglotWritableKey:()=>ur,isProduction:()=>Or,isStaging:()=>Op,isState:()=>hh,isString:()=>S,isStringFunction:()=>fi,isTest:()=>Xc,isTesting:()=>Tp,isUndefined:()=>Ot,isUniversallyReservedKey:()=>qh,isUnresolvableDependency:()=>kn,isValidDependencyMap:()=>Co,isValidHtmlTag:()=>Wp,isWrappedLibrary:()=>Xe,joinArrays:()=>io,jointStacks:()=>Xp,keys:()=>$l,lastLevel:()=>iu,lastPathname:()=>su,loadCssFile:()=>rg,loadJavascript:()=>ng,loadJavascriptFile:()=>Qh,loadJavascriptFileEmbedSync:()=>eg,loadJavascriptFileSync:()=>tg,loadRemoteCSS:()=>og,loadRemoteScript:()=>Eo,log:()=>Vh,logGroupIf:()=>Np,logIf:()=>Fp,lookdown:()=>Lh,lookdownAll:()=>Mh,lookup:()=>$h,lowercaseFirstLetter:()=>hn,makeObjectWithoutPrototype:()=>yp,map:()=>dp,mapStringsWithContextComponents:()=>yi,markPolyglotSeeded:()=>Ge,matchRoute:()=>My,matchesComponentNaming:()=>Ke,memoize:()=>$p,merge:()=>mt,mergeSharedLibraries:()=>Ji,nextElement:()=>Hi,normalizeIgnoreList:()=>Mr,normalizeLibraryKey:()=>To,objectToString:()=>ni,objectizeStringProperty:()=>bi,overwrite:()=>si,overwriteDeep:()=>Gt,overwriteShallow:()=>yn,overwriteState:()=>yh,parse:()=>Ll,parseDeep:()=>$i,parseQuery:()=>Fy,parseRoutePattern:()=>Ly,pickupElementFromProps:()=>ll,pickupPropsFromElement:()=>cl,polyglotSeededKeys:()=>Ci,previousElement:()=>Wi,propExists:()=>sh,propertizeElement:()=>fl,propertizeUpdate:()=>oh,reinit:()=>tb,remove:()=>vx,removeChars:()=>dg,removeCookie:()=>Vp,removeDuplicateProps:()=>ki,removeDuplicatesInArray:()=>ao,removeFromArray:()=>qd,removeFromObject:()=>_p,removeNestedKeyByPath:()=>wp,removeValueFromArray:()=>Gs,removeValueFromArrayAll:()=>Xd,reorderArrayByValues:()=>Jd,replaceLiteralsWithObjectFields:()=>It,replaceOctalEscapeSequences:()=>sp,resolveAsset:()=>Yt,resolveHandler:()=>po,resolveSharedLibraries:()=>lg,returnValueAsText:()=>dl,router:()=>sr,runGuards:()=>Ny,runPluginHook:()=>At,scratchSystem:()=>Ho,scratchUtils:()=>jr,self:()=>Vd,set:()=>Fn,setActiveRootState:()=>Fi,setCookie:()=>Bp,setHashedExtend:()=>Jc,setInObjectByPath:()=>Sp,setLocalStorage:()=>Hp,setNodeStyles:()=>Il,setProps:()=>Nh,setPropsPrototype:()=>Si,sharedLibrary:()=>cg,splitPackageSpecifier:()=>Yi,spotByPath:()=>Li,srcsetFor:()=>Oo,stringIncludesAny:()=>Zs,stringToObject:()=>hp,stripVersionRangePrefix:()=>Xi,swapItemsInArray:()=>Kd,syncProps:()=>vi,toCamelCase:()=>Qi,toDashCase:()=>ta,toDescriptionCase:()=>hg,toPriorityOrder:()=>be,toTitleCase:()=>pg,toggleFullscreen:()=>Kh,triggerEventOn:()=>Pr,triggerEventOnUpdate:()=>_h,trimStringFromSymbols:()=>np,unstackArrayOfObjects:()=>Ks,update:()=>ih,updateProps:()=>ch,variables:()=>qi,verbose:()=>xo,warn:()=>zi,window:()=>C});R();R();var TR=E(),Yk=(t=TR,e)=>{let r=k(e.localFile)?e.localFile:{},n=lt(r.designSystem||{});return st(t,n,ae)},OR={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},ps=(t,e)=>{let r=!e||e===":root",n={};for(let o in t)if(o.startsWith("@media")){let s=r?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`;n[o]={[s]:t[o]}}else r?n[o]=t[o]:n[`${e}${o}, ${o} ${e}`]=t[o];return n},xr=(t,e=OR)=>{let r=Yk(t||{},e),n=e.scopeSelector||":root",o=e.globalTheme;if(typeof window<"u"&&window.location){let g=new URLSearchParams(window.location.search).get("globalTheme");g&&(o=g)}let s=Fn({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:o,themeRoot:e.themeRoot,files:e.files,assets:e.assets,...r},{newConfig:e.newConfig,config:e.config});s&&(s.scopeSelector=n);let i=ca(s.font,s.files),a=s.useReset,c=s.useVariable,l=s.useFontImport,f=s.useSvgSprite,u=t.svg,d=s.useIconSprite,p=t.icons;l&&wt(i),c&&(wt({[n]:s.CSS_VARS}),s.CSS_MEDIA_VARS&&wt(ps(s.CSS_MEDIA_VARS,n))),a&&wt(s.reset);let h=s.animation;if(h){let g={};for(let m in h)g[`@keyframes ${m}`]=h[m];wt(g)}return(u||f)&&Ia(s.svg,{document:e.document}),(p||d)&&Mn(s.icons,{document:e.document}),s},uu={},tb=(t,e=uu)=>{let r=Yk(t||{},e),n=e.scopeSelector||":root",o=Fn({verbose:!1,...r});return e.preventInject||(wt({[n]:o.CSS_VARS}),o.CSS_MEDIA_VARS&&wt(ps(o.CSS_MEDIA_VARS,n)),wt(o.reset)),o},eb=(t,e=uu)=>{wt(t)},RR=(t,e=uu)=>{let r=e.scopeSelector||":root";wt({[r]:t.CSS_VARS}),t.CSS_MEDIA_VARS&&wt(ps(t.CSS_MEDIA_VARS,r))};var PR=(t,e=uu)=>{};R();var Xk=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,DR=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},rb={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},ec=(t,e)=>{if(!e)return t;let r=Array.isArray(e)?e:e.split("."),n=t;for(let o of r){if(!n||!n[o])return null;n=n[o]}return n},Zk=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=rb:e.router=mt(e.router||{},rb);let r=e.router,n=async(s,i)=>{let a=s.context?.window||C,c=DR(r);if(!c){if(!a.location)return;let{pathname:f,search:u,hash:d}=a.location;f=Xk(f),c=f+u+d}let l=s;if(r.customRouterElement){let f=ec(s,r.customRouterElement);f&&(l=f,s.routes&&(l.routes=s.routes))}l.routes&&await sr(c,l,{},{initialRender:!0,pushState:!1})},o=!Ot(t.onRenderRouter);return r&&r.initRouter&&!o&&(t.onRenderRouter=n),IR(e,r),r},nb=(t,e)=>{if(e.router===!1)return;let r=e.router||rb;if(!r.popState)return;let n=e.utils&&e.utils.router?e.utils.router:sr,o=e.window||C,s=async i=>{let{pathname:a,search:c,hash:l}=o.location;a=Xk(a);let f=a+c+l,u=t;if(r.customRouterElement){let d=ec(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})};o.addEventListener("popstate",s),e.__teardowns=e.__teardowns||[],e.__teardowns.push(()=>o.removeEventListener("popstate",s))},IR=(t,e)=>{let{components:r}=t;if(e&&e.injectRouterInLinkComponent)return st(r.Link||r["smbls.Link"],r.RouterLink||r["smbls.RouterLink"])};R();var ob=C&&C.location?C.location.host.includes("dev."):Rr(),Jk=ob?"http://localhost:8080/get":"https://api.symbols.app/get",$R={endpoint:Jk},Qk=async(t,e=$R)=>{let r=e.endpoint||Jk,n=e.serviceRoute?O(e.serviceRoute)?e.serviceRoute.map(s=>s.toLowerCase()+"=true").join("&"):e.serviceRoute:"",o;try{return o=await globalThis.fetch(r+"/?"+n,{method:"GET",headers:{"Content-Type":"application/json","X-AppKey":t,"X-Metadata":e.metadata}}),await o.json()}catch(s){if(T(e.onError))return e.onError(s);console.error(s)}},LR=async(t,e)=>{let{editor:r}=e;if(r&&r.remote){let n=await Qk(t,r),o=ob||e.isDevelopment?ye(n):ye(n.releases[0]);r.serviceRoute?O(r.serviceRoute)?r.serviceRoute.forEach(s=>{Gt(e[s],o[s.toLowerCase()])}):Gt(e[r.serviceRoute],o):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{Gt(e[s],o[s.toLowerCase()])})}return e},MR=async(t,e,r)=>{let{editor:n}=e;if(n&&n.remote){let o=await Qk(t,n),s=ob||e.isDevelopment?ye(o):ye(o.releases[0]);r(s)}},tv=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await LR(t,e)}catch(r){console.error(r)}},ev=(t,e,r,n)=>{if(e&&r.editor)try{r.editor.async&&MR(e,r,n||(o=>{let s=o.designSystem;k(s)&&r.utils.init(s),k(o.state)&&t.state.set(o.state)}))}catch(o){console.error(o)}};var rc=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(n){console.error("[smbls] destroy teardown error:",n)}e.__teardowns.length=0}try{Xr(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 ib={};D(ib,{Helmet:()=>ov,applyMetadata:()=>ms,default:()=>HR,extractMetadata:()=>UR,generateHeadHtml:()=>zR,helmetPlugin:()=>sb,resolveMetadata:()=>tn});R();var FR={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"}},NR=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}"]`},rv=t=>ye({v:t}).v,nv=(t,e,r,n)=>{try{return ft(t,e,r)}catch(o){console.warn(`[helmet] metadata factory for "${n}" threw; treating as unset:`,o&&o.message||o);return}},tn=(t,e,r)=>{if(!t)return{};let n=t;S(n)&&He(n)&&(n=rv(n));let o=T(n)?nv(n,e,r,"metadata"):k(n)?{...n}:{};if(!k(o))return{};for(let s in o){let i=o[s];S(i)&&He(i)&&(i=rv(i)),T(i)?i=nv(i,e,r,s):S(i)&&He(i)&&(i=void 0),S(i)&&i.includes("{{")&&e?.call&&(i=e.call("replaceLiteralsWithObjectFields",i,r)),o[s]=i}return o},jR=t=>!!t&&typeof t=="object"&&(t.notFound===!0||t.metadata?.notFound===!0),BR=(t,e)=>{if(Object.prototype.hasOwnProperty.call(t,e))return t[e];if(t["/*"])return t["/*"];if(t["*"])return t["*"];for(let r in t)if(jR(t[r]))return t[r]},UR=(t,e="/",r,n)=>{let o=t.pages||{},s=BR(o,e),i={};if(t.integrations?.seo&&(i={...t.integrations.seo}),t.app?.metadata){let c=tn(t.app.metadata,r,n);i={...i,...c}}let a=new Set;if(s){let c=s.metadata||s.helmet||{},l=tn(c,r,n);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},VR=(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},gs=t=>{let e=5381,r=String(t);for(let n=0;n<r.length;n++)e=(e*33^r.charCodeAt(n))>>>0;return e.toString(36)},hs=(t,e,r,n)=>{let o=t.head||t.querySelector("head");if(!o)return;let s=new Map;for(let a of o.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=n(a);c&&(c.setAttribute(e,a),o.appendChild(c))}},ms=(t,e)=>{if(!(!k(t)||!e)){for(let r in t){let n=t[r];if(n==null||r==="jsonLd"||r==="styles"||r==="scripts"||r==="alternate"||r==="favicons"||r==="icon"||r==="favicon")continue;let o=FR[r];if(!o)continue;let s=NR(o),i=e.querySelector(s)||VR(o,e);i&&(r==="title"?i.textContent=n:o.valueAttr?i.setAttribute(o.valueAttr,n):i.setAttribute("content",n))}if(Array.isArray(t.jsonLd)){let n=t.jsonLd.filter(s=>s!=null).map(s=>S(s)?s:JSON.stringify(s)),o=n.map(gs);hs(e,"data-smbls-jsonld",o,s=>{let i=o.indexOf(s),a=e.createElement("script");return a.setAttribute("type","application/ld+json"),a.textContent=n[i],a})}if(Array.isArray(t.styles)){let r=t.styles.filter(o=>o!=null&&String(o).trim()),n=r.map(gs);hs(e,"data-smbls-style",n,o=>{let s=n.indexOf(o),i=e.createElement("style");return i.textContent=String(r[s]),i})}if(Array.isArray(t.scripts)){let r=t.scripts.filter(o=>o&&(S(o)?o.trim():o.src)),n=r.map(o=>S(o)?o:String(o.src));hs(e,"data-smbls-script",n,o=>{let s=n.indexOf(o),i=r[s],a=e.createElement("script");return S(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})}if(Array.isArray(t.alternate)){let r=t.alternate.filter(o=>k(o)),n=r.map(o=>`${o.hreflang||""}|${o.href||""}`);hs(e,"data-smbls-alternate",n,o=>{let s=n.indexOf(o),i=e.createElement("link");i.setAttribute("rel","alternate");for(let[a,c]of Object.entries(r[s]))i.setAttribute(a,c);return i})}if(Array.isArray(t.favicons)){let r=t.favicons.filter(o=>o!=null),n=r.map(o=>k(o)?gs(JSON.stringify(o)):String(o));hs(e,"data-smbls-favicon",n,o=>{let s=n.indexOf(o),i=r[s],a=e.createElement("link");if(a.setAttribute("rel","icon"),k(i))for(let[c,l]of Object.entries(i))a.setAttribute(c,l);else a.setAttribute("href",String(i));return a})}if(t.icon||t.favicon){let r=String(t.icon||t.favicon),n=r.endsWith(".svg")?"image/svg+xml":r.endsWith(".png")?"image/png":"";hs(e,"data-smbls-single-icon",[r],o=>{let s=e.createElement("link");return s.setAttribute("rel","icon"),s.setAttribute("href",o),n&&s.setAttribute("type",n),s})}}},at=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,r=>e[r])},zR=t=>{let e=['<meta charset="UTF-8">'],r=new Set(["charset","jsonLd","styles","scripts"]),n=!1;for(let[o,s]of Object.entries(t)){if(!s&&s!==0&&s!==!1||r.has(o)||typeof s=="function")continue;if(o==="title"){e.push(`<title>${at(s)}</title>`);continue}if(o==="viewport"){n||(e.push(`<meta name="viewport" content="${at(s)}">`),n=!0);continue}if(o==="canonical"){e.push(`<link rel="canonical" href="${at(s)}">`);continue}if(o==="icon"||o==="favicon"){let f=at(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(o==="favicons"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,p])=>`${d}="${at(p)}"`).join(" ");e.push(`<link rel="icon" ${u}>`)}else typeof f=="string"&&e.push(`<link rel="icon" href="${at(f)}">`)});continue}if(o==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,p])=>`${d}="${at(p)}"`).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=>o.startsWith(f)),l=a.some(f=>o.startsWith(f));if(o.startsWith("http-equiv:")){let f=o.replace("http-equiv:","");e.push(`<meta http-equiv="${at(f)}" content="${at(s)}">`)}else if(o.startsWith("itemprop:")){let f=o.replace("itemprop:","");e.push(`<meta itemprop="${at(f)}" content="${at(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>e.push(`<meta property="${at(o)}" content="${at(f)}">`)):e.push(`<meta property="${at(o)}" content="${at(s)}">`):l?e.push(`<meta name="${at(o)}" content="${at(s)}">`):Array.isArray(s)?s.forEach(f=>e.push(`<meta name="${at(o)}" content="${at(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.push(`<meta name="${at(o)}" content="${at(s)}">`)}if(n||e.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),Array.isArray(t.jsonLd))for(let o of t.jsonLd){if(o==null)continue;let s=typeof o=="string"?o:JSON.stringify(o),i=String(s).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${gs(s)}">${i}<\/script>`)}if(Array.isArray(t.styles))for(let o of t.styles){if(o==null||!String(o).trim())continue;let s=String(o).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${gs(s)}">${s}</style>`)}if(Array.isArray(t.scripts))for(let o of t.scripts){if(!o)continue;let s=typeof o=="string",i=s?o:o.src;if(!i&&!(o&&o.body))continue;let a=[];i&&a.push(`src="${at(i)}"`),s||(o.type&&a.push(`type="${at(o.type)}"`),o.async&&a.push("async"),o.defer&&a.push("defer"),o.integrity&&a.push(`integrity="${at(o.integrity)}"`),o.crossorigin&&a.push(`crossorigin="${at(o.crossorigin)}"`),o.referrerpolicy&&a.push(`referrerpolicy="${at(o.referrerpolicy)}"`),o.nomodule&&a.push("nomodule"));let c=` data-smbls-script="${at(i||gs(o.body||""))}"`;if(!s&&o.body){let l=String(o.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${a.join(" ")}${c}>${l}<\/script>`)}else e.push(`<script ${a.join(" ")}${c}><\/script>`)}return e.join(`
89
+ `)},ov={define:{metadata:(t,e,r)=>{let n=e.context?.document||typeof document<"u"&&document;if(!n)return;let o=K(()=>{let s=tn(t,e,e.state);ms(s,n);let i=e.state?.root;k(i)&&(i.$helmet=s)});e.__ref?.__effects&&e.__ref.__effects.push(o)}}},sb={name:"helmet",create(t){if(!t.metadata)return;let e=t.context?.document||typeof document<"u"&&document;if(!e)return;let r=K(()=>{let n=t.metadata;if(!n)return;let o=tn(n,t,t.state);ms(o,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 n=tn(e,t,t.state);ms(n,r)}},HR=ov;Ir();var sv=(t,e,r,n)=>{t&&Ii(t,e,r,n)},iv=(t,e,r)=>{if(!t)return;let n=e.context?.document||typeof document<"u"&&document;if(!n)return;let o=tn(t,e,r);ms(o,n)},av=async(t,e)=>{if(!t)return;let r={tag:"fragment",...t},n=async()=>{await e.set(r,{preventDefineUpdate:"$router"})};return e.lazyLoad?window.requestAnimationFrame(n):await n(),r},ys={routes:t=>t,metadata:iv,fetch:sv,$router:av},cv=(t={})=>{let e={routes:r=>r};return t.metadata!==!1&&(e.metadata=iv),t.fetch!==!1&&(e.fetch=sv),t.router!==!1&&(e.$router=av),e};var ab={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},du={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},pu={...ab,router:du},WR={state:{},pages:{},components:{},router:du,define:ys},en=WR;R();R();var lv=(t,e)=>N(t.extends)?t.extends:[];R();var cb={};D(cb,{default:()=>GR,getActiveLang:()=>rn,getLanguages:()=>oc,getLocalStateLang:()=>lc,initPolyglot:()=>gu,loadTranslations:()=>ic,polyglotPlugin:()=>_s,setLang:()=>ac,translate:()=>sc,upsertTranslation:()=>cc});R();var uv="smbls_lang",qR="smbls_t_",KR="smbls_tv_",bs={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)}}},nc={};function rn(){let t=this?.context,e=t?.polyglot;return(this?.state?.root||t?.state?.root)?.lang||t?.state?.lang||e?.defaultLang||"en"}function oc(){let t=this?.context?.polyglot;return t?t.languages?t.languages:t.translations?Object.keys(t.translations):[]:[]}var hu=(t,e)=>{if(!t||!e)return;if(t[e]!==void 0)return t[e];if(e.indexOf(".")===-1)return;let r=e.split("."),n=t;for(let o=0;o<r.length;o++){if(n==null)return;n=n[r[o]]}return n},fv=(t,e,r)=>{let n=e.lastIndexOf(".");if(n===-1)return t[e+"_"+r];let o=hu(t,e.substring(0,n));if(o!=null)return o[e.substring(n+1)+"_"+r]};function sc(t,e){if(!t)return"";let r=this?.context,n=r?.polyglot,o=e||this.call("getActiveLang"),s=this?.state;if(s){let l=fv(s,t,o);if(l!==void 0)return l}if(n?.translations){let l=n.translations[o];if(l){let f=hu(l,t);if(f!==void 0)return f}}let a=(s?.root||r?.state?.root)?.translations;if(a){let l=a[o];if(l){let f=hu(l,t);if(f!==void 0)return f}}let c=n?.defaultLang||"en";if(s){let l=fv(s,t,c);if(l!==void 0)return l}if(n?.translations){let l=n.translations[c];if(l){let f=hu(l,t);if(f!==void 0)return f}}return t}async function ic(t){let e=this?.context,r=e?.polyglot,n=this?.state?.root||e?.state?.root;if(!r||!n)return;let o=r.storagePrefix||qR,s=r.storageVersionPrefix||(r.storagePrefix?r.storagePrefix.replace(/_$/,"v_"):KR);if(r.translations&&r.translations[t]&&!r.fetch||!r.fetch||r._fetchFailed?.[t])return;if(!n.translations?.[t]){let c=bs.get(o+t);if(c)try{let l=JSON.parse(c),f={translations:{...n.translations||{}}};f.translations[t]=l,n.update&&n.update(f)}catch(l){console.warn("[polyglot] Failed to apply language update:",l.message)}}let i=(r.storagePrefix||"smbls")+":"+t;if(nc[i])return nc[i];let a=this;return nc[i]=(async()=>{try{let c=r.fetch,l=parseInt(bs.get(s+t),10)||0,f,u,d;if(T(c)){let h=await c(t,l,a);if(!h||h.changed===!1)return;f=h.translations||h.data||h,u=h.version||0,d=!0}else if(k(c)){let h=a.getDB||(()=>e.fetch),g=T(h)?await h.call(a):e.fetch;if(!g)return;let m=c.rpc||c.from||"get_translations_if_changed",b={p_lang:t,p_cached_version:l,...c.params||{}},_=await g.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;bs.set(o+t,JSON.stringify(f)),u&&bs.set(s+t,String(u));let p={translations:{...n.translations||{}}};p.translations[t]=f,n.update&&n.update(p)}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 nc[i]}})(),nc[i]}async function ac(t){let e=this?.context,r=e?.polyglot,n=this?.state?.root||e?.state?.root,o=e?.document||globalThis.document;if(!n)return;let s=r?.storageLangKey||uv;if(bs.set(s,t),o?.documentElement&&(o.documentElement.lang=t),this.call("getActiveLang")===t)return;r?.fetch&&await this.call("loadTranslations",t),e?.state&&(e.state.lang=t);let i=r?.translations?.[t],a={lang:t},c=l=>ur(e,l,n);if(i&&typeof i=="object")for(let l in i){if(!c(l))continue;let f=i[l];(Array.isArray(f)||typeof f=="string"||typeof f=="number")&&(a[l]=f)}n.update&&n.update(a);for(let l in a)l!=="lang"&&Ge(e,l);if(i&&typeof i=="object")for(let l in i){if(!c(l))continue;let f=i[l];if(f&&typeof f=="object"&&!Array.isArray(f)&&n[l]&&typeof n[l]=="object"&&!Array.isArray(n[l])){for(let u in f)n[l][u]=f[u];Ge(e,l)}}if(o&&i){let l=o.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 p=u.call("replaceLiteralsWithObjectFields",d,u.state);p!=null&&f.textContent!==p&&(f.textContent=p)}catch{}}}}async function cc(t,e,r){let n=this?.context,o=n?.polyglot,s=this?.state?.root||n?.state?.root;if(s?.translations?.[e]&&(s.translations[e][t]=r),o?.translations?.[e]&&(o.translations[e][t]=r),o?.fetch&&k(o.fetch)){let i=this.getDB||(()=>n.fetch),a=T(i)?await i.call(this):n.fetch;if(!a)return;let c=o.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 gu(){let t=this?.context,e=t?.polyglot;if(!e)return;let r=this?.state?.root||t?.state?.root;if(!r)return;let n=e.storageLangKey||uv,s=bs.get(n)||rn.call(this),i=t?.document||globalThis.document;i?.documentElement&&(i.documentElement.lang=s),r.update&&r.lang!==s&&r.update({lang:s}),e.fetch&&!(e.translations&&e.translations[s])&&await this.call("loadTranslations",s)}function lc(t){try{let e=rn.call(this),r=this?.state;if(!r)return"";let n=t.lastIndexOf(".");if(n===-1)return r[t+e]??"";let o=t.substring(0,n).split("."),s=r;for(let i=0;i<o.length;i++){if(s==null)return"";s=s[o[i]]}return s==null?"":s[t.substring(n+1)+e]??""}catch{return""}}var _s={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,gu.call(t))}},GR=_s;Ir();var fb={};D(fb,{SYSTEM_METRICS:()=>fc,capsizeHandler:()=>lb,capsizePlugin:()=>yu,computeCapsize:()=>dv,default:()=>YR,resolveFontSizePx:()=>pv,resolveMetrics:()=>hv});var fc={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}},mu=t=>parseFloat(t.toFixed(4)),dv=(t,e,r)=>{let{ascent:n,descent:o,lineGap:s,unitsPerEm:i,capHeight:a}=e,c=Math.abs(o),l=n+c+s,f=r!==void 0?r:l/i*t,u=f/t,d=l/i,p=(n-a+s/2)/i-(u-d)/2,h=(c+s/2)/i-(u-d)/2;return{fontSize:`${mu(t/16)}rem`,lineHeight:`${mu(f)}px`,capHeightTrim:`${mu(-p)}em`,baselineTrim:`${mu(-h)}em`}},pv=(t,e)=>{if(typeof t=="number")return t;let r=e?.designSystem;if(!r)return null;let{typography:n}=r;if(n?.sequence){let s=String(t).toUpperCase(),i=n.sequence[s];if(i)return i.decimal||i.val}let o=parseFloat(t);return isNaN(o)?null:typeof t=="string"&&t.endsWith("rem")?o*(r.typography?.browserDefault||16):o},hv=(t,e)=>{let n=e?.designSystem?.font_family||{};if(t){let s=n[t];if(s?.metrics)return s.metrics;let i=String(t).toLowerCase().replace(/['"]/g,"").trim();if(fc[i])return fc[i]}let o=n.default||Object.keys(n)[0];if(o){let s=n[o];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(fc[a])return fc[a]}}return null},lb=(t,e,r,n)=>{if(!t)return;let o=pv(e.fontSize,n);if(!o)return;let s=hv(e.fontFamily,n);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=dv(o,s,i),f={};return e.lineHeight||(f.lineHeight=a),f["::before"]={content:'""',marginBottom:c,display:"table"},f["::after"]={content:'""',marginTop:l,display:"table"},f},yu={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},YR=yu;var yb={};D(yb,{PRESERVE_VALUE_KEYS:()=>Lt,SKIP_INLINE_KEYS:()=>nn,abbrToProp:()=>$t,decode:()=>_v,encode:()=>mv,expand:()=>zn,isComponentKey:()=>Ne,isSelectorKey:()=>je,parse:()=>Hn,parseFurther:()=>qn,propToAbbr:()=>Te,shorten:()=>uc,shorthandPlugin:()=>dc,stringify:()=>Vn,stringifyFurther:()=>Wn});var Te={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"},$t=Object.create(null);for(let t in Te)$t[Te[t]]=t;var ub=Object.create(null);for(let t in Te){let e=Te[t];if(ub[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${ub[e]}"`);ub[e]=t}var Lt=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),nn=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function Ne(t){return/^[A-Z]/.test(t)}function je(t){return/^[:@.!$>&]/.test(t)||t.startsWith("> ")}function mv(t){if(!t||typeof t!="object")return"";let e=[];for(let r in t){let n=t[r];if(typeof n=="function"||n!==null&&typeof n=="object"&&!Array.isArray(n)||n===void 0)continue;let o=Te[r]||r;if(n===!0)e.push(o);else if(n===!1)e.push("!"+o);else if(Array.isArray(n)){let s=n.map(i=>bu(i));e.push(o+":"+s.join(","))}else e.push(o+":"+bu(n))}return e.join(" ")}function bu(t){return String(t).replace(/ /g,"_")}function uc(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?uc(r):r});let e={};for(let r in t){let n=t[r];if(Ne(r)){e[r]=db(n);continue}if(je(r)){e[r]=db(n);continue}let o=Te[r]||r;if(Lt.has(r)||Lt.has(o)){e[o]=n;continue}e[o]=db(n)}return e}function db(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?uc(e):e}):typeof t=="object"?uc(t):t}function Vn(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?Vn(n):n});let e={},r=[];for(let n in t){let o=t[n];if(Ne(n)){e[n]=gv(o);continue}if(je(n)){e[n]=gv(o);continue}let s=Te[n]||n;if(Lt.has(n)||Lt.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(nn.has(n)||nn.has(s)){e[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){e[s]=o.map(function(a){return a!==null&&typeof a=="object"?Vn(a):a});continue}if(o.length<=1){e[s]=o;continue}r.push(s+":"+o.map(bu).join(","));continue}if(typeof o=="object"){e[s]=Vn(o);continue}o===!0?r.push(s):o===!1?r.push("!"+s):typeof o=="number"||typeof o=="string"&&(o.includes(",")||o.includes("_"))?e[s]=o:r.push(s+":"+bu(o))}return r.length&&(e.in=r.join(" ")),e}function gv(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Vn(e):e}):typeof t=="object"?Vn(t):t}function _v(t){if(!t||typeof t!="string")return{};let e={},r=xv(t);for(let n of r){if(n.startsWith("!")){let c=n.slice(1),l=$t[c]||c;e[l]=!1;continue}let o=n.indexOf(":");if(o===-1){let c=$t[n]||n;e[c]=!0;continue}let s=n.slice(0,o),i=n.slice(o+1),a=$t[s]||s;if(i.includes(",")){e[a]=i.split(",").map(yv);continue}e[a]=yv(i)}return e}function xv(t){return t.trim().split(/\s+/).filter(Boolean)}function yv(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function bv(t){return t.replace(/_/g," ")}function XR(t){if(!t||typeof t!="string")return{};let e={},r=xv(t);for(let n of r){if(n.startsWith("!")){let c=n.slice(1),l=$t[c]||c;e[l]=!1;continue}let o=n.indexOf(":");if(o===-1){let c=$t[n]||n;e[c]=!0;continue}let s=n.slice(0,o),i=n.slice(o+1),a=$t[s]||s;if(i.includes(",")){e[a]=i.split(",").map(bv);continue}e[a]=bv(i)}return e}function zn(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?zn(r):r});let e={};for(let r in t){let n=t[r];if(Ne(r)){e[r]=pb(n);continue}let o=$t[r]||r;if(je(r)&&o===r){e[r]=pb(n);continue}if(Lt.has(o)||Lt.has(r)){e[o]=n;continue}e[o]=pb(n)}return e}function pb(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?zn(e):e}):typeof t=="object"?zn(t):t}function Hn(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Hn(r):r});let e={};if(typeof t.in=="string"){let r=XR(t.in);for(let n in r)e[n]=r[n]}for(let r in t){if(r==="in")continue;let n=t[r];if(Ne(r)){e[r]=hb(n);continue}let o=$t[r]||r;if(je(r)&&o===r){e[r]=hb(n);continue}if(Lt.has(o)||Lt.has(r)){e[o]=n;continue}e[o]=hb(n)}return e}function hb(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Hn(e):e}):typeof t=="object"?Hn(t):t}function wv(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function ZR(t){let e="",r=0;for(;r<t.length;){if(t[r]==="\\"&&r+1<t.length){let n=t[r+1];if(n===","||n==="_"||n==="\\"){e+=n,r+=2;continue}}t[r]==="_"?e+=" ":e+=t[r],r++}return e}function JR(t){let e=[],r="",n=0;for(;n<t.length;){if(t[n]==="\\"&&n+1<t.length){r+=t[n]+t[n+1],n+=2;continue}if(t[n]===","){e.push(r),r="",n++;continue}r+=t[n],n++}return e.push(r),e}function Sv(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 Wn(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?Wn(n):n});let e={},r=[];for(let n in t){let o=t[n];if(Ne(n)){let i=kv(o);e[n]=Sv(i)?i.in:i;continue}if(je(n)){let i=kv(o);e[n]=Sv(i)?i.in:i;continue}let s=Te[n]||n;if(Lt.has(n)||Lt.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(nn.has(n)||nn.has(s)){e[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){e[s]=o.map(function(a){return a!==null&&typeof a=="object"?Wn(a):a});continue}if(o.length<=1){e[s]=o;continue}r.push(s+":"+o.map(wv).join(","));continue}if(typeof o=="object"){e[s]=Wn(o);continue}if(o===!0){r.push(s);continue}if(o===!1){r.push("!"+s);continue}if(typeof o=="number"){r.push(s+":#"+o);continue}r.push(s+":"+wv(o))}return r.length&&(e.in=r.join(" ")),e}function kv(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Wn(e):e}):typeof t=="object"?Wn(t):t}function vv(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):ZR(t)}function gb(t){if(!t||typeof t!="string")return{};let e={},r=t.trim().split(/\s+/).filter(Boolean);for(let n of r){if(n.startsWith("!")){let l=n.slice(1),f=$t[l]||l;e[f]=!1;continue}let o=n.indexOf(":");if(o===-1){let l=$t[n]||n;e[l]=!0;continue}let s=n.slice(0,o),i=n.slice(o+1),a=$t[s]||s,c=JR(i);if(c.length>1){e[a]=c.map(vv);continue}e[a]=vv(i)}return e}function qn(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?qn(r):r});let e={};if(typeof t.in=="string"){let r=gb(t.in);for(let n in r)e[n]=r[n]}for(let r in t){if(r==="in")continue;let n=t[r];if(Ne(r)){typeof n=="string"?e[r]=gb(n):e[r]=mb(n);continue}let o=$t[r]||r;if(je(r)&&o===r){typeof n=="string"?e[r]=gb(n):e[r]=mb(n);continue}if(Lt.has(o)||Lt.has(r)){e[o]=n;continue}e[o]=mb(n)}return e}function mb(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?qn(e):e}):typeof t=="object"?qn(t):t}var QR={shorten:zn,stringify:Hn,stringifyFurther:qn};function tP(t,e){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(n=>e(n));let r={};for(let n in t){let o=t[n];r[n]=o&&typeof o=="object"?e(o):o}return r}var eP=["components","pages","snippets"],dc={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let n=QR[e===!0?"shorten":e];if(n){for(let o of eP)t[o]&&(t[o]=tP(t[o],n));t.app&&typeof t.app=="object"&&(t.app=n(t.app))}}};var Ob={};D(Ob,{LEVELS:()=>pc,analyzePlugin:()=>ws,attachBrowserListeners:()=>Au,attachNetworkListeners:()=>gc,classifyEvent:()=>vb,createAnalyzeState:()=>Tu,createBeaconSink:()=>Ab,createConsoleSink:()=>Cb,createDedupe:()=>wb,createEnrich:()=>_b,createMemorySink:()=>Eb,createPipeline:()=>Su,createRedact:()=>wu,createRemoteSink:()=>vu,createSample:()=>Sb,createSummarize:()=>xb,default:()=>ws,emitFetchEvent:()=>Dv,makeEvent:()=>X,meetsLevel:()=>_u,normalizeLevel:()=>hc,resolveSinks:()=>Eu,summarizeElement:()=>Kn});var rP=0,nP=()=>`${Date.now().toString(36)}-${(rP++).toString(36)}`,X=(t,e,r={})=>({id:nP(),ts:Date.now(),type:t,level:e,...r}),oP=t=>{let e=[],r=t,n=0;for(;r&&n<32;)r.key!=null&&e.unshift(String(r.key)),r=r.parent,n++;return e.join(" > ")},Kn=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:oP(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var xs=t=>t?.context?.analyze,sP={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"}},iP=(t,{category:e,type:r,level:n})=>o=>{let s=xs(o);!s||!s.shouldCapture(e)||s.emit(X(r,n,{hook:t,element:Kn(o)}))},Cv=t=>(e,r)=>{let n=xs(e);!n||!n.shouldCapture("state")||n.emit(X("state","debug",{hook:t,element:Kn(e),changedKeys:r?.changedKeys||null}))},ws={name:"analyze",error(t,e){let r=xs(t);if(!r||r.config.enabled===!1||!r.shouldCapture("errors"))return;let n=e?.error||e?.err||(e instanceof Error?e:null);r.emit(X("error","error",{hook:e?.hook||"error",element:Kn(t),error:n,message:n?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=xs(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=xs(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=xs(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:Kn(t),durationMs:r}))},beforeStateUpdate:Cv("beforeStateUpdate"),stateUpdate:Cv("stateUpdate")};for(let[t,e]of Object.entries(sP))ws[t]=iP(t,e);R();var pc={error:0,warn:1,info:2,debug:3,trace:4};var _u=(t,e)=>{let r=pc[t],n=pc[e];return r==null||n==null?!0:r<=n},hc=t=>pc[t]!=null?t:"warn";R();var xu=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var aP=(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},cP=(t,e)=>{if(e!=="redact"){if(e==="hash"){let r=0,n=String(t);for(let o=0;o<n.length;o++)r=(r<<5)-r+n.charCodeAt(o)|0;return`#${(r>>>0).toString(36)}`}return"***"}},bb=(t,e,r,n)=>{if(n>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>bb(s,e,r,n+1));let o={};for(let s of Object.keys(t))if(aP(s,e)||xu.test(s)){let a=cP(t[s],r);a!==void 0&&(o[s]=a)}else o[s]=bb(t[s],e,r,n+1);return o},wu=(t=[],e="mask")=>{let r=Array.isArray(t)?t:[t];return n=>{if(!n)return n;let{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:p,...h}=n,g=bb(h,r,e,0);return{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:p,...g}}};var _b=t=>{let e=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,r=typeof navigator<"u"?navigator.userAgent:null,n=t.config.buildHash||null,o=t.config.appId||null;return s=>{if(!s)return s;let i=t.context?.routerOptions?.currentRoute||null,a=C,c=a&&a.innerWidth?{w:a.innerWidth,h:a.innerHeight}:null;return{...s,session:e,app:{id:o,build:n,route:i},meta:{ua:r,viewport:c}}}},xb=()=>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},wb=(t=1e3,e=500)=>{let r=new Map;return n=>{if(!n)return n;let o=`${n.type}:${n.level}:${n.message||""}:${n.error?.message||""}`,s=r.get(o),i=n.ts||Date.now();if(s&&i-s<t)return null;if(r.set(o,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 n}},Sb=t=>e=>{if(!e)return e;let r=t[e.type];return r==null||r>=1?e:Math.random()>r?null:e},Ev={redact:t=>wu(t.config.redact||[],t.config.maskStrategy),enrich:t=>_b(t),summarize:()=>xb(),dedupe:t=>wb(t.config.cache?.dedupeWindowMs||1e3),sample:t=>Sb(t.config.sample||{})},lP=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let r=Ev[t];return r?r(e):null}return null},Su=t=>{let e=t.config,r=Array.isArray(e.transformers)?e.transformers.slice():[],n=r.findIndex(s=>s==="redact");n>=0&&r.splice(n,1);let o=[];e.redact!==!1&&o.push(Ev.redact(t));for(let s of r){let i=lP(s,t);i&&o.push(i)}return s=>{let i=s;for(let a of o){if(i==null)return null;let c=a(i);if(c==null)return null;if(Array.isArray(c)){let l=o.slice(o.indexOf(a)+1),f=[];for(let u of c){let d=u,p=!1;for(let h of l)if(d=h(d),d==null){p=!0;break}!p&&d!=null&&f.push(d)}return f}i=c}return i}};R();R();var ku=typeof C<"u"&&typeof C.document<"u",fP=5e3,uP=50,dP=3,pP=1500,hP=1e3,vb=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",gP=t=>{try{return JSON.stringify(t)}catch{return null}},mP=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},yP=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}},bP=()=>{if(!ku)return null;try{let t=C.document?.documentElement?.getAttribute("data-theme")||null,e=typeof C.matchMedia=="function"?C.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}},_P=()=>{if(!ku)return null;let t=C.location,e=typeof navigator<"u"?navigator:null,r=typeof screen<"u"?screen:null;return{url:t?.href||null,path:t?.pathname||null,referrer:C.document?.referrer||null,title:C.document?.title||null,ua:e?.userAgent||null,browser:yP(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:mP(),viewport:C.innerWidth?{w:C.innerWidth,h:C.innerHeight,dpr:C.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:bP()}},vu=(t={})=>{let e=t.url,r=typeof t.transport=="function"?t.transport:null,n=typeof t.syncTransport=="function"?t.syncTransport:null;if(!e&&!r)return()=>{};let o=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:vb,p=typeof t.beforeSend=="function"?t.beforeSend:null,h=t.debug===!0,g=typeof t.getDebug=="function"?t.getDebug:null,m=t.batchMs!=null?t.batchMs:fP,b=t.maxBatch||uP,_=t.maxRetries!=null?t.maxRetries:dP,y=t.backoffMs||pP,x=t.queueLimit||hP,w=t.sampleRate!=null?t.sampleRate:1,v=()=>typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,P=t.sessionId||v(),$=[],I=[],A=null,F=null,Mt=()=>{A||!$.length||(A=setTimeout(V,m))},H=L=>{if(F)return;let ot=y*Math.pow(2,Math.max(0,L-1));F=setTimeout(()=>{if(F=null,!I.length)return;let gt=I.shift();et(gt.envelope,gt.attempt)},ot)},tt=(L,ot=!1)=>{let gt=u?kb(u):null,Y={id:P,sentAt:Date.now()};ot&&(Y.endedAt=Date.now());let G={v:1,session:Y,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:_P(),user:gt?.user||null,traits:gt?.traits||null,tags:gt?.tags||null,events:L};if((g?kb(g)===!0:h)&&(G.app.debug=!0),p)try{return p(G)||null}catch{return G}return G},et=async(L,ot=1)=>{if(L)try{let gt=!0;if(r){let Y=await r(L);gt=Y!==!1&&Y?.ok!==!1}else gt=await xP(e,L,{apiKey:o,getAuth:f});!gt&&ot<_&&(I.push({envelope:L,attempt:ot+1}),H(ot+1))}catch{ot<_&&(I.push({envelope:L,attempt:ot+1}),H(ot+1))}},V=(L=!1,ot=!1)=>{if(A&&(clearTimeout(A),A=null),!$.length&&!ot)return;let gt=$;$=[];let Y=tt(gt,ot);if(Y){if(L&&ku){if(typeof n=="function"&&kb(()=>n(Y)))return;if(navigator.sendBeacon&&e){let G=gP(Y);if(G)try{navigator.sendBeacon(e,new C.Blob([G],{type:"application/json"}));return}catch{}}}et(Y)}},W=!1,Tt=()=>{W||(W=!0,V(!0,!0))};ku&&(C.addEventListener("pagehide",Tt,{passive:!0}),C.addEventListener("beforeunload",Tt,{passive:!0}),C.addEventListener("visibilitychange",()=>{C.document.visibilityState==="hidden"&&V(!0)},{passive:!0}));let z=L=>{if(!L||w<1&&Math.random()>w)return;W&&(W=!1);let ot={...L,log_type:d(L)};$.push(ot),$.length>x&&($=$.slice(-x)),$.length>=b?V():Mt()},bt=L=>(V(!1,!0),P=L||v(),W=!1,z.sessionId=P,P);return z.flush=()=>V(!1),z.endSession=Tt,z.startNewSession=bt,z.sessionId=P,z},kb=t=>{try{return t()}catch{return null}},xP=async(t,e,{apiKey:r,getAuth:n})=>{let o={"Content-Type":"application/json","X-Analyze-Beacon":"1"};if(r&&(o["X-Analyze-Key"]=r),n)try{let s=await n();s&&(o.Authorization=`Bearer ${s}`)}catch{}try{return(await fetch(t,{method:"POST",headers:o,body:JSON.stringify(e),keepalive:!0,credentials:"omit",mode:"cors"})).ok}catch{return!1}};var wP={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},SP="\x1B[0m",Cu=typeof C<"u"&&typeof C.document<"u",Cb=(t={})=>{let e=t.minLevel||null,r=console.error.bind(console),n=console.warn.bind(console),o=console.log.bind(console);return s=>{if(!s)return;let i=s.level==="error"?r:s.level==="warn"?n:o,a=`[analyze:${s.type}]`;if(Cu)i(a,s);else{let c=wP[s.level]||"";i(`${c}${a}${SP}`,s)}}},Eb=(t,e={})=>{let r=e.max||t.config.cache?.max||500,n=new Array(r),o=0,s=0,i=a=>{n[o]=a,o=(o+1)%r,s<r&&s++};return t.__memory={push:i,snapshot:()=>{let a=new Array(s),c=(o-s+r)%r;for(let l=0;l<s;l++)a[l]=n[(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:()=>{o=0,s=0}},i},Ab=(t={})=>{let e=t.url,r=t.batchMs!=null?t.batchMs:5e3,n=t.maxBatch||50;if(!e)return()=>{};let o=[],s=null,i=()=>{if(s&&(clearTimeout(s),s=null),!o.length)return;let c=JSON.stringify({events:o});o=[];let l=Cu?new C.Blob([c],{type:"application/json"}):c;if(Cu&&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(()=>{})};Cu&&(C.addEventListener("pagehide",i,{passive:!0}),C.addEventListener("beforeunload",i,{passive:!0}));let a=c=>{c&&(o.push(c),o.length>=n?i():s||(s=setTimeout(i,r)))};return a.flush=i,a},Av={console:Cb,memory:Eb,beacon:Ab,remote:vu},Tv=(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 n of e)if(typeof n=="function")r.push(n);else if(typeof n=="string"){let o=Av[n];if(!o)continue;r.push(n==="memory"?o(t,{}):o(n==="remote"?Tv(t,{}):{}))}else if(n&&typeof n=="object"&&n.type){let o=Av[n.type];if(!o)continue;r.push(n.type==="memory"?o(t,n):o(n.type==="remote"?Tv(t,n):n))}return r};R();var kP=typeof C<"u"&&typeof C.document<"u",vP=new Set(["password","hidden"]),Ov=(t,e)=>{let r=0,n=null,o=null;return(...s)=>{let i=Date.now();i-r>=e?(r=i,t(...s)):(o=s,n||(n=setTimeout(()=>{r=Date.now(),n=null,o&&(t(...o),o=null)},e-(i-r))))}},Tb="__analyzeKeyPath",Ss=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[Tb])return e[Tb];let r=[],n=e,o=0,s=null;for(;n&&o<64;){if(n.getAttribute){let a=n.getAttribute("data-key");a&&(s==null&&(s=a),r.unshift(a))}n=n.parentNode,o++}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[Tb]=i}catch{}return i},CP=(t,e)=>{if(e==="mask")return"***";if(e!=="redact"){if(e==="hash"){let r=0,n=String(t||"");for(let o=0;o<n.length;o++)r=(r<<5)-r+n.charCodeAt(o)|0;return`#${(r>>>0).toString(36)}`}return"***"}},EP=t=>!!(!t||t.tagName==="INPUT"&&vP.has(t.type)||xu.test(t.name||"")||xu.test(t.id||"")||t.dataset?.analyze==="skip"),Au=t=>{if(!kP)return;let e=t.config.capture,r=t.config.throttle,n=t.__teardown,o=(s,i,a,c)=>{s.addEventListener(i,a,c),n.push(()=>s.removeEventListener(i,a,c))};if(e.errors&&(o(C,"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}))}),o(C,"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){o(C,"click",i=>{t.emit(X("pointer","info",{hook:"click",target:Ss(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:Rv(i)}))},{passive:!0,capture:!0}),o(C,"dblclick",i=>{t.emit(X("pointer","info",{hook:"dblclick",target:Ss(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),o(C,"contextmenu",i=>{t.emit(X("pointer","info",{hook:"contextmenu",target:Ss(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=Ov(i=>{t.emit(X("pointer","trace",{hook:"pointermove",x:i.clientX,y:i.clientY}))},r.pointermove);o(C,"pointermove",s,{passive:!0})}if(e.keyboard&&o(C,"keydown",s=>{t.emit(X("keyboard","info",{hook:"keydown",code:s.code,key:s.key&&s.key.length===1?"\xB7":s.key,modifiers:Rv(s),target:Ss(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=EP(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=CP(a.value,t.config.maskStrategy)),t.emit(X("forms","info",{hook:i.type,target:Ss(i),field:{name:a.name||null,type:a.type||a.tagName.toLowerCase()},value:u}))};o(C,"input",s,{passive:!0,capture:!0}),o(C,"change",s,{passive:!0,capture:!0}),o(C,"submit",i=>{t.emit(X("forms","info",{hook:"submit",target:Ss(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=Ov(()=>{t.emit(X("scroll","trace",{hook:"scroll",x:C.scrollX,y:C.scrollY}))},r.scroll);o(C,"scroll",s,{passive:!0,capture:!0})}if(e.viewport){let s=li(()=>{t.emit(X("viewport","info",{hook:"resize",w:C.innerWidth,h:C.innerHeight,dpr:C.devicePixelRatio||1}))},r.resize);o(C,"resize",s,{passive:!0}),o(C,"orientationchange",()=>{t.emit(X("viewport","info",{hook:"orientationchange",orientation:typeof screen<"u"&&screen.orientation?screen.orientation.type:null}))},{passive:!0}),o(C.document,"visibilitychange",()=>{t.emit(X("viewport","info",{hook:"visibilitychange",hidden:C.document.hidden}))},{passive:!0}),t.emit(X("viewport","info",{hook:"initial",w:C.innerWidth,h:C.innerHeight,dpr:C.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(Pv)}))}catch{}return i.apply(console,a)},n.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{}n.push(()=>s.disconnect())}catch{}},Rv=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),AP=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=Pv(t.cause)),e},Pv=t=>{if(t==null)return t;if(t instanceof Error)return AP(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};R();var TP=typeof C<"u"&&typeof C.document<"u",Dv=(t,e)=>{let r=t?.analyze;if(!r||!r.shouldCapture("network"))return;let n=e.phase==="error"?"error":"info";r.emit(X("network",n,{hook:`fetch.${e.phase}`,source:"symbo-fetch",...e}))},gc=t=>{if(TP&&t.config.capture.network&&!t.__networkListeners){if(t.__networkListeners=!0,t.__teardown.push(()=>{t.__networkListeners=!1}),typeof C.fetch=="function"){let e=C.fetch.bind(C),r=function(n,o){if(o?.headers?.["X-Analyze-Beacon"]||!t.shouldCapture("network"))return e(n,o);let s=typeof n=="string"?n:n&&n.url||"",i=(o?.method||typeof n=="object"&&n?.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(n,o).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})};C.fetch=r,t.__teardown.push(()=>{C.fetch=e})}if(typeof C.XMLHttpRequest=="function"){let e=C.XMLHttpRequest,r=e.prototype.open,n=e.prototype.send;e.prototype.open=function(o,s){return this.__analyze={method:String(o).toUpperCase(),url:String(s)},r.apply(this,arguments)},e.prototype.send=function(o){let s=this.__analyze;if(!s||!t.shouldCapture("network"))return n.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),n.apply(this,arguments)},t.__teardown.push(()=>{e.prototype.open=r,e.prototype.send=n})}}};var OP={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},RP={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},PP={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},DP={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},IP=t=>{let e={...OP,...t};return e.replay&&Object.assign(e,RP),e.telemetry&&Object.assign(e,PP),e.remote&&Object.assign(e,DP),Object.assign(e,t),e},$P=64,LP=()=>{if(typeof C>"u"||!C.location)return null;try{let e=new URLSearchParams(C.location.search).get("analyze");return e||null}catch{return null}},Tu=(t={})=>{let e=t===!0?{}:{...t};e.capture=IP(e.capture||{});let r=LP();(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=hc(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 n={config:e,context:null,__ready:!1,__paused:!1,__preBuffer:[],__teardown:[],__pipeline:null,__sinks:null,__memory:null,__initialSnapshot:null},o=()=>{n.__pipeline||(n.__pipeline=Su(n),n.__sinks=Eu(n))};return n.shouldCapture=s=>n.config.enabled===!1?!1:!!n.config.capture[s],n.emit=s=>{if(s&&n.config.enabled!==!1&&!n.__paused&&_u(s.level,n.config.level)){if(!n.__ready){if(s.level!=="error"&&!n.config.captureDuringHydration)return;n.__preBuffer.length<$P&&n.__preBuffer.push(s);return}o(),Iv(n,s)}},n.activate=s=>{if(n.context==null&&(n.context=s||null),n.__ready)return;n.__ready=!0;let i=n.__preBuffer;if(n.__preBuffer=[],i.length){o();for(let a of i)Iv(n,a)}try{Au(n)}catch(a){console.error("[analyze] browser attach error:",a)}try{gc(n)}catch(a){console.error("[analyze] network attach error:",a)}for(let a of n.__onActivate||[])try{a(n)}catch(c){console.error("[analyze] onActivate error:",c)}},n.pause=()=>{n.__paused=!0},n.resume=()=>{n.__paused=!1},n.setLevel=s=>{n.config.level=hc(s)},n.setCapture=(s,i)=>{if(n.config.capture[s]=!!i,s==="network"&&i&&n.__ready)try{gc(n)}catch(a){console.error("[analyze] network attach error:",a)}},n.query=s=>n.__memory?n.__memory.query(s):[],n.snapshot=()=>n.__memory?n.__memory.snapshot():[],n.emitNetwork=s=>{if(!n.shouldCapture("network"))return;let i=s?.phase,a=i==="error"?"error":i==="success"&&s.ok===!1?"warn":"info";n.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})},n.flush=()=>{if(n.__sinks)for(let s of n.__sinks)typeof s.flush=="function"&&s.flush()},n.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(n.config.sinks)?n.config.sinks:[];for(let c of a)c&&typeof c=="object"&&c.type==="remote"&&(c.sessionId=i);if(n.__sinks)for(let c of n.__sinks)typeof c.startNewSession=="function"&&c.startNewSession(i);return i},n.replay=()=>({initialSnapshot:n.__initialSnapshot,events:n.snapshot()}),n.destroy=()=>{for(let s of n.__teardown)try{s()}catch{}n.__teardown=[],n.__ready=!1,n.__paused=!0},n.__onActivate=[],n.onActivate=s=>{n.__onActivate.push(s)},n},Iv=(t,e)=>{let r=t.__pipeline(e);if(r==null)return;let n=Array.isArray(r)?r:[r];for(let o of n){if(typeof t.config.onEvent=="function")try{t.config.onEvent(o)}catch{}for(let s of t.__sinks)try{s(o)}catch(i){console.error("[analyze] sink error:",i)}}};var Db={};D(Db,{Inspect:()=>Ou,inspectPlugin:()=>Pb});R();function $v(t){return S(t)?t:O(t)?t.find(e=>S(e)):""}function Rb(t){if(!t)return;let e=t.__ref.__componentKey,r=t.extends&&$v(t.extends),n=t.parent&&t.parent.childExtends&&$v(t.parent.childExtends);return(e||r||n||"").split("_")[0].split(".")[0].split("+")[0]}function Ru(t){if(!t||!t.__ref)return;let{components:e,pages:r,editor:n}=t.context,o=Rb(t);return n&&n.onInitInspect&&!n.onInitInspect(o,t,t.state)?Ru(t.parent):o&&(e[o]||r[o])?t:Ru(t.parent)}var MP=(t,e,r)=>{let n=r.window||window;n.onkeydown=o=>{o.altKey&&o.shiftKey&&t.state.update({debugging:!0,preventSelect:!0},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0})},n.onkeyup=o=>{t.state.preventSelect&&(!o.altKey||!o.shiftKey)&&(t.state.replace({debugging:!1,preventSelect:!1},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0}),t.Inspector.state.update({area:!1}))}},Ou={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:MP,onMousemove:(t,e,r)=>{let n=t.target.ref,o=Ru(n),s=e.Inspector.state;if(!o||!r.debugging||!o.__ref)return s.update({area:!1});let i=Rb(o),a=l=>{s.update({area:l,focusKey:i})},c=()=>{if(t.altKey&&t.shiftKey){let{x:l,y:f,width:u,height:d}=o.node.getBoundingClientRect(),p={x:l,y:f,width:u,height:d};if(!s.area)return a(p);s.area.x!==p.x&&a(p)}else s.area&&s.update({area:!1})};window.requestAnimationFrame(()=>{c(),window.requestAnimationFrame(c)})},onMousedown:(t,e,r)=>{if(!r.debugging)return;let n=t.target.ref,o=Ru(n);if(!o)return;let s=Rb(o);if(!s)return;let i=n.context.editor;if(i&&i.onInspect)return i.onInspect(s,n,n.state,{allowRouterWhileInspect:!0});let a=JSON.stringify({componentKey:`${s}`});return n.context.socket?.emit&&n.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(k(e)){let{Content:r,...n}=e;for(let o in n)us[o]||(n[o].__ref||(n[o].__ref={}),n[o].__ref.__componentKey||(n[o].__ref.__componentKey=o))}},onBeforeUpdate:(t,e,r)=>{let{area:n}=r,o=r.area&&r.parent.debugging,s;if(!o)s="display: none !important";else if(n){let{x:i,y:a,width:c,height:l}=n;s=`
90
90
  display: block !important;
91
91
  top: ${a-6}px;
92
92
  left: ${i-6}px;
93
93
  width: ${c+12}px;
94
94
  height: ${l+12}px;
95
- `}return e.node.style=s,e.Span.node.innerText=r.focusKey,!1}}},Ab={name:"inspect",beforeCreate(t,e){Array.isArray(t.extends)?t.extends.push(Au):t.extends?t.extends=[t.extends,Au]:t.extends=[Au]}};var Rb={};I(Rb,{apiUrl:()=>Ob,channelByApiUrl:()=>vP,channelNames:()=>SP,channels:()=>re,currentChannel:()=>on,defaultChannel:()=>DP,deployTarget:()=>OP,isKnownChannel:()=>PP,mermaidUrl:()=>TP,normalizeOwnerSegment:()=>IP,normalizeProjectKey:()=>LP,normalizeProjectSlug:()=>$P,parseSymboLsHost:()=>MP,previewProjectUrl:()=>AP,previewUrl:()=>Pv,resolveChannel:()=>Gn,screenshotCdnHost:()=>Dv,screenshotCdnUrl:()=>RP,setChannel:()=>kP,shellUrl:()=>EP,socketUrl:()=>CP});var re={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 SP=Object.keys(re.channels),wr=t=>!!(t&&re.channels[t]),Gn=t=>wr(t)?re.channels[t]:re.channels[re.defaultChannel],kP=t=>{typeof globalThis>"u"||(globalThis.__SYMBOLS_CHANNEL__=wr(t)?t:null,Ss=void 0)},Ss,hc=t=>typeof process<"u"&&process.env&&process.env[t]||null,on=()=>{if(Ss!==void 0)return Ss;let t=typeof globalThis<"u"?globalThis.__SYMBOLS_CHANNEL__:null,e=hc("SYMBOLS_CHANNEL"),r=hc("NODE_ENV");return Ss=wr(t)&&t||wr(e)&&e||wr(r)&&r||re.defaultChannel,Ss===re.defaultChannel&&!wr(t)&&!wr(e)&&!wr(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 "${re.defaultChannel}". Outbound URLs (shellUrl/apiUrl) will target production; set SYMBOLS_CHANNEL (preferred), NODE_ENV, or globalThis.__SYMBOLS_CHANNEL__ to a known channel.`),Ss},Tv=["production","staging","upcoming","next","test","development","local","demo","demo-dev"],Ov=t=>{let e=Tv.indexOf(t);return e===-1?Tv.length:e},vP=t=>{if(!t)return null;let e=Object.keys(re.channels).filter(r=>re.channels[r].api===t);return e.length===0?null:e.length===1?e[0]:e.sort((r,n)=>Ov(r)-Ov(n))[0]},Ob=(t=on())=>hc("SYMBOLS_API_URL")||Gn(t).api,CP=(t=on())=>hc("SYMBOLS_SOCKET_URL")||Gn(t).socket,EP=(t=on())=>Gn(t).shell||null,Pv=(t=on())=>Gn(t).preview||null,AP=({owner:t,key:e,env:r="production"}={},n=on())=>{let o=Pv(n);if(!o||!t||!e)return null;let s=o.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)}`},TP=({owner:t,key:e,env:r="production"}={},n=on())=>{let o=Gn(n).mermaidApex;if(!o||!t||!e)return null;let i=!r||r==="production"||r==="prod"?"":`--${encodeURIComponent(r)}`,a=`${encodeURIComponent(t)}--${encodeURIComponent(e)}${i}`;return`${o.startsWith("localhost")?"http":"https"}://${a}.${o}`},OP=(t=on())=>Gn(t).deploy||{},Dv=()=>hc("SYMBOLS_SCREENSHOT_CDN")||re.screenshotCdn,RP=({owner:t,key:e,page:r="root",componentKey:n,env:o="production",width:s}={})=>{if(!t||!e)return null;let i=n?`component/${encodeURIComponent(n)}`:encodeURIComponent(String(r||"root").replace(/^\/+/,"").replace(/\//g,"-")||"root"),a=[];o&&o!=="production"&&a.push(`env=${encodeURIComponent(o)}`),s&&a.push(`w=${Number(s)}`);let c=a.length?`?${a.join("&")}`:"";return`https://${Dv()}/${encodeURIComponent(t)}/${encodeURIComponent(e)}/${i}.webp${c}`},PP=wr,DP=re.defaultChannel,IP=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"",$P=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"",LP=(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 n=typeof e.owner=="string"?e.owner.trim():"";return n&&r.startsWith(`${n}--`)?r=r.slice(n.length+2):!n&&r.includes("--")&&(r=r.slice(r.indexOf("--")+2)),r},Rv={at:"production",prod:"production",production:"production",dev:"development",development:"development",next:"next",upcoming:"upcoming",test:"test",staging:"staging"},MP=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=Rv[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?Rv[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 n=r[1],o=r[0];if(o.includes("--")){let[s,i]=o.split("--",2);return!s||!i?null:{projectKey:s,owner:n,env:i}}return{projectKey:o,owner:n,env:"production"}};var Ib={};I(Ib,{BUILD_DOMQL_SYSTEM_PROMPT:()=>Wv,DEFAULT_MAX_TOKENS:()=>Lu,DEFAULT_MODEL:()=>sn,DEFAULT_PROVIDER:()=>Iu,DEFAULT_TEMPERATURE:()=>$u,MODEL_TIER_ALIASES:()=>Db,PROVIDER_MODELS:()=>$v,SIMONE_BASE_URL:()=>gc,SIMONE_CHAT_PATH:()=>Ou,SIMONE_CODE_PATH:()=>Ru,SIMONE_CODE_SYMBOLS_PATH:()=>Pu,SIMONE_HEALTH_PATH:()=>Du,SIMONE_TOOLS_PATH:()=>Iv,WORKSPACE_SYSTEM_PROMPT:()=>Hv,buildMessages:()=>jv,chat:()=>mc,health:()=>Nv,parseSimoneResponse:()=>Vv,resolveModel:()=>qv,streamChat:()=>mc,streamCode:()=>Mv,streamCodeSymbols:()=>Fv,toLegacyEnvelope:()=>zv});var gc="https://symbols-service-production.up.railway.app",Ou="/api/chat",Ru="/api/code",Pu="/api/code-symbols",Du="/api/health",Iv="/api/tools",Iu="openai-compatible",sn="claude-sonnet-4-6",$u=.7,Lu=4096,$v={"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 Lv(t,e){return t?t.replace(/\/$/,"")+e:e}function FP(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 mc(t,e={},r){let{baseUrl:n=gc,path:o=Ou,provider:s=Iu,model:i=sn,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 p={messages:t,provider:s,model:i,temperature:a,maxTokens:c};l&&(p.effort=l),f&&(p.apiKeys=f);let h=await fetch(Lv(n,o),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...d},body:JSON.stringify(p),signal:u});if(!h.ok){let x=h.statusText;try{let v=await h.text();try{let D=JSON.parse(v);x=D.error||D.detail||x}catch{x=v||x}}catch{}let w=new Error(`simone: HTTP ${h.status} \u2014 ${x}`);throw w.status=h.status,w}if(!h.body||typeof h.body.getReader!="function"){let x=await h.text();return r&&r(x),{text:x,errors:[]}}let g=h.body.getReader(),m=new TextDecoder,b=[],_=[],y="";try{for(;;){let{done:x,value:w}=await g.read();if(x)break;y+=m.decode(w,{stream:!0});let v=y.indexOf(`
96
- `);for(;v!==-1;){let D=y.slice(0,v).trim();if(y=y.slice(v+1),D){let L=FP(D);if(L?.done)return{text:b.join(""),errors:_};let T=L?.chunk;T?.delta&&(b.push(T.delta),r&&r(T.delta)),T?.error&&_.push(T.error)}v=y.indexOf(`
97
- `)}}return{text:b.join(""),errors:_}}finally{g.cancel().catch(()=>{})}}function Mv(t,e={},r){return mc(t,{...e,path:Ru},r)}function Fv(t,e={},r){return mc(t,{...e,path:Pu},r)}async function Nv(t={}){let{baseUrl:e=gc,signal:r,headers:n}=t,o=await fetch(Lv(e,Du),{method:"GET",headers:n,signal:r});if(!o.ok)throw new Error(`simone health: HTTP ${o.status}`);return o.json()}function jv({system:t,history:e=[],user:r,context:n}){let o=[];t&&o.push({role:"system",content:t});for(let s of e)!s||!s.role||typeof s.content!="string"||!s.content||o.push({role:s.role,content:s.content});if(r){let s=r;if(n!=null){let i=typeof n=="string"?n:JSON.stringify(n,null,2);s=`${s}
95
+ `}return e.node.style=s,e.Span.node.innerText=r.focusKey,!1}}},Pb={name:"inspect",beforeCreate(t,e){Array.isArray(t.extends)?t.extends.push(Ou):t.extends?t.extends=[t.extends,Ou]:t.extends=[Ou]}};var $b={};D($b,{apiUrl:()=>Ib,channelByApiUrl:()=>BP,channelNames:()=>NP,channels:()=>re,currentChannel:()=>on,defaultChannel:()=>GP,deployTarget:()=>WP,isKnownChannel:()=>KP,mermaidUrl:()=>HP,normalizeOwnerSegment:()=>YP,normalizeProjectKey:()=>ZP,normalizeProjectSlug:()=>XP,parseSymboLsHost:()=>JP,previewProjectUrl:()=>zP,previewUrl:()=>Nv,resolveChannel:()=>Gn,screenshotCdnHost:()=>jv,screenshotCdnUrl:()=>qP,setChannel:()=>jP,shellUrl:()=>VP,socketUrl:()=>UP});var re={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 NP=Object.keys(re.channels),wr=t=>!!(t&&re.channels[t]),Gn=t=>wr(t)?re.channels[t]:re.channels[re.defaultChannel],jP=t=>{typeof globalThis>"u"||(globalThis.__SYMBOLS_CHANNEL__=wr(t)?t:null,ks=void 0)},ks,mc=t=>typeof process<"u"&&process.env&&process.env[t]||null,on=()=>{if(ks!==void 0)return ks;let t=typeof globalThis<"u"?globalThis.__SYMBOLS_CHANNEL__:null,e=mc("SYMBOLS_CHANNEL"),r=mc("NODE_ENV");return ks=wr(t)&&t||wr(e)&&e||wr(r)&&r||re.defaultChannel,ks===re.defaultChannel&&!wr(t)&&!wr(e)&&!wr(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 "${re.defaultChannel}". Outbound URLs (shellUrl/apiUrl) will target production; set SYMBOLS_CHANNEL (preferred), NODE_ENV, or globalThis.__SYMBOLS_CHANNEL__ to a known channel.`),ks},Lv=["production","staging","upcoming","next","test","development","local","demo","demo-dev"],Mv=t=>{let e=Lv.indexOf(t);return e===-1?Lv.length:e},BP=t=>{if(!t)return null;let e=Object.keys(re.channels).filter(r=>re.channels[r].api===t);return e.length===0?null:e.length===1?e[0]:e.sort((r,n)=>Mv(r)-Mv(n))[0]},Ib=(t=on())=>mc("SYMBOLS_API_URL")||Gn(t).api,UP=(t=on())=>mc("SYMBOLS_SOCKET_URL")||Gn(t).socket,VP=(t=on())=>Gn(t).shell||null,Nv=(t=on())=>Gn(t).preview||null,zP=({owner:t,key:e,env:r="production"}={},n=on())=>{let o=Nv(n);if(!o||!t||!e)return null;let s=o.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)}`},HP=({owner:t,key:e,env:r="production"}={},n=on())=>{let o=Gn(n).mermaidApex;if(!o||!t||!e)return null;let i=!r||r==="production"||r==="prod"?"":`--${encodeURIComponent(r)}`,a=`${encodeURIComponent(t)}--${encodeURIComponent(e)}${i}`;return`${o.startsWith("localhost")?"http":"https"}://${a}.${o}`},WP=(t=on())=>Gn(t).deploy||{},jv=()=>mc("SYMBOLS_SCREENSHOT_CDN")||re.screenshotCdn,qP=({owner:t,key:e,page:r="root",componentKey:n,env:o="production",width:s}={})=>{if(!t||!e)return null;let i=n?`component/${encodeURIComponent(n)}`:encodeURIComponent(String(r||"root").replace(/^\/+/,"").replace(/\//g,"-")||"root"),a=[];o&&o!=="production"&&a.push(`env=${encodeURIComponent(o)}`),s&&a.push(`w=${Number(s)}`);let c=a.length?`?${a.join("&")}`:"";return`https://${jv()}/${encodeURIComponent(t)}/${encodeURIComponent(e)}/${i}.webp${c}`},KP=wr,GP=re.defaultChannel,YP=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"",XP=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"",ZP=(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 n=typeof e.owner=="string"?e.owner.trim():"";return n&&r.startsWith(`${n}--`)?r=r.slice(n.length+2):!n&&r.includes("--")&&(r=r.slice(r.indexOf("--")+2)),r},Fv={at:"production",prod:"production",production:"production",dev:"development",development:"development",next:"next",upcoming:"upcoming",test:"test",staging:"staging"},JP=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=Fv[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?Fv[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 n=r[1],o=r[0];if(o.includes("--")){let[s,i]=o.split("--",2);return!s||!i?null:{projectKey:s,owner:n,env:i}}return{projectKey:o,owner:n,env:"production"}};var Fb={};D(Fb,{BUILD_DOMQL_SYSTEM_PROMPT:()=>Jv,DEFAULT_MAX_TOKENS:()=>Fu,DEFAULT_MODEL:()=>sn,DEFAULT_PROVIDER:()=>Lu,DEFAULT_TEMPERATURE:()=>Mu,MODEL_TIER_ALIASES:()=>Mb,PROVIDER_MODELS:()=>Uv,SIMONE_BASE_URL:()=>yc,SIMONE_CHAT_PATH:()=>Pu,SIMONE_CODE_PATH:()=>Du,SIMONE_CODE_SYMBOLS_PATH:()=>Iu,SIMONE_HEALTH_PATH:()=>$u,SIMONE_TOOLS_PATH:()=>Bv,WORKSPACE_SYSTEM_PROMPT:()=>Zv,buildMessages:()=>qv,chat:()=>bc,health:()=>Wv,parseSimoneResponse:()=>Yv,resolveModel:()=>Qv,streamChat:()=>bc,streamCode:()=>zv,streamCodeSymbols:()=>Hv,toLegacyEnvelope:()=>Xv});var yc="https://symbols-service-production.up.railway.app",Pu="/api/chat",Du="/api/code",Iu="/api/code-symbols",$u="/api/health",Bv="/api/tools",Lu="openai-compatible",sn="claude-sonnet-4-6",Mu=.7,Fu=4096,Uv={"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 Vv(t,e){return t?t.replace(/\/$/,"")+e:e}function QP(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 bc(t,e={},r){let{baseUrl:n=yc,path:o=Pu,provider:s=Lu,model:i=sn,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 p={messages:t,provider:s,model:i,temperature:a,maxTokens:c};l&&(p.effort=l),f&&(p.apiKeys=f);let h=await fetch(Vv(n,o),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...d},body:JSON.stringify(p),signal:u});if(!h.ok){let x=h.statusText;try{let v=await h.text();try{let P=JSON.parse(v);x=P.error||P.detail||x}catch{x=v||x}}catch{}let w=new Error(`simone: HTTP ${h.status} \u2014 ${x}`);throw w.status=h.status,w}if(!h.body||typeof h.body.getReader!="function"){let x=await h.text();return r&&r(x),{text:x,errors:[]}}let g=h.body.getReader(),m=new TextDecoder,b=[],_=[],y="";try{for(;;){let{done:x,value:w}=await g.read();if(x)break;y+=m.decode(w,{stream:!0});let v=y.indexOf(`
96
+ `);for(;v!==-1;){let P=y.slice(0,v).trim();if(y=y.slice(v+1),P){let $=QP(P);if($?.done)return{text:b.join(""),errors:_};let I=$?.chunk;I?.delta&&(b.push(I.delta),r&&r(I.delta)),I?.error&&_.push(I.error)}v=y.indexOf(`
97
+ `)}}return{text:b.join(""),errors:_}}finally{g.cancel().catch(()=>{})}}function zv(t,e={},r){return bc(t,{...e,path:Du},r)}function Hv(t,e={},r){return bc(t,{...e,path:Iu},r)}async function Wv(t={}){let{baseUrl:e=yc,signal:r,headers:n}=t,o=await fetch(Vv(e,$u),{method:"GET",headers:n,signal:r});if(!o.ok)throw new Error(`simone health: HTTP ${o.status}`);return o.json()}function qv({system:t,history:e=[],user:r,context:n}){let o=[];t&&o.push({role:"system",content:t});for(let s of e)!s||!s.role||typeof s.content!="string"||!s.content||o.push({role:s.role,content:s.content});if(r){let s=r;if(n!=null){let i=typeof n=="string"?n:JSON.stringify(n,null,2);s=`${s}
98
98
 
99
99
  ---
100
100
  Context:
101
101
  \`\`\`json
102
102
  ${i}
103
- \`\`\``}o.push({role:"user",content:s})}return o}var Uv=/```(?<lang>[a-zA-Z0-9_+-]*)\n(?<code>[\s\S]*?)```/g,NP=new Set(["component","components","page","pages","function","method","state","theme","color","font","icon"]);function jP(t){let e=[];for(let r of t.matchAll(Uv))e.push({lang:(r.groups?.lang||"").toLowerCase(),code:r.groups?.code??""});return e}function BP(t){return t.replace(Uv,"").trim()}function Pb(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 Bv(t){return!!t&&typeof t=="object"&&typeof t.type=="string"&&NP.has(t.type)}function Vv(t){let e=(typeof t=="string"?t:"").trim();if(!e)return{kind:"text",text:"",message:""};let r=jP(e),n=r.filter(i=>/^(js|javascript|ts|typescript|jsx|tsx)$/.test(i.lang)),o=r.filter(i=>i.lang==="json"),s=BP(e);for(let i of o){let a=Pb(i.code);if(Bv(a))return{kind:"asset",text:s||a.description||"",asset:a,message:a.description||s||`Generated ${a.type}: ${a.title||a.key||""}`.trim()}}if(n.length>0){let i=n[0].code,a=Pb("["+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=Pb(e);if(Bv(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 zv(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 Hv=["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(" "),Wv=["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(`
104
- `),Db={Starter:sn,Free:sn,Pro:"claude-opus-4-6"};function qv(t){return t?Db[t]||t:sn}var Kv={"@symbo.ls/signal":Nd,"@symbo.ls/scratch":im,"@symbo.ls/element":ay,"@symbo.ls/css":hm,"@symbo.ls/utils":Bl,"@symbo.ls/state":qm,"@symbo.ls/router":Xa,"@symbo.ls/polyglot":ob,"@symbo.ls/helmet":rb,"@symbo.ls/fetch":wn,"@symbo.ls/capsize":ib,"@symbo.ls/shorthand":pb,"@symbo.ls/analyze":Cb,"@symbo.ls/inspect":Tb,"@symbo.ls/channels":Rb,"@symbo-ls/simone-server":Ib},Gv=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:{}),n=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let o in Kv)n[o]||(n[o]=Kv[o]);if(e)for(let o in e)n[o]||(n[o]=e[o]);return n},Yv=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:null);if(!r||!e||typeof e!="object")return null;let n=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let o in e){let s=e[o];if(typeof s!="function"||Object.prototype.hasOwnProperty.call(n,o))continue;let i=a=>(Object.defineProperty(n,o,{configurable:!0,enumerable:!0,writable:!0,value:a}),a);Object.defineProperty(n,o,{configurable:!0,enumerable:!0,get:()=>i(s()),set:i})}return n},Xv=["@symbo.ls/sdk"],Zv=(t,e)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r||!t||typeof t!="object")return null;let n=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let o in t){let s=t[o];!s||typeof s!="object"&&typeof s!="function"||n[o]||(n[o]=s)}return n},UP=/^@symbo[-.]ls\//,VP=t=>t.includes("/")?t.slice(t.indexOf("/")+1):t,Jv=(t,e)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r||!Array.isArray(t))return null;let n=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let o of t){let s=o&&o.library?o.library:o;if(!s||typeof s!="object"||s.__isStub)continue;let i=s.key||s.name||s.__libraryKey,a=[];for(let c of[s.key,s.name,s.__libraryKey,s.__libraryName]){if(typeof c!="string"||!c||c!==i&&!UP.test(c))continue;let l=VP(c);l&&!a.includes(l)&&a.push(l)}for(let c of a)for(let l of[`@symbo-ls/${c}`,`@symbo.ls/${c}`])n[l]||(n[l]=s)}return n};P();var Qv=t=>{let e={faces:0,links:0};if(!t)return e;for(let r in t){let n=t[r];if(!n||!n.fontFace)continue;let o=Array.isArray(n.fontFace)?n.fontFace:[n.fontFace];for(let s of o){if(tC(s)){let i=zP(s);i&&HP(i)&&e.links++;continue}typeof s=="string"&&s.includes("font-family")&&(xt(`@font-face { ${s} }`),e.faces++)}}return e},tC=t=>typeof t=="string"&&t.trim().startsWith("@import"),zP=t=>{if(!tC(t))return null;let e=String(t).match(/url\(\s*['"]?([^'")]+)['"]?\s*\)/);return e?e[1].trim():null},HP=(t,e)=>{if(typeof t!="string"||!t)return null;let r=e||jn();if(!r||!r.head)return null;let n="data-smbls-font",o=r.head.querySelectorAll(`link[rel="stylesheet"][${n}]`);for(let i=0;i<o.length;i++)if(o[i].getAttribute(n)===t)return o[i];let s=r.createElement("link");return s.setAttribute("rel","stylesheet"),s.setAttribute("href",t),s.setAttribute(n,t),r.head.appendChild(s),s};var nC=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 n=t.window;return n&&n!==e&&typeof n.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=n||e,t.window},eC=(t="smbls")=>{let e={};for(let r in Un)Object.prototype.hasOwnProperty.call(Un,r)&&(Ke(r)?e[`smbls.${r}`]=Un[r]:e[r]=Un[r]);return e},oC=t=>t.components?{...eC(),...t.components}:eC(),sC=t=>({...Ja,...Xa,...jr,...t.utils,...t.snippets,...t.functions}),iC=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var WP=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,qP=3e3,KP=(t,e,r=n=>import(n))=>{if(typeof globalThis>"u")return Promise.resolve(null);try{let n=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});if(n[t])return Promise.resolve(n[t]);let o=Promise.resolve().then(()=>r(e)).then(i=>(i&&!n[t]&&(n[t]=i),n[t]||null)).catch(()=>null);return new Promise(i=>{let a=setTimeout(()=>i(null),qP);o.then(c=>{clearTimeout(a),i(c)})})}catch{return Promise.resolve(null)}},rC={},aC=async({dependencies:t,dependenciesOnDemand:e,document:r,preventCaching:n=!1,cdnProvider:o,packageManager:s,symbolsConfig:i,registerDependency:a=KP})=>{if(o||(o=Lr[s]||So(i)||"esmsh"),!t)return null;if(!vo(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=Rr()&&n?`?${Math.random()}`:"",f=async(d,p)=>{let h=Pe(d,p,o)+l;try{await Promise.race([Co(h,{document:r,type:"module"}),new Promise((g,m)=>setTimeout(()=>m(new Error(`Timeout loading ${d}`)),1e4))]),await a(d,h)}catch(g){if(console.error(`Failed to load ${d} from ${o}:`,g),o!=="symbols")try{let m=Pe(d,p,"symbols")+l;await Promise.race([Co(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 p=t[d];if(!(e&&e[d])&&!rC[d]&&(rC[d]=!0,!kn(d))){if(ko(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}WP(d)||u.push(f(d,p))}}return u.length&&await Promise.allSettled(u),t},cC=async(t,e)=>{let r=e.window||window,n=e.cdnProvider||So(e.symbolsConfig)||"esmsh",o=async i=>async(a,c)=>{let f=(i.window||window).packages[a];return typeof f=="function"?f():f},s=async i=>async(a,c=n)=>{let{dependenciesOnDemand:l}=i,f=i.document||document,u=i.window||window;if(!u.packages[a]&&kn(a))return await u.require(a,c);if(!u.packages[a]){let d=Rr()?`?${Math.random()}`:"";if(l&&l[a]){let p=l[a],h=Pe(a,p,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 m=Pe(a,p,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let p=Pe(a,"latest",c)+d;try{await i.utils.loadRemoteScript(p,{window:u,document:f})}catch(h){if(console.error(`Failed to load ${a} from ${c}:`,h),c!=="symbols"){let g=Pe(a,"latest","symbols")+d;await i.utils.loadRemoteScript(g,{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 o(e),r.require=e.utils.require),r.requireOnDemand||(e.utils.requireOnDemand=await s(e),r.requireOnDemand=e.utils.requireOnDemand)},GP=/\s+/g,lC=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,YP=(t,e)=>{let r="";for(let n in t){let o=t[n];typeof o=="boolean"&&o?r+=` ${n}`:typeof o=="string"?r+=` ${o}`:typeof o=="function"&&(r+=` ${lC(o,e)}`)}return r},XP=(t,e,r)=>{if(!t)return;let{key:n}=e;t===!0&&(t=e.classlist={key:n}),typeof t=="string"&&(t=e.classlist={default:t}),t!==null&&typeof t=="object"&&!Array.isArray(t)&&(t=YP(t,e));let o=t.replace(GP," ").trim();if(r&&typeof r.setAttribute=="function")r.setAttribute("class",o);else if(r)try{r.className=o}catch{}return o},ZP=()=>(t,e,r)=>{let n=lC(t,e);if(t){let{__ref:o}=e;o.__class.style=n}fC()(e.classlist,e,e.state,!0)},fC=()=>(t,e,r,n)=>{if(e.style&&!n)return;let{__ref:o}=e,{__class:s,__classNames:i}=o;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=le(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];e.node&&XP(i,e,e.node)}},JP=()=>({style:ZP(),classlist:fC()}),QP=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],$b=new WeakSet,Lb=!1,t2=t=>!!t&&typeof t=="object",uC=(t,e)=>{let r=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,n=e.initOptions||{},o=e.registry||JP(),s=e.designSystem?ot(lt(e.designSystem),lt(Ga),ie):lt(Ga),i={};for(let g of QP)e[g]!==void 0&&(i[g]=e[g]);let a,c=t2(r),f=c&&$b.has(r)&&!e.skipDesignSystemInit,u=!f&&!Lb,d=f?`[data-smbls-app="${t}"]`:":root";if(e.scopeSelector=d,e.skipDesignSystemInit){if(a=E(t)||E(),a&&(a.__domDocument=r),a?.CSS_VARS){st(a);try{xt({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&xt(ds(a.CSS_MEDIA_VARS,d))}finally{rt()}}}else if(u){let g=E();g&&(g.__domDocument=r),a=xr(s,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...uu,...i,...n}),a&&a!==g&&(a.__domDocument=r),c&&$b.add(r),Lb=!0}else{let g=fa(t,s,{cleanBase:!0});for(let m in i)g[m]=i[m];if(g.__domDocument=r,f){let m=t.replace(/[^a-zA-Z0-9]/g,"").substring(0,6);e.cssPrefix=m,g.varPrefix=m}st(g);try{a=xr(g,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...uu,...i,...n})}finally{rt()}c&&$b.add(r),Lb=!0}let p=a?.CONFIG||a,h=p?.font;if(h){st(p);try{Qv(h)}finally{rt()}}return[a,o]},dC=(t,e)=>{let r={};e.state&&ot(r,e.state),t&&t.state&&ot(r,t.state);let n=e.polyglot;if(n?.translations){let o=null;try{typeof localStorage<"u"&&(o=localStorage.getItem(n.storageLangKey||"smbls_lang")||localStorage.getItem("lang"))}catch{}let s=o||r.lang||n.defaultLang||"en";o&&o!==r.lang&&(r.lang=o);let i=new Set,a=new Set,c=(u,d)=>{if(!a.has(u)){if(!ur(e,u,r)){i.add(u);return}r[u]=d,a.add(u),Ge(e,u)}},l=n.translations[s];if(l&&typeof l=="object")for(let u in l)c(u,l[u]);let f=new Set(n.languages||[]);for(let u in n.translations)f.has(u)||c(u,n.translations[u]);i.size&&n.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,lt(r)},pC=(t,e)=>{k(t.routes)&&k(e.pages)&&gt(t.routes,e.pages);let r=t.routes||e.pages||{},n=[];for(let o in r){if(o.charCodeAt(0)===47)continue;let i="/"+(o==="index"?"":o);Object.prototype.hasOwnProperty.call(r,i)?n.push(`${o} -> ${i}`):r[i]=r[o],delete r[o]}return n.length&&e&&e.verbose!==!1&&console.warn(`[smbls] preparePages kept ${n.length} explicitly declared route${n.length===1?"":"s"} over a same-named page key (${n.join(", ")}). A bare page NAME never overwrites a declared '/route'. This usually means a shared library ships a page under its export name that collides with one of your routes \u2014 add it to that library's ignoreList if you did not intend the collision.`),r},hC=t=>{Xi(t,t.sharedLibraries)};var yc={polyglot:nc,getLocalStateLang:ac,getActiveLang:rn,getLang:rn,setLang:sc,getLanguages:rc,loadTranslations:oc,upsertTranslation:ic};Ir();var je=Object.create(null);je.open="0";je.close="1";je.ping="2";je.pong="3";je.message="4";je.upgrade="5";je.noop="6";var bc=Object.create(null);Object.keys(je).forEach(t=>{bc[je[t]]=t});var _c={type:"error",data:"parser error"};var yC=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",bC=typeof ArrayBuffer=="function",_C=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,xc=({type:t,data:e},r,n)=>yC&&e instanceof Blob?r?n(e):gC(e,n):bC&&(e instanceof ArrayBuffer||_C(e))?r?n(e):gC(new Blob([e]),n):n(je[t]+(e||"")),gC=(t,e)=>{let r=new FileReader;return r.onload=function(){let n=r.result.split(",")[1];e("b"+(n||""))},r.readAsDataURL(t)};function mC(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var Mb;function xC(t,e){if(yC&&t.data instanceof Blob)return t.data.arrayBuffer().then(mC).then(e);if(bC&&(t.data instanceof ArrayBuffer||_C(t.data)))return e(mC(t.data));xc(t,!1,r=>{Mb||(Mb=new TextEncoder),e(Mb.encode(r))})}var wC="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<wC.length;t++)wc[wC.charCodeAt(t)]=t;var SC=t=>{let e=t.length*.75,r=t.length,n,o=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(n=0;n<r;n+=4)s=wc[t.charCodeAt(n)],i=wc[t.charCodeAt(n+1)],a=wc[t.charCodeAt(n+2)],c=wc[t.charCodeAt(n+3)],f[o++]=s<<2|i>>4,f[o++]=(i&15)<<4|a>>2,f[o++]=(a&3)<<6|c&63;return l};var e2=typeof ArrayBuffer=="function",Sc=(t,e)=>{if(typeof t!="string")return{type:"message",data:kC(t,e)};let r=t.charAt(0);return r==="b"?{type:"message",data:r2(t.substring(1),e)}:bc[r]?t.length>1?{type:bc[r],data:t.substring(1)}:{type:bc[r]}:_c},r2=(t,e)=>{if(e2){let r=SC(t);return kC(r,e)}else return{base64:!0,data:t}},kC=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer;var vC="",CC=(t,e)=>{let r=t.length,n=new Array(r),o=0;t.forEach((s,i)=>{xc(s,!1,a=>{n[i]=a,++o===r&&e(n.join(vC))})})},EC=(t,e)=>{let r=t.split(vC),n=[];for(let o=0;o<r.length;o++){let s=Sc(r[o],e);if(n.push(s),s.type==="error")break}return n};function AC(){return new TransformStream({transform(t,e){xC(t,r=>{let n=r.length,o;if(n<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,n);else if(n<65536){o=new Uint8Array(3);let s=new DataView(o.buffer);s.setUint8(0,126),s.setUint16(1,n)}else{o=new Uint8Array(9);let s=new DataView(o.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(o[0]|=128),e.enqueue(o),e.enqueue(r)})}})}var Fb;function Mu(t){return t.reduce((e,r)=>e+r.length,0)}function Fu(t,e){if(t[0].length===e)return t.shift();let r=new Uint8Array(e),n=0;for(let o=0;o<e;o++)r[o]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),r}function TC(t,e){Fb||(Fb=new TextDecoder);let r=[],n=0,o=-1,s=!1;return new TransformStream({transform(i,a){for(r.push(i);;){if(n===0){if(Mu(r)<1)break;let c=Fu(r,1);s=(c[0]&128)===128,o=c[0]&127,o<126?n=3:o===126?n=1:n=2}else if(n===1){if(Mu(r)<2)break;let c=Fu(r,2);o=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),n=3}else if(n===2){if(Mu(r)<8)break;let c=Fu(r,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(_c);break}o=f*Math.pow(2,32)+l.getUint32(4),n=3}else{if(Mu(r)<o)break;let c=Fu(r,o);a.enqueue(Sc(s?c:Fb.decode(c),e)),n=0}if(o===0||o>t){a.enqueue(_c);break}}}})}var Nb=4;function dt(t){if(t)return n2(t)}function n2(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 n,o=0;o<r.length;o++)if(n=r[o],n===e||n.fn===e){r.splice(o,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],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,o=r.length;n<o;++n)r[n].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 Sr=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),Ht=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),OC="arraybuffer";function Nu(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}var o2=Ht.setTimeout,s2=Ht.clearTimeout;function kr(t,e){e.useNativeTimers?(t.setTimeoutFn=o2.bind(Ht),t.clearTimeoutFn=s2.bind(Ht)):(t.setTimeoutFn=Ht.setTimeout.bind(Ht),t.clearTimeoutFn=Ht.clearTimeout.bind(Ht))}var i2=1.33;function RC(t){return typeof t=="string"?a2(t):Math.ceil((t.byteLength||t.size)*i2)}function a2(t){let e=0,r=0;for(let n=0,o=t.length;n<o;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}function ju(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function PC(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function DC(t){let e={},r=t.split("&");for(let n=0,o=r.length;n<o;n++){let s=r[n].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}var Bu=class extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}},vr=class extends dt{constructor(e){super(),this.writable=!1,kr(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,r,n){return super.emitReserved("error",new Bu(e,r,n)),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=Sc(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=PC(e);return r.length?"?"+r:""}};var kc=class extends vr{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 n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};EC(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,CC(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]=ju()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}};var IC=!1;try{IC=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var $C=IC;function c2(){}var jb=class extends kc{constructor(e){if(super(e),typeof location<"u"){let r=location.protocol==="https:",n=location.port;n||(n=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,r){let n=this.request({method:"POST",data:e});n.on("success",r),n.on("error",(o,s)=>{this.onError("xhr post error",o,s)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=e}},an=class t extends dt{constructor(e,r,n){super(),this.createRequest=e,kr(this,n),this._opts=n,this._method=n.method||"GET",this._uri=r,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var e;let r=Nu(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;let n=this._xhr=this.createRequest(r);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&n.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var o;n.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},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=c2,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()}};an.requestsCount=0;an.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",LC);else if(typeof addEventListener=="function"){let t="onpagehide"in Ht?"pagehide":"unload";addEventListener(t,LC,!1)}}function LC(){for(let t in an.requests)an.requests.hasOwnProperty(t)&&an.requests[t].abort()}var l2=(function(){let t=MC({xdomain:!1});return t&&t.responseType!==null})(),cn=class extends jb{constructor(e){super(e);let r=e&&e.forceBase64;this.supportsBinary=l2&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new an(MC,this.uri(),e)}};function MC(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||$C))return new XMLHttpRequest}catch{}if(!e)try{return new Ht[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var FC=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",Ub=class extends vr{get name(){return"websocket"}doOpen(){let e=this.uri(),r=this.opts.protocols,n=FC?{}:Nu(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,n)}catch(o){return this.emitReserved("error",o)}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 n=e[r],o=r===e.length-1;xc(n,this.supportsBinary,s=>{try{this.doWrite(n,s)}catch{}o&&Sr(()=>{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]=ju()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}},Bb=Ht.WebSocket||Ht.MozWebSocket,ln=class extends Ub{createSocket(e,r,n){return FC?new Bb(e,r,n):r?new Bb(e,r):new Bb(e)}doWrite(e,r){this.ws.send(r)}};var ks=class extends vr{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=TC(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(r).getReader(),o=AC();o.readable.pipeTo(e.writable),this._writer=o.writable.getWriter();let s=()=>{n.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 n=e[r],o=r===e.length-1;this._writer.write(n).then(()=>{o&&Sr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var Vb={websocket:ln,webtransport:ks,polling:cn};var f2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,u2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function vs(t){if(t.length>8e3)throw"URI too long";let e=t,r=t.indexOf("["),n=t.indexOf("]");r!=-1&&n!=-1&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let o=f2.exec(t||""),s={},i=14;for(;i--;)s[u2[i]]=o[i]||"";return r!=-1&&n!=-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=d2(s,s.path),s.queryKey=p2(s,s.query),s}function d2(t,e){let r=/\/{2,9}/g,n=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function p2(t,e){let r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,s){o&&(r[o]=s)}),r}var zb=typeof addEventListener=="function"&&typeof removeEventListener=="function",Uu=[];zb&&addEventListener("offline",()=>{Uu.forEach(t=>t())},!1);var Yn=class t extends dt{constructor(e,r){if(super(),this.binaryType=OC,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 n=vs(e);r.hostname=n.host,r.secure=n.protocol==="https"||n.protocol==="wss",r.port=n.port,n.query&&(r.query=n.query)}else r.host&&(r.hostname=vs(r.host).host);kr(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(n=>{let o=n.prototype.name;this.transports.push(o),this._transportsByName[o]=n}),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=DC(this.opts.query)),zb&&(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"})},Uu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let r=Object.assign({},this.opts.query);r.EIO=Nb,r.transport=e,this.id&&(r.sid=this.id);let n=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](n)}_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 n=0;n<this.writeBuffer.length;n++){let o=this.writeBuffer[n].data;if(o&&(r+=RC(o)),n>0&&r>this._maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,Sr(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,n){return this._sendPacket("message",e,r,n),this}send(e,r,n){return this._sendPacket("message",e,r,n),this}_sendPacket(e,r,n,o){if(typeof r=="function"&&(o=r,r=void 0),typeof n=="function"&&(o=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;let s={type:e,data:r,options:n};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),o&&this.once("flush",o),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},n=()=>{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?n():e()}):this.upgrading?n():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(),zb&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let n=Uu.indexOf(this._offlineEventListener);n!==-1&&Uu.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}};Yn.protocol=Nb;var Vu=class extends Yn{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),n=!1;Yn.priorWebsocketSuccess=!1;let o=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",u=>{if(!n)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Yn.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||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(){n||(n=!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",o),r.removeListener("error",i),r.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};r.once("open",o),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(()=>{n||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let r=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&r.push(e[n]);return r}},Cs=class extends Vu{constructor(e,r={}){let n=typeof e=="object"?e:r;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(o=>Vb[o]).filter(o=>!!o)),super(e,n)}};var m9=Cs.protocol;function NC(t,e="",r){let n=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),n=vs(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";let s=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+s+":"+n.port+e,n.href=n.protocol+"://"+s+(r&&r.port===n.port?"":":"+n.port),n}var Xb={};I(Xb,{Decoder:()=>Gb,Encoder:()=>Kb,PacketType:()=>U,isPacketValid:()=>$2,protocol:()=>YC});var g2=typeof ArrayBuffer=="function",m2=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,jC=Object.prototype.toString,y2=typeof Blob=="function"||typeof Blob<"u"&&jC.call(Blob)==="[object BlobConstructor]",b2=typeof File=="function"||typeof File<"u"&&jC.call(File)==="[object FileConstructor]";function Cc(t){return g2&&(t instanceof ArrayBuffer||m2(t))||y2&&t instanceof Blob||b2&&t instanceof File}function vc(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(vc(t[r]))return!0;return!1}if(Cc(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return vc(t.toJSON(),!0);for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&vc(t[r]))return!0;return!1}function BC(t){let e=[],r=t.data,n=t;return n.data=Hb(r,e),n.attachments=e.length,{packet:n,buffers:e}}function Hb(t,e){if(!t)return t;if(Cc(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 n=0;n<t.length;n++)r[n]=Hb(t[n],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){let r={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=Hb(t[n],e));return r}return t}function UC(t,e){return t.data=Wb(t.data,e),delete t.attachments,t}function Wb(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]=Wb(t[r],e);else if(typeof t=="object")for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=Wb(t[r],e));return t}var KC=V1(qC(),1),qb=(0,KC.default)("socket.io-parser"),GC=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],YC=5,U;(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"})(U||(U={}));var Kb=class{constructor(e){this.replacer=e}encode(e){return qb("encoding packet %j",e),(e.type===U.EVENT||e.type===U.ACK)&&vc(e)?this.encodeAsBinary({type:e.type===U.EVENT?U.BINARY_EVENT:U.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===U.BINARY_EVENT||e.type===U.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)),qb("encoded %j as %s",e,r),r}encodeAsBinary(e){let r=BC(e),n=this.encodeAsString(r.packet),o=r.buffers;return o.unshift(n),o}},Gb=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 n=r.type===U.BINARY_EVENT;n||r.type===U.BINARY_ACK?(r.type=n?U.EVENT:U.ACK,this.reconstructor=new Yb(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(Cc(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,n={type:Number(e.charAt(0))};if(U[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===U.BINARY_EVENT||n.type===U.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(!XC(a)||a<0)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");n.attachments=a}if(e.charAt(r+1)==="/"){let s=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););n.nsp=e.substring(s,r)}else n.nsp="/";let o=e.charAt(r+1);if(o!==""&&Number(o)==o){let s=r+1;for(;++r;){let i=e.charAt(r);if(i==null||Number(i)!=i){--r;break}if(r===e.length)break}n.id=Number(e.substring(s,r+1))}if(e.charAt(++r)){let s=this.tryParse(e.substr(r));if(t.isPayloadValid(n.type,s))n.data=s;else throw new Error("invalid payload")}return qb("decoded %s as %j",e,n),n}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case U.CONNECT:return Wu(r);case U.DISCONNECT:return r===void 0;case U.CONNECT_ERROR:return typeof r=="string"||Wu(r);case U.EVENT:case U.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&GC.indexOf(r[0])===-1);case U.ACK:case U.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},Yb=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=UC(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function P2(t){return typeof t=="string"}var XC=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function D2(t){return t===void 0||XC(t)}function Wu(t){return Object.prototype.toString.call(t)==="[object Object]"}function I2(t,e){switch(t){case U.CONNECT:return e===void 0||Wu(e);case U.DISCONNECT:return e===void 0;case U.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&GC.indexOf(e[0])===-1);case U.ACK:return Array.isArray(e);case U.CONNECT_ERROR:return typeof e=="string"||Wu(e);default:return!1}}function $2(t){return P2(t.nsp)&&D2(t.id)&&I2(t.type,t.data)}function ge(t,e,r){return t.on(e,r),function(){t.off(e,r)}}var L2=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Os=class extends dt{constructor(e,r,n){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,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[ge(e,"open",this.onopen.bind(this)),ge(e,"packet",this.onpacket.bind(this)),ge(e,"error",this.onerror.bind(this)),ge(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 n,o,s;if(L2.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:U.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=(o=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||o===void 0?void 0:o.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 n;let o=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(o===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"))},o),i=(...a)=>{this.io.clearTimeoutFn(s),r.apply(this,a)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...r){return new Promise((n,o)=>{let s=(i,a)=>i?o(i):n(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 n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((o,...s)=>(this._queue[0],o!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(o)):(this._queue.shift(),r&&r(null,...s)),n.pending=!1,this._drainQueue())),this._queue.push(n),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:U.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(n=>String(n.id)===e)){let n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case U.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 U.EVENT:case U.BINARY_EVENT:this.onevent(e);break;case U.ACK:case U.BINARY_ACK:this.onack(e);break;case U.DISCONNECT:this.ondisconnect();break;case U.CONNECT_ERROR:this.destroy();let n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);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 n of r)n.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,n=!1;return function(...o){n||(n=!0,r.packet({type:U.ACK,id:e,data:o}))}}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:U.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 n=0;n<r.length;n++)if(e===r[n])return r.splice(n,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 n=0;n<r.length;n++)if(e===r[n])return r.splice(n,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 n of r)n.apply(this,e.data)}}};function Zn(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}Zn.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};Zn.prototype.reset=function(){this.attempts=0};Zn.prototype.setMin=function(t){this.ms=t};Zn.prototype.setMax=function(t){this.max=t};Zn.prototype.setJitter=function(t){this.jitter=t};var Rs=class extends dt{constructor(e,r){var n;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,kr(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((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new Zn({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;let o=r.parser||Xb;this.encoder=new o.Encoder,this.decoder=new o.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 Cs(this.uri,this.opts);let r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;let o=ge(r,"open",function(){n.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=ge(r,"error",s);if(this._timeout!==!1){let a=this._timeout,c=this.setTimeoutFn(()=>{o(),s(new Error("timeout")),r.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(o),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(ge(e,"ping",this.onping.bind(this)),ge(e,"data",this.ondata.bind(this)),ge(e,"error",this.onerror.bind(this)),ge(e,"close",this.onclose.bind(this)),ge(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){Sr(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Os(this,e,r),this.nsps[e]=n),n}_destroy(e){let r=Object.keys(this.nsps);for(let n of r)if(this.nsps[n].active)return;this._close()}_packet(e){let r=this.encoder.encode(e);for(let n=0;n<r.length;n++)this.engine.write(r[n],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 n;this.cleanup(),(n=this.engine)===null||n===void 0||n.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 n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var Ec={};function Ps(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let r=NC(t,e.path||"/socket.io"),n=r.source,o=r.id,s=r.path,i=Ec[o]&&s in Ec[o].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new Rs(n,e):(Ec[o]||(Ec[o]=new Rs(n,e)),c=Ec[o]),r.query&&!e.query&&(e.query=r.queryKey),c.socket(r.path,e)}Object.assign(Ps,{Manager:Rs,Socket:Os,io:Ps,connect:Ps});P();P();var Zb=new Set(["__proto__","constructor","prototype"]),Jb=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(Zb.has(t[e]))return!1;return!0},ZC=(t,e)=>{!t||!Jb(e)||e.reduce((r,n,o,s)=>{if(r&&n in r){if(o!==s.length-1)return r[n];delete r[n]}},t)},JC=(t,e,r,n=!1)=>{!t||!Jb(e)||e.reduce((o,s,i,a)=>{if(o){if(i!==a.length-1)return!o[s]&&n&&(o[s]={}),o[s];o[s]=r}},t)},qu=(t,e)=>{let r=new Set;if(!Array.isArray(e))return r;for(let[n,o,s]of e)if(!(!Array.isArray(o)||!o.length))switch(r.add(o[0]),n){case"delete":ZC(t,o);break;case"update":case"set":JC(t,o,s,!0);break;default:break}return r},Ac=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},QC=(t,e,r,n="designSystem")=>{for(let o in e){if(Zb.has(o))continue;let s=`${n}/${o}`;if(r.has(s))continue;let i=e[o],a=t[o];if(i&&typeof i=="object"&&!Array.isArray(i)){if(!a||typeof a!="object"||Array.isArray(a)){if(o in t)continue;t[o]={}}QC(t[o],i,r,s)}else o in t||(t[o]=Array.isArray(i)?JSON.parse(JSON.stringify(i)):i)}},Qb=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let o={designSystem:t.__rawDesignSystem};qu(o,e)}let r=JSON.parse(JSON.stringify(t.__rawDesignSystem)),n=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[];for(let o of n){let s=Xe(o),i=s?o.library:o,a=i&&i.designSystem;if(!a||typeof a!="object")continue;let c=Mr(i.sharedLibIgnore);if(s)for(let l of Mr(o.ignoreList))c.add(l);c.has("designSystem")||QC(r,a,c)}return r};P();var t1=(t,e,r)=>{let n=!1;return(o={})=>{let{data:s}=o,{schema:i}=o;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(Ac(r,c),n){let l=Qb(r);l&&xr(l)}}else yn(r[a],c);else r[a]=c}),n=!0,i&&(r.schema=i))}},e1=(t,e,r)=>(n={})=>{let{changes:o}=n;if(!o||!Array.isArray(o)||!o.length)return;o=t.call("deepDestringifyFunctions",o,Array.isArray(o)?[]:{});let s=o.filter(c=>Array.isArray(c)&&Array.isArray(c[1])&&c[1][0]==="designSystem"),i=s.length?o.filter(c=>!s.includes(c)):o,a=qu(r,i);if(s.length&&a.add("designSystem"),a.has("designSystem")){let c=Qb(r,s);c?xr(c):r.__warnedNoRawDesignSystem||(r.__warnedNoRawDesignSystem=!0,console.warn("[sync] design-system op ignored: no raw design system was seeded on this client. Re-initing from the processed config would corrupt every token, so the update is skipped \u2014 reload to pick it up. Seed it at boot with seedRawDesignSystem(ctx, ds)."))}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 M2={success:"green",error:"red",warning:"yellow"},r1=(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 n=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(n)},3e3)}}else if(r.connected){r.notifications.connected={title:"Disconnected",type:"error"},r.update({connected:!1});let n=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected&&e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(n)},3e3)}},n1={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:M2[t.type||"success"],icon:null,Flex:{Title:{text:"{{ title }}"},P:{text:"{{ title }}"}},onRender:(e,r,n)=>{r.update({animation:"fadeInUp"})},onClick:(e,r,n)=>{delete n.notifications[r.key],r.update({animation:"fadeOutDown"}),n.onClose&&n.onClose(e,r,n)}}),IconText:null,childrenAs:"state",children:({state:t})=>t.notifications}};var F2=!1,N2=()=>F2?"http://localhost:8080":"https://api.symbols.app",j2=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}},B2=async t=>{try{let e=t||N2(),r=await C.fetch(`${e}/service-token`,{method:"GET"}),n;try{let o=await r.clone().json();if(o&&typeof o.token=="string")return o.token.trim();n=await r.text()}catch{n=await r.text()}return(n||"").replace(/\s+/gu,"")||void 0}catch(e){console.error("[sync] Failed to fetch service-token",e)}},i1=(t,e,r,n)=>{t.on("snapshot",t1(e,r,n)),t.on("ops",e1(e,r,n)),t.on("clients",o=>{n.editor?.verbose&&r1(o,e,r)}),t.on("disconnect",o=>{n.editor?.verbose&&console.info("[sync] disconnected",o)})},U2=async(t,e,r,n)=>{let o=await B2(n);if(!o)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=Ps(n,{path:"/collab-socket",transports:["websocket"],auth:{token:o,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)")}),i1(a,t,e,r),a},V2=(t,e,r)=>{let n=Ps({transports:["websocket","polling"],reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return n.on("connect",()=>{r.editor?.verbose!==!1&&console.info("[sync] connected (runner)")}),i1(n,t,e,r),n.on("reload",()=>{typeof C<"u"&&C.location&&C.location.reload()}),n},z2=async(t,e,r)=>{let{mode:n,baseUrl:o}=j2(r);return n?n==="collab"?U2(t,e,r,o):n==="runner"?V2(t,e,r):null:null},H2={onInit:z2};var a1=t=>typeof t>"u",o1=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),s1=t=>t?.editor?.runtime==="runner",c1=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},l1={name:"sync",beforeCreate(t,e){let r=e&&e.editor;(r&&!a1(r.liveSync)?r.liveSync:o1(e)||s1(e))&&(o1(e)&&!s1(e)&&!e?.key||c1(t,H2))}},f1={name:"notifications",beforeCreate(t,e){if(!e)return;let r=a1(e.notifications)?null:e.notifications,n=e.editor&&e.editor.verbose===!0;(r===!0||r!==!1&&n)&&c1(t,n1)}};var r_={};I(r_,{AlertTemplate:()=>od,ConfirmTemplate:()=>rd,CustomTemplate:()=>id,ModalLayer:()=>ed,ModalRoot:()=>td,PromptTemplate:()=>sd,windowsComponents:()=>e_});var t_={};I(t_,{alertDialog:()=>Ju,closeAllModals:()=>Xu,closeModal:()=>Gu,confirmDialog:()=>Zu,getLayer:()=>Ku,openModal:()=>Yu,promptDialog:()=>Qu,windowsFunctions:()=>Cr});function X(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 Ku(){return X(this)}var W2=(t,e)=>{let r=t&&t["ModalLayer_"+e],n=r?.node||r?.__ref?.node;!n||typeof n.style?.setProperty!="function"||(n.style.setProperty("display","none","important"),n.style.setProperty("opacity","0","important"),n.style.setProperty("visibility","hidden","important"),n.style.setProperty("pointer-events","none","important"))},u1=(t,e)=>{let r=t&&t["ModalLayer_"+e],n=r?.node||r?.__ref?.node;!n||typeof n.style?.removeProperty!="function"||(n.style.removeProperty("display"),n.style.removeProperty("opacity"),n.style.removeProperty("visibility"),n.style.removeProperty("pointer-events"))};function Gu(t){let e=Ds(this);if(!e)return;let r=e.state?.stack||[];if(!r.length)return;let n,o,s;if(t){if(s=[],n=r.filter((i,a)=>{let c=i.id!==t;return c||s.push(a),c}),n.length===r.length)return;o=r.filter(i=>i.id===t)}else n=r.slice(0,-1),o=r.slice(-1),s=[r.length-1];e.state.update({stack:n});for(let i of s)W2(e,i);for(let i of o)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function Yu(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)}`,n={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},o=e.state?.stack||[];if(o.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=o.length;return u1(e,s),e.state.update({stack:[...o,n]}),r}function Xu(){let t=Ds(this);!t||!t.state?.stack?.length||t.state.update({stack:[]})}function Zu(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"confirm"})}function Ju(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"alert"})}function Qu(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"prompt"})}var Cr={openModal:Yu,closeModal:Gu,closeAllModals:Xu,confirmDialog:Zu,alertDialog:Ju,promptDialog:Qu,getLayer:Ku};var q2=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),d1=t=>{if(!t?.querySelectorAll)return[];let e=t.querySelectorAll(q2),r=[];for(let n=0;n<e.length;n++){let o=e[n];(o.offsetParent!==null||o===document.activeElement)&&r.push(o)}return r},p1=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},td={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 Cr)a in r.functions||(r.functions[a]=Cr[a])}t.__modalOpeners=t.__modalOpeners||[],t.__prevStackLen=t.state&&t.state.stack&&t.state.stack.length||0;let n=()=>{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)}},o=a=>{let c=t.state?.stack;if(c?.length){if(a.key==="Tab"){let l=p1(t);if(!l)return;let f=d1(l);if(!f.length){a.preventDefault();let h=l.querySelector?.('[role="dialog"]')||l;try{h.focus?.()}catch{}return}let u=f[0],d=f[f.length-1],p=document.activeElement;if(!l.contains(p)){a.preventDefault();try{u.focus()}catch{}return}if(a.shiftKey&&p===u){a.preventDefault();try{d.focus()}catch{}}else if(!a.shiftKey&&p===d){a.preventDefault();try{u.focus()}catch{}}return}a.key==="Escape"&&c[c.length-1]?.dismissOnBackdrop!==!1&&(a.preventDefault(),n())}};window.addEventListener("keydown",o),t.__escHandler=o;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,p)=>p!==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 n=p1(t);if(!n)return;let o=d1(n)[0]||n.querySelector&&n.querySelector('[role="dialog"]')||n;try{o.focus&&o.focus()}catch{}});else{let n=null;for(let o=r;o>e;o--)t.__modalOpeners[o]&&(n=n||t.__modalOpeners[o]),t.__modalOpeners[o]=null;if(n&&typeof n.focus=="function"&&n.isConnected!==!1)try{n.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 ed={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=X(t)?.id;return e?"modal-title-"+e:null}},width:t=>X(t)?.width||"H",maxWidth:t=>X(t)?.maxWidth||"90vw",maxHeight:t=>X(t)?.maxHeight||null,onClick:t=>t.stopPropagation(),onMousedown:t=>t.stopPropagation(),ModalHeader:{display:"none"},overflow:"visible",ConfirmTemplate:{hide:t=>X(t)?.template!=="confirm"},AlertTemplate:{hide:t=>X(t)?.template!=="alert"},PromptTemplate:{hide:t=>X(t)?.template!=="prompt"},CustomTemplate:{hide:t=>X(t)?.template!=="custom"}}};var Is=(t,e,r)=>X(t)?.[e]||r,K2=t=>{let e=X(t)?.icon;return e===null||e===!1},rd={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>Is(t,"title","Are you sure?"),attr:{id:t=>{let e=X(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>Is(t,"message","This action cannot be undone."),color:"dim"}},Icons:{hide:t=>K2(t),Indicator:{extends:"Icon",opacity:".7",icon:t=>Is(t,"icon","warning")}}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"CancelButton",text:t=>Is(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let n=X(e);if(n?.onCancel)try{n.onCancel()}catch(o){console.warn("[windows] confirm.onCancel threw:",o)}e.call("closeModal",n?.id)}},ConfirmBtn:{extends:"Button",theme:t=>Is(t,"confirmTheme","primary"),text:t=>Is(t,"confirmText","Confirm"),onClick:(t,e,r)=>{let n=X(e);if(n?.onConfirm)try{n.onConfirm()}catch(o){console.warn("[windows] confirm.onConfirm threw:",o)}e.call("closeModal",n?.id)}}}};var nd=(t,e,r)=>X(t)?.[e]||r,od={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>nd(t,"title","Notice"),attr:{id:t=>{let e=X(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>nd(t,"message",""),color:"dim"}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:t=>nd(t,"icon","info")}}},ModalFooter:{flow:"x",align:"center end",OkBtn:{extends:"Button",theme:"primary",text:t=>nd(t,"okText","OK"),onClick:(t,e,r)=>{let n=X(e);if(n?.onOk)try{n.onOk()}catch(o){console.warn("[windows] alert.onOk threw:",o)}e.call("closeModal",n?.id)}}}};var Tc=(t,e,r)=>X(t)?.[e]||r,sd={tag:"div",flow:"y",gap:"B",scope:{value:""},onRender:(t,e)=>{let r=X(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let n=t.InputRow&&t.InputRow.node;n&&(n.value=t.scope.value)},onUpdate:(t,e)=>{let r=X(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let n=t.InputRow&&t.InputRow.node;n&&(n.value=t.scope.value)},ModalHeader:{Hgroup:{H:{text:t=>Tc(t,"title","Enter a value"),attr:{id:t=>{let e=X(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>Tc(t,"message",""),color:"dim"}}},InputRow:{extends:"Input",autofocus:!0,placeholder:t=>Tc(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 n=X(e),o=e.parent.scope?.value||"";if(n?.onConfirm)try{n.onConfirm(o)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",n?.id)}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"CancelButton",text:t=>Tc(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let n=X(e);if(n?.onCancel)try{n.onCancel()}catch(o){console.warn("[windows] prompt.onCancel threw:",o)}e.call("closeModal",n?.id)}},ConfirmBtn:{extends:"Button",theme:"primary",text:t=>Tc(t,"confirmText","OK"),onClick:(t,e,r)=>{let n=X(e),o=e.parent.parent.scope?.value||"";if(n?.onConfirm)try{n.onConfirm(o)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",n?.id)}}}};var id={tag:"div",flow:"y",gap:"B",Title:{tag:"h2",text:t=>X(t)?.title||"",hide:t=>!X(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=X(t)?.id;return e?"modal-title-"+e:null}}},Slot:{tag:"div",onInit:t=>{let e=K(()=>{let r=X(t),n=r?.content||null,o=r?.id||null;if(!n){t.__lastLayerId!=null&&(t.removeContent(),t.__lastLayerId=null);return}if(t.__lastLayerId!==o){t.__lastLayerId=o;try{t.set(n);let s=t.content?.context;if(s){s.functions||(s.functions={});for(let i in Cr)i in s.functions||(s.functions[i]=Cr[i])}}catch(s){console.warn("[windows] custom.content set failed:",s)}}});t.__ref&&t.__ref.__effects.push(e)}}};var h1={extends:"Button",theme:"tertiary"};var e_={ModalRoot:td,ModalLayer:ed,ConfirmTemplate:rd,AlertTemplate:od,PromptTemplate:sd,CustomTemplate:id,"smbls.CancelButton":h1};var i_={};I(i_,{Dropdown:()=>dd,DropdownList:()=>pd,DropdownParent:()=>hd,DropdownParentFocus:()=>gd,DropdownRoot:()=>fd,DropdownSiblingFocus:()=>md,DropdownTrigger:()=>ud,dropdownComponents:()=>s_});var g1=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),G2=(t,e,r,n)=>{let o=g1(t,r,n),s=i=>o[i]>=e.height+8;return s("bottom")?"bottom":s("top")?"top":o.bottom>=o.top?"bottom":"top"},Y2=(t,e,r,n,o)=>{let s=g1(e,n,o),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},ad=(t,e,r)=>Math.max(e,Math.min(r,t)),fn=(t,e,r="auto")=>{if(!t)return{left:0,top:0,side:"bottom",align:"start"};let n=typeof window<"u"?window.innerWidth:1024,o=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=ad((n-s.width)/2,8,Math.max(8,n-s.width-8)),p=ad((o-s.height)/2,8,Math.max(8,o-s.height-8));return{left:d,top:p,side:"center",align:"center"}}let i,a;if(r==="auto")i=G2(t,s,n,o),a="start";else{let d=r.split("-");i=d[0],a=d[1]||"start",i=Y2(i,t,s,n,o)}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,n-s.width-8),u=Math.max(8,o-s.height-8);return c=ad(c,8,f),l=ad(l,8,u),{left:c,top:l,side:i,align:a}},$s=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 un={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:"70vh"},X2=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}},n_=t=>t?.getRoot?.()?.DropdownRoot||null,Z2=0,J2=()=>`dropdown_${++Z2}_${Date.now().toString(36)}`;function cd(t={}){let e=n_(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,n=t.anchorRect||X2(r);if(!n)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let o=t.id||J2(),s=t.restoreEl?.node||t.restoreEl||r||(typeof document<"u"?document.activeElement:null),i={id:o,content:t.content||null,anchor:n,placement:t.placement||un.placement,trigger:t.trigger||un.trigger,offset:t.offset??un.offset,minWidth:t.minWidth||un.minWidth,maxWidth:t.maxWidth||un.maxWidth,maxHeight:t.maxHeight||un.maxHeight,theme:t.theme||null,shadow:t.shadow||null,background:t.background||null,round:t.round||null,onOpen:t.onOpen,onClose:t.onClose,restoreEl: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 o}function ld(t){let e=n_(this);if(!e)return;let r=e.state?.layer;r&&e.state.update({layer:{...r,inert:!!t}})}function Jn(t){let e=n_(this);if(!e)return;let r=e.state?.layer;if(!r)return;let n=typeof t=="string"?t:t?.id;if(n&&r.id&&n!==r.id)return;let o=r.onClose,s=r.restoreEl,i=typeof document<"u"?document:null,a=i?i.activeElement:null,c=e.node?.querySelector?.('[data-smbls-dropdown="panel"]'),l=!a||a===i?.body,f=!!(c&&a&&c.contains(a)),u=l||f;if(e.state.update({layer:null}),u&&s&&typeof s.focus=="function")try{s.focus()}catch(d){console.warn("[dropdown] focus restore threw:",d)}if(typeof o=="function")try{o(r)}catch(d){console.warn("[dropdown] onClose threw:",d)}}var Q2=`
103
+ \`\`\``}o.push({role:"user",content:s})}return o}var Gv=/```(?<lang>[a-zA-Z0-9_+-]*)\n(?<code>[\s\S]*?)```/g,t2=new Set(["component","components","page","pages","function","method","state","theme","color","font","icon"]);function e2(t){let e=[];for(let r of t.matchAll(Gv))e.push({lang:(r.groups?.lang||"").toLowerCase(),code:r.groups?.code??""});return e}function r2(t){return t.replace(Gv,"").trim()}function Lb(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 Kv(t){return!!t&&typeof t=="object"&&typeof t.type=="string"&&t2.has(t.type)}function Yv(t){let e=(typeof t=="string"?t:"").trim();if(!e)return{kind:"text",text:"",message:""};let r=e2(e),n=r.filter(i=>/^(js|javascript|ts|typescript|jsx|tsx)$/.test(i.lang)),o=r.filter(i=>i.lang==="json"),s=r2(e);for(let i of o){let a=Lb(i.code);if(Kv(a))return{kind:"asset",text:s||a.description||"",asset:a,message:a.description||s||`Generated ${a.type}: ${a.title||a.key||""}`.trim()}}if(n.length>0){let i=n[0].code,a=Lb("["+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=Lb(e);if(Kv(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 Xv(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 Zv=["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(" "),Jv=["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(`
104
+ `),Mb={Starter:sn,Free:sn,Pro:"claude-opus-4-6"};function Qv(t){return t?Mb[t]||t:sn}var tC={"@symbo.ls/signal":jd,"@symbo.ls/scratch":fm,"@symbo.ls/element":uy,"@symbo.ls/css":bm,"@symbo.ls/utils":Vl,"@symbo.ls/state":Xm,"@symbo.ls/router":Ja,"@symbo.ls/polyglot":cb,"@symbo.ls/helmet":ib,"@symbo.ls/fetch":wn,"@symbo.ls/capsize":fb,"@symbo.ls/shorthand":yb,"@symbo.ls/analyze":Ob,"@symbo.ls/inspect":Db,"@symbo.ls/channels":$b,"@symbo-ls/simone-server":Fb},eC=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:{}),n=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let o in tC)n[o]||(n[o]=tC[o]);if(e)for(let o in e)n[o]||(n[o]=e[o]);return n},rC=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:null);if(!r||!e||typeof e!="object")return null;let n=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let o in e){let s=e[o];if(typeof s!="function"||Object.prototype.hasOwnProperty.call(n,o))continue;let i=a=>(Object.defineProperty(n,o,{configurable:!0,enumerable:!0,writable:!0,value:a}),a);Object.defineProperty(n,o,{configurable:!0,enumerable:!0,get:()=>i(s()),set:i})}return n},nC=["@symbo.ls/sdk"],oC=(t,e)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r||!t||typeof t!="object")return null;let n=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let o in t){let s=t[o];!s||typeof s!="object"&&typeof s!="function"||n[o]||(n[o]=s)}return n},n2=/^@symbo[-.]ls\//,o2=t=>t.includes("/")?t.slice(t.indexOf("/")+1):t,sC=(t,e)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r||!Array.isArray(t))return null;let n=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let o of t){let s=o&&o.library?o.library:o;if(!s||typeof s!="object"||s.__isStub)continue;let i=s.key||s.name||s.__libraryKey,a=[];for(let c of[s.key,s.name,s.__libraryKey,s.__libraryName]){if(typeof c!="string"||!c||c!==i&&!n2.test(c))continue;let l=o2(c);l&&!a.includes(l)&&a.push(l)}for(let c of a)for(let l of[`@symbo-ls/${c}`,`@symbo.ls/${c}`])n[l]||(n[l]=s)}return n};R();var iC=t=>{let e={faces:0,links:0};if(!t)return e;for(let r in t){let n=t[r];if(!n||!n.fontFace)continue;let o=Array.isArray(n.fontFace)?n.fontFace:[n.fontFace];for(let s of o){if(aC(s)){let i=s2(s);i&&i2(i)&&e.links++;continue}typeof s=="string"&&s.includes("font-family")&&(wt(`@font-face { ${s} }`),e.faces++)}}return e},aC=t=>typeof t=="string"&&t.trim().startsWith("@import"),s2=t=>{if(!aC(t))return null;let e=String(t).match(/url\(\s*['"]?([^'")]+)['"]?\s*\)/);return e?e[1].trim():null},i2=(t,e)=>{if(typeof t!="string"||!t)return null;let r=e||jn();if(!r||!r.head)return null;let n="data-smbls-font",o=r.head.querySelectorAll(`link[rel="stylesheet"][${n}]`);for(let i=0;i<o.length;i++)if(o[i].getAttribute(n)===t)return o[i];let s=r.createElement("link");return s.setAttribute("rel","stylesheet"),s.setAttribute("href",t),s.setAttribute(n,t),r.head.appendChild(s),s};var fC=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 n=t.window;return n&&n!==e&&typeof n.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=n||e,t.window},cC=(t="smbls")=>{let e={};for(let r in Un)Object.prototype.hasOwnProperty.call(Un,r)&&(Ke(r)?e[`smbls.${r}`]=Un[r]:e[r]=Un[r]);return e},uC=t=>t.components?{...cC(),...t.components}:cC(),dC=t=>({...tc,...Ja,...jr,...t.utils,...t.snippets,...t.functions}),pC=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var a2=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,c2=3e3,l2=(t,e,r=n=>import(n))=>{if(typeof globalThis>"u")return Promise.resolve(null);try{let n=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});if(n[t])return Promise.resolve(n[t]);let o=Promise.resolve().then(()=>r(e)).then(i=>(i&&!n[t]&&(n[t]=i),n[t]||null)).catch(()=>null);return new Promise(i=>{let a=setTimeout(()=>i(null),c2);o.then(c=>{clearTimeout(a),i(c)})})}catch{return Promise.resolve(null)}},lC={},hC=async({dependencies:t,dependenciesOnDemand:e,document:r,preventCaching:n=!1,cdnProvider:o,packageManager:s,symbolsConfig:i,registerDependency:a=l2})=>{if(o||(o=Lr[s]||ko(i)||"esmsh"),!t)return null;if(!Co(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=Rr()&&n?`?${Math.random()}`:"",f=async(d,p)=>{let h=De(d,p,o)+l;try{await Promise.race([Eo(h,{document:r,type:"module"}),new Promise((g,m)=>setTimeout(()=>m(new Error(`Timeout loading ${d}`)),1e4))]),await a(d,h)}catch(g){if(console.error(`Failed to load ${d} from ${o}:`,g),o!=="symbols")try{let m=De(d,p,"symbols")+l;await Promise.race([Eo(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 p=t[d];if(!(e&&e[d])&&!lC[d]&&(lC[d]=!0,!kn(d))){if(vo(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}a2(d)||u.push(f(d,p))}}return u.length&&await Promise.allSettled(u),t},gC=async(t,e)=>{let r=e.window||window,n=e.cdnProvider||ko(e.symbolsConfig)||"esmsh",o=async i=>async(a,c)=>{let f=(i.window||window).packages[a];return typeof f=="function"?f():f},s=async i=>async(a,c=n)=>{let{dependenciesOnDemand:l}=i,f=i.document||document,u=i.window||window;if(!u.packages[a]&&kn(a))return await u.require(a,c);if(!u.packages[a]){let d=Rr()?`?${Math.random()}`:"";if(l&&l[a]){let p=l[a],h=De(a,p,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 m=De(a,p,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let p=De(a,"latest",c)+d;try{await i.utils.loadRemoteScript(p,{window:u,document:f})}catch(h){if(console.error(`Failed to load ${a} from ${c}:`,h),c!=="symbols"){let g=De(a,"latest","symbols")+d;await i.utils.loadRemoteScript(g,{window:u,document:f})}}u.packages[a]="loadedOnDeman"}}return await u.require(a,c)};r.packages?r.packages=mt(r.packages,t):r.packages=t,r.require||(e.utils.require=await o(e),r.require=e.utils.require),r.requireOnDemand||(e.utils.requireOnDemand=await s(e),r.requireOnDemand=e.utils.requireOnDemand)},f2=/\s+/g,mC=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,u2=(t,e)=>{let r="";for(let n in t){let o=t[n];typeof o=="boolean"&&o?r+=` ${n}`:typeof o=="string"?r+=` ${o}`:typeof o=="function"&&(r+=` ${mC(o,e)}`)}return r},d2=(t,e,r)=>{if(!t)return;let{key:n}=e;t===!0&&(t=e.classlist={key:n}),typeof t=="string"&&(t=e.classlist={default:t}),t!==null&&typeof t=="object"&&!Array.isArray(t)&&(t=u2(t,e));let o=t.replace(f2," ").trim();if(r&&typeof r.setAttribute=="function")r.setAttribute("class",o);else if(r)try{r.className=o}catch{}return o},p2=()=>(t,e,r)=>{let n=mC(t,e);if(t){let{__ref:o}=e;o.__class.style=n}yC()(e.classlist,e,e.state,!0)},yC=()=>(t,e,r,n)=>{if(e.style&&!n)return;let{__ref:o}=e,{__class:s,__classNames:i}=o;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=fe(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];e.node&&d2(i,e,e.node)}},h2=()=>({style:p2(),classlist:yC()}),g2=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],Nb=new WeakSet,jb=!1,m2=t=>!!t&&typeof t=="object",bC=(t,e)=>{let r=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,n=e.initOptions||{},o=e.registry||h2(),s=e.designSystem?st(lt(e.designSystem),lt(Xa),ae):lt(Xa),i={};for(let g of g2)e[g]!==void 0&&(i[g]=e[g]);let a,c=m2(r),f=c&&Nb.has(r)&&!e.skipDesignSystemInit,u=!f&&!jb,d=f?`[data-smbls-app="${t}"]`:":root";if(e.scopeSelector=d,e.skipDesignSystemInit){if(a=E(t)||E(),a&&(a.__domDocument=r),a?.CSS_VARS){it(a);try{wt({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&wt(ps(a.CSS_MEDIA_VARS,d))}finally{nt()}}}else if(u){let g=E();g&&(g.__domDocument=r),a=xr(s,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...pu,...i,...n}),a&&a!==g&&(a.__domDocument=r),c&&Nb.add(r),jb=!0}else{let g=da(t,s,{cleanBase:!0});for(let m in i)g[m]=i[m];if(g.__domDocument=r,f){let m=t.replace(/[^a-zA-Z0-9]/g,"").substring(0,6);e.cssPrefix=m,g.varPrefix=m}it(g);try{a=xr(g,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...pu,...i,...n})}finally{nt()}c&&Nb.add(r),jb=!0}let p=a?.CONFIG||a,h=p?.font;if(h){it(p);try{iC(h)}finally{nt()}}return[a,o]},_C=(t,e)=>{let r={};e.state&&st(r,e.state),t&&t.state&&st(r,t.state);let n=e.polyglot;if(n?.translations){let o=null;try{typeof localStorage<"u"&&(o=localStorage.getItem(n.storageLangKey||"smbls_lang")||localStorage.getItem("lang"))}catch{}let s=o||r.lang||n.defaultLang||"en";o&&o!==r.lang&&(r.lang=o);let i=new Set,a=new Set,c=(u,d)=>{if(!a.has(u)){if(!ur(e,u,r)){i.add(u);return}r[u]=d,a.add(u),Ge(e,u)}},l=n.translations[s];if(l&&typeof l=="object")for(let u in l)c(u,l[u]);let f=new Set(n.languages||[]);for(let u in n.translations)f.has(u)||c(u,n.translations[u]);i.size&&n.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,lt(r)},xC=(t,e)=>{k(t.routes)&&k(e.pages)&&mt(t.routes,e.pages);let r=t.routes||e.pages||{},n=[];for(let o in r){if(o.charCodeAt(0)===47)continue;let i="/"+(o==="index"?"":o);Object.prototype.hasOwnProperty.call(r,i)?n.push(`${o} -> ${i}`):r[i]=r[o],delete r[o]}return n.length&&e&&e.verbose!==!1&&console.warn(`[smbls] preparePages kept ${n.length} explicitly declared route${n.length===1?"":"s"} over a same-named page key (${n.join(", ")}). A bare page NAME never overwrites a declared '/route'. This usually means a shared library ships a page under its export name that collides with one of your routes \u2014 add it to that library's ignoreList if you did not intend the collision.`),r},wC=t=>{Ji(t,t.sharedLibraries)};var _c={polyglot:sc,getLocalStateLang:lc,getActiveLang:rn,getLang:rn,setLang:ac,getLanguages:oc,loadTranslations:ic,upsertTranslation:cc};Ir();var Be=Object.create(null);Be.open="0";Be.close="1";Be.ping="2";Be.pong="3";Be.message="4";Be.upgrade="5";Be.noop="6";var xc=Object.create(null);Object.keys(Be).forEach(t=>{xc[Be[t]]=t});var wc={type:"error",data:"parser error"};var vC=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",CC=typeof ArrayBuffer=="function",EC=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Sc=({type:t,data:e},r,n)=>vC&&e instanceof Blob?r?n(e):SC(e,n):CC&&(e instanceof ArrayBuffer||EC(e))?r?n(e):SC(new Blob([e]),n):n(Be[t]+(e||"")),SC=(t,e)=>{let r=new FileReader;return r.onload=function(){let n=r.result.split(",")[1];e("b"+(n||""))},r.readAsDataURL(t)};function kC(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var Bb;function AC(t,e){if(vC&&t.data instanceof Blob)return t.data.arrayBuffer().then(kC).then(e);if(CC&&(t.data instanceof ArrayBuffer||EC(t.data)))return e(kC(t.data));Sc(t,!1,r=>{Bb||(Bb=new TextEncoder),e(Bb.encode(r))})}var TC="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",kc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<TC.length;t++)kc[TC.charCodeAt(t)]=t;var OC=t=>{let e=t.length*.75,r=t.length,n,o=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(n=0;n<r;n+=4)s=kc[t.charCodeAt(n)],i=kc[t.charCodeAt(n+1)],a=kc[t.charCodeAt(n+2)],c=kc[t.charCodeAt(n+3)],f[o++]=s<<2|i>>4,f[o++]=(i&15)<<4|a>>2,f[o++]=(a&3)<<6|c&63;return l};var y2=typeof ArrayBuffer=="function",vc=(t,e)=>{if(typeof t!="string")return{type:"message",data:RC(t,e)};let r=t.charAt(0);return r==="b"?{type:"message",data:b2(t.substring(1),e)}:xc[r]?t.length>1?{type:xc[r],data:t.substring(1)}:{type:xc[r]}:wc},b2=(t,e)=>{if(y2){let r=OC(t);return RC(r,e)}else return{base64:!0,data:t}},RC=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer;var PC="",DC=(t,e)=>{let r=t.length,n=new Array(r),o=0;t.forEach((s,i)=>{Sc(s,!1,a=>{n[i]=a,++o===r&&e(n.join(PC))})})},IC=(t,e)=>{let r=t.split(PC),n=[];for(let o=0;o<r.length;o++){let s=vc(r[o],e);if(n.push(s),s.type==="error")break}return n};function $C(){return new TransformStream({transform(t,e){AC(t,r=>{let n=r.length,o;if(n<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,n);else if(n<65536){o=new Uint8Array(3);let s=new DataView(o.buffer);s.setUint8(0,126),s.setUint16(1,n)}else{o=new Uint8Array(9);let s=new DataView(o.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(o[0]|=128),e.enqueue(o),e.enqueue(r)})}})}var Ub;function Nu(t){return t.reduce((e,r)=>e+r.length,0)}function ju(t,e){if(t[0].length===e)return t.shift();let r=new Uint8Array(e),n=0;for(let o=0;o<e;o++)r[o]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),r}function LC(t,e){Ub||(Ub=new TextDecoder);let r=[],n=0,o=-1,s=!1;return new TransformStream({transform(i,a){for(r.push(i);;){if(n===0){if(Nu(r)<1)break;let c=ju(r,1);s=(c[0]&128)===128,o=c[0]&127,o<126?n=3:o===126?n=1:n=2}else if(n===1){if(Nu(r)<2)break;let c=ju(r,2);o=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),n=3}else if(n===2){if(Nu(r)<8)break;let c=ju(r,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(wc);break}o=f*Math.pow(2,32)+l.getUint32(4),n=3}else{if(Nu(r)<o)break;let c=ju(r,o);a.enqueue(vc(s?c:Ub.decode(c),e)),n=0}if(o===0||o>t){a.enqueue(wc);break}}}})}var Vb=4;function dt(t){if(t)return _2(t)}function _2(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 n,o=0;o<r.length;o++)if(n=r[o],n===e||n.fn===e){r.splice(o,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],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,o=r.length;n<o;++n)r[n].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 Sr=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),Ht=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),MC="arraybuffer";function Bu(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}var x2=Ht.setTimeout,w2=Ht.clearTimeout;function kr(t,e){e.useNativeTimers?(t.setTimeoutFn=x2.bind(Ht),t.clearTimeoutFn=w2.bind(Ht)):(t.setTimeoutFn=Ht.setTimeout.bind(Ht),t.clearTimeoutFn=Ht.clearTimeout.bind(Ht))}var S2=1.33;function FC(t){return typeof t=="string"?k2(t):Math.ceil((t.byteLength||t.size)*S2)}function k2(t){let e=0,r=0;for(let n=0,o=t.length;n<o;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}function Uu(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function NC(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function jC(t){let e={},r=t.split("&");for(let n=0,o=r.length;n<o;n++){let s=r[n].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}var Vu=class extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}},vr=class extends dt{constructor(e){super(),this.writable=!1,kr(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,r,n){return super.emitReserved("error",new Vu(e,r,n)),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=vc(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=NC(e);return r.length?"?"+r:""}};var Cc=class extends vr{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 n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};IC(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,DC(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]=Uu()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}};var BC=!1;try{BC=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var UC=BC;function v2(){}var zb=class extends Cc{constructor(e){if(super(e),typeof location<"u"){let r=location.protocol==="https:",n=location.port;n||(n=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,r){let n=this.request({method:"POST",data:e});n.on("success",r),n.on("error",(o,s)=>{this.onError("xhr post error",o,s)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=e}},an=class t extends dt{constructor(e,r,n){super(),this.createRequest=e,kr(this,n),this._opts=n,this._method=n.method||"GET",this._uri=r,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var e;let r=Bu(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;let n=this._xhr=this.createRequest(r);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&n.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var o;n.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},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=v2,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()}};an.requestsCount=0;an.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",VC);else if(typeof addEventListener=="function"){let t="onpagehide"in Ht?"pagehide":"unload";addEventListener(t,VC,!1)}}function VC(){for(let t in an.requests)an.requests.hasOwnProperty(t)&&an.requests[t].abort()}var C2=(function(){let t=zC({xdomain:!1});return t&&t.responseType!==null})(),cn=class extends zb{constructor(e){super(e);let r=e&&e.forceBase64;this.supportsBinary=C2&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new an(zC,this.uri(),e)}};function zC(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||UC))return new XMLHttpRequest}catch{}if(!e)try{return new Ht[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var HC=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",Wb=class extends vr{get name(){return"websocket"}doOpen(){let e=this.uri(),r=this.opts.protocols,n=HC?{}:Bu(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,n)}catch(o){return this.emitReserved("error",o)}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 n=e[r],o=r===e.length-1;Sc(n,this.supportsBinary,s=>{try{this.doWrite(n,s)}catch{}o&&Sr(()=>{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]=Uu()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}},Hb=Ht.WebSocket||Ht.MozWebSocket,ln=class extends Wb{createSocket(e,r,n){return HC?new Hb(e,r,n):r?new Hb(e,r):new Hb(e)}doWrite(e,r){this.ws.send(r)}};var vs=class extends vr{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=LC(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(r).getReader(),o=$C();o.readable.pipeTo(e.writable),this._writer=o.writable.getWriter();let s=()=>{n.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 n=e[r],o=r===e.length-1;this._writer.write(n).then(()=>{o&&Sr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var qb={websocket:ln,webtransport:vs,polling:cn};var E2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,A2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Cs(t){if(t.length>8e3)throw"URI too long";let e=t,r=t.indexOf("["),n=t.indexOf("]");r!=-1&&n!=-1&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let o=E2.exec(t||""),s={},i=14;for(;i--;)s[A2[i]]=o[i]||"";return r!=-1&&n!=-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=T2(s,s.path),s.queryKey=O2(s,s.query),s}function T2(t,e){let r=/\/{2,9}/g,n=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function O2(t,e){let r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,s){o&&(r[o]=s)}),r}var Kb=typeof addEventListener=="function"&&typeof removeEventListener=="function",zu=[];Kb&&addEventListener("offline",()=>{zu.forEach(t=>t())},!1);var Yn=class t extends dt{constructor(e,r){if(super(),this.binaryType=MC,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 n=Cs(e);r.hostname=n.host,r.secure=n.protocol==="https"||n.protocol==="wss",r.port=n.port,n.query&&(r.query=n.query)}else r.host&&(r.hostname=Cs(r.host).host);kr(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(n=>{let o=n.prototype.name;this.transports.push(o),this._transportsByName[o]=n}),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=jC(this.opts.query)),Kb&&(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"})},zu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let r=Object.assign({},this.opts.query);r.EIO=Vb,r.transport=e,this.id&&(r.sid=this.id);let n=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](n)}_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 n=0;n<this.writeBuffer.length;n++){let o=this.writeBuffer[n].data;if(o&&(r+=FC(o)),n>0&&r>this._maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,Sr(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,n){return this._sendPacket("message",e,r,n),this}send(e,r,n){return this._sendPacket("message",e,r,n),this}_sendPacket(e,r,n,o){if(typeof r=="function"&&(o=r,r=void 0),typeof n=="function"&&(o=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;let s={type:e,data:r,options:n};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),o&&this.once("flush",o),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},n=()=>{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?n():e()}):this.upgrading?n():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(),Kb&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let n=zu.indexOf(this._offlineEventListener);n!==-1&&zu.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}};Yn.protocol=Vb;var Hu=class extends Yn{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),n=!1;Yn.priorWebsocketSuccess=!1;let o=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",u=>{if(!n)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Yn.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||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(){n||(n=!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",o),r.removeListener("error",i),r.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};r.once("open",o),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(()=>{n||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let r=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&r.push(e[n]);return r}},Es=class extends Hu{constructor(e,r={}){let n=typeof e=="object"?e:r;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(o=>qb[o]).filter(o=>!!o)),super(e,n)}};var D9=Es.protocol;function WC(t,e="",r){let n=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),n=Cs(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";let s=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+s+":"+n.port+e,n.href=n.protocol+"://"+s+(r&&r.port===n.port?"":":"+n.port),n}var t_={};D(t_,{Decoder:()=>Jb,Encoder:()=>Zb,PacketType:()=>U,isPacketValid:()=>X2,protocol:()=>r1});var P2=typeof ArrayBuffer=="function",D2=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,qC=Object.prototype.toString,I2=typeof Blob=="function"||typeof Blob<"u"&&qC.call(Blob)==="[object BlobConstructor]",$2=typeof File=="function"||typeof File<"u"&&qC.call(File)==="[object FileConstructor]";function Ac(t){return P2&&(t instanceof ArrayBuffer||D2(t))||I2&&t instanceof Blob||$2&&t instanceof File}function Ec(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(Ec(t[r]))return!0;return!1}if(Ac(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Ec(t.toJSON(),!0);for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&Ec(t[r]))return!0;return!1}function KC(t){let e=[],r=t.data,n=t;return n.data=Gb(r,e),n.attachments=e.length,{packet:n,buffers:e}}function Gb(t,e){if(!t)return t;if(Ac(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 n=0;n<t.length;n++)r[n]=Gb(t[n],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){let r={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=Gb(t[n],e));return r}return t}function GC(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 t1=Y1(QC(),1),Xb=(0,t1.default)("socket.io-parser"),e1=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],r1=5,U;(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"})(U||(U={}));var Zb=class{constructor(e){this.replacer=e}encode(e){return Xb("encoding packet %j",e),(e.type===U.EVENT||e.type===U.ACK)&&Ec(e)?this.encodeAsBinary({type:e.type===U.EVENT?U.BINARY_EVENT:U.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===U.BINARY_EVENT||e.type===U.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)),Xb("encoded %j as %s",e,r),r}encodeAsBinary(e){let r=KC(e),n=this.encodeAsString(r.packet),o=r.buffers;return o.unshift(n),o}},Jb=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 n=r.type===U.BINARY_EVENT;n||r.type===U.BINARY_ACK?(r.type=n?U.EVENT:U.ACK,this.reconstructor=new Qb(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(Ac(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,n={type:Number(e.charAt(0))};if(U[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===U.BINARY_EVENT||n.type===U.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(!n1(a)||a<0)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");n.attachments=a}if(e.charAt(r+1)==="/"){let s=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););n.nsp=e.substring(s,r)}else n.nsp="/";let o=e.charAt(r+1);if(o!==""&&Number(o)==o){let s=r+1;for(;++r;){let i=e.charAt(r);if(i==null||Number(i)!=i){--r;break}if(r===e.length)break}n.id=Number(e.substring(s,r+1))}if(e.charAt(++r)){let s=this.tryParse(e.substr(r));if(t.isPayloadValid(n.type,s))n.data=s;else throw new Error("invalid payload")}return Xb("decoded %s as %j",e,n),n}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case U.CONNECT:return Ku(r);case U.DISCONNECT:return r===void 0;case U.CONNECT_ERROR:return typeof r=="string"||Ku(r);case U.EVENT:case U.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&e1.indexOf(r[0])===-1);case U.ACK:case U.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},Qb=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=GC(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function K2(t){return typeof t=="string"}var n1=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function G2(t){return t===void 0||n1(t)}function Ku(t){return Object.prototype.toString.call(t)==="[object Object]"}function Y2(t,e){switch(t){case U.CONNECT:return e===void 0||Ku(e);case U.DISCONNECT:return e===void 0;case U.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&e1.indexOf(e[0])===-1);case U.ACK:return Array.isArray(e);case U.CONNECT_ERROR:return typeof e=="string"||Ku(e);default:return!1}}function X2(t){return K2(t.nsp)&&G2(t.id)&&Y2(t.type,t.data)}function me(t,e,r){return t.on(e,r),function(){t.off(e,r)}}var Z2=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Rs=class extends dt{constructor(e,r,n){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,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[me(e,"open",this.onopen.bind(this)),me(e,"packet",this.onpacket.bind(this)),me(e,"error",this.onerror.bind(this)),me(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 n,o,s;if(Z2.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:U.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=(o=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||o===void 0?void 0:o.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 n;let o=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(o===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"))},o),i=(...a)=>{this.io.clearTimeoutFn(s),r.apply(this,a)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...r){return new Promise((n,o)=>{let s=(i,a)=>i?o(i):n(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 n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((o,...s)=>(this._queue[0],o!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(o)):(this._queue.shift(),r&&r(null,...s)),n.pending=!1,this._drainQueue())),this._queue.push(n),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:U.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(n=>String(n.id)===e)){let n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case U.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 U.EVENT:case U.BINARY_EVENT:this.onevent(e);break;case U.ACK:case U.BINARY_ACK:this.onack(e);break;case U.DISCONNECT:this.ondisconnect();break;case U.CONNECT_ERROR:this.destroy();let n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);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 n of r)n.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,n=!1;return function(...o){n||(n=!0,r.packet({type:U.ACK,id:e,data:o}))}}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:U.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 n=0;n<r.length;n++)if(e===r[n])return r.splice(n,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 n=0;n<r.length;n++)if(e===r[n])return r.splice(n,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 n of r)n.apply(this,e.data)}}};function Zn(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}Zn.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};Zn.prototype.reset=function(){this.attempts=0};Zn.prototype.setMin=function(t){this.ms=t};Zn.prototype.setMax=function(t){this.max=t};Zn.prototype.setJitter=function(t){this.jitter=t};var Ps=class extends dt{constructor(e,r){var n;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,kr(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((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new Zn({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;let o=r.parser||t_;this.encoder=new o.Encoder,this.decoder=new o.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 Es(this.uri,this.opts);let r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;let o=me(r,"open",function(){n.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=me(r,"error",s);if(this._timeout!==!1){let a=this._timeout,c=this.setTimeoutFn(()=>{o(),s(new Error("timeout")),r.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(o),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(me(e,"ping",this.onping.bind(this)),me(e,"data",this.ondata.bind(this)),me(e,"error",this.onerror.bind(this)),me(e,"close",this.onclose.bind(this)),me(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){Sr(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Rs(this,e,r),this.nsps[e]=n),n}_destroy(e){let r=Object.keys(this.nsps);for(let n of r)if(this.nsps[n].active)return;this._close()}_packet(e){let r=this.encoder.encode(e);for(let n=0;n<r.length;n++)this.engine.write(r[n],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 n;this.cleanup(),(n=this.engine)===null||n===void 0||n.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 n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var Tc={};function Ds(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let r=WC(t,e.path||"/socket.io"),n=r.source,o=r.id,s=r.path,i=Tc[o]&&s in Tc[o].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new Ps(n,e):(Tc[o]||(Tc[o]=new Ps(n,e)),c=Tc[o]),r.query&&!e.query&&(e.query=r.queryKey),c.socket(r.path,e)}Object.assign(Ds,{Manager:Ps,Socket:Rs,io:Ds,connect:Ds});R();R();var e_=new Set(["__proto__","constructor","prototype"]),r_=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(e_.has(t[e]))return!1;return!0},o1=(t,e)=>{!t||!r_(e)||e.reduce((r,n,o,s)=>{if(r&&n in r){if(o!==s.length-1)return r[n];delete r[n]}},t)},s1=(t,e,r,n=!1)=>{!t||!r_(e)||e.reduce((o,s,i,a)=>{if(o){if(i!==a.length-1)return!o[s]&&n&&(o[s]={}),o[s];o[s]=r}},t)},Gu=(t,e)=>{let r=new Set;if(!Array.isArray(e))return r;for(let[n,o,s]of e)if(!(!Array.isArray(o)||!o.length))switch(r.add(o[0]),n){case"delete":o1(t,o);break;case"update":case"set":s1(t,o,s,!0);break;default:break}return r},Oc=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},i1=(t,e,r,n="designSystem")=>{for(let o in e){if(e_.has(o))continue;let s=`${n}/${o}`;if(r.has(s))continue;let i=e[o],a=t[o];if(i&&typeof i=="object"&&!Array.isArray(i)){if(!a||typeof a!="object"||Array.isArray(a)){if(o in t)continue;t[o]={}}i1(t[o],i,r,s)}else o in t||(t[o]=Array.isArray(i)?JSON.parse(JSON.stringify(i)):i)}},n_=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let o={designSystem:t.__rawDesignSystem};Gu(o,e)}let r=JSON.parse(JSON.stringify(t.__rawDesignSystem)),n=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[];for(let o of n){let s=Xe(o),i=s?o.library:o,a=i&&i.designSystem;if(!a||typeof a!="object")continue;let c=Mr(i.sharedLibIgnore);if(s)for(let l of Mr(o.ignoreList))c.add(l);c.has("designSystem")||i1(r,a,c)}return r};R();var a1=(t,e,r)=>{let n=!1;return(o={})=>{let{data:s}=o,{schema:i}=o;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(Oc(r,c),n){let l=n_(r);l&&xr(l)}}else yn(r[a],c);else r[a]=c}),n=!0,i&&(r.schema=i))}},c1=(t,e,r)=>(n={})=>{let{changes:o}=n;if(!o||!Array.isArray(o)||!o.length)return;o=t.call("deepDestringifyFunctions",o,Array.isArray(o)?[]:{});let s=o.filter(c=>Array.isArray(c)&&Array.isArray(c[1])&&c[1][0]==="designSystem"),i=s.length?o.filter(c=>!s.includes(c)):o,a=Gu(r,i);if(s.length&&a.add("designSystem"),a.has("designSystem")){let c=n_(r,s);c?xr(c):r.__warnedNoRawDesignSystem||(r.__warnedNoRawDesignSystem=!0,console.warn("[sync] design-system op ignored: no raw design system was seeded on this client. Re-initing from the processed config would corrupt every token, so the update is skipped \u2014 reload to pick it up. Seed it at boot with seedRawDesignSystem(ctx, ds)."))}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 J2={success:"green",error:"red",warning:"yellow"},l1=(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 n=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(n)},3e3)}}else if(r.connected){r.notifications.connected={title:"Disconnected",type:"error"},r.update({connected:!1});let n=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected&&e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(n)},3e3)}},f1={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:J2[t.type||"success"],icon:null,Flex:{Title:{text:"{{ title }}"},P:{text:"{{ title }}"}},onRender:(e,r,n)=>{r.update({animation:"fadeInUp"})},onClick:(e,r,n)=>{delete n.notifications[r.key],r.update({animation:"fadeOutDown"}),n.onClose&&n.onClose(e,r,n)}}),IconText:null,childrenAs:"state",children:({state:t})=>t.notifications}};var Q2=!1,tD=()=>Q2?"http://localhost:8080":"https://api.symbols.app",eD=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}},rD=async t=>{try{let e=t||tD(),r=await C.fetch(`${e}/service-token`,{method:"GET"}),n;try{let o=await r.clone().json();if(o&&typeof o.token=="string")return o.token.trim();n=await r.text()}catch{n=await r.text()}return(n||"").replace(/\s+/gu,"")||void 0}catch(e){console.error("[sync] Failed to fetch service-token",e)}},p1=(t,e,r,n)=>{t.on("snapshot",a1(e,r,n)),t.on("ops",c1(e,r,n)),t.on("clients",o=>{n.editor?.verbose&&l1(o,e,r)}),t.on("disconnect",o=>{n.editor?.verbose&&console.info("[sync] disconnected",o)})},nD=async(t,e,r,n)=>{let o=await rD(n);if(!o)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=Ds(n,{path:"/collab-socket",transports:["websocket"],auth:{token:o,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)")}),p1(a,t,e,r),a},oD=(t,e,r)=>{let n=Ds({transports:["websocket","polling"],reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return n.on("connect",()=>{r.editor?.verbose!==!1&&console.info("[sync] connected (runner)")}),p1(n,t,e,r),n.on("reload",()=>{typeof C<"u"&&C.location&&C.location.reload()}),n},sD=async(t,e,r)=>{let{mode:n,baseUrl:o}=eD(r);return n?n==="collab"?nD(t,e,r,o):n==="runner"?oD(t,e,r):null:null},iD={onInit:sD};var h1=t=>typeof t>"u",u1=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),d1=t=>t?.editor?.runtime==="runner",g1=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},m1={name:"sync",beforeCreate(t,e){let r=e&&e.editor;(r&&!h1(r.liveSync)?r.liveSync:u1(e)||d1(e))&&(u1(e)&&!d1(e)&&!e?.key||g1(t,iD))}},y1={name:"notifications",beforeCreate(t,e){if(!e)return;let r=h1(e.notifications)?null:e.notifications,n=e.editor&&e.editor.verbose===!0;(r===!0||r!==!1&&n)&&g1(t,f1)}};var i_={};D(i_,{AlertTemplate:()=>id,ConfirmTemplate:()=>od,CustomTemplate:()=>cd,ModalLayer:()=>nd,ModalRoot:()=>rd,PromptTemplate:()=>ad,windowsComponents:()=>s_});var o_={};D(o_,{alertDialog:()=>td,closeAllModals:()=>Ju,closeModal:()=>Xu,confirmDialog:()=>Qu,getLayer:()=>Yu,openModal:()=>Zu,promptDialog:()=>ed,windowsFunctions:()=>Cr});function Z(t){let e=t;for(;e;){if(e.layer!==void 0)return e.layer;e=e.parent}return null}function Is(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 Yu(){return Z(this)}var aD=(t,e)=>{let r=t&&t["ModalLayer_"+e],n=r?.node||r?.__ref?.node;!n||typeof n.style?.setProperty!="function"||(n.style.setProperty("display","none","important"),n.style.setProperty("opacity","0","important"),n.style.setProperty("visibility","hidden","important"),n.style.setProperty("pointer-events","none","important"))},b1=(t,e)=>{let r=t&&t["ModalLayer_"+e],n=r?.node||r?.__ref?.node;!n||typeof n.style?.removeProperty!="function"||(n.style.removeProperty("display"),n.style.removeProperty("opacity"),n.style.removeProperty("visibility"),n.style.removeProperty("pointer-events"))};function Xu(t){let e=Is(this);if(!e)return;let r=e.state?.stack||[];if(!r.length)return;let n,o,s;if(t){if(s=[],n=r.filter((i,a)=>{let c=i.id!==t;return c||s.push(a),c}),n.length===r.length)return;o=r.filter(i=>i.id===t)}else n=r.slice(0,-1),o=r.slice(-1),s=[r.length-1];e.state.update({stack:n});for(let i of s)aD(e,i);for(let i of o)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function Zu(t={}){let e=Is(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)}`,n={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},o=e.state?.stack||[];if(o.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=o.length;return b1(e,s),e.state.update({stack:[...o,n]}),r}function Ju(){let t=Is(this);!t||!t.state?.stack?.length||t.state.update({stack:[]})}function Qu(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"confirm"})}function td(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"alert"})}function ed(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"prompt"})}var Cr={openModal:Zu,closeModal:Xu,closeAllModals:Ju,confirmDialog:Qu,alertDialog:td,promptDialog:ed,getLayer:Yu};var cD=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),_1=t=>{if(!t?.querySelectorAll)return[];let e=t.querySelectorAll(cD),r=[];for(let n=0;n<e.length;n++){let o=e[n];(o.offsetParent!==null||o===document.activeElement)&&r.push(o)}return r},x1=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},rd={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 Cr)a in r.functions||(r.functions[a]=Cr[a])}t.__modalOpeners=t.__modalOpeners||[],t.__prevStackLen=t.state&&t.state.stack&&t.state.stack.length||0;let n=()=>{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)}},o=a=>{let c=t.state?.stack;if(c?.length){if(a.key==="Tab"){let l=x1(t);if(!l)return;let f=_1(l);if(!f.length){a.preventDefault();let h=l.querySelector?.('[role="dialog"]')||l;try{h.focus?.()}catch{}return}let u=f[0],d=f[f.length-1],p=document.activeElement;if(!l.contains(p)){a.preventDefault();try{u.focus()}catch{}return}if(a.shiftKey&&p===u){a.preventDefault();try{d.focus()}catch{}}else if(!a.shiftKey&&p===d){a.preventDefault();try{u.focus()}catch{}}return}a.key==="Escape"&&c[c.length-1]?.dismissOnBackdrop!==!1&&(a.preventDefault(),n())}};window.addEventListener("keydown",o),t.__escHandler=o;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,p)=>p!==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 n=x1(t);if(!n)return;let o=_1(n)[0]||n.querySelector&&n.querySelector('[role="dialog"]')||n;try{o.focus&&o.focus()}catch{}});else{let n=null;for(let o=r;o>e;o--)t.__modalOpeners[o]&&(n=n||t.__modalOpeners[o]),t.__modalOpeners[o]=null;if(n&&typeof n.focus=="function"&&n.isConnected!==!1)try{n.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 nd={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=Z(t)?.id;return e?"modal-title-"+e:null}},width:t=>Z(t)?.width||"H",maxWidth:t=>Z(t)?.maxWidth||"90vw",maxHeight:t=>Z(t)?.maxHeight||null,onClick:t=>t.stopPropagation(),onMousedown:t=>t.stopPropagation(),ModalHeader:{display:"none"},overflow:"visible",ConfirmTemplate:{hide:t=>Z(t)?.template!=="confirm"},AlertTemplate:{hide:t=>Z(t)?.template!=="alert"},PromptTemplate:{hide:t=>Z(t)?.template!=="prompt"},CustomTemplate:{hide:t=>Z(t)?.template!=="custom"}}};var $s=(t,e,r)=>Z(t)?.[e]||r,lD=t=>{let e=Z(t)?.icon;return e===null||e===!1},od={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>$s(t,"title","Are you sure?"),attr:{id:t=>{let e=Z(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>$s(t,"message","This action cannot be undone."),color:"dim"}},Icons:{hide:t=>lD(t),Indicator:{extends:"Icon",opacity:".7",icon:t=>$s(t,"icon","warning")}}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"CancelButton",text:t=>$s(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let n=Z(e);if(n?.onCancel)try{n.onCancel()}catch(o){console.warn("[windows] confirm.onCancel threw:",o)}e.call("closeModal",n?.id)}},ConfirmBtn:{extends:"Button",theme:t=>$s(t,"confirmTheme","primary"),text:t=>$s(t,"confirmText","Confirm"),onClick:(t,e,r)=>{let n=Z(e);if(n?.onConfirm)try{n.onConfirm()}catch(o){console.warn("[windows] confirm.onConfirm threw:",o)}e.call("closeModal",n?.id)}}}};var sd=(t,e,r)=>Z(t)?.[e]||r,id={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>sd(t,"title","Notice"),attr:{id:t=>{let e=Z(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>sd(t,"message",""),color:"dim"}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:t=>sd(t,"icon","info")}}},ModalFooter:{flow:"x",align:"center end",OkBtn:{extends:"Button",theme:"primary",text:t=>sd(t,"okText","OK"),onClick:(t,e,r)=>{let n=Z(e);if(n?.onOk)try{n.onOk()}catch(o){console.warn("[windows] alert.onOk threw:",o)}e.call("closeModal",n?.id)}}}};var Rc=(t,e,r)=>Z(t)?.[e]||r,ad={tag:"div",flow:"y",gap:"B",scope:{value:""},onRender:(t,e)=>{let r=Z(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let n=t.InputRow&&t.InputRow.node;n&&(n.value=t.scope.value)},onUpdate:(t,e)=>{let r=Z(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let n=t.InputRow&&t.InputRow.node;n&&(n.value=t.scope.value)},ModalHeader:{Hgroup:{H:{text:t=>Rc(t,"title","Enter a value"),attr:{id:t=>{let e=Z(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>Rc(t,"message",""),color:"dim"}}},InputRow:{extends:"Input",autofocus:!0,placeholder:t=>Rc(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 n=Z(e),o=e.parent.scope?.value||"";if(n?.onConfirm)try{n.onConfirm(o)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",n?.id)}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"CancelButton",text:t=>Rc(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let n=Z(e);if(n?.onCancel)try{n.onCancel()}catch(o){console.warn("[windows] prompt.onCancel threw:",o)}e.call("closeModal",n?.id)}},ConfirmBtn:{extends:"Button",theme:"primary",text:t=>Rc(t,"confirmText","OK"),onClick:(t,e,r)=>{let n=Z(e),o=e.parent.parent.scope?.value||"";if(n?.onConfirm)try{n.onConfirm(o)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",n?.id)}}}};var cd={tag:"div",flow:"y",gap:"B",Title:{tag:"h2",text:t=>Z(t)?.title||"",hide:t=>!Z(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=Z(t)?.id;return e?"modal-title-"+e:null}}},Slot:{tag:"div",onInit:t=>{let e=K(()=>{let r=Z(t),n=r?.content||null,o=r?.id||null;if(!n){t.__lastLayerId!=null&&(t.removeContent(),t.__lastLayerId=null);return}if(t.__lastLayerId!==o){t.__lastLayerId=o;try{t.set(n);let s=t.content?.context;if(s){s.functions||(s.functions={});for(let i in Cr)i in s.functions||(s.functions[i]=Cr[i])}}catch(s){console.warn("[windows] custom.content set failed:",s)}}});t.__ref&&t.__ref.__effects.push(e)}}};var w1={extends:"Button",theme:"tertiary"};var s_={ModalRoot:rd,ModalLayer:nd,ConfirmTemplate:od,AlertTemplate:id,PromptTemplate:ad,CustomTemplate:cd,"smbls.CancelButton":w1};var f_={};D(f_,{Dropdown:()=>hd,DropdownList:()=>gd,DropdownParent:()=>md,DropdownParentFocus:()=>yd,DropdownRoot:()=>dd,DropdownSiblingFocus:()=>bd,DropdownTrigger:()=>pd,dropdownComponents:()=>l_});var S1=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),fD=(t,e,r,n)=>{let o=S1(t,r,n),s=i=>o[i]>=e.height+8;return s("bottom")?"bottom":s("top")?"top":o.bottom>=o.top?"bottom":"top"},uD=(t,e,r,n,o)=>{let s=S1(e,n,o),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},ld=(t,e,r)=>Math.max(e,Math.min(r,t)),fn=(t,e,r="auto")=>{if(!t)return{left:0,top:0,side:"bottom",align:"start"};let n=typeof window<"u"?window.innerWidth:1024,o=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=ld((n-s.width)/2,8,Math.max(8,n-s.width-8)),p=ld((o-s.height)/2,8,Math.max(8,o-s.height-8));return{left:d,top:p,side:"center",align:"center"}}let i,a;if(r==="auto")i=fD(t,s,n,o),a="start";else{let d=r.split("-");i=d[0],a=d[1]||"start",i=uD(i,t,s,n,o)}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,n-s.width-8),u=Math.max(8,o-s.height-8);return c=ld(c,8,f),l=ld(l,8,u),{left:c,top:l,side:i,align:a}},Ls=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 un={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:"70vh"},dD=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}},a_=t=>t?.getRoot?.()?.DropdownRoot||null,pD=0,hD=()=>`dropdown_${++pD}_${Date.now().toString(36)}`;function fd(t={}){let e=a_(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,n=t.anchorRect||dD(r);if(!n)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let o=t.id||hD(),s=t.restoreEl?.node||t.restoreEl||r||(typeof document<"u"?document.activeElement:null),i={id:o,content:t.content||null,anchor:n,placement:t.placement||un.placement,trigger:t.trigger||un.trigger,offset:t.offset??un.offset,minWidth:t.minWidth||un.minWidth,maxWidth:t.maxWidth||un.maxWidth,maxHeight:t.maxHeight||un.maxHeight,theme:t.theme||null,shadow:t.shadow||null,background:t.background||null,round:t.round||null,onOpen:t.onOpen,onClose:t.onClose,restoreEl: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 o}function ud(t){let e=a_(this);if(!e)return;let r=e.state?.layer;r&&e.state.update({layer:{...r,inert:!!t}})}function Jn(t){let e=a_(this);if(!e)return;let r=e.state?.layer;if(!r)return;let n=typeof t=="string"?t:t?.id;if(n&&r.id&&n!==r.id)return;let o=r.onClose,s=r.restoreEl,i=typeof document<"u"?document:null,a=i?i.activeElement:null,c=e.node?.querySelector?.('[data-smbls-dropdown="panel"]'),l=!a||a===i?.body,f=!!(c&&a&&c.contains(a)),u=l||f;if(e.state.update({layer:null}),u&&s&&typeof s.focus=="function")try{s.focus()}catch(d){console.warn("[dropdown] focus restore threw:",d)}if(typeof o=="function")try{o(r)}catch(d){console.warn("[dropdown] onClose threw:",d)}}var gD=`
105
105
  @keyframes smbls-dropdown-fade-in {
106
106
  from { opacity: 0; transform: var(--smbls-dropdown-from, translateY(-6px)) scale(0.98); }
107
107
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
@@ -141,4 +141,4 @@ ${i}
141
141
  [data-smbls-dropdown="panel"]:not([data-smbls-shadowed]) {
142
142
  box-shadow: none !important;
143
143
  }
144
- `,tD=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let t=document.createElement("style");t.id="smbls-dropdown-css",t.textContent=Q2,document.head.appendChild(t)},m1=(t,e)=>{if(!t.node)return;let r=e?.background;if(!r)t.node.removeAttribute("data-smbls-surface");else{let n=/^[a-z][\w.+-]*$/i.test(r)?`var(--color-${r})`:r;t.node.style.setProperty("--smbls-dropdown-surface",n),t.node.setAttribute("data-smbls-surface","")}e?.theme?t.node.setAttribute("data-smbls-themed",""):t.node.removeAttribute("data-smbls-themed"),e?.shadow?t.node.setAttribute("data-smbls-shadowed",""):t.node.removeAttribute("data-smbls-shadowed")},eD=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")},fd={tag:"div",attr:{"data-smbls-dropdown-root":"true"},position:"fixed",inset:"0",zIndex:"1500",pointerEvents:"none",state:{layer:null},onInit:t=>{if(tD(),typeof window>"u")return;let e=n=>{n.key==="Escape"&&t.state?.layer&&(n.preventDefault(),Jn.call(t))};window.addEventListener("keydown",e),t.__dropdownEscHandler=e;let r=n=>{let o=t.state?.layer;if(!o)return;let s=t.node?.querySelector('[data-smbls-dropdown="panel"]');if(s&&s.contains(n.target))return;let i=o.anchor;if(i){let a=n.clientX,c=n.clientY;if(a>=i.left&&a<=i.right&&c>=i.top&&c<=i.bottom)return}Jn.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 fn(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 fn(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":$s(fn(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||"radiusCard",theme:t=>t.parent?.layer?.theme||null,border:"none",borderWidth:"0",shadow:t=>t.parent?.layer?.shadow||null,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=K(()=>{let r=t.parent?.layer,n=r?.content||null,o=r?.id||null;if(!n){if(t.__lastLayerId!=null){try{t.removeContent?.()}catch{}t.__lastLayerId=null}return}if(t.__lastLayerId!==o){t.__lastLayerId=o;try{t.set(n)}catch(s){console.warn("[dropdown] content set failed:",s)}m1(t,r),eD(t),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{if(!t.node)return;m1(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=fn(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",$s(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(),n={width:r.width,height:r.height},o=t._lastSize;(!o||Math.abs(o.width-n.width)>1||Math.abs(o.height-n.height)>1)&&(t._lastSize=n);let s=fn(e.anchor,n,e.placement);t.node.style.left=s.left+"px",t.node.style.top=s.top+"px",t.node.style.setProperty("--smbls-dropdown-from",$s(s.side))}}}};var o_=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 n in r)r[n]===void 0&&delete r[n];t.call("openDropdown",r)},ud={position:"relative",onClick:(t,e)=>{(e.dropdownTrigger||"click")==="click"&&(t.preventDefault(),t.stopPropagation(),o_(e))},onFocus:(t,e)=>{e.dropdownTrigger==="focus"&&o_(e)},onMouseenter:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&clearTimeout(e._hoverTimer),e._hoverTimer=setTimeout(()=>o_(e),120))},onMouseleave:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&(clearTimeout(e._hoverTimer),e._hoverTimer=null),e._closeTimer=setTimeout(()=>e.call("closeDropdown"),250))}};var dd={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"},pd={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"}}},hd={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},gd={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()}}},md={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 s_={DropdownRoot:fd,DropdownTrigger:ud,Dropdown:dd,DropdownList:pd,DropdownParent:hd,DropdownParentFocus:gd,DropdownSiblingFocus:md};var c_={};I(c_,{DROPDOWN_DEFAULTS:()=>un,closeDropdown:()=>Jn,computePosition:()=>fn,dropdownFunctions:()=>a_,fadeInTransform:()=>$s,openDropdown:()=>cd,setDropdownInert:()=>ld});var a_={openDropdown:cd,closeDropdown:Jn,setDropdownInert:ld};var rD=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),nD=(t,e,r,n,o)=>{let s=rD(e,n,o),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},y1=(t,e,r)=>Math.max(e,Math.min(r,t)),b1=(t,e,r="bottom")=>{if(!t)return{left:0,top:0,side:"bottom"};let n=typeof window<"u"?window.innerWidth:1024,o=typeof window<"u"?window.innerHeight:768,s=nD(r,t,e,n,o),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=y1(i,6,n-e.width-6),a=y1(a,6,o-e.height-6),{left:i,top:a,side:s}},_1=t=>{switch(t){case"bottom":return"translate3d(0, -10%, 0)";case"top":return"translate3d(0, 10%, 0)";case"left":return"translate3d(10%, 0, 0)";case"right":return"translate3d(-10%, 0, 0)";default:return"translate3d(0, -10%, 0)"}};var yd={placement:"bottom",theme:"dialog",delay:250,hideDelay:100},oD=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}},x1=t=>t?.getRoot?.()?.TooltipRoot||null,w1=t=>{let e=t?.state?.tip;return e?typeof e.$parse=="function"?e.$parse():{...e}:null},S1=(t,e,r=0)=>{let n=w1(t);if(!n||n.id!==e||n.open===!1)return;let o=t.Panel?.node;if(!o||typeof o.getBoundingClientRect!="function")return;if(o.textContent!==(n.text||"")){r<3&&setTimeout(()=>S1(t,e,r+1),0);return}let s=o.getBoundingClientRect();t.state.update({tip:{...n,size:{width:s.width,height:s.height}}})},sD=t=>{typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)},iD=0,aD=()=>`tooltip_${++iD}_${Date.now().toString(36)}`;function k1(t={}){let e=x1(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,n=t.anchorRect||oD(r);if(!n)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let o=t.id||aD(),s={id:o,text:t.text||"",anchor:n,placement:t.placement||yd.placement,theme:t.theme||yd.theme,open:!0,size:null};return e.state.update({tip:s}),sD(()=>S1(e,o)),o}function v1(t){let e=x1(this);if(!e)return;let r=w1(e);if(!r||r.open===!1)return;let n=typeof t=="string"?t:t?.id;n&&r.id&&n!==r.id||e.state.update({tip:{...r,open:!1}})}var l_=t=>{let e=t.tip;return e?.anchor?b1(e.anchor,e.size||{width:0,height:0},e.placement):null},bd=t=>{let e=t.tip;return!!(e&&e.open!==!1&&e.size)},C1={tag:"div",attr:{"data-smbls-tooltip-root":"true"},position:"fixed",inset:"0",zIndex:"2500",pointerEvents:"none",state:{tip:null},Panel:{tag:"div",attr:{"data-smbls-tooltip":"panel"},role:"tooltip",position:"fixed",tip:(t,e)=>e?.tip||null,left:t=>{let e=l_(t);return e?e.left+"px":"-9999px"},top:t=>{let e=l_(t);return e?e.top+"px":"-9999px"},text:t=>t.tip?.text||"",theme:t=>t.tip?.theme||yd.theme,width:"max-content",maxWidth:"280px",padding:"Y2 Z",round:"Z",fontSize:"Y2",lineHeight:"1.35",whiteSpace:"normal",pointerEvents:"none",opacity:t=>bd(t)?"1":"0",visibility:t=>bd(t)?"visible":"hidden",transform:t=>{if(bd(t))return"none";let e=l_(t);return _1(e?e.side:"bottom")},transition:t=>{let e=bd(t)?"A":"Z";return`${e} opacity defaultBezier, ${e} transform defaultBezier, ${e} visibility defaultBezier`}}};var f_=t=>{if(!t.tooltipText)return;let e=t.node;e&&e.hasAttribute&&e.hasAttribute("title")&&e.removeAttribute("title")},cD=t=>{t.tooltipText&&(f_(t),t.call("openTooltip",{anchorEl:t,text:t.tooltipText,placement:t.tooltipPlacement||"bottom",theme:t.tooltipTheme,id:t.tooltipId||t.key}))},E1=t=>{t._tooltipHideTimer&&(clearTimeout(t._tooltipHideTimer),t._tooltipHideTimer=null),!t._tooltipShowTimer&&(t._tooltipShowTimer=setTimeout(()=>{t._tooltipShowTimer=null,cD(t)},t.tooltipDelay??250))},A1=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))},T1={onMouseenter:(t,e)=>E1(e),onMouseleave:(t,e)=>A1(e),onFocus:(t,e)=>E1(e),onBlur:(t,e)=>A1(e),onMouseover:(t,e)=>f_(e),onFocusin:(t,e)=>f_(e)};var O1={display:"flex",theme:"dialog",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=>t.call("isDefined",t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"currentColor",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:"currentColor",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},R1={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)},style:t=>{if(!t.parent||!t.parent.state.tooltipOpen)return{opacity:"",visibility:"",transform:""};let e=t.shapeDirection;return{opacity:"1",visibility:"visible",transform:e==="left"||e==="right"?"translate3d(0%,-50%,0)":"translate3d(-50%,0,0)"}},styleDeps:[t=>t.parent&&t.parent.state.tooltipOpen]},P1={position:"relative",zIndex:999,state:{tooltipOpen:!1},onInit:t=>{let{Tooltip:e,TooltipHidden:r}=t,n=e||r;if(!n)return;let o=n&&n[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":o||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})},onPointerdown:(t,e,r)=>{t.pointerType==="touch"&&r.update({tooltipOpen:!r.tooltipOpen})},onDocumentKeydown:(t,e,r)=>{t.key!=="Escape"||!r.tooltipOpen||r.update({tooltipOpen:!1})},onDocumentPointerdown:(t,e,r)=>{r.tooltipOpen&&(e.node&&e.node.contains(t.target)||r.update({tooltipOpen:!1}))}};var D1={TooltipRoot:C1,TooltipTrigger:T1,Tooltip:O1,TooltipHidden:R1,TooltipParent:P1};var I1={openTooltip:k1,closeTooltip:v1};var $1=t=>!!(t&&typeof t=="object"&&t.__isStub===!0),L1=t=>Xe(t)?t.library!==void 0?t.library:t.key??t.name:t,lD=(t,e)=>{let r=e?.sharedLibraries,n=Array.isArray(r)?r.map(i=>typeof i=="string"?i:i?.key||i?.name):r&&typeof r=="object"?Object.keys(r):null,o=0,s=i=>{let a=o++;if(typeof i.__libraryKey=="string"&&i.__libraryKey)return i.__libraryKey;if(n&&n[a])return n[a];if(typeof i.__stubId=="string"){let c=i.__stubId.match(/^@symbo[-.]ls\/([^/]+)/);if(c)return c[1]}return null};return t.map(i=>{let a=L1(i);if(!$1(a))return i;let c=s(a);return c?Xe(i)?{...i,library:c}:c:null}).filter(Boolean)},fD=async(t,e={})=>{let r=e.symbolsConfig,n=r?.owner&&r?.key?`${r.owner}--${r.key}`:r?.key,o=e.key=e.key||n||(S(t)?t:"smblsapp");if(e.define=e.define||ms,e.cssPropsRegistry=pt,e.window=nC(e),e.sharedLibraries&&e.sharedLibraries.length){if(e.sharedLibraries.some(h=>{let g=L1(h);return typeof g=="string"||$1(g)})){e.sharedLibraries=lD(e.sharedLibraries,e.symbolsConfig);let{resolveSharedLibraries:h}=await Promise.resolve().then(()=>(P(),Bl));e.sharedLibraries=await h(e.sharedLibraries,{apiBaseUrl:Ob()})}Jv(e.sharedLibraries),hC(e)}Ac(e,e.designSystem);let[s,i]=uC(o,e);e.designSystem=s,e.registry=i,e.cases||(e.cases={}),e.shorthand&&fc.prepareContext(e);let a=dC(t,e);if(e.state=a,Li(a),e.pages=pC(t,e),e.components=oC(e),e.utils=sC(e),Lr[e.packageManager]&&(e.dependencies=await aC(e)),e.methods=iC(e),e.routerOptions=Hk(t,e),e.defaultExtends=[ru],e.snippets=e.snippets||{},e.functions=e.functions||{},e.plugins=e.plugins||[],e.plugins.some(p=>!p||typeof p!="object")){let p=e.plugins.filter(h=>!h||typeof h!="object");e.plugins=e.plugins.filter(h=>h&&typeof h=="object"),e.verbose!==!1&&console.warn(`[smbls] context.plugins carried ${p.length} non-plugin entr${p.length===1?"y":"ies"} (${p.map(h=>JSON.stringify(h)).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&&k(e.globalScope)&&(e.globalScope=ri(e.globalScope));let c=(p,h)=>{let g=h?p[h]:p;if(!k(g))return;let m=me(g);try{Object.assign(g,m)}catch(b){if(h)p[h]=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=p=>p&&typeof p.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=p=>e.plugins.some(h=>h&&h.name===p);if(e.polyglot&&!f("polyglot")){e.plugins.push(bs);for(let p in yc)typeof e.functions[p]!="function"&&(e.functions[p]=yc[p])}if(f("helmet")||e.plugins.push(eb),e.fetch&&!f("fetch")&&e.plugins.push(Th),e.designSystem?.typography?.useCapsize!==!1&&!f("capsize")&&(e.plugins.push(gu),e.cssPropsRegistry.useCapsize=sb),e.shorthand&&!f("shorthand")&&e.plugins.push(fc),e.analyze&&!f("analyze")){let p=e.analyze===!0?{}:e.analyze;e.analyze=Eu(p),e.plugins.push(xs)}e.sync!==!1&&!f("sync")&&e.plugins.push(l1),e.inspect&&!f("inspect")&&e.plugins.push(Ab),(e.notifications===!0||e.editor&&e.editor.verbose===!0)&&e.notifications!==!1&&!f("notifications")&&e.plugins.push(f1);let d=(p,h,g)=>{if(e[p]!==!1){for(let m in h)k(e.components[m])||(e.components[m]=h[m]);for(let m in g)typeof e.functions[m]!="function"&&(e.functions[m]=g[m])}};return d("windows",e_,Cr),d("dropdown",s_,a_),d("tooltip",D1,I1),e},u_=async(t,e)=>{k(e)||(e={}),lr(t)?(t={},e.parent=t):S(t)?(t={},e.key=t):k(t)||(t={});let r=e.window||(typeof window<"u"?window:null),n=r?.__BRENDER__,o=null;if(n){let c=e.document||(typeof document<"u"?document:null);c&&(o=Array.from(c.head.querySelectorAll("style")))}if(await fD(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&&k(e.app))for(let c in e.app)t[c]===void 0&&(t[c]=e.app[c]);t.extends=rv(t,e),e.router!==!1&&(t.routes=e.pages),t.state=e.state,t.context=e,t.data=t.data||{},e.skipDesignSystemInit||await cC({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(n)return uD(fe,t,i,e,r,o);let a=fe(t,i,e.key,{verbose:e.verbose,context:e,...e.domqlOptions});return typeof window<"u"&&!e.document&&(window.__smblsApp=a),a},uD=async(t,e,r,n,o,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,n.key,{verbose:n.verbose,context:n,...n.domqlOptions});return dD(o),c},dD=t=>{t&&(delete t.__BRENDER__,delete t.__BR_REGISTRY__)};var d_=(t,e)=>ot(t,k(e)?e:{}),pD=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 n=t.themeStorageKey;if(r==="auto"&&n&&typeof localStorage<"u")try{let s=localStorage.getItem(n);s&&(r=s)}catch{}let o=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",o),t.globalTheme=r,t.themeRoot=e},hD=()=>{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}},M1=t=>{let e=hD();e&&(t.editor||(t.editor={}),t.editor.runtime||(t.editor.runtime=e),e==="runner"&&typeof t.editor.livesync>"u"&&(t.editor.livesync=!0))},p_=(t,e=en,r)=>{let n={...en,...d_(e,r)};return M1(n),pD(n),u_(t,n).then(s=>{if(Qy(s,n),s.destroy=()=>tc(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Qa(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,n),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})},gD=(t,e=en,r)=>{let n=p_(t,e,r),o={...en,...d_(e,r)},s=o.key;return Gk(n,s,{utils:Ja,...o}),n},mD=async(t,e=en,r)=>{let n={...en,...d_(e,r)};M1(n);let o=e.key;await Kk(o,n);let s=await u_(t,n);return Qy(s,n),s.destroy=()=>tc(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Qa(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},n.onCreate&&await n.onCreate(s,s.state,s.context,n),s},yD=(t={},e=en,r)=>p_({deps:{isUndefined:Tt},...t},ot({domqlOptions:{onlyResolveExtends:!0}},e),r);cu(Fa);Gv(void 0,{smbls:h_});Yv(void 0,{"@symbo.ls/windows":()=>({...r_,...t_}),"@symbo.ls/dropdown":()=>({...i_,...c_})});
144
+ `,mD=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let t=document.createElement("style");t.id="smbls-dropdown-css",t.textContent=gD,document.head.appendChild(t)},k1=(t,e)=>{if(!t.node)return;let r=e?.background;if(!r)t.node.removeAttribute("data-smbls-surface");else{let n=/^[a-z][\w.+-]*$/i.test(r)?`var(--color-${r})`:r;t.node.style.setProperty("--smbls-dropdown-surface",n),t.node.setAttribute("data-smbls-surface","")}e?.theme?t.node.setAttribute("data-smbls-themed",""):t.node.removeAttribute("data-smbls-themed"),e?.shadow?t.node.setAttribute("data-smbls-shadowed",""):t.node.removeAttribute("data-smbls-shadowed")},yD=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")},dd={tag:"div",attr:{"data-smbls-dropdown-root":"true"},position:"fixed",inset:"0",zIndex:"1500",pointerEvents:"none",state:{layer:null},onInit:t=>{if(mD(),typeof window>"u")return;let e=n=>{n.key==="Escape"&&t.state?.layer&&(n.preventDefault(),Jn.call(t))};window.addEventListener("keydown",e),t.__dropdownEscHandler=e;let r=n=>{let o=t.state?.layer;if(!o)return;let s=t.node?.querySelector('[data-smbls-dropdown="panel"]');if(s&&s.contains(n.target))return;let i=o.anchor;if(i){let a=n.clientX,c=n.clientY;if(a>=i.left&&a<=i.right&&c>=i.top&&c<=i.bottom)return}Jn.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 fn(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 fn(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":Ls(fn(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||"radiusCard",theme:t=>t.parent?.layer?.theme||null,border:"none",borderWidth:"0",shadow:t=>t.parent?.layer?.shadow||null,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=K(()=>{let r=t.parent?.layer,n=r?.content||null,o=r?.id||null;if(!n){if(t.__lastLayerId!=null){try{t.removeContent?.()}catch{}t.__lastLayerId=null}return}if(t.__lastLayerId!==o){t.__lastLayerId=o;try{t.set(n)}catch(s){console.warn("[dropdown] content set failed:",s)}k1(t,r),yD(t),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{if(!t.node)return;k1(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=fn(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",Ls(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(),n={width:r.width,height:r.height},o=t._lastSize;(!o||Math.abs(o.width-n.width)>1||Math.abs(o.height-n.height)>1)&&(t._lastSize=n);let s=fn(e.anchor,n,e.placement);t.node.style.left=s.left+"px",t.node.style.top=s.top+"px",t.node.style.setProperty("--smbls-dropdown-from",Ls(s.side))}}}};var c_=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 n in r)r[n]===void 0&&delete r[n];t.call("openDropdown",r)},pd={position:"relative",onClick:(t,e)=>{(e.dropdownTrigger||"click")==="click"&&(t.preventDefault(),t.stopPropagation(),c_(e))},onFocus:(t,e)=>{e.dropdownTrigger==="focus"&&c_(e)},onMouseenter:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&clearTimeout(e._hoverTimer),e._hoverTimer=setTimeout(()=>c_(e),120))},onMouseleave:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&(clearTimeout(e._hoverTimer),e._hoverTimer=null),e._closeTimer=setTimeout(()=>e.call("closeDropdown"),250))}};var hd={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"},gd={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"}}},md={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},yd={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()}}},bd={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 l_={DropdownRoot:dd,DropdownTrigger:pd,Dropdown:hd,DropdownList:gd,DropdownParent:md,DropdownParentFocus:yd,DropdownSiblingFocus:bd};var d_={};D(d_,{DROPDOWN_DEFAULTS:()=>un,closeDropdown:()=>Jn,computePosition:()=>fn,dropdownFunctions:()=>u_,fadeInTransform:()=>Ls,openDropdown:()=>fd,setDropdownInert:()=>ud});var u_={openDropdown:fd,closeDropdown:Jn,setDropdownInert:ud};var bD=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),_D=(t,e,r,n,o)=>{let s=bD(e,n,o),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},v1=(t,e,r)=>Math.max(e,Math.min(r,t)),C1=(t,e,r="bottom")=>{if(!t)return{left:0,top:0,side:"bottom"};let n=typeof window<"u"?window.innerWidth:1024,o=typeof window<"u"?window.innerHeight:768,s=_D(r,t,e,n,o),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=v1(i,6,n-e.width-6),a=v1(a,6,o-e.height-6),{left:i,top:a,side:s}},E1=t=>{switch(t){case"bottom":return"translate3d(0, -10%, 0)";case"top":return"translate3d(0, 10%, 0)";case"left":return"translate3d(10%, 0, 0)";case"right":return"translate3d(-10%, 0, 0)";default:return"translate3d(0, -10%, 0)"}};var _d={placement:"bottom",theme:"dialog",delay:250,hideDelay:100},xD=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}},A1=t=>t?.getRoot?.()?.TooltipRoot||null,T1=t=>{let e=t?.state?.tip;return e?typeof e.$parse=="function"?e.$parse():{...e}:null},O1=(t,e,r=0)=>{let n=T1(t);if(!n||n.id!==e||n.open===!1)return;let o=t.Panel?.node;if(!o||typeof o.getBoundingClientRect!="function")return;if(o.textContent!==(n.text||"")){r<3&&setTimeout(()=>O1(t,e,r+1),0);return}let s=o.getBoundingClientRect();t.state.update({tip:{...n,size:{width:s.width,height:s.height}}})},wD=t=>{typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)},SD=0,kD=()=>`tooltip_${++SD}_${Date.now().toString(36)}`;function R1(t={}){let e=A1(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,n=t.anchorRect||xD(r);if(!n)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let o=t.id||kD(),s={id:o,text:t.text||"",anchor:n,placement:t.placement||_d.placement,theme:t.theme||_d.theme,open:!0,size:null};return e.state.update({tip:s}),wD(()=>O1(e,o)),o}function P1(t){let e=A1(this);if(!e)return;let r=T1(e);if(!r||r.open===!1)return;let n=typeof t=="string"?t:t?.id;n&&r.id&&n!==r.id||e.state.update({tip:{...r,open:!1}})}var p_=t=>{let e=t.tip;return e?.anchor?C1(e.anchor,e.size||{width:0,height:0},e.placement):null},xd=t=>{let e=t.tip;return!!(e&&e.open!==!1&&e.size)},D1={tag:"div",attr:{"data-smbls-tooltip-root":"true"},position:"fixed",inset:"0",zIndex:"2500",pointerEvents:"none",state:{tip:null},Panel:{tag:"div",attr:{"data-smbls-tooltip":"panel"},role:"tooltip",position:"fixed",tip:(t,e)=>e?.tip||null,left:t=>{let e=p_(t);return e?e.left+"px":"-9999px"},top:t=>{let e=p_(t);return e?e.top+"px":"-9999px"},text:t=>t.tip?.text||"",theme:t=>t.tip?.theme||_d.theme,width:"max-content",maxWidth:"280px",padding:"Y2 Z",round:"Z",fontSize:"Y2",lineHeight:"1.35",whiteSpace:"normal",pointerEvents:"none",opacity:t=>xd(t)?"1":"0",visibility:t=>xd(t)?"visible":"hidden",transform:t=>{if(xd(t))return"none";let e=p_(t);return E1(e?e.side:"bottom")},transition:t=>{let e=xd(t)?"A":"Z";return`${e} opacity defaultBezier, ${e} transform defaultBezier, ${e} visibility defaultBezier`}}};var h_=t=>{if(!t.tooltipText)return;let e=t.node;e&&e.hasAttribute&&e.hasAttribute("title")&&e.removeAttribute("title")},vD=t=>{t.tooltipText&&(h_(t),t.call("openTooltip",{anchorEl:t,text:t.tooltipText,placement:t.tooltipPlacement||"bottom",theme:t.tooltipTheme,id:t.tooltipId||t.key}))},I1=t=>{t._tooltipHideTimer&&(clearTimeout(t._tooltipHideTimer),t._tooltipHideTimer=null),!t._tooltipShowTimer&&(t._tooltipShowTimer=setTimeout(()=>{t._tooltipShowTimer=null,vD(t)},t.tooltipDelay??250))},$1=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))},L1={onMouseenter:(t,e)=>I1(e),onMouseleave:(t,e)=>$1(e),onFocus:(t,e)=>I1(e),onBlur:(t,e)=>$1(e),onMouseover:(t,e)=>h_(e),onFocusin:(t,e)=>h_(e)};var M1={display:"flex",theme:"dialog",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=>t.call("isDefined",t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"currentColor",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:"currentColor",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},F1={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)},style:t=>{if(!t.parent||!t.parent.state.tooltipOpen)return{opacity:"",visibility:"",transform:""};let e=t.shapeDirection;return{opacity:"1",visibility:"visible",transform:e==="left"||e==="right"?"translate3d(0%,-50%,0)":"translate3d(-50%,0,0)"}},styleDeps:[t=>t.parent&&t.parent.state.tooltipOpen]},N1={position:"relative",zIndex:999,state:{tooltipOpen:!1},onInit:t=>{let{Tooltip:e,TooltipHidden:r}=t,n=e||r;if(!n)return;let o=n&&n[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":o||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})},onPointerdown:(t,e,r)=>{t.pointerType==="touch"&&r.update({tooltipOpen:!r.tooltipOpen})},onDocumentKeydown:(t,e,r)=>{t.key!=="Escape"||!r.tooltipOpen||r.update({tooltipOpen:!1})},onDocumentPointerdown:(t,e,r)=>{r.tooltipOpen&&(e.node&&e.node.contains(t.target)||r.update({tooltipOpen:!1}))}};var j1={TooltipRoot:D1,TooltipTrigger:L1,Tooltip:M1,TooltipHidden:F1,TooltipParent:N1};var B1={openTooltip:R1,closeTooltip:P1};var U1=t=>!!(t&&typeof t=="object"&&t.__isStub===!0),V1=t=>Xe(t)?t.library!==void 0?t.library:t.key??t.name:t,CD=(t,e)=>{let r=e?.sharedLibraries,n=Array.isArray(r)?r.map(i=>typeof i=="string"?i:i?.key||i?.name):r&&typeof r=="object"?Object.keys(r):null,o=0,s=i=>{let a=o++;if(typeof i.__libraryKey=="string"&&i.__libraryKey)return i.__libraryKey;if(n&&n[a])return n[a];if(typeof i.__stubId=="string"){let c=i.__stubId.match(/^@symbo[-.]ls\/([^/]+)/);if(c)return c[1]}return null};return t.map(i=>{let a=V1(i);if(!U1(a))return i;let c=s(a);return c?Xe(i)?{...i,library:c}:c:null}).filter(Boolean)},ED=async(t,e={})=>{let r=e.symbolsConfig,n=r?.owner&&r?.key?`${r.owner}--${r.key}`:r?.key,o=e.key=e.key||n||(S(t)?t:"smblsapp");if(e.define=e.define||ys,e.cssPropsRegistry=pt,e.window=fC(e),e.sharedLibraries&&e.sharedLibraries.length){if(e.sharedLibraries.some(h=>{let g=V1(h);return typeof g=="string"||U1(g)})){e.sharedLibraries=CD(e.sharedLibraries,e.symbolsConfig);let{resolveSharedLibraries:h}=await Promise.resolve().then(()=>(R(),Vl));e.sharedLibraries=await h(e.sharedLibraries,{apiBaseUrl:Ib()})}sC(e.sharedLibraries),wC(e)}Oc(e,e.designSystem);let[s,i]=bC(o,e);e.designSystem=s,e.registry=i,e.cases||(e.cases={}),e.shorthand&&dc.prepareContext(e);let a=_C(t,e);if(e.state=a,Fi(a),e.pages=xC(t,e),e.components=uC(e),e.utils=dC(e),Lr[e.packageManager]&&(e.dependencies=await hC(e)),e.methods=pC(e),e.routerOptions=Zk(t,e),e.defaultExtends=[ou],e.snippets=e.snippets||{},e.functions=e.functions||{},e.plugins=e.plugins||[],e.plugins.some(p=>!p||typeof p!="object")){let p=e.plugins.filter(h=>!h||typeof h!="object");e.plugins=e.plugins.filter(h=>h&&typeof h=="object"),e.verbose!==!1&&console.warn(`[smbls] context.plugins carried ${p.length} non-plugin entr${p.length===1?"y":"ies"} (${p.map(h=>JSON.stringify(h)).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&&k(e.globalScope)&&(e.globalScope=oi(e.globalScope));let c=(p,h)=>{let g=h?p[h]:p;if(!k(g))return;let m=ye(g);try{Object.assign(g,m)}catch(b){if(h)p[h]=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=p=>p&&typeof p.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=p=>e.plugins.some(h=>h&&h.name===p);if(e.polyglot&&!f("polyglot")){e.plugins.push(_s);for(let p in _c)typeof e.functions[p]!="function"&&(e.functions[p]=_c[p])}if(f("helmet")||e.plugins.push(sb),e.fetch&&!f("fetch")&&e.plugins.push(Dh),e.designSystem?.typography?.useCapsize!==!1&&!f("capsize")&&(e.plugins.push(yu),e.cssPropsRegistry.useCapsize=lb),e.shorthand&&!f("shorthand")&&e.plugins.push(dc),e.analyze&&!f("analyze")){let p=e.analyze===!0?{}:e.analyze;e.analyze=Tu(p),e.plugins.push(ws)}e.sync!==!1&&!f("sync")&&e.plugins.push(m1),e.inspect&&!f("inspect")&&e.plugins.push(Pb),(e.notifications===!0||e.editor&&e.editor.verbose===!0)&&e.notifications!==!1&&!f("notifications")&&e.plugins.push(y1);let d=(p,h,g)=>{if(e[p]!==!1){for(let m in h)k(e.components[m])||(e.components[m]=h[m]);for(let m in g)typeof e.functions[m]!="function"&&(e.functions[m]=g[m])}};return d("windows",s_,Cr),d("dropdown",l_,u_),d("tooltip",j1,B1),e},g_=async(t,e)=>{k(e)||(e={}),lr(t)?(t={},e.parent=t):S(t)?(t={},e.key=t):k(t)||(t={});let r=e.window||(typeof window<"u"?window:null),n=r?.__BRENDER__,o=null;if(n){let c=e.document||(typeof document<"u"?document:null);c&&(o=Array.from(c.head.querySelectorAll("style")))}if(await ED(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&&k(e.app))for(let c in e.app)t[c]===void 0&&(t[c]=e.app[c]);t.extends=lv(t,e),e.router!==!1&&(t.routes=e.pages),t.state=e.state,t.context=e,t.data=t.data||{},e.skipDesignSystemInit||await gC({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(n)return AD(ue,t,i,e,r,o);let a=ue(t,i,e.key,{verbose:e.verbose,context:e,...e.domqlOptions});return typeof window<"u"&&!e.document&&(window.__smblsApp=a),a},AD=async(t,e,r,n,o,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,n.key,{verbose:n.verbose,context:n,...n.domqlOptions});return TD(o),c},TD=t=>{t&&(delete t.__BRENDER__,delete t.__BR_REGISTRY__)};var m_=(t,e)=>st(t,k(e)?e:{}),OD=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 n=t.themeStorageKey;if(r==="auto"&&n&&typeof localStorage<"u")try{let s=localStorage.getItem(n);s&&(r=s)}catch{}let o=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",o),t.globalTheme=r,t.themeRoot=e},RD=()=>{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}},z1=t=>{let e=RD();e&&(t.editor||(t.editor={}),t.editor.runtime||(t.editor.runtime=e),e==="runner"&&typeof t.editor.livesync>"u"&&(t.editor.livesync=!0))},y_=(t,e=en,r)=>{let n={...en,...m_(e,r)};return z1(n),OD(n),g_(t,n).then(s=>{if(nb(s,n),s.destroy=()=>rc(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=ec(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,n),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})},PD=(t,e=en,r)=>{let n=y_(t,e,r),o={...en,...m_(e,r)},s=o.key;return ev(n,s,{utils:tc,...o}),n},DD=async(t,e=en,r)=>{let n={...en,...m_(e,r)};z1(n);let o=e.key;await tv(o,n);let s=await g_(t,n);return nb(s,n),s.destroy=()=>rc(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=ec(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},n.onCreate&&await n.onCreate(s,s.state,s.context,n),s},ID=(t={},e=en,r)=>y_({deps:{isUndefined:Ot},...t},st({domqlOptions:{onlyResolveExtends:!0}},e),r);fu(ja);eC(void 0,{smbls:b_});rC(void 0,{"@symbo.ls/windows":()=>({...i_,...o_}),"@symbo.ls/dropdown":()=>({...f_,...d_})});