smbls 3.14.799 → 3.14.800

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,60 +1,60 @@
1
- "use strict";var XC=Object.create;var kc=Object.defineProperty;var ZC=Object.getOwnPropertyDescriptor;var JC=Object.getOwnPropertyNames;var QC=Object.getPrototypeOf,tE=Object.prototype.hasOwnProperty;var j=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(o){throw r=[o],o}};var cd=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},P=(t,e)=>{for(var r in e)kc(t,r,{get:e[r],enumerable:!0})},Qb=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of JC(e))!tE.call(t,n)&&n!==r&&kc(t,n,{get:()=>e[n],enumerable:!(o=ZC(e,n))||o.enumerable});return t};var eE=(t,e,r)=>(r=t!=null?XC(QC(t)):{},Qb(e||!t||!t.__esModule?kc(r,"default",{value:t,enumerable:!0}):r,t)),rE=t=>Qb(kc({},"__esModule",{value:!0}),t);var Ad,Td,v,tt,Rs=j(()=>{"use strict";Ad=globalThis,Td=globalThis,v=globalThis,tt=v.document});var or,Ps,Ht,Is=j(()=>{"use strict";Rs();or=t=>(typeof Node=="object"?t instanceof v.Node:t&&typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.nodeName=="string")||!1,Ps=t=>(typeof HTMLElement=="object"?t instanceof v.HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string")||!1,Ht=t=>typeof v<"u"&&(v.Node&&t instanceof v.Node||v.Window&&t instanceof v.Window||t===v||tt!==void 0&&t===tt)});var S,w,je,A,Lc,Mc,T,Fc,H,yt,At,Ds,Wt,Od,Tt=j(()=>{"use strict";Is();S=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,w=t=>typeof t=="string",je=t=>typeof t=="number",A=t=>typeof t=="function",Lc=t=>t===!0||t===!1,Mc=t=>t===null,T=t=>Array.isArray(t),Fc=t=>t instanceof Date,H=t=>t===null?!1:typeof t=="object",yt=t=>t!==void 0,At=t=>t===void 0,Ds={boolean:Lc,array:T,object:S,string:w,date:Fc,number:je,null:Mc,function:A,objectLike:H,node:or,htmlElement:Ps,defined:yt},Wt=t=>(...e)=>e.some(r=>Ds[r](t)),Od=t=>(...e)=>!e.some(r=>Ds[r](t))});var Rd,Pd,Id,Dd,Yo,$s,$d,Ld,Ls,Md,Fd,Nd,jd,Bd,Ud,Vd,Xo,Ms,Zo=j(()=>{"use strict";nr();Tt();Rd=(t,e)=>e.every(r=>t.includes(r)),Pd=(t,e)=>{let r=0;for(let o=0;o<t.length;o++)t[o]===e&&r++;return r},Id=(t,e)=>{if(w(e)&&(e=parseInt(e)),je(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},Dd=(t,e,r)=>{e<0||r<0||e>=t.length||r>=t.length||([t[e],t[r]]=[t[r],t[e]])},Yo=(...t)=>[].concat(...t),$s=(t,e=[])=>t.reduce((r,o)=>st(r,lt(o,{exclude:e}),e),{}),$d=(t,e)=>{let r=t.indexOf(e);return r!==-1?t.slice(0,r):t},Ld=(t,e)=>{if(!T(t))return;let r=t.indexOf(e);return r!==-1?t.slice(r+1):t},Ls=(t,e)=>{let r=t.indexOf(e);if(r>-1){let o=[...t];return o.splice(r,1),o}return t},Md=(t,e)=>t.filter(r=>r!==e),Fd=(t,e)=>{let r=[];for(let o=0;o<t.length;o++)r.push(t[o]),o<t.length-1&&r.push(e);return r},Nd=(t,e,r)=>{let o=[...t],n=o.indexOf(e),s=o.indexOf(r);if(n!==-1&&s!==-1){let i=o.splice(n,1)[0],a=s<n?s:s+1;o.splice(a,0,i)}return o},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},Bd=(t,e)=>t.filter(r=>!e.includes(r)),Ud=(t,e)=>{let r=new Set(e);return t.filter(o=>!r.has(o))},Vd=(t,e)=>{if(!t)return 0;let r=0;for(let o=0;o<e.length;o++)t.includes(e[o])&&r++;return r},Xo=t=>T(t)?[...new Set(t)]:t,Ms=(t,e)=>{for(let r in e)Object.defineProperty(t,r,{value:e[r],enumerable:!1,configurable:!0,writable:!0})}});function no(t,e,r={}){let{bracketsLength:o=2}=r,n=o===3?"{{{":"{{";if(!t.includes(n))return t;let s=_E[o],i=e||this.state||{},a=this;return t.replace(s,(c,l,f,u)=>{let d=f.trim();if(u){let h=a?.context,g=h?.functions?.[u]||h?.utils?.[u]||h?.methods?.[u]||h?.snippets?.[u]||a?.[u];if(g&&typeof g=="function")try{return String(g.call(a,d)??"")}catch{return""}return""}if(l){let h=(l.match(/\.\.\//g)||[]).length,g=i;for(let m=0;m<h;m++){if(!g||!g.parent)return"";g=g.parent}if(d==="parent")return String(g.value??"");let p=Fs(g,d);return p!=null&&typeof p=="object"?"":String(p??"")}else{let h=Fs(i,d);if(h!=null&&typeof h!="object")return String(h);let g=a?.context?.polyglot;if(g?.translations){let p=i?.root?.lang||i?.lang||a?.context?.state?.lang||g.defaultLang||"en",m=g.translations[p];if(m){let _=Fs(m,d);if(_!=null&&typeof _!="object")return String(_);for(let y in m){let x=m[y];if(x&&typeof x=="object"&&!Array.isArray(x)){let k=Fs(x,d);if(k!=null&&typeof k!="object")return String(k)}}}let b=Fs(g.translations,d);if(b!=null&&typeof b!="object")return String(b)}return""}})}var Ns,zd,_E,Fs,so,Hd,xE,Wd,qd,Kd,wE,Gd,Yd,js=j(()=>{"use strict";Ns=(t,e)=>{for(let r of e)if(t.includes(r))return!0;return!1},zd=(t,e)=>{let r=new RegExp(`[${e.join("\\")}]`,"g");return t.replace(r,"")},_E={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},Fs=(t,e)=>e.split(".").reduce((r,o)=>r?.[o],t);so=t=>`${t.charAt(0).toLowerCase()}${t.slice(1)}`,Hd=(t,e)=>{let r=t.split(`
2
- `),o=-1,n=-1,s=-1,i=-1,a=new RegExp(`\\b${e}\\b\\s*:\\s*`),c=0,l=!1;for(let f=0;f<r.length;f++)if(a.test(r[f])&&!l){if(l=!0,o=f+1,s=r[f].indexOf(e)+1,r[f].includes("{}")){n=o,i=r[f].indexOf("{}")+3;break}let u=r[f].slice(s+e.length);if(u.includes("{")||u.includes("["))c=1;else{n=f+1,i=r[f].length+1;break}}else if(l&&(c+=(r[f].match(/{/g)||[]).length,c+=(r[f].match(/\[/g)||[]).length,c-=(r[f].match(/}/g)||[]).length,c-=(r[f].match(/]/g)||[]).length,c===0)){n=f+1,i=r[f].lastIndexOf("}")!==-1?r[f].lastIndexOf("}")+2:r[f].length+1;break}return{startColumn:s,endColumn:i,startLineNumber:o,endLineNumber:n}},xE=/\\([0-7]{1,3})/g,Wd=t=>t.replace(xE,(e,r)=>String.fromCharCode(parseInt(r,8))),qd=t=>t.replace(/\n/g,"/////n").replace(/`/g,"/////tilde").replace(/\$/g,"/////dlrsgn"),Kd=t=>t.replace(/\/\/\/\/\/n/g,`
3
- `).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),wE=/[^a-zA-Z0-9\s]/g,Gd=t=>t.replace(wE,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),Yd=t=>t.replace(/%[0-9A-Fa-f]{2}/g,e=>String.fromCharCode(parseInt(e.slice(1),16)))});var wr,Bs,Xd,io,Sr,Jo,Us,Zd,Qo=j(()=>{"use strict";wr=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"]),Bs=new Set(["attr","style","text","html","content","data","class","state","scope","children","props","if","key","tag","query","on","context"]),Xd=["ref","parent","__element","__depends","__ref","__children","root"],io=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"]),Sr=new Set(["update","__element"]),Jo=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"]),Us=new Set(["node","context","extends","__element","__ref",...Jo,...io,...Sr]),Zd=new Set(["init","beforeClassAssign","render","renderRouter","attachNode","stateInit","stateCreated","beforeStateUpdate","stateUpdate","beforeUpdate","done","create","complete","frame","update","fetchError","fetchComplete"])});var d_,ao,ft,Jd,ht,st,m_,Qd,lt,zs,SE,Hs,kE,vE,CE,Be,EE,AE,p_,de,y_,b_,__,x_,w_,h_,Vs,g_,Ws,tp,ep,Nc,rp,op,qs,co,qt,jc,TE,np,sp,Bc,ip,ap,cp,lp,fp,up,dp,nr=j(()=>{"use strict";Rs();Tt();Zo();js();Is();Qo();d_="production",ao=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,ft=(t,e,r,o)=>{if(A(t))return e?typeof t.call!="function"?t:t.call(e,e,r||e.state,o||e.context):void 0;if(t!=null&&e?.context?.plugins&&(T(t)||S(t)&&!Ht(t))){let n=e.context.plugins;for(let s of n)if(s.resolveHandler){let i=s.resolveHandler(t,e);if(typeof i=="function")return ft(i,e,r,o)}}return t},Jd=(t,e,r)=>{for(let o in e)t[o]=ft(e[o],r)},ht=(t,e,r=[])=>{let o=r instanceof Set;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(ao(n)||(o?r.has(n):r.includes(n))||t[n]===void 0&&(t[n]=e[n]));return t},st=(t,e,r=Us)=>m_(t,e,r,null),m_=(t,e,r,o)=>{if(t===e)return t;if(o){for(let s=0;s<o.length;s+=2)if(o[s]===t&&o[s+1]===e)return t}let n=r instanceof Set;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||ao(s)||s==="constructor"||s==="prototype"||(n?r.has(s):r.includes(s)))continue;let i=t[s],a=e[s];if(H(i)&&H(a)){let c=o||[];c.push(t,e),m_(i,a,r,c),c.length-=2}else i===void 0&&(t[s]=a)}return t},Qd=(t,e=[])=>{let r=e instanceof Set,o={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(ao(n)||(r?e.has(n):e.includes(n))||(o[n]=t[n]));return o},lt=(t,e={})=>{let{exclude:r=[],cleanUndefined:o=!1,cleanNull:n=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!H(t)||Ht(t))return t;if(s.has(t))return s.get(t);let a=r instanceof Set?r:r.length>3?new Set(r):null,c=u=>a?a.has(u):r.includes(u),l=T(t)?[]:{};s.set(t,l);let f=[[t,l]];for(;f.length;){let[u,d]=f.pop();for(let h in u){if(!Object.prototype.hasOwnProperty.call(u,h)||ao(h)||h==="__proto__"||c(h))continue;let g=u[h];if(!(o&&g===void 0)&&!(n&&g===null)){if(Ht(g)){d[h]=g;continue}if(i&&h==="extends"&&T(g)){d[h]=$s(g,r);continue}if(A(g)){d[h]=g;continue}if(H(g))if(s.has(g))d[h]=s.get(g);else{let p=T(g)?[]:{};s.set(g,p),d[h]=p,f.push([g,p])}else d[h]=g}}}return l},zs=(t,e={})=>{(t.node||t.__ref||t.parent||t.__element||t.parse)&&((t.__element||t.parent?.__element).warn("Trying to clone element or state at",t),t=t.parse?.());for(let r in t){let o=t[r];if(A(o))e[r]=o.toString();else if(S(o))e[r]={},zs(o,e[r]);else if(T(o)){let n=e[r]=[];for(let s=0;s<o.length;s++){let i=o[s];S(i)?(n[s]={},zs(i,n[s])):A(i)?n[s]=i.toString():n[s]=i}}else e[r]=o}return e},SE=new Set(["&","*","-",":","%","{","}",">","<","@",".","/","!"," "]),Hs=(t={},e=0)=>{if(t===null||typeof t!="object"||t instanceof RegExp)return String(t);let r=!1;for(let s in t){r=!0;break}if(!r)return"{}";let o=" ".repeat(e),n=`{
4
- `;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=t[s],a=!1;for(let l=0;l<s.length;l++)if(SE.has(s[l])){a=!0;break}let c=a?`'${s}'`:s;if(n+=`${o} ${c}: `,i instanceof RegExp)n+=String(i);else if(T(i)){n+=`[
5
- `;for(let l of i)l instanceof RegExp?n+=`${o} ${String(l)},
6
- `:H(l)&&l!==null?n+=`${o} ${Hs(l,e+2)},
7
- `:w(l)?n+=`${o} '${l}',
8
- `:n+=`${o} ${l},
9
- `;n+=`${o} ]`}else H(i)?n+=Hs(i,e+1):w(i)?n+=Ns(i,[`
10
- `,"'"])?`\`${i}\``:`'${i}'`:n+=i;n+=`,
11
- `}return n+=`${o}}`,n},kE=[/^\(\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]*\}$/],vE=/^["[{]/,CE=/^(export|import)\s/,Be=t=>{if(!t)return!1;let e=t.trim().replace(/\n\s*/g," ").trim();if(e===""||e==="{}"||e==="[]"||CE.test(e)||!kE.some(s=>s.test(e)))return!1;let o=e.charCodeAt(0),n=e.includes("=>");return!(o===123&&!n||o===91||vE.test(e)&&!n)},EE=t=>(0,eval)(t),AE=(t,e)=>{let r=/^(\s*(?:async\s+)?function\s*[\w$]*\s*\([^)]*\)\s*)\{/.exec(t);if(!r)return null;let o=r[0].length,n=[],s=o,i=1,a=null,c=t.length,l=new RegExp("^(?:const|let|var)\\s+"+e+"\\b");for(;s<c&&i>0;){let u=t[s];if(u==="/"&&t[s+1]==="/"){let d=t.indexOf(`
12
- `,s);s=d===-1?c:d;continue}if(u==="/"&&t[s+1]==="*"){let d=t.indexOf("*/",s+2);s=d===-1?c:d+2;continue}if(u==='"'||u==="'"||u==="`"){let d=u;for(s++;s<c;){if(t[s]==="\\"){s+=2;continue}if(t[s]===d){s++;break}if(d==="`"&&t[s]==="$"&&t[s+1]==="{"){s+=2;let h=1;for(;s<c&&h>0;)t[s]==="{"?h++:t[s]==="}"&&h--,s++;continue}s++}continue}if(u==="{"){i++,s++;continue}if(u==="}"){i--,s++;continue}if(i===1&&l.test(t.slice(s))){let d=s,h=0,g=s;for(;g<c;){let p=t[g];if(p==='"'||p==="'"||p==="`"){let m=p;for(g++;g<c;){if(t[g]==="\\"){g+=2;continue}if(t[g]===m){g++;break}g++}continue}if(p==="("||p==="["||p==="{"){h++,g++;continue}if(p===")"||p==="]"||p==="}"){if(h===0)break;h--,g++;continue}if(h===0&&(p===";"||p===`
13
- `)){g++;break}g++}n.push([d,g]),s=g;continue}s++}if(!n.length)return null;let f=t;for(let u=n.length-1;u>=0;u--)f=f.slice(0,n[u][0])+f.slice(n[u][1]);return f},p_=(t,e,r)=>{let o=String(t).trimStart();if(/^(export|import)\s/.test(o))return t;try{return r.window.eval(`(${t})`)}catch(n){let s=n&&n.message?n.message:String(n),i=/await is only valid in async/.test(s),a=/Identifier '([^']+)' has already been declared/.exec(s),c=null;if(i){let l=String(t).trim();if(/^function[\s(]/.test(l))try{c=r.window.eval("(async "+l+")")}catch{}}else if(a){let l=String(t),f=a[1];for(let u=0;u<5;u++){let d=AE(l,f);if(!d||d===l)break;l=d;try{c=r.window.eval("("+l+")");break}catch(h){let g=/Identifier '([^']+)' has already been declared/.exec(h&&h.message||String(h));if(!g||g[1]!==f)break}}}if(!c&&/Unexpected (token '\{'|identifier)/.test(s))try{let l=r.window.eval("({"+t+"})");if(l&&typeof l=="object"){let f=Object.keys(l);f.length===1&&typeof l[f[0]]=="function"&&(c=l[f[0]])}}catch{}return c||(typeof console<"u"&&console.warn&&console.warn(`[smbls] deepDestringifyFunctions: eval failed on ${e} \u2014 value will be left as a string. Reason: `+s+`.
14
- First 200 chars of source: `+String(t).slice(0,200)),t)}},de=(t,e={},r={window:{eval:EE}})=>{if(!t||typeof t!="object")return e;let o=[[t,e]];for(;o.length;){let[n,s]=o.pop();for(let i in n){if(!Object.prototype.hasOwnProperty.call(n,i))continue;let a=n[i];if(w(a))Be(a)?s[i]=p_(a,`"${i}"`,r):s[i]=a;else if(T(a)){let c=s[i]=[];for(let l=0;l<a.length;l++){let f=a[l];if(w(f))c.push(Be(f)?p_(f,`array index ${l} (prop "${i}")`,r):f);else if(S(f)){let u=g_(f);if(u)c.push(u);else{let d={};c.push(d),o.push([f,d])}}else c.push(f)}}else if(S(a)){let c=g_(a);if(c){s[i]=c;continue}let l=s[i]&&typeof s[i]=="object"&&!T(s[i])?s[i]:s[i]={};o.push([a,l])}else s[i]=a}}return e},y_="Set",b_="Map",__="RegExp",x_="WeakMap",w_="WeakSet",h_=t=>{let e=Object.keys(t);return e.length===1&&e[0]==="__type"},Vs=(t,e)=>{if(!t||typeof t!="object")return t;let r=s=>Vs(s,e||(e=new WeakMap));if(t.__type===y_&&T(t.values))return new Set(t.values.map(r));if(t.__type===b_&&T(t.entries))return new Map(t.entries.map(s=>T(s)?[r(s[0]),r(s[1])]:s));if(t.__type===x_&&h_(t))return new WeakMap;if(t.__type===w_&&h_(t))return new WeakSet;if(t.__type===__&&w(t.source))try{return new RegExp(t.source,w(t.flags)?t.flags:"")}catch{return t}if(e||(e=new WeakMap),e.has(t))return e.get(t);let o=!1;if(T(t)){let s=new Array(t.length);e.set(t,s);for(let i=0;i<t.length;i++)s[i]=Vs(t[i],e),s[i]!==t[i]&&(o=!0);return o||e.set(t,t),o?s:t}let n={};e.set(t,n);for(let s of Object.keys(t))n[s]=Vs(t[s],e),n[s]!==t[s]&&(o=!0);return o||e.set(t,t),o?n:t},g_=t=>{if(!t||typeof t!="object")return null;let e=t.__type;if(e!==__&&e!==y_&&e!==b_&&e!==x_&&e!==w_)return null;let r=Vs(t);return r===t?null:r},Ws=t=>{if(!t||typeof t!="object")return t;let e={},r=[];for(let i of Object.keys(t)){let a=t[i];w(a)&&Be(a)?r.push([i,a]):e[i]=Vs(a)}if(r.length===0)return e;let o=i=>/^[A-Za-z_$][\w$]*$/.test(i),n=r.filter(([i])=>o(i)),s=Object.keys(e).filter(o).map(i=>`var ${i} = __gs__[${JSON.stringify(i)}];`).join(`
15
- `);try{let i=n.map(([l,f])=>`var ${l} = (${f});`).join(`
16
- `),a="{ "+n.map(([l])=>`${JSON.stringify(l)}: ${l}`).join(", ")+" }",c=v.eval(`(function(__gs__) { ${s}
1
+ "use strict";var pE=Object.create;var Ec=Object.defineProperty;var hE=Object.getOwnPropertyDescriptor;var gE=Object.getOwnPropertyNames;var mE=Object.getPrototypeOf,yE=Object.prototype.hasOwnProperty;var j=(e,t)=>()=>(e&&(t=e(e=0)),t);var hd=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),I=(e,t)=>{for(var r in t)Ec(e,r,{get:t[r],enumerable:!0})},i_=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of gE(t))!yE.call(e,o)&&o!==r&&Ec(e,o,{get:()=>t[o],enumerable:!(n=hE(t,o))||n.enumerable});return e};var bE=(e,t,r)=>(r=e!=null?pE(mE(e)):{},i_(t||!e||!e.__esModule?Ec(r,"default",{value:e,enumerable:!0}):r,e)),_E=e=>i_(Ec({},"__esModule",{value:!0}),e);var Id,$d,C,ee,Fs=j(()=>{"use strict";Id=globalThis,$d=globalThis,C=globalThis,ee=C.document});var or,Ns,We,js=j(()=>{"use strict";Fs();or=e=>(typeof Node=="object"?e instanceof C.Node:e&&typeof e=="object"&&typeof e.nodeType=="number"&&typeof e.nodeName=="string")||!1,Ns=e=>(typeof HTMLElement=="object"?e instanceof C.HTMLElement:e&&typeof e=="object"&&e!==null&&e.nodeType===1&&typeof e.nodeName=="string")||!1,We=e=>typeof C<"u"&&(C.Node&&e instanceof C.Node||C.Window&&e instanceof C.Window||e===C||ee!==void 0&&e===ee)});var k,w,Bt,A,Nc,jc,O,Bc,N,ke,Ae,Bs,qe,Ld,Te=j(()=>{"use strict";js();k=e=>e===null?!1:typeof e=="object"&&e.constructor===Object,w=e=>typeof e=="string",Bt=e=>typeof e=="number",A=e=>typeof e=="function",Nc=e=>e===!0||e===!1,jc=e=>e===null,O=e=>Array.isArray(e),Bc=e=>e instanceof Date,N=e=>e===null?!1:typeof e=="object",ke=e=>e!==void 0,Ae=e=>e===void 0,Bs={boolean:Nc,array:O,object:k,string:w,date:Bc,number:Bt,null:jc,function:A,objectLike:N,node:or,htmlElement:Ns,defined:ke},qe=e=>(...t)=>t.some(r=>Bs[r](e)),Ld=e=>(...t)=>!t.some(r=>Bs[r](e))});var Md,Fd,Nd,jd,Zn,Us,Bd,Ud,Vs,Vd,zd,Hd,Wd,qd,Kd,Gd,Jn,zs,Qn=j(()=>{"use strict";sr();Te();Md=(e,t)=>t.every(r=>e.includes(r)),Fd=(e,t)=>{let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r},Nd=(e,t)=>{if(w(t)&&(t=parseInt(t)),Bt(t)){if(t<0||t>=e.length||isNaN(t))throw new Error("Invalid index");e.splice(t,1)}else throw new Error("Invalid index");return e},jd=(e,t,r)=>{t<0||r<0||t>=e.length||r>=e.length||([e[t],e[r]]=[e[r],e[t]])},Zn=(...e)=>[].concat(...e),Us=(e,t=[])=>e.reduce((r,n)=>ne(r,le(n,{exclude:t}),t),{}),Bd=(e,t)=>{let r=e.indexOf(t);return r!==-1?e.slice(0,r):e},Ud=(e,t)=>{if(!O(e))return;let r=e.indexOf(t);return r!==-1?e.slice(r+1):e},Vs=(e,t)=>{let r=e.indexOf(t);if(r>-1){let n=[...e];return n.splice(r,1),n}return e},Vd=(e,t)=>e.filter(r=>r!==t),zd=(e,t)=>{let r=[];for(let n=0;n<e.length;n++)r.push(e[n]),n<e.length-1&&r.push(t);return r},Hd=(e,t,r)=>{let n=[...e],o=n.indexOf(t),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},Wd=(e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},qd=(e,t)=>e.filter(r=>!t.includes(r)),Kd=(e,t)=>{let r=new Set(t);return e.filter(n=>!r.has(n))},Gd=(e,t)=>{if(!e)return 0;let r=0;for(let n=0;n<t.length;n++)e.includes(t[n])&&r++;return r},Jn=e=>O(e)?[...new Set(e)]:e,zs=(e,t)=>{for(let r in t)Object.defineProperty(e,r,{value:t[r],enumerable:!1,configurable:!0,writable:!0})}});function cn(e,t,r={}){let{bracketsLength:n=2}=r,o=n===3?"{{{":"{{";if(!e.includes(o))return e;let s=ME[n],i=t||this.state||{},a=this;return e.replace(s,(c,l,f,u)=>{let d=f.trim();if(u){let p=a?.context,g=p?.functions?.[u]||p?.utils?.[u]||p?.methods?.[u]||p?.snippets?.[u]||a?.[u];if(g&&typeof g=="function")try{return String(g.call(a,d)??"")}catch{return""}return""}if(l){let p=(l.match(/\.\.\//g)||[]).length,g=i;for(let m=0;m<p;m++){if(!g||!g.parent)return"";g=g.parent}if(d==="parent")return String(g.value??"");let h=Hs(g,d);return h!=null&&typeof h=="object"?"":String(h??"")}else{let p=Hs(i,d);if(p!=null&&typeof p!="object")return String(p);let g=a?.context?.polyglot;if(g?.translations){let h=i?.root?.lang||i?.lang||a?.context?.state?.lang||g.defaultLang||"en",m=g.translations[h];if(m){let b=Hs(m,d);if(b!=null&&typeof b!="object")return String(b);for(let y in m){let x=m[y];if(x&&typeof x=="object"&&!Array.isArray(x)){let S=Hs(x,d);if(S!=null&&typeof S!="object")return String(S)}}}let _=Hs(g.translations,d);if(_!=null&&typeof _!="object")return String(_)}return""}})}var Ws,Yd,ME,Hs,ln,Xd,FE,Zd,Jd,Qd,NE,ep,tp,qs=j(()=>{"use strict";Ws=(e,t)=>{for(let r of t)if(e.includes(r))return!0;return!1},Yd=(e,t)=>{let r=new RegExp(`[${t.join("\\")}]`,"g");return e.replace(r,"")},ME={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},Hs=(e,t)=>t.split(".").reduce((r,n)=>r?.[n],e);ln=e=>`${e.charAt(0).toLowerCase()}${e.slice(1)}`,Xd=(e,t)=>{let r=e.split(`
2
+ `),n=-1,o=-1,s=-1,i=-1,a=new RegExp(`\\b${t}\\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(t)+1,r[f].includes("{}")){o=n,i=r[f].indexOf("{}")+3;break}let u=r[f].slice(s+t.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}},FE=/\\([0-7]{1,3})/g,Zd=e=>e.replace(FE,(t,r)=>String.fromCharCode(parseInt(r,8))),Jd=e=>e.replace(/\n/g,"/////n").replace(/`/g,"/////tilde").replace(/\$/g,"/////dlrsgn"),Qd=e=>e.replace(/\/\/\/\/\/n/g,`
3
+ `).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),NE=/[^a-zA-Z0-9\s]/g,ep=e=>e.replace(NE,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase()),tp=e=>e.replace(/%[0-9A-Fa-f]{2}/g,t=>String.fromCharCode(parseInt(t.slice(1),16)))});var kr,Ks,rp,fn,vr,eo,Gs,np,to=j(()=>{"use strict";kr=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"]),Ks=new Set(["attr","style","text","html","content","data","class","state","scope","children","props","if","key","tag","query","on","context"]),rp=["ref","parent","__element","__depends","__ref","__children","root"],fn=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"]),vr=new Set(["update","__element"]),eo=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"]),Gs=new Set(["node","context","extends","__element","__ref",...eo,...fn,...vr]),np=new Set(["init","beforeClassAssign","render","renderRouter","attachNode","stateInit","stateCreated","beforeStateUpdate","stateUpdate","beforeUpdate","done","create","complete","frame","update","fetchError","fetchComplete"])});var __,un,fe,op,pe,ne,v_,sp,le,Xs,jE,BE,x_,Zs,UE,VE,zE,Ut,HE,WE,w_,pt,C_,E_,A_,T_,O_,S_,Ys,k_,Js,ip,ap,Uc,cp,lp,Qs,dn,Ke,Vc,qE,fp,up,zc,dp,pp,hp,gp,mp,yp,bp,sr=j(()=>{"use strict";Fs();Te();Qn();qs();js();to();__="production",un=e=>e.charCodeAt(0)===95&&e.charCodeAt(1)===95,fe=(e,t,r,n)=>{if(A(e))return t?typeof e.call!="function"?e:e.call(t,t,r||t.state,n||t.context):void 0;if(e!=null&&t?.context?.plugins&&(O(e)||k(e)&&!We(e))){let o=t.context.plugins;for(let s of o)if(s.resolveHandler){let i=s.resolveHandler(e,t);if(typeof i=="function")return fe(i,t,r,n)}}return e},op=(e,t,r)=>{for(let n in t)e[n]=fe(t[n],r)},pe=(e,t,r=[])=>{let n=r instanceof Set;for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(un(o)||(n?r.has(o):r.includes(o))||e[o]===void 0&&(e[o]=t[o]));return e},ne=(e,t,r=Gs)=>v_(e,t,r,null),v_=(e,t,r,n)=>{if(e===t)return e;if(n){for(let s=0;s<n.length;s+=2)if(n[s]===e&&n[s+1]===t)return e}let o=r instanceof Set;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||un(s)||s==="constructor"||s==="prototype"||(o?r.has(s):r.includes(s)))continue;let i=e[s],a=t[s];if(N(i)&&N(a)){let c=n||[];c.push(e,t),v_(i,a,r,c),c.length-=2}else i===void 0&&(e[s]=a)}return e},sp=(e,t=[])=>{let r=t instanceof Set,n={};for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(un(o)||(r?t.has(o):t.includes(o))||(n[o]=e[o]));return n},le=(e,t={})=>{let{exclude:r=[],cleanUndefined:n=!1,cleanNull:o=!1,visited:s=new WeakMap,handleExtends:i=!1}=t;if(!N(e)||We(e))return e;if(s.has(e))return s.get(e);let a=r instanceof Set?r:r.length>3?new Set(r):null,c=u=>a?a.has(u):r.includes(u),l=O(e)?[]:{};s.set(e,l);let f=[[e,l]];for(;f.length;){let[u,d]=f.pop();for(let p in u){if(!Object.prototype.hasOwnProperty.call(u,p)||un(p)||p==="__proto__"||c(p))continue;let g=u[p];if(!(n&&g===void 0)&&!(o&&g===null)){if(We(g)){d[p]=g;continue}if(i&&p==="extends"&&O(g)){d[p]=Us(g,r);continue}if(A(g)){d[p]=g;continue}if(N(g))if(s.has(g))d[p]=s.get(g);else{let h=O(g)?[]:{};s.set(g,h),d[p]=h,f.push([g,h])}else d[p]=g}}}return l},Xs=(e,t={})=>{(e.node||e.__ref||e.parent||e.__element||e.parse)&&((e.__element||e.parent?.__element).warn("Trying to clone element or state at",e),e=e.parse?.());for(let r in e){let n=e[r];if(A(n))t[r]=n.toString();else if(k(n))t[r]={},Xs(n,t[r]);else if(O(n)){let o=t[r]=[];for(let s=0;s<n.length;s++){let i=n[s];k(i)?(o[s]={},Xs(i,o[s])):A(i)?o[s]=i.toString():o[s]=i}}else t[r]=n}return t},jE=/^[A-Za-z_$][A-Za-z0-9_$]*$/,BE=e=>`'${String(e).replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\r/g,"\\r").replace(/\n/g,"\\n")}'`,x_=e=>{let t=String(e);return Ws(t,[`
4
+ `,"'"])?"`"+t.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")+"`":"'"+t.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\r/g,"\\r")+"'"},Zs=(e={},t=0)=>{if(e===null||typeof e!="object"||e instanceof RegExp)return String(e);let r=!1;for(let s in e){r=!0;break}if(!r)return"{}";let n=" ".repeat(t),o=`{
5
+ `;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;let i=e[s],a=jE.test(s)?s:BE(s);if(o+=`${n} ${a}: `,i instanceof RegExp)o+=String(i);else if(O(i)){o+=`[
6
+ `;for(let c of i)c instanceof RegExp?o+=`${n} ${String(c)},
7
+ `:N(c)&&c!==null?o+=`${n} ${Zs(c,t+2)},
8
+ `:w(c)?o+=`${n} ${x_(c)},
9
+ `:o+=`${n} ${c},
10
+ `;o+=`${n} ]`}else N(i)?o+=Zs(i,t+1):w(i)?o+=x_(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]*\}$/],VE=/^["[{]/,zE=/^(export|import)\s/,Ut=e=>{if(!e)return!1;let t=e.trim().replace(/\n\s*/g," ").trim();if(t===""||t==="{}"||t==="[]"||zE.test(t)||!UE.some(s=>s.test(t)))return!1;let n=t.charCodeAt(0),o=t.includes("=>");return!(n===123&&!o||n===91||VE.test(t)&&!o)},HE=e=>(0,eval)(e),WE=(e,t)=>{let r=/^(\s*(?:async\s+)?function\s*[\w$]*\s*\([^)]*\)\s*)\{/.exec(e);if(!r)return null;let n=r[0].length,o=[],s=n,i=1,a=null,c=e.length,l=new RegExp("^(?:const|let|var)\\s+"+t+"\\b");for(;s<c&&i>0;){let u=e[s];if(u==="/"&&e[s+1]==="/"){let d=e.indexOf(`
12
+ `,s);s=d===-1?c:d;continue}if(u==="/"&&e[s+1]==="*"){let d=e.indexOf("*/",s+2);s=d===-1?c:d+2;continue}if(u==='"'||u==="'"||u==="`"){let d=u;for(s++;s<c;){if(e[s]==="\\"){s+=2;continue}if(e[s]===d){s++;break}if(d==="`"&&e[s]==="$"&&e[s+1]==="{"){s+=2;let p=1;for(;s<c&&p>0;)e[s]==="{"?p++:e[s]==="}"&&p--,s++;continue}s++}continue}if(u==="{"){i++,s++;continue}if(u==="}"){i--,s++;continue}if(i===1&&l.test(e.slice(s))){let d=s,p=0,g=s;for(;g<c;){let h=e[g];if(h==='"'||h==="'"||h==="`"){let m=h;for(g++;g<c;){if(e[g]==="\\"){g+=2;continue}if(e[g]===m){g++;break}g++}continue}if(h==="("||h==="["||h==="{"){p++,g++;continue}if(h===")"||h==="]"||h==="}"){if(p===0)break;p--,g++;continue}if(p===0&&(h===";"||h===`
13
+ `)){g++;break}g++}o.push([d,g]),s=g;continue}s++}if(!o.length)return null;let f=e;for(let u=o.length-1;u>=0;u--)f=f.slice(0,o[u][0])+f.slice(o[u][1]);return f},w_=(e,t,r)=>{let n=String(e).trimStart();if(/^(export|import)\s/.test(n))return e;try{return r.window.eval(`(${e})`)}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(e).trim();if(/^function[\s(]/.test(l))try{c=r.window.eval("(async "+l+")")}catch{}}else if(a){let l=String(e),f=a[1];for(let u=0;u<5;u++){let d=WE(l,f);if(!d||d===l)break;l=d;try{c=r.window.eval("("+l+")");break}catch(p){let g=/Identifier '([^']+)' has already been declared/.exec(p&&p.message||String(p));if(!g||g[1]!==f)break}}}if(!c&&/Unexpected (token '\{'|identifier)/.test(s))try{let l=r.window.eval("({"+e+"})");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 ${t} \u2014 value will be left as a string. Reason: `+s+`.
14
+ First 200 chars of source: `+String(e).slice(0,200)),e)}},pt=(e,t={},r={window:{eval:HE}})=>{if(!e||typeof e!="object")return t;let n=[[e,t]];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(w(a))Ut(a)?s[i]=w_(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(w(f))c.push(Ut(f)?w_(f,`array index ${l} (prop "${i}")`,r):f);else if(k(f)){let u=k_(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=k_(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 t},C_="Set",E_="Map",A_="RegExp",T_="WeakMap",O_="WeakSet",S_=e=>{let t=Object.keys(e);return t.length===1&&t[0]==="__type"},Ys=(e,t)=>{if(!e||typeof e!="object")return e;let r=s=>Ys(s,t||(t=new WeakMap));if(e.__type===C_&&O(e.values))return new Set(e.values.map(r));if(e.__type===E_&&O(e.entries))return new Map(e.entries.map(s=>O(s)?[r(s[0]),r(s[1])]:s));if(e.__type===T_&&S_(e))return new WeakMap;if(e.__type===O_&&S_(e))return new WeakSet;if(e.__type===A_&&w(e.source))try{return new RegExp(e.source,w(e.flags)?e.flags:"")}catch{return e}if(t||(t=new WeakMap),t.has(e))return t.get(e);let n=!1;if(O(e)){let s=new Array(e.length);t.set(e,s);for(let i=0;i<e.length;i++)s[i]=Ys(e[i],t),s[i]!==e[i]&&(n=!0);return n||t.set(e,e),n?s:e}let o={};t.set(e,o);for(let s of Object.keys(e))o[s]=Ys(e[s],t),o[s]!==e[s]&&(n=!0);return n||t.set(e,e),n?o:e},k_=e=>{if(!e||typeof e!="object")return null;let t=e.__type;if(t!==A_&&t!==C_&&t!==E_&&t!==T_&&t!==O_)return null;let r=Ys(e);return r===e?null:r},Js=e=>{if(!e||typeof e!="object")return e;let t={},r=[];for(let i of Object.keys(e)){let a=e[i];w(a)&&Ut(a)?r.push([i,a]):t[i]=Ys(a)}if(r.length===0)return t;let n=i=>/^[A-Za-z_$][\w$]*$/.test(i),o=r.filter(([i])=>n(i)),s=Object.keys(t).filter(n).map(i=>`var ${i} = __gs__[${JSON.stringify(i)}];`).join(`
15
+ `);try{let i=o.map(([l,f])=>`var ${l} = (${f});`).join(`
16
+ `),a="{ "+o.map(([l])=>`${JSON.stringify(l)}: ${l}`).join(", ")+" }",c=C.eval(`(function(__gs__) { ${s}
17
17
  ${i}
18
- return ${a}; })`)(e);Object.assign(e,c)}catch{for(let[a,c]of n)try{let l=Object.keys(e).filter(o).map(f=>`var ${f} = __gs__[${JSON.stringify(f)}];`).join(`
19
- `);e[a]=v.eval(`(function(__gs__) { ${l}
20
- return (${c}); })`)(e)}catch{try{e[a]=v.eval(`(${c})`)}catch{e[a]=c}}}for(let[i,a]of r)if(!o(i))try{e[i]=v.eval(`(${a})`)}catch{e[i]=a}return e},tp=(t,e={verbose:!0})=>{try{return t?v.eval("("+t+")"):{}}catch(r){e.verbose&&console.warn(r)}},ep=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),Nc=t=>{for(let e in t)return!1;return!0},rp=t=>S(t)&&Nc(t),op=()=>Object.create(null),qs=(t,e,r={})=>{let o=r.exclude||[],n=r.preventUnderscore;for(let s in e)o.includes(s)||!n&&ao(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},co=(t,e,r=[])=>{let o=r instanceof Set;for(let n in e)ao(n)||n==="constructor"||n==="prototype"||(o?r.has(n):r.includes(n))||(t[n]=e[n]);return t},qt=(t,e,r={},o=new WeakMap)=>{if(!H(t)||!H(e)||Ht(t)||Ht(e))return e;if(o.has(t))return o.get(t);o.set(t,t);let n=r.exclude,s=n?n instanceof Set?n:new Set(n):null,i=!r.preventForce;for(let a in e){if(!Object.prototype.hasOwnProperty.call(e,a)||s&&s.has(a)||i&&ao(a)||a==="constructor"||a==="prototype")continue;let c=t[a],l=e[a];Ht(l)?t[a]=l:H(c)&&H(l)?t[a]=qt(c,l,r,o):l!==void 0&&(t[a]=l)}return t},jc=(t,e,r=new Set)=>{if(typeof t!="object"||typeof e!="object"||t===null||e===null)return t===e;if(r.has(t)||r.has(e))return!0;r.add(t),r.add(e);let o=Object.keys(t),n=Object.keys(e);if(o.length!==n.length)return!1;for(let s=0;s<o.length;s++){let i=o[s];if(!Object.prototype.hasOwnProperty.call(e,i)||!jc(t[i],e[i],r))return!1}return!0},TE=new Set(["node","__ref"]),np=(t,e,r=TE)=>{if(t===e)return!0;if(!H(t)||!H(e)||Ht(t)||Ht(e))return t===e;let o=r instanceof Set?r:new Set(r),n=new WeakSet;function s(i,a){if(n.has(a))return!0;n.add(a);for(let c in a){if(!Object.prototype.hasOwnProperty.call(a,c)||o.has(c))continue;if(!Object.prototype.hasOwnProperty.call(i,c))return!1;let l=a[c],f=i[c];if(Ht(l)||Ht(f)){if(l!==f)return!1}else if(H(l)&&H(f)){if(!s(f,l))return!1}else if(l!==f)return!1}return!0}return s(t,e)},sp=(t,e)=>{if(e==null)return t;if(Wt(e)("string","number"))delete t[e];else if(T(e))for(let r=0;r<e.length;r++)delete t[e[r]];else throw new Error("Invalid input: props must be a string or an array of strings");return t},Bc=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]=Bc(t[r]));return e},ip=(t,e)=>{if(t.length===0)return e;let r={},o=r;for(let n=0;n<t.length;n++)n===t.length-1&&e?o[t[n]]=e:(o[t[n]]={},o=o[t[n]]);return r},ap=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let n=0;n<e.length-1;n++){if(r[e[n]]===void 0)return;r=r[e[n]]}let o=e[e.length-1];r&&Object.prototype.hasOwnProperty.call(r,o)&&delete r[o]},cp=(t,e,r)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let o=t;for(let n=0;n<e.length-1;n++)(!o[e[n]]||typeof o[e[n]]!="object")&&(o[e[n]]={}),o=o[e[n]];return o[e[e.length-1]]=r,t},lp=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let o=0;o<e.length;o++){if(r==null)return;r=r[e[o]]}return r},fp=t=>{let r=[],o=0;for(let n=0;n<t.length;n++)if(r.length<2)r.push(t[n]);else if(t[n]===r[n%2]?o++:(r=[t[n-1],t[n]],o=1),o>=20)return(d_==="test"||d_==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",r),!0},up=t=>{let e=new WeakSet;function r(o){if(o&&typeof o=="object"){if(e.has(o))return!0;e.add(o);for(let n in o)if(Object.prototype.hasOwnProperty.call(o,n)&&r(o[n]))return console.log(o,"cycle at "+n),!0}return!1}return r(t)},dp=(t,e)=>{let r=e instanceof Set?e:new Set(e),o={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&!r.has(n)&&(o[n]=t[n]);return o}});var Ks,Gs,Ys,Uc=j(()=>{"use strict";nr();Ks=(function(){let t=0;function e(){return t++,t}return e})(),Gs=Ks,Ys=(t,e,r)=>(ft(r,t)||r||t.key||Ks()).toString()});var Ce,pp,kr,Vc,hp,gp,mp,vr,yp,lo,It,bp=j(()=>{"use strict";Ce="production",pp=Ce,kr=(t=Ce)=>t==="production",Vc=(t=Ce)=>t==="testing"||t==="test",hp=Vc,gp=(t=Ce)=>t==="staging",mp=(t=Ce)=>t==="local",vr=(t=Ce)=>t==="development"||t==="dev"||t==="local",yp=(t,e=Ce)=>e[t],lo=(t=Ce)=>!kr(t),It=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 Xs(t,e,r){let o;return function(){let n=this,s=arguments,i=function(){o=null,r||t.apply(n,s)},a=r&&!o;clearTimeout(o),o=setTimeout(i,e),a&&t.apply(n,s)}}function Sp(t,e=window){let r=function(){return t.apply(e,arguments)};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r}var _p,xp,OE,wp,tn,en,Et,rn=j(()=>{"use strict";_p=(t,e,r=300)=>{let o;return(...n)=>{clearTimeout(o),o=setTimeout(()=>{e.apply(t,n)},r)}},xp=t=>{let e={};return(...r)=>{let o=r[0];if(o in e)return e[o];{let n=t(o);return e[o]=n,n}}},OE=/^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/,wp=t=>OE.test(t),tn=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let r of e)if(r.resolveHandler)return!0;return!1},en=(t,e)=>{if(typeof t=="function")return t;let r=e?.context?.plugins;if(!r)return t;for(let o of r)if(o.resolveHandler){let n=o.resolveHandler(t,e);if(typeof n=="function")return n}return t},Et=(t,e,...r)=>{let o=e?.context?.plugins;if(!o)return!1;let n=!1;for(let s of o)typeof s[t]=="function"&&(s[t](e,...r),n=!0);return n}});var kp,S_=j(()=>{"use strict";Tt();nr();kp=(t,e)=>{let{__ref:r}=t,o=t.if;if(A(o)){let n;try{n=o(t,t.state,t.context)}catch(s){typeof console<"u"&&console.warn("[DOMQL] if condition error:",s),delete r.__if;return}n?r.__if=!0:delete r.__if}else o!=null&&typeof o=="object"?ft(o,t)?r.__if=!0:delete r.__if:r.__if=!0}});var vp,Cp,k_=j(()=>{"use strict";vp=(t,...e)=>{t&&e.map(r=>console.log(r))},Cp=(t,e,...r)=>{t&&(console.group(e),r.map(o=>console.log(o)),console.groupEnd(e))}});function Rp(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 Pp(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 Ep,Ap,Tp,Op,v_=j(()=>{"use strict";Tt();Rs();Ep=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),Ap=(t,e,r=365)=>{if(At(tt)||At(tt.cookie))return;let o=new Date;o.setTime(o.getTime()+r*24*60*60*1e3);let n=`expires=${o.toUTCString()}`;tt.cookie=`${t}=${e};${n};path=/`},Tp=t=>{if(At(tt)||At(tt.cookie))return;let e=`${t}=`,o=decodeURIComponent(tt.cookie).split(";");for(let n=0;n<o.length;n++){let s=o[n];for(;s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return""},Op=t=>{At(tt)||At(tt.cookie)||(tt.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var on,C_,Ip,Dp=j(()=>{"use strict";on={root:["body","html"],head:["title","base","meta","style","noscript","script"],body:new Set(["string","style","fragment","a","abbr","acronym","address","applet","area","article","aside","audio","b","basefont","bdi","bdo","big","blockquote","br","button","canvas","caption","center","cite","code","search","col","colgroup","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","hgroup","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","template","hgroup","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr","svg","path","circle","ellipse","line","polygon","polyline","rect","g","defs","symbol","use","text","tspan","image","clipPath","mask","pattern","marker","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","feBlend","feColorMatrix","feFlood","feComposite","foreignObject"])},C_=new Set(["svg","path","circle","ellipse","line","polygon","polyline","rect","g","defs","symbol","use","text","tspan","image","clipPath","mask","pattern","marker","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","feBlend","feColorMatrix","feFlood","feComposite","foreignObject"]),Ip=t=>on.body.has(t)});var $p,E_,nn,pe,sn,Qs,Ue,Lp,zc,ti,Mp,ei,Hc,Wc,ri,qc,an,RE,Ve,A_,Zs,oi,Fp,Js,Np,jp,Kc,Gc,Yc,Xc,Zc,Jc,T_,Qc=j(()=>{"use strict";Zo();Bp();nr();Tt();$p="production",E_=t=>t.sourcemap!==!1&&$p!=="production",nn=t=>{if(!t)return[];let e=[],r=t.extends;r&&(T(r)?e.push(...r):e.push(r));let o=t.extend;return o&&(T(o)?e.push(...o):e.push(o)),e},pe=t=>{if(!T(t))return t;let e=[];for(let r=t.length-1;r>=0;r--){let o=t[r];e.push(T(o)?pe(o):o)}return e},sn=t=>{if(t.includes("+"))return t.split("+").filter(ze);if(t.includes("_")){let[e]=t.split("_");return[e]}if(t.includes(".")&&!ze(t.split(".")[1])){let[e]=t.split(".");return[e]}return[t]},Qs=(t,e,r)=>{let o=[],n=sn(r);n&&(o=[...n]);let s=pe(nn(t));return s.length&&(o=[...o,...s]),o},Ue=(t,e)=>{let{__ref:r}=e,{__extends:o}=r;if(!t)return o;let n=e.variant,s=e.context;if(n&&s?.components&&!Array.isArray(t)&&typeof t=="string"){let i=`${t}.${n}`;s.components[i]&&(t=i)}return o.includes(t)||(o=Array.isArray(t)?[...o,...t]:[...o,t],r.__extends=o),o},Lp=(t,e)=>{if(!t)return e;let{extends:r}=e,o=T(r)?r:[r],n=T(t)?t:[t];return{...e,extends:Yo(n,o)}},zc=()=>Math.random().toString(36).substring(2),ti={},Mp={},ei=t=>ti[t.__hash],Hc=(t,e)=>{let r=zc();return w(t)||(t.__hash=r),r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(ti[r]=e),e},Wc=(t,e)=>t.__hash?e.concat(ei(t)):Hc(t,e),ri=(t,e,r,o=new Set,n,s)=>{for(let i of t)T(i)?ri(i,e,r,o,n,s):an(i,e,r,o,n,void 0,s);return e},qc=(t,e,r,o=new Set,n,s,i)=>{let a=nn(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),n&&n.push(s)),a.length&&an(pe(a),e,r,o,n,s,i),e},an=(t,e,r,o=new Set,n,s,i)=>{if(!t||o.has(t))return e;if(T(t))return ri(t,e,r,o,n,i);let a=s;return w(t)?(a=t,t=oi(t,r)):i&&S(t)&&i.has(t)&&(a=i.get(t)),o.has(t)||(o.add(t),t?.extends||t?.extend?qc(t,e,r,o,n,a,i):t&&(e.push(t),n&&n.push(a))),e},RE=new Set(["parent","node","__ref","__proto__","extends","extend","childExtends","childExtendsRecursive"]),Ve=(t,e,r,o,n)=>{e=lt(e);for(let s in e){if(RE.has(s))continue;let i=t[s],a=e[s];if(a!==void 0&&Object.prototype.hasOwnProperty.call(e,s)&&s!=="__proto__"&&s!=="constructor"&&s!=="prototype"){if(i===void 0)t[s]=a,r&&o?S(a)&&!T(a)?(r[s]=r[s]||{},A_(r[s],a,o)):r[s]=o:r&&n?.[s]&&(r[s]=n[s]);else if(S(i)&&S(a)){let c=r?r[s]=r[s]||{}:void 0,l=n?.[s];ze(s)?t[s]=Ve(i,a,c,o,l):Ve(i,a,c,o,l)}if(s==="extends"||s==="childExtends"||s==="childExtendsRecursive"){if(T(i)&&T(a))t[s]=i.concat(a);else if(T(i)&&S(a)){let c=Ve({},i);t[s]=Ve(c,a)}}}}return t},A_=(t,e,r,o)=>{if(o||(o=new WeakSet),!o.has(e)){o.add(e);for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n)||n==="__proto__"||n==="constructor"||n==="prototype")continue;let s=e[n];S(s)&&!T(s)?(t[n]=t[n]||{},A_(t[n],s,r,o)):t[n]=r}}},Zs=(t,e,r)=>t.reduce((o,n,s)=>{let i=lt(n),a=r?r[s]:void 0;return Ve(o,i,e,a)},{}),oi=(t,e,r={},o)=>{let n=e?.components||r.components,s=e?.pages||r.pages;if(w(t)){let i=n&&(n[t+"."+o]||n[t]||n["smbls."+t]),a=s&&t.charCodeAt(0)===47&&s[t];if(i)return i;if(a)return a;r.verbose&&($p==="test"||$p==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},Fp=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),Js=(t,e,r,o)=>{if(!t)return[];if(t.__hash)return ei(t)||[];let s=an(t,[],e,new Set,r,void 0,o);return r?s:Wc(t,s)},Np=(t,e)=>{if(!t)return e;let r=T(t)?t:[t];return Yo(r,e)},jp=t=>{let e=[];function r(o){for(let n in o)Object.prototype.hasOwnProperty.call(o,n)&&(ze(n)&&e.push(n),n==="extends"&&(typeof o[n]=="string"?e.push(o[n]):Array.isArray(o[n])&&(e=e.concat(o[n]))),typeof o[n]=="object"&&o[n]!==null&&r(o[n]))}return r(t),e},Kc=(t,e,r={})=>{let{__ref:o}=t,n=t.context||e.context,s=t.variant,i=nn(t);if(i.length){let a=pe(i),[c,...l]=a,f=typeof c=="string"&&s&&n?.components?`${c}.${s}`:null;f&&n.components[f]?Ue([f,...l],t):Ue(a,t)}return Gc(t,e,r),Yc(t,e,r),Xc(t,e,r),t.component&&Ue(pe(ft(t.component,t)),t),n.defaultExtends&&Ue(pe(n.defaultExtends),t),Xo(o.__extends)},Gc=(t,e,r={})=>{let{__ref:o}=t;return r.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&Ue(pe(e.childProps.extends),t),o.__extends},Yc=(t,e,r={})=>{let{__ref:o}=t,n=r.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!n&&s&&Ue(pe(s),t),o.__extends},Xc=(t,e,r={})=>{let{__ref:o}=t,n=e.childExtendsRecursive,s=r.ignoreChildExtendsRecursive||t.ignoreChildExtendsRecursive,i=t.key==="__text";return n&&!i&&!s&&Ue(pe(n),t),o.__extends},Zc=(t,e,r={})=>{let{__ref:o}=t,n=t.context||e.context,s=t.variant,i=E_(r),a=i?[...o.__extends]:null,c=Xo(o.__extends.map((l,f)=>oi(l,n,r,f===0&&s)));if(i){let l=new WeakMap;for(let d=0;d<c.length;d++){let h=c[d],g=a[d];h&&S(h)&&w(g)&&l.set(h,g)}let f=[],u=Js(c,n,f,l);o.__extendsStack=u,o.__extendsNames=f}else{let l=Js(c,n);o.__extendsStack=l}return o.__extendsStack},Jc=(t,e,r={})=>{let{__ref:o}=t,{__extendsStack:n}=o;if(E_(r)){let s={},i=o.__extendsNames||[],a=Zs(n,s,i),c={};Ve(t,a,c,void 0,s),o.__sourcemap=c}else{let s=Zs(n);Ve(t,s)}return t},T_=(t,e,r={})=>(Kc(t,e,r),Zc(t,e,r),Jc(t,e,r),t)});function Up(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function Vp(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function zp(t,e,r){let{context:o}=e||{},[n]=sn(r),s=r||n;return o?.components?.[s]||o?.pages?.[s]}var ze,Bp=j(()=>{"use strict";Qc();Tt();ze=t=>{if(!w(t)||!t.length)return!1;let e=t.charCodeAt(0);return e>=65&&e<=90}});function O_(t,e){let{props:r,on:o}=e,n=so(t.split("on")[1]),s=o[n],i=r[t];A(s)?o[n]=(...a)=>{if(s(...a)!==!1&&A(i))return i(...a)}:o[n]=i}var R_=j(()=>{"use strict";js();Tt()});function tl(t,e={}){let r=e.cachedKeys||[];for(let o in t){let n=t[o];if(o.length>2&&o.charCodeAt(0)===111&&o.charCodeAt(1)===110&&o[2]===o[2].toUpperCase()&&(A(n)||n!=null&&tn(this.context))){let g=so(o.slice(2));t.on&&(t.on[g]=n),delete t[o];continue}if(o==="childProps"){t.props[o]=n,delete t[o],r.push(o);continue}let a=this.define?.[o],c=this.context?.define?.[o],l=S(a)||A(a),f=S(c)||A(c);if(l||f)continue;let u=o.charAt(0);if(I_.has(u)){t.props[o]=n,delete t[o],r.push(o);continue}let d=Hp.test(o)||P_.test(o)||IE(n),h=wr.has(o);!d&&!h&&(o in t.props||(t.props[o]=n),delete t[o],r.push(o))}return t}function el(t=this,e){let r=e.cachedKeys||[];for(let o in t.props){let n=t.props[o],s=o.length>2&&o.charCodeAt(0)===111&&o.charCodeAt(1)===110,i=A(n)||n!=null&&tn(this.context);if(s&&i){O_(o,t),delete t.props[o];continue}if(r.includes(o)||o==="childProps")continue;let a=o.charAt(0);if(I_.has(a))continue;let c=this.define?.[o],l=this.context?.define?.[o],f=S(c)||A(c),u=S(l)||A(l),d=Hp.test(o)||P_.test(o),h=wr.has(o);(d||h||f||u)&&(t[o]===void 0||n===null)&&(t[o]=n,t.props&&delete t.props[o])}return t}function rl(t=this){let e=[];return tl.call(this,t,{cachedKeys:e}),el.call(this,t,{cachedKeys:e}),t}function Wp(t={}){return t.on||(t.on={}),t.props||(t.props={}),rl.call(this,t)}function Kp(t,e){this.__element.update({props:t},e)}function ci(t){let e={update:Kp.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var Hp,P_,I_,PE,IE,ii,ni,qp,ai,li,fi,ol,si,Gp,Yp,Xp=j(()=>{"use strict";Qo();R_();nr();Tt();js();rn();Hp=/^[A-Z]/,P_=/^\d+$/,I_=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),PE=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),IE=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if(PE.has(e)||Hp.test(e))return!0;return!1},ii=(t,e,r)=>{let{props:o,__ref:n}=t;if(n.__propsStack=[],o)n.__initialProps=o;else return{};return H(o)?{...o}:(n.__propsStack.push(o),{})};ni=t=>Wt(t)("string","number")?{inheritedString:t}:t,qp=(t,e)=>!t||!e.length?!1:e.includes(t),ai=(t,e)=>{let{__ref:r}=t,o=r.__propsStack||[],n=e.props;if(!n)return o;let s=n[t.key],i=n.childProps||e.childProps,a=t.props?.ignoreChildProps;if(i&&!a){let c=ni(i);o.unshift(c)}if(s){let c=ni(s);o.unshift(c)}return o};li=t=>{let e=new Set;return t.filter(r=>!r||Sr.has(r)||e.has(r)?!1:(e.add(r),!0))},fi=(t,e,r)=>(e.props=t.reduce((o,n)=>{if(Sr.has(n))return o;for(;A(n);)n=ft(n,e);return st(o,lt(n,{exclude:Sr}))},{}),ci(e),e.props),ol=(t,e)=>{let{props:r,__ref:o}=t,n=o.__propsStack||[];if(e?.props&&(n=[...ai(t,e)]),S(r)?n.push(r):r==="inherit"&&e?.props?n.push(e.props):r&&n.push(r),T(o.__extendsStack))for(let s=0;s<o.__extendsStack.length;s++){let i=o.__extendsStack[s];i.props&&i.props!==r&&n.push(i.props)}return o.__propsStack=li(n),o.__propsStack},si=(t,e)=>{let{__ref:r}=t,o=ol(t,e);o.length?fi(o,t):(r.__propsStack=[],t.props={})},Gp=function(t,e,r){let{__ref:o}=t;if(o.__if)si(t,e);else try{si(t,e)}catch(n){t.context?.designSystem?.verbose&&console.warn("initProps error at",o.path?.join("."),n),t.props={},o.__propsStack=[]}return ci(t),t},Yp=(t,e,r)=>{let{__ref:o}=e,s=[...o.__propsStack||[]],i=ai(e,r);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),o.__propsStack=li(s),o.__propsStack.length&&fi(o.__propsStack,e),e}});var D_,nl,sl,il,al,Zp,cl,ll,fl,Jp,$_=j(()=>{"use strict";Qc();Uc();Is();Xp();Dp();Tt();D_="production",nl=(t,e,r)=>{let o=e.childExtends&&e.childExtends.tag,n=e.childProps&&e.childProps.tag,s=on.body.has(r)&&r;return{text:t,tag:o||n||s||"string"}},sl=(t,e,r)=>{if(t===void 0)return(D_==="test"||D_==="development")&&console.warn(r,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:Wt(t)("string","number")?nl(t,e,r):A(t)?{props:t}:t},il=(t,e)=>{let r={};return r.origin=t,r.parent=e,r},al=(t,e,r,o,n)=>{if(!e)return n;if(or(e)){let s={key:":root",node:e};return n[`${r}_parent`]=s,s}return e},Zp=(t,e)=>{let{__ref:r}=t,{__ref:o}=e,n=e&&e.key===":root";r?.root||(r.root=n?t:o?.root)},cl=(t,e,r)=>{let{__ref:o}=e;return o||(o=e.ref={}),o.path||(o.path=[]),o.path.concat(r)},ll=(t,e,r,o,n)=>(o.context&&!n.context&&!t.context&&(n.context=o.context),o.context||e.context||n.context||t.context),fl=(t,e,r)=>{let o=il(t,e);return t.__ref=o,o.__defineCache||(o.__defineCache={}),o.__exec||(o.__exec={}),o.__execProps||(o.__execProps={}),o.__class||(o.__class={}),o.__classNames||(o.__classNames={}),o.__attr||(o.__attr={}),o.__changes||(o.__changes=[]),o.__children||(o.__children=[]),o.__extends=Qs(t,e,r),o.path=cl(t,e,r),o},Jp=(t,e,r,o,n)=>{let i=t?.__hash?{extends:[t]}:sl(t,e,r);if(!i)return;let a=al(i,e,r,o,n),c=Ys(i,a,r);fl(i,a,c);let l=ii(i,a,c),f=ll(i,a,c,o,n),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var Qp,ul,dl,pl,hl,th,gl,eh,rh,oh,nh,L_,ui,sr,He,M_=j(()=>{"use strict";Zo();Qo();nr();Tt();Qp=t=>{let{state:e,props:r,__ref:o}=t,n=r?.state||e;return Wt(n)("string","number")?(o.__state=n,{value:n}):n===!0?(o.__state=t.key,{}):n?(o.__hasRootState=!0,n):!1},ul=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},dl=(t,e)=>{if(!t.includes("../"))return;let o=t.split("../").length-1;for(let n=0;n<o;n++){if(!e.parent)return null;e=e.parent}return e},pl=(t,e,r={})=>{let o=w(t)?t.split("/"):[t],n=o.length-1;for(let s=0;s<n;s++){let i=o[s],a=o[s+1];if(i==="__proto__"||a==="__proto__")return;let c=e[i];c||(c=e[i]={}),c[a]||(c[a]={}),t=a,e=c}return r.returnParent?e:e[t]},hl=(t,e,r={})=>{let n=t.__ref.__state;if(!gl(t))return;let s=ul(n,e.state),i=e.state;if(s)i=s,n=n.replaceAll("~/","");else{let a=dl(n,e.state);a&&(i=a,n=n.replaceAll("../",""))}if(i)return pl(n,i,r)},th=(t,e)=>{let r=t.__ref,o=hl(t,e);if(o===void 0)return t.state;if(Wt(o)("object","array"))return lt(o);if(Wt(o)("string","number","boolean"))return r.__stateType=typeof o,{value:o};console.warn(r.__state,"is not present. Replacing with",{})},gl=t=>{let{__ref:e}=t,r=e?.__state;return!!(r&&Wt(r)("number","string","boolean"))},eh=function(t){return H(t)?!!(t.update&&t.parse&&t.clean&&t.create&&t.parent&&t.destroy&&t.rootUpdate&&t.parentUpdate&&t.keys&&t.values&&t.toggle&&t.replace&&t.quietUpdate&&t.quietReplace&&t.add&&t.apply&&t.applyReplace&&t.setByPath&&t.setPathCollection&&t.removeByPath&&t.removePathCollection&&t.getByPath&&t.applyFunction&&t.__element&&t.__children):!1},rh=(t,e)=>{if(!t)return e||{};let r=t.split("/"),o={},n=o,s=r.length-1;for(let i=0;i<=s;i++)n[r[i]]=i===s?e||{}:{},n=n[r[i]];return o},oh=(t,e)=>{let{__element:r}=e,o=r?.state;if(!o)return;let n=lt(o,io),s={[t.key]:n},i=S(o.__depends)?{...o.__depends,...s}:s;return Array.isArray(o)?Ms(o,{...Object.getPrototypeOf(o),__depends:i}):Object.setPrototypeOf(o,{...Object.getPrototypeOf(o),__depends:i}),n},nh=(t,e,r={})=>{let{overwrite:o}=r;if(!o)return;let n=o==="shallow";if(o==="merge"){st(t,e,io);return}(n?co:qt)(t,e,io)},L_="__polyglotSeededKeys",ui=t=>{if(!S(t))return new Set;let e=t[L_];if(!(e instanceof Set)){e=new Set;try{Object.defineProperty(t,L_,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},sr=(t,e,r)=>ui(t).has(e)?!0:!S(r)||r[e]===void 0,He=(t,e)=>(ui(t).add(e),e)});var DE,sh,F_=j(()=>{"use strict";DE=(t,e)=>{let r=e;for(;r;){if(r===t)return!0;r=Object.getPrototypeOf(r)}return!1},sh=(t,e)=>{let{__ref:r}=t,o=t.context||e.context||r.root?.context;o&&!o.globalScope&&(o.globalScope={});let n=e.scope||r.root?.scope,s=o?.globalScope;if(!t.scope)n?t.scope=n:s?t.scope=Object.create(s):t.scope={};else if(typeof t.scope=="object"&&t.scope!==null&&Object.getPrototypeOf(t.scope)===Object.prototype){let i=n||s;i&&!DE(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var N_,ml,Cr,yl,ih,ah=j(()=>{"use strict";Tt();rn();N_=(t,e)=>{let r="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[r]},ml=(t,e,r,o,n)=>{if(t=en(t,e),!!A(t))try{let s=t.call(e,e,r||e.state,o||e.context,n);return s&&typeof s.then=="function"&&s.catch(i=>{e.error=i,i instanceof ReferenceError?console.warn("[DOMQL] Async event warning:",i.message):console.error("[DOMQL] Async event error:",i)}),s}catch(s){if(e.error=s,s instanceof ReferenceError?console.warn("[DOMQL] Event handler warning:",s.message):console.error("[DOMQL] Event handler error:",s),e.context?.strictMode)throw s}},Cr=(t,e,r)=>{if(!e)throw new Error("Element is required");Et(t,e,r);let o=N_(t,e);if(o){let{state:n,context:s}=e;return ml(o,e,n,s,r)}},yl=(t,e,r,o,n,s)=>{if(t=en(t,r),!!A(t))try{let i=t.call(r,e,r,o||r.state,n||r.context,s);return i&&typeof i.then=="function"&&i.catch(a=>{r.error=a,console.error("[DOMQL] Async event update error:",a)}),i}catch(i){if(r.error=i,console.error("[DOMQL] Event update error:",i),r.context?.strictMode)throw i}},ih=(t,e,r,o)=>{Et(t,r,e,o);let n=N_(t,r);if(n){let{state:s,context:i}=r;return yl(n,e,r,s,i,o)}}});var ch,di,lh=j(()=>{"use strict";ch={},di={}});var B_={};P(B_,{restAdapter:()=>j_,setup:()=>LE});var $E,ir,LE,j_,U_=j(()=>{"use strict";$E=(t,e,r)=>{let o=e&&!e.startsWith("/")?"/":"",n=new URL(`${t}${o}${e}`);if(r)for(let s in r){let i=r[s];i!=null&&n.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return n.toString()},ir=async(t,e)=>{let r=await globalThis.fetch(t,e),o=r.headers.get("content-type"),n=o&&o.includes("json")?await r.json():await r.text();return{data:n,error:r.ok?null:n?.message||n?.error||r.statusText,status:r.status}},LE=async({url:t,headers:e,auth:r,fetchOptions:o})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return j_(t,e,r,o)},j_=(t,e={},r,o={})=>{let n=r?.token||null,s=f=>{let u={...e,...f};return n&&(u.Authorization=`Bearer ${n}`),u},i=f=>({...s(f),"Content-Type":"application/json"}),a=f=>({...o,...f}),c=(f,u)=>{let d=u||t;if(f&&(f.startsWith("http://")||f.startsWith("https://")))return f;let h=f&&!f.startsWith("/")?"/":"";return`${d}${h}${f||""}`};return{name:"rest",setToken:f=>{n=f},getSession:async()=>{if(!r?.sessionUrl)return n?{token:n}:null;let f=await ir(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 ir(c(r.signInUrl,r.baseUrl),a({method:"POST",headers:i(),body:JSON.stringify(f)}));return u.data?.token&&(n=u.data.token),u},signOut:async()=>(r?.signOutUrl&&await ir(c(r.signOutUrl,r.baseUrl),a({method:"POST",headers:s()})),n=null,{error:null}),select:({from:f,params:u,select:d,limit:h,offset:g,order:p,single:m,headers:b,baseUrl:_})=>{let y={...u};return d&&(y.select=d),h&&(y.limit=h),g&&(y.offset=g),m&&(y.single=!0),p&&(typeof p=="string"?y.order=p:Array.isArray(p)?y.order=p.map(x=>`${x.by}:${x.asc===!1?"desc":"asc"}`).join(","):p.by&&(y.order=`${p.by}:${p.asc===!1?"desc":"asc"}`)),ir($E(_||t,f||"",y),a({headers:s(b)}))},rpc:({from:f,params:u,headers:d,baseUrl:h})=>ir(c(`rpc/${f}`,h),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),insert:({from:f,data:u,headers:d,baseUrl:h})=>ir(c(f,h),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),update:({from:f,data:u,params:d,method:h,headers:g,baseUrl:p})=>{let m=d?.id||u?.id,b=m?`${f}/${m}`:f;return ir(c(b,p),a({method:h||"PATCH",headers:i(g),body:JSON.stringify(u)}))},upsert:({from:f,data:u,params:d,method:h,headers:g,baseUrl:p})=>{let m=d?.id||u?.id,b=m?`${f}/${m}`:f;return ir(c(b,p),a({method:h||"PUT",headers:i(g),body:JSON.stringify(u)}))},delete:({from:f,params:u,headers:d,baseUrl:h})=>{let g=u?.id,p=g?`${f}/${g}`:f;return ir(c(p,h),a({method:"DELETE",headers:s(d)}))}}}});var z_={};P(z_,{localAdapter:()=>V_,setup:()=>FE});var bl,ME,FE,V_,H_=j(()=>{"use strict";bl=(t,e)=>{if(!e)return!0;for(let r in e){let o=e[r];if(o===null){if(t[r]!==null&&t[r]!==void 0)return!1}else if(Array.isArray(o)){if(!o.includes(t[r]))return!1}else if(typeof o=="object"){for(let n in o)if(n==="gt"&&!(t[r]>o[n])||n==="gte"&&!(t[r]>=o[n])||n==="lt"&&!(t[r]<o[n])||n==="lte"&&!(t[r]<=o[n])||n==="neq"&&t[r]===o[n]||n==="like"&&!String(t[r]).includes(o[n]))return!1}else if(t[r]!==o)return!1}return!0},ME=(t,{order:e,limit:r,offset:o,single:n})=>{let s=[...t];if(e){let i=typeof e=="string"?e:e.by,a=e.asc!==!1;s.sort((c,l)=>c[i]<l[i]?a?-1:1:c[i]>l[i]?a?1:-1:0)}return o&&(s=s.slice(o)),r&&(s=s.slice(0,r)),n?{data:s[0]||null,error:null}:{data:s,error:null}},FE=async({data:t,...e})=>V_(t,e),V_=(t={},e={})=>{let r={},o={},n=e.persist!==!1&&typeof localStorage<"u",s=e.prefix||"smbls_db_",i=f=>{if(!r[f])if(n)try{let u=localStorage.getItem(s+f);r[f]=u?JSON.parse(u):t[f]||[]}catch{r[f]=t[f]||[]}else r[f]=t[f]||[];return r[f]},a=f=>{if(n)try{localStorage.setItem(s+f,JSON.stringify(r[f]))}catch{}},c=(f,u,d,h)=>{let g=o[f];if(g)for(let p of g)p(d,h,{event:u,table:f})},l=Date.now();return{name:"local",store:r,select:async({from:f,params:u,...d})=>{let g=i(f).filter(p=>bl(p,u));return ME(g,d)},insert:async({from:f,data:u})=>{let d=i(f),g=(Array.isArray(u)?u:[u]).map(p=>{let m={id:p.id||++l,...p};return d.push(m),m});a(f);for(let p of g)c(f,"INSERT",p,null);return{data:Array.isArray(u)?g:g[0],error:null}},update:async({from:f,data:u,params:d})=>{let h=i(f),g=[];for(let p=0;p<h.length;p++)if(bl(h[p],d)){let m={...h[p]};Object.assign(h[p],u),g.push(h[p]),c(f,"UPDATE",h[p],m)}return a(f),{data:g,error:null}},upsert:async({from:f,data:u,params:d})=>{let h=i(f),g=Array.isArray(u)?u:[u],p=[];for(let m of g){let b=d||(m.id!==void 0?{id:m.id}:null),_=b?h.findIndex(y=>bl(y,b)):-1;if(_>-1){let y={...h[_]};Object.assign(h[_],m),p.push(h[_]),c(f,"UPDATE",h[_],y)}else{let y={id:m.id||++l,...m};h.push(y),p.push(y),c(f,"INSERT",y,null)}}return a(f),{data:Array.isArray(u)?p:p[0],error:null}},delete:async({from:f,params:u})=>{let d=i(f),h=[];for(let g=d.length-1;g>=0;g--)bl(d[g],u)&&(h.push(d[g]),d.splice(g,1),c(f,"DELETE",null,h[h.length-1]));return a(f),{data:h,error:null}},subscribe:({from:f,on:u},d)=>{o[f]||(o[f]=[]);let h=(g,p,m)=>{u&&u!=="*"&&u!==m.event||d(g,p,m)};return o[f].push(h),()=>{let g=o[f].indexOf(h);g>-1&&o[f].splice(g,1)}}}}});var uo={};P(uo,{createAdapter:()=>zE,default:()=>QE,executeFetch:()=>xi,fetchPlugin:()=>gh,initAdapterAuth:()=>kl,parseDuration:()=>gi,queryClient:()=>JE,registerAdapter:()=>VE,resolveDb:()=>G_});var NE,jE,_l,hi,xl,dh,BE,UE,VE,zE,G_,gi,Nt,Y_,pi,HE,_i,mi,yi,wl,ph,Sl,WE,W_,fh,X_,Z_,cn,q_,qE,K_,KE,vl,J_,Q_,kl,hh,he,Ee,bi,fo,We,Er,GE,YE,XE,uh,ZE,xi,JE,gh,QE,Ar=j(()=>{"use strict";R();NE=["select","rpc","insert","update","upsert","delete","subscribe"],jE={rest:()=>Promise.resolve().then(()=>(U_(),B_)),local:()=>Promise.resolve().then(()=>(H_(),z_))},_l=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),hi=(()=>{if(typeof globalThis<"u"&&globalThis[_l])return globalThis[_l];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,_l,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[_l]}catch{}return t})(),xl=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),dh=(()=>{if(typeof globalThis<"u"&&globalThis[xl])return globalThis[xl];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,xl,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[xl]}catch{}return t})(),BE=5e3,UE=t=>new Promise(e=>{if(hi[t])return e(hi[t]);let r=dh[t]||=[],o=!1,n=()=>{o||(o=!0,e(hi[t]||null))};r.push(n),setTimeout(n,BE)}),VE=(t,e)=>{hi[t]=e;let r=dh[t];if(r&&r.length){dh[t]=[];for(let o of r)o()}},zE=t=>{let e={};for(let r of NE)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},G_=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...r}=t,o=typeof e=="string"?e:typeof t=="string"?t:null;if(!o)return null;let n=hi[o]||jE[o];if(!n&&(n=await UE(o),!n))throw new Error(`Unknown db adapter: "${o}". Use registerAdapter() for adapters with optional deps.`);let s=await n();if(!s||typeof s.setup!="function")throw new Error(`Adapter "${o}" loader returned a module without a setup() function. Got keys: [${Object.keys(s||{}).join(", ")}]. Likely a bundler chunk-resolution issue.`);return s.setup(r)},gi=t=>{if(!t)return 0;if(typeof t=="number")return t;let e=t.match(/^(\d+)(ms|s|m|h)$/);if(!e)return 0;let r=parseInt(e[1]),o=e[2];return o==="ms"?r:o==="s"?r*1e3:o==="m"?r*6e4:o==="h"?r*36e5:0},Nt=new Map,Y_=new Map,pi=new Map,HE=(t,e,r)=>{if(t.cache?.key)return t.cache.key;let o=KE(t.params),n=r?`${r}:`:"",s=`${t.from}:${t.method}:${n}${JSON.stringify(o||"")}`;return e?`${s}:${e}`:s},_i=t=>Nt.get(t)||null,mi=(t,e,r)=>{let o=Nt.get(t),n={data:e,error:r,time:Date.now(),stale:!1};Nt.set(t,n);let s=Y_.get(t);if(s)for(let i of s)A(i)&&i(n);return n},yi=t=>{if(t){let e=Nt.get(t);e&&(e.stale=!0);return}for(let[,e]of Nt)e.stale=!0},wl=t=>{if(t){Nt.delete(t);return}Nt.clear()},ph=t=>!t&&t!==!1?{staleTime:6e4,gcTime:3e5}:t===!1?null:t===!0?{staleTime:6e4,gcTime:3e5}:typeof t=="number"?{staleTime:t,gcTime:Math.max(t*5,3e5)}:w(t)?{staleTime:gi(t),gcTime:3e5}:{staleTime:gi(t.stale||t.staleTime)||6e4,gcTime:gi(t.gc||t.gcTime||t.expire)||3e5,key:t.key},Sl=null,WE=()=>{Sl||(Sl=setInterval(()=>{let t=Date.now();for(let[e,r]of Nt){let o=Y_.get(e);!(o&&o.size>0)&&t-r.time>(r.gcTime||3e5)&&Nt.delete(e)}},3e4),Sl.unref&&Sl.unref())};WE();W_=3,fh=t=>Math.min(1e3*2**t,3e4),X_=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:W_,delay:fh}:typeof e=="number"?{count:e,delay:fh}:{count:e.count??W_,delay:A(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:fh}},Z_=async(t,e)=>{let{count:r,delay:o}=e,n;for(let s=0;s<=r;s++)try{let i=await t();if(i?.error){if(n=i.error,s<r){let a=A(o)?o(s,n):o;await new Promise(c=>setTimeout(c,a));continue}return i}return i}catch(i){if(n=i,s<r){let a=A(o)?o(s,i):o;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:n}},cn={focus:new Set,online:new Set},q_=!1,qE=()=>{if(q_||typeof window>"u")return;q_=!0;let t=()=>{for(let r of cn.focus)r()},e=()=>{for(let r of cn.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},K_=(t,e)=>{let r=e.__ref;if(t===!0)return{from:r.__state||e.key,method:"select",query:!0,on:"create"};if(w(t))return{from:t,method:"select",query:!0,on:"create"};if(S(t)){let o={...t};return o.from=o.from||r.__state||e.key,o.method=o.method||"select",o.on=o.on||"create",o.query===void 0&&(o.query=!0),o}return null},KE=t=>(!t||A(t),t),vl=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},J_=(t,e)=>{let o=(t?.state?.root||e?.state?.root)?.__fetchScope;return o?String(o):void 0},Q_=(t,e,r)=>{let o;if(!t)o=void 0;else if(A(t))o=t(e,e.state);else{o={};for(let n in t){let s=t[n];o[n]=A(s)?s(e,e.state):s}}return o},kl=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let r=(o,n)=>{let s=e.state?.root;s?.update&&s.update({auth:{user:o,session:n,loading:!1}})};try{let o=await t.getSession();r(o?.user||null,o)}catch(o){console.warn("[fetch] Failed to restore auth session:",o.message)}t.onAuthStateChange&&t.onAuthStateChange((o,n)=>{r(n?.user||null,n)})},hh=async(t,e)=>{if(A(t.select))return t.auth!==!1&&await kl(t,e),t;if(t.__resolved)return t.auth!==!1&&await kl(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=G_(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 kl(r,e),r):null},he=(t,e,...r)=>{let o=A(t[e])?t[e]:null;o&&o.call(t,...r,t,t.state,t.context)},Ee=(t,e,r,...o)=>{let n=t&&A(t[r])?t[r]:null;n&&n.call(e,...o,e,e.state,e.context)},bi=t=>{let e={},r=t.node;if(!r)return e;if(r.tagName==="FORM"){let n=new FormData(r);for(let[s,i]of n.entries())e[s]=i;return e}let o=r.querySelectorAll("input, textarea, select");for(let n=0;n<o.length;n++){let s=o[n],i=s.name||s.getAttribute("name");i&&(s.type==="checkbox"?e[i]=s.checked:s.type==="file"?e[i]=s.files:e[i]=s.value)}return e},fo=(t,e,r,o={})=>{let n=r&&r.startsWith("~/"),s=n&&t.state?.root||t.state;if(s?.update)if(n){let i=r.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&i in e?s.update(e,{preventFetch:!0,...o}):s.update({[i]:e},{preventFetch:!0,...o})}else{let i=r?{[r]:e}:e;s.update(i,{preventFetch:!0,...o})}},We=(t,e)=>{let r=t?.__ref;r&&(r.__fetchStatus=e,r.__fetching=e.isFetching,r.__fetchError=e.error)},Er=async(t,e,r,o={})=>{let n=r?.fetch;if(!n||!e||!e.__ref||t.enabled===!1||A(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||A(t.skip)&&t.skip(e,e.state))return;let s=await hh(n,r);if(!s||!e.__ref)return;let i=e.__ref,{from:a,method:c,query:l,params:f,cache:u,transform:d,single:h,auth:g,fields:p,as:m,limit:b,offset:_,order:y,headers:x,baseUrl:k,page:E,cursor:O,getNextPageParam:$,getPreviousPageParam:I,infinite:D,placeholderData:W,initialData:Pt,select:F,keepPreviousData:Y}=t,at=w(F)?F:void 0;if(l&&A(e.getQuery)){let nt=e.getQuery(s.name||"paths");nt&&(at=nt.select||nt.length&&nt.join(",")||at)}let z=Q_(f,e,r),G=ph(u),Vt=X_(t),q=vl(e,r),xt=J_(e,r),M=q?`:${q}`:"",ot=xt?`${xt}:`:"",V=G?u?.key||`${a}:${c}:${ot}${JSON.stringify(z||"")}${D?":infinite":""}${E?":p"+JSON.stringify(E):""}${M}`:null;if(!i.__fetchInitialized&&V&&(i.__fetchInitialized=!0,Pt!==void 0)){let nt=A(Pt)?Pt():Pt;mi(V,nt,null)}if((c==="select"||c==="rpc")&&V&&G){let nt=_i(V);if(nt&&!nt.error){let N=Date.now()-nt.time,pt=nt.stale||N>(G.staleTime||0),K=nt.data;if(A(F)&&(K=F(K,e,e.state)),d&&(K=d(K,e,e.state)),fo(e,K,m),!pt){We(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(W!==void 0){let N=A(W)?W(e,e.state):W;N!==void 0&&fo(e,N,m)}}if(V&&pi.has(V)&&!o.force){let nt=pi.get(V);try{let N=await Promise.race([nt,new Promise((pt,K)=>setTimeout(()=>K("DEDUP_TIMEOUT"),15e3))]);if(N?.data!==void 0){let pt=N.data;A(F)&&(pt=F(pt,e,e.state)),d&&(pt=d(pt,e,e.state)),fo(e,pt,m),he(e,"onFetchComplete",pt),Ee(t,e,"onFetchComplete",pt)}}catch{}return}let X=!_i(V)?.data;We(e,{isFetching:!0,isLoading:X,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),he(e,"onFetchStart"),Ee(t,e,"onFetchStart");let B=r?.analyze?.emitNetwork,dt=B?typeof performance<"u"?performance.now():Date.now():0;B&&B({phase:"start",mode:"query",from:a,method:c,cacheKey:V,lang:q});let Qe=Z_(async()=>{if(g!==!1&&s.auth!==!1&&s.getSession){let K=await s.getSession();if(g===!0&&!K){let Mt={message:"Not authenticated"};return We(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:Mt,status:"error",fetchStatus:"idle"}),he(e,"onFetchError",Mt),Ee(t,e,"onFetchError",Mt),{data:null,error:Mt}}}let nt=s[c];if(!A(nt))return{data:null,error:{message:`Method "${c}" not found on adapter`}};let N={from:a,select:at,params:z,single:h,limit:b,offset:_,order:y,headers:x,baseUrl:k},pt=vl(e,r);if(pt&&(N.headers={...N.headers,"Accept-Language":pt}),E!==void 0){if(S(E))E.offset!==void 0&&(N.offset=E.offset),E.limit!==void 0&&(N.limit=E.limit),E.cursor!==void 0&&(N.params={...N.params,cursor:E.cursor});else if(typeof E=="number"){let K=t.pageSize||b||20;N.offset=(E-1)*K,N.limit=K}}if(O!==void 0&&(N.params={...N.params,cursor:O}),c==="insert"||c==="update"||c==="upsert"){let K;if(p===!0||t.on==="submit")K=bi(e);else if(T(p)){let Mt=bi(e);K={};for(let ad of p)K[ad]=Mt[ad]}else e.state?.parse?K=e.state.parse():S(e.state)&&(K={...e.state});d&&(K=d(K,e,e.state)),N.data=K}if(c==="rpc"){let K=z;if(t.on==="submit"){let Mt=bi(e);K=t.transformParams?t.transformParams(Mt,e,e.state):Mt}N.params=K}if(c==="subscribe"){let K=s.subscribe({from:a,params:z,on:t.subscribeOn},(Mt,ad,SI)=>{fo(e,Mt,m),he(e,"onFetchComplete",Mt),Ee(t,e,"onFetchComplete",Mt)});return i.__unsubscribe=K,{data:null,error:null,subscribed:!0}}return nt(N)},Vt);V&&pi.set(V,Qe);try{let nt=await Qe;if(nt?.subscribed)return;let{data:N,error:pt}=nt||{};if(pt){V&&mi(V,null,pt),We(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:pt,status:"error",fetchStatus:"idle"}),he(e,"onFetchError",pt),Ee(t,e,"onFetchError",pt),B&&B({phase:"error",mode:"query",from:a,method:c,cacheKey:V,error:pt.message||pt,durationMs:(typeof performance<"u"?performance.now():Date.now())-dt});return}if(N!==void 0){if((c==="select"||c==="rpc")&&V){let Mt=mi(V,N,null);Mt.gcTime=G?.gcTime||3e5}let K=N;D&&T(N)&&(i.__pages||(i.__pages=[]),o.direction==="previous"?i.__pages.unshift(N):i.__pages.push(N),K=i.__pages.flat(),$&&(i.__nextPageParam=$(N,i.__pages),i.__hasNextPage=i.__nextPageParam!=null),I&&(i.__prevPageParam=I(N,i.__pages),i.__hasPreviousPage=i.__prevPageParam!=null)),A(F)&&(K=F(K,e,e.state)),d&&(K=d(K,e,e.state)),(!Y||K!==void 0)&&fo(e,K,m),We(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),he(e,"onFetchComplete",K),Ee(t,e,"onFetchComplete",K),B&&B({phase:"success",mode:"query",ok:!0,from:a,method:c,cacheKey:V,durationMs:(typeof performance<"u"?performance.now():Date.now())-dt})}}catch(nt){We(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:nt,status:"error",fetchStatus:"idle"}),he(e,"onFetchError",nt),Ee(t,e,"onFetchError",nt),B&&B({phase:"error",mode:"query",from:a,method:c,cacheKey:V,error:nt.message||String(nt),durationMs:(typeof performance<"u"?performance.now():Date.now())-dt})}finally{V&&pi.delete(V)}},GE=(t,e,r)=>{let o=t.on,n=e.__ref;n.__fetchListeners||(n.__fetchListeners=[]);let s=t.__runner||Er;if(o==="submit"){let i=c=>{c.preventDefault(),s(t,e,r)},a=e.node;a&&(a.addEventListener("submit",i),n.__fetchListeners.push(()=>a.removeEventListener("submit",i)))}else if(o==="click"){let i=()=>s(t,e,r),a=e.node;a&&(a.addEventListener("click",i),n.__fetchListeners.push(()=>a.removeEventListener("click",i)))}else o==="stateChange"&&(n.__fetchOnStateChange=()=>s(t,e,r))},YE=(t,e,r)=>{let o=e.__ref;o.__fetchCleanups||(o.__fetchCleanups=[]),qE();let n=t.refetchInterval;if(n){let s=typeof n=="number"?n:gi(n);if(s>0){let i=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&Er(t,e,r,{force:!0})},s);o.__fetchCleanups.push(()=>clearInterval(i))}}if(t.refetchOnWindowFocus!==!1){let s=()=>{let i=vl(e,r),a=J_(e,r),c=HE(t,i,a),l=_i(c),f=ph(t.cache);(!l||l.stale||Date.now()-l.time>(f?.staleTime||0))&&Er(t,e,r,{force:!0})};cn.focus.add(s),o.__fetchCleanups.push(()=>cn.focus.delete(s))}if(t.refetchOnReconnect!==!1){let s=()=>Er(t,e,r,{force:!0});cn.online.add(s),o.__fetchCleanups.push(()=>cn.online.delete(s))}},XE=(t,e,r)=>{if(!e.optimistic)return null;let o=t.__ref,n=e.as,s=t.state?.parse?t.state.parse():S(t.state)?{...t.state}:t.state;o.__optimisticSnapshot=s;let i=A(e.optimistic)?e.optimistic(r,s,t):e.optimistic;return i!==void 0&&fo(t,i,n),s},uh=(t,e)=>{let r=t.__ref,o=r.__optimisticSnapshot;o!==void 0&&(fo(t,o,e.as),delete r.__optimisticSnapshot)},ZE=async(t,e,r)=>{let o=r?.fetch;if(!o)return;let n=await hh(o,r);if(!n)return;let s=e.__ref,{method:i,from:a,fields:c,transform:l,as:f,on:u,auth:d,headers:h,baseUrl:g,invalidates:p,optimistic:m,onMutate:b,onSuccess:_,onError:y,onSettled:x}=t,k;if(c===!0||u==="submit")k=bi(e);else if(T(c)){let I=bi(e);k={};for(let D of c)k[D]=I[D]}else e.state?.parse?k=e.state.parse():S(e.state)&&(k={...e.state});l&&(k=l(k,e,e.state)),A(b)&&b(k,e,e.state);let E=m?XE(e,t,k):null;s.__fetching=!0,We(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),he(e,"onFetchStart"),Ee(t,e,"onFetchStart");let O=r?.analyze?.emitNetwork,$=O?typeof performance<"u"?performance.now():Date.now():0;O&&O({phase:"start",mode:"mutation",from:a,method:i});try{if(d!==!1&&n.auth!==!1&&n.getSession){let z=await n.getSession();if(d===!0&&!z){E!==void 0&&uh(e,t);let G={message:"Not authenticated"};he(e,"onFetchError",G),Ee(t,e,"onFetchError",G);return}}let I=n[i];if(!A(I))return;let D={from:a,data:k,headers:h,baseUrl:g};t.params&&(D.params=Q_(t.params,e,r));let W=vl(e,r);W&&(D.headers={...D.headers,"Accept-Language":W});let Pt=X_(t),F=await Z_(()=>I(D),Pt),{data:Y,error:at}=F||{};if(at){E!==void 0&&uh(e,t),We(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:at,status:"error",fetchStatus:"idle"}),he(e,"onFetchError",at),A(y)&&y(at,k,e),A(x)&&x(null,at,k,e),O&&O({phase:"error",mode:"mutation",from:a,method:i,error:at.message||String(at),durationMs:(typeof performance<"u"?performance.now():Date.now())-$});return}if(delete s.__optimisticSnapshot,Y!==void 0){let z=f?{[f]:Y}:Y;e.state?.update&&e.state.update(z,{preventFetch:!0})}if(We(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),he(e,"onFetchComplete",Y),Ee(t,e,"onFetchComplete",Y),A(_)&&_(Y,k,e),A(x)&&x(Y,null,k,e),O&&O({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-$}),p){let z=T(p)?p:[p];for(let G of z)if(G===!0||G==="*")for(let[Vt]of Nt)Vt.startsWith(a+":")&&yi(Vt);else yi(G)}}catch(I){E!==void 0&&uh(e,t),We(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:I,status:"error",fetchStatus:"idle"}),he(e,"onFetchError",I),Ee(t,e,"onFetchError",I),A(y)&&y(I,k,e),A(x)&&x(null,I,k,e),O&&O({phase:"error",mode:"mutation",from:a,method:i,error:I.message||String(I),durationMs:(typeof performance<"u"?performance.now():Date.now())-$})}finally{s.__fetching=!1}},xi=(t,e,r,o)=>{if(!t||!o?.fetch)return;let s=ft(t,e);if(!s)return;let i=T(s)?s.map(c=>K_(ft(c,e),e)).filter(Boolean):[K_(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?ZE:Er;c.on==="create"?f(c,e,o):Promise.resolve().then(()=>{GE({...c,__runner:f},e,o)}),!l&&c.on==="create"&&(c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&YE(c,e,o)}let a=e.__ref;a.refetch=c=>{for(let l of i)Er(l,e,o,{force:!0,...c})},a.fetchNextPage=()=>{let c=i[0];if(!c||!c.infinite)return;let l=a.__nextPageParam;if(l==null)return;let f={...c,cursor:l};Er(f,e,o,{direction:"next",force:!0})},a.fetchPreviousPage=()=>{let c=i[0];if(!c||!c.infinite)return;let l=a.__prevPageParam;if(l==null)return;let f={...c,cursor:l};Er(f,e,o,{direction:"previous",force:!0})}},JE={invalidateQueries:t=>{if(!t){yi();return}if(w(t))for(let[e]of Nt)(e.startsWith(t)||e.includes(t))&&yi(e);else if(T(t)){let e=t.join(":");for(let[r]of Nt)r.includes(e)&&yi(r)}},removeQueries:t=>{if(!t){wl();return}if(w(t))for(let[e]of Nt)(e.startsWith(t)||e.includes(t))&&wl(e)},getQueryData:t=>_i(t)?.data??void 0,setQueryData:(t,e)=>{let r=_i(t),o=A(e)?e(r?.data):e;mi(t,o,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let o=await hh(r,e);if(!o)return;let n=t.cache?.key||`${t.from}:${t.method||"select"}:${JSON.stringify(t.params||"")}`,s=o[t.method||"select"];if(!A(s))return;let i=await s({from:t.from,params:t.params,limit:t.limit,offset:t.offset,order:t.order,single:t.single});if(i?.data!==void 0&&!i?.error){let a=mi(n,i.data,null);a.gcTime=ph(t.cache)?.gcTime||3e5}return i},getCache:()=>Nt,clear:()=>wl(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of Nt)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||wl(r))}},gh={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||pi.clear(),xi(e,t,t.state,t.context))}},QE=xi});function Si(t){let e=this,{__ref:r}=e,o=[].concat(t),n=r.root[o[0]];if(!o||!o.length)return console.log(o,"on",e.key,"is undefined");for(;n.key===o[0]&&(o.shift(),!!o.length);)if(n=n[o[0]],!n)return;return n}function yh(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 bh(t){let e=this,{__ref:r}=e,o=r?.__children;if(o)for(let n=0;n<o.length;n++){let s=o[n],i=e[s];if(s===t)return i;if(A(t)){let c=t(i,i.state,i.context);if(i.state&&c)return i}let a=i?.lookdown?.(t);if(a)return a}}function _h(t,e=[]){let r=this,{__ref:o}=r,n=o?.__children;if(n){for(let s=0;s<n.length;s++){let i=n[s],a=r[i];if(i===t)e.push(a);else if(A(t)){let c=t(a,a.state,a.context);a.state&&c&&e.push(a)}a?.lookdownAll?.(t,e)}return e.length?e:void 0}}function Cl(t={}){let e=this;if(e.node?.style){for(let r in t){let o=t[r],n=e[r];if(S(o)&&n)Cl.call(n,o);else if(o!=null){let s=r.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),i=String(o).replace(/\s*!important\s*$/,"");e.node.style.setProperty(s,i,"important")}}return e}}function ex(t){let e=this;if(Cr("beforeRemove",e,t)===!1)return e;A(e.node.remove)?e.node.remove():kr()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=Ls(e.parent.__ref.__children,e.key)),Cr("remove",e,t)}function xh(t){return this[t]}function wh(t,e){let r=this;if(t)return r.update(t,e),r}function Sh(t){return t?this.__ref&&this.__ref[t]:this.__ref}function ki(){return this.getRef("__children").map(e=>this[e])}function vi(){return this.getRef().path}function Ei(t){let e=null,r=o=>o.__element&&o.root?.isRootState;if(!this)e=tx();else if(r(this))e=this.root;else if(this.__ref&&this.__ref.path){let o=this.state&&r(this.state),n=A(this.state)&&this.parent.state&&r(this.parent.state);(o||n)&&(e=this.state.root||this.parent.state.root)}return e||(e=tx()),t?e?.[t]:e}function Ai(t){let e=this.getRootState()?.__element;return e&&Object.keys(e).length>0&&t?e[t]:e}function Ti(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function Oi(t){let e=this.getRoot()?.context;return t?e[t]:e}function Ri(t){let e=this.context;return t?e[t]:e}function El(){let t=this,e=[];for(let r in t)!Object.prototype.hasOwnProperty.call(t,r)||wr.has(r)&&!Bs.has(r)||e.push(r);return e}function Al(t=[]){let e=this,r={},o=El.call(e),n=o.includes("children"),s=t.length?new Set(t):null;for(let i=0;i<o.length;i++){let a=o[i];if(s&&s.has(a)||!Object.prototype.hasOwnProperty.call(e,a)||n&&a==="content")continue;let c=e[a];if(a==="state"){if(e.__ref&&!e.__ref.__hasRootState)continue;let l=A(c&&c.parse)?c.parse():c;r[a]=A(l)?l:JSON.parse(JSON.stringify(l||{}))}else if(a==="scope"){if(e.__ref&&!e.__ref.__hasRootScope)continue;r[a]=JSON.parse(JSON.stringify(c||{}))}else if(a==="props"){let{__element:l,update:f,...u}=e[a];r[a]=u}else yt(c)&&Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=c)}return r}function wi(t=[],e=new WeakSet){let r=this;if(e.has(r))return;e.add(r);let o=Al.call(r,t),n=t.length?new Set(t):null;for(let s in o){if(n&&n.has(s)||!Object.prototype.hasOwnProperty.call(r,s))continue;let i=o[s];Array.isArray(i)?o[s]=i.map(a=>H(a)?wi.call(a,t,e):a):H(i)&&(o[s]=wi.call(i,t,e))}return o}function ln(...t){if(Tr!=="test"&&Tr!=="development")return;let e=this,{__ref:r}=e;return console.groupCollapsed(e.key),t.length?t.forEach(o=>console.log(`%c${o}:
21
- `,"font-weight: bold",e[o])):(console.log(r.path),e.keys().forEach(n=>console.log(`%c${n}:`,"font-weight: bold",e[n]))),console.log(e),console.groupEnd(e.key),e}function vh(...t){(Tr==="test"||Tr==="development")&&console.log(...t)}function Pi(...t){(Tr==="test"||Tr==="development")&&console.warn(...t)}function po(...t){if(Tr==="test"||Tr==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&ln.call(this),new Error(...t)}}function Ii(){let t=this,{key:e,parent:r}=t,{__children:o}=r.__ref,n=o.indexOf(e),s=o[n+1];return r[s]}function Di(t){let e=t||this,{key:r,parent:o}=e,{__children:n}=o.__ref;if(!n)return;let s=n.indexOf(r);return o[n[s-1]]}function $i(t={}){let e=this;e.data||(e.data={}),e.data.varCaches||(e.data.varCaches={});let r=e.data.varCaches,o={},n;for(let s in t)t[s]!==r[s]&&(n=!0,o[s]=t[s]);return{changed:s=>{if(!n)return;let i=s(o,lt(r));for(let a in o)r[a]=o[a];return i},timeout:(s,i)=>{if(!n)return;let a=setTimeout(()=>{s(o),clearTimeout(a)},i)}}}function Ch(t,...e){let r=this.context,o=r.utils?.[t]||r.functions?.[t]||r.methods?.[t]||r.snippets?.[t];if(o)try{let n=o.call(this,...e);return n&&typeof n.then=="function"&&n.catch(s=>{po.call(this,s)}),n}catch(n){if(po.call(this,n),r?.strictMode)throw n}}async function Li(){let t=this,e=t.context?.fetch;if(!e)return null;if(typeof e.select=="function"){if(!e.__authInitialized&&e.getSession){let{initAdapterAuth:n}=await Promise.resolve().then(()=>(Ar(),uo));await n(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:n}=await Promise.resolve().then(()=>(Ar(),uo));await n(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let r=Promise.resolve().then(()=>(Ar(),uo)).then(({resolveDb:n})=>n(e));e.__resolving=r;let o=await r;if(e.__resolved=o,t.context.fetch=o,delete e.__resolving,o?.getSession){let{initAdapterAuth:n}=await Promise.resolve().then(()=>(Ar(),uo));await n(o,t.context)}return o}function Mi(t){let e=this,r=t||di.useStateQuery||e.context?.useStateQuery;if(!r)return null;let o={};if(mh(e,o),r===!0)return o;let n=iA[r];return n?n(o):o}function Eh(t,e){return!!(Jo.has(t)||e?.context?.methods?.[t])}var Tr,rx,Ci,tx,kh,mh,tA,ox,eA,rA,oA,nA,sA,iA,nx=j(()=>{"use strict";ah();Qo();Tt();nr();bp();Zo();lh();Tr="production";rx=null,Ci=t=>{rx=t||null},tx=()=>rx||null;kh=(t,e,r,o)=>Object.defineProperty(t,e,{get:r,set:o});mh=(t,e)=>{let r=t.__ref;if(!r)return;let o=r.__state;o&&typeof o=="string"&&tA(e,o);let n=r.__children;if(n)for(let a=0;a<n.length;a++){let c=t[n[a]];c&&c.__ref&&mh(c,e)}let s=r.contentElementKey||"content",i=t[s];i&&i.__ref&&mh(i,e)},tA=(t,e)=>{let o=e.replaceAll("../","").replaceAll("~/","").split("/"),n=t;for(let s=0;s<o.length;s++){let i=o[s];s===o.length-1?n[i]||(n[i]=!0):(n[i]===!0&&(n[i]={}),n[i]||(n[i]={}),n=n[i])}},ox=(t,e=0)=>{let r=" ".repeat(e),o=Object.entries(t);return o.length?o.map(([s,i])=>i===!0?`${r}${s}`:`${r}${s} {
22
- ${ox(i,e+1)}
18
+ return ${a}; })`)(t);Object.assign(t,c)}catch{for(let[a,c]of o)try{let l=Object.keys(t).filter(n).map(f=>`var ${f} = __gs__[${JSON.stringify(f)}];`).join(`
19
+ `);t[a]=C.eval(`(function(__gs__) { ${l}
20
+ return (${c}); })`)(t)}catch{try{t[a]=C.eval(`(${c})`)}catch{t[a]=c}}}for(let[i,a]of r)if(!n(i))try{t[i]=C.eval(`(${a})`)}catch{t[i]=a}return t},ip=(e,t={verbose:!0})=>{try{return e?C.eval("("+e+")"):{}}catch(r){t.verbose&&console.warn(r)}},ap=(e,...t)=>Object.prototype.hasOwnProperty.call(e,...t),Uc=e=>{for(let t in e)return!1;return!0},cp=e=>k(e)&&Uc(e),lp=()=>Object.create(null),Qs=(e,t,r={})=>{let n=r.exclude||[],o=r.preventUnderscore;for(let s in t)n.includes(s)||!o&&un(s)||s==="constructor"||s==="prototype"||t[s]!==void 0&&(e[s]=t[s]);return e},dn=(e,t,r=[])=>{let n=r instanceof Set;for(let o in t)un(o)||o==="constructor"||o==="prototype"||(n?r.has(o):r.includes(o))||(e[o]=t[o]);return e},Ke=(e,t,r={},n=new WeakMap)=>{if(!N(e)||!N(t)||We(e)||We(t))return t;if(n.has(e))return n.get(e);n.set(e,e);let o=r.exclude,s=o?o instanceof Set?o:new Set(o):null,i=!r.preventForce;for(let a in t){if(!Object.prototype.hasOwnProperty.call(t,a)||s&&s.has(a)||i&&un(a)||a==="constructor"||a==="prototype")continue;let c=e[a],l=t[a];We(l)?e[a]=l:N(c)&&N(l)?e[a]=Ke(c,l,r,n):l!==void 0&&(e[a]=l)}return e},Vc=(e,t,r=new Set)=>{if(typeof e!="object"||typeof t!="object"||e===null||t===null)return e===t;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);let n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(let s=0;s<n.length;s++){let i=n[s];if(!Object.prototype.hasOwnProperty.call(t,i)||!Vc(e[i],t[i],r))return!1}return!0},qE=new Set(["node","__ref"]),fp=(e,t,r=qE)=>{if(e===t)return!0;if(!N(e)||!N(t)||We(e)||We(t))return e===t;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(We(l)||We(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(e,t)},up=(e,t)=>{if(t==null)return e;if(qe(t)("string","number"))delete e[t];else if(O(t))for(let r=0;r<t.length;r++)delete e[t[r]];else throw new Error("Invalid input: props must be a string or an array of strings");return e},zc=e=>{if(e===null||typeof e!="object")return e;let t=Object.create(null);for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=zc(e[r]));return t},dp=(e,t)=>{if(e.length===0)return t;let r={},n=r;for(let o=0;o<e.length;o++)o===e.length-1&&t?n[e[o]]=t:(n[e[o]]={},n=n[e[o]]);return r},pp=(e,t)=>{if(!Array.isArray(t))throw new Error("Path must be an array.");let r=e;for(let o=0;o<t.length-1;o++){if(r[t[o]]===void 0)return;r=r[t[o]]}let n=t[t.length-1];r&&Object.prototype.hasOwnProperty.call(r,n)&&delete r[n]},hp=(e,t,r)=>{if(!Array.isArray(t))throw new Error("Path must be an array.");let n=e;for(let o=0;o<t.length-1;o++)(!n[t[o]]||typeof n[t[o]]!="object")&&(n[t[o]]={}),n=n[t[o]];return n[t[t.length-1]]=r,e},gp=(e,t)=>{if(!Array.isArray(t))throw new Error("Path must be an array.");let r=e;for(let n=0;n<t.length;n++){if(r==null)return;r=r[t[n]]}return r},mp=e=>{let r=[],n=0;for(let o=0;o<e.length;o++)if(r.length<2)r.push(e[o]);else if(e[o]===r[o%2]?n++:(r=[e[o-1],e[o]],n=1),n>=20)return(__==="test"||__==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",r),!0},yp=e=>{let t=new WeakSet;function r(n){if(n&&typeof n=="object"){if(t.has(n))return!0;t.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(e)},bp=(e,t)=>{let r=t instanceof Set?t:new Set(t),n={};for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&!r.has(o)&&(n[o]=e[o]);return n}});var ei,ti,ri,Hc=j(()=>{"use strict";sr();ei=(function(){let e=0;function t(){return e++,e}return t})(),ti=ei,ri=(e,t,r)=>(fe(r,e)||r||e.key||ei()).toString()});var Ct,_p,Cr,Wc,xp,wp,Sp,Er,kp,pn,Oe,vp=j(()=>{"use strict";Ct="production",_p=Ct,Cr=(e=Ct)=>e==="production",Wc=(e=Ct)=>e==="testing"||e==="test",xp=Wc,wp=(e=Ct)=>e==="staging",Sp=(e=Ct)=>e==="local",Er=(e=Ct)=>e==="development"||e==="dev"||e==="local",kp=(e,t=Ct)=>t[e],pn=(e=Ct)=>!Cr(e),Oe=e=>{let t=e&&"env"in e?e.env:typeof process<"u"&&process.env?"production":void 0;if(t&&t!=="production")return!0;let r=e&&"hostname"in e?e.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 ni(e,t,r){let n;return function(){let o=this,s=arguments,i=function(){n=null,r||e.apply(o,s)},a=r&&!n;clearTimeout(n),n=setTimeout(i,t),a&&e.apply(o,s)}}function Tp(e,t=window){let r=function(){return e.apply(t,arguments)};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}var Cp,Ep,KE,Ap,ro,no,Ee,oo=j(()=>{"use strict";Cp=(e,t,r=300)=>{let n;return(...o)=>{clearTimeout(n),n=setTimeout(()=>{t.apply(e,o)},r)}},Ep=e=>{let t={};return(...r)=>{let n=r[0];if(n in t)return t[n];{let o=e(n);return t[n]=o,o}}},KE=/^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/,Ap=e=>KE.test(e),ro=e=>{let t=e?.plugins;if(!t||!t.length)return!1;for(let r of t)if(r.resolveHandler)return!0;return!1},no=(e,t)=>{if(typeof e=="function")return e;let r=t?.context?.plugins;if(!r)return e;for(let n of r)if(n.resolveHandler){let o=n.resolveHandler(e,t);if(typeof o=="function")return o}return e},Ee=(e,t,...r)=>{let n=t?.context?.plugins;if(!n)return!1;let o=!1;for(let s of n)typeof s[e]=="function"&&(s[e](t,...r),o=!0);return o}});var Op,R_=j(()=>{"use strict";Te();sr();Op=(e,t)=>{let{__ref:r}=e,n=e.if;if(A(n)){let o;try{o=n(e,e.state,e.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"?fe(n,e)?r.__if=!0:delete r.__if:r.__if=!0}});var Rp,Pp,P_=j(()=>{"use strict";Rp=(e,...t)=>{e&&t.map(r=>console.log(r))},Pp=(e,t,...r)=>{e&&(console.group(t),r.map(n=>console.log(n)),console.groupEnd(t))}});function Mp(e){let t;try{if(!window.localStorage)return;t=window.localStorage.getItem(e)}catch{return}if(t!==null)try{return JSON.parse(t)}catch{return}}function Fp(e,t){if(t!=null)try{if(!window.localStorage)return;let r=typeof t=="object"?JSON.stringify(t):t;window.localStorage.setItem(e,r)}catch{}}var Dp,Ip,$p,Lp,D_=j(()=>{"use strict";Te();Fs();Dp=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),Ip=(e,t,r=365)=>{if(Ae(ee)||Ae(ee.cookie))return;let n=new Date;n.setTime(n.getTime()+r*24*60*60*1e3);let o=`expires=${n.toUTCString()}`;ee.cookie=`${e}=${t};${o};path=/`},$p=e=>{if(Ae(ee)||Ae(ee.cookie))return;let t=`${e}=`,n=decodeURIComponent(ee.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(t)===0)return s.substring(t.length,s.length)}return""},Lp=e=>{Ae(ee)||Ae(ee.cookie)||(ee.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var so,I_,Np,jp=j(()=>{"use strict";so={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"])},I_=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"]),Np=e=>so.body.has(e)});var Bp,$_,io,ht,ao,ii,Vt,Up,qc,ai,Vp,ci,Kc,Gc,li,Yc,co,GE,zt,L_,oi,fi,zp,si,Hp,Wp,Xc,Zc,Jc,Qc,el,tl,M_,rl=j(()=>{"use strict";Qn();qp();sr();Te();Bp="production",$_=e=>e.sourcemap!==!1&&Bp!=="production",io=e=>{if(!e)return[];let t=[],r=e.extends;r&&(O(r)?t.push(...r):t.push(r));let n=e.extend;return n&&(O(n)?t.push(...n):t.push(n)),t},ht=e=>{if(!O(e))return e;let t=[];for(let r=e.length-1;r>=0;r--){let n=e[r];t.push(O(n)?ht(n):n)}return t},ao=e=>{if(e.includes("+"))return e.split("+").filter(Ht);if(e.includes("_")){let[t]=e.split("_");return[t]}if(e.includes(".")&&!Ht(e.split(".")[1])){let[t]=e.split(".");return[t]}return[e]},ii=(e,t,r)=>{let n=[],o=ao(r);o&&(n=[...o]);let s=ht(io(e));return s.length&&(n=[...n,...s]),n},Vt=(e,t)=>{let{__ref:r}=t,{__extends:n}=r;if(!e)return n;let o=t.variant,s=t.context;if(o&&s?.components&&!Array.isArray(e)&&typeof e=="string"){let i=`${e}.${o}`;s.components[i]&&(e=i)}return n.includes(e)||(n=Array.isArray(e)?[...n,...e]:[...n,e],r.__extends=n),n},Up=(e,t)=>{if(!e)return t;let{extends:r}=t,n=O(r)?r:[r],o=O(e)?e:[e];return{...t,extends:Zn(o,n)}},qc=()=>Math.random().toString(36).substring(2),ai={},Vp={},ci=e=>ai[e.__hash],Kc=(e,t)=>{let r=qc();return w(e)||(e.__hash=r),r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(ai[r]=t),t},Gc=(e,t)=>e.__hash?t.concat(ci(e)):Kc(e,t),li=(e,t,r,n=new Set,o,s)=>{for(let i of e)O(i)?li(i,t,r,n,o,s):co(i,t,r,n,o,void 0,s);return t},Yc=(e,t,r,n=new Set,o,s,i)=>{let a=io(e),c={...e};delete c.extends,delete c.extend;let l=!1;for(let f in c){l=!0;break}return l&&(t.push(c),o&&o.push(s)),a.length&&co(ht(a),t,r,n,o,s,i),t},co=(e,t,r,n=new Set,o,s,i)=>{if(!e||n.has(e))return t;if(O(e))return li(e,t,r,n,o,i);let a=s;return w(e)?(a=e,e=fi(e,r)):i&&k(e)&&i.has(e)&&(a=i.get(e)),n.has(e)||(n.add(e),e?.extends||e?.extend?Yc(e,t,r,n,o,a,i):e&&(t.push(e),o&&o.push(a))),t},GE=new Set(["parent","node","__ref","__proto__","extends","extend","childExtends","childExtendsRecursive"]),zt=(e,t,r,n,o)=>{t=le(t);for(let s in t){if(GE.has(s))continue;let i=e[s],a=t[s];if(a!==void 0&&Object.prototype.hasOwnProperty.call(t,s)&&s!=="__proto__"&&s!=="constructor"&&s!=="prototype"){if(i===void 0)e[s]=a,r&&n?k(a)&&!O(a)?(r[s]=r[s]||{},L_(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];Ht(s)?e[s]=zt(i,a,c,n,l):zt(i,a,c,n,l)}if(s==="extends"||s==="childExtends"||s==="childExtendsRecursive"){if(O(i)&&O(a))e[s]=i.concat(a);else if(O(i)&&k(a)){let c=zt({},i);e[s]=zt(c,a)}}}}return e},L_=(e,t,r,n)=>{if(n||(n=new WeakSet),!n.has(t)){n.add(t);for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||o==="__proto__"||o==="constructor"||o==="prototype")continue;let s=t[o];k(s)&&!O(s)?(e[o]=e[o]||{},L_(e[o],s,r,n)):e[o]=r}}},oi=(e,t,r)=>e.reduce((n,o,s)=>{let i=le(o),a=r?r[s]:void 0;return zt(n,i,t,a)},{}),fi=(e,t,r={},n)=>{let o=t?.components||r.components,s=t?.pages||r.pages;if(w(e)){let i=o&&(o[e+"."+n]||o[e]||o["smbls."+e]),a=s&&e.charCodeAt(0)===47&&s[e];if(i)return i;if(a)return a;r.verbose&&(Bp==="test"||Bp==="development")&&console.warn("Extend is string but component was not found:",e);return}return e},zp=(e,t)=>[].concat(e.slice(0,1)).concat(t.slice(0,1)).concat(e.slice(1)).concat(t.slice(1)),si=(e,t,r,n)=>{if(!e)return[];if(e.__hash)return ci(e)||[];let s=co(e,[],t,new Set,r,void 0,n);return r?s:Gc(e,s)},Hp=(e,t)=>{if(!e)return t;let r=O(e)?e:[e];return Zn(r,t)},Wp=e=>{let t=[];function r(n){for(let o in n)Object.prototype.hasOwnProperty.call(n,o)&&(Ht(o)&&t.push(o),o==="extends"&&(typeof n[o]=="string"?t.push(n[o]):Array.isArray(n[o])&&(t=t.concat(n[o]))),typeof n[o]=="object"&&n[o]!==null&&r(n[o]))}return r(e),t},Xc=(e,t,r={})=>{let{__ref:n}=e,o=e.context||t.context,s=e.variant,i=io(e);if(i.length){let a=ht(i),[c,...l]=a,f=typeof c=="string"&&s&&o?.components?`${c}.${s}`:null;f&&o.components[f]?Vt([f,...l],e):Vt(a,e)}return Zc(e,t,r),Jc(e,t,r),Qc(e,t,r),e.component&&Vt(ht(fe(e.component,e)),e),o.defaultExtends&&Vt(ht(o.defaultExtends),e),Jn(n.__extends)},Zc=(e,t,r={})=>{let{__ref:n}=e;return r.ignoreChildExtends||e.ignoreChildExtends||t.childProps?.extends&&Vt(ht(t.childProps.extends),e),n.__extends},Jc=(e,t,r={})=>{let{__ref:n}=e,o=r.ignoreChildExtends||e.ignoreChildExtends,s=t.childExtends;return!o&&s&&Vt(ht(s),e),n.__extends},Qc=(e,t,r={})=>{let{__ref:n}=e,o=t.childExtendsRecursive,s=r.ignoreChildExtendsRecursive||e.ignoreChildExtendsRecursive,i=e.key==="__text";return o&&!i&&!s&&Vt(ht(o),e),n.__extends},el=(e,t,r={})=>{let{__ref:n}=e,o=e.context||t.context,s=e.variant,i=$_(r),a=i?[...n.__extends]:null,c=Jn(n.__extends.map((l,f)=>fi(l,o,r,f===0&&s)));if(i){let l=new WeakMap;for(let d=0;d<c.length;d++){let p=c[d],g=a[d];p&&k(p)&&w(g)&&l.set(p,g)}let f=[],u=si(c,o,f,l);n.__extendsStack=u,n.__extendsNames=f}else{let l=si(c,o);n.__extendsStack=l}return n.__extendsStack},tl=(e,t,r={})=>{let{__ref:n}=e,{__extendsStack:o}=n;if($_(r)){let s={},i=n.__extendsNames||[],a=oi(o,s,i),c={};zt(e,a,c,void 0,s),n.__sourcemap=c}else{let s=oi(o);zt(e,s)}return e},M_=(e,t,r={})=>(Xc(e,t,r),el(e,t,r),tl(e,t,r),e)});function Kp(e){return Object.keys(e).filter(t=>/^[A-Z]/.test(t))}function Gp(e){return Object.keys(e).filter(t=>/^\d+$/.test(t))}function Yp(e,t,r){let{context:n}=t||{},[o]=ao(r),s=r||o;return n?.components?.[s]||n?.pages?.[s]}var Ht,qp=j(()=>{"use strict";rl();Te();Ht=e=>{if(!w(e)||!e.length)return!1;let t=e.charCodeAt(0);return t>=65&&t<=90}});function F_(e,t){let{props:r,on:n}=t,o=ln(e.split("on")[1]),s=n[o],i=r[e];A(s)?n[o]=(...a)=>{if(s(...a)!==!1&&A(i))return i(...a)}:n[o]=i}var N_=j(()=>{"use strict";qs();Te()});function nl(e,t={}){let r=t.cachedKeys||[];for(let n in e){let o=e[n];if(n.length>2&&n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n[2]===n[2].toUpperCase()&&(A(o)||o!=null&&ro(this.context))){let g=ln(n.slice(2));e.on&&(e.on[g]=o),delete e[n];continue}if(n==="childProps"){e.props[n]=o,delete e[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(B_.has(u)){e.props[n]=o,delete e[n],r.push(n);continue}let d=Xp.test(n)||j_.test(n)||XE(o),p=kr.has(n);!d&&!p&&(n in e.props||(e.props[n]=o),delete e[n],r.push(n))}return e}function ol(e=this,t){let r=t.cachedKeys||[];for(let n in e.props){let o=e.props[n],s=n.length>2&&n.charCodeAt(0)===111&&n.charCodeAt(1)===110,i=A(o)||o!=null&&ro(this.context);if(s&&i){F_(n,e),delete e.props[n];continue}if(r.includes(n)||n==="childProps")continue;let a=n.charAt(0);if(B_.has(a))continue;let c=this.define?.[n],l=this.context?.define?.[n],f=k(c)||A(c),u=k(l)||A(l),d=Xp.test(n)||j_.test(n),p=kr.has(n);(d||p||f||u)&&(e[n]===void 0||o===null)&&(e[n]=o,e.props&&delete e.props[n])}return e}function sl(e=this){let t=[];return nl.call(this,e,{cachedKeys:t}),ol.call(this,e,{cachedKeys:t}),e}function Zp(e={}){return e.on||(e.on={}),e.props||(e.props={}),sl.call(this,e)}function Qp(e,t){this.__element.update({props:e},t)}function gi(e){let t={update:Qp.bind(e.props),__element:e};Object.setPrototypeOf(e.props,t)}var Xp,j_,B_,YE,XE,pi,ui,Jp,hi,mi,yi,il,di,eh,th,rh=j(()=>{"use strict";to();N_();sr();Te();qs();oo();Xp=/^[A-Z]/,j_=/^\d+$/,B_=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),YE=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),XE=e=>{if(!e||typeof e!="object"||Array.isArray(e))return!1;for(let t in e)if(YE.has(t)||Xp.test(t))return!0;return!1},pi=(e,t,r)=>{let{props:n,__ref:o}=e;if(o.__propsStack=[],n)o.__initialProps=n;else return{};return N(n)?{...n}:(o.__propsStack.push(n),{})};ui=e=>qe(e)("string","number")?{inheritedString:e}:e,Jp=(e,t)=>!e||!t.length?!1:t.includes(e),hi=(e,t)=>{let{__ref:r}=e,n=r.__propsStack||[],o=t.props;if(!o)return n;let s=o[e.key],i=o.childProps||t.childProps,a=e.props?.ignoreChildProps;if(i&&!a){let c=ui(i);n.unshift(c)}if(s){let c=ui(s);n.unshift(c)}return n};mi=e=>{let t=new Set;return e.filter(r=>!r||vr.has(r)||t.has(r)?!1:(t.add(r),!0))},yi=(e,t,r)=>(t.props=e.reduce((n,o)=>{if(vr.has(o))return n;for(;A(o);)o=fe(o,t);return ne(n,le(o,{exclude:vr}))},{}),gi(t),t.props),il=(e,t)=>{let{props:r,__ref:n}=e,o=n.__propsStack||[];if(t?.props&&(o=[...hi(e,t)]),k(r)?o.push(r):r==="inherit"&&t?.props?o.push(t.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=mi(o),n.__propsStack},di=(e,t)=>{let{__ref:r}=e,n=il(e,t);n.length?yi(n,e):(r.__propsStack=[],e.props={})},eh=function(e,t,r){let{__ref:n}=e;if(n.__if)di(e,t);else try{di(e,t)}catch(o){e.context?.designSystem?.verbose&&console.warn("initProps error at",n.path?.join("."),o),e.props={},n.__propsStack=[]}return gi(e),e},th=(e,t,r)=>{let{__ref:n}=t,s=[...n.__propsStack||[]],i=hi(t,r);return i.length&&(s=[...i,...s]),e&&(s=[e,...s]),n.__propsStack=mi(s),n.__propsStack.length&&yi(n.__propsStack,t),t}});var U_,al,cl,ll,fl,nh,ul,dl,pl,oh,V_=j(()=>{"use strict";rl();Hc();js();rh();jp();Te();U_="production",al=(e,t,r)=>{let n=t.childExtends&&t.childExtends.tag,o=t.childProps&&t.childProps.tag,s=so.body.has(r)&&r;return{text:e,tag:n||o||s||"string"}},cl=(e,t,r)=>{if(e===void 0)return(U_==="test"||U_==="development")&&console.warn(r,"element is undefined in",t?.__ref?.path),{};if(e!==null)return e===!0?{}:qe(e)("string","number")?al(e,t,r):A(e)?{props:e}:e},ll=(e,t)=>{let r={};return r.origin=e,r.parent=t,r},fl=(e,t,r,n,o)=>{if(!t)return o;if(or(t)){let s={key:":root",node:t};return o[`${r}_parent`]=s,s}return t},nh=(e,t)=>{let{__ref:r}=e,{__ref:n}=t,o=t&&t.key===":root";r?.root||(r.root=o?e:n?.root)},ul=(e,t,r)=>{let{__ref:n}=t;return n||(n=t.ref={}),n.path||(n.path=[]),n.path.concat(r)},dl=(e,t,r,n,o)=>(n.context&&!o.context&&!e.context&&(o.context=n.context),n.context||t.context||o.context||e.context),pl=(e,t,r)=>{let n=ll(e,t);return e.__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=ii(e,t,r),n.path=ul(e,t,r),n},oh=(e,t,r,n,o)=>{let i=e?.__hash?{extends:[e]}:cl(e,t,r);if(!i)return;let a=fl(i,t,r,n,o),c=ri(i,a,r);pl(i,a,c);let l=pi(i,a,c),f=dl(i,a,c,n,o),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var sh,hl,gl,ml,yl,ih,bl,ah,ch,lh,fh,z_,bi,ir,Wt,H_=j(()=>{"use strict";Qn();to();sr();Te();sh=e=>{let{state:t,props:r,__ref:n}=e,o=r?.state||t;return qe(o)("string","number")?(n.__state=o,{value:o}):o===!0?(n.__state=e.key,{}):o?(n.__hasRootState=!0,o):!1},hl=(e,t)=>{if(!e.includes("~/"))return;if(e.split("~/").length>1)return t.root},gl=(e,t)=>{if(!e.includes("../"))return;let n=e.split("../").length-1;for(let o=0;o<n;o++){if(!t.parent)return null;t=t.parent}return t},ml=(e,t,r={})=>{let n=w(e)?e.split("/"):[e],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=t[i];c||(c=t[i]={}),c[a]||(c[a]={}),e=a,t=c}return r.returnParent?t:t[e]},yl=(e,t,r={})=>{let o=e.__ref.__state;if(!bl(e))return;let s=hl(o,t.state),i=t.state;if(s)i=s,o=o.replaceAll("~/","");else{let a=gl(o,t.state);a&&(i=a,o=o.replaceAll("../",""))}if(i)return ml(o,i,r)},ih=(e,t)=>{let r=e.__ref,n=yl(e,t);if(n===void 0)return e.state;if(qe(n)("object","array"))return le(n);if(qe(n)("string","number","boolean"))return r.__stateType=typeof n,{value:n};console.warn(r.__state,"is not present. Replacing with",{})},bl=e=>{let{__ref:t}=e,r=t?.__state;return!!(r&&qe(r)("number","string","boolean"))},ah=function(e){return N(e)?!!(e.update&&e.parse&&e.clean&&e.create&&e.parent&&e.destroy&&e.rootUpdate&&e.parentUpdate&&e.keys&&e.values&&e.toggle&&e.replace&&e.quietUpdate&&e.quietReplace&&e.add&&e.apply&&e.applyReplace&&e.setByPath&&e.setPathCollection&&e.removeByPath&&e.removePathCollection&&e.getByPath&&e.applyFunction&&e.__element&&e.__children):!1},ch=(e,t)=>{if(!e)return t||{};let r=e.split("/"),n={},o=n,s=r.length-1;for(let i=0;i<=s;i++)o[r[i]]=i===s?t||{}:{},o=o[r[i]];return n},lh=(e,t)=>{let{__element:r}=t,n=r?.state;if(!n)return;let o=le(n,fn),s={[e.key]:o},i=k(n.__depends)?{...n.__depends,...s}:s;return Array.isArray(n)?zs(n,{...Object.getPrototypeOf(n),__depends:i}):Object.setPrototypeOf(n,{...Object.getPrototypeOf(n),__depends:i}),o},fh=(e,t,r={})=>{let{overwrite:n}=r;if(!n)return;let o=n==="shallow";if(n==="merge"){ne(e,t,fn);return}(o?dn:Ke)(e,t,fn)},z_="__polyglotSeededKeys",bi=e=>{if(!k(e))return new Set;let t=e[z_];if(!(t instanceof Set)){t=new Set;try{Object.defineProperty(e,z_,{value:t,enumerable:!1,writable:!0,configurable:!0})}catch{}}return t},ir=(e,t,r)=>bi(e).has(t)?!0:!k(r)||r[t]===void 0,Wt=(e,t)=>(bi(e).add(t),t)});var ZE,uh,W_=j(()=>{"use strict";ZE=(e,t)=>{let r=t;for(;r;){if(r===e)return!0;r=Object.getPrototypeOf(r)}return!1},uh=(e,t)=>{let{__ref:r}=e,n=e.context||t.context||r.root?.context;n&&!n.globalScope&&(n.globalScope={});let o=t.scope||r.root?.scope,s=n?.globalScope;if(!e.scope)o?e.scope=o:s?e.scope=Object.create(s):e.scope={};else if(typeof e.scope=="object"&&e.scope!==null&&Object.getPrototypeOf(e.scope)===Object.prototype){let i=o||s;i&&!ZE(e.scope,i)&&Object.setPrototypeOf(e.scope,i)}}});var q_,_l,Ar,xl,dh,ph=j(()=>{"use strict";Te();oo();q_=(e,t)=>{let r="on"+e.charAt(0).toUpperCase()+e.slice(1);return t[r]},_l=(e,t,r,n,o)=>{if(e=no(e,t),!!A(e))try{let s=e.call(t,t,r||t.state,n||t.context,o);return s&&typeof s.then=="function"&&s.catch(i=>{t.error=i,i instanceof ReferenceError?console.warn("[DOMQL] Async event warning:",i.message):console.error("[DOMQL] Async event error:",i)}),s}catch(s){if(t.error=s,s instanceof ReferenceError?console.warn("[DOMQL] Event handler warning:",s.message):console.error("[DOMQL] Event handler error:",s),t.context?.strictMode)throw s}},Ar=(e,t,r)=>{if(!t)throw new Error("Element is required");Ee(e,t,r);let n=q_(e,t);if(n){let{state:o,context:s}=t;return _l(n,t,o,s,r)}},xl=(e,t,r,n,o,s)=>{if(e=no(e,r),!!A(e))try{let i=e.call(r,t,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}},dh=(e,t,r,n)=>{Ee(e,r,t,n);let o=q_(e,r);if(o){let{state:s,context:i}=r;return xl(o,t,r,s,i,n)}}});var hh,_i,gh=j(()=>{"use strict";hh={},_i={}});var G_={};I(G_,{restAdapter:()=>K_,setup:()=>QE});var JE,ar,QE,K_,Y_=j(()=>{"use strict";JE=(e,t,r)=>{let n=t&&!t.startsWith("/")?"/":"",o=new URL(`${e}${n}${t}`);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()},ar=async(e,t)=>{let r=await globalThis.fetch(e,t),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}},QE=async({url:e,headers:t,auth:r,fetchOptions:n})=>{if(!e)throw new Error("@symbo.ls/fetch rest: url is required");return K_(e,t,r,n)},K_=(e,t={},r,n={})=>{let o=r?.token||null,s=f=>{let u={...t,...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||e;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 ar(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 ar(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 ar(c(r.signOutUrl,r.baseUrl),a({method:"POST",headers:s()})),o=null,{error:null}),select:({from:f,params:u,select:d,limit:p,offset:g,order:h,single:m,headers:_,baseUrl:b})=>{let y={...u};return d&&(y.select=d),p&&(y.limit=p),g&&(y.offset=g),m&&(y.single=!0),h&&(typeof h=="string"?y.order=h:Array.isArray(h)?y.order=h.map(x=>`${x.by}:${x.asc===!1?"desc":"asc"}`).join(","):h.by&&(y.order=`${h.by}:${h.asc===!1?"desc":"asc"}`)),ar(JE(b||e,f||"",y),a({headers:s(_)}))},rpc:({from:f,params:u,headers:d,baseUrl:p})=>ar(c(`rpc/${f}`,p),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),insert:({from:f,data:u,headers:d,baseUrl:p})=>ar(c(f,p),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),update:({from:f,data:u,params:d,method:p,headers:g,baseUrl:h})=>{let m=d?.id||u?.id,_=m?`${f}/${m}`:f;return ar(c(_,h),a({method:p||"PATCH",headers:i(g),body:JSON.stringify(u)}))},upsert:({from:f,data:u,params:d,method:p,headers:g,baseUrl:h})=>{let m=d?.id||u?.id,_=m?`${f}/${m}`:f;return ar(c(_,h),a({method:p||"PUT",headers:i(g),body:JSON.stringify(u)}))},delete:({from:f,params:u,headers:d,baseUrl:p})=>{let g=u?.id,h=g?`${f}/${g}`:f;return ar(c(h,p),a({method:"DELETE",headers:s(d)}))}}}});var Z_={};I(Z_,{localAdapter:()=>X_,setup:()=>tA});var wl,eA,tA,X_,J_=j(()=>{"use strict";wl=(e,t)=>{if(!t)return!0;for(let r in t){let n=t[r];if(n===null){if(e[r]!==null&&e[r]!==void 0)return!1}else if(Array.isArray(n)){if(!n.includes(e[r]))return!1}else if(typeof n=="object"){for(let o in n)if(o==="gt"&&!(e[r]>n[o])||o==="gte"&&!(e[r]>=n[o])||o==="lt"&&!(e[r]<n[o])||o==="lte"&&!(e[r]<=n[o])||o==="neq"&&e[r]===n[o]||o==="like"&&!String(e[r]).includes(n[o]))return!1}else if(e[r]!==n)return!1}return!0},eA=(e,{order:t,limit:r,offset:n,single:o})=>{let s=[...e];if(t){let i=typeof t=="string"?t:t.by,a=t.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}},tA=async({data:e,...t})=>X_(e,t),X_=(e={},t={})=>{let r={},n={},o=t.persist!==!1&&typeof localStorage<"u",s=t.prefix||"smbls_db_",i=f=>{if(!r[f])if(o)try{let u=localStorage.getItem(s+f);r[f]=u?JSON.parse(u):e[f]||[]}catch{r[f]=e[f]||[]}else r[f]=e[f]||[];return r[f]},a=f=>{if(o)try{localStorage.setItem(s+f,JSON.stringify(r[f]))}catch{}},c=(f,u,d,p)=>{let g=n[f];if(g)for(let h of g)h(d,p,{event:u,table:f})},l=Date.now();return{name:"local",store:r,select:async({from:f,params:u,...d})=>{let g=i(f).filter(h=>wl(h,u));return eA(g,d)},insert:async({from:f,data:u})=>{let d=i(f),g=(Array.isArray(u)?u:[u]).map(h=>{let m={id:h.id||++l,...h};return d.push(m),m});a(f);for(let h of g)c(f,"INSERT",h,null);return{data:Array.isArray(u)?g:g[0],error:null}},update:async({from:f,data:u,params:d})=>{let p=i(f),g=[];for(let h=0;h<p.length;h++)if(wl(p[h],d)){let m={...p[h]};Object.assign(p[h],u),g.push(p[h]),c(f,"UPDATE",p[h],m)}return a(f),{data:g,error:null}},upsert:async({from:f,data:u,params:d})=>{let p=i(f),g=Array.isArray(u)?u:[u],h=[];for(let m of g){let _=d||(m.id!==void 0?{id:m.id}:null),b=_?p.findIndex(y=>wl(y,_)):-1;if(b>-1){let y={...p[b]};Object.assign(p[b],m),h.push(p[b]),c(f,"UPDATE",p[b],y)}else{let y={id:m.id||++l,...m};p.push(y),h.push(y),c(f,"INSERT",y,null)}}return a(f),{data:Array.isArray(u)?h:h[0],error:null}},delete:async({from:f,params:u})=>{let d=i(f),p=[];for(let g=d.length-1;g>=0;g--)wl(d[g],u)&&(p.push(d[g]),d.splice(g,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=(g,h,m)=>{u&&u!=="*"&&u!==m.event||d(g,h,m)};return n[f].push(p),()=>{let g=n[f].indexOf(p);g>-1&&n[f].splice(g,1)}}}}});var gn={};I(gn,{createAdapter:()=>aA,default:()=>yA,executeFetch:()=>Ei,fetchPlugin:()=>Sh,initAdapterAuth:()=>El,parseDuration:()=>wi,queryClient:()=>mA,registerAdapter:()=>iA,resolveDb:()=>rx});var rA,nA,Sl,xi,kl,bh,oA,sA,iA,aA,rx,wi,Ue,nx,lo,cA,Ci,Si,ki,vl,xh,Cl,lA,Q_,mh,ox,sx,fo,ex,fA,tx,uA,Al,_h,ix,El,wh,gt,Et,vi,hn,qt,Tr,dA,pA,hA,yh,gA,Ei,mA,Sh,yA,Or=j(()=>{"use strict";P();rA=["select","rpc","insert","update","upsert","delete","subscribe"],nA={rest:()=>Promise.resolve().then(()=>(Y_(),G_)),local:()=>Promise.resolve().then(()=>(J_(),Z_))},Sl=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),xi=(()=>{if(typeof globalThis<"u"&&globalThis[Sl])return globalThis[Sl];let e={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Sl,{value:e,writable:!1,configurable:!1,enumerable:!1}),globalThis[Sl]}catch{}return e})(),kl=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),bh=(()=>{if(typeof globalThis<"u"&&globalThis[kl])return globalThis[kl];let e={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,kl,{value:e,writable:!1,configurable:!1,enumerable:!1}),globalThis[kl]}catch{}return e})(),oA=5e3,sA=e=>new Promise(t=>{if(xi[e])return t(xi[e]);let r=bh[e]||=[],n=!1,o=()=>{n||(n=!0,t(xi[e]||null))};r.push(o),setTimeout(o,oA)}),iA=(e,t)=>{xi[e]=t;let r=bh[e];if(r&&r.length){bh[e]=[];for(let n of r)n()}},aA=e=>{let t={};for(let r of rA)e[r]&&(t[r]=e[r]);return t.name=e.name||"custom",t},rx=async e=>{if(!e)return null;if(typeof e.select=="function")return e;let{adapter:t,...r}=e,n=typeof t=="string"?t:typeof e=="string"?e:null;if(!n)return null;let o=xi[n]||nA[n];if(!o&&(o=await sA(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)},wi=e=>{if(!e)return 0;if(typeof e=="number")return e;let t=e.match(/^(\d+)(ms|s|m|h)$/);if(!t)return 0;let r=parseInt(t[1]),n=t[2];return n==="ms"?r:n==="s"?r*1e3:n==="m"?r*6e4:n==="h"?r*36e5:0},Ue=new Map,nx=new Map,lo=new Map,cA=(e,t,r)=>{if(e.cache?.key)return e.cache.key;let n=uA(e.params),o=r?`${r}:`:"",s=`${e.from}:${e.method}:${o}${JSON.stringify(n||"")}`;return t?`${s}:${t}`:s},Ci=e=>Ue.get(e)||null,Si=(e,t,r)=>{let n=Ue.get(e),o={data:t,error:r,time:Date.now(),stale:!1};Ue.set(e,o);let s=nx.get(e);if(s)for(let i of s)A(i)&&i(o);return o},ki=e=>{if(e){let t=Ue.get(e);t&&(t.stale=!0);return}for(let[,t]of Ue)t.stale=!0},vl=e=>{if(e){Ue.delete(e);return}Ue.clear()},xh=e=>!e&&e!==!1?{staleTime:6e4,gcTime:3e5}:e===!1?null:e===!0?{staleTime:6e4,gcTime:3e5}:typeof e=="number"?{staleTime:e,gcTime:Math.max(e*5,3e5)}:w(e)?{staleTime:wi(e),gcTime:3e5}:{staleTime:wi(e.stale||e.staleTime)||6e4,gcTime:wi(e.gc||e.gcTime||e.expire)||3e5,key:e.key},Cl=null,lA=()=>{Cl||(Cl=setInterval(()=>{let e=Date.now();for(let[t,r]of Ue){let n=nx.get(t);!(n&&n.size>0)&&e-r.time>(r.gcTime||3e5)&&Ue.delete(t)}},3e4),Cl.unref&&Cl.unref())};lA();Q_=3,mh=e=>Math.min(1e3*2**e,3e4),ox=e=>{let t=e.retry;return t===!1?{count:0}:t===!0||t===void 0?{count:Q_,delay:mh}:typeof t=="number"?{count:t,delay:mh}:{count:t.count??Q_,delay:A(t.delay)?t.delay:typeof t.delay=="number"?()=>t.delay:mh}},sx=async(e,t)=>{let{count:r,delay:n}=t,o;for(let s=0;s<=r;s++)try{let i=await e();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}},fo={focus:new Set,online:new Set},ex=!1,fA=()=>{if(ex||typeof window>"u")return;ex=!0;let e=()=>{for(let r of fo.focus)r()},t=()=>{for(let r of fo.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&e()}),window.addEventListener("focus",e),window.addEventListener("online",t)},tx=(e,t)=>{let r=t.__ref;if(e===!0)return{from:r.__state||t.key,method:"select",query:!0,on:"create"};if(w(e))return{from:e,method:"select",query:!0,on:"create"};if(k(e)){let n={...e};return n.from=n.from||r.__state||t.key,n.method=n.method||"select",n.on=n.on||"create",n.query===void 0&&(n.query=!0),n}return null},uA=e=>(!e||A(e),e),Al=(e,t)=>{let r=e?.state?.root||t?.state?.root;if(r?.lang)return r.lang},_h=(e,t)=>{let n=(e?.state?.root||t?.state?.root)?.__fetchScope;return n?String(n):void 0},ix=(e,t,r)=>{let n;if(!e)n=void 0;else if(A(e))n=e(t,t.state);else{n={};for(let o in e){let s=e[o];n[o]=A(s)?s(t,t.state):s}}return n},El=async(e,t)=>{if(!e||e.__authInitialized||(e.__authInitialized=!0,!e.getSession))return;let r=(n,o)=>{let s=t.state?.root;s?.update&&s.update({auth:{user:n,session:o,loading:!1}})};try{let n=await e.getSession();r(n?.user||null,n)}catch(n){console.warn("[fetch] Failed to restore auth session:",n.message)}e.onAuthStateChange&&e.onAuthStateChange((n,o)=>{r(o?.user||null,o)})},wh=async(e,t)=>{if(A(e.select))return e.auth!==!1&&await El(e,t),e;if(e.__resolved)return e.auth!==!1&&await El(e.__resolved,t),e.__resolved;if(e.__resolving)return e.__resolving;e.__resolving=rx(e);let r=await e.__resolving;return delete e.__resolving,r?(r.auth=e.auth,r.url=e.url,r.key=e.key,e.__resolved=r,t.fetch=r,e.auth!==!1&&await El(r,t),r):null},gt=(e,t,...r)=>{let n=A(e[t])?e[t]:null;n&&n.call(e,...r,e,e.state,e.context)},Et=(e,t,r,...n)=>{let o=e&&A(e[r])?e[r]:null;o&&o.call(t,...n,t,t.state,t.context)},vi=e=>{let t={},r=e.node;if(!r)return t;if(r.tagName==="FORM"){let o=new FormData(r);for(let[s,i]of o.entries())t[s]=i;return t}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"?t[i]=s.checked:s.type==="file"?t[i]=s.files:t[i]=s.value)}return t},hn=(e,t,r,n={})=>{let o=r&&r.startsWith("~/"),s=o&&e.state?.root||e.state;if(s?.update)if(o){let i=r.slice(2);t&&typeof t=="object"&&!Array.isArray(t)&&i in t?s.update(t,{preventFetch:!0,...n}):s.update({[i]:t},{preventFetch:!0,...n})}else{let i=r?{[r]:t}:t;s.update(i,{preventFetch:!0,...n})}},qt=(e,t)=>{let r=e?.__ref;r&&(r.__fetchStatus=t,r.__fetching=t.isFetching,r.__fetchError=t.error)},Tr=async(e,t,r,n={})=>{let o=r?.fetch;if(!o||!t||!t.__ref)return;let s=t.__ref,i=_h(t,r);(!s.__fetchScopeOwner||s.__fetchScopeOwner.scope!==i)&&(s.__fetchScopeOwner={scope:i});let a=s.__fetchScopeOwner,c=()=>t.__ref===s&&s.__fetchScopeOwner===a&&_h(t,r)===i;if(e.enabled===!1||A(e.enabled)&&!e.enabled(t,t.state)||e.skip===!0||A(e.skip)&&e.skip(t,t.state))return;let l=await wh(o,r);if(!l||!c())return;let{from:f,method:u,query:d,params:p,cache:g,transform:h,single:m,auth:_,fields:b,as:y,limit:x,offset:S,order:v,headers:D,baseUrl:L,page:T,cursor:R,getNextPageParam:V,getPreviousPageParam:Ne,infinite:q,placeholderData:W,initialData:re,select:B,keepPreviousData:X}=e,$e=w(B)?B:void 0;if(d&&A(t.getQuery)){let ae=t.getQuery(l.name||"paths");ae&&($e=ae.select||ae.length&&ae.join(",")||$e)}let z=ix(p,t,r),de=xh(g),F=ox(e),J=Al(t,r),be=J?`:${J}`:"",K=i?`${i}:`:"",$=de?g?.key||`${f}:${u}:${K}${JSON.stringify(z||"")}${q?":infinite":""}${T?":p"+JSON.stringify(T):""}${be}`:null;if(!s.__fetchInitialized&&$&&(s.__fetchInitialized=!0,re!==void 0)){let ae=A(re)?re():re;Si($,ae,null)}if((u==="select"||u==="rpc")&&$&&de){let ae=Ci($);if(ae&&!ae.error){let Q=Date.now()-ae.time,xe=ae.stale||Q>(de.staleTime||0),H=ae.data;if(A(B)&&(H=B(H,t,t.state)),h&&(H=h(H,t,t.state)),!c())return;if(hn(t,H,y),!xe){qt(t,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(W!==void 0){let Q=A(W)?W(t,t.state):W;Q!==void 0&&hn(t,Q,y)}}if($&&lo.has($)&&!n.force){let ae=lo.get($);try{let Q=await Promise.race([ae,new Promise((xe,H)=>setTimeout(()=>H("DEDUP_TIMEOUT"),15e3))]);if(!c())return;if(Q?.data!==void 0){let xe=Q.data;if(A(B)&&(xe=B(xe,t,t.state)),h&&(xe=h(xe,t,t.state)),!c())return;hn(t,xe,y),gt(t,"onFetchComplete",xe),Et(e,t,"onFetchComplete",xe)}}catch{if(!c())return}return}let _e=!Ci($)?.data;qt(t,{isFetching:!0,isLoading:_e,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),gt(t,"onFetchStart"),Et(e,t,"onFetchStart");let ie=r?.analyze?.emitNetwork,Ft=ie?typeof performance<"u"?performance.now():Date.now():0;ie&&ie({phase:"start",mode:"query",from:f,method:u,cacheKey:$,lang:J});let Le=sx(async()=>{if(!c())return;if(_!==!1&&l.auth!==!1&&l.getSession){let H=await l.getSession();if(!c())return;if(_===!0&&!H){let je={message:"Not authenticated"};return qt(t,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:je,status:"error",fetchStatus:"idle"}),gt(t,"onFetchError",je),Et(e,t,"onFetchError",je),{data:null,error:je}}}let ae=l[u];if(!A(ae))return{data:null,error:{message:`Method "${u}" not found on adapter`}};let Q={from:f,select:$e,params:z,single:m,limit:x,offset:S,order:v,headers:D,baseUrl:L},xe=Al(t,r);if(xe&&(Q.headers={...Q.headers,"Accept-Language":xe}),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 H=e.pageSize||x||20;Q.offset=(T-1)*H,Q.limit=H}}if(R!==void 0&&(Q.params={...Q.params,cursor:R}),u==="insert"||u==="update"||u==="upsert"){let H;if(b===!0||e.on==="submit")H=vi(t);else if(O(b)){let je=vi(t);H={};for(let pd of b)H[pd]=je[pd]}else t.state?.parse?H=t.state.parse():k(t.state)&&(H={...t.state});h&&(H=h(H,t,t.state)),Q.data=H}if(u==="rpc"){let H=z;if(e.on==="submit"){let je=vi(t);H=e.transformParams?e.transformParams(je,t,t.state):je}Q.params=H}if(u==="subscribe"){let H=l.subscribe({from:f,params:z,on:e.subscribeOn},(je,pd,UD)=>{c()&&(hn(t,je,y),gt(t,"onFetchComplete",je),Et(e,t,"onFetchComplete",je))});return c()?(s.__unsubscribe=H,{data:null,error:null,subscribed:!0}):(A(H)&&H(),{data:null,error:null,subscribed:!0})}return ae(Q)},F);$&&lo.set($,Le);try{let ae=await Le;if(!c()||ae?.subscribed)return;let{data:Q,error:xe}=ae||{};if(xe){$&&Si($,null,xe),qt(t,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:xe,status:"error",fetchStatus:"idle"}),gt(t,"onFetchError",xe),Et(e,t,"onFetchError",xe),ie&&ie({phase:"error",mode:"query",from:f,method:u,cacheKey:$,error:xe.message||xe,durationMs:(typeof performance<"u"?performance.now():Date.now())-Ft});return}if(Q!==void 0){if((u==="select"||u==="rpc")&&$){let je=Si($,Q,null);je.gcTime=de?.gcTime||3e5}let H=Q;if(q&&O(Q)&&(s.__pages||(s.__pages=[]),n.direction==="previous"?s.__pages.unshift(Q):s.__pages.push(Q),H=s.__pages.flat(),V&&(s.__nextPageParam=V(Q,s.__pages),s.__hasNextPage=s.__nextPageParam!=null),Ne&&(s.__prevPageParam=Ne(Q,s.__pages),s.__hasPreviousPage=s.__prevPageParam!=null)),A(B)&&(H=B(H,t,t.state)),h&&(H=h(H,t,t.state)),!c())return;(!X||H!==void 0)&&hn(t,H,y),qt(t,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),gt(t,"onFetchComplete",H),Et(e,t,"onFetchComplete",H),ie&&ie({phase:"success",mode:"query",ok:!0,from:f,method:u,cacheKey:$,durationMs:(typeof performance<"u"?performance.now():Date.now())-Ft})}}catch(ae){if(!c())return;qt(t,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:ae,status:"error",fetchStatus:"idle"}),gt(t,"onFetchError",ae),Et(e,t,"onFetchError",ae),ie&&ie({phase:"error",mode:"query",from:f,method:u,cacheKey:$,error:ae.message||String(ae),durationMs:(typeof performance<"u"?performance.now():Date.now())-Ft})}finally{$&&lo.get($)===Le&&lo.delete($)}},dA=(e,t,r)=>{let n=e.on,o=t.__ref;o.__fetchListeners||(o.__fetchListeners=[]);let s=e.__runner||Tr;if(n==="submit"){let i=c=>{c.preventDefault(),s(e,t,r)},a=t.node;a&&(a.addEventListener("submit",i),o.__fetchListeners.push(()=>a.removeEventListener("submit",i)))}else if(n==="click"){let i=()=>s(e,t,r),a=t.node;a&&(a.addEventListener("click",i),o.__fetchListeners.push(()=>a.removeEventListener("click",i)))}else n==="stateChange"&&(o.__fetchOnStateChange=()=>s(e,t,r))},pA=(e,t,r)=>{let n=t.__ref;n.__fetchCleanups||(n.__fetchCleanups=[]),fA();let o=e.refetchInterval;if(o){let s=typeof o=="number"?o:wi(o);if(s>0){let i=setInterval(()=>{(e.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&Tr(e,t,r,{force:!0})},s);n.__fetchCleanups.push(()=>clearInterval(i))}}if(e.refetchOnWindowFocus!==!1){let s=()=>{let i=Al(t,r),a=_h(t,r),c=cA(e,i,a),l=Ci(c),f=xh(e.cache);(!l||l.stale||Date.now()-l.time>(f?.staleTime||0))&&Tr(e,t,r,{force:!0})};fo.focus.add(s),n.__fetchCleanups.push(()=>fo.focus.delete(s))}if(e.refetchOnReconnect!==!1){let s=()=>Tr(e,t,r,{force:!0});fo.online.add(s),n.__fetchCleanups.push(()=>fo.online.delete(s))}},hA=(e,t,r)=>{if(!t.optimistic)return null;let n=e.__ref,o=t.as,s=e.state?.parse?e.state.parse():k(e.state)?{...e.state}:e.state;n.__optimisticSnapshot=s;let i=A(t.optimistic)?t.optimistic(r,s,e):t.optimistic;return i!==void 0&&hn(e,i,o),s},yh=(e,t)=>{let r=e.__ref,n=r.__optimisticSnapshot;n!==void 0&&(hn(e,n,t.as),delete r.__optimisticSnapshot)},gA=async(e,t,r)=>{let n=r?.fetch;if(!n)return;let o=await wh(n,r);if(!o)return;let s=t.__ref,{method:i,from:a,fields:c,transform:l,as:f,on:u,auth:d,headers:p,baseUrl:g,invalidates:h,optimistic:m,onMutate:_,onSuccess:b,onError:y,onSettled:x}=e,S;if(c===!0||u==="submit")S=vi(t);else if(O(c)){let T=vi(t);S={};for(let R of c)S[R]=T[R]}else t.state?.parse?S=t.state.parse():k(t.state)&&(S={...t.state});l&&(S=l(S,t,t.state)),A(_)&&_(S,t,t.state);let v=m?hA(t,e,S):null;s.__fetching=!0,qt(t,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),gt(t,"onFetchStart"),Et(e,t,"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&&yh(t,e);let X={message:"Not authenticated"};gt(t,"onFetchError",X),Et(e,t,"onFetchError",X);return}}let T=o[i];if(!A(T))return;let R={from:a,data:S,headers:p,baseUrl:g};e.params&&(R.params=ix(e.params,t,r));let V=Al(t,r);V&&(R.headers={...R.headers,"Accept-Language":V});let Ne=ox(e),q=await sx(()=>T(R),Ne),{data:W,error:re}=q||{};if(re){v!==void 0&&yh(t,e),qt(t,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:re,status:"error",fetchStatus:"idle"}),gt(t,"onFetchError",re),A(y)&&y(re,S,t),A(x)&&x(null,re,S,t),D&&D({phase:"error",mode:"mutation",from:a,method:i,error:re.message||String(re),durationMs:(typeof performance<"u"?performance.now():Date.now())-L});return}if(delete s.__optimisticSnapshot,W!==void 0){let B=f?{[f]:W}:W;t.state?.update&&t.state.update(B,{preventFetch:!0})}if(qt(t,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),gt(t,"onFetchComplete",W),Et(e,t,"onFetchComplete",W),A(b)&&b(W,S,t),A(x)&&x(W,null,S,t),D&&D({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-L}),h){let B=O(h)?h:[h];for(let X of B)if(X===!0||X==="*")for(let[$e]of Ue)$e.startsWith(a+":")&&ki($e);else ki(X)}}catch(T){v!==void 0&&yh(t,e),qt(t,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:T,status:"error",fetchStatus:"idle"}),gt(t,"onFetchError",T),Et(e,t,"onFetchError",T),A(y)&&y(T,S,t),A(x)&&x(null,T,S,t),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}},Ei=(e,t,r,n)=>{if(!e||!n?.fetch)return;let s=fe(e,t);if(!s)return;let i=O(s)?s.map(c=>tx(fe(c,t),t)).filter(Boolean):[tx(s,t)].filter(Boolean);for(let c of i){let l=c.method==="insert"||c.method==="update"||c.method==="upsert"||c.method==="delete",f=l?gA:Tr;c.on==="create"?f(c,t,n):Promise.resolve().then(()=>{dA({...c,__runner:f},t,n)}),!l&&c.on==="create"&&(c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&pA(c,t,n)}let a=t.__ref;a.refetch=c=>{for(let l of i)Tr(l,t,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};Tr(f,t,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};Tr(f,t,n,{direction:"previous",force:!0})}},mA={invalidateQueries:e=>{if(!e){ki();return}if(w(e))for(let[t]of Ue)(t.startsWith(e)||t.includes(e))&&ki(t);else if(O(e)){let t=e.join(":");for(let[r]of Ue)r.includes(t)&&ki(r)}},removeQueries:e=>{if(!e){vl();return}if(w(e))for(let[t]of Ue)(t.startsWith(e)||t.includes(e))&&vl(t)},getQueryData:e=>Ci(e)?.data??void 0,setQueryData:(e,t)=>{let r=Ci(e),n=A(t)?t(r?.data):t;Si(e,n,null)},prefetchQuery:async(e,t)=>{let r=t?.fetch;if(!r)return;let n=await wh(r,t);if(!n)return;let o=e.cache?.key||`${e.from}:${e.method||"select"}:${JSON.stringify(e.params||"")}`,s=n[e.method||"select"];if(!A(s))return;let i=await s({from:e.from,params:e.params,limit:e.limit,offset:e.offset,order:e.order,single:e.single});if(i?.data!==void 0&&!i?.error){let a=Si(o,i.data,null);a.gcTime=xh(e.cache)?.gcTime||3e5}return i},getCache:()=>Ue,clear:()=>vl(),dropNonLang:e=>{if(!e)return;let t=`:${e}`;for(let[r]of Ue)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(t)||vl(r))}},Sh={name:"fetch",create(e){let t=e.fetch;t&&(e.parent||lo.clear(),Ei(t,e,e.state,e.context))}},yA=Ei});function Ti(e){let t=this,{__ref:r}=t,n=[].concat(e),o=r.root[n[0]];if(!n||!n.length)return console.log(n,"on",t.key,"is undefined");for(;o.key===n[0]&&(n.shift(),!!n.length);)if(o=o[n[0]],!o)return;return o}function vh(e){let t=this,{parent:r}=t;if(A(e))return r.state&&e(r,r.state,r.context)?r:r.parent?r.lookup(e):void 0;if(t[e])return t[e];for(;r.param!==e;){if(r[e])return r[e];if(r=r.parent,!r)return}return r}function Ch(e){let t=this,{__ref:r}=t,n=r?.__children;if(n)for(let o=0;o<n.length;o++){let s=n[o],i=t[s];if(s===e)return i;if(A(e)){let c=e(i,i.state,i.context);if(i.state&&c)return i}let a=i?.lookdown?.(e);if(a)return a}}function Eh(e,t=[]){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===e)t.push(a);else if(A(e)){let c=e(a,a.state,a.context);a.state&&c&&t.push(a)}a?.lookdownAll?.(e,t)}return t.length?t:void 0}}function Tl(e={}){let t=this;if(t.node?.style){for(let r in e){let n=e[r],o=t[r];if(k(n)&&o)Tl.call(o,n);else if(n!=null){let s=r.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),i=String(n).replace(/\s*!important\s*$/,"");t.node.style.setProperty(s,i,"important")}}return t}}function cx(e){let t=this;if(Ar("beforeRemove",t,e)===!1)return t;A(t.node.remove)?t.node.remove():Cr()||(console.warn("This item cant be removed"),t.log()),delete t.parent[t.key],t.parent.__ref&&(t.parent.__ref.__children=Vs(t.parent.__ref.__children,t.key)),Ar("remove",t,e)}function Ah(e){return this[e]}function Th(e,t){let r=this;if(e)return r.update(e,t),r}function Oh(e){return e?this.__ref&&this.__ref[e]:this.__ref}function Oi(){return this.getRef("__children").map(t=>this[t])}function Ri(){return this.getRef().path}function Di(e){let t=null,r=n=>n.__element&&n.root?.isRootState;if(!this)t=ax();else if(r(this))t=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)&&(t=this.state.root||this.parent.state.root)}return t||(t=ax()),e?t?.[e]:t}function Ii(e){let t=this?.__ref?.root||this.getRootState()?.__element;if(!t)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(t).length>0&&e?t[e]:t}function $i(e){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&e?this.getRoot("data")[e]:this.getRoot("data")}function Li(e){let t=this.getRoot()?.context;return e?t[e]:t}function Mi(e){let t=this.context;return e?t[e]:t}function Ol(){let e=this,t=[];for(let r in e)!Object.prototype.hasOwnProperty.call(e,r)||kr.has(r)&&!Ks.has(r)||t.push(r);return t}function Rl(e=[]){let t=this,r={},n=Ol.call(t),o=n.includes("children"),s=e.length?new Set(e):null;for(let i=0;i<n.length;i++){let a=n[i];if(s&&s.has(a)||!Object.prototype.hasOwnProperty.call(t,a)||o&&a==="content")continue;let c=t[a];if(a==="state"){if(t.__ref&&!t.__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(t.__ref&&!t.__ref.__hasRootScope)continue;r[a]=JSON.parse(JSON.stringify(c||{}))}else if(a==="props"){let{__element:l,update:f,...u}=t[a];r[a]=u}else ke(c)&&Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=c)}return r}function Ai(e=[],t=new WeakSet){let r=this;if(t.has(r))return;t.add(r);let n=Rl.call(r,e),o=e.length?new Set(e):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)?Ai.call(a,e,t):a):N(i)&&(n[s]=Ai.call(i,e,t))}return n}function uo(...e){if(Rr!=="test"&&Rr!=="development")return;let t=this,{__ref:r}=t;return console.groupCollapsed(t.key),e.length?e.forEach(n=>console.log(`%c${n}:
21
+ `,"font-weight: bold",t[n])):(console.log(r.path),t.keys().forEach(o=>console.log(`%c${o}:`,"font-weight: bold",t[o]))),console.log(t),console.groupEnd(t.key),t}function Ph(...e){(Rr==="test"||Rr==="development")&&console.log(...e)}function Fi(...e){(Rr==="test"||Rr==="development")&&console.warn(...e)}function mn(...e){if(Rr==="test"||Rr==="development"){if(e[e.length-1]?.debugger)debugger;throw e[e.length-1]?.verbose&&uo.call(this),new Error(...e)}}function Ni(){let e=this,{key:t,parent:r}=e,{__children:n}=r.__ref,o=n.indexOf(t),s=n[o+1];return r[s]}function ji(e){let t=e||this,{key:r,parent:n}=t,{__children:o}=n.__ref;if(!o)return;let s=o.indexOf(r);return n[o[s-1]]}function Bi(e={}){let t=this;t.data||(t.data={}),t.data.varCaches||(t.data.varCaches={});let r=t.data.varCaches,n={},o;for(let s in e)e[s]!==r[s]&&(o=!0,n[s]=e[s]);return{changed:s=>{if(!o)return;let i=s(n,le(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 Dh(e,...t){let r=this.context,n=r.utils?.[e]||r.functions?.[e]||r.methods?.[e]||r.snippets?.[e];if(n)try{let o=n.call(this,...t);return o&&typeof o.then=="function"&&o.catch(s=>{mn.call(this,s)}),o}catch(o){if(mn.call(this,o),r?.strictMode)throw o}}async function Ui(){let e=this,t=e.context?.fetch;if(!t)return null;if(typeof t.select=="function"){if(!t.__authInitialized&&t.getSession){let{initAdapterAuth:o}=await Promise.resolve().then(()=>(Or(),gn));await o(t,e.context)}return t}if(t.__resolved){if(!t.__resolved.__authInitialized&&t.__resolved.getSession){let{initAdapterAuth:o}=await Promise.resolve().then(()=>(Or(),gn));await o(t.__resolved,e.context)}return t.__resolved}if(t.__resolving)return t.__resolving;let r=Promise.resolve().then(()=>(Or(),gn)).then(({resolveDb:o})=>o(t));t.__resolving=r;let n=await r;if(t.__resolved=n,e.context.fetch=n,delete t.__resolving,n?.getSession){let{initAdapterAuth:o}=await Promise.resolve().then(()=>(Or(),gn));await o(n,e.context)}return n}function Vi(e){let t=this,r=e||_i.useStateQuery||t.context?.useStateQuery;if(!r)return null;let n={};if(kh(t,n),r===!0)return n;let o=vA[r];return o?o(n):n}function Ih(e,t){return!!(eo.has(e)||t?.context?.methods?.[e])}var Rr,lx,Pi,ax,Rh,kh,bA,fx,_A,xA,wA,SA,kA,vA,ux=j(()=>{"use strict";ph();to();Te();sr();vp();Qn();gh();Rr="production";lx=null,Pi=e=>{lx=e||null},ax=()=>lx||null;Rh=(e,t,r,n)=>Object.defineProperty(e,t,{get:r,set:n});kh=(e,t)=>{let r=e.__ref;if(!r)return;let n=r.__state;n&&typeof n=="string"&&bA(t,n);let o=r.__children;if(o)for(let a=0;a<o.length;a++){let c=e[o[a]];c&&c.__ref&&kh(c,t)}let s=r.contentElementKey||"content",i=e[s];i&&i.__ref&&kh(i,t)},bA=(e,t)=>{let n=t.replaceAll("../","").replaceAll("~/","").split("/"),o=e;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])}},fx=(e,t=0)=>{let r=" ".repeat(t),n=Object.entries(e);return n.length?n.map(([s,i])=>i===!0?`${r}${s}`:`${r}${s} {
22
+ ${fx(i,t+1)}
23
23
  ${r}}`).join(`
24
- `):""},eA=t=>`{
25
- ${ox(t,1)}
26
- }`,rA=t=>{let e={fields:{},include:[]},r=(o,n)=>{let s=[];for(let i in o)if(o[i]===!0)s.push(i);else{let a=n?`${n}.${i}`:i;e.include.push(a),r(o[i],a)}s.length&&(e.fields[n||"_root"]=s)};return r(t,""),e},oA=t=>{let e=s=>{let i=[],a=[];for(let c in s)if(s[c]===!0)i.push(c);else{let l=e(s[c]),f=[];l.select&&f.push(`$select=${l.select}`),l.expand&&f.push(`$expand=${l.expand}`),a.push(f.length?`${c}(${f.join(";")})`:c)}return{select:i.length?i.join(","):"",expand:a.length?a.join(","):""}},{select:r,expand:o}=e(t),n=[];return r&&n.push(`$select=${r}`),o&&n.push(`$expand=${o}`),n.join("&")},nA=(t,e)=>{let r=[],o=[],n=new Set,s=(f,u,d)=>{n.add(u),d&&o.push(`LEFT JOIN ${u} ON ${u}.${d}_id = ${d}.id`);for(let h in f)f[h]===!0?r.push(`${u}.${h}`):s(f[h],h,u)},i=Object.keys(t);i.length===1&&t[i[0]]!==!0?s(t[i[0]],i[0],null):s(t,"_root",null);let a=[...n][0]||"_root",c=r.length?r.join(", "):"*",l=o.length?`
27
- `+o.join(`
24
+ `):""},_A=e=>`{
25
+ ${fx(e,1)}
26
+ }`,xA=e=>{let t={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;t.include.push(a),r(n[i],a)}s.length&&(t.fields[o||"_root"]=s)};return r(e,""),t},wA=e=>{let t=s=>{let i=[],a=[];for(let c in s)if(s[c]===!0)i.push(c);else{let l=t(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}=t(e),o=[];return r&&o.push(`$select=${r}`),n&&o.push(`$expand=${n}`),o.join("&")},SA=(e,t)=>{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(e);i.length===1&&e[i[0]]!==!0?s(e[i[0]],i[0],null):s(e,"_root",null);let a=[...o][0]||"_root",c=r.length?r.join(", "):"*",l=n.length?`
27
+ `+n.join(`
28
28
  `):"";return`SELECT ${c}
29
- FROM ${a}${l}`},sA=t=>{let e=[],r=(o,n)=>{for(let s in o){let i=n?`${n}/${s}`:s;o[s]===!0?e.push(i):r(o[s],i)}};return r(t,""),e},iA={graphql:eA,"json-api":rA,odata:oA,sql:nA,paths:sA}});var aA,Ah,sx=j(()=>{"use strict";Uc();aA={snapshotId:Gs},Ah=(t,e)=>{let r=t.__ref,{currentSnapshot:o,calleeElement:n}=e;if(!n||n===t){let a=aA.snapshotId();return r.__currentSnapshot=a,[a,t]}let i=n.__ref.__currentSnapshot;return o<i?[i,n,!0]:[i,n]}});var Tl,Th,ix=j(()=>{Tl=new Set(["__proto__","constructor","prototype","_id","__v","id","createdAt","updatedAt","schema"]),Th=t=>typeof t=="string"&&Tl.has(t)});async function Oh(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 ax=j(()=>{"use strict"});var fn,un,Fi,ge,Or,dn,Ni,Ae,Ol,cA,ho,lA,pn,hn,Rh,cx=j(()=>{"use strict";fn=t=>t!=="latest"?`@${t}`:"",un=t=>t?`/${t}`:"",Fi=t=>{let e=typeof t=="string"?t.replace(/\/+$/,""):"";if(!e)return{name:"",subpath:""};let r=e.split("/"),o=e.startsWith("@")?2:1;return{name:r.slice(0,o).join("/"),subpath:r.slice(o).join("/")}},ge={skypack:{url:"https://cdn.skypack.dev",formatUrl:(t,e,r)=>`${ge.skypack.url}/${t}${fn(e)}${un(r)}`},esmsh:{url:"https://esm.sh",formatUrl:(t,e,r)=>`${ge.esmsh.url}/${t}${fn(e)}${un(r)}`},unpkg:{url:"https://unpkg.com",formatUrl:(t,e,r)=>`${ge.unpkg.url}/${t}${fn(e)}${un(r)}?module`},jsdelivr:{url:"https://cdn.jsdelivr.net/npm",formatUrl:(t,e,r)=>`${ge.jsdelivr.url}/${t}${fn(e)}${un(r)}/+esm`},symbols:{url:"https://pkg.symbo.ls",formatUrl:(t,e,r)=>`${ge.symbols.url}/${t}${fn(e)}${un(r)}/+esm`}},Or={"esm.sh":"esmsh",unpkg:"unpkg",skypack:"skypack",jsdelivr:"jsdelivr","pkg.symbo.ls":"symbols"},dn=(t={})=>{let{packageManager:e}=t;return Or[e]||null},Ni=t=>{if(typeof t!="string")return t;let e=t.trim().match(/^[\^~](\d.*)$/);return e?e[1]:t},Ae=(t,e="latest",r="esmsh")=>{let o=ge[r]||ge.esmsh,{name:n,subpath:s}=Fi(t);return o.formatUrl(n||t,Ni(e),s)},Ol=(t,e="latest",r="esmsh")=>{let o=ge[r]||ge.esmsh,n=Ni(e),{name:s,subpath:i}=Fi(t);return`${o.url}/${s||t}${fn(n)}${un(i)}/`},cA=/^node:|^@symbo-ls\//,ho=t=>typeof t=="string"&&cA.test(t),lA=/[<>…]/,pn=t=>typeof t=="string"&&lA.test(t),hn=t=>!!t&&typeof t=="object"&&!Array.isArray(t),Rh=(t,e="skypack",r={})=>{let o=t.dependencies;if(!hn(o))return"";let n=Object.keys(o);if(!n.length)return"";let s=r.pin||{},i={};for(let f of n){if(ho(f)||pn(f))continue;let u=s[f]||o[f]||"latest";i[f]=Ae(f,u,e),f.endsWith("/")||(i[f+"/"]=Ol(f,u,e))}if(!Object.keys(i).length)return"";let a='<script type="importmap">',c="<\/script>",l=`{
29
+ FROM ${a}${l}`},kA=e=>{let t=[],r=(n,o)=>{for(let s in n){let i=o?`${o}/${s}`:s;n[s]===!0?t.push(i):r(n[s],i)}};return r(e,""),t},vA={graphql:_A,"json-api":xA,odata:wA,sql:SA,paths:kA}});var CA,$h,dx=j(()=>{"use strict";Hc();CA={snapshotId:ti},$h=(e,t)=>{let r=e.__ref,{currentSnapshot:n,calleeElement:o}=t;if(!o||o===e){let a=CA.snapshotId();return r.__currentSnapshot=a,[a,e]}let i=o.__ref.__currentSnapshot;return n<i?[i,o,!0]:[i,o]}});var Pl,Lh,px=j(()=>{Pl=new Set(["__proto__","constructor","prototype","_id","__v","id","createdAt","updatedAt","schema"]),Lh=e=>typeof e=="string"&&Pl.has(e)});async function Mh(e){if(document.fullscreenElement)await document.exitFullscreen();else try{await(this.node||document).requestFullscreen()}catch(t){console.warn(`Error attempting to enable fullscreen mode: ${t.message} (${t.name})`)}}var hx=j(()=>{"use strict"});var po,ho,zi,mt,Pr,go,Hi,At,Dl,EA,yn,AA,mo,yo,Fh,gx=j(()=>{"use strict";po=e=>e!=="latest"?`@${e}`:"",ho=e=>e?`/${e}`:"",zi=e=>{let t=typeof e=="string"?e.replace(/\/+$/,""):"";if(!t)return{name:"",subpath:""};let r=t.split("/"),n=t.startsWith("@")?2:1;return{name:r.slice(0,n).join("/"),subpath:r.slice(n).join("/")}},mt={skypack:{url:"https://cdn.skypack.dev",formatUrl:(e,t,r)=>`${mt.skypack.url}/${e}${po(t)}${ho(r)}`},esmsh:{url:"https://esm.sh",formatUrl:(e,t,r)=>`${mt.esmsh.url}/${e}${po(t)}${ho(r)}`},unpkg:{url:"https://unpkg.com",formatUrl:(e,t,r)=>`${mt.unpkg.url}/${e}${po(t)}${ho(r)}?module`},jsdelivr:{url:"https://cdn.jsdelivr.net/npm",formatUrl:(e,t,r)=>`${mt.jsdelivr.url}/${e}${po(t)}${ho(r)}/+esm`},symbols:{url:"https://pkg.symbo.ls",formatUrl:(e,t,r)=>`${mt.symbols.url}/${e}${po(t)}${ho(r)}/+esm`}},Pr={"esm.sh":"esmsh",unpkg:"unpkg",skypack:"skypack",jsdelivr:"jsdelivr","pkg.symbo.ls":"symbols"},go=(e={})=>{let{packageManager:t}=e;return Pr[t]||null},Hi=e=>{if(typeof e!="string")return e;let t=e.trim().match(/^[\^~](\d.*)$/);return t?t[1]:e},At=(e,t="latest",r="esmsh")=>{let n=mt[r]||mt.esmsh,{name:o,subpath:s}=zi(e);return n.formatUrl(o||e,Hi(t),s)},Dl=(e,t="latest",r="esmsh")=>{let n=mt[r]||mt.esmsh,o=Hi(t),{name:s,subpath:i}=zi(e);return`${n.url}/${s||e}${po(o)}${ho(i)}/`},EA=/^node:|^@symbo-ls\//,yn=e=>typeof e=="string"&&EA.test(e),AA=/[<>…]/,mo=e=>typeof e=="string"&&AA.test(e),yo=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Fh=(e,t="skypack",r={})=>{let n=e.dependencies;if(!yo(n))return"";let o=Object.keys(n);if(!o.length)return"";let s=r.pin||{},i={};for(let f of o){if(yn(f)||mo(f))continue;let u=s[f]||n[f]||"latest";i[f]=At(f,u,t),f.endsWith("/")||(i[f+"/"]=Dl(f,u,t))}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 Ph,lx=j(()=>{"use strict";Ph=t=>{if(!t)return"";let e=new Date(t),r=new Intl.DateTimeFormat("en",{year:"numeric"}).format(e),o=new Intl.DateTimeFormat("en",{month:"short"}).format(e);return`${new Intl.DateTimeFormat("en",{day:"2-digit"}).format(e)} ${o}, ${r}`}});var Ih,fx=j(()=>{"use strict";Ih=(t,e)=>{let r=setTimeout(()=>{let{props:o}=t;if(!e.clientHeight){let{node:{clientHeight:n}}=t;n&&(e.clientHeight=n)}if(e.active){if(o.height==="auto")return;t.update({height:e.clientHeight},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});let n=setTimeout(()=>{t.update({height:"auto"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0}),clearTimeout(n)},450)}else t.update({height:"0"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});clearTimeout(r)})}});var Dh,ux=j(()=>{"use strict";Dh=function(e){let r=[0,1];for(let o=2;o<=e;o++)r[o]=r[o-1]+r[o-2];return r[e]}});var $h,dx=j(()=>{"use strict";$h=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function gn(t,e={}){let{window:r=globalThis}=e,{document:o=r.document}=e;return new Promise((n,s)=>{let i=o.querySelector(`script[src="${t}"]`);if(i)return n(i);let a=o.createElement("script");a.src=t,a.async=e.async===!0,a.type=e.type||"text/javascript",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,n(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load script: ${t}`))},o.head.appendChild(a)})}async function Bh(t,e={}){let{window:r=globalThis}=e,{document:o=r.document}=e;return new Promise((n,s)=>{let i=o.querySelector(`link[href="${t}"]`);if(i)return n(i);let a=o.createElement("link");a.href=t,a.rel=e.rel||"stylesheet",a.type="text/css",a.media=e.media||"all",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,n(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load stylesheet: ${t}`))},o.head.appendChild(a)})}var Lh,Mh,Fh,Nh,jh,px=j(()=>{"use strict";Lh=(t,e=!1,r=document,o="text/javascript")=>new Promise((n,s)=>{try{let i=r.createElement("script");i.type=o,i.async=e,i.src=t,i.addEventListener("load",a=>{n({status:!0})}),i.addEventListener("error",a=>{s(new Error({status:!1,message:`Failed to load the script ${t}`}))}),r.body.appendChild(i)}catch(i){s(i)}}),Mh=(t,e=document,r="text/javascript")=>new Promise((o,n)=>{let s=e.createElement("script");s.type=r,s.src=t;let i=e.createElement("div");i.style.cssText="position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(255,255,255,0.8);z-index:9999;",e.body.appendChild(i),s.onload=()=>{console.log(`Successfully loaded: ${t}`),e.body.removeChild(i),o()},s.onerror=()=>{e.body.removeChild(i),n(new Error(`Failed to load: ${t}`))},e.body.appendChild(s)}),Fh=(t,e=document,r,o="text/javascript")=>{let n=new window.XMLHttpRequest;if(n.open("GET",t,!1),n.send(),n.status===200){let s=e.createElement("script");s.type=o,s.text=n.responseText,e.body.appendChild(s),typeof r=="function"&&r()}else throw new Error(`Failed to load the script ${t}`)},Nh=(t,e=!1,r=document,o="text/javascript")=>new Promise((n,s)=>{try{let i=r.createElement("link");i.rel="stylesheet",i.href=t,i.addEventListener("load",a=>{n({status:!0})}),r.head.appendChild(i)}catch(i){s(i)}}),jh=(t,e=!1,r=document,o="text/javascript",n="smbls-script")=>{try{let s=r.createElement("script");s.type=o,s.async=e,s.id=n,s.innerHTML=t,r.body.appendChild(s)}catch(s){console.warn(s)}}});function pA(t,e){if(!e||typeof e!="object")return t;let r=n=>{if(!dA(n))return n;let s=e[n];return s?.src?s.src:n},o={...t};for(let[n,s]of Object.entries(o))typeof s=="string"?o[n]=r(s):Array.isArray(s)&&(o[n]=s.map(i=>typeof i=="string"?r(i):i));return o}function Rl(t,e){if(!t||!e)return;let r=e.split("."),o=t;for(let n of r){if(o==null||typeof o!="object")return;o=o[n]}return o}function hA(t,e,r){let n=(e.config||e.settings||{}).polyglot||e.polyglot,s=r?.lang||n?.defaultLang||"en",a=(n?.translations||{})[s]||{},c=r?.state||{},l={...t};for(let[f,u]of Object.entries(l))typeof u!="string"||!u.includes("{{")||(l[f]=u.replace(/\{\{\s*([^|{}]+?)\s*(?:\|\s*(\w+)\s*)?\}\}/g,(d,h,g)=>{let p=h.trim();if(g==="polyglot")return a[p]??Rl(a,p)??d;if(g==="getLocalStateLang")return Rl(c,p+s)??d;let m=Rl(c,p);return m!==void 0?m:a[p]??Rl(a,p)??d}));return l}function hx(t){let e={...t};for(let[r,o]of Object.entries(e))if(typeof o=="function"){let n=o.toString(),s=n.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | getLocalStateLang }}`;continue}let i=n.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(i){e[r]=`{{ ${i[1]} | polyglot }}`;continue}let a=n.match(/s\.(\w+(?:\.\w+)+)/);if(a){e[r]=`{{ ${a[1]} }}`;continue}delete e[r]}else if(typeof o=="string"){let n=o.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(n){e[r]=`{{ ${n[1]} | getLocalStateLang }}`;continue}let s=o.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | polyglot }}`;continue}if(o.includes("=>")&&o.includes("s.")){let i=o.match(/s\.(\w+(?:\.\w+)+)/);if(i){e[r]=`{{ ${i[1]} }}`;continue}}}return e}function Vh(t,e,r,{isProduction:o=!1,channel:n="production"}={}){let s=t.pages?.[e],i=S(s?.state)&&s?.state,a=s?.metadata||s?.helmet||i||{},c=hx(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=hx(f),d={};if(t.integrations?.seo?d={...t.integrations.seo,...u,...c}:Object.keys(u).length?d={...u,...c}:d={...c},!d.title){let p=t.name||t.key;p?o?d.title=p:n==="development"?d.title=`${p} / dev:symbo.ls`:n==="staging"?d.title=`${p} / staging:symbo.ls`:d.title=`${p} / symbo.ls`:d.title="Symbols demo"}d=hA(d,t,r),d.title&&(l.has("title")||!d["og:title"])&&(l.has("og:title")||(d["og:title"]=d.title)),d.description&&(l.has("description")||!d["og:description"])&&(l.has("og:description")||(d["og:description"]=d.description)),d.title&&!d["twitter:title"]&&(d["twitter:title"]=d.title),d.description&&!d["twitter:description"]&&(d["twitter:description"]=d.description);let h=r?.actualPathname||e;if(d["og:url"]||d.url){let p=(d["og:url"]||d.url||"").replace(/\/$/,"");if(p&&h&&h!=="/"){let m=h.startsWith("/")?h:"/"+h;d["og:url"]=p+m}}d=pA(d,t.files);let g=t.name||t.app?.metadata?.title||t.app?.name||"";for(let[p,m]of Object.entries(d))if(typeof m=="string"&&m.includes("{{")){let b=m.replace(/\{\{[^}]*\}\}/g,"").trim();b?d[p]=b:p==="title"?d[p]=g:delete d[p]}return d}var Ot,fA,mn,uA,Pl,Uh,dA,gx=j(()=>{"use strict";Tt();Ot=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,r=>e[r])},fA=t=>Object.entries(t||{}).filter(([e,r])=>r!==void 0).map(([e,r])=>`${e}="${Ot(r)}"`).join(" "),mn=t=>{let e=5381,r=String(t);for(let o=0;o<r.length;o++)e=(e*33^r.charCodeAt(o))>>>0;return e.toString(36)},uA=new Set(["jsonLd","styles","scripts"]),Pl=t=>{let e=[];if(Array.isArray(t.jsonLd))for(let r of t.jsonLd){if(r==null)continue;let o=typeof r=="string"?r:JSON.stringify(r),n=String(o).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${mn(o)}">${n}<\/script>`)}if(Array.isArray(t.styles))for(let r of t.styles){if(r==null||!String(r).trim())continue;let o=String(r).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${mn(o)}">${o}</style>`)}if(Array.isArray(t.scripts))for(let r of t.scripts){if(!r)continue;let o=typeof r=="string",n=o?r:r.src;if(!n&&!r.body)continue;let s=[];n&&s.push(`src="${Ot(n)}"`),o||(r.type&&s.push(`type="${Ot(r.type)}"`),r.async&&s.push("async"),r.defer&&s.push("defer"),r.integrity&&s.push(`integrity="${Ot(r.integrity)}"`),r.crossorigin&&s.push(`crossorigin="${Ot(r.crossorigin)}"`),r.referrerpolicy&&s.push(`referrerpolicy="${Ot(r.referrerpolicy)}"`),r.nomodule&&s.push("nomodule"));let i=` data-smbls-script="${Ot(n||mn(r.body||""))}"`;if(!o&&r.body){let a=String(r.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${s.join(" ")}${i}>${a}<\/script>`)}else e.push(`<script ${s.join(" ")}${i}><\/script>`)}return e},Uh=(t,e)=>{e||(t={...t,robots:"noindex"});let r=Object.entries(t).reduce((o,[n,s])=>{if(!s&&s!==0&&s!==!1||uA.has(n))return o;if(n==="title")return o.push(`<title>${Ot(s)}</title>`),o;if(n==="canonical")return o.push(`<link rel="canonical" href="${Ot(s)}">`),o;if(n==="manifest")return o.push(`<link rel="manifest" href="${Ot(s)}">`),o;if(n==="favicon"||n==="favicons"||n==="icon"||n==="icons")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="string")o.push(`<link rel="icon" href="${Ot(f)}">`);else if(typeof f=="object"){let u=fA(f);/rel=/.test(u)?o.push(`<link ${u}>`):o.push(`<link rel="icon" ${u}>`)}}),o;if(n==="alternate")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).filter(([d,h])=>h!==void 0).map(([d,h])=>`${d}="${Ot(h)}"`).join(" ");o.push(`<link rel="alternate" ${u}>`)}}),o;let i=(l,f,u="name")=>{if(typeof f=="string"||typeof f=="number"||typeof f=="boolean")o.push(`<meta ${u}="${Ot(l)}" content="${Ot(f)}">`);else if(Array.isArray(f))f.forEach(d=>{if(typeof d=="string"||typeof d=="number"||typeof d=="boolean")o.push(`<meta ${u}="${Ot(l)}" content="${Ot(d)}">`);else if(typeof d=="object"){let h=Object.entries(d).filter(([g,p])=>p!==void 0).map(([g,p])=>`${g}="${Ot(p)}"`).join(" ");o.push(`<meta ${h}>`)}});else if(typeof f=="object"){let d=Object.entries(f).filter(([h,g])=>g!==void 0).map(([h,g])=>`${h}="${Ot(g)}"`).join(" ");o.push(`<meta ${d}>`)}};if(n.startsWith("http-equiv:")){let l=n.replace("http-equiv:","");return i(l,s,"http-equiv"),o}if(n.startsWith("itemprop:")){let l=n.replace("itemprop:","");return i(l,s,"itemprop"),o}let c=["og:","twitter:","fb:","article:","profile:","book:","business:","music:","product:","video:","DC:","DCTERMS:"].find(l=>n.startsWith(l));if(c){let l=n.replace(c,"");return i(`${c.replace(":","")}:${l}`,s,c==="twitter:"||c==="DC:"||c==="DCTERMS:"?"name":"property"),o}if(n.startsWith("apple:")||n.startsWith("msapplication:")){let l=n.startsWith("apple:")?"apple-":"msapplication-",f=n.replace(/^apple:|^msapplication:/,"");return i(`${l}${f}`,s,"name"),o}return i(n,s),o},['<meta charset="UTF-8">','<meta name="viewport" content="width=device-width, initial-scale=1">']);return r.push(...Pl(t)),r.join(`
32
- `)},dA=t=>typeof t=="string"&&t.length>0&&!t.startsWith("/")&&!t.startsWith("http")});var Il,zh,mx=j(()=>{"use strict";Tt();Il=(t,e)=>(T(e)?e:Object.values(e)).reduce((r,o)=>Math.abs(o-t)<Math.abs(r-t)?o:r),zh=(t,e)=>(t=parseFloat(t),S(e)&&(e=Object.values(e)),Il(t,e))});function yn(t){let e=String(t||"").trim();if(!e)return{owner:yx,key:"",full:""};let r=null,o=e;if(e.includes("/")){let s=e.indexOf("/");r=e.slice(0,s),o=e.slice(s+1)}o=o.replace(/\.symbo\.ls$/iu,""),r||(r=yx);let n=o?`${r}/${o}`:"";return{owner:r,key:o,full:n}}async function Dl(t,e={}){if((e.provider||"kv")==="api")return _x(t,e);let o=await SA(t,e);return o||_x(t,e)}async function SA(t,e={}){let r=e.kvBaseUrl||gA,o=e.env||"production",n=`${r}/kv/${encodeURIComponent(t)}?env=${o}`;try{let s=await fetch(n,{method:"GET"});return s.ok&&(await s.json())?.value||null}catch{return null}}async function _x(t,e={}){let r=e.apiBaseUrl||mA,{key:o}=yn(t);try{let n=`${r}/core/projects/libraries/available?search=${encodeURIComponent(o)}&limit=10`,s=await fetch(n,{method:"GET"});if(!s.ok)return null;let i=await s.json(),c=(i?.items||i?.data||(Array.isArray(i)?i:[])).find(h=>{let{key:g}=yn(h?.key);return g.toLowerCase()===o.toLowerCase()});if(!c?.id&&!c?._id)return null;let l=c.id||c._id,f=`${r}/core/projects/${encodeURIComponent(l)}/data?branch=main`,u=await fetch(f,{method:"GET"});if(!u.ok)return null;let d=await u.json();return d?.data||d||null}catch{return null}}async function xx(t,e={}){if(S(t))return t;if(w(t)){let{full:r}=yn(t);if(!r)return null;try{let o=await Dl(r,e);return o||console.warn(`[smbls] Shared library "${r}" not found`),o}catch(o){return console.warn(`[smbls] Failed to fetch shared library "${r}":`,o.message),null}}return null}async function Wh(t,e={}){return!t||!t.length?[]:(await Promise.all(t.map(async o=>{if(Ui(o)){let n=await xx(xA(o),e);return n?{library:n,ignoreList:o.ignoreList}:null}return xx(o,e)}))).filter(Boolean)}var yx,gA,mA,ji,wx,yA,bA,bx,_A,Bi,Hh,Ui,xA,wA,Vi,Sx=j(()=>{"use strict";Tt();yx="system",gA="https://smbls-kv.nika-980.workers.dev",mA="https://api.symbols.app";ji=(t,e,r,o)=>{for(let n in e){let s=o?`${o}/${n}`:n;r&&r.has(s)||(n in t?S(t[n])&&S(e[n])&&ji(t[n],e[n],r,s):t[n]=e[n])}},wx=(t,e,r)=>{if(!S(t)||!e.size)return t;let o=`${r}/`,n=!1;for(let i of e)if(i.startsWith(o)){n=!0;break}if(!n)return t;let s={};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=`${r}/${i}`;e.has(a)||(s[i]=wx(t[i],e,a))}return s},yA=new Set,bA=new Set(["components","pages","functions","snippets","methods"]),bx=(t,e)=>e===""&&bA.has(t),_A=t=>t.replace(/\.js$/iu,""),Bi=t=>{let e=new Set;if(!Array.isArray(t))return e;for(let r of t){if(!w(r))continue;let o=r.split("/").map(n=>_A(n.trim())).filter(Boolean).join("/");o&&e.add(o)}return e},Hh=(t,e={})=>({library:t,ignoreList:Array.isArray(e.ignoreList)?e.ignoreList:[]}),Ui=t=>S(t)&&Array.isArray(t.ignoreList)&&("library"in t||"key"in t||"name"in t),xA=t=>t.library!==void 0?t.library:t.key??t.name,wA=(t,e,r)=>{let o=Bi(e.sharedLibIgnore);e.sharePages===!1&&o.add("pages");let n=o.size?new Set([...r,...o]):r;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&!(s==="sharePages"||s==="sharedLibIgnore")&&s!=="app"&&!n.has(s))if(S(e[s])&&S(t[s]))if(s==="designSystem")ji(t[s],e[s],n,s);else for(let i in e[s])n.has(`${s}/${i}`)||(i in t[s]?bx(s,t[s][i])&&!bx(s,e[s][i])&&(t[s][i]=e[s][i]):t[s][i]=e[s][i]);else s in t||(t[s]=wx(e[s],n,s))},Vi=(t,e)=>{if(!(!e||!e.length))for(let r=0;r<e.length;r++){let o=e[r],n=yA;Ui(o)&&(n=Bi(o.ignoreList),o=o.library),S(o)&&wA(t,o,n)}}});var qh,Kh,Gh,zi,Yh,Hi,Xh,go,kx=j(()=>{"use strict";Tt();qh=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},Kh=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)}},Gh=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,"")),Yh=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),Hi=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),Xh=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},go=t=>{if(T(t))return t;if(w(t))return t.split(" ");if(S(t))return Object.values(t);if(je(t))return[t]}});var Zh,vx=j(()=>{"use strict";Zh=()=>{let t=document.styleSheets[0],e="";if(t)try{let r=t.cssRules||t.rules;for(let o=0;o<r.length;o++)e+=r[o].cssText}catch(r){console.error("Unable to access CSS rules. This may be due to CORS restrictions:",r)}else console.log("No stylesheets found in document.styleSheets[0].");return e}});var Kt,bn,Wi,qi,Cx=j(()=>{"use strict";Kt=t=>{let e=t&&t.src;if(!e||typeof e!="string")return null;let r=t.context;if(!r)return null;let o=r.assets&&r.assets[e]||r.files&&r.files[e];return o?typeof o=="string"?{src:o,type:null,variants:null}:typeof o=="object"&&typeof o.src=="string"?o:null:null},bn=(t,{keepOneX:e=!0}={})=>{if(!Array.isArray(t)||!t.length)return"";let r=t.some(n=>typeof n.width=="number"),o=[];for(let n of t)r&&typeof n.width=="number"?o.push(`${n.src} ${n.width}w`):r||(n.scale===1&&e?o.push(n.src):n.scale&&n.scale!==1&&o.push(`${n.src} ${n.scale}x`));return o.join(", ")},Wi=t=>{if(!t||!Array.isArray(t.variants))return"";let e=t.variants.filter(r=>r.format===t.type);return bn(e,{keepOneX:!1})},qi=(t,e)=>{if(!t||typeof t!="object"||typeof t.src!="string")return[];if(!Array.isArray(t.variants)||!t.variants.length)return[{tag:"img",attr:{src:t.src,alt:e||""}}];let r=new Map;for(let a of t.variants)r.has(a.format)||r.set(a.format,[]),r.get(a.format).push(a);let o=[];for(let[a,c]of r)a!==t.type&&o.push({tag:"source",attr:{type:a,srcset:bn(c,{keepOneX:!0})}});let n=r.get(t.type)||[],s=bn(n,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...o,{tag:"img",attr:i}]}});var $l={};P($l,{CDN_PROVIDERS:()=>ge,DOMQL_EVENTS:()=>Zd,DOMQ_PROPERTIES:()=>wr,ENV:()=>pp,HTML_TAGS:()=>on,METHODS:()=>Jo,METHODS_EXL:()=>Us,NODE_ENV:()=>Ce,OPTIONS:()=>di,PACKAGE_MANAGER_TO_CDN:()=>Or,PARSED_DOMQ_PROPERTIES:()=>Bs,PROPS_METHODS:()=>Sr,STATE_METHODS:()=>io,STATE_PROPERTIES:()=>Xd,SVG_TAGS:()=>C_,TYPES:()=>Ds,UNIVERSAL_RESERVED_KEYS:()=>Tl,addCaching:()=>fl,addContext:()=>ll,addExtend:()=>Np,addExtends:()=>Ue,addItemAfterEveryElement:()=>Fd,addProtoToArray:()=>Ms,addRef:()=>il,applyDependentState:()=>oh,applyEvent:()=>ml,applyEventUpdate:()=>yl,applyExtends:()=>T_,applyProps:()=>si,arrayContainsOtherArray:()=>Rd,arraysEqual:()=>jd,arrayzeValue:()=>go,buildImgSrcset:()=>Wi,buildSourcesAndImg:()=>qi,cache:()=>ch,call:()=>Ch,captureSnapshot:()=>Ah,checkForStateTypes:()=>Qp,checkIfInherits:()=>gl,checkIfStringIsInArray:()=>Vd,clone:()=>Qd,cloneAndMergeArrayExtend:()=>Zs,cloneFunction:()=>Sp,collectExtendsList:()=>nn,concatAddExtends:()=>Lp,copyJavaScriptToClipboard:()=>Kh,copyStringToClipboard:()=>qh,createBasedOnType:()=>sl,createElement:()=>Jp,createElementExtends:()=>Kc,createExtends:()=>Qs,createExtendsFromKeys:()=>sn,createExtendsStack:()=>Zc,createIfConditionFlag:()=>kp,createInheritedState:()=>th,createKey:()=>Ys,createNestedObject:()=>ip,createNestedObjectByKeyPath:()=>rh,createObjectWithoutPrototype:()=>Bc,createParent:()=>al,createPath:()=>cl,createProps:()=>ii,createPropsStack:()=>ol,createRoot:()=>Zp,createScope:()=>sh,createSnapshotId:()=>Gs,customDecodeURIComponent:()=>Yd,customEncodeURIComponent:()=>Gd,cutArrayAfterValue:()=>Ld,cutArrayBeforeValue:()=>$d,debounce:()=>Xs,debounceOnContext:()=>_p,decodeNewlines:()=>Kd,deepClone:()=>lt,deepContains:()=>np,deepDefaults:()=>ji,deepDestringifyFunctions:()=>de,deepExtend:()=>qc,deepMerge:()=>st,deepMergeExtends:()=>Ve,deepStringifyFunctions:()=>zs,defineSetter:()=>kh,destringifyGlobalScope:()=>Ws,detectHeightOnInit:()=>Ih,detectInfiniteLoop:()=>fp,document:()=>tt,encodeNewlines:()=>qd,error:()=>po,excludeKeysFromObject:()=>dp,exec:()=>ft,extendCachedRegistry:()=>Mp,extendStackRegistry:()=>ti,extractArrayExtend:()=>ri,fetchLibraryData:()=>Dl,fibonacciNumberByIndex:()=>Dh,filterArrays:()=>Bd,filterArraysFast:()=>Ud,finalizeExtends:()=>Jc,findClosestNumber:()=>Il,findClosestNumberInFactory:()=>zh,findInheritedState:()=>hl,findKeyPosition:()=>Hd,flattenExtend:()=>an,formatDate:()=>Ph,generateHash:()=>zc,generateHeadArrayTags:()=>Pl,generateKey:()=>Ks,generateMetaTags:()=>Uh,get:()=>xh,getCDNDirUrl:()=>Ol,getCDNUrl:()=>Ae,getCapitalCaseKeys:()=>Up,getCdnProviderFromConfig:()=>dn,getChildStateInKey:()=>pl,getChildren:()=>ki,getContext:()=>Ri,getCookie:()=>Tp,getDB:()=>Li,getEmotionStylesheet:()=>Zh,getExtendsInElement:()=>jp,getExtendsStack:()=>Js,getExtendsStackRegistry:()=>Wc,getFrequencyInArray:()=>Pd,getHashedExtend:()=>ei,getImportMapScript:()=>Rh,getInObjectByPath:()=>lp,getLocalStorage:()=>Rp,getNev:()=>yp,getPageMetadata:()=>Vh,getParentStateInKey:()=>dl,getPath:()=>vi,getQuery:()=>Mi,getRef:()=>Sh,getRoot:()=>Ai,getRootContext:()=>Oi,getRootData:()=>Ti,getRootState:()=>Ei,getRootStateInKey:()=>ul,getSpreadChildren:()=>Vp,global:()=>Ad,hasFunction:()=>Be,hasHandlerPlugin:()=>tn,hasOwnProperty:()=>ep,hashContent:()=>mn,inheritChildExtends:()=>Yc,inheritChildPropsExtends:()=>Gc,inheritParentProps:()=>ai,inheritRecursiveChildExtends:()=>Xc,initProps:()=>Gp,is:()=>Wt,isArray:()=>T,isBoolean:()=>Lc,isContextComponent:()=>zp,isCyclic:()=>up,isDOMNode:()=>Ht,isDate:()=>Fc,isDefined:()=>yt,isDevelopment:()=>vr,isEmpty:()=>Nc,isEmptyObject:()=>rp,isEqualDeep:()=>jc,isFunction:()=>A,isHtmlElement:()=>Ps,isLocal:()=>mp,isLoudDevRuntime:()=>It,isMalformedDependency:()=>pn,isMethod:()=>Eh,isMobile:()=>Ep,isNode:()=>or,isNot:()=>Od,isNotProduction:()=>lo,isNull:()=>Mc,isNumber:()=>je,isObject:()=>S,isObjectLike:()=>H,isPhoto:()=>$h,isPolyglotWritableKey:()=>sr,isProduction:()=>kr,isStaging:()=>gp,isState:()=>eh,isString:()=>w,isStringFunction:()=>wp,isTest:()=>Vc,isTesting:()=>hp,isUndefined:()=>At,isUniversallyReservedKey:()=>Th,isUnresolvableDependency:()=>ho,isValidDependencyMap:()=>hn,isValidHtmlTag:()=>Ip,isWrappedLibrary:()=>Ui,joinArrays:()=>Yo,jointStacks:()=>Fp,keys:()=>El,loadCssFile:()=>Nh,loadJavascript:()=>jh,loadJavascriptFile:()=>Lh,loadJavascriptFileEmbedSync:()=>Fh,loadJavascriptFileSync:()=>Mh,loadRemoteCSS:()=>Bh,loadRemoteScript:()=>gn,log:()=>vh,logGroupIf:()=>Cp,logIf:()=>vp,lookdown:()=>bh,lookdownAll:()=>_h,lookup:()=>yh,lowercaseFirstLetter:()=>so,makeObjectWithoutPrototype:()=>op,map:()=>Jd,mapStringsWithContextComponents:()=>oi,markPolyglotSeeded:()=>He,matchesComponentNaming:()=>ze,memoize:()=>xp,merge:()=>ht,mergeSharedLibraries:()=>Vi,nextElement:()=>Ii,normalizeIgnoreList:()=>Bi,normalizeLibraryKey:()=>yn,objectToString:()=>Hs,objectizeStringProperty:()=>ni,overwrite:()=>qs,overwriteDeep:()=>qt,overwriteShallow:()=>co,overwriteState:()=>nh,parse:()=>Al,parseDeep:()=>wi,pickupElementFromProps:()=>el,pickupPropsFromElement:()=>tl,polyglotSeededKeys:()=>ui,previousElement:()=>Di,propExists:()=>qp,propertizeElement:()=>rl,propertizeUpdate:()=>Wp,remove:()=>ex,removeChars:()=>Gh,removeCookie:()=>Op,removeDuplicateProps:()=>li,removeDuplicatesInArray:()=>Xo,removeFromArray:()=>Id,removeFromObject:()=>sp,removeNestedKeyByPath:()=>ap,removeValueFromArray:()=>Ls,removeValueFromArrayAll:()=>Md,reorderArrayByValues:()=>Nd,replaceLiteralsWithObjectFields:()=>no,replaceOctalEscapeSequences:()=>Wd,resolveAsset:()=>Kt,resolveHandler:()=>en,resolveSharedLibraries:()=>Wh,returnValueAsText:()=>nl,runPluginHook:()=>Et,self:()=>Td,setActiveRootState:()=>Ci,setCookie:()=>Ap,setHashedExtend:()=>Hc,setInObjectByPath:()=>cp,setLocalStorage:()=>Pp,setNodeStyles:()=>Cl,setProps:()=>wh,setPropsPrototype:()=>ci,sharedLibrary:()=>Hh,splitPackageSpecifier:()=>Fi,spotByPath:()=>Si,srcsetFor:()=>bn,stringIncludesAny:()=>Ns,stringToObject:()=>tp,stripVersionRangePrefix:()=>Ni,swapItemsInArray:()=>Dd,syncProps:()=>fi,toCamelCase:()=>zi,toDashCase:()=>Hi,toDescriptionCase:()=>Xh,toPriorityOrder:()=>pe,toTitleCase:()=>Yh,toggleFullscreen:()=>Oh,triggerEventOn:()=>Cr,triggerEventOnUpdate:()=>ih,trimStringFromSymbols:()=>zd,unstackArrayOfObjects:()=>$s,update:()=>Kp,updateProps:()=>Yp,variables:()=>$i,verbose:()=>ln,warn:()=>Pi,window:()=>v});var R=j(()=>{"use strict";Uc();bp();Tt();nr();rn();Zo();Is();S_();k_();js();Rs();v_();Dp();Bp();Xp();Qc();$_();M_();Qo();F_();nx();lh();sx();ah();ix();ax();cx();lx();fx();ux();dx();px();gx();mx();Sx();kx();vx();Cx()});var iC=cd((LV,sC)=>{var gs=1e3,ms=gs*60,ys=ms*60,Bo=ys*24,SP=Bo*7,kP=Bo*365.25;sC.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return vP(t);if(r==="number"&&isFinite(t))return e.long?EP(t):CP(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function vP(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),o=(e[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return r*kP;case"weeks":case"week":case"w":return r*SP;case"days":case"day":case"d":return r*Bo;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ys;case"minutes":case"minute":case"mins":case"min":case"m":return r*ms;case"seconds":case"second":case"secs":case"sec":case"s":return r*gs;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function CP(t){var e=Math.abs(t);return e>=Bo?Math.round(t/Bo)+"d":e>=ys?Math.round(t/ys)+"h":e>=ms?Math.round(t/ms)+"m":e>=gs?Math.round(t/gs)+"s":t+"ms"}function EP(t){var e=Math.abs(t);return e>=Bo?Iu(t,e,Bo,"day"):e>=ys?Iu(t,e,ys,"hour"):e>=ms?Iu(t,e,ms,"minute"):e>=gs?Iu(t,e,gs,"second"):t+" ms"}function Iu(t,e,r,o){var n=e>=r*1.5;return Math.round(t/r)+" "+o+(n?"s":"")}});var cC=cd((MV,aC)=>{function AP(t){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=n,r.enabled=a,r.humanize=iC(),r.destroy=l,Object.keys(t).forEach(f=>{r[f]=t[f]}),r.names=[],r.skips=[],r.formatters={};function e(f){let u=0;for(let d=0;d<f.length;d++)u=(u<<5)-u+f.charCodeAt(d),u|=0;return r.colors[Math.abs(u)%r.colors.length]}r.selectColor=e;function r(f){let u,d=null,h,g;function p(...m){if(!p.enabled)return;let b=p,_=Number(new Date),y=_-(u||_);b.diff=y,b.prev=u,b.curr=_,u=_,m[0]=r.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let x=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(E,O)=>{if(E==="%%")return"%";x++;let $=r.formatters[O];if(typeof $=="function"){let I=m[x];E=$.call(b,I),m.splice(x,1),x--}return E}),r.formatArgs.call(b,m),(b.log||r.log).apply(b,m)}return p.namespace=f,p.useColors=r.useColors(),p.color=r.selectColor(f),p.extend=o,p.destroy=r.destroy,Object.defineProperty(p,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,g=r.enabled(f)),g),set:m=>{d=m}}),typeof r.init=="function"&&r.init(p),p}function o(f,u){let d=r(this.namespace+(typeof u>"u"?":":u)+f);return d.log=this.log,d}function n(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];let u=(typeof f=="string"?f:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of u)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function s(f,u){let d=0,h=0,g=-1,p=0;for(;d<f.length;)if(h<u.length&&(u[h]===f[d]||u[h]==="*"))u[h]==="*"?(g=h,p=d,h++):(d++,h++);else if(g!==-1)h=g+1,p++,d=p;else return!1;for(;h<u.length&&u[h]==="*";)h++;return h===u.length}function i(){let f=[...r.names,...r.skips.map(u=>"-"+u)].join(",");return r.enable(""),f}function a(f){for(let u of r.skips)if(s(f,u))return!1;for(let u of r.names)if(s(f,u))return!0;return!1}function c(f){return f instanceof Error?f.stack||f.message:f}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}aC.exports=AP});var lC=cd((ee,Du)=>{ee.formatArgs=OP;ee.save=RP;ee.load=PP;ee.useColors=TP;ee.storage=IP();ee.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`."))}})();ee.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 TP(){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 OP(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Du.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(r++,n==="%c"&&(o=r))}),t.splice(o,0,e)}ee.log=console.debug||console.log||(()=>{});function RP(t){try{t?ee.storage.setItem("debug",t):ee.storage.removeItem("debug")}catch{}}function PP(){let t;try{t=ee.storage.getItem("debug")||ee.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function IP(){try{return localStorage}catch{}}Du.exports=cC()(ee);var{formatters:DP}=Du.exports;DP.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Jb={};P(Jb,{ANIMATION_PROPS:()=>um,ARIA_ROLES:()=>$T,ATTR_TRANSFORMS:()=>im,BLOCK_PROPS:()=>dm,CDN_PROVIDERS:()=>ge,COMPOUND_CSS_KEYWORDS:()=>yo,CONFIG:()=>wo,CONFIG_MERGE_EXL:()=>ne,CSS_NAMED_COLOR_HEX:()=>Ll,CSS_NATIVE_COLOR_REGEX:()=>re,CSS_PROPS_REGISTRY:()=>_t,CSS_UNITS:()=>Go,DEFAULT_CONFIG:()=>Va,DEFAULT_CSS_PROPERTIES_LIST:()=>kt,DELEGATED_EVENTS:()=>Un,DESIGN_SYSTEM_OPTIONS:()=>zy,DOMQL_EVENTS:()=>Zd,DOMQ_PROPERTIES:()=>wr,DOM_EVENTS:()=>mw,ENV:()=>pp,FACTORY:()=>oe,FLEX_PROPS:()=>_m,FONT_PROPS:()=>pm,GRID_PROPS:()=>xm,HOST_REGISTERED_PACKAGES:()=>gv,HTML_ATTRIBUTES:()=>Of,HTML_TAGS:()=>on,LIFECYCLE_EVENTS:()=>Nr,METHODS:()=>Jo,METHODS_EXL:()=>Us,MISC_PROPS:()=>hm,MIXINS:()=>Cf,NODE_ENV:()=>Ce,OPTIONS:()=>di,PACKAGE_MANAGER_TO_CDN:()=>Or,PARSED_DOMQ_PROPERTIES:()=>Bs,POSITION_PROPS:()=>gm,PROPS_METHODS:()=>Sr,REGISTRY:()=>jt,RESERVED_STORE_METHODS:()=>l_,ROUTER_OPTIONS:()=>Qf,SIGNAL_ENGINE_KEY:()=>qo,SIGNAL_INSTANCES_KEY:()=>Ho,STANDARD_SCHEME_QUERIES:()=>sf,STATE_PROPERTIES:()=>Xd,STORE_METHOD_NAMES:()=>c_,SVG_TAGS:()=>jn,THEME_PROPS:()=>bm,TIMING_PROPS:()=>$a,TYPES:()=>Ds,UNIVERSAL_RESERVED_KEYS:()=>Tl,VALUE_TRANSFORMERS:()=>yf,VERSION:()=>u_,__resetSignalEngine:()=>vd,__resetSignalInstances:()=>kd,__resetStateShadowWarnings:()=>f_,activateConfig:()=>Rx,addCaching:()=>fl,addContext:()=>ll,addDelegatedEvent:()=>Ia,addExtend:()=>Np,addExtends:()=>Ue,addItemAfterEveryElement:()=>Fd,addMethods:()=>Kn,addProtoToArray:()=>Ms,addRef:()=>il,aliasCaseVariants:()=>An,animation:()=>Sg,appendSVGSprite:()=>Ca,appendSvgIconsSprite:()=>Ao,applyAttrTransforms:()=>cm,applyCSS:()=>Fy,applyDependentState:()=>oh,applyDocument:()=>va,applyEvent:()=>ml,applyEventUpdate:()=>yl,applyExtends:()=>zn,applyHeadings:()=>ff,applyInitialState:()=>Nf,applyMediaSequenceVars:()=>Pr,applyProps:()=>si,applyReset:()=>Ea,applySequenceGlobalVars:()=>ca,applySequenceVars:()=>fr,applySpacingSequence:()=>ua,applyStateMethods:()=>fe,applyTimingSequence:()=>ka,applyTrueProps:()=>Sm,applyTypographySequence:()=>xa,arrayContainsOtherArray:()=>Rd,arraysEqual:()=>jd,arrayzeValue:()=>go,assertEmitIntegrity:()=>Xg,batch:()=>Pc,breakpoints:()=>xg,buildImgSrcset:()=>Wi,buildSourcesAndImg:()=>qi,buildThemeVarStyles:()=>es,cache:()=>ch,cacheNode:()=>Fr,call:()=>Ch,callStateMethod:()=>Ma,camelToAttr:()=>Br,camelToLowerAttr:()=>yw,captureSnapshot:()=>Ah,changeGlobalTheme:()=>bf,changeLightness:()=>og,checkAttributeByTagName:()=>Ur,checkEventFunctions:()=>am,checkForStateTypes:()=>Qp,checkIfBoxSize:()=>fa,checkIfInherits:()=>gl,checkIfStringIsInArray:()=>Vd,class:()=>Ag,clone:()=>Qd,cloneAndMergeArrayExtend:()=>Zs,cloneFunction:()=>Sp,collectExtendsList:()=>nn,color:()=>pg,colorStringToRgbaArray:()=>me,components:()=>Qn,compositeOverBackdrop:()=>bo,concatAddExtends:()=>Lp,contrastRatio:()=>wn,convertSvgToSymbol:()=>la,copyJavaScriptToClipboard:()=>Kh,copyStringToClipboard:()=>qh,create:()=>Zb,createAsync:()=>_I,createBasedOnType:()=>sl,createComputed:()=>s_,createConfig:()=>ra,createDefine:()=>xk,createEffect:()=>Q,createElement:()=>Jp,createElementExtends:()=>Kc,createExtends:()=>Qs,createExtendsFromKeys:()=>sn,createExtendsStack:()=>Zc,createHTMLNode:()=>Nn,createIfConditionFlag:()=>kp,createInheritedState:()=>th,createKey:()=>Ys,createNestedObject:()=>ip,createNestedObjectByKeyPath:()=>rh,createObjectWithoutPrototype:()=>Bc,createParent:()=>al,createPath:()=>cl,createProps:()=>ii,createPropsStack:()=>ol,createRoot:()=>Zp,createScope:()=>sh,createScopeStore:()=>Dc,createSignal:()=>Ts,createSkeleton:()=>wI,createSnapshotId:()=>Gs,createState:()=>Pm,createStore:()=>tr,createSync:()=>xI,css:()=>we,cssMediaVars:()=>Ql,cssVars:()=>Jl,customDecodeURIComponent:()=>Yd,customEncodeURIComponent:()=>Gd,cutArrayAfterValue:()=>Ld,cutArrayBeforeValue:()=>$d,debounce:()=>Xs,debounceOnContext:()=>_p,decodeNewlines:()=>Kd,deepClone:()=>lt,deepContains:()=>np,deepDefaults:()=>ji,deepDestringifyFunctions:()=>de,deepExtend:()=>qc,deepMerge:()=>st,deepMergeExtends:()=>Ve,deepStringifyFunctions:()=>zs,defaultDefine:()=>ss,defineResolvedThemeSignal:()=>En,defineSetter:()=>kh,defineThemeSignal:()=>Cn,destringifyGlobalScope:()=>Ws,destroy:()=>Ga,detectHeightOnInit:()=>Ih,detectInfiniteLoop:()=>fp,detectTag:()=>Mr,devices:()=>wg,dispose:()=>Vr,encodeNewlines:()=>qd,error:()=>po,excludeKeysFromObject:()=>dp,exec:()=>ft,executeAttr:()=>NT,exetuteClassPerComponent:()=>g1,extendCachedRegistry:()=>Mp,extendStackRegistry:()=>ti,extractArrayExtend:()=>ri,extractConditionalAttrs:()=>UT,fetchLibraryData:()=>Dl,fibonacciNumberByIndex:()=>Dh,filterArrays:()=>Bd,filterArraysFast:()=>Ud,filterAttributesByTagName:()=>FT,finalizeExtends:()=>Jc,findClosestNumber:()=>Il,findClosestNumberInFactory:()=>zh,findHeadingLetter:()=>of,findHeadings:()=>aa,findInheritedState:()=>hl,findKeyPosition:()=>Hd,flattenExtend:()=>an,font:()=>ag,fontFace:()=>fg,fontFamily:()=>cg,fontFamilyTypes:()=>lg,formatDate:()=>Ph,generateHash:()=>zc,generateHeadArrayTags:()=>Pl,generateKey:()=>Ks,generateMetaTags:()=>Uh,generateSequence:()=>Gt,generateSequencePosition:()=>Ig,generateSprite:()=>Tn,generateSubSequence:()=>ia,get:()=>xh,getActiveConfig:()=>C,getActiveDocument:()=>Pa,getActiveLang:()=>Kr,getCDNDirUrl:()=>Ol,getCDNUrl:()=>Ae,getCacheSize:()=>Jg,getCapitalCaseKeys:()=>Up,getCdnProviderFromConfig:()=>dn,getChildStateInKey:()=>pl,getChildren:()=>ki,getColor:()=>rt,getColorShade:()=>Bl,getContext:()=>Ri,getCookie:()=>Tp,getDB:()=>Li,getDefaultOrFirstKey:()=>_o,getEmitStats:()=>kf,getEmotionStylesheet:()=>Zh,getExtendsInElement:()=>jp,getExtendsStack:()=>Js,getExtendsStackRegistry:()=>Wc,getFnPrefixAndValue:()=>lr,getFontFace:()=>sg,getFontFaceEach:()=>xo,getFontFaceEachString:()=>Gl,getFontFaceString:()=>Ji,getFontFamily:()=>_a,getFontFormat:()=>ql,getFontSizeByKey:()=>wa,getFrequencyInArray:()=>Pd,getHashedExtend:()=>ei,getImportMapScript:()=>Rh,getInObjectByPath:()=>lp,getLanguages:()=>Xa,getLocalStateLang:()=>ec,getLocalStorage:()=>Rp,getMediaColor:()=>Rt,getMediaTheme:()=>_e,getNev:()=>yp,getObserver:()=>Ic,getPageMetadata:()=>Vh,getParentStateInKey:()=>dl,getPath:()=>vi,getQuery:()=>Mi,getRef:()=>Sh,getResolvedThemeSignal:()=>Ox,getRgbTone:()=>qe,getRoot:()=>Ai,getRootContext:()=>Oi,getRootData:()=>Ti,getRootState:()=>Ei,getRootStateInKey:()=>ul,getSafeInk:()=>af,getSafeInkInfo:()=>Mg,getSequenceValue:()=>So,getSequenceValueBySymbols:()=>rf,getSequenceValuePropertyPair:()=>Ge,getShadow:()=>pa,getShapeByKey:()=>Sa,getSignals:()=>a_,getSpacingBasedOnRatio:()=>Oe,getSpacingByKey:()=>wt,getSpreadChildren:()=>Vp,getSubratio:()=>sa,getSubratioDifference:()=>na,getSystemGlobalTheme:()=>ce,getTheme:()=>ga,getThemeSignal:()=>Tx,getTimingByKey:()=>ie,getTimingFunction:()=>xe,global:()=>Ad,gradient:()=>hg,grid:()=>Eg,hasFunction:()=>Be,hasHandlerPlugin:()=>tn,hasOwnProperty:()=>ep,hashContent:()=>mn,hexToRgb:()=>Qh,hexToRgbArray:()=>Ml,hexToRgba:()=>eg,hslToRgb:()=>jl,icons:()=>yg,inheritChildExtends:()=>Yc,inheritChildPropsExtends:()=>Gc,inheritParentProps:()=>ai,inheritRecursiveChildExtends:()=>Xc,init:()=>hr,initPolyglot:()=>ru,initProps:()=>Gp,injectGlobal:()=>St,is:()=>Wt,isArray:()=>T,isBoolean:()=>Lc,isCSSVar:()=>gt,isContextComponent:()=>zp,isCyclic:()=>up,isDOMNode:()=>Ht,isDate:()=>Fc,isDefined:()=>yt,isDevelopment:()=>vr,isDomDocument:()=>er,isEmpty:()=>Nc,isEmptyObject:()=>rp,isEnumeratedTrueFalseAttr:()=>dr,isEqualDeep:()=>jc,isFunction:()=>A,isGoogleFontsUrl:()=>Sn,isHostObject:()=>rr,isHtmlElement:()=>Ps,isLocal:()=>mp,isLoudDevRuntime:()=>It,isMalformedDependency:()=>pn,isMethod:()=>Eh,isMobile:()=>Ep,isNode:()=>or,isNot:()=>Od,isNotProduction:()=>lo,isNull:()=>Mc,isNumber:()=>je,isObject:()=>S,isObjectLike:()=>H,isPhoto:()=>$h,isPolyglotWritableKey:()=>sr,isProduction:()=>kr,isRawUnitValue:()=>Os,isResolvedColor:()=>Te,isScalingUnit:()=>oo,isStaging:()=>gp,isState:()=>eh,isStore:()=>mt,isString:()=>w,isStringFunction:()=>wp,isSvgTag:()=>Bn,isTest:()=>Vc,isTesting:()=>hp,isTracking:()=>Dm,isUndefined:()=>At,isUniversallyReservedKey:()=>Th,isUnresolvableDependency:()=>ho,isValidDependencyMap:()=>hn,isValidHtmlTag:()=>Ip,isValidTag:()=>Fn,isWasmLoaded:()=>ik,isWrappedLibrary:()=>Ui,isWritableFamilyBucket:()=>Ed,joinArrays:()=>Yo,jointStacks:()=>Fp,keyframes:()=>Mn,keys:()=>El,linearChannelToSrgb:()=>zl,loadCssFile:()=>Nh,loadJavascript:()=>jh,loadJavascriptFile:()=>Lh,loadJavascriptFileEmbedSync:()=>Fh,loadJavascriptFileSync:()=>Mh,loadRemoteCSS:()=>Bh,loadRemoteScript:()=>gn,loadTranslations:()=>Ja,loadWasm:()=>sk,log:()=>vh,logGroupIf:()=>Cp,logIf:()=>vp,lookdown:()=>bh,lookdownAll:()=>_h,lookup:()=>yh,lowercaseFirstLetter:()=>so,makeObjectWithoutPrototype:()=>op,map:()=>Jd,mapStringsWithContextComponents:()=>oi,markPolyglotSeeded:()=>He,matchesComponentNaming:()=>ze,media:()=>ug,memoize:()=>xp,merge:()=>ht,mergeSharedLibraries:()=>Vi,mixTwoColors:()=>Jh,mixTwoRgb:()=>rg,mixTwoRgba:()=>Ul,nextElement:()=>Ii,normalizeIgnoreList:()=>Bi,normalizeLibraryKey:()=>yn,numToLetterMap:()=>Ke,objectToString:()=>Hs,objectizeStringProperty:()=>ni,oklabToLinearSrgb:()=>Hl,oklabToOklch:()=>Yi,oklchToGamutSafeSrgb:()=>Xi,oklchToOklab:()=>Wl,opacify:()=>xn,overwrite:()=>qs,overwriteDeep:()=>qt,overwriteShallow:()=>co,overwriteState:()=>nh,parkHostObject:()=>xr,parse:()=>Al,parseColorToken:()=>Lt,parseDeep:()=>wi,pickupElementFromProps:()=>el,pickupPropsFromElement:()=>tl,polyglotFunctions:()=>uc,polyglotPlugin:()=>as,polyglotSeededKeys:()=>ui,popConfig:()=>et,popStaticCssPass:()=>ym,previousElement:()=>Di,propExists:()=>qp,propertizeElement:()=>rl,propertizeUpdate:()=>Wp,pushConfig:()=>it,pushStaticCssPass:()=>mm,quietColorProbe:()=>ko,refreshContextProto:()=>Df,registerEvent:()=>Vn,registerHostPackages:()=>mv,registerSignalInstance:()=>Wo,reinit:()=>My,relativeLuminance:()=>mo,remove:()=>qn,removeChars:()=>Gh,removeCookie:()=>Op,removeDelegatedEvent:()=>Da,removeDuplicateProps:()=>li,removeDuplicatesInArray:()=>Xo,removeFromArray:()=>Id,removeFromObject:()=>sp,removeNestedKeyByPath:()=>ap,removeValueFromArray:()=>Ls,removeValueFromArrayAll:()=>Md,reorderArrayByValues:()=>Nd,replaceLiteralsWithObjectFields:()=>no,replaceOctalEscapeSequences:()=>Wd,resetEmitStats:()=>Yg,resolveAsset:()=>Kt,resolveBorderValue:()=>se,resolveColorRgb:()=>vo,resolveColorsInGradient:()=>Ta,resolveConfigDocument:()=>Ko,resolveFileSource:()=>sm,resolveFileUrl:()=>ye,resolveGridTracks:()=>ww,resolveHandler:()=>en,resolvePropValue:()=>jr,resolveShadowValue:()=>Co,resolveSharedLibraries:()=>Wh,returnSubThemeOrDefault:()=>ng,returnValueAsText:()=>nl,rgbArrayToHex:()=>Fl,rgbToHSL:()=>Nl,rgbToHex:()=>tg,runPluginHook:()=>Et,runThroughMedia:()=>lf,scratchDefaultConfig:()=>vn,scratchSystem:()=>In,scratchUtils:()=>Ir,self:()=>Td,semanticIcons:()=>bg,sequence:()=>cr,serializeAttrValue:()=>Xe,set:()=>To,setActiveConfig:()=>tf,setActiveDocument:()=>Gg,setActiveRootState:()=>Ci,setAdaptiveSchemeVar:()=>$r,setClass:()=>SO,setClassname:()=>m1,setColor:()=>Dr,setCookie:()=>Ap,setCssEngineHook:()=>Zf,setCustomFont:()=>Zi,setCustomFontMedia:()=>Rr,setEach:()=>zg,setFont:()=>ba,setFontFamily:()=>Rn,setFontImport:()=>kn,setGradient:()=>On,setHashedExtend:()=>Hc,setInCustomFontMedia:()=>Kl,setInObjectByPath:()=>cp,setLang:()=>Qa,setLocalStorage:()=>Pp,setMediaTheme:()=>ya,setNodeStyles:()=>Cl,setObserver:()=>i_,setProps:()=>wh,setPropsPrototype:()=>ci,setSVG:()=>Pn,setScalingVar:()=>oa,setShadow:()=>Lr,setSubScalingVar:()=>ef,setSvgIcon:()=>Eo,setTheme:()=>ma,setValue:()=>Vg,setVariables:()=>Dg,setWasmEngine:()=>Ra,shadow:()=>mg,shape:()=>Rg,sharedLibrary:()=>Hh,sizes:()=>Og,spacing:()=>dg,splitPackageSpecifier:()=>Fi,splitSpacedValue:()=>da,splitTopLevelCommas:()=>ar,splitTopLevelSpaces:()=>Ki,splitTransition:()=>mf,spotByPath:()=>Si,srcsetFor:()=>bn,srgbChannelToLinear:()=>Vl,srgbToOklab:()=>Gi,stringIncludesAny:()=>Ns,stringToObject:()=>tp,stripVersionRangePrefix:()=>Ni,svg:()=>kg,svgData:()=>vg,swapItemsInArray:()=>Dd,syncProps:()=>fi,templates:()=>Cg,theme:()=>gg,timing:()=>_g,toCamel:()=>ea,toCamelCase:()=>zi,toDashCase:()=>Hi,toDescriptionCase:()=>Xh,toLinearChannel:()=>_n,toPriorityOrder:()=>pe,toTitleCase:()=>Yh,toggleFullscreen:()=>Oh,transformBackgroundImage:()=>pf,transformBorder:()=>Ye,transformBorderRadius:()=>ur,transformBoxShadow:()=>Aa,transformClassname:()=>Aw,transformDuration:()=>Oa,transformGridTemplate:()=>gf,transformShadow:()=>df,transformSize:()=>bt,transformSizeRatio:()=>L,transformTextStroke:()=>uf,transformTransition:()=>Ug,transformersByPrefix:()=>km,transfromGap:()=>hf,translate:()=>Za,triggerEventOn:()=>Cr,triggerEventOnUpdate:()=>ih,trimStringFromSymbols:()=>zd,typography:()=>Qi,unit:()=>ig,unstackArrayOfObjects:()=>$s,update:()=>Hn,updateProps:()=>Yp,updateVars:()=>wO,upsertTranslation:()=>tc,useCssInProps:()=>le,useHostState:()=>Im,usePropsAsCSS:()=>Cw,useSelectorsAsCSS:()=>Ew,variables:()=>$i,vars:()=>Tg,verbose:()=>ln,warn:()=>Pi,warnStateKeyShadowsMethod:()=>$c,window:()=>v,wrapHoverRule:()=>Pe});module.exports=rE(Jb);var Cd={};P(Cd,{RESERVED_STORE_METHODS:()=>l_,SIGNAL_ENGINE_KEY:()=>qo,SIGNAL_INSTANCES_KEY:()=>Ho,STORE_METHOD_NAMES:()=>c_,VERSION:()=>u_,__resetSignalEngine:()=>vd,__resetSignalInstances:()=>kd,__resetStateShadowWarnings:()=>f_,batch:()=>Pc,createComputed:()=>s_,createEffect:()=>Q,createScopeStore:()=>Dc,createSignal:()=>Ts,createStore:()=>tr,getObserver:()=>Ic,getSignals:()=>a_,isStore:()=>mt,registerSignalInstance:()=>Wo,setObserver:()=>i_,warnStateKeyShadowsMethod:()=>$c});var gd={};P(gd,{WRITE_JOURNAL:()=>vs,batch:()=>Es,createComputed:()=>nE,createEffect:()=>sE,createSignal:()=>Fe,getObserver:()=>pd,journalWrite:()=>Cs,setObserver:()=>oE});var zt=null,vc=0,Cc=[],pd=()=>zt,oE=t=>{zt=t},Ec=0,ld=[];function Fe(t){let e=new Set;function r(){return zt&&(e.add(zt),zt._sources.add(s)),t}function o(i){i!==t&&(t=i,uE(e))}function n(){return t}let s={get:r,set:o,peek:n,_subscribers:e,_type:"signal"};return s}function nE(t){let e,r=!0,o=new Set,n={_sources:new Set,_type:"computed",_subscribers:o,_execute(){dd(n);let s=zt;zt=n;try{e=t(),r=!1}finally{zt=s}},_notify(){r=!0,o.size>0&&o_(o)},get(){return zt&&(o.add(zt),zt._sources.add(n)),r&&n._execute(),e},peek(){return r&&n._execute(),e}};return n._execute(),n}var ve=new Set,fd=!1,vs=[];function Cs(t){vs.push(t),vs.length>32&&vs.shift()}function sE(t,e){let r=e?.depth??0,o={_sources:new Set,_type:"effect",_depth:r,_label:e?.label,_disposed:!1,_subscribers:new Set,_execute(){if(o._disposed)return;dd(o);let n=zt;zt=o;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{zt=n}},_notify(){o._disposed||(vc>0?Cc.push(o):Ec>0?ld.push(o):hd(o))},dispose(){o._disposed=!0,dd(o)}};return o._execute(),o}function Es(t){vc++;try{t()}finally{vc--,vc===0&&fE()}}var ud=!1,t_=1e3,iE=8,aE=256,cE=4;function e_(){return typeof performance<"u"?performance.now():Date.now()}function hd(t){ve.add(t),!ud&&(fd||(fd=!0,queueMicrotask(r_)))}var zo=[];function lE(){if(ve.size===1){let[e]=ve;return ve.clear(),e._disposed?0:(e._execute(),1)}zo.length=0;for(let e of ve)zo.push(e);ve.clear(),zo.sort((e,r)=>e._depth-r._depth);let t=0;for(let e=0;e<zo.length;e++){let r=zo[e];r._disposed||(r._execute(),t++)}return zo.length=0,t}function r_(t=0,e=0){if(fd=!1,ve.size===0)return;ud=!0;let r=e_(),o=!1;try{for(;ve.size>0;){if(++t>t_){let n=new Map;for(let c of ve){let l=c._label;if(typeof l=="function")try{l=l()}catch{l="<label error>"}if(l=l||"<unlabeled>",n.set(l,(n.get(l)||0)+1),n.size>=12)break}let s=[...n.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", "),i=new Map;for(let c of vs)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",t_,"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>"),ve.clear();break}if(e+=lE(),ve.size>0&&(e>=aE||t>=cE)&&e_()-r>iE){o=!0,setTimeout(()=>r_(t,e),0);break}}}finally{o||(ud=!1)}}function fE(){for(let t=0;t<Cc.length;t++)hd(Cc[t]);Cc.length=0}function o_(t){Ec++;try{for(let e of t)e._notify()}finally{if(Ec--,Ec===0&&ld.length>0){let e=ld.splice(0);for(let r=0;r<e.length;r++)hd(e[r])}}}function uE(t){o_(t)}function dd(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var Sd={};P(Sd,{RESERVED_STORE_METHODS:()=>As,STORE_METHOD_NAMES:()=>wd,__resetStateShadowWarnings:()=>dE,createScopeStore:()=>mE,createStore:()=>Ac,getSignals:()=>gE,isStore:()=>hE,warnStateKeyShadowsMethod:()=>xd});var Ne=Symbol("store"),Tc=Symbol("signals"),wd=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],As=new Set(wd),_d=new Set,md=(t,e)=>t?t+"."+e:String(e);function xd(t,e){let r=(e||"")+"::"+t;if(_d.has(r))return;_d.add(r);let o=e?`state.${e}`:"state",n=`[smbls/state] "${t}" is a reserved store-method name and was written as DATA at ${o}.${t}. The value is preserved and readable \u2014 data wins over the method \u2014 but "${o}.${t}(\u2026)" no longer reaches the store method on this node. Use "${o}.$${t}(\u2026)" for the method, or rename the data key. Reserved: ${wd.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(n)}function dE(){_d.clear()}var yd=t=>!t||typeof t!="object"||Array.isArray(t)||t[Ne]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!Oc(t),pE=12,Oc=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function Rc(t,e,r){if(t===e)return!0;if(r>pE)return!1;if(Array.isArray(t)||Array.isArray(e)){if(!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!Rc(t[o],e[o],r+1))return!1;return!0}if(Oc(t)&&Oc(e)){let o=Object.keys(t),n=Object.keys(e);if(o.length!==n.length)return!1;for(let s of o)if(!Object.prototype.hasOwnProperty.call(e,s)||!Rc(t[s],e[s],r+1))return!1;return!0}return!1}function Ac(t,e,r,o){r===void 0&&(r=0),o===void 0&&(o="");let n={},s={},i=e&&e.maxDepth||8;if(t&&typeof t=="object")for(let _ in t){if(_==="__proto__"||!Object.prototype.hasOwnProperty.call(t,_))continue;if(_.startsWith("__")){s[_]=t[_];continue}As.has(_)&&xd(_,o);let y=t[_];r<i&&y&&typeof y=="object"&&!yd(y)?(s[_]=y,n[_]=Fe(Ac(y,e,r+1,md(o,_)))):(s[_]=y,n[_]=Fe(y))}let a=new Proxy(s,{get(_,y){if(y===Ne)return!0;if(y===Tc)return n;if(y==="__raw")return _;if(y==="$update")return c;if(y==="$parse")return f;if(y==="$clean")return u;if(y==="$keys")return d;if(y==="$values")return h;if(y==="$replace")return g;if(y==="$add")return p;if(y==="$remove")return m;if(y==="$destroy")return b;if(y==="$quietUpdate")return l;if(As.has(y)&&!Object.prototype.hasOwnProperty.call(n,y))switch(y){case"update":return c;case"parse":return f;case"clean":return u;case"keys":return d;case"values":return h;case"replace":return g;case"add":return p;case"remove":return m;case"destroy":return b;case"quietUpdate":return l}if(y==="__element")return _.__element;if(y==="parent")return _.parent;if(y==="root")return _.root;if(Object.prototype.hasOwnProperty.call(n,y)){let k=n[y].get();if(k!==void 0||!(y!=="root"&&_.root&&_.root!==a))return k}if(_[y]!==void 0)return _[y];let x=typeof y=="string"&&!y.startsWith("__")&&y!=="then"&&y!=="constructor"&&pd()!=null;if(y!=="root"&&_.root&&_.root!==a){let k=_.root[y];return x&&!Object.prototype.hasOwnProperty.call(n,y)&&(n[y]=Fe(void 0),n[y].get()),k}if(x)return n[y]=Fe(void 0),n[y].get()},set(_,y,x){if(y==="__proto__")return!1;if(y==="__element"||y==="parent"||y==="root"||typeof y=="string"&&y.startsWith("__")&&!Object.prototype.hasOwnProperty.call(n,y))return _[y]=x,!0;As.has(y)&&xd(y,o);let k=md(o,y);if(Object.prototype.hasOwnProperty.call(n,y))if(x&&typeof x=="object"&&!yd(x)){if(x===_[y])return!0;let E=n[y].peek(),O=E&&E[Ne]?E.$parse():E;if(Rc(x,O,0))return!0;_[y]=x,Cs(k),n[y].set(Ac(x,e,r+1,k))}else{if(Array.isArray(x)&&x!==_[y]&&Array.isArray(n[y].peek())&&Rc(x,n[y].peek(),0))return!0;n[y].peek()!==x&&Cs(k),_[y]=x,n[y].set(x)}else _[y]=x,x&&typeof x=="object"&&!yd(x)?n[y]=Fe(Ac(x,e,r+1,k)):n[y]=Fe(x);return!0},has(_,y){return typeof y=="string"&&y.charCodeAt(0)===36&&As.has(y.slice(1))?!0:y in n||y in _},ownKeys(_){return Object.keys(n)},getOwnPropertyDescriptor(_,y){return y in n?{enumerable:!0,configurable:!0,value:n[y].peek()}:Object.getOwnPropertyDescriptor(_,y)},deleteProperty(_,y){return n[y]&&(n[y].peek()!==void 0&&Cs(md(o,y)),n[y].set(void 0),delete n[y]),delete _[y],!0}});function c(_,y){Es(()=>{for(let k in _)k!=="__proto__"&&(a[k]=_[k])});let x=s.__element;return x&&x.onUpdate&&!y?.quiet&&x.onUpdate(x,a,x.context),a}function l(_){return c(_,{quiet:!0})}function f(_){if(_||(_=new Set),_.has(a))return"[Circular]";_.add(a);let y={};for(let x in n){if(x==="parent"||x==="root"||x.startsWith("__"))continue;let k=n[x].peek();k&&k[Ne]?y[x]=k.$parse(_):y[x]=k}return y}function u(){return Es(()=>{for(let _ in n)delete a[_]}),a}function d(){return Object.keys(n)}function h(){return Object.keys(n).map(_=>n[_].peek())}function g(_){return Es(()=>{for(let y in n)y in _||delete a[y];for(let y in _)y!=="__proto__"&&(a[y]=_[y])}),a}function p(_,y){let x=Object.prototype.hasOwnProperty.call(n,_)?n[_].peek():s[_];if(Array.isArray(x))return a[_]=[...x,y],a;if(x&&typeof x=="object"&&!Array.isArray(x)){if(Oc(y))x[Ne]?x.$update(y):a[_]={...x,...y};else{let k=String(Object.keys(x).length);x[Ne]?x.$update({[k]:y}):a[_]={...x,[k]:y}}return a}return a[_]=y,a}function m(_){return delete a[_],a}function b(){u(),s.__element=null,s.parent=null}return a}function hE(t){return t&&t[Ne]===!0}function gE(t){return t[Tc]}function mE(t,e){let r={},o={};if(t&&typeof t=="object")for(let i in t)o[i]=t[i],r[i]=Fe(t[i]);let n=i=>{if(Object.prototype.hasOwnProperty.call(r,i))return r;let a=e;for(;a;){let c=a[Tc];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[Ne]?a[bd]:null}return null};return new Proxy(o,{get(i,a){return a===Ne?!0:a===Tc?r:a===bd?e:a==="__raw"?i:Object.prototype.hasOwnProperty.call(r,a)?r[a].get():e&&a!=="then"&&a!=="constructor"?e[a]:i[a]},set(i,a,c){let l=n(a);return l?(l===r&&(i[a]=c),l[a].set(c),!0):(i[a]=c,r[a]=Fe(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[Ne]?c[bd]: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 bd=Symbol("scope.parent");var ro="3.14.784";var Ho="__SMBLS_SIGNAL_INSTANCES__",Wo=(t,e,r)=>{let o=e||(typeof globalThis<"u"?globalThis:null);if(!o)return null;let n=o[Ho]||(o[Ho]={versions:[],engines:0,reported:!1});return typeof n.engines!="number"&&(n.engines=n.versions.length),n.versions.push(t||ro),r||n.engines++,n.engines>1&&!n.reported&&(n.reported=!0,console.error("[smbls] duplicate @symbo.ls/signal instance \u2014",n.engines,"copies of the reactive engine are loaded on this page:",n.versions.join(", ")+".","Each copy keeps its own observer and effect queue, so an effect created","by one copy never re-fires from another copy's store writes, and one","copy's cascade breaker cannot see the other's queue.","Copies of the SAME version adopt a single engine automatically, so","this means the versions above DIFFER: a fossil copy is resolving beside","the current one. That is a dependency-graph fault, not an application","bug \u2014 align the version wherever @symbo.ls/signal is imported, then","regenerate the lockfile so exactly one version resolves.")),n},kd=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[Ho]};var qo="__SMBLS_SIGNAL_ENGINE__",n_=(t,e,r)=>{let o=e||ro,n=r||(typeof globalThis<"u"?globalThis:null);if(!n)return t;let s=n[qo];return s&&s.engine&&s.version===o?(Wo(o,n,!0),s.engine):(s||(n[qo]={version:o,engine:t}),Wo(o,n,!1),t)},vd=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[qo]};var Ft=n_({...gd,...Sd,VERSION:ro},ro),Ts=Ft.createSignal,s_=Ft.createComputed,Q=Ft.createEffect,Pc=Ft.batch,Ic=Ft.getObserver,i_=Ft.setObserver,tr=Ft.createStore,Dc=Ft.createScopeStore,mt=Ft.isStore,a_=Ft.getSignals,c_=Ft.STORE_METHOD_NAMES,l_=Ft.RESERVED_STORE_METHODS,$c=Ft.warnStateKeyShadowsMethod,f_=Ft.__resetStateShadowWarnings,u_=Ft.VERSION;var Qg={};P(Qg,{assertEmitIntegrity:()=>Xg,css:()=>we,getActiveDocument:()=>Pa,getCacheSize:()=>Jg,getEmitStats:()=>kf,injectGlobal:()=>St,keyframes:()=>Mn,reset:()=>iw,resetEmitStats:()=>Yg,setActiveDocument:()=>Gg,setWasmEngine:()=>Ra,wrapHoverRule:()=>Pe});var Hg={};P(Hg,{COMPOUND_CSS_KEYWORDS:()=>yo,CONFIG:()=>wo,CONFIG_MERGE_EXL:()=>ne,CSS_NAMED_COLOR_HEX:()=>Ll,CSS_NATIVE_COLOR_REGEX:()=>re,CSS_UNITS:()=>Go,FACTORY:()=>oe,STANDARD_SCHEME_QUERIES:()=>sf,VALUE_TRANSFORMERS:()=>yf,activateConfig:()=>Rx,aliasCaseVariants:()=>An,animation:()=>Sg,appendSVGSprite:()=>Ca,appendSvgIconsSprite:()=>Ao,applyDocument:()=>va,applyHeadings:()=>ff,applyMediaSequenceVars:()=>Pr,applyReset:()=>Ea,applySequenceGlobalVars:()=>ca,applySequenceVars:()=>fr,applySpacingSequence:()=>ua,applyTimingSequence:()=>ka,applyTypographySequence:()=>xa,breakpoints:()=>xg,changeGlobalTheme:()=>bf,changeLightness:()=>og,checkIfBoxSize:()=>fa,class:()=>Ag,color:()=>pg,colorStringToRgbaArray:()=>me,compositeOverBackdrop:()=>bo,contrastRatio:()=>wn,convertSvgToSymbol:()=>la,createConfig:()=>ra,cssMediaVars:()=>Ql,cssVars:()=>Jl,defineResolvedThemeSignal:()=>En,defineThemeSignal:()=>Cn,devices:()=>wg,document:()=>Ex,findHeadingLetter:()=>of,findHeadings:()=>aa,font:()=>ag,fontFace:()=>fg,fontFamily:()=>cg,fontFamilyTypes:()=>lg,generateSequence:()=>Gt,generateSequencePosition:()=>Ig,generateSprite:()=>Tn,generateSubSequence:()=>ia,getActiveConfig:()=>C,getColor:()=>rt,getColorShade:()=>Bl,getDefaultOrFirstKey:()=>_o,getFnPrefixAndValue:()=>lr,getFontFace:()=>sg,getFontFaceEach:()=>xo,getFontFaceEachString:()=>Gl,getFontFaceString:()=>Ji,getFontFamily:()=>_a,getFontFormat:()=>ql,getFontSizeByKey:()=>wa,getMediaColor:()=>Rt,getMediaTheme:()=>_e,getResolvedThemeSignal:()=>Ox,getRgbTone:()=>qe,getSafeInk:()=>af,getSafeInkInfo:()=>Mg,getSequenceValue:()=>So,getSequenceValueBySymbols:()=>rf,getSequenceValuePropertyPair:()=>Ge,getShadow:()=>pa,getShapeByKey:()=>Sa,getSpacingBasedOnRatio:()=>Oe,getSpacingByKey:()=>wt,getSubratio:()=>sa,getSubratioDifference:()=>na,getTheme:()=>ga,getThemeSignal:()=>Tx,getTimingByKey:()=>ie,getTimingFunction:()=>xe,gradient:()=>hg,grid:()=>Eg,hexToRgb:()=>Qh,hexToRgbArray:()=>Ml,hexToRgba:()=>eg,hslToRgb:()=>jl,icons:()=>yg,isCSSVar:()=>gt,isDomDocument:()=>er,isGoogleFontsUrl:()=>Sn,isHostObject:()=>rr,isRawUnitValue:()=>Os,isResolvedColor:()=>Te,isScalingUnit:()=>oo,isWritableFamilyBucket:()=>Ed,linearChannelToSrgb:()=>zl,media:()=>ug,mixTwoColors:()=>Jh,mixTwoRgb:()=>rg,mixTwoRgba:()=>Ul,numToLetterMap:()=>Ke,oklabToLinearSrgb:()=>Hl,oklabToOklch:()=>Yi,oklchToGamutSafeSrgb:()=>Xi,oklchToOklab:()=>Wl,opacify:()=>xn,parkHostObject:()=>xr,parseColorToken:()=>Lt,popConfig:()=>et,pushConfig:()=>it,quietColorProbe:()=>ko,relativeLuminance:()=>mo,reset:()=>Ax,resolveBorderValue:()=>se,resolveColorRgb:()=>vo,resolveColorsInGradient:()=>Ta,resolveConfigDocument:()=>Ko,resolveFileUrl:()=>ye,resolveShadowValue:()=>Co,returnSubThemeOrDefault:()=>ng,rgbArrayToHex:()=>Fl,rgbToHSL:()=>Nl,rgbToHex:()=>tg,runThroughMedia:()=>lf,scratchDefaultConfig:()=>vn,scratchSystem:()=>In,scratchUtils:()=>Ir,semanticIcons:()=>bg,sequence:()=>cr,set:()=>To,setActiveConfig:()=>tf,setAdaptiveSchemeVar:()=>$r,setColor:()=>Dr,setCustomFont:()=>Zi,setCustomFontMedia:()=>Rr,setEach:()=>zg,setFont:()=>ba,setFontFamily:()=>Rn,setFontImport:()=>kn,setGradient:()=>On,setInCustomFontMedia:()=>Kl,setMediaTheme:()=>ya,setSVG:()=>Pn,setScalingVar:()=>oa,setShadow:()=>Lr,setSubScalingVar:()=>ef,setSvgIcon:()=>Eo,setTheme:()=>ma,setValue:()=>Vg,setVariables:()=>Dg,shadow:()=>mg,shape:()=>Rg,sizes:()=>Og,spacing:()=>dg,splitSpacedValue:()=>da,splitTopLevelCommas:()=>ar,splitTopLevelSpaces:()=>Ki,splitTransition:()=>mf,srgbChannelToLinear:()=>Vl,srgbToOklab:()=>Gi,svg:()=>kg,svgData:()=>vg,templates:()=>Cg,theme:()=>gg,timing:()=>_g,toCamel:()=>ea,toLinearChannel:()=>_n,transformBackgroundImage:()=>pf,transformBorder:()=>Ye,transformBorderRadius:()=>ur,transformBoxShadow:()=>Aa,transformDuration:()=>Oa,transformGridTemplate:()=>gf,transformShadow:()=>df,transformSize:()=>bt,transformSizeRatio:()=>L,transformTextStroke:()=>uf,transformTransition:()=>Ug,transfromGap:()=>hf,typography:()=>Qi,unit:()=>ig,vars:()=>Tg});var Ir={};P(Ir,{COMPOUND_CSS_KEYWORDS:()=>yo,CSS_NAMED_COLOR_HEX:()=>Ll,CSS_NATIVE_COLOR_REGEX:()=>re,CSS_UNITS:()=>Go,applyMediaSequenceVars:()=>Pr,applySequenceGlobalVars:()=>ca,applySequenceVars:()=>fr,changeLightness:()=>og,colorStringToRgbaArray:()=>me,compositeOverBackdrop:()=>bo,contrastRatio:()=>wn,convertSvgToSymbol:()=>la,findHeadingLetter:()=>of,findHeadings:()=>aa,generateSequence:()=>Gt,generateSequencePosition:()=>Ig,generateSprite:()=>Tn,generateSubSequence:()=>ia,getColorShade:()=>Bl,getDefaultOrFirstKey:()=>_o,getFnPrefixAndValue:()=>lr,getFontFace:()=>sg,getFontFaceEach:()=>xo,getFontFaceEachString:()=>Gl,getFontFaceString:()=>Ji,getFontFormat:()=>ql,getRgbTone:()=>qe,getSequenceValue:()=>So,getSequenceValueBySymbols:()=>rf,getSequenceValuePropertyPair:()=>Ge,getSubratio:()=>sa,getSubratioDifference:()=>na,hexToRgb:()=>Qh,hexToRgbArray:()=>Ml,hexToRgba:()=>eg,hslToRgb:()=>jl,isCSSVar:()=>gt,isDomDocument:()=>er,isGoogleFontsUrl:()=>Sn,isHostObject:()=>rr,isRawUnitValue:()=>Os,isResolvedColor:()=>Te,isScalingUnit:()=>oo,isWritableFamilyBucket:()=>Ed,linearChannelToSrgb:()=>zl,mixTwoColors:()=>Jh,mixTwoRgb:()=>rg,mixTwoRgba:()=>Ul,numToLetterMap:()=>Ke,oklabToLinearSrgb:()=>Hl,oklabToOklch:()=>Yi,oklchToGamutSafeSrgb:()=>Xi,oklchToOklab:()=>Wl,opacify:()=>xn,parkHostObject:()=>xr,parseColorToken:()=>Lt,relativeLuminance:()=>mo,resolveConfigDocument:()=>Ko,resolveFileUrl:()=>ye,returnSubThemeOrDefault:()=>ng,rgbArrayToHex:()=>Fl,rgbToHSL:()=>Nl,rgbToHex:()=>tg,setCustomFont:()=>Zi,setCustomFontMedia:()=>Rr,setFontImport:()=>kn,setInCustomFontMedia:()=>Kl,setScalingVar:()=>oa,setSubScalingVar:()=>ef,setVariables:()=>Dg,splitTopLevelCommas:()=>ar,splitTopLevelSpaces:()=>Ki,srgbChannelToLinear:()=>Vl,srgbToOklab:()=>Gi,toLinearChannel:()=>_n});var er=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0),rr=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)},Ed=t=>t!==null&&typeof t=="object"&&!rr(t),xr=(t,e,r)=>{if(!t)return;if(er(r)){t.__domDocument||(t.__domDocument=r);return}let o=`__host_${e}`;t[o]||(t[o]=r)},Ko=t=>t?er(t.__domDocument)?t.__domDocument:er(t.document)?t.document:null:null;var oo=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",Go=["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"],yE=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),bE=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${Go.filter(t=>t!=="auto").map(yE).join("|")})$`),Os=t=>bE.test(String(t).trim());R();var Ll={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"},me=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=Ll[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&&tt&&v){let r=tt.body.appendChild(tt.createElement("fictum")),o="rgb(1, 2, 3)";if(r.style.color=o,r.style.color!==o){tt.body.removeChild(r);return}if(r.style.color=t,r.style.color===o||r.style.color==="")return tt.body.removeChild(r),[0,0,0,0];t=v.getComputedStyle(r).color,tt.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]},Jh=(t,e,r=.5)=>(t=me(t),e=me(e),Ul(t,e,r)),Qh=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${r},${o},${n})`},Ml=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[r,o,n]},tg=(t,e,r)=>"#"+(1<<24|t<<16|e<<8|r).toString(16).slice(1),Fl=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1),eg=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${r},${o},${n},${e})`},rg=(t,e,r=.5)=>{let o=[];for(let n=0;n<3;n++)o[n]=~~(t[n]+(e[n]-t[n])*r);return`rgb(${o})`},og=(t,e)=>{let[r,o,n]=e,s=Math.max(0,Math.min(100,n+parseFloat(t)));return[r,o,s]},Nl=(t,e,r)=>{let o=Math.max(t,e,r),n=o-Math.min(t,e,r),s=1-Math.abs(o+o-n-1),i=n&&(o==t?(e-r)/n:o==e?2+(r-t)/n:4+(t-e)/n);return[60*(i<0?i+6:i),s?n/s:0,(o+o-n)/2]},jl=(t,e,r,o=e*Math.min(r,1-r),n=(s,i=(s+t/30)%12)=>r-o*Math.max(Math.min(i-3,9-i,1),-1))=>[n(0),n(8),n(4)],Bl=(t,e)=>{let r=parseInt(t,16),o=(r>>16)+e;o>255?o=255:o<0&&(o=0);let n=(r>>8&255)+e;n>255?n=255:n<0&&(n=0);let s=(r&255)+e;return s>255?s=255:s<0&&(s=0),((s|n<<8|o<<16)+16777216).toString(16).slice(1)},Ul=(t,e,r=.5)=>{let o=[];for(let n=0;n<4;n++){let s=n===3?i=>i:Math.round;o[n]=s(t[n]+(e[n]-t[n])*r)}return`rgba(${o})`},xn=(t,e)=>{let r=me(t);if(!r){lo()&&console.warn(t+" color is not rgba");return}return r[3]=e,`rgba(${r})`},gt=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,yo=new Set(["currentcolor","transparent","thin","medium","thick"]),re=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,kA=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,Lt=t=>{if(!w(t))return null;if(re.test(t))return{passthrough:t};if(gt(t))return{cssVar:t};let e=t.match(kA);if(!e)return null;let[,r,o,n]=e,s=o!==void 0?`0.${o}`:void 0,i=n&&n[0]==="="?n.slice(1):n;return{name:r,alpha:s,tone:i}},Te=t=>w(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),ar=t=>{let e=[],r="",o=0;for(let n of t){if(n==="("?o+=1:n===")"&&o>0&&(o-=1),n===","&&o===0){e.push(r),r="";continue}r+=n}return(r.length||!e.length)&&e.push(r),e},Ki=t=>{let e=[],r="",o=0;for(let n of t){if(n==="("?o+=1:n===")"&&o>0&&(o-=1),o===0&&/\s/.test(n)){r.length&&e.push(r),r="";continue}r+=n}return r.length&&e.push(r),e},_n=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),mo=t=>.2126*_n(t[0])+.7152*_n(t[1])+.0722*_n(t[2]),wn=(t,e)=>{let r=mo(t)+.05,o=mo(e)+.05;return r>o?r/o:o/r},Vl=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,Gi=([t,e,r])=>{let[o,n,s]=[t,e,r].map(Vl),i=.4122214708*o+.5363325363*n+.0514459929*s,a=.2119034982*o+.6806995451*n+.1073969566*s,c=.0883024619*o+.2817188376*n+.6299787005*s,l=Math.cbrt(i),f=Math.cbrt(a),u=Math.cbrt(c);return[.2104542553*l+.793617785*f-.0040720468*u,1.9779984951*l-2.428592205*f+.4505937099*u,.0259040371*l+.7827717662*f-.808675766*u]},Hl=([t,e,r])=>{let o=t+.3963377774*e+.2158037573*r,n=t-.1055613458*e-.0638541728*r,s=t-.0894841775*e-1.291485548*r,i=o**3,a=n**3,c=s**3;return[4.0767416621*i-3.3077115913*a+.2309699292*c,-1.2684380046*i+2.6097574011*a-.3413193965*c,-.0041960863*i-.7034186147*a+1.707614701*c]},Yi=([t,e,r])=>{let o=Math.atan2(r,e)*180/Math.PI;return o<0&&(o+=360),[t,Math.sqrt(e*e+r*r),o]},Wl=([t,e,r])=>{let o=r*Math.PI/180;return[t,e*Math.cos(o),e*Math.sin(o)]},Xi=(t,e,r,o=24)=>{let n=a=>Hl(Wl([t,a,r])),s=a=>a.every(c=>c>=-1e-4&&c<=1.0001),i=n(e);if(!s(i)){let a=0,c=e;for(let l=0;l<o;l++){let f=(a+c)/2;s(n(f))?a=f:c=f}i=n(a)}return i.map(a=>zl(Math.max(0,Math.min(1,a))))},bo=(t,e=1,r=[255,255,255])=>e>=1?t:t.map((o,n)=>o*e+r[n]*(1-e)),qe=(t,e)=>{w(t)&&t.includes("rgb")&&(t=me(t).join(", ")),w(t)&&(t=t.split(",").map(n=>parseFloat(n.trim()))),je(e)&&(e+="");let r=Fl(t),o=e.slice(0,1);if(o==="-"||o==="+"){let n=Bl(r,parseFloat(e));return Ml(n).join(", ")}else{let[n,s,i]=t,[a,c]=Nl(n/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return jl(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var ng=(t,e)=>{if(t)return t.themes&&t.themes[e]?t.themes[e]:t[e]?[t,t[e]]:t};var ye=(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},_o=(t,e)=>{if(t[e])return t[e].value;let r=()=>Object.keys(t).find(n=>n!=="default"&&t[n]&&t[n].value&&!t[n].isSystemFallback);if(t.default){let n=t[t.default];if(n&&n.isSystemFallback){let s=r();if(s)return t[s].value}if(n)return n.value}let o=r()||Object.keys(t).find(n=>n!=="default"&&t[n]&&t[n].value);return o&&t[o]&&t[o].value},ql=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},Sn=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),kn=t=>`@import url('${t}');`,Kl=t=>`@font-face { ${t} }`,Zi=(t,e,r,o={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=ql(a),l=c?` format('${c}')`:"";return`url('${a}')${l}`}).join(`,
31
+ }`;return`${a}${l}${c}`}});var Nh,mx=j(()=>{"use strict";Nh=e=>{if(!e)return"";let t=new Date(e),r=new Intl.DateTimeFormat("en",{year:"numeric"}).format(t),n=new Intl.DateTimeFormat("en",{month:"short"}).format(t);return`${new Intl.DateTimeFormat("en",{day:"2-digit"}).format(t)} ${n}, ${r}`}});var jh,yx=j(()=>{"use strict";jh=(e,t)=>{let r=setTimeout(()=>{let{props:n}=e;if(!t.clientHeight){let{node:{clientHeight:o}}=e;o&&(t.clientHeight=o)}if(t.active){if(n.height==="auto")return;e.update({height:t.clientHeight},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});let o=setTimeout(()=>{e.update({height:"auto"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0}),clearTimeout(o)},450)}else e.update({height:"0"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});clearTimeout(r)})}});var Bh,bx=j(()=>{"use strict";Bh=function(t){let r=[0,1];for(let n=2;n<=t;n++)r[n]=r[n-1]+r[n-2];return r[t]}});var Uh,_x=j(()=>{"use strict";Uh=e=>["jpeg","gif","jpg","png","tiff","woff"].includes(e)});function bo(e,t={}){let{window:r=globalThis}=t,{document:n=r.document}=t;return new Promise((o,s)=>{let i=n.querySelector(`script[src="${e}"]`);if(i)return o(i);let a=n.createElement("script");a.src=e,a.async=t.async===!0,a.type=t.type||"text/javascript",t.id&&(a.id=t.id),t.integrity&&(a.integrity=t.integrity),t.crossOrigin&&(a.crossOrigin=t.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load script: ${e}`))},n.head.appendChild(a)})}async function Kh(e,t={}){let{window:r=globalThis}=t,{document:n=r.document}=t;return new Promise((o,s)=>{let i=n.querySelector(`link[href="${e}"]`);if(i)return o(i);let a=n.createElement("link");a.href=e,a.rel=t.rel||"stylesheet",a.type="text/css",a.media=t.media||"all",t.id&&(a.id=t.id),t.integrity&&(a.integrity=t.integrity),t.crossOrigin&&(a.crossOrigin=t.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load stylesheet: ${e}`))},n.head.appendChild(a)})}var Vh,zh,Hh,Wh,qh,xx=j(()=>{"use strict";Vh=(e,t=!1,r=document,n="text/javascript")=>new Promise((o,s)=>{try{let i=r.createElement("script");i.type=n,i.async=t,i.src=e,i.addEventListener("load",a=>{o({status:!0})}),i.addEventListener("error",a=>{s(new Error({status:!1,message:`Failed to load the script ${e}`}))}),r.body.appendChild(i)}catch(i){s(i)}}),zh=(e,t=document,r="text/javascript")=>new Promise((n,o)=>{let s=t.createElement("script");s.type=r,s.src=e;let i=t.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;",t.body.appendChild(i),s.onload=()=>{console.log(`Successfully loaded: ${e}`),t.body.removeChild(i),n()},s.onerror=()=>{t.body.removeChild(i),o(new Error(`Failed to load: ${e}`))},t.body.appendChild(s)}),Hh=(e,t=document,r,n="text/javascript")=>{let o=new window.XMLHttpRequest;if(o.open("GET",e,!1),o.send(),o.status===200){let s=t.createElement("script");s.type=n,s.text=o.responseText,t.body.appendChild(s),typeof r=="function"&&r()}else throw new Error(`Failed to load the script ${e}`)},Wh=(e,t=!1,r=document,n="text/javascript")=>new Promise((o,s)=>{try{let i=r.createElement("link");i.rel="stylesheet",i.href=e,i.addEventListener("load",a=>{o({status:!0})}),r.head.appendChild(i)}catch(i){s(i)}}),qh=(e,t=!1,r=document,n="text/javascript",o="smbls-script")=>{try{let s=r.createElement("script");s.type=n,s.async=t,s.id=o,s.innerHTML=e,r.body.appendChild(s)}catch(s){console.warn(s)}}});function PA(e,t){if(!t||typeof t!="object")return e;let r=o=>{if(!RA(o))return o;let s=t[o];return s?.src?s.src:o},n={...e};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 Il(e,t){if(!e||!t)return;let r=t.split("."),n=e;for(let o of r){if(n==null||typeof n!="object")return;n=n[o]}return n}function DA(e,t,r){let o=(t.config||t.settings||{}).polyglot||t.polyglot,s=r?.lang||o?.defaultLang||"en",a=(o?.translations||{})[s]||{},c=r?.state||{},l={...e};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,g)=>{let h=p.trim();if(g==="polyglot")return a[h]??Il(a,h)??d;if(g==="getLocalStateLang")return Il(c,h+s)??d;let m=Il(c,h);return m!==void 0?m:a[h]??Il(a,h)??d}));return l}function wx(e){let t={...e};for(let[r,n]of Object.entries(t))if(typeof n=="function"){let o=n.toString(),s=o.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){t[r]=`{{ ${s[1]} | getLocalStateLang }}`;continue}let i=o.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(i){t[r]=`{{ ${i[1]} | polyglot }}`;continue}let a=o.match(/s\.(\w+(?:\.\w+)+)/);if(a){t[r]=`{{ ${a[1]} }}`;continue}delete t[r]}else if(typeof n=="string"){let o=n.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(o){t[r]=`{{ ${o[1]} | getLocalStateLang }}`;continue}let s=n.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){t[r]=`{{ ${s[1]} | polyglot }}`;continue}if(n.includes("=>")&&n.includes("s.")){let i=n.match(/s\.(\w+(?:\.\w+)+)/);if(i){t[r]=`{{ ${i[1]} }}`;continue}}}return t}function Yh(e,t,r,{isProduction:n=!1,channel:o="production"}={}){let s=e.pages?.[t],i=k(s?.state)&&s?.state,a=s?.metadata||s?.helmet||i||{},c=wx(a),l=new Set(Object.keys(c)),f=e.app?.metadata||{},u=wx(f),d={};if(e.integrations?.seo?d={...e.integrations.seo,...u,...c}:Object.keys(u).length?d={...u,...c}:d={...c},!d.title){let h=e.name||e.key;h?n?d.title=h:o==="development"?d.title=`${h} / dev:symbo.ls`:o==="staging"?d.title=`${h} / staging:symbo.ls`:d.title=`${h} / symbo.ls`:d.title="Symbols demo"}d=DA(d,e,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||t;if(d["og:url"]||d.url){let h=(d["og:url"]||d.url||"").replace(/\/$/,"");if(h&&p&&p!=="/"){let m=p.startsWith("/")?p:"/"+p;d["og:url"]=h+m}}d=PA(d,e.files);let g=e.name||e.app?.metadata?.title||e.app?.name||"";for(let[h,m]of Object.entries(d))if(typeof m=="string"&&m.includes("{{")){let _=m.replace(/\{\{[^}]*\}\}/g,"").trim();_?d[h]=_:h==="title"?d[h]=g:delete d[h]}return d}var Re,TA,_o,OA,$l,Gh,RA,Sx=j(()=>{"use strict";Te();Re=e=>{if(e==null)return"";let t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return e.toString().replace(/[&<>"']/g,r=>t[r])},TA=e=>Object.entries(e||{}).filter(([t,r])=>r!==void 0).map(([t,r])=>`${t}="${Re(r)}"`).join(" "),_o=e=>{let t=5381,r=String(e);for(let n=0;n<r.length;n++)t=(t*33^r.charCodeAt(n))>>>0;return t.toString(36)},OA=new Set(["jsonLd","styles","scripts"]),$l=e=>{let t=[];if(Array.isArray(e.jsonLd))for(let r of e.jsonLd){if(r==null)continue;let n=typeof r=="string"?r:JSON.stringify(r),o=String(n).replace(/<\/script/gi,"<\\/script");t.push(`<script type="application/ld+json" data-smbls-jsonld="${_o(n)}">${o}<\/script>`)}if(Array.isArray(e.styles))for(let r of e.styles){if(r==null||!String(r).trim())continue;let n=String(r).replace(/<\/style/gi,"<\\/style");t.push(`<style data-smbls-style="${_o(n)}">${n}</style>`)}if(Array.isArray(e.scripts))for(let r of e.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="${Re(o)}"`),n||(r.type&&s.push(`type="${Re(r.type)}"`),r.async&&s.push("async"),r.defer&&s.push("defer"),r.integrity&&s.push(`integrity="${Re(r.integrity)}"`),r.crossorigin&&s.push(`crossorigin="${Re(r.crossorigin)}"`),r.referrerpolicy&&s.push(`referrerpolicy="${Re(r.referrerpolicy)}"`),r.nomodule&&s.push("nomodule"));let i=` data-smbls-script="${Re(o||_o(r.body||""))}"`;if(!n&&r.body){let a=String(r.body).replace(/<\/script/gi,"<\\/script");t.push(`<script ${s.join(" ")}${i}>${a}<\/script>`)}else t.push(`<script ${s.join(" ")}${i}><\/script>`)}return t},Gh=(e,t)=>{t||(e={...e,robots:"noindex"});let r=Object.entries(e).reduce((n,[o,s])=>{if(!s&&s!==0&&s!==!1||OA.has(o))return n;if(o==="title")return n.push(`<title>${Re(s)}</title>`),n;if(o==="canonical")return n.push(`<link rel="canonical" href="${Re(s)}">`),n;if(o==="manifest")return n.push(`<link rel="manifest" href="${Re(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="${Re(f)}">`);else if(typeof f=="object"){let u=TA(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}="${Re(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}="${Re(l)}" content="${Re(f)}">`);else if(Array.isArray(f))f.forEach(d=>{if(typeof d=="string"||typeof d=="number"||typeof d=="boolean")n.push(`<meta ${u}="${Re(l)}" content="${Re(d)}">`);else if(typeof d=="object"){let p=Object.entries(d).filter(([g,h])=>h!==void 0).map(([g,h])=>`${g}="${Re(h)}"`).join(" ");n.push(`<meta ${p}>`)}});else if(typeof f=="object"){let d=Object.entries(f).filter(([p,g])=>g!==void 0).map(([p,g])=>`${p}="${Re(g)}"`).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(...$l(e)),r.join(`
32
+ `)},RA=e=>typeof e=="string"&&e.length>0&&!e.startsWith("/")&&!e.startsWith("http")});var Ll,Xh,kx=j(()=>{"use strict";Te();Ll=(e,t)=>(O(t)?t:Object.values(t)).reduce((r,n)=>Math.abs(n-e)<Math.abs(r-e)?n:r),Xh=(e,t)=>(e=parseFloat(e),k(t)&&(t=Object.values(t)),Ll(e,t))});function xo(e){let t=String(e||"").trim();if(!t)return{owner:vx,key:"",full:""};let r=null,n=t;if(t.includes("/")){let s=t.indexOf("/");r=t.slice(0,s),n=t.slice(s+1)}n=n.replace(/\.symbo\.ls$/iu,""),r||(r=vx);let o=n?`${r}/${n}`:"";return{owner:r,key:n,full:o}}async function Ml(e,t={}){if((t.provider||"kv")==="api")return Ex(e,t);let n=await BA(e,t);return n||Ex(e,t)}async function BA(e,t={}){let r=t.kvBaseUrl||IA,n=t.env||"production",o=`${r}/kv/${encodeURIComponent(e)}?env=${n}`;try{let s=await fetch(o,{method:"GET"});return s.ok&&(await s.json())?.value||null}catch{return null}}async function Ex(e,t={}){let r=t.apiBaseUrl||$A,{key:n}=xo(e);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:g}=xo(p?.key);return g.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 Ax(e,t={}){if(k(e))return e;if(w(e)){let{full:r}=xo(e);if(!r)return null;try{let n=await Ml(r,t);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 Jh(e,t={}){return!e||!e.length?[]:(await Promise.all(e.map(async n=>{if(Kt(n)){let o=await Ax(NA(n),t);return o?{library:o,ignoreList:n.ignoreList}:null}return Ax(n,t)}))).filter(Boolean)}var vx,IA,$A,Wi,Tx,LA,MA,Cx,FA,Dr,Zh,Kt,NA,jA,qi,Ox=j(()=>{"use strict";Te();vx="system",IA="https://smbls-kv.nika-980.workers.dev",$A="https://api.symbols.app";Wi=(e,t,r,n)=>{for(let o in t){let s=n?`${n}/${o}`:o;r&&r.has(s)||(o in e?k(e[o])&&k(t[o])&&Wi(e[o],t[o],r,s):e[o]=t[o])}},Tx=(e,t,r)=>{if(!k(e)||!t.size)return e;let n=`${r}/`,o=!1;for(let i of t)if(i.startsWith(n)){o=!0;break}if(!o)return e;let s={};for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;let a=`${r}/${i}`;t.has(a)||(s[i]=Tx(e[i],t,a))}return s},LA=new Set,MA=new Set(["components","pages","functions","snippets","methods"]),Cx=(e,t)=>t===""&&MA.has(e),FA=e=>e.replace(/\.js$/iu,""),Dr=e=>{let t=new Set;if(!Array.isArray(e))return t;for(let r of e){if(!w(r))continue;let n=r.split("/").map(o=>FA(o.trim())).filter(Boolean).join("/");n&&t.add(n)}return t},Zh=(e,t={})=>({library:e,ignoreList:Array.isArray(t.ignoreList)?t.ignoreList:[]}),Kt=e=>k(e)&&Array.isArray(e.ignoreList)&&("library"in e||"key"in e||"name"in e),NA=e=>e.library!==void 0?e.library:e.key??e.name,jA=(e,t,r)=>{let n=Dr(t.sharedLibIgnore);t.sharePages===!1&&n.add("pages");let o=n.size?new Set([...r,...n]):r;for(let s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&!(s==="sharePages"||s==="sharedLibIgnore")&&s!=="app"&&!o.has(s))if(k(t[s])&&k(e[s]))if(s==="designSystem")Wi(e[s],t[s],o,s);else for(let i in t[s])o.has(`${s}/${i}`)||(i in e[s]?Cx(s,e[s][i])&&!Cx(s,t[s][i])&&(e[s][i]=t[s][i]):e[s][i]=t[s][i]);else s in e||(e[s]=Tx(t[s],o,s))},qi=(e,t)=>{if(!(!t||!t.length))for(let r=0;r<t.length;r++){let n=t[r],o=LA;Kt(n)&&(o=Dr(n.ignoreList),n=n.library),k(n)&&jA(e,n,o)}}});var Qh,eg,tg,Ki,rg,Gi,ng,bn,Rx=j(()=>{"use strict";Te();Qh=async e=>{try{await navigator.clipboard.writeText(e)}catch(t){console.warn("Failed to copy text: ",t)}},eg=async e=>{try{let t=new Blob([e],{type:"text/javascript"}),r=new window.ClipboardItem({"text/plain":t});await navigator.clipboard.write([r]),console.log("JavaScript code copied to clipboard as text/javascript")}catch(t){console.error("Failed to copy JavaScript code: ",t)}},tg=e=>e.replace(/[^a-zA-Z0-9_]/g,""),Ki=e=>(typeof e!="string"&&(e=String(e||"")),e.replace(/(?:^\w|[A-Z]|\b\w)/g,function(t,r){return r===0?t.toLowerCase():t.toUpperCase()}).replace(/\s+/g,"")),rg=e=>e&&e.replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()),Gi=e=>e.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),ng=(e="")=>{if(typeof e!="string")return;let t=e.replace(/([A-Z])/g," $1");return t.charAt(0).toUpperCase()+t.slice(1)},bn=e=>{if(O(e))return e;if(w(e))return e.split(" ");if(k(e))return Object.values(e);if(Bt(e))return[e]}});var og,Px=j(()=>{"use strict";og=()=>{let e=document.styleSheets[0],t="";if(e)try{let r=e.cssRules||e.rules;for(let n=0;n<r.length;n++)t+=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 t}});var Ge,wo,Yi,Xi,Dx=j(()=>{"use strict";Ge=e=>{let t=e&&e.src;if(!t||typeof t!="string")return null;let r=e.context;if(!r)return null;let n=r.assets&&r.assets[t]||r.files&&r.files[t];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},wo=(e,{keepOneX:t=!0}={})=>{if(!Array.isArray(e)||!e.length)return"";let r=e.some(o=>typeof o.width=="number"),n=[];for(let o of e)r&&typeof o.width=="number"?n.push(`${o.src} ${o.width}w`):r||(o.scale===1&&t?n.push(o.src):o.scale&&o.scale!==1&&n.push(`${o.src} ${o.scale}x`));return n.join(", ")},Yi=e=>{if(!e||!Array.isArray(e.variants))return"";let t=e.variants.filter(r=>r.format===e.type);return wo(t,{keepOneX:!1})},Xi=(e,t)=>{if(!e||typeof e!="object"||typeof e.src!="string")return[];if(!Array.isArray(e.variants)||!e.variants.length)return[{tag:"img",attr:{src:e.src,alt:t||""}}];let r=new Map;for(let a of e.variants)r.has(a.format)||r.set(a.format,[]),r.get(a.format).push(a);let n=[];for(let[a,c]of r)a!==e.type&&n.push({tag:"source",attr:{type:a,srcset:wo(c,{keepOneX:!0})}});let o=r.get(e.type)||[],s=wo(o,{keepOneX:!1}),i={src:e.src,alt:t||""};return s&&(i.srcset=s),[...n,{tag:"img",attr:i}]}});var Fl={};I(Fl,{CDN_PROVIDERS:()=>mt,DOMQL_EVENTS:()=>np,DOMQ_PROPERTIES:()=>kr,ENV:()=>_p,HTML_TAGS:()=>so,METHODS:()=>eo,METHODS_EXL:()=>Gs,NODE_ENV:()=>Ct,OPTIONS:()=>_i,PACKAGE_MANAGER_TO_CDN:()=>Pr,PARSED_DOMQ_PROPERTIES:()=>Ks,PROPS_METHODS:()=>vr,STATE_METHODS:()=>fn,STATE_PROPERTIES:()=>rp,SVG_TAGS:()=>I_,TYPES:()=>Bs,UNIVERSAL_RESERVED_KEYS:()=>Pl,addCaching:()=>pl,addContext:()=>dl,addExtend:()=>Hp,addExtends:()=>Vt,addItemAfterEveryElement:()=>zd,addProtoToArray:()=>zs,addRef:()=>ll,applyDependentState:()=>lh,applyEvent:()=>_l,applyEventUpdate:()=>xl,applyExtends:()=>M_,applyProps:()=>di,arrayContainsOtherArray:()=>Md,arraysEqual:()=>Wd,arrayzeValue:()=>bn,buildImgSrcset:()=>Yi,buildSourcesAndImg:()=>Xi,cache:()=>hh,call:()=>Dh,captureSnapshot:()=>$h,checkForStateTypes:()=>sh,checkIfInherits:()=>bl,checkIfStringIsInArray:()=>Gd,clone:()=>sp,cloneAndMergeArrayExtend:()=>oi,cloneFunction:()=>Tp,collectExtendsList:()=>io,concatAddExtends:()=>Up,copyJavaScriptToClipboard:()=>eg,copyStringToClipboard:()=>Qh,createBasedOnType:()=>cl,createElement:()=>oh,createElementExtends:()=>Xc,createExtends:()=>ii,createExtendsFromKeys:()=>ao,createExtendsStack:()=>el,createIfConditionFlag:()=>Op,createInheritedState:()=>ih,createKey:()=>ri,createNestedObject:()=>dp,createNestedObjectByKeyPath:()=>ch,createObjectWithoutPrototype:()=>zc,createParent:()=>fl,createPath:()=>ul,createProps:()=>pi,createPropsStack:()=>il,createRoot:()=>nh,createScope:()=>uh,createSnapshotId:()=>ti,customDecodeURIComponent:()=>tp,customEncodeURIComponent:()=>ep,cutArrayAfterValue:()=>Ud,cutArrayBeforeValue:()=>Bd,debounce:()=>ni,debounceOnContext:()=>Cp,decodeNewlines:()=>Qd,deepClone:()=>le,deepContains:()=>fp,deepDefaults:()=>Wi,deepDestringifyFunctions:()=>pt,deepExtend:()=>Yc,deepMerge:()=>ne,deepMergeExtends:()=>zt,deepStringifyFunctions:()=>Xs,defineSetter:()=>Rh,destringifyGlobalScope:()=>Js,detectHeightOnInit:()=>jh,detectInfiniteLoop:()=>mp,document:()=>ee,encodeNewlines:()=>Jd,error:()=>mn,excludeKeysFromObject:()=>bp,exec:()=>fe,extendCachedRegistry:()=>Vp,extendStackRegistry:()=>ai,extractArrayExtend:()=>li,fetchLibraryData:()=>Ml,fibonacciNumberByIndex:()=>Bh,filterArrays:()=>qd,filterArraysFast:()=>Kd,finalizeExtends:()=>tl,findClosestNumber:()=>Ll,findClosestNumberInFactory:()=>Xh,findInheritedState:()=>yl,findKeyPosition:()=>Xd,flattenExtend:()=>co,formatDate:()=>Nh,generateHash:()=>qc,generateHeadArrayTags:()=>$l,generateKey:()=>ei,generateMetaTags:()=>Gh,get:()=>Ah,getCDNDirUrl:()=>Dl,getCDNUrl:()=>At,getCapitalCaseKeys:()=>Kp,getCdnProviderFromConfig:()=>go,getChildStateInKey:()=>ml,getChildren:()=>Oi,getContext:()=>Mi,getCookie:()=>$p,getDB:()=>Ui,getEmotionStylesheet:()=>og,getExtendsInElement:()=>Wp,getExtendsStack:()=>si,getExtendsStackRegistry:()=>Gc,getFrequencyInArray:()=>Fd,getHashedExtend:()=>ci,getImportMapScript:()=>Fh,getInObjectByPath:()=>gp,getLocalStorage:()=>Mp,getNev:()=>kp,getPageMetadata:()=>Yh,getParentStateInKey:()=>gl,getPath:()=>Ri,getQuery:()=>Vi,getRef:()=>Oh,getRoot:()=>Ii,getRootContext:()=>Li,getRootData:()=>$i,getRootState:()=>Di,getRootStateInKey:()=>hl,getSpreadChildren:()=>Gp,global:()=>Id,hasFunction:()=>Ut,hasHandlerPlugin:()=>ro,hasOwnProperty:()=>ap,hashContent:()=>_o,inheritChildExtends:()=>Jc,inheritChildPropsExtends:()=>Zc,inheritParentProps:()=>hi,inheritRecursiveChildExtends:()=>Qc,initProps:()=>eh,is:()=>qe,isArray:()=>O,isBoolean:()=>Nc,isContextComponent:()=>Yp,isCyclic:()=>yp,isDOMNode:()=>We,isDate:()=>Bc,isDefined:()=>ke,isDevelopment:()=>Er,isEmpty:()=>Uc,isEmptyObject:()=>cp,isEqualDeep:()=>Vc,isFunction:()=>A,isHtmlElement:()=>Ns,isLocal:()=>Sp,isLoudDevRuntime:()=>Oe,isMalformedDependency:()=>mo,isMethod:()=>Ih,isMobile:()=>Dp,isNode:()=>or,isNot:()=>Ld,isNotProduction:()=>pn,isNull:()=>jc,isNumber:()=>Bt,isObject:()=>k,isObjectLike:()=>N,isPhoto:()=>Uh,isPolyglotWritableKey:()=>ir,isProduction:()=>Cr,isStaging:()=>wp,isState:()=>ah,isString:()=>w,isStringFunction:()=>Ap,isTest:()=>Wc,isTesting:()=>xp,isUndefined:()=>Ae,isUniversallyReservedKey:()=>Lh,isUnresolvableDependency:()=>yn,isValidDependencyMap:()=>yo,isValidHtmlTag:()=>Np,isWrappedLibrary:()=>Kt,joinArrays:()=>Zn,jointStacks:()=>zp,keys:()=>Ol,loadCssFile:()=>Wh,loadJavascript:()=>qh,loadJavascriptFile:()=>Vh,loadJavascriptFileEmbedSync:()=>Hh,loadJavascriptFileSync:()=>zh,loadRemoteCSS:()=>Kh,loadRemoteScript:()=>bo,log:()=>Ph,logGroupIf:()=>Pp,logIf:()=>Rp,lookdown:()=>Ch,lookdownAll:()=>Eh,lookup:()=>vh,lowercaseFirstLetter:()=>ln,makeObjectWithoutPrototype:()=>lp,map:()=>op,mapStringsWithContextComponents:()=>fi,markPolyglotSeeded:()=>Wt,matchesComponentNaming:()=>Ht,memoize:()=>Ep,merge:()=>pe,mergeSharedLibraries:()=>qi,nextElement:()=>Ni,normalizeIgnoreList:()=>Dr,normalizeLibraryKey:()=>xo,objectToString:()=>Zs,objectizeStringProperty:()=>ui,overwrite:()=>Qs,overwriteDeep:()=>Ke,overwriteShallow:()=>dn,overwriteState:()=>fh,parse:()=>Rl,parseDeep:()=>Ai,pickupElementFromProps:()=>ol,pickupPropsFromElement:()=>nl,polyglotSeededKeys:()=>bi,previousElement:()=>ji,propExists:()=>Jp,propertizeElement:()=>sl,propertizeUpdate:()=>Zp,remove:()=>cx,removeChars:()=>tg,removeCookie:()=>Lp,removeDuplicateProps:()=>mi,removeDuplicatesInArray:()=>Jn,removeFromArray:()=>Nd,removeFromObject:()=>up,removeNestedKeyByPath:()=>pp,removeValueFromArray:()=>Vs,removeValueFromArrayAll:()=>Vd,reorderArrayByValues:()=>Hd,replaceLiteralsWithObjectFields:()=>cn,replaceOctalEscapeSequences:()=>Zd,resolveAsset:()=>Ge,resolveHandler:()=>no,resolveSharedLibraries:()=>Jh,returnValueAsText:()=>al,runPluginHook:()=>Ee,self:()=>$d,setActiveRootState:()=>Pi,setCookie:()=>Ip,setHashedExtend:()=>Kc,setInObjectByPath:()=>hp,setLocalStorage:()=>Fp,setNodeStyles:()=>Tl,setProps:()=>Th,setPropsPrototype:()=>gi,sharedLibrary:()=>Zh,splitPackageSpecifier:()=>zi,spotByPath:()=>Ti,srcsetFor:()=>wo,stringIncludesAny:()=>Ws,stringToObject:()=>ip,stripVersionRangePrefix:()=>Hi,swapItemsInArray:()=>jd,syncProps:()=>yi,toCamelCase:()=>Ki,toDashCase:()=>Gi,toDescriptionCase:()=>ng,toPriorityOrder:()=>ht,toTitleCase:()=>rg,toggleFullscreen:()=>Mh,triggerEventOn:()=>Ar,triggerEventOnUpdate:()=>dh,trimStringFromSymbols:()=>Yd,unstackArrayOfObjects:()=>Us,update:()=>Qp,updateProps:()=>th,variables:()=>Bi,verbose:()=>uo,warn:()=>Fi,window:()=>C});var P=j(()=>{"use strict";Hc();vp();Te();sr();oo();Qn();js();R_();P_();qs();Fs();D_();jp();qp();rh();rl();V_();H_();to();W_();ux();gh();dx();ph();px();hx();gx();mx();yx();bx();_x();xx();Sx();kx();Ox();Rx();Px();Dx()});var SC=hd((e4,wC)=>{var Ss=1e3,ks=Ss*60,vs=ks*60,Vn=vs*24,UP=Vn*7,VP=Vn*365.25;wC.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return zP(e);if(r==="number"&&isFinite(e))return t.long?WP(e):HP(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function zP(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*VP;case"weeks":case"week":case"w":return r*UP;case"days":case"day":case"d":return r*Vn;case"hours":case"hour":case"hrs":case"hr":case"h":return r*vs;case"minutes":case"minute":case"mins":case"min":case"m":return r*ks;case"seconds":case"second":case"secs":case"sec":case"s":return r*Ss;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function HP(e){var t=Math.abs(e);return t>=Vn?Math.round(e/Vn)+"d":t>=vs?Math.round(e/vs)+"h":t>=ks?Math.round(e/ks)+"m":t>=Ss?Math.round(e/Ss)+"s":e+"ms"}function WP(e){var t=Math.abs(e);return t>=Vn?Fu(e,t,Vn,"day"):t>=vs?Fu(e,t,vs,"hour"):t>=ks?Fu(e,t,ks,"minute"):t>=Ss?Fu(e,t,Ss,"second"):e+" ms"}function Fu(e,t,r,n){var o=t>=r*1.5;return Math.round(e/r)+" "+n+(o?"s":"")}});var vC=hd((t4,kC)=>{function qP(e){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=o,r.enabled=a,r.humanize=SC(),r.destroy=l,Object.keys(e).forEach(f=>{r[f]=e[f]}),r.names=[],r.skips=[],r.formatters={};function t(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=t;function r(f){let u,d=null,p,g;function h(...m){if(!h.enabled)return;let _=h,b=Number(new Date),y=b-(u||b);_.diff=y,_.prev=u,_.curr=b,u=b,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(_,T),m.splice(x,1),x--}return v}),r.formatArgs.call(_,m),(_.log||r.log).apply(_,m)}return h.namespace=f,h.useColors=r.useColors(),h.color=r.selectColor(f),h.extend=n,h.destroy=r.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(p!==r.namespaces&&(p=r.namespaces,g=r.enabled(f)),g),set:m=>{d=m}}),typeof r.init=="function"&&r.init(h),h}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,g=-1,h=0;for(;d<f.length;)if(p<u.length&&(u[p]===f[d]||u[p]==="*"))u[p]==="*"?(g=p,h=d,p++):(d++,p++);else if(g!==-1)p=g+1,h++,d=h;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}kC.exports=qP});var CC=hd((tt,Nu)=>{tt.formatArgs=GP;tt.save=YP;tt.load=XP;tt.useColors=KP;tt.storage=ZP();tt.destroy=(()=>{let e=!1;return()=>{e||(e=!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`."))}})();tt.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 KP(){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 e;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&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function GP(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Nu.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),e.splice(n,0,t)}tt.log=console.debug||console.log||(()=>{});function YP(e){try{e?tt.storage.setItem("debug",e):tt.storage.removeItem("debug")}catch{}}function XP(){let e;try{e=tt.storage.getItem("debug")||tt.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function ZP(){try{return localStorage}catch{}}Nu.exports=vC()(tt);var{formatters:JP}=Nu.exports;JP.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var s_={};I(s_,{ANIMATION_PROPS:()=>_m,ARIA_ROLES:()=>JT,ATTR_TRANSFORMS:()=>hm,BLOCK_PROPS:()=>xm,CDN_PROVIDERS:()=>mt,COMPOUND_CSS_KEYWORDS:()=>xn,CONFIG:()=>vn,CONFIG_MERGE_EXL:()=>ot,CSS_NAMED_COLOR_HEX:()=>Nl,CSS_NATIVE_COLOR_REGEX:()=>rt,CSS_PROPS_REGISTRY:()=>ye,CSS_UNITS:()=>Xn,DEFAULT_CONFIG:()=>Wa,DEFAULT_CSS_PROPERTIES_LIST:()=>ve,DELEGATED_EVENTS:()=>Go,DESIGN_SYSTEM_OPTIONS:()=>Xy,DOMQL_EVENTS:()=>np,DOMQ_PROPERTIES:()=>kr,DOM_EVENTS:()=>Rw,ENV:()=>_p,FACTORY:()=>nt,FLEX_PROPS:()=>Cm,FONT_PROPS:()=>wm,GRID_PROPS:()=>Em,HOST_REGISTERED_PACKAGES:()=>Pv,HTML_ATTRIBUTES:()=>Pf,HTML_TAGS:()=>so,LIFECYCLE_EVENTS:()=>Ur,METHODS:()=>eo,METHODS_EXL:()=>Gs,MISC_PROPS:()=>Sm,MIXINS:()=>Af,NODE_ENV:()=>Ct,OPTIONS:()=>_i,PACKAGE_MANAGER_TO_CDN:()=>Pr,PARSED_DOMQ_PROPERTIES:()=>Ks,POSITION_PROPS:()=>km,PROPS_METHODS:()=>vr,REGISTRY:()=>Ve,RESERVED_STORE_METHODS:()=>m_,ROUTER_OPTIONS:()=>ou,SIGNAL_ENGINE_KEY:()=>Gn,SIGNAL_INSTANCES_KEY:()=>qn,STANDARD_SCHEME_QUERIES:()=>lf,STATE_PROPERTIES:()=>rp,STORE_METHOD_NAMES:()=>g_,SVG_TAGS:()=>qo,THEME_PROPS:()=>vm,TIMING_PROPS:()=>Fa,TYPES:()=>Bs,UNIVERSAL_RESERVED_KEYS:()=>Pl,VALUE_TRANSFORMERS:()=>_f,VERSION:()=>b_,__resetSignalEngine:()=>Rd,__resetSignalInstances:()=>Od,__resetStateShadowWarnings:()=>y_,activateConfig:()=>Fx,addCaching:()=>pl,addContext:()=>dl,addDelegatedEvent:()=>La,addExtend:()=>Hp,addExtends:()=>Vt,addItemAfterEveryElement:()=>zd,addMethods:()=>es,addProtoToArray:()=>zs,addRef:()=>ll,aliasCaseVariants:()=>Ro,animation:()=>Og,appendSVGSprite:()=>Aa,appendSvgIconsSprite:()=>Rn,applyAttrTransforms:()=>mm,applyCSS:()=>Hy,applyDependentState:()=>lh,applyDocument:()=>Ea,applyEvent:()=>_l,applyEventUpdate:()=>xl,applyExtends:()=>Xo,applyHeadings:()=>df,applyInitialState:()=>Vf,applyMediaSequenceVars:()=>$r,applyProps:()=>di,applyReset:()=>Ta,applySequenceGlobalVars:()=>da,applySequenceVars:()=>ur,applySpacingSequence:()=>ga,applyStateMethods:()=>ut,applyTimingSequence:()=>Ca,applyTrueProps:()=>Tm,applyTypographySequence:()=>Sa,arrayContainsOtherArray:()=>Md,arraysEqual:()=>Wd,arrayzeValue:()=>bn,assertEmitIntegrity:()=>om,batch:()=>$c,breakpoints:()=>Ag,buildImgSrcset:()=>Yi,buildSourcesAndImg:()=>Xi,buildThemeVarStyles:()=>cs,cache:()=>hh,cacheNode:()=>Br,call:()=>Dh,callStateMethod:()=>ja,camelToAttr:()=>zr,camelToLowerAttr:()=>Pw,captureSnapshot:()=>$h,changeGlobalTheme:()=>xf,changeLightness:()=>fg,checkAttributeByTagName:()=>Hr,checkEventFunctions:()=>gm,checkForStateTypes:()=>sh,checkIfBoxSize:()=>ha,checkIfInherits:()=>bl,checkIfStringIsInArray:()=>Gd,class:()=>$g,clone:()=>sp,cloneAndMergeArrayExtend:()=>oi,cloneFunction:()=>Tp,collectExtendsList:()=>io,color:()=>xg,colorStringToRgbaArray:()=>yt,components:()=>is,compositeOverBackdrop:()=>wn,concatAddExtends:()=>Up,contrastRatio:()=>vo,convertSvgToSymbol:()=>pa,copyJavaScriptToClipboard:()=>eg,copyStringToClipboard:()=>Qh,create:()=>o_,createAsync:()=>ND,createBasedOnType:()=>cl,createComputed:()=>d_,createConfig:()=>ia,createDefine:()=>Mk,createEffect:()=>Z,createElement:()=>oh,createElementExtends:()=>Xc,createExtends:()=>ii,createExtendsFromKeys:()=>ao,createExtendsStack:()=>el,createHTMLNode:()=>Wo,createIfConditionFlag:()=>Op,createInheritedState:()=>ih,createKey:()=>ri,createNestedObject:()=>dp,createNestedObjectByKeyPath:()=>ch,createObjectWithoutPrototype:()=>zc,createParent:()=>fl,createPath:()=>ul,createProps:()=>pi,createPropsStack:()=>il,createRoot:()=>nh,createScope:()=>uh,createScopeStore:()=>Mc,createSignal:()=>Ls,createSkeleton:()=>BD,createSnapshotId:()=>ti,createState:()=>Fm,createStore:()=>tr,createSync:()=>jD,css:()=>at,cssMediaVars:()=>rf,cssVars:()=>tf,customDecodeURIComponent:()=>tp,customEncodeURIComponent:()=>ep,cutArrayAfterValue:()=>Ud,cutArrayBeforeValue:()=>Bd,debounce:()=>ni,debounceOnContext:()=>Cp,decodeNewlines:()=>Qd,deepClone:()=>le,deepContains:()=>fp,deepDefaults:()=>Wi,deepDestringifyFunctions:()=>pt,deepExtend:()=>Yc,deepMerge:()=>ne,deepMergeExtends:()=>zt,deepStringifyFunctions:()=>Xs,defaultDefine:()=>ds,defineResolvedThemeSignal:()=>Oo,defineSetter:()=>Rh,defineThemeSignal:()=>To,destringifyGlobalScope:()=>Js,destroy:()=>Za,detectHeightOnInit:()=>jh,detectInfiniteLoop:()=>mp,detectTag:()=>jr,devices:()=>Tg,dispose:()=>Wr,encodeNewlines:()=>Jd,error:()=>mn,excludeKeysFromObject:()=>bp,exec:()=>fe,executeAttr:()=>r1,exetuteClassPerComponent:()=>I1,extendCachedRegistry:()=>Vp,extendStackRegistry:()=>ai,extractArrayExtend:()=>li,extractConditionalAttrs:()=>s1,fetchLibraryData:()=>Ml,fibonacciNumberByIndex:()=>Bh,filterArrays:()=>qd,filterArraysFast:()=>Kd,filterAttributesByTagName:()=>t1,finalizeExtends:()=>tl,findClosestNumber:()=>Ll,findClosestNumberInFactory:()=>Xh,findHeadingLetter:()=>af,findHeadings:()=>ua,findInheritedState:()=>yl,findKeyPosition:()=>Xd,flattenExtend:()=>co,font:()=>hg,fontFace:()=>yg,fontFamily:()=>gg,fontFamilyTypes:()=>mg,formatDate:()=>Nh,generateHash:()=>qc,generateHeadArrayTags:()=>$l,generateKey:()=>ei,generateMetaTags:()=>Gh,generateSequence:()=>Ye,generateSequencePosition:()=>jg,generateSprite:()=>Po,generateSubSequence:()=>fa,get:()=>Ah,getActiveConfig:()=>E,getActiveDocument:()=>$a,getActiveLang:()=>Xr,getCDNDirUrl:()=>Dl,getCDNUrl:()=>At,getCacheSize:()=>im,getCapitalCaseKeys:()=>Kp,getCdnProviderFromConfig:()=>go,getChildStateInKey:()=>ml,getChildren:()=>Oi,getColor:()=>se,getColorShade:()=>zl,getContext:()=>Mi,getCookie:()=>$p,getDB:()=>Ui,getDefaultOrFirstKey:()=>Sn,getEmitStats:()=>Cf,getEmotionStylesheet:()=>og,getExtendsInElement:()=>Wp,getExtendsStack:()=>si,getExtendsStackRegistry:()=>Gc,getFnPrefixAndValue:()=>fr,getFontFace:()=>dg,getFontFaceEach:()=>kn,getFontFaceEachString:()=>Zl,getFontFaceString:()=>ra,getFontFamily:()=>wa,getFontFormat:()=>Yl,getFontSizeByKey:()=>ka,getFrequencyInArray:()=>Fd,getHashedExtend:()=>ci,getImportMapScript:()=>Fh,getInObjectByPath:()=>gp,getLanguages:()=>Qa,getLocalStateLang:()=>oc,getLocalStorage:()=>Mp,getMediaColor:()=>Pe,getMediaTheme:()=>xt,getNev:()=>kp,getObserver:()=>Lc,getPageMetadata:()=>Yh,getParentStateInKey:()=>gl,getPath:()=>Ri,getQuery:()=>Vi,getRef:()=>Oh,getResolvedThemeSignal:()=>Mx,getRgbTone:()=>Gt,getRoot:()=>Ii,getRootContext:()=>Li,getRootData:()=>$i,getRootState:()=>Di,getRootStateInKey:()=>hl,getSafeInk:()=>ff,getSafeInkInfo:()=>zg,getSequenceValue:()=>Cn,getSequenceValueBySymbols:()=>sf,getSequenceValuePropertyPair:()=>Xt,getShadow:()=>ya,getShapeByKey:()=>va,getSignals:()=>h_,getSpacingBasedOnRatio:()=>Ot,getSpacingByKey:()=>we,getSpreadChildren:()=>Gp,getSubratio:()=>la,getSubratioDifference:()=>ca,getSystemGlobalTheme:()=>lt,getTheme:()=>Kg,getThemeSignal:()=>Lx,getTimingByKey:()=>it,getTimingFunction:()=>wt,global:()=>Id,gradient:()=>wg,grid:()=>Ig,hasFunction:()=>Ut,hasHandlerPlugin:()=>ro,hasOwnProperty:()=>ap,hashContent:()=>_o,hexToRgb:()=>ig,hexToRgbArray:()=>jl,hexToRgba:()=>cg,hslToRgb:()=>Vl,icons:()=>vg,inheritChildExtends:()=>Jc,inheritChildPropsExtends:()=>Zc,inheritParentProps:()=>hi,inheritRecursiveChildExtends:()=>Qc,init:()=>mr,initPolyglot:()=>au,initProps:()=>eh,injectGlobal:()=>Se,is:()=>qe,isArray:()=>O,isBoolean:()=>Nc,isCSSVar:()=>he,isContextComponent:()=>Yp,isCyclic:()=>yp,isDOMNode:()=>We,isDate:()=>Bc,isDefined:()=>ke,isDevelopment:()=>Er,isDomDocument:()=>rr,isEmpty:()=>Uc,isEmptyObject:()=>cp,isEnumeratedTrueFalseAttr:()=>hr,isEqualDeep:()=>Vc,isFunction:()=>A,isGoogleFontsUrl:()=>Co,isHostObject:()=>nr,isHtmlElement:()=>Ns,isLocal:()=>Sp,isLoudDevRuntime:()=>Oe,isMalformedDependency:()=>mo,isMethod:()=>Ih,isMobile:()=>Dp,isNode:()=>or,isNot:()=>Ld,isNotProduction:()=>pn,isNull:()=>jc,isNumber:()=>Bt,isObject:()=>k,isObjectLike:()=>N,isPhoto:()=>Uh,isPolyglotWritableKey:()=>ir,isProduction:()=>Cr,isRawUnitValue:()=>Ms,isResolvedColor:()=>Tt,isScalingUnit:()=>an,isStaging:()=>wp,isState:()=>ah,isStore:()=>ge,isString:()=>w,isStringFunction:()=>Ap,isSvgTag:()=>Ko,isTest:()=>Wc,isTesting:()=>xp,isTracking:()=>jm,isUndefined:()=>Ae,isUniversallyReservedKey:()=>Lh,isUnresolvableDependency:()=>yn,isValidDependencyMap:()=>yo,isValidHtmlTag:()=>Np,isValidTag:()=>Ho,isWasmLoaded:()=>Sk,isWrappedLibrary:()=>Kt,isWritableFamilyBucket:()=>Dd,joinArrays:()=>Zn,jointStacks:()=>zp,keyframes:()=>zo,keys:()=>Ol,linearChannelToSrgb:()=>ql,loadCssFile:()=>Wh,loadJavascript:()=>qh,loadJavascriptFile:()=>Vh,loadJavascriptFileEmbedSync:()=>Hh,loadJavascriptFileSync:()=>zh,loadRemoteCSS:()=>Kh,loadRemoteScript:()=>bo,loadTranslations:()=>tc,loadWasm:()=>wk,log:()=>Ph,logGroupIf:()=>Pp,logIf:()=>Rp,lookdown:()=>Ch,lookdownAll:()=>Eh,lookup:()=>vh,lowercaseFirstLetter:()=>ln,makeObjectWithoutPrototype:()=>lp,map:()=>op,mapStringsWithContextComponents:()=>fi,markPolyglotSeeded:()=>Wt,matchesComponentNaming:()=>Ht,media:()=>bg,memoize:()=>Ep,merge:()=>pe,mergeSharedLibraries:()=>qi,mixTwoColors:()=>sg,mixTwoRgb:()=>lg,mixTwoRgba:()=>Hl,nextElement:()=>Ni,normalizeIgnoreList:()=>Dr,normalizeLibraryKey:()=>xo,numToLetterMap:()=>Yt,objectToString:()=>Zs,objectizeStringProperty:()=>ui,oklabToLinearSrgb:()=>Kl,oklabToOklch:()=>Qi,oklchToGamutSafeSrgb:()=>ea,oklchToOklab:()=>Gl,opacify:()=>ko,overwrite:()=>Qs,overwriteDeep:()=>Ke,overwriteShallow:()=>dn,overwriteState:()=>fh,parkHostObject:()=>Sr,parse:()=>Rl,parseColorToken:()=>Me,parseDeep:()=>Ai,pickupElementFromProps:()=>ol,pickupPropsFromElement:()=>nl,polyglotFunctions:()=>hc,polyglotPlugin:()=>hs,polyglotSeededKeys:()=>bi,popConfig:()=>te,popStaticCssPass:()=>$f,previousElement:()=>ji,propExists:()=>Jp,propertizeElement:()=>sl,propertizeUpdate:()=>Zp,pushConfig:()=>oe,pushStaticCssPass:()=>If,quietColorProbe:()=>En,refreshContextProto:()=>Ff,registerEvent:()=>Yo,registerHostPackages:()=>Dv,registerSignalInstance:()=>Kn,reinit:()=>zy,relativeLuminance:()=>_n,remove:()=>Qo,removeChars:()=>tg,removeCookie:()=>Lp,removeDelegatedEvent:()=>Ma,removeDuplicateProps:()=>mi,removeDuplicatesInArray:()=>Jn,removeFromArray:()=>Nd,removeFromObject:()=>up,removeNestedKeyByPath:()=>pp,removeValueFromArray:()=>Vs,removeValueFromArrayAll:()=>Vd,reorderArrayByValues:()=>Hd,replaceLiteralsWithObjectFields:()=>cn,replaceOctalEscapeSequences:()=>Zd,resetEmitStats:()=>nm,resolveAsset:()=>Ge,resolveBorderValue:()=>st,resolveColorRgb:()=>An,resolveColorsInGradient:()=>Ra,resolveConfigDocument:()=>Yn,resolveFileSource:()=>pm,resolveFileUrl:()=>bt,resolveGridTracks:()=>Lw,resolveHandler:()=>no,resolvePropValue:()=>Vr,resolveShadowValue:()=>Tn,resolveSharedLibraries:()=>Jh,returnSubThemeOrDefault:()=>ug,returnValueAsText:()=>al,rgbArrayToHex:()=>Bl,rgbToHSL:()=>Ul,rgbToHex:()=>ag,runPluginHook:()=>Ee,runThroughMedia:()=>uf,schemeGuardSelector:()=>Io,schemeMediaQuery:()=>Do,scratchDefaultConfig:()=>Ao,scratchSystem:()=>No,scratchUtils:()=>Lr,self:()=>$d,semanticIcons:()=>Cg,sequence:()=>lr,serializeAttrValue:()=>Jt,set:()=>Pn,setActiveConfig:()=>nf,setActiveDocument:()=>rm,setActiveRootState:()=>Pi,setAdaptiveSchemeVar:()=>Fr,setClass:()=>UO,setClassname:()=>$1,setColor:()=>Mr,setCookie:()=>Ip,setCssEngineHook:()=>ru,setCustomFont:()=>ta,setCustomFontMedia:()=>Ir,setEach:()=>Jg,setFont:()=>xa,setFontFamily:()=>Mo,setFontImport:()=>Eo,setGradient:()=>$o,setHashedExtend:()=>Kc,setInCustomFontMedia:()=>Xl,setInObjectByPath:()=>hp,setLang:()=>rc,setLocalStorage:()=>Fp,setMediaTheme:()=>Lo,setNodeStyles:()=>Tl,setObserver:()=>p_,setProps:()=>Th,setPropsPrototype:()=>gi,setSVG:()=>Fo,setScalingVar:()=>aa,setShadow:()=>Nr,setSubScalingVar:()=>of,setSvgIcon:()=>On,setTheme:()=>_a,setValue:()=>Zg,setVariables:()=>Bg,setWasmEngine:()=>Ia,shadow:()=>kg,shape:()=>Fg,sharedLibrary:()=>Zh,sizes:()=>Mg,spacing:()=>_g,splitPackageSpecifier:()=>zi,splitSpacedValue:()=>ma,splitTopLevelCommas:()=>cr,splitTopLevelSpaces:()=>Zi,splitTransition:()=>bf,spotByPath:()=>Ti,srcsetFor:()=>wo,srgbChannelToLinear:()=>Wl,srgbToOklab:()=>Ji,stringIncludesAny:()=>Ws,stringToObject:()=>ip,stripVersionRangePrefix:()=>Hi,svg:()=>Rg,svgData:()=>Pg,swapItemsInArray:()=>jd,syncProps:()=>yi,templates:()=>Dg,theme:()=>Sg,timing:()=>Eg,toCamel:()=>sa,toCamelCase:()=>Ki,toDashCase:()=>Gi,toDescriptionCase:()=>ng,toLinearChannel:()=>So,toPriorityOrder:()=>ht,toTitleCase:()=>rg,toggleFullscreen:()=>Mh,transformBackgroundImage:()=>gf,transformBorder:()=>Zt,transformBorderRadius:()=>dr,transformBoxShadow:()=>Oa,transformClassname:()=>Uw,transformDuration:()=>Pa,transformGridTemplate:()=>yf,transformShadow:()=>hf,transformSize:()=>me,transformSizeRatio:()=>M,transformTextStroke:()=>pf,transformTransition:()=>Xg,transformersByPrefix:()=>Om,transfromGap:()=>mf,translate:()=>ec,triggerEventOn:()=>Ar,triggerEventOnUpdate:()=>dh,trimStringFromSymbols:()=>Yd,typography:()=>na,unit:()=>pg,unstackArrayOfObjects:()=>Us,update:()=>Zo,updateProps:()=>th,updateVars:()=>BO,upsertTranslation:()=>nc,useCssInProps:()=>ft,useHostState:()=>Nm,usePropsAsCSS:()=>jw,useSelectorsAsCSS:()=>Bw,variables:()=>Bi,vars:()=>Lg,verbose:()=>uo,warn:()=>Fi,warnStateKeyShadowsMethod:()=>Fc,window:()=>C,wrapHoverRule:()=>pr});module.exports=_E(s_);var Pd={};I(Pd,{RESERVED_STORE_METHODS:()=>m_,SIGNAL_ENGINE_KEY:()=>Gn,SIGNAL_INSTANCES_KEY:()=>qn,STORE_METHOD_NAMES:()=>g_,VERSION:()=>b_,__resetSignalEngine:()=>Rd,__resetSignalInstances:()=>Od,__resetStateShadowWarnings:()=>y_,batch:()=>$c,createComputed:()=>d_,createEffect:()=>Z,createScopeStore:()=>Mc,createSignal:()=>Ls,createStore:()=>tr,getObserver:()=>Lc,getSignals:()=>h_,isStore:()=>ge,registerSignalInstance:()=>Kn,setObserver:()=>p_,warnStateKeyShadowsMethod:()=>Fc});var wd={};I(wd,{WRITE_JOURNAL:()=>Ps,batch:()=>Is,createComputed:()=>wE,createEffect:()=>SE,createSignal:()=>Nt,getObserver:()=>_d,journalWrite:()=>Ds,setObserver:()=>xE});var He=null,Ac=0,Tc=[],_d=()=>He,xE=e=>{He=e},Oc=0,gd=[];function Nt(e){let t=new Set;function r(){return He&&(t.add(He),He._sources.add(s)),e}function n(i){i!==e&&(e=i,TE(t))}function o(){return e}let s={get:r,set:n,peek:o,_subscribers:t,_type:"signal"};return s}function wE(e){let t,r=!0,n=new Set,o={_sources:new Set,_type:"computed",_subscribers:n,_execute(){bd(o);let s=He;He=o;try{t=e(),r=!1}finally{He=s}},_notify(){r=!0,n.size>0&&f_(n)},get(){return He&&(n.add(He),He._sources.add(o)),r&&o._execute(),t},peek(){return r&&o._execute(),t}};return o._execute(),o}var vt=new Set,md=!1,Ps=[];function Ds(e){Ps.push(e),Ps.length>32&&Ps.shift()}function SE(e,t){let r=t?.depth??0,n={_sources:new Set,_type:"effect",_depth:r,_label:t?.label,_disposed:!1,_subscribers:new Set,_execute(){if(n._disposed)return;bd(n);let o=He;He=n;try{e()}catch(s){console.error("[smbls] effect error:",s)}finally{He=o}},_notify(){n._disposed||(Ac>0?Tc.push(n):Oc>0?gd.push(n):xd(n))},dispose(){n._disposed=!0,bd(n)}};return n._execute(),n}function Is(e){Ac++;try{e()}finally{Ac--,Ac===0&&AE()}}var yd=!1,a_=1e3,kE=8,vE=256,CE=4;function c_(){return typeof performance<"u"?performance.now():Date.now()}function xd(e){vt.add(e),!yd&&(md||(md=!0,queueMicrotask(l_)))}var Wn=[];function EE(){if(vt.size===1){let[t]=vt;return vt.clear(),t._disposed?0:(t._execute(),1)}Wn.length=0;for(let t of vt)Wn.push(t);vt.clear(),Wn.sort((t,r)=>t._depth-r._depth);let e=0;for(let t=0;t<Wn.length;t++){let r=Wn[t];r._disposed||(r._execute(),e++)}return Wn.length=0,e}function l_(e=0,t=0){if(md=!1,vt.size===0)return;yd=!0;let r=c_(),n=!1;try{for(;vt.size>0;){if(++e>a_){let o=new Map;for(let c of vt){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 Ps)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",a_,"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>"),vt.clear();break}if(t+=EE(),vt.size>0&&(t>=vE||e>=CE)&&c_()-r>kE){n=!0,setTimeout(()=>l_(e,t),0);break}}}finally{n||(yd=!1)}}function AE(){for(let e=0;e<Tc.length;e++)xd(Tc[e]);Tc.length=0}function f_(e){Oc++;try{for(let t of e)t._notify()}finally{if(Oc--,Oc===0&&gd.length>0){let t=gd.splice(0);for(let r=0;r<t.length;r++)xd(t[r])}}}function TE(e){f_(e)}function bd(e){for(let t of e._sources)t._subscribers.delete(e);e._sources.clear()}var Td={};I(Td,{RESERVED_STORE_METHODS:()=>$s,STORE_METHOD_NAMES:()=>Ad,__resetStateShadowWarnings:()=>OE,createScopeStore:()=>IE,createStore:()=>Rc,getSignals:()=>DE,isStore:()=>PE,warnStateKeyShadowsMethod:()=>Ed});var jt=Symbol("store"),Pc=Symbol("signals"),Ad=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],$s=new Set(Ad),Cd=new Set,Sd=(e,t)=>e?e+"."+t:String(t);function Ed(e,t){let r=(t||"")+"::"+e;if(Cd.has(r))return;Cd.add(r);let n=t?`state.${t}`:"state",o=`[smbls/state] "${e}" is a reserved store-method name and was written as DATA at ${n}.${e}. The value is preserved and readable \u2014 data wins over the method \u2014 but "${n}.${e}(\u2026)" no longer reaches the store method on this node. Use "${n}.$${e}(\u2026)" for the method, or rename the data key. Reserved: ${Ad.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(o)}function OE(){Cd.clear()}var kd=e=>!e||typeof e!="object"||Array.isArray(e)||e[jt]||Object.isFrozen(e)||typeof Node<"u"&&e instanceof Node||e.__ref||e.nodeType||e.nodeName||!Dc(e),RE=12,Dc=e=>{if(!e||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null};function Ic(e,t,r){if(e===t)return!0;if(r>RE)return!1;if(Array.isArray(e)||Array.isArray(t)){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Ic(e[n],t[n],r+1))return!1;return!0}if(Dc(e)&&Dc(t)){let n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(let s of n)if(!Object.prototype.hasOwnProperty.call(t,s)||!Ic(e[s],t[s],r+1))return!1;return!0}return!1}function Rc(e,t,r,n){r===void 0&&(r=0),n===void 0&&(n="");let o={},s={},i=t&&t.maxDepth||8;if(e&&typeof e=="object")for(let b in e){if(b==="__proto__"||!Object.prototype.hasOwnProperty.call(e,b))continue;if(b.startsWith("__")){s[b]=e[b];continue}$s.has(b)&&Ed(b,n);let y=e[b];r<i&&y&&typeof y=="object"&&!kd(y)?(s[b]=y,o[b]=Nt(Rc(y,t,r+1,Sd(n,b)))):(s[b]=y,o[b]=Nt(y))}let a=new Proxy(s,{get(b,y){if(y===jt)return!0;if(y===Pc)return o;if(y==="__raw")return b;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 g;if(y==="$add")return h;if(y==="$remove")return m;if(y==="$destroy")return _;if(y==="$quietUpdate")return l;if($s.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 g;case"add":return h;case"remove":return m;case"destroy":return _;case"quietUpdate":return l}if(y==="__element")return b.__element;if(y==="parent")return b.parent;if(y==="root")return b.root;if(Object.prototype.hasOwnProperty.call(o,y)){let S=o[y].get();if(S!==void 0||!(y!=="root"&&b.root&&b.root!==a))return S}if(b[y]!==void 0)return b[y];let x=typeof y=="string"&&!y.startsWith("__")&&y!=="then"&&y!=="constructor"&&_d()!=null;if(y!=="root"&&b.root&&b.root!==a){let S=b.root[y];return x&&!Object.prototype.hasOwnProperty.call(o,y)&&(o[y]=Nt(void 0),o[y].get()),S}if(x)return o[y]=Nt(void 0),o[y].get()},set(b,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 b[y]=x,!0;$s.has(y)&&Ed(y,n);let S=Sd(n,y);if(Object.prototype.hasOwnProperty.call(o,y))if(x&&typeof x=="object"&&!kd(x)){if(x===b[y])return!0;let v=o[y].peek(),D=v&&v[jt]?v.$parse():v;if(Ic(x,D,0))return!0;b[y]=x,Ds(S),o[y].set(Rc(x,t,r+1,S))}else{if(Array.isArray(x)&&x!==b[y]&&Array.isArray(o[y].peek())&&Ic(x,o[y].peek(),0))return!0;o[y].peek()!==x&&Ds(S),b[y]=x,o[y].set(x)}else b[y]=x,x&&typeof x=="object"&&!kd(x)?o[y]=Nt(Rc(x,t,r+1,S)):o[y]=Nt(x);return!0},has(b,y){return typeof y=="string"&&y.charCodeAt(0)===36&&$s.has(y.slice(1))?!0:y in o||y in b},ownKeys(b){return Object.keys(o)},getOwnPropertyDescriptor(b,y){return y in o?{enumerable:!0,configurable:!0,value:o[y].peek()}:Object.getOwnPropertyDescriptor(b,y)},deleteProperty(b,y){return o[y]&&(o[y].peek()!==void 0&&Ds(Sd(n,y)),o[y].set(void 0),delete o[y]),delete b[y],!0}});function c(b,y){Is(()=>{for(let S in b)S!=="__proto__"&&(a[S]=b[S])});let x=s.__element;return x&&x.onUpdate&&!y?.quiet&&x.onUpdate(x,a,x.context),a}function l(b){return c(b,{quiet:!0})}function f(b){if(b||(b=new Set),b.has(a))return"[Circular]";b.add(a);let y={};for(let x in o){if(x==="parent"||x==="root"||x.startsWith("__"))continue;let S=o[x].peek();S&&S[jt]?y[x]=S.$parse(b):y[x]=S}return y}function u(){return Is(()=>{for(let b in o)delete a[b]}),a}function d(){return Object.keys(o)}function p(){return Object.keys(o).map(b=>o[b].peek())}function g(b){return Is(()=>{for(let y in o)y in b||delete a[y];for(let y in b)y!=="__proto__"&&(a[y]=b[y])}),a}function h(b,y){let x=Object.prototype.hasOwnProperty.call(o,b)?o[b].peek():s[b];if(Array.isArray(x))return a[b]=[...x,y],a;if(x&&typeof x=="object"&&!Array.isArray(x)){if(Dc(y))x[jt]?x.$update(y):a[b]={...x,...y};else{let S=String(Object.keys(x).length);x[jt]?x.$update({[S]:y}):a[b]={...x,[S]:y}}return a}return a[b]=y,a}function m(b){return delete a[b],a}function _(){u(),s.__element=null,s.parent=null}return a}function PE(e){return e&&e[jt]===!0}function DE(e){return e[Pc]}function IE(e,t){let r={},n={};if(e&&typeof e=="object")for(let i in e)n[i]=e[i],r[i]=Nt(e[i]);let o=i=>{if(Object.prototype.hasOwnProperty.call(r,i))return r;let a=t;for(;a;){let c=a[Pc];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[jt]?a[vd]:null}return null};return new Proxy(n,{get(i,a){return a===jt?!0:a===Pc?r:a===vd?t:a==="__raw"?i:Object.prototype.hasOwnProperty.call(r,a)?r[a].get():t&&a!=="then"&&a!=="constructor"?t[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]=Nt(c),!0)},has(i,a){if(a in r||a in i)return!0;let c=t;for(;c;){if(a in c)return!0;c=c[jt]?c[vd]: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 vd=Symbol("scope.parent");var sn="3.14.784";var qn="__SMBLS_SIGNAL_INSTANCES__",Kn=(e,t,r)=>{let n=t||(typeof globalThis<"u"?globalThis:null);if(!n)return null;let o=n[qn]||(n[qn]={versions:[],engines:0,reported:!1});return typeof o.engines!="number"&&(o.engines=o.versions.length),o.versions.push(e||sn),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},Od=e=>{let t=e||(typeof globalThis<"u"?globalThis:null);t&&delete t[qn]};var Gn="__SMBLS_SIGNAL_ENGINE__",u_=(e,t,r)=>{let n=t||sn,o=r||(typeof globalThis<"u"?globalThis:null);if(!o)return e;let s=o[Gn];return s&&s.engine&&s.version===n?(Kn(n,o,!0),s.engine):(s||(o[Gn]={version:n,engine:e}),Kn(n,o,!1),e)},Rd=e=>{let t=e||(typeof globalThis<"u"?globalThis:null);t&&delete t[Gn]};var Be=u_({...wd,...Td,VERSION:sn},sn),Ls=Be.createSignal,d_=Be.createComputed,Z=Be.createEffect,$c=Be.batch,Lc=Be.getObserver,p_=Be.setObserver,tr=Be.createStore,Mc=Be.createScopeStore,ge=Be.isStore,h_=Be.getSignals,g_=Be.STORE_METHOD_NAMES,m_=Be.RESERVED_STORE_METHODS,Fc=Be.warnStateKeyShadowsMethod,y_=Be.__resetStateShadowWarnings,b_=Be.VERSION;var am={};I(am,{assertEmitIntegrity:()=>om,css:()=>at,getActiveDocument:()=>$a,getCacheSize:()=>im,getEmitStats:()=>Cf,injectGlobal:()=>Se,keyframes:()=>zo,reset:()=>_w,resetEmitStats:()=>nm,setActiveDocument:()=>rm,setWasmEngine:()=>Ia,wrapHoverRule:()=>pr});var Qg={};I(Qg,{COMPOUND_CSS_KEYWORDS:()=>xn,CONFIG:()=>vn,CONFIG_MERGE_EXL:()=>ot,CSS_NAMED_COLOR_HEX:()=>Nl,CSS_NATIVE_COLOR_REGEX:()=>rt,CSS_UNITS:()=>Xn,FACTORY:()=>nt,STANDARD_SCHEME_QUERIES:()=>lf,VALUE_TRANSFORMERS:()=>_f,activateConfig:()=>Fx,aliasCaseVariants:()=>Ro,animation:()=>Og,appendSVGSprite:()=>Aa,appendSvgIconsSprite:()=>Rn,applyDocument:()=>Ea,applyHeadings:()=>df,applyMediaSequenceVars:()=>$r,applyReset:()=>Ta,applySequenceGlobalVars:()=>da,applySequenceVars:()=>ur,applySpacingSequence:()=>ga,applyTimingSequence:()=>Ca,applyTypographySequence:()=>Sa,breakpoints:()=>Ag,changeGlobalTheme:()=>xf,changeLightness:()=>fg,checkIfBoxSize:()=>ha,class:()=>$g,color:()=>xg,colorStringToRgbaArray:()=>yt,compositeOverBackdrop:()=>wn,contrastRatio:()=>vo,convertSvgToSymbol:()=>pa,createConfig:()=>ia,cssMediaVars:()=>rf,cssVars:()=>tf,defineResolvedThemeSignal:()=>Oo,defineThemeSignal:()=>To,devices:()=>Tg,document:()=>Ix,findHeadingLetter:()=>af,findHeadings:()=>ua,font:()=>hg,fontFace:()=>yg,fontFamily:()=>gg,fontFamilyTypes:()=>mg,generateSequence:()=>Ye,generateSequencePosition:()=>jg,generateSprite:()=>Po,generateSubSequence:()=>fa,getActiveConfig:()=>E,getColor:()=>se,getColorShade:()=>zl,getDefaultOrFirstKey:()=>Sn,getFnPrefixAndValue:()=>fr,getFontFace:()=>dg,getFontFaceEach:()=>kn,getFontFaceEachString:()=>Zl,getFontFaceString:()=>ra,getFontFamily:()=>wa,getFontFormat:()=>Yl,getFontSizeByKey:()=>ka,getMediaColor:()=>Pe,getMediaTheme:()=>xt,getResolvedThemeSignal:()=>Mx,getRgbTone:()=>Gt,getSafeInk:()=>ff,getSafeInkInfo:()=>zg,getSequenceValue:()=>Cn,getSequenceValueBySymbols:()=>sf,getSequenceValuePropertyPair:()=>Xt,getShadow:()=>ya,getShapeByKey:()=>va,getSpacingBasedOnRatio:()=>Ot,getSpacingByKey:()=>we,getSubratio:()=>la,getSubratioDifference:()=>ca,getTheme:()=>Kg,getThemeSignal:()=>Lx,getTimingByKey:()=>it,getTimingFunction:()=>wt,gradient:()=>wg,grid:()=>Ig,hexToRgb:()=>ig,hexToRgbArray:()=>jl,hexToRgba:()=>cg,hslToRgb:()=>Vl,icons:()=>vg,isCSSVar:()=>he,isDomDocument:()=>rr,isGoogleFontsUrl:()=>Co,isHostObject:()=>nr,isRawUnitValue:()=>Ms,isResolvedColor:()=>Tt,isScalingUnit:()=>an,isWritableFamilyBucket:()=>Dd,linearChannelToSrgb:()=>ql,media:()=>bg,mixTwoColors:()=>sg,mixTwoRgb:()=>lg,mixTwoRgba:()=>Hl,numToLetterMap:()=>Yt,oklabToLinearSrgb:()=>Kl,oklabToOklch:()=>Qi,oklchToGamutSafeSrgb:()=>ea,oklchToOklab:()=>Gl,opacify:()=>ko,parkHostObject:()=>Sr,parseColorToken:()=>Me,popConfig:()=>te,pushConfig:()=>oe,quietColorProbe:()=>En,relativeLuminance:()=>_n,reset:()=>$x,resolveBorderValue:()=>st,resolveColorRgb:()=>An,resolveColorsInGradient:()=>Ra,resolveConfigDocument:()=>Yn,resolveFileUrl:()=>bt,resolveShadowValue:()=>Tn,returnSubThemeOrDefault:()=>ug,rgbArrayToHex:()=>Bl,rgbToHSL:()=>Ul,rgbToHex:()=>ag,runThroughMedia:()=>uf,schemeGuardSelector:()=>Io,schemeMediaQuery:()=>Do,scratchDefaultConfig:()=>Ao,scratchSystem:()=>No,scratchUtils:()=>Lr,semanticIcons:()=>Cg,sequence:()=>lr,set:()=>Pn,setActiveConfig:()=>nf,setAdaptiveSchemeVar:()=>Fr,setColor:()=>Mr,setCustomFont:()=>ta,setCustomFontMedia:()=>Ir,setEach:()=>Jg,setFont:()=>xa,setFontFamily:()=>Mo,setFontImport:()=>Eo,setGradient:()=>$o,setInCustomFontMedia:()=>Xl,setMediaTheme:()=>Lo,setSVG:()=>Fo,setScalingVar:()=>aa,setShadow:()=>Nr,setSubScalingVar:()=>of,setSvgIcon:()=>On,setTheme:()=>_a,setValue:()=>Zg,setVariables:()=>Bg,shadow:()=>kg,shape:()=>Fg,sizes:()=>Mg,spacing:()=>_g,splitSpacedValue:()=>ma,splitTopLevelCommas:()=>cr,splitTopLevelSpaces:()=>Zi,splitTransition:()=>bf,srgbChannelToLinear:()=>Wl,srgbToOklab:()=>Ji,svg:()=>Rg,svgData:()=>Pg,templates:()=>Dg,theme:()=>Sg,timing:()=>Eg,toCamel:()=>sa,toLinearChannel:()=>So,transformBackgroundImage:()=>gf,transformBorder:()=>Zt,transformBorderRadius:()=>dr,transformBoxShadow:()=>Oa,transformDuration:()=>Pa,transformGridTemplate:()=>yf,transformShadow:()=>hf,transformSize:()=>me,transformSizeRatio:()=>M,transformTextStroke:()=>pf,transformTransition:()=>Xg,transfromGap:()=>mf,typography:()=>na,unit:()=>pg,vars:()=>Lg});var Lr={};I(Lr,{COMPOUND_CSS_KEYWORDS:()=>xn,CSS_NAMED_COLOR_HEX:()=>Nl,CSS_NATIVE_COLOR_REGEX:()=>rt,CSS_UNITS:()=>Xn,applyMediaSequenceVars:()=>$r,applySequenceGlobalVars:()=>da,applySequenceVars:()=>ur,changeLightness:()=>fg,colorStringToRgbaArray:()=>yt,compositeOverBackdrop:()=>wn,contrastRatio:()=>vo,convertSvgToSymbol:()=>pa,findHeadingLetter:()=>af,findHeadings:()=>ua,generateSequence:()=>Ye,generateSequencePosition:()=>jg,generateSprite:()=>Po,generateSubSequence:()=>fa,getColorShade:()=>zl,getDefaultOrFirstKey:()=>Sn,getFnPrefixAndValue:()=>fr,getFontFace:()=>dg,getFontFaceEach:()=>kn,getFontFaceEachString:()=>Zl,getFontFaceString:()=>ra,getFontFormat:()=>Yl,getRgbTone:()=>Gt,getSequenceValue:()=>Cn,getSequenceValueBySymbols:()=>sf,getSequenceValuePropertyPair:()=>Xt,getSubratio:()=>la,getSubratioDifference:()=>ca,hexToRgb:()=>ig,hexToRgbArray:()=>jl,hexToRgba:()=>cg,hslToRgb:()=>Vl,isCSSVar:()=>he,isDomDocument:()=>rr,isGoogleFontsUrl:()=>Co,isHostObject:()=>nr,isRawUnitValue:()=>Ms,isResolvedColor:()=>Tt,isScalingUnit:()=>an,isWritableFamilyBucket:()=>Dd,linearChannelToSrgb:()=>ql,mixTwoColors:()=>sg,mixTwoRgb:()=>lg,mixTwoRgba:()=>Hl,numToLetterMap:()=>Yt,oklabToLinearSrgb:()=>Kl,oklabToOklch:()=>Qi,oklchToGamutSafeSrgb:()=>ea,oklchToOklab:()=>Gl,opacify:()=>ko,parkHostObject:()=>Sr,parseColorToken:()=>Me,relativeLuminance:()=>_n,resolveConfigDocument:()=>Yn,resolveFileUrl:()=>bt,returnSubThemeOrDefault:()=>ug,rgbArrayToHex:()=>Bl,rgbToHSL:()=>Ul,rgbToHex:()=>ag,setCustomFont:()=>ta,setCustomFontMedia:()=>Ir,setFontImport:()=>Eo,setInCustomFontMedia:()=>Xl,setScalingVar:()=>aa,setSubScalingVar:()=>of,setVariables:()=>Bg,splitTopLevelCommas:()=>cr,splitTopLevelSpaces:()=>Zi,srgbChannelToLinear:()=>Wl,srgbToOklab:()=>Ji,toLinearChannel:()=>So});var rr=e=>!!(e&&e.documentElement&&typeof e.createElement=="function"&&e.head!==void 0),nr=e=>{if(e===null||typeof e!="object")return!1;let t=Object.prototype.toString.call(e);return!!(t!=="[object Object]"&&t!=="[object Array]"||typeof e.nodeType=="number"||e.defaultView||e.window===e||e.self===e)},Dd=e=>e!==null&&typeof e=="object"&&!nr(e),Sr=(e,t,r)=>{if(!e)return;if(rr(r)){e.__domDocument||(e.__domDocument=r);return}let n=`__host_${t}`;e[n]||(e[n]=r)},Yn=e=>e?rr(e.__domDocument)?e.__domDocument:rr(e.document)?e.document:null:null;var an=e=>e==="em"||e==="rem"||e==="vw"||e==="vh"||e==="vmax"||e==="vmin",Xn=["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"],$E=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),LE=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${Xn.filter(e=>e!=="auto").map($E).join("|")})$`),Ms=e=>LE.test(String(e).trim());P();var Nl={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"},yt=e=>{if(e==="")return[0,0,0,0];if(e.toLowerCase()==="transparent")return[0,0,0,0];let t=Nl[e.toLowerCase()];if(t&&(e=t),e[0]==="#")return e.length<7&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+(e.length>4?e[4]+e[4]:"")),[parseInt(e.substr(1,2),16),parseInt(e.substr(3,2),16),parseInt(e.substr(5,2),16),e.length>7?parseInt(e.substr(7,2),16)/255:1];if(e.indexOf("rgb")===-1&&ee&&C){let r=ee.body.appendChild(ee.createElement("fictum")),n="rgb(1, 2, 3)";if(r.style.color=n,r.style.color!==n){ee.body.removeChild(r);return}if(r.style.color=e,r.style.color===n||r.style.color==="")return ee.body.removeChild(r),[0,0,0,0];e=C.getComputedStyle(r).color,ee.body.removeChild(r)}return e.indexOf("rgb")===0?(e.indexOf("rgba")===-1&&(e=`${e}, 1`),e.match(/[\.\d]+/g).map(r=>+r)):[0,0,0,0]},sg=(e,t,r=.5)=>(e=yt(e),t=yt(t),Hl(e,t,r)),ig=(e,t=1)=>{let[r,n,o]=e.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${r},${n},${o})`},jl=(e,t=1)=>{let[r,n,o]=e.match(/\w\w/g).map(s=>parseInt(s,16));return[r,n,o]},ag=(e,t,r)=>"#"+(1<<24|e<<16|t<<8|r).toString(16).slice(1),Bl=([e,t,r])=>((1<<24)+(e<<16)+(t<<8)+r).toString(16).slice(1),cg=(e,t=1)=>{let[r,n,o]=e.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${r},${n},${o},${t})`},lg=(e,t,r=.5)=>{let n=[];for(let o=0;o<3;o++)n[o]=~~(e[o]+(t[o]-e[o])*r);return`rgb(${n})`},fg=(e,t)=>{let[r,n,o]=t,s=Math.max(0,Math.min(100,o+parseFloat(e)));return[r,n,s]},Ul=(e,t,r)=>{let n=Math.max(e,t,r),o=n-Math.min(e,t,r),s=1-Math.abs(n+n-o-1),i=o&&(n==e?(t-r)/o:n==t?2+(r-e)/o:4+(e-t)/o);return[60*(i<0?i+6:i),s?o/s:0,(n+n-o)/2]},Vl=(e,t,r,n=t*Math.min(r,1-r),o=(s,i=(s+e/30)%12)=>r-n*Math.max(Math.min(i-3,9-i,1),-1))=>[o(0),o(8),o(4)],zl=(e,t)=>{let r=parseInt(e,16),n=(r>>16)+t;n>255?n=255:n<0&&(n=0);let o=(r>>8&255)+t;o>255?o=255:o<0&&(o=0);let s=(r&255)+t;return s>255?s=255:s<0&&(s=0),((s|o<<8|n<<16)+16777216).toString(16).slice(1)},Hl=(e,t,r=.5)=>{let n=[];for(let o=0;o<4;o++){let s=o===3?i=>i:Math.round;n[o]=s(e[o]+(t[o]-e[o])*r)}return`rgba(${n})`},ko=(e,t)=>{let r=yt(e);if(!r){pn()&&console.warn(e+" color is not rgba");return}return r[3]=t,`rgba(${r})`},he=e=>e.charCodeAt(0)===45&&e.charCodeAt(1)===45,xn=new Set(["currentcolor","transparent","thin","medium","thick"]),rt=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,UA=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,Me=e=>{if(!w(e))return null;if(rt.test(e))return{passthrough:e};if(he(e))return{cssVar:e};let t=e.match(UA);if(!t)return null;let[,r,n,o]=t,s=n!==void 0?`0.${n}`:void 0,i=o&&o[0]==="="?o.slice(1):o;return{name:r,alpha:s,tone:i}},Tt=e=>w(e)&&(e.includes("rgb")||e.includes("var(")||e.includes("#")),cr=e=>{let t=[],r="",n=0;for(let o of e){if(o==="("?n+=1:o===")"&&n>0&&(n-=1),o===","&&n===0){t.push(r),r="";continue}r+=o}return(r.length||!t.length)&&t.push(r),t},Zi=e=>{let t=[],r="",n=0;for(let o of e){if(o==="("?n+=1:o===")"&&n>0&&(n-=1),n===0&&/\s/.test(o)){r.length&&t.push(r),r="";continue}r+=o}return r.length&&t.push(r),t},So=e=>(e/=255,e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)),_n=e=>.2126*So(e[0])+.7152*So(e[1])+.0722*So(e[2]),vo=(e,t)=>{let r=_n(e)+.05,n=_n(t)+.05;return r>n?r/n:n/r},Wl=e=>(e/=255,e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)),ql=e=>(e<=.0031308?e*12.92:1.055*Math.pow(e,1/2.4)-.055)*255,Ji=([e,t,r])=>{let[n,o,s]=[e,t,r].map(Wl),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]},Kl=([e,t,r])=>{let n=e+.3963377774*t+.2158037573*r,o=e-.1055613458*t-.0638541728*r,s=e-.0894841775*t-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]},Qi=([e,t,r])=>{let n=Math.atan2(r,t)*180/Math.PI;return n<0&&(n+=360),[e,Math.sqrt(t*t+r*r),n]},Gl=([e,t,r])=>{let n=r*Math.PI/180;return[e,t*Math.cos(n),t*Math.sin(n)]},ea=(e,t,r,n=24)=>{let o=a=>Kl(Gl([e,a,r])),s=a=>a.every(c=>c>=-1e-4&&c<=1.0001),i=o(t);if(!s(i)){let a=0,c=t;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=>ql(Math.max(0,Math.min(1,a))))},wn=(e,t=1,r=[255,255,255])=>t>=1?e:e.map((n,o)=>n*t+r[o]*(1-t)),Gt=(e,t)=>{w(e)&&e.includes("rgb")&&(e=yt(e).join(", ")),w(e)&&(e=e.split(",").map(o=>parseFloat(o.trim()))),Bt(t)&&(t+="");let r=Bl(e),n=t.slice(0,1);if(n==="-"||n==="+"){let o=zl(r,parseFloat(t));return jl(o).join(", ")}else{let[o,s,i]=e,[a,c]=Ul(o/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(t)))/100;return Vl(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var ug=(e,t)=>{if(e)return e.themes&&e.themes[t]?e.themes[t]:e[t]?[e,e[t]]:e};var bt=(e,t)=>{if(!e||!t)return null;try{return new URL(e),null}catch{}let r=t[e];return r?r.content&&r.content.src:null},Sn=(e,t)=>{if(e[t])return e[t].value;let r=()=>Object.keys(e).find(o=>o!=="default"&&e[o]&&e[o].value&&!e[o].isSystemFallback);if(e.default){let o=e[e.default];if(o&&o.isSystemFallback){let s=r();if(s)return e[s].value}if(o)return o.value}let n=r()||Object.keys(e).find(o=>o!=="default"&&e[o]&&e[o].value);return n&&e[n]&&e[n].value},Yl=e=>{if(typeof e!="string"||!e)return null;let t=e.split(/[#?]/)[0].split(".").pop().trim();return["woff2","woff","ttf","otf","eot"].includes(t)?t:null},Co=e=>e&&(e.includes("fonts.googleapis.com")||e.includes("fonts.gstatic.com")),Eo=e=>`@import url('${e}');`,Xl=e=>`@font-face { ${e} }`,ta=(e,t,r,n={})=>{let i=(Array.isArray(t)?t:[t]).filter(a=>typeof a=="string"&&a).map(a=>{let c=Yl(a),l=c?` format('${c}')`:"";return`url('${a}')${l}`}).join(`,
33
33
  `);return`
34
- font-family: '${t}';
35
- font-style: ${o.fontStyle||"normal"};${r?`
36
- font-weight: ${r};`:""}${o.fontStretch?`
37
- font-stretch: ${o.fontStretch};`:""}${o.fontDisplay?`
38
- font-display: ${o.fontDisplay};`:""}${o.unicodeRange?`
39
- unicode-range: ${o.unicodeRange};`:""}
40
- src: ${i};`},Rr=(t,e,r,o)=>`@font-face {${Zi(t,e,r,o)}
41
- }`,xo=(t,e,r)=>Object.keys(e).map(n=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f}=e[n],u=Array.isArray(s)?s.map(d=>ye(d,r)||d):ye(s,r)||s;return Zi(t,u,i,{fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f})}),sg=t=>Object.keys(t).map(r=>xo(r,t[r].value)),Gl=(t,e,r)=>{if(e&&e.isVariable){let s=ye(e.url,r)||e.url;return Sn(s)?kn(s):Rr(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap",unicodeRange:e.unicodeRange})}if(e[0])return xo(t,e,r).map(Kl);let n=Array.isArray(e.url)?e.url.map(s=>ye(s,r)||s):ye(e.url,r)||e.url;return Rr(t,n,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch,unicodeRange:e.unicodeRange})},Ji=(t,e)=>Object.keys(t).map(o=>Gl(o,t[o].value,e));R();R();R();R();var vn={};P(vn,{animation:()=>Sg,breakpoints:()=>xg,class:()=>Ag,color:()=>pg,devices:()=>wg,document:()=>Ex,font:()=>ag,fontFace:()=>fg,fontFamily:()=>cg,fontFamilyTypes:()=>lg,gradient:()=>hg,grid:()=>Eg,icons:()=>yg,media:()=>ug,reset:()=>Ax,semanticIcons:()=>bg,sequence:()=>cr,shadow:()=>mg,shape:()=>Rg,sizes:()=>Og,spacing:()=>dg,svg:()=>kg,svgData:()=>vg,templates:()=>Cg,theme:()=>gg,timing:()=>_g,typography:()=>Qi,unit:()=>ig,vars:()=>Tg});var cr={"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 ig={default:"em"};var vA={browserDefault:16,base:16,type:"font-size",ratio:cr["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},Qi=vA;var ag={};var cg={},lg={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},fg={};var ug={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var CA={base:Qi.base,type:"spacing",ratio:cr.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},dg=CA;var pg={},hg={};var gg={};var mg={};var yg={},bg={};var EA={default:150,base:150,type:"timing",ratio:cr["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},_g=EA;var Ex={};var xg={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},wg={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 Sg={};var kg={},vg={};var Cg={};var AA={},Eg=AA;var Ag={};var Ax={},Tg={},Og={},Rg={};var Jl={},Ql={},ne=new Set,Yl=vn,Xl={},ea=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in Yl){let e=t.toLowerCase();Xl[e]=Yl[t];let r=ea(e);r!==e&&(Xl[r]=Yl[t]),e!==t&&(Xl[t]=Yl[t])}var wo={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:Jl,cssMediaVars:Ql,CSS_VARS:Jl,CSS_MEDIA_VARS:Ql,_scratchConfig:!0,...Xl},Cn=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return yt(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let r=yt(e)?e:t.globalTheme,o=Ts(yt(r)?r:"auto");return Object.defineProperty(t,"globalTheme",{get(){return o.get()},set(n){o.set(n)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"__globalThemeSignal",{value:o,enumerable:!1,configurable:!0,writable:!0}),o},Tx=t=>t?Cn(t):null,En=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return yt(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let r=yt(e)?e:t.resolvedTheme,o=Ts(yt(r)?r:null);return Object.defineProperty(t,"resolvedTheme",{get(){return o.get()},set(n){o.set(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"__resolvedThemeSignal",{value:o,enumerable:!1,configurable:!0,writable:!0}),o},Ox=t=>t?En(t):null;Cn(wo);En(wo);var Zl=lt(wo),oe={active:"0",0:wo},Rx=t=>(yt(t)&&(oe.active=t),oe[t||oe.active]),ta=[],it=t=>{t&&t._scratchConfig&&ta.push(t)},et=()=>{ta.pop()},C=t=>ta.length?ta[ta.length-1]:oe[t||oe.active]||wo,tf=t=>{if(S(t))return oe.active="1",oe[1]=st(t,lt(Zl),ne),An(oe[1]),Cn(oe[1]),En(oe[1]),t},TA=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],OA=["useVariable","globalTheme","verbose"],RA=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],An=t=>{for(let e of RA){let r;for(let o of e){let n=t[o];S(n)&&(r=r?st(r,n,ne):n)}if(r)for(let o of e)S(t[o])&&(t[o]=r)}},ra=(t,e,{cleanBase:r=!1}={})=>{let o=r?null:C(),n=lt(!r&&o&&o._scratchConfig?o:Zl);for(let i of TA)delete n[i];for(let i of OA)Object.prototype.hasOwnProperty.call(Zl,i)?n[i]=Zl[i]:delete n[i];let s=st(e||{},n,ne);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s._scratchConfig=!0,An(s),Cn(s),En(s),t&&(oe[t]=s),s};var Ke={"-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"},Pg=(t,e)=>{let{key:r,variable:o,value:n,scaling:s,index:i,scalingVariable:a}=t;e.sequence[r]={key:r,decimal:~~(n*100)/100,val:~~n,scaling:s,index:i,scalingVariable:a,variable:o},e.scales[r]=s;let c=Px.has(e.unit)?"rem":e.unit;e.vars[o]=s+c},lr=t=>{if(!t.includes("("))return t;let e=t.split("(")[0],r=t.slice(t.indexOf("(")+1,t.lastIndexOf(")"));return[e,r]},Px=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),oa=(t,e)=>{let{base:r,type:o,unit:n}=e,s=Px.has(n)?"rem":n,i=(oo(s)?1:r)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(o&&o.replace(".","-")),l=`${c}-ratio`;if(t>0){let f=Ke[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=Ke[t+1],u=Math.abs(t),d=Math.pow(Ix,2*u),h=Ke[u];return h?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${h}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},ef=(t,e,r,o)=>{let{type:n}=o,i=t===2&&e.length===2?t+1:t,l=`${"--"+(o.varPrefix?o.varPrefix+"-":"")+(n&&n.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${l+i}))`},na=(t,e)=>{let o=(t*e-t)/1.618,n=t*e-o,s=t+o,i=(n+s)/2;return[n,i,s]},sa=(t,e)=>na(t,e).map(r=>r/t),ia=(t,e)=>{let{key:r,base:o,value:n,ratio:s,variable:i,index:a}=t,l=~~(n*s)-~~n,f,[u,d,h]=na(n,s);l>16?f=[u,d,h]:f=[u,h],f.forEach((g,p)=>{let m=~~(g/o*1e3)/1e3,b=i+(p+1),_=a+(p+1)/10,y=ef(p+1,f,i,e),x={key:r+(p+1),variable:b,value:g,scaling:m,scalingVariable:y,index:_};Pg(x,e)})},Ix=1.618,PA=(t,e,r)=>{if(t>=0)return e*Math.pow(r,t);let o=Math.abs(t),n=e*Math.pow(r,t),s=e*Math.pow(r,o)/Math.pow(Ix,2*o);return Math.max(n,s)},Gt=t=>{let{type:e,base:r,ratio:o,range:n,subSequence:s}=t,i=Math.abs(n[0])+Math.abs(n[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=n[1]-l,u=Ke[f],d=PA(f,r,o),h=~~(d/r*100)/100,g=c+u,p=oa(f,t),m={key:u,variable:g,value:d,base:r,scaling:h,scalingVariable:p,ratio:o,index:f};Pg(m,t),s&&ia(m,t)}return t},Ig=(t,e=0)=>{let{type:r,base:o,ratio:n,subSequence:s}=t,i=w(e)?e:Ke[e],a=w(e)?Object.entries(Ke).find(([,m])=>m===e)?.[0]:e;if(!i)return console.warn(`Position ${e} is out of range in numToLetterMap`),null;let c={sequence:{},scales:{},vars:{},...t},l=o*Math.pow(n,a),f=~~(l/o*100)/100,h="--"+(t.varPrefix?t.varPrefix+"-":"")+(r&&r.replace(".","-"))+"-"+i,g=oa(a,t),p={key:i,variable:h,value:l,base:o,scaling:f,scalingVariable:g,ratio:n,index:a};return Pg(p,c),s&&ia(p,c),c},So=(t="A",e)=>{let r=C(),{unit:o}=r;if(w(t)&&gt(t))return`var(${t})`;if(w(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(w(t)){let y=r.sizes;if(y){let x=y[t]||y[t.toLowerCase()];if(x!==void 0)return t.slice(0,1)==="-"?`calc(${x} * -1)`:x}}let{sequence:n,unit:s=o.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(Os(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+"-":""}${Hi(e.type.replace(".","-"))}-`,h=t.toUpperCase(),g=h.slice(0,1)==="-"?"-":"",p=g?h.slice(1):h,m="";p.includes("_")&&(m="_"+p.split("_")[1].toLowerCase(),p=p.split("_")[0]);let b=y=>a.test(y)?`var(${d}${y}${m})`:y;if(p.includes("+")){let[y,x]=p.split("+"),k=`${b(y)} + ${b(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(p.includes("*")){let[y,x]=p.split("*"),k=`${b(y)} * ${b(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(p.includes("-")){let[y,x]=p.split("-"),k=`${b(y)} - ${b(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}if(!n[p]&&p.length===2&&(r.verbose&&console.warn(p,"- value is not found because `subSequence` is set to false"),p=p.slice(0,1)),i||r.useVariable){let y=`var(${d}${p}${m})`;return g?`calc(${y} * -1)`:y}let _=n?n[p]:null;if(!_){if(console.warn("can't find",n,p),It())throw new Error(`[smbls] Unresolvable design-system token "${t}"`+(e.type?` for sequence "${e.type}"`:"")+" \u2014 not a registered `sizes` name and not a valid spacing/typography/timing sequence letter. The CSS property using it would silently be dropped in production. Register the token in `designSystem/sizes.js` (or the relevant sequence family) or fix the typo.");return}return s==="ms"||s==="s"?g+_.val+s:g+_.scaling+s},rf=(t,e)=>{if(!["+","-","*","/",","].filter(s=>t.includes(s+" ")).length)return t;let o=/(\s+-\s+|\s*[+*/,]\s*)/;return t.split(o).map(s=>{let i=s.trim();return!i||["+","-","*","/",","].includes(i)?s:So(i,e)}).join("")},Ge=(t,e,r,o)=>{if(typeof t!="string")return C().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!o&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let s=lr(t);o=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=rf(t,r):t=So(t,r),{[e]:o?`${o}(${t})`:t}},of=(t,e)=>Ke[t-e],aa=t=>{let{h1Matches:e,sequence:r}=t;return new Array(6).fill(null).map((o,n)=>{let s=of(e,n);return r[s]})};R();var Dg=(t,e)=>{let r=C(),{cssVars:o}=r;H(t.value)||(o[t.var]=t.value)},ca=(t,e,r)=>{let o=C(),{unit:n}=o,s=e.unit||n.default,{base:i,ratio:a,type:c}=e,f="--"+(e.varPrefix?e.varPrefix+"-":"")+(c&&c.replace(".","-"));t[`${f}-base`]=i,t[`${f}-unit`]=s;let u=`${f}-ratio`;t[u]=a;let[d,h,g]=sa(i,a);t[`${f}-sub-ratio-1`]=`calc(var(${f}-ratio) * ${d/a})`,t[`${f}-sub-ratio-2`]=`calc(var(${f}-ratio) * ${h/a})`,t[`${f}-sub-ratio-3`]=`calc(var(${f}-ratio) * ${g/a})`},Dx=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),fr=(t,e={})=>{let r=C(),{unit:o,timing:n,cssVars:s}=r,i=t.unit||o.default,a=Dx.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||ca(s,t,e);for(let u in l){let d=l[u],h=(t.type===n.type?l[u].val:f[u])+a;if(!c){s[d.variable+"_default"]=h,s[d.variable]=d.scalingVariable;continue}e.useDefault===!1?s[d.variable]=h:(s[d.variable+"_default"]=h,s[d.variable]=`var(${d.variable+"_default"})`)}},Pr=(t,e,r={})=>{let o=C(),{unit:n,media:s,cssVars:i}=o,a=e.slice(1),c=t[e],l=c.unit||t.unit||n.default,f=Dx.has(l)?"rem":l,{mediaRegenerate:u}=t,{sequence:d,scales:h}=c,g=s[a];if(!g&&o.verbose&&console.warn("Can't find media query ",g),!u){let p=i[`@media ${g}`];p||(p=i[`@media ${g}`]={}),ca(p,c,r);let m=t.unit||n.default;if(f!==m&&d)for(let b in d){let _=d[b],y=h[b]+f;p[_.variable+"_default"]=y,p[_.variable]=y}return}for(let p in d){let m=d[p],b=(oo(f)?h[p]:d[p].val)+f;!g&&o.verbose&&console.warn("Can't find query ",g);let _=i[`@media ${g}`];_||(_=i[`@media ${g}`]={}),_[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=b}};R();var Lx=lo(),Tn=t=>{let e=C(),r="";for(let o in t)e.__svgCache[o]||(e.__svgCache[o]=!0,r+=t[o]);return r},IA=t=>{let e=t&&(t.default||t);if(!w(e))return Lx&&console.warn("parseRootAttributes:",e,"is not a string"),{};let r=e.match(/<svg\s+(.*?)>/);if(!r||!r[1])return{};let n=r[1].match(/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|\s*\/?[>"']))+.)["']?/gm);return n?n.reduce((s,i)=>{let[a,c]=i.split("=");return s[a]=c.replace(/['"]/g,""),s},{}):{}},DA=(t,e)=>{let r=[];if(t.replace(/id="([^"]*)"/g,(n,s)=>(r.push(s),n)),!r.length)return t;let o=t;for(let n of r){let s=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${e}-${n}`;o=o.replace(new RegExp(`id="${s}"`,"g"),`id="${i}"`).replace(new RegExp(`url\\(#${s}\\)`,"g"),`url(#${i})`).replace(new RegExp(`xlink:href="#${s}"`,"g"),`xlink:href="#${i}"`).replace(new RegExp(`href="#${s}"`,"g"),`href="#${i}"`)}return o},$x=new Set,la=(t,e)=>{let r=e&&e.default?e.default:e;if(!w(r))return Lx&&!$x.has(t)&&($x.add(t),console.warn("convertSvgToSymbol:",t,"is not a string")),"";e=r;let o=e.match(/^<symbol\b[^>]*\bid="([^"]*)"/);if(o){let u=o[1];return u===t?e:e.replace(`id="${u}"`,`id="${t}"`)}let n=IA(e),{width:s,height:i}=n,a=n.viewBox||`0 0 ${s||24} ${i||24}`,f=DA(e,t).replace("<svg",`<symbol id="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="${a}"`);return f=f.replace(/width="[^"]*"/,""),f=f.replace(/height="[^"]*"/,""),f=f.replace("</svg","</symbol"),f=MA(f),f},$A="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",LA=new RegExp(`<(${$A})\\b([^>]*?)\\s*/>`,"g"),MA=t=>t.replace(LA,"<$1$2></$1>");var In={};P(In,{STANDARD_SCHEME_QUERIES:()=>sf,appendSVGSprite:()=>Ca,appendSvgIconsSprite:()=>Ao,applyDocument:()=>va,applyHeadings:()=>ff,applyReset:()=>Ea,applySpacingSequence:()=>ua,applyTimingSequence:()=>ka,applyTypographySequence:()=>xa,checkIfBoxSize:()=>fa,getColor:()=>rt,getFontFamily:()=>_a,getFontSizeByKey:()=>wa,getMediaColor:()=>Rt,getMediaTheme:()=>_e,getSafeInk:()=>af,getSafeInkInfo:()=>Mg,getShadow:()=>pa,getShapeByKey:()=>Sa,getSpacingBasedOnRatio:()=>Oe,getSpacingByKey:()=>wt,getTheme:()=>ga,getTimingByKey:()=>ie,getTimingFunction:()=>xe,quietColorProbe:()=>ko,resolveBorderValue:()=>se,resolveColorRgb:()=>vo,resolveShadowValue:()=>Co,runThroughMedia:()=>lf,setAdaptiveSchemeVar:()=>$r,setColor:()=>Dr,setFont:()=>ba,setFontFamily:()=>Rn,setGradient:()=>On,setMediaTheme:()=>ya,setSVG:()=>Pn,setShadow:()=>Lr,setSvgIcon:()=>Eo,setTheme:()=>ma,splitSpacedValue:()=>da});R();var sf={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},be=new Set,FA=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"]),nf=new Set,Mx=t=>{if(!t)return!1;let{color:e,gradient:r}=t;return!!(S(e)&&Object.keys(e).length||S(r)&&Object.keys(r).length)},Fx=new Set,$g=0,ko=t=>{$g++;try{return t()}finally{$g--}},NA=(t,e)=>{if(!w(t)||t.indexOf(" ")===-1)return null;let r=t.replace(/\s+/g,""),o=Lt(r);if(!o||o.passthrough||o.cssVar)return null;let{color:n,gradient:s}=e;return!n[o.name]&&!s[o.name]?null:r},Lg=(t,e,r)=>{let o=NA(t,r);if(o){if(!Fx.has(t)){Fx.add(t);let i=r&&r.name?` (design system \`${r.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` has a space before its alpha/tone modifier${i} \u2014 did you mean \`${o}\`? The space form never resolves, so the atomic class it mints carries no CSS value and paints invisibly. Dropped rather than shipped invisible.`)}return}let n=Lt(t);if(n&&n.name&&!n.passthrough&&!n.cssVar&&(n.alpha!==void 0||n.tone!==void 0)&&Mx(r)&&!r.color[n.name]&&!r.gradient[n.name]){if(!$g&&!nf.has(t)){nf.add(t);let i=r&&r.name?` (design system \`${r.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` does not resolve${i} \u2014 \`${n.name}\` is not in the palette. Dropped rather than emitted as a raw value, which is invalid CSS the browser discards silently. Define it in designSystem/color.js or use a palette token.`)}return}let s=w(e)?e.toLowerCase():"";if(!FA.has(s)||!Mx(r))return t;if(!nf.has(s)){nf.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.`)}},rt=(t,e,r)=>{let o=r||C();if(!w(t)){o.verbose&&console.warn(t,"- type for color is not valid");return}if(gt(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let n,s,i;if(T(t))[n,s,i]=t;else{let u=Lt(t);if(!u){let{color:d,gradient:h}=o,g=h[t]||d[t];return g?(e&&g[e]&&(g=g[e]),o.useVariable?`var(${g.var})`:g.value):Lg(t,t,o)}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;n=u.name,s=u.alpha,i=u.tone}let{color:a,gradient:c}=o,l=a[n]||c[n];if(!l)return Lg(t,n,o);if(e)if(l[e]!==void 0)l=l[e];else if(T(l)){let u=e.charCodeAt(0)===64?e.slice(1):e;u==="dark"?l=l[1]!==void 0?l[1]:l[0]:(u!=="light"&&o.verbose&&console.warn(t," - array-form color tokens only support light/dark; falling back to the light slot for scheme",e),l=l[0])}else o.verbose&&console.warn(t," - does not have ",e);if(w(l)){if(be.has(n))return l;be.add(n);try{return rt(l,null,r)}finally{be.delete(n)}}let f=l.rgb;if(!f){let u=o.useVariable?`var(${l.var})`:l.value;if((s||i)&&u){let d=s!==void 0?s:1;if(!i)return`rgb(from ${u} r g b / ${d})`;if(i.charCodeAt(0)===43||i.charCodeAt(0)===45){let g=parseFloat(i),p=g<0?"-":"+",m=Math.abs(g);return`rgb(from ${u} calc(r ${p} ${m}) calc(g ${p} ${m}) calc(b ${p} ${m}) / ${d})`}return`hsl(from ${u} h s ${i}% / ${d})`}return u}return i&&!l[i]&&(f=qe(f,i),l[i]={rgb:f,var:`${l.var}-${i}`}),l[i]&&(f=l[i].rgb),s?`rgba(${f}, ${s})`:i?`rgba(${f}, ${l.alpha!==void 0?l.alpha:1})`:o.useVariable?`var(${l.var})`:l.value!==void 0?l.value:`rgb(${f})`},Nx=t=>{let e=me(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}},jA=(t,e)=>{if(!e)return t;let r=t.rgb;if(e.tone){let n=qe(r,e.tone);r=w(n)?n.split(",").map(s=>parseFloat(s.trim())):n}let o=e.alpha!==void 0?parseFloat(e.alpha):t.alpha;return{rgb:r,alpha:o}},vo=(t,e,r)=>{let o=e||C();if(!w(t))return null;let n=Lt(t);if(n){if(n.passthrough){let d=me(n.passthrough);return d&&d.length>=3?{rgb:[d[0],d[1],d[2]],alpha:d[3]!==void 0?d[3]:1}:null}if(n.cssVar)return null}let s=n?n.name:t,{color:i,gradient:a}=o,c=i[s]||a[s];if(!c)return Nx(t);if(w(c)){let d;if(be.has(s))d=Nx(c);else{be.add(s);try{d=vo(c,o,r)}finally{be.delete(s)}}return d?jA(d,n):null}if(c.rgb===void 0&&S(c)){let d=`@${r||"light"}`;c=c[d]!==void 0?c[d]:c["@light"]}if(!c||c.rgb===void 0)return null;let l=c.rgb;n&&n.tone&&(l=qe(l,n.tone));let f=w(l)?l.split(",").map(d=>parseFloat(d.trim())):l,u=n&&n.alpha!==void 0?parseFloat(n.alpha):c.alpha!==void 0?c.alpha:1;return{rgb:f,alpha:u}},Rt=(t,e,r)=>{let o=r||C();if(e||(e=o.globalTheme==="auto"?null:o.globalTheme),!w(t)){o.verbose&&console.warn(t,"- type for color is not valid");return}if(gt(t))return`var(${t})`;let n,s,i;if(T(t))n=t[0];else{let u=Lt(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;n=u.name,s=u.alpha,i=u.tone}else n=t}let{color:a,gradient:c}=o,l=a[n]||c[n],f=S(l);if(f&&l.value)return rt(t,`@${e}`,r);if(f){if(o.useVariable&&l.var)return s||i?rt(t,null,r):`var(${l.var})`;if(e)return rt(t,`@${e}`,r);{let u={},d=o.scopeSelector||":root",h=d===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${d}:not([data-theme])`;for(let g in l){if(g.charCodeAt(0)!==64)continue;let p=g.slice(1),m=rt(t,g,r);if(m!==void 0&&(u[`[data-theme="${p}"] &`]=m,p==="light"||p==="dark")){let b=o.media&&o.media[p]||sf[p];if(!b)continue;let _="@media "+(b==="print"?`${b}`:`screen and ${b}`);u[_]={[`${h} &`]:m}}}return u}}else return Lg(t,n,o)},$r=(t,e,r,o)=>{let s=`--${o.varPrefix?o.varPrefix+"-":""}${e}-${r}`,i,a={};for(let c in t){if(c.charCodeAt(0)!==64)continue;let l=c.slice(1),f=t[c],u=f&&(f.value||f);!u||typeof u!="string"||(a[l]=u,(l==="light"||i===void 0)&&(i=u))}if(i!==void 0){o.cssVars[s]=i,o.cssMediaVars||(o.cssMediaVars={});for(let c in a){let l=`[data-theme="${c}"]`;if(o.cssMediaVars[l]||(o.cssMediaVars[l]={}),o.cssMediaVars[l][s]=a[c],c==="light"||c==="dark"){let f=`@media (prefers-color-scheme: ${c})`;o.cssMediaVars[f]||(o.cssMediaVars[f]={}),o.cssMediaVars[f][s]=a[c]}}return t.var=s,s}},Dr=(t,e,r)=>{let o=C();if(S(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0))return o.useVariable&&t.var&&(o.cssVars[t.var]=t.value),t;if(w(t)&&gt(t)){let p=t.slice(2);if(t=rt(p),!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let m=p.split(" "),b=o.color[m[0]];if(b&&!b.value&&!b.rgb&&(w(b)||T(b)||S(b))&&!be.has(m[0])){be.add(m[0]);try{o.color[m[0]]=Dr(b,m[0])}finally{be.delete(m[0])}b=o.color[m[0]]}if(b&&b.value){let _=b.rgb,y=m[1]!==void 0?m[1]:"1",x=m[2];x&&(_=qe(_,x)),t=`rgba(${_}, ${y})`}else{let _=m[2],y=m[1]!==void 0?m[1]:"1";if(_)try{let x=me(m[0]);x&&x.length>=3?t=`rgba(${qe(x.slice(0,3).join(", "),_)}, ${y})`:t=m[0]}catch{t=m[0]}else t=m[0]}}}if(T(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),S(t)){let p={};for(let m in t)m!=="var"&&(p[m]=Dr(t[m],e,m.slice(0,1)==="@"?m.slice(1):m));return o.useVariable&&$r(p,"color",e,o),p}let s=`--${o.varPrefix?o.varPrefix+"-":""}color-${e}`+(r?`-${r}`:""),i=t.value||t;if(w(i)&&!i.includes("(")&&!i.startsWith("#")){let p=Lt(i);if(p&&p.name&&!p.passthrough&&!p.cssVar){let m=o.color[p.name];if(m&&!m.value&&!m.rgb&&(w(m)||T(m)||S(m))&&!be.has(p.name)){be.add(p.name);try{o.color[p.name]=Dr(m,p.name)}finally{be.delete(p.name)}}let b=o.color[p.name];if(b&&b.rgb){let _=b.rgb;p.tone&&(_=qe(_,p.tone));let y=p.alpha!==void 0?parseFloat(p.alpha):b.alpha!==void 0?b.alpha:1;i=`rgba(${_}, ${y})`}}}let a=me(i),[c,l,f,u=1]=a,d=parseFloat(u.toFixed(2)),h=`${c}, ${l}, ${f}`,g=`rgba(${h}, ${d})`;return o.useVariable&&(o.cssVars[s]=g),{var:s,rgb:h,alpha:d,value:g}},On=(t,e,r)=>{let o=C();if(S(t)&&t.value!==void 0&&t.var!==void 0)return o.useVariable&&(o.cssVars[t.var]=t.value),t;if(w(t)&&gt(t)&&(t=rt(t.slice(2))),T(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),S(t)){let i={};for(let a in t)a!=="var"&&(i[a]=On(t[a],e,a.slice(0,1)==="@"?a.slice(1):a));return o.useVariable&&$r(i,"gradient",e,o),i}let s=`--${o.varPrefix?o.varPrefix+"-":""}gradient-${e}`+(r?`-${r}`:"");return o.useVariable&&(o.cssVars[s]=t.value||t),{var:s,value:t.value||t}};R();var af=(t,e,r={},o)=>{let n=o||C(),{min:s=4.5,large:i=!1,scheme:a,meta:c=!1,maxIterations:l=15}=r,f=i?3:s,u=a||(n.globalTheme&&n.globalTheme!=="auto"?n.globalTheme:"light"),d=w(e)?e:String(e),h=Lt(t),g=h&&!h.passthrough&&!h.cssVar?h.name:null,p=(X,B)=>c?{value:X,...B}:X;if(g){let X=n.color[`${g}Safe`];if(X){let B=`${d}@${u}`,dt=X[B]!==void 0?X[B]:X[d];if(dt!==void 0){let Ct=dt&&dt.rgb!==void 0?n.useVariable&&dt.var?`var(${dt.var})`:dt.value:rt(dt,null,n);return p(Ct,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=rt(t,u?`@${u}`:null,n),b=vo(t,n,u),_=vo(e,n,u);if(!b||!_)return n.verbose&&console.warn("getSafeInk: could not resolve",t,e,"\u2014 returning hue unchanged"),p(m,{ratio:null,deviation:0,derived:!1,overridden:!1,unresolved:!0});let y=bo(_.rgb,_.alpha),x=bo(b.rgb,b.alpha,y),k=wn(x,y);if(k>=f-.02)return p(m,{ratio:k,deviation:0,derived:!1,overridden:!1});let[E,O,$]=Gi(b.rgb),[,I,D]=Yi([E,O,$]),W=mo(y)>.5,Pt=W?E:1-E,F=X=>{let B=W?E-X:E+X,dt=Math.max(0,Math.min(1,B));return{rgb:Xi(dt,I,D),L:dt}},Y=X=>{let{rgb:B}=F(X),dt=bo(B.map(Ct=>Math.round(Ct)),b.alpha,y);return wn(dt,y)},at=0,z=Pt,G=Y(z)>=f;if(G)for(let X=0;X<l;X++){let B=(at+z)/2;Y(B)>=f?z=B:at=B}else at=z;let{rgb:Vt,L:q}=F(z),xt=Vt.map(X=>Math.round(X)),M=Y(z),ot=b.alpha<1?`rgba(${xt.join(", ")}, ${b.alpha})`:`rgb(${xt.join(", ")})`,V=Math.abs(q-E)*100;return p(ot,{rgb:xt,ratio:M,startRatio:k,deviation:V,derived:!0,overridden:!1,reachable:G})},Mg=(t,e,r={},o)=>af(t,e,{...r,meta:!0},o);R();R();var BA=t=>{let r=C().spacing||{},o=parseFloat(t.spacingRatio),n={...r,ratio:Number.isFinite(o)?o:r.ratio,sequence:{},scales:{}};return Gt(n),n},UA=t=>{for(let e in t){let r=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:n,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;ht(r,{type:n,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),Gt(r),Pr(t,e)}},fa=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),o=e.includes("border")||e.includes("outline");return r&&!o},ua=()=>{let t=C(),{spacing:e}=t;Gt(e),fr(e),UA(e)},VA=t=>{let e=C(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:Gt(t)},wt=(t,e="padding",r,o)=>{let n=VA(r);if(w(t)){if(!o&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!o&&t.includes("(")){let i=lr(t);o=i[0],t=i[1]}}let s=o?[t]:go(t);if(T(s)){if(s.length>1){let i="";e==="borderWidth"&&(e="border",i="Width");let a={2:["Block","Inline"],3:["BlockStart","Inline","BlockEnd"],4:["BlockStart","InlineEnd","BlockEnd","InlineStart"]},c=(l,f)=>Ge(s[f],e+l+i,n,o);return a[s.length].map((l,f)=>c(l,f))}return Ge(t,e,n,o)}},Oe=(t,e,r,o)=>{let n=C(),{spacing:s}=n,i=r||t[e];if(!o&&w(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!o&&w(i)&&i.includes("(")){let a=lr(i);o=a[0],i=a[1]}if(t.spacingRatio){let a=BA(t);return wt(i,e,a,o)}return wt(i,e,s,o)},da=t=>{let e=r=>{let o=["+","-","*","/"].includes(r),n=Go.some(i=>t.includes(i));return o||n?r:r.length<3&&/[A-Z]/.test(r)?r+"_default":r};return t.split(",").map(r=>r.trim()).map(e).join(",").split(" ").map(e).join(" ")};R();var Co=(t,e,r)=>!w(t)||re.test(t)?t:ar(t).map(o=>(o=o.trim(),o.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(n.startsWith("--"))return`var(${n})`;let s=ko(()=>rt(n,e));if(Te(s))return s;if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em"||n==="inset"||n==="none"||yo.has(n.toLowerCase()))return n;r&&r(n);let i=wt(n,"shadow");return i&&i.shadow?i.shadow:n}).join(" "))).join(", "),Lr=(t,e,r,o)=>{let n=C();if(T(t)){let a={"@light":Lr(t[0],e,"light"),"@dark":Lr(t[1],e,"dark")};return n.useVariable&&$r(a,"shadow",e,n),a}if(S(t)){let a={};for(let c in t)a[c]=Lr(t[c],e,c.startsWith("@")?c.slice(1):c);return n.useVariable&&$r(a,"shadow",e,n),a}w(t)&&!re.test(t)&&(t=Co(t));let i=`--${n.varPrefix?n.varPrefix+"-":""}shadow-${e}`+(r?`-${r}`:"");return n.useVariable&&(n.cssVars[i]=t),{var:i,value:t}},pa=(t,e)=>{let r=C();if(e||(e=r.globalTheme==="auto"?null:r.globalTheme),!w(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(gt(t))return`var(${t})`;let[o]=T(t)?t:t.split(" "),s=r.shadow[o],i=S(s);if(!s)return r.verbose&&console.warn("Can't find color ",o),t;if(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={};for(let c in s){if(c.charCodeAt(0)!==64)continue;let l=r.media[c.slice(1)];if(!l)continue;let f="@media "+(l==="print"?`${l}`:`screen and ${l}`),u=s[c],d=u&&(u.value!==void 0?u.value:u);d!==void 0&&(a[f]=d)}return a}return r.verbose&&console.warn("Can't find color",t),t};var zA=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),HA=t=>zA.has(t),se=(t,e,r)=>{if(t==null)return;let o=t+"";if(re.test(o))return o;let n=o.trim();return n==="none"||n==="0"||n==="initial"||n==="inherit"||n==="unset"?o:o.split(/\s+/).map(s=>{if(s=s.trim(),!s)return"";if(gt(s))return`var(${s})`;if(HA(s)||/^\d/.test(s)||s==="0")return s;let i=ko(()=>rt(s,e));if(Te(i))return i;if(yo.has(s.toLowerCase()))return s;r&&r(s);let a=wt(s,"border");return a&&a.border?a.border:s}).join(" ")};R();var WA=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"]),jx=["color","Color","background","Background","fill","Fill","stroke","Stroke"],qA=t=>{for(let e=0;e<jx.length;e++)if(t.includes(jx[e]))return!0;return!1},KA={boxShadow:Co,textShadow:Co,border:se,borderTop:se,borderRight:se,borderBottom:se,borderLeft:se,outline:se,columnRule:se},GA=t=>{if(!t)return!1;let e=Lt(t);return!e||!e.name||e.passthrough||e.cssVar?!1:e.alpha!==void 0||e.tone!==void 0},Bx=new Set,YA=(t,e,r,o,n,s)=>{if(!It())return;let i=`${t}::${e}::${r||""}::${o}`;Bx.has(i)||(Bx.add(i),console.warn(`[smbls/scratch] theme param "${e}" on "${t}"`+(r?` (${r})`:"")+` did not fully resolve: "${o}" -> "${n}" still contains the unresolved token "${s}". This is not valid CSS \u2014 the browser will drop the whole declaration. Register "${s}" as a design-system color token or fix the typo.`))},Vx=(t,e,r,o)=>{let n=KA[e];if(!n)return rt(r,o);let s=null,i=n(r,o,a=>{!s&&GA(a)&&(s=a)});return s&&YA(t,e,o,r,i,s),i},cf=t=>{let e={},{state:r,media:o,helpers:n,...s}=t;return Object.keys(s).map(a=>{let l=["color","Color","background","border"].some(f=>a.includes(f));return e[a]=l?rt(t[a]):t[a]}),e},ha=t=>(t.value||(t.value=cf(t)),t.value),ga=(t,e)=>{let r=C();if(r.useVariable)return _e(t,e);let o=r.theme;if(w(t)){let[n,s]=t.split(" "),i=o[n];if(i){if(!s&&!e)return ha(i);t=[n,s||e]}}if(H(t)&&t[1]){let n=t[0],s=t[1],{helpers:i,media:a,state:c}=o[n];if(a&&a[s])return ha(a[s]);if(i&&i[s])return ha(i[s]);if(c&&c[s])return ha(c[s])}else if(S(t))return cf(t)},XA=(t,e,r)=>{if(S(e))t.variants.inverse.value=cf(e);else if(e===!0){let{color:o,background:n}=r;t.variants.inverse={value:{color:n,background:o}}}},ZA=(t,e,r,o)=>{let n=ga(r);o[`&:${e}`]=n,S(r)&&!r.value&&(r.value=n)},JA=(t,e)=>{let{state:r}=t;return r?(Object.keys(r).map(n=>{let s=r[n];return ZA(t,n,s,e),t}),t):void 0},QA=(t,e,r,o)=>{let n=ga(r);o[`@media (prefers-color-scheme: ${e})`]=n,S(r)&&!r.value&&(r.value=n)},tT=(t,e)=>{let{media:r}=t;return r?(Object.keys(r).map(n=>{let s=r[n];return(n==="dark"||n==="light")&&QA(t,n,s,e),n==="inverse"&&XA(t,s,e),t}),t):void 0},eT=(t,e)=>{let r=C(),{helpers:o}=t;return o?(Object.keys(o).map(s=>{let i=o[s];return w(i)?o[s]=r.theme[i]:ha(o[s]),t}),t):void 0},ma=(t,e)=>{let r=C();if(r.useVariable)return ya(t,e);let{state:o,media:n,helpers:s}=t,i=cf(t,e),c=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}`;return JA(t,i),tT(t,i),eT(t,i),{var:c,value:i,state:o,media:n,helpers:s}};var Fg=(t,e,r)=>{let{cssVars:o}=r;r.cssMediaVars||(r.cssMediaVars={});let n=r.cssMediaVars,s=r.globalTheme!==void 0?r.globalTheme:"auto",i={},a=new Set;for(let l in t)if(t[l])for(let f of Object.keys(t[l]))a.add(f);let c=new Set;for(let l of a){let f=l.slice(0,1);if(!(f==="@"||f==="."||f===":")&&qA(l))for(let u in t){if(c.has(u))continue;let d=t[u]?.[l];if(d===void 0)continue;let h=rt(d,`@${u}`);h!==void 0&&w(h)&&/^[a-z][a-zA-Z]+$/.test(h)&&!WA.has(h)&&c.add(u)}}for(let l of a){let f=l.slice(0,1),u=Object.values(t).some(d=>H(d?.[l]));if(f==="."&&u){let d=l.slice(1),h={};for(let g in t)H(t[g]?.[l])&&(h[g]=t[g][l]);i[l]=Fg(h,`${e}-${d}`,r)}else if(f===":"&&u){let d=l.replace(/^:+/,""),h={};for(let g in t)H(t[g]?.[l])&&(h[g]=t[g][l]);i[l]=Fg(h,`${e}-${d}`,r)}else if(f!=="@"&&f!=="."&&f!==":"){let h=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}-${l}`,g=s&&s!=="auto"?String(s).replace(/^'|'$/g,""):null,p;for(let m in t){if(c.has(m))continue;let b=t[m]?.[l];if(b===void 0)continue;let _=Vx(e,l,b,`@${m}`);if(_===void 0)continue;(g&&m===g||!g&&(m==="light"||p===void 0))&&(p=_);let y=`[data-theme="${m}"]`;if(n[y]||(n[y]={}),n[y][h]=_,m==="dark"||m==="light"){let x=`@media (prefers-color-scheme: ${m})`;n[x]||(n[x]={}),n[x][h]=_}}p!==void 0&&(o[h]=p),i[l]=`var(${h})`,i[`.${l}`]={[l]:i[l]}}}return(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color}),i},ya=(t,e,r,o)=>{let n=C(),{cssVars:s}=n,i={value:t},a=!r&&!o;if(H(t)){if(a&&n.useVariable){let c={};for(let l in t)l.startsWith("@")&&H(t[l])&&(c[l.slice(1)]=t[l]);if(Object.keys(c).length){let l=Fg(c,e,n);Object.assign(i,l)}}for(let c in t){let l=c.slice(0,1),f=t[c];if(l==="@"||l===":"||l==="."){let u=l==="@"&&c;i[c]=ya(f,e,c,o||u)}else if(!a){let u=Vx(e,c,f,o),d=[...new Set([o,r].filter(m=>m).map(m=>m.slice(1)))],h=d.length?"-"+d.join("-"):"",p=`--${n.varPrefix?n.varPrefix+"-":""}theme-${e}${h}-${c}`;n.useVariable?(n.useThemeSuffixedVars&&(s[p]=u),i[c]=`var(${p})`):i[c]=u,i[`.${c}`]={[c]:i[c]}}}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(w(t)&&gt(t)){let l=n.theme[t.slice(2)];return _e(l,o)}return i},Ng=t=>{let e=C(),r={};for(let o in t){let n=o.slice(0,1);if(H(t[o])){if(n==="@")continue;n===":"?r[`&${o}`]=Ng(t[o]):n==="."&&(r[`&${o}`]=Ng(t[o]))}else r[o]=t[o]}return r},zx=(t,e)=>{let r=e.shift();return t[r]?zx(t[r],e):t},Ux=(t,e)=>T(e)?zx(t,e):w(e)&&t[e]?t[e]:t;var _e=(t,e)=>{let r=C();if(w(t)&&gt(t)&&(t=_e(t.slice(2))),!t||!w(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[o,...n]=T(t)?t:t.split(" "),s=r.theme[o];return s&&n.length?s=Ux(s,n):s&&e&&(s=Ux(s,e)),Ng(s)};R();R();var ba=(t,e)=>{let r=C(),o=`--font-${e}`;if(!t||T(t)&&!t[0])return;let n;if(t.isVariable){let s=ye(t.url,r.files)||t.url;Sn(s)?n=kn(s):n=Rr(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap",unicodeRange:t.unicodeRange})}else if(t[0])n=xo(e,t,r.files);else{let s=Array.isArray(t.url)?t.url.map(i=>ye(i,r.files)||i):ye(t.url,r.files)||t.url;n=Rr(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch,unicodeRange:t.unicodeRange})}return{var:o,value:t,fontFace:n}},_a=(t,e)=>{let r=C(),{fontFamily:o}=r;return _o(e||o,t)},Rn=(t,e)=>{let r=C(),{fontFamily:o,fontFamilyTypes:n}=r,{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!o.default)&&(o.default=e),S(s)&&(s=go(s));let a=`--font-family-${e}`,c=`${s.join(", ")}, ${n[i]}`;return{var:a,value:c,arr:s,type:i,isSystemFallback:!!t.isSystemFallback}};R();var lf=t=>{let e=C(),{typography:r,media:o}=e;for(let n in t){let s=n.slice(0,1)==="@",i=t[n];if(!s)continue;let{mediaRegenerate:a}=t,c=n.slice(1),{type:l,base:f,ratio:u,range:d,subSequence:h,h1Matches:g,unit:p}=t;ht(i,{type:l,base:f,ratio:u,range:d,subSequence:h,h1Matches:g,unit:p});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),b=i.unit||p,_=!i.unit&&m.has(p)?"rem":b,y=o[c],x="@media "+(y==="print"?`${y}`:`screen and ${y}`);if(r.templates[x]={fontSize:i.base/r.browserDefault+_},!a){ht(i,{sequence:{},scales:{},vars:{}}),Gt(i),Pr(t,n);continue}ht(i,{sequence:{},scales:{},templates:{},vars:{}}),Gt(i),Pr(t,n)}},ff=t=>{let e=C();if(t.h1Matches){let r=t.unit,o=aa(t),{templates:n}=t;for(let s in o){let i=`h${parseInt(s)+1}`,a=n[i];n[i]={fontSize:e.useVariable?`var(${o[s]?.variable})`:`${o[s]?.scaling}${r}`,margin:a?a.margin:0,lineHeight:a?a.lineHeight:t.lineHeight,letterSpacing:a?a.letterSpacing:t.letterSpacing,fontWeight:a?a.fontWeight:900-s*100}}}},xa=()=>{let t=C(),{typography:e}=t;Gt(e),ff(e),fr(e),lf(e)},wa=t=>{let e=C(),{typography:r}=e;return Ge(t,"fontSize",r)};R();var Sa=t=>{if(!w(t))return;let r=C().shape;if(r)return r[t]!==void 0?r[t]:r[t.toLowerCase()]};R();var ka=()=>{let t=C(),{timing:e}=t;Gt(e),fr(e)},xe=t=>{let e=C(),{timing:r}=e;return r[t]||r[zi(t)]||t},ie=(t,e="timing")=>{let r=C(),{timing:o}=r;return Ge(t,e,o)};R();var va=()=>{let t=C(),{fontFamily:e,theme:r,typography:o}=t,n=t.document;return rr(n)?(xr(t,"document",n),n=t.document={}):n||(n=t.document={}),ht(n,{theme:r.document,fontFamily:_o(e),fontSize:o.base,lineHeight:o.lineHeight})};R();var Bg={document:tt},Pn=(t,e)=>{let r=C();if(!t){r.verbose&&console.warn("setSVG: val is not defined",e);return}return r.useSvgSprite?la(e,t):t},Ca=(t,e=Bg)=>{let r=C(),o=Object.keys(t).length?{}:r.svg;for(let n in t)o[n]=t[n];Wx(o,e)},Eo=(t,e)=>{let r=C();return r.useIconSprite&&!r.semanticIcons?.[e]?Pn(t,e):t},Ao=(t,e=Bg)=>{let r=C(),o=Object.keys(t).length?{}:r.icons;for(let n in t)o[n]=t[n];Wx(o,e)},jg=(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},rT=(t,e)=>{let r=typeof DOMParser<"u"?DOMParser:null;if(r){let o=`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,s=new r().parseFromString(o,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},Hx=(t,e,r)=>{for(;e.firstChild;){let o=e.firstChild;r.appendChild(t.importNode(o,!0)),o.remove()}},Wx=(t,e=Bg)=>{let r=C(),o=e.document||tt;if(!o||!o.documentElement)return r.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),Tn(t);let n=o.querySelector("#svgSprite"),s=Tn(t),i=`<svg aria-hidden="true" width="0" height="0" style="position:absolute" id="svgSprite">${s}</svg>`,a=rT(o,s);if(n)if(a)Hx(o,a,n);else if(o.body.insertAdjacentHTML)n.insertAdjacentHTML("beforeend",s);else{let c=jg(o,{isRoot:!1});c.innerHTML=s,n.append(...c.children)}else if(a){let c=jg(o);c&&c.nodeType&&(Hx(o,a,c),o.body.prepend(c))}else if(o.body.insertAdjacentHTML)o.body.insertAdjacentHTML("afterbegin",i);else{let c=jg(o);c&&c.nodeType&&(c.innerHTML=s,o.body.prepend(c))}};R();var Ea=(t={})=>{let e=C(),r=e.typography||{},o=e.document||{},n=S(e.reset)?e.reset:e.reset={};if(n[":root"]){let c=n,l=r.templates||{};c.body={...e.useDocumentTheme?_e("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?_e("document"):{};if(n.html&&qt(n.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)&&(n[c]||(n[c]={}),n[c].html||(n[c].html={}),n[c].html.fontSize===void 0&&(n[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,h=f.browserDefault||r.browserDefault,g=l.slice(1),p=c[g];if(!p)continue;let m="@media "+(p==="print"?p:"screen and "+p);n[m]||(n[m]={}),n[m].html||(n[m].html={}),n[m].html.fontSize=d/h+u}}return st(ht(n,t),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",...a,fontSize:r.unit?r.base/r.browserDefault+r.unit:r.browserDefault+"px",fontFamily:o.fontFamily,lineHeight:o.lineHeight},body:{boxSizing:"border-box",height:"100%",margin:0,fontFamily:o.fontFamily,fontSize:r.unit?"1"+e.unit.default:r.base/r.browserDefault+e.unit.default,...i,...s},a:{color:"currentColor"},button:{color:"inherit",font:"inherit",background:"transparent",border:"none",cursor:"pointer",appearance:"none",WebkitAppearance:"none"},"input, select, textarea":{color:"inherit",font:"inherit"},fieldset:{border:0,padding:0,margin:0}},ne)};R();var oT=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),nT=/^-?[A-Z][0-9]?$/,Ye=t=>se(t),uf=t=>{if(w(t))return re.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(gt(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=rt(e);return Te(r)?r:e}).join(" ")},df=(t,e)=>pa(t,e),Aa=(t,e)=>{if(w(t))return re.test(t)?t:ar(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(gt(o))return`var(${o})`;if(o==="inset"||o==="none")return o;let n=rt(o);if(Te(n)){let i=Rt(o,e);return S(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(o)||o==="0"||o.includes("px")||o.slice(-2)==="em")return o;let s=wt(o,"shadow");return s&&s.shadow?s.shadow:o}).join(" "):"")).join(", ")},Ta=(t,e)=>{let r=t.indexOf("(");if(r===-1)return t;let o=t.slice(0,r+1),n=t.slice(r+1,t.lastIndexOf(")")),s=")",a=ar(n).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||oT.has(f)||f==="transparent"||re.test(f))return f;let u=rt(f);return Te(u)?u:f}).join(" ")));return o+a.join(", ")+s},pf=(t,e)=>{if(!w(t))return;let r=C();return ar(t).map(o=>{let n=o.trim();if(gt(n))return`var(${n})`;if(/^var\(/.test(n)||n.includes("url"))return n;if(r.gradient?.[n]){let s=Rt(n,e);if(w(s))return s;if(S(s)){for(let i in s)if(w(s[i]))return s[i]}return n}return n.includes("gradient")?Ta(n,e):n.includes("/")||n.startsWith("http")||n.includes(".")&&!Lt(n)?`url(${n})`:n}).join(", ")},hf=t=>w(t)&&t.split(" ").map(e=>wt(e,"gap").gap).join(" "),gf=t=>{if(!w(t))return t;let e=C();return Ki(t).map(r=>nT.test(r)?So(r,e.spacing):r).join(" ")},Ug=t=>{if(!w(t))return;let e=t.split(" ");return e.length?e.map(r=>gt(r)?`var(${r})`:r.length<3||r.includes("ms")?ie(r).timing||r:xe(r)?xe(r):r).join(" "):t},Oa=(t,e,r)=>{if(w(t))return t.split(",").map(o=>ie(o).timing||o).join(",")},mf=t=>{if(!w(t))return;let e=t.split(",");if(e.length)return e.map(Ug).join(",")};function bt(t,e,r={},o={}){let n=ft.call(this,e||r[t]);if(n==null)return;let s;if(w(n)){if(/^(?:env|var)\(/.test(n.trim()))return{[t]:n};if(n.includes("(")){let c=lr(n);s=c[0],n=c[1]}let i=r.scaleBoxSize,a=fa(t);!i&&a&&!o.ratio&&(n=da(n))}return o.ratio?Oe(r,t,n,s):wt(n,t,void 0,s)}var L=(t,e=null,r)=>bt(t,e,r,{ratio:!0}),ur=(t,e,r,o="borderRadius")=>{if(w(t))return{[o]:t.split(" ").map(n=>{let s=Sa(n);return s!==void 0?s:Oe(e,r,n)[r]}).join(" ")}};R();var Dn="__smblsThemeRootOwner",$n=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)},qx=(t,e,r)=>{if(!(!t||!e)){$n(t),t.__prefersListener=r,t.__prefersMq=e;try{e.addEventListener("change",r)}catch{e.addListener(r)}}},sT=(t,e)=>{let r=C(),{cssVars:o}=r,n=e.startsWith("--")?e:`--${e}`;return o[n]=t,t},Yt=t=>t,yf={color:Dr,gradient:On,font:ba,fontFamily:Rn,fontfamily:Rn,theme:ma,icons:Eo,semanticIcons:Yt,semanticicons:Yt,svg:Pn,svgData:Yt,typography:Yt,shadow:Lr,spacing:Yt,media:Yt,grid:Yt,class:Yt,timing:Yt,reset:Yt,unit:Yt,animation:Yt,vars:sT,sizes:Yt,shape:Yt},iT=(t,e,r,o)=>{xr(t,r,e);let n={};for(let s of o)t[s]===e&&(t[s]=n);return t.verbose&&console.warn("[scratch] design-system family",r,"resolved to a host object; parked it and allocated a plain bucket"),n},Vg=(t,e,r)=>{let o=C(),n=ea(t),s=n.toLowerCase(),i=o[n]||o[s]||o[t],a=rr(i)?iT(o,i,s,[n,s,t]):i,c=yf[n]||yf[s];if(c)try{let l=c(e,r);return a&&(a[r]=l),a}catch(l){o.verbose&&console.warn("Error setting",s,"value",e,r,l)}if(!c){let l=a||(o[s]={});return l[r]=e,l}o.verbose&&console.warn("Can not find",s,"method in scratch")},zg=(t,e)=>{let r=C(),o=t.toLowerCase();return rr(e)?(xr(r,o,e),r.verbose&&console.warn("[scratch] ignoring host object passed as the",o,"design-system family"),r[o]||r[t]):e==null?(r.verbose&&console.warn("[scratch] skipping empty design-system family",o),r[o]||r[t]):(Object.keys(e).sort((s,i)=>{let a=S(e[s])||T(e[s])?1:0,c=S(e[i])||T(e[i])?1:0;return a-c}).forEach(s=>{try{return Vg(o,e[s],s)}catch(i){r.verbose&&console.warn("Error setting",o,"value",e[s],s,i)}}),r[o]||r[t])},bf=(t,e)=>{let r=e||C();r.globalTheme=t;let n=Ko(r)||(typeof document<"u"?document:null),s=n&&n.defaultView||(typeof window<"u"?window:null);if(n){let a=r.themeRoot||n.documentElement,c=t&&t!=="auto";if(a[Dn]=r,c)$n(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",qx(r,f,l)}else $n(r),a.setAttribute("data-theme","light"),r.resolvedTheme="light",a.style.colorScheme="light"}let i=r.varPrefix?`--${r.varPrefix}-theme-`:"--theme-";for(let a in r.cssVars)a.startsWith(i)&&delete r.cssVars[a];for(let a in r.cssMediaVars)delete r.cssMediaVars[a];if(n&&r.cssVars){let a=r.scopeSelector||":root",c=n.styleSheets;for(let l=0;l<c.length;l++)try{let f=c[l].cssRules;for(let u=0;u<f.length;u++)if(f[u].selectorText===a){for(let d in r.cssVars)f[u].style.setProperty(d,r.cssVars[d]);return r}}catch{}}return r},aT={},To=(t,e=aT)=>{let r=e.config||C(),{version:o,verbose:n,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:c,useIconSprite:l,globalTheme:f,themeRoot:u,useDocumentTheme:d,useDefaultConfig:h,semanticIcons:g,hoverMedia:p,files:m,assets:b,..._}=t;e.newConfig&&(r=tf(e.newConfig)),er(_.document)&&(r.__domDocument=_.document,delete _.document),er(r.document)&&(r.__domDocument||(r.__domDocument=r.document),r.document={}),m!==void 0&&(r.files=m),b!==void 0&&(r.assets=b),n!==void 0&&(r.verbose=n),s!==void 0&&(r.useVariable=s),i!==void 0&&(r.useReset=i),c!==void 0&&(r.useFontImport=c),a!==void 0&&(r.useSvgSprite=a),l!==void 0&&(r.useIconSprite=l),d!==void 0&&(r.useDocumentTheme=d),f!==void 0&&(r.globalTheme=f),u!==void 0&&(r.themeRoot=u),t.useThemeSuffixedVars!==void 0&&(r.useThemeSuffixedVars=t.useThemeSuffixedVars),h!==void 0&&(r.useDefaultConfig=h),g!==void 0&&(r.semanticIcons=g),p!==void 0&&(r.hoverMedia=p),r.verbose&&console.log(r);let x=Ko(r)||(typeof document<"u"?document:null),k=x&&x.defaultView||(typeof window<"u"?window:null),E=x&&(r.themeRoot||x.documentElement);if(E&&typeof E.setAttribute=="function")if(r.globalTheme&&r.globalTheme!=="auto")$n(r),E.setAttribute("data-theme",r.globalTheme),r.resolvedTheme=r.globalTheme,E[Dn]=r,r.globalTheme==="dark"||r.globalTheme==="light"?E.style.colorScheme=r.globalTheme:E.style.colorScheme="light dark";else if(E[Dn]&&E[Dn]!==r&&E.hasAttribute("data-theme"))$n(r),r.resolvedTheme=E.getAttribute("data-theme");else if(k&&k.matchMedia){let W=F=>{let Y=F.matches?"dark":"light";E.setAttribute("data-theme",Y),r.resolvedTheme=Y},Pt=k.matchMedia("(prefers-color-scheme: dark)");W(Pt),E.style.colorScheme="light dark",E[Dn]=r,qx(r,Pt,W)}else $n(r),E.setAttribute("data-theme","light"),r.resolvedTheme="light",E.style.colorScheme="light",E[Dn]=r;r.__svgCache||(r.__svgCache={}),An(_);let O=Object.keys(_).filter(D=>!D.startsWith("__")),$=new Set(O);if(O.forEach(D=>{let W=D.toLowerCase();W!==D&&$.has(W)&&st(_[W],_[D],ne)}),O.map(D=>{let W=D.toLowerCase();if(!(W!==D&&$.has(W)))return zg(D,_[D])}),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{xa()}catch(D){r.verbose&&console.warn("Error applying typography sequence",D)}if(_.spacing)try{ua()}catch(D){r.verbose&&console.warn("Error applying spacing sequence",D)}if(_.timing)try{ka()}catch(D){r.verbose&&console.warn("Error applying timing sequence",D)}va();let I=Ea();return I&&(r.reset=I),r};var Oo=new Map,ow=null,qg=null,cT=null;function Ra(t){t.batchAtomicCss&&(qg=t.batchAtomicCss),t.compoundCssClass&&(cT=t.compoundCssClass)}var lT=new Set,Gx=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function Gg(t){try{let e=C();e&&(e.__domDocument=t)}catch{}t&&lT.add(t)}function Pa(){try{let t=C();if(t){if(Gx(t.__domDocument))return t.__domDocument;if(Gx(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var Xt={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};function kf(){return{...Xt}}function Yg(){for(let t in Xt)Xt[t]=0;wf=!1}var wf=!1,xf=(t,e)=>`${t} ${e}${t===1?"":"s"}`;function fT(t){let e=Date.parse(t);if(!isFinite(e))return"";let r=Math.floor((Date.now()-e)/864e5);return r<1?" (today)":` (${xf(r,"day")} ago)`}function uT(){try{let t=wT();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 dT(t,e){if(wf)return!1;wf=!0;let r="n/a \u2014 running from src/ (unbuilt), so no dist is in play",o="this IS the source",n="@symbo.ls/css";return console.error(`[@symbo.ls/css] CSS EMIT FAILURE (${t}) \u2014 the engine emitted ${xf(Xt.variable,"variable rule")} and ${xf(Xt.atomic,"atomic rule")}, while the design system held ${xf(e,"CSS variable")}.
34
+ font-family: '${e}';
35
+ font-style: ${n.fontStyle||"normal"};${r?`
36
+ font-weight: ${r};`:""}${n.fontStretch?`
37
+ font-stretch: ${n.fontStretch};`:""}${n.fontDisplay?`
38
+ font-display: ${n.fontDisplay};`:""}${n.unicodeRange?`
39
+ unicode-range: ${n.unicodeRange};`:""}
40
+ src: ${i};`},Ir=(e,t,r,n)=>`@font-face {${ta(e,t,r,n)}
41
+ }`,kn=(e,t,r)=>Object.keys(t).map(o=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f}=t[o],u=Array.isArray(s)?s.map(d=>bt(d,r)||d):bt(s,r)||s;return ta(e,u,i,{fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f})}),dg=e=>Object.keys(e).map(r=>kn(r,e[r].value)),Zl=(e,t,r)=>{if(t&&t.isVariable){let s=bt(t.url,r)||t.url;return Co(s)?Eo(s):Ir(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap",unicodeRange:t.unicodeRange})}if(t[0])return kn(e,t,r).map(Xl);let o=Array.isArray(t.url)?t.url.map(s=>bt(s,r)||s):bt(t.url,r)||t.url;return Ir(e,o,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch,unicodeRange:t.unicodeRange})},ra=(e,t)=>Object.keys(e).map(n=>Zl(n,e[n].value,t));P();P();P();P();var Ao={};I(Ao,{animation:()=>Og,breakpoints:()=>Ag,class:()=>$g,color:()=>xg,devices:()=>Tg,document:()=>Ix,font:()=>hg,fontFace:()=>yg,fontFamily:()=>gg,fontFamilyTypes:()=>mg,gradient:()=>wg,grid:()=>Ig,icons:()=>vg,media:()=>bg,reset:()=>$x,semanticIcons:()=>Cg,sequence:()=>lr,shadow:()=>kg,shape:()=>Fg,sizes:()=>Mg,spacing:()=>_g,svg:()=>Rg,svgData:()=>Pg,templates:()=>Dg,theme:()=>Sg,timing:()=>Eg,typography:()=>na,unit:()=>pg,vars:()=>Lg});var lr={"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 pg={default:"em"};var VA={browserDefault:16,base:16,type:"font-size",ratio:lr["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},na=VA;var hg={};var gg={},mg={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},yg={};var bg={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var zA={base:na.base,type:"spacing",ratio:lr.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},_g=zA;var xg={},wg={};var Sg={};var kg={};var vg={},Cg={};var HA={default:150,base:150,type:"timing",ratio:lr["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},Eg=HA;var Ix={};var Ag={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},Tg={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 Og={};var Rg={},Pg={};var Dg={};var WA={},Ig=WA;var $g={};var $x={},Lg={},Mg={},Fg={};var tf={},rf={},ot=new Set,Jl=Ao,Ql={},sa=e=>e.replace(/_([a-z])/g,(t,r)=>r.toUpperCase());for(let e in Jl){let t=e.toLowerCase();Ql[t]=Jl[e];let r=sa(t);r!==t&&(Ql[r]=Jl[e]),t!==e&&(Ql[e]=Jl[e])}var vn={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:tf,cssMediaVars:rf,CSS_VARS:tf,CSS_MEDIA_VARS:rf,_scratchConfig:!0,...Ql},To=(e,t)=>{if(!e)return null;if(e.__globalThemeSignal)return ke(t)&&e.__globalThemeSignal.set(t),e.__globalThemeSignal;let r=ke(t)?t:e.globalTheme,n=Ls(ke(r)?r:"auto");return Object.defineProperty(e,"globalTheme",{get(){return n.get()},set(o){n.set(o)},enumerable:!0,configurable:!0}),Object.defineProperty(e,"__globalThemeSignal",{value:n,enumerable:!1,configurable:!0,writable:!0}),n},Lx=e=>e?To(e):null,Oo=(e,t)=>{if(!e)return null;if(e.__resolvedThemeSignal)return ke(t)&&e.__resolvedThemeSignal.set(t),e.__resolvedThemeSignal;let r=ke(t)?t:e.resolvedTheme,n=Ls(ke(r)?r:null);return Object.defineProperty(e,"resolvedTheme",{get(){return n.get()},set(o){n.set(o)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"__resolvedThemeSignal",{value:n,enumerable:!1,configurable:!0,writable:!0}),n},Mx=e=>e?Oo(e):null;To(vn);Oo(vn);var ef=le(vn),nt={active:"0",0:vn},Fx=e=>(ke(e)&&(nt.active=e),nt[e||nt.active]),oa=[],oe=e=>{e&&e._scratchConfig&&oa.push(e)},te=()=>{oa.pop()},E=e=>oa.length?oa[oa.length-1]:nt[e||nt.active]||vn,nf=e=>{if(k(e))return nt.active="1",nt[1]=ne(e,le(ef),ot),Ro(nt[1]),To(nt[1]),Oo(nt[1]),e},qA=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],KA=["useVariable","globalTheme","verbose"],GA=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],Ro=e=>{for(let t of GA){let r;for(let n of t){let o=e[n];k(o)&&(r=r?ne(r,o,ot):o)}if(r)for(let n of t)k(e[n])&&(e[n]=r)}},ia=(e,t,{cleanBase:r=!1}={})=>{let n=r?null:E(),o=le(!r&&n&&n._scratchConfig?n:ef);for(let i of qA)delete o[i];for(let i of KA)Object.prototype.hasOwnProperty.call(ef,i)?o[i]=ef[i]:delete o[i];let s=ne(t||{},o,ot);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s._scratchConfig=!0,Ro(s),To(s),Oo(s),e&&(nt[e]=s),s};var Yt={"-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"},Ng=(e,t)=>{let{key:r,variable:n,value:o,scaling:s,index:i,scalingVariable:a}=e;t.sequence[r]={key:r,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:a,variable:n},t.scales[r]=s;let c=Nx.has(t.unit)?"rem":t.unit;t.vars[n]=s+c},fr=e=>{if(!e.includes("("))return e;let t=e.split("(")[0],r=e.slice(e.indexOf("(")+1,e.lastIndexOf(")"));return[t,r]},Nx=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),aa=(e,t)=>{let{base:r,type:n,unit:o}=t,s=Nx.has(o)?"rem":o,i=(an(s)?1:r)+s;if(e===0)return i;let c="--"+(t.varPrefix?t.varPrefix+"-":"")+(n&&n.replace(".","-")),l=`${c}-ratio`;if(e>0){let f=Yt[e-1];return`calc(var(${c}-${f}) * var(${l}))`}if(e<0){let f=Yt[e+1],u=Math.abs(e),d=Math.pow(jx,2*u),p=Yt[u];return p?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${p}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},of=(e,t,r,n)=>{let{type:o}=n,i=e===2&&t.length===2?e+1:e,l=`${"--"+(n.varPrefix?n.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${l+i}))`},ca=(e,t)=>{let n=(e*t-e)/1.618,o=e*t-n,s=e+n,i=(o+s)/2;return[o,i,s]},la=(e,t)=>ca(e,t).map(r=>r/e),fa=(e,t)=>{let{key:r,base:n,value:o,ratio:s,variable:i,index:a}=e,l=~~(o*s)-~~o,f,[u,d,p]=ca(o,s);l>16?f=[u,d,p]:f=[u,p],f.forEach((g,h)=>{let m=~~(g/n*1e3)/1e3,_=i+(h+1),b=a+(h+1)/10,y=of(h+1,f,i,t),x={key:r+(h+1),variable:_,value:g,scaling:m,scalingVariable:y,index:b};Ng(x,t)})},jx=1.618,YA=(e,t,r)=>{if(e>=0)return t*Math.pow(r,e);let n=Math.abs(e),o=t*Math.pow(r,e),s=t*Math.pow(r,n)/Math.pow(jx,2*n);return Math.max(o,s)},Ye=e=>{let{type:t,base:r,ratio:n,range:o,subSequence:s}=e,i=Math.abs(o[0])+Math.abs(o[1]),c="--"+(e.varPrefix?e.varPrefix+"-":"")+(t&&t.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=o[1]-l,u=Yt[f],d=YA(f,r,n),p=~~(d/r*100)/100,g=c+u,h=aa(f,e),m={key:u,variable:g,value:d,base:r,scaling:p,scalingVariable:h,ratio:n,index:f};Ng(m,e),s&&fa(m,e)}return e},jg=(e,t=0)=>{let{type:r,base:n,ratio:o,subSequence:s}=e,i=w(t)?t:Yt[t],a=w(t)?Object.entries(Yt).find(([,m])=>m===t)?.[0]:t;if(!i)return console.warn(`Position ${t} is out of range in numToLetterMap`),null;let c={sequence:{},scales:{},vars:{},...e},l=n*Math.pow(o,a),f=~~(l/n*100)/100,p="--"+(e.varPrefix?e.varPrefix+"-":"")+(r&&r.replace(".","-"))+"-"+i,g=aa(a,e),h={key:i,variable:p,value:l,base:n,scaling:f,scalingVariable:g,ratio:o,index:a};return Ng(h,c),s&&fa(h,c),c},Cn=(e="A",t)=>{let r=E(),{unit:n}=r;if(w(e)&&he(e))return`var(${e})`;if(w(e)&&/^(?:env|var|calc|min|max|clamp)\(/.test(e.trim()))return e;if(w(e)){let y=r.sizes;if(y){let x=y[e]||y[e.toLowerCase()];if(x!==void 0)return e.slice(0,1)==="-"?`calc(${x} * -1)`:x}}let{sequence:o,unit:s=n.default,useVariable:i}=t,a=/^-?[a-zA-Z]/i,c=a.test(e);if(Ms(e)||!c||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(e))return e;let d=`--${t.varPrefix?t.varPrefix+"-":""}${Gi(t.type.replace(".","-"))}-`,p=e.toUpperCase(),g=p.slice(0,1)==="-"?"-":"",h=g?p.slice(1):p,m="";h.includes("_")&&(m="_"+h.split("_")[1].toLowerCase(),h=h.split("_")[0]);let _=y=>a.test(y)?`var(${d}${y}${m})`:y;if(h.includes("+")){let[y,x]=h.split("+"),S=`${_(y)} + ${_(x)}`;return g?`calc((${S}) * -1)`:`calc(${S})`}else if(h.includes("*")){let[y,x]=h.split("*"),S=`${_(y)} * ${_(x)}`;return g?`calc((${S}) * -1)`:`calc(${S})`}else if(h.includes("-")){let[y,x]=h.split("-"),S=`${_(y)} - ${_(x)}`;return g?`calc((${S}) * -1)`:`calc(${S})`}if(!o[h]&&h.length===2&&(r.verbose&&console.warn(h,"- value is not found because `subSequence` is set to false"),h=h.slice(0,1)),i||r.useVariable){let y=`var(${d}${h}${m})`;return g?`calc(${y} * -1)`:y}let b=o?o[h]:null;if(!b){if(console.warn("can't find",o,h),Oe())throw new Error(`[smbls] Unresolvable design-system token "${e}"`+(t.type?` for sequence "${t.type}"`:"")+" \u2014 not a registered `sizes` name and not a valid spacing/typography/timing sequence letter. The CSS property using it would silently be dropped in production. Register the token in `designSystem/sizes.js` (or the relevant sequence family) or fix the typo.");return}return s==="ms"||s==="s"?g+b.val+s:g+b.scaling+s},sf=(e,t)=>{if(!["+","-","*","/",","].filter(s=>e.includes(s+" ")).length)return e;let n=/(\s+-\s+|\s*[+*/,]\s*)/;return e.split(n).map(s=>{let i=s.trim();return!i||["+","-","*","/",","].includes(i)?s:Cn(i,t)}).join("")},Xt=(e,t,r,n)=>{if(typeof e!="string")return E().verbose&&console.warn(t,e,"is not a string"),{[t]:e};if(e==="-"||e==="")return{};if(!n&&e.includes("(")){if(/^(?:env|var)\(/.test(e.trim()))return{[t]:e};let s=fr(e);n=s[0],e=s[1]}return["+","-","*","/",","].filter(s=>e.includes(s+" ")).length?e=sf(e,r):e=Cn(e,r),{[t]:n?`${n}(${e})`:e}},af=(e,t)=>Yt[e-t],ua=e=>{let{h1Matches:t,sequence:r}=e;return new Array(6).fill(null).map((n,o)=>{let s=af(t,o);return r[s]})};P();var Bg=(e,t)=>{let r=E(),{cssVars:n}=r;N(e.value)||(n[e.var]=e.value)},da=(e,t,r)=>{let n=E(),{unit:o}=n,s=t.unit||o.default,{base:i,ratio:a,type:c}=t,f="--"+(t.varPrefix?t.varPrefix+"-":"")+(c&&c.replace(".","-"));e[`${f}-base`]=i,e[`${f}-unit`]=s;let u=`${f}-ratio`;e[u]=a;let[d,p,g]=la(i,a);e[`${f}-sub-ratio-1`]=`calc(var(${f}-ratio) * ${d/a})`,e[`${f}-sub-ratio-2`]=`calc(var(${f}-ratio) * ${p/a})`,e[`${f}-sub-ratio-3`]=`calc(var(${f}-ratio) * ${g/a})`},Bx=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),ur=(e,t={})=>{let r=E(),{unit:n,timing:o,cssVars:s}=r,i=e.unit||n.default,a=Bx.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=e;c||da(s,e,t);for(let u in l){let d=l[u],p=(e.type===o.type?l[u].val:f[u])+a;if(!c){s[d.variable+"_default"]=p,s[d.variable]=d.scalingVariable;continue}t.useDefault===!1?s[d.variable]=p:(s[d.variable+"_default"]=p,s[d.variable]=`var(${d.variable+"_default"})`)}},$r=(e,t,r={})=>{let n=E(),{unit:o,media:s,cssVars:i}=n,a=t.slice(1),c=e[t],l=c.unit||e.unit||o.default,f=Bx.has(l)?"rem":l,{mediaRegenerate:u}=e,{sequence:d,scales:p}=c,g=s[a];if(!g&&n.verbose&&console.warn("Can't find media query ",g),!u){let h=i[`@media ${g}`];h||(h=i[`@media ${g}`]={}),da(h,c,r);let m=e.unit||o.default;if(f!==m&&d)for(let _ in d){let b=d[_],y=p[_]+f;h[b.variable+"_default"]=y,h[b.variable]=y}return}for(let h in d){let m=d[h],_=(an(f)?p[h]:d[h].val)+f;!g&&n.verbose&&console.warn("Can't find query ",g);let b=i[`@media ${g}`];b||(b=i[`@media ${g}`]={}),b[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=_}};P();var Vx=pn(),Po=e=>{let t=E(),r="";for(let n in e)t.__svgCache[n]||(t.__svgCache[n]=!0,r+=e[n]);return r},XA=e=>{let t=e&&(e.default||e);if(!w(t))return Vx&&console.warn("parseRootAttributes:",t,"is not a string"),{};let r=t.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},{}):{}},ZA=(e,t)=>{let r=[];if(e.replace(/id="([^"]*)"/g,(o,s)=>(r.push(s),o)),!r.length)return e;let n=e;for(let o of r){let s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${t}-${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},Ux=new Set,pa=(e,t)=>{let r=t&&t.default?t.default:t;if(!w(r))return Vx&&!Ux.has(e)&&(Ux.add(e),console.warn("convertSvgToSymbol:",e,"is not a string")),"";t=r;let n=t.match(/^<symbol\b[^>]*\bid="([^"]*)"/);if(n){let u=n[1];return u===e?t:t.replace(`id="${u}"`,`id="${e}"`)}let o=XA(t),{width:s,height:i}=o,a=o.viewBox||`0 0 ${s||24} ${i||24}`,f=ZA(t,e).replace("<svg",`<symbol id="${e}" 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=eT(f),f},JA="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",QA=new RegExp(`<(${JA})\\b([^>]*?)\\s*/>`,"g"),eT=e=>e.replace(QA,"<$1$2></$1>");var No={};I(No,{STANDARD_SCHEME_QUERIES:()=>lf,appendSVGSprite:()=>Aa,appendSvgIconsSprite:()=>Rn,applyDocument:()=>Ea,applyHeadings:()=>df,applyReset:()=>Ta,applySpacingSequence:()=>ga,applyTimingSequence:()=>Ca,applyTypographySequence:()=>Sa,checkIfBoxSize:()=>ha,getColor:()=>se,getFontFamily:()=>wa,getFontSizeByKey:()=>ka,getMediaColor:()=>Pe,getMediaTheme:()=>xt,getSafeInk:()=>ff,getSafeInkInfo:()=>zg,getShadow:()=>ya,getShapeByKey:()=>va,getSpacingBasedOnRatio:()=>Ot,getSpacingByKey:()=>we,getTheme:()=>Kg,getTimingByKey:()=>it,getTimingFunction:()=>wt,quietColorProbe:()=>En,resolveBorderValue:()=>st,resolveColorRgb:()=>An,resolveShadowValue:()=>Tn,runThroughMedia:()=>uf,schemeGuardSelector:()=>Io,schemeMediaQuery:()=>Do,setAdaptiveSchemeVar:()=>Fr,setColor:()=>Mr,setFont:()=>xa,setFontFamily:()=>Mo,setGradient:()=>$o,setMediaTheme:()=>Lo,setSVG:()=>Fo,setShadow:()=>Nr,setSvgIcon:()=>On,setTheme:()=>_a,splitSpacedValue:()=>ma});P();var lf={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},Do=(e,t)=>{let r=t.media&&t.media[e]||lf[e];return r?"@media "+(r==="print"?`${r}`:`screen and ${r}`):null},Io=e=>{let t=e.scopeSelector||":root";return`${t===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${t}:not([data-theme])`} &`},_t=new Set,tT=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"]),cf=new Set,zx=e=>{if(!e)return!1;let{color:t,gradient:r}=e;return!!(k(t)&&Object.keys(t).length||k(r)&&Object.keys(r).length)},Hx=new Set,Ug=0,En=e=>{Ug++;try{return e()}finally{Ug--}},rT=(e,t)=>{if(!w(e)||e.indexOf(" ")===-1)return null;let r=e.replace(/\s+/g,""),n=Me(r);if(!n||n.passthrough||n.cssVar)return null;let{color:o,gradient:s}=t;return!o[n.name]&&!s[n.name]?null:r},Vg=(e,t,r)=>{let n=rT(e,r);if(n){if(!Hx.has(e)){Hx.add(e);let i=r&&r.name?` (design system \`${r.name}\`)`:"";console.warn(`[scratch] color token \`${e}\` 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=Me(e);if(o&&o.name&&!o.passthrough&&!o.cssVar&&(o.alpha!==void 0||o.tone!==void 0)&&zx(r)&&!r.color[o.name]&&!r.gradient[o.name]){if(!Ug&&!cf.has(e)){cf.add(e);let i=r&&r.name?` (design system \`${r.name}\`)`:"";console.warn(`[scratch] color token \`${e}\` 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=w(t)?t.toLowerCase():"";if(!tT.has(s)||!zx(r))return e;if(!cf.has(s)){cf.add(s);let i=r&&r.name?` (design system \`${r.name}\`)`:"";console.warn(`[scratch] color \`${e}\` 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.`)}},se=(e,t,r)=>{let n=r||E();if(!w(e)){n.verbose&&console.warn(e,"- type for color is not valid");return}if(he(e))return`var(${e})`;t&&e[t]&&(e=e[t]);let o,s,i;if(O(e))[o,s,i]=e;else{let u=Me(e);if(!u){let{color:d,gradient:p}=n,g=p[e]||d[e];return g?(t&&g[t]&&(g=g[t]),n.useVariable?`var(${g.var})`:g.value):Vg(e,e,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 Vg(e,o,n);if(t)if(l[t]!==void 0)l=l[t];else if(O(l)){let u=t.charCodeAt(0)===64?t.slice(1):t;u==="dark"?l=l[1]!==void 0?l[1]:l[0]:(u!=="light"&&n.verbose&&console.warn(e," - array-form color tokens only support light/dark; falling back to the light slot for scheme",t),l=l[0])}else n.verbose&&console.warn(e," - does not have ",t);if(w(l)){if(_t.has(o))return l;_t.add(o);try{return se(l,null,r)}finally{_t.delete(o)}}let f=l.rgb;if(!f){let u=n.useVariable?`var(${l.var})`:l.value;if((s||i)&&u){let d=s!==void 0?s:1;if(!i)return`rgb(from ${u} r g b / ${d})`;if(i.charCodeAt(0)===43||i.charCodeAt(0)===45){let g=parseFloat(i),h=g<0?"-":"+",m=Math.abs(g);return`rgb(from ${u} calc(r ${h} ${m}) calc(g ${h} ${m}) calc(b ${h} ${m}) / ${d})`}return`hsl(from ${u} h s ${i}% / ${d})`}return u}return i&&!l[i]&&(f=Gt(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})`},Wx=e=>{let t=yt(e);return!t||t.length<3||t[0]===0&&t[1]===0&&t[2]===0&&t[3]===0&&e.toLowerCase()!=="transparent"?null:{rgb:[t[0],t[1],t[2]],alpha:t[3]!==void 0?t[3]:1}},nT=(e,t)=>{if(!t)return e;let r=e.rgb;if(t.tone){let o=Gt(r,t.tone);r=w(o)?o.split(",").map(s=>parseFloat(s.trim())):o}let n=t.alpha!==void 0?parseFloat(t.alpha):e.alpha;return{rgb:r,alpha:n}},An=(e,t,r)=>{let n=t||E();if(!w(e))return null;let o=Me(e);if(o){if(o.passthrough){let d=yt(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:e,{color:i,gradient:a}=n,c=i[s]||a[s];if(!c)return Wx(e);if(w(c)){let d;if(_t.has(s))d=Wx(c);else{_t.add(s);try{d=An(c,n,r)}finally{_t.delete(s)}}return d?nT(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=Gt(l,o.tone));let f=w(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}},Pe=(e,t,r)=>{let n=r||E();if(t||(t=n.globalTheme==="auto"?null:n.globalTheme),!w(e)){n.verbose&&console.warn(e,"- type for color is not valid");return}if(he(e))return`var(${e})`;let o,s,i;if(O(e))o=e[0];else{let u=Me(e);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=e}let{color:a,gradient:c}=n,l=a[o]||c[o],f=k(l);if(f&&l.value)return se(e,`@${t}`,r);if(f){if(n.useVariable&&l.var)return s||i?se(e,null,r):`var(${l.var})`;if(t)return se(e,`@${t}`,r);{let u={},d=Io(n);for(let p in l){if(p.charCodeAt(0)!==64)continue;let g=p.slice(1),h=se(e,p,r);if(h!==void 0&&(u[`[data-theme="${g}"] &`]=h,g==="light"||g==="dark")){let m=Do(g,n);if(!m)continue;u[m]={[d]:h}}}return u}}else return Vg(e,o,n)},Fr=(e,t,r,n)=>{let s=`--${n.varPrefix?n.varPrefix+"-":""}${t}-${r}`,i,a={};for(let c in e){if(c.charCodeAt(0)!==64)continue;let l=c.slice(1),f=e[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 e.var=s,s}},Mr=(e,t,r)=>{let n=E();if(k(e)&&e.value!==void 0&&(e.rgb!==void 0||e.var!==void 0))return n.useVariable&&e.var&&(n.cssVars[e.var]=e.value),e;if(w(e)&&he(e)){let h=e.slice(2);if(e=se(h),!(e.includes("rgb")||e.includes("var")||e.includes("#"))){let m=h.split(" "),_=n.color[m[0]];if(_&&!_.value&&!_.rgb&&(w(_)||O(_)||k(_))&&!_t.has(m[0])){_t.add(m[0]);try{n.color[m[0]]=Mr(_,m[0])}finally{_t.delete(m[0])}_=n.color[m[0]]}if(_&&_.value){let b=_.rgb,y=m[1]!==void 0?m[1]:"1",x=m[2];x&&(b=Gt(b,x)),e=`rgba(${b}, ${y})`}else{let b=m[2],y=m[1]!==void 0?m[1]:"1";if(b)try{let x=yt(m[0]);x&&x.length>=3?e=`rgba(${Gt(x.slice(0,3).join(", "),b)}, ${y})`:e=m[0]}catch{e=m[0]}else e=m[0]}}}if(O(e)&&(e={"@light":e[0],"@dark":e[1]!==void 0?e[1]:e[0]}),k(e)){let h={};for(let m in e)m!=="var"&&(h[m]=Mr(e[m],t,m.slice(0,1)==="@"?m.slice(1):m));return n.useVariable&&Fr(h,"color",t,n),h}let s=`--${n.varPrefix?n.varPrefix+"-":""}color-${t}`+(r?`-${r}`:""),i=e.value||e;if(w(i)&&!i.includes("(")&&!i.startsWith("#")){let h=Me(i);if(h&&h.name&&!h.passthrough&&!h.cssVar){let m=n.color[h.name];if(m&&!m.value&&!m.rgb&&(w(m)||O(m)||k(m))&&!_t.has(h.name)){_t.add(h.name);try{n.color[h.name]=Mr(m,h.name)}finally{_t.delete(h.name)}}let _=n.color[h.name];if(_&&_.rgb){let b=_.rgb;h.tone&&(b=Gt(b,h.tone));let y=h.alpha!==void 0?parseFloat(h.alpha):_.alpha!==void 0?_.alpha:1;i=`rgba(${b}, ${y})`}}}let a=yt(i),[c,l,f,u=1]=a,d=parseFloat(u.toFixed(2)),p=`${c}, ${l}, ${f}`,g=`rgba(${p}, ${d})`;return n.useVariable&&(n.cssVars[s]=g),{var:s,rgb:p,alpha:d,value:g}},$o=(e,t,r)=>{let n=E();if(k(e)&&e.value!==void 0&&e.var!==void 0)return n.useVariable&&(n.cssVars[e.var]=e.value),e;if(w(e)&&he(e)&&(e=se(e.slice(2))),O(e)&&(e={"@light":e[0],"@dark":e[1]!==void 0?e[1]:e[0]}),k(e)){let i={};for(let a in e)a!=="var"&&(i[a]=$o(e[a],t,a.slice(0,1)==="@"?a.slice(1):a));return n.useVariable&&Fr(i,"gradient",t,n),i}let s=`--${n.varPrefix?n.varPrefix+"-":""}gradient-${t}`+(r?`-${r}`:"");return n.useVariable&&(n.cssVars[s]=e.value||e),{var:s,value:e.value||e}};P();var ff=(e,t,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=w(t)?t:String(t),p=Me(e),g=p&&!p.passthrough&&!p.cssVar?p.name:null,h=(K,$)=>c?{value:K,...$}:K;if(g){let K=o.color[`${g}Safe`];if(K){let $=`${d}@${u}`,_e=K[$]!==void 0?K[$]:K[d];if(_e!==void 0){let ie=_e&&_e.rgb!==void 0?o.useVariable&&_e.var?`var(${_e.var})`:_e.value:se(_e,null,o);return h(ie,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=se(e,u?`@${u}`:null,o),_=An(e,o,u),b=An(t,o,u);if(!_||!b)return o.verbose&&console.warn("getSafeInk: could not resolve",e,t,"\u2014 returning hue unchanged"),h(m,{ratio:null,deviation:0,derived:!1,overridden:!1,unresolved:!0});let y=wn(b.rgb,b.alpha),x=wn(_.rgb,_.alpha,y),S=vo(x,y);if(S>=f-.02)return h(m,{ratio:S,deviation:0,derived:!1,overridden:!1});let[v,D,L]=Ji(_.rgb),[,T,R]=Qi([v,D,L]),V=_n(y)>.5,Ne=V?v:1-v,q=K=>{let $=V?v-K:v+K,_e=Math.max(0,Math.min(1,$));return{rgb:ea(_e,T,R),L:_e}},W=K=>{let{rgb:$}=q(K),_e=wn($.map(ie=>Math.round(ie)),_.alpha,y);return vo(_e,y)},re=0,B=Ne,X=W(B)>=f;if(X)for(let K=0;K<l;K++){let $=(re+B)/2;W($)>=f?B=$:re=$}else re=B;let{rgb:$e,L:z}=q(B),de=$e.map(K=>Math.round(K)),F=W(B),J=_.alpha<1?`rgba(${de.join(", ")}, ${_.alpha})`:`rgb(${de.join(", ")})`,be=Math.abs(z-v)*100;return h(J,{rgb:de,ratio:F,startRatio:S,deviation:be,derived:!0,overridden:!1,reachable:X})},zg=(e,t,r={},n)=>ff(e,t,{...r,meta:!0},n);P();P();var oT=e=>{let r=E().spacing||{},n=parseFloat(e.spacingRatio),o={...r,ratio:Number.isFinite(n)?n:r.ratio,sequence:{},scales:{}};return Ye(o),o},sT=e=>{for(let t in e){let r=e[t];if(!(t.slice(0,1)==="@"))continue;let{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=e;pe(r,{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),Ye(r),$r(e,t)}},ha=e=>{let t=e.toLowerCase(),r=t.includes("width")||t.includes("height"),n=t.includes("border")||t.includes("outline");return r&&!n},ga=()=>{let e=E(),{spacing:t}=e;Ye(t),ur(t),sT(t)},iT=e=>{let t=E(),{spacing:r}=t;return!e||!e.sequence?r:Object.keys(e.sequence).length>0?e:Ye(e)},we=(e,t="padding",r,n)=>{let o=iT(r);if(w(e)){if(!n&&/^(?:env|var)\(/.test(e.trim()))return{[t]:e};if(!n&&e.includes("(")){let i=fr(e);n=i[0],e=i[1]}}let s=n?[e]:bn(e);if(O(s)){if(s.length>1){let i="";t==="borderWidth"&&(t="border",i="Width");let a={2:["Block","Inline"],3:["BlockStart","Inline","BlockEnd"],4:["BlockStart","InlineEnd","BlockEnd","InlineStart"]},c=(l,f)=>Xt(s[f],t+l+i,o,n);return a[s.length].map((l,f)=>c(l,f))}return Xt(e,t,o,n)}},Ot=(e,t,r,n)=>{let o=E(),{spacing:s}=o,i=r||e[t];if(!n&&w(i)&&/^(?:env|var)\(/.test(i.trim()))return{[t]:i};if(!n&&w(i)&&i.includes("(")){let a=fr(i);n=a[0],i=a[1]}if(e.spacingRatio){let a=oT(e);return we(i,t,a,n)}return we(i,t,s,n)},ma=e=>{let t=r=>{let n=["+","-","*","/"].includes(r),o=Xn.some(i=>e.includes(i));return n||o?r:r.length<3&&/[A-Z]/.test(r)?r+"_default":r};return e.split(",").map(r=>r.trim()).map(t).join(",").split(" ").map(t).join(" ")};P();var Tn=(e,t,r)=>!w(e)||rt.test(e)?e:cr(e).map(n=>(n=n.trim(),n.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(o.startsWith("--"))return`var(${o})`;let s=En(()=>se(o,t));if(Tt(s))return s;if(/^\d/.test(o)||o==="0"||o.includes("px")||o.slice(-2)==="em"||o==="inset"||o==="none"||xn.has(o.toLowerCase()))return o;r&&r(o);let i=we(o,"shadow");return i&&i.shadow?i.shadow:o}).join(" "))).join(", "),Nr=(e,t,r,n)=>{let o=E();if(O(e)){let a={"@light":Nr(e[0],t,"light"),"@dark":Nr(e[1],t,"dark")};return o.useVariable&&Fr(a,"shadow",t,o),a}if(k(e)){let a={};for(let c in e)a[c]=Nr(e[c],t,c.startsWith("@")?c.slice(1):c);return o.useVariable&&Fr(a,"shadow",t,o),a}w(e)&&!rt.test(e)&&(e=Tn(e));let i=`--${o.varPrefix?o.varPrefix+"-":""}shadow-${t}`+(r?`-${r}`:"");return o.useVariable&&(o.cssVars[i]=e),{var:i,value:e}},ya=(e,t)=>{let r=E();if(t||(t=r.globalTheme==="auto"?null:r.globalTheme),!w(e)){r.verbose&&console.warn(e,"- type for color is not valid");return}if(he(e))return`var(${e})`;let[n]=O(e)?e:e.split(" "),s=r.shadow[n],i=k(s);if(!s)return r.verbose&&console.warn("Can't find color ",n),e;if(i&&!s.value&&r.useVariable&&s.var)return`var(${s.var})`;if(t){let a=s["@"+t]||s[t];if(a)return a.value!==void 0?a.value:a;r.verbose&&console.warn(e," - does not have ",t)}if(i&&s.value)return s.value;if(i){let a={};for(let c in s){if(c.charCodeAt(0)!==64)continue;let l=r.media[c.slice(1)];if(!l)continue;let f="@media "+(l==="print"?`${l}`:`screen and ${l}`),u=s[c],d=u&&(u.value!==void 0?u.value:u);d!==void 0&&(a[f]=d)}return a}return r.verbose&&console.warn("Can't find color",e),e};var aT=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),cT=e=>aT.has(e),st=(e,t,r)=>{if(e==null)return;let n=e+"";if(rt.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(he(s))return`var(${s})`;if(cT(s)||/^\d/.test(s)||s==="0")return s;let i=En(()=>se(s,t));if(Tt(i))return i;if(xn.has(s.toLowerCase()))return s;r&&r(s);let a=we(s,"border");return a&&a.border?a.border:s}).join(" ")};P();var Zx=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"]),qx=["color","Color","background","Background","fill","Fill","stroke","Stroke"],Jx=e=>{for(let t=0;t<qx.length;t++)if(e.includes(qx[t]))return!0;return!1},lT={boxShadow:Tn,textShadow:Tn,border:st,borderTop:st,borderRight:st,borderBottom:st,borderLeft:st,outline:st,columnRule:st},fT=e=>{if(!e)return!1;let t=Me(e);return!t||!t.name||t.passthrough||t.cssVar?!1:t.alpha!==void 0||t.tone!==void 0},Kx=new Set,uT=(e,t,r,n,o,s)=>{if(!Oe())return;let i=`${e}::${t}::${r||""}::${n}`;Kx.has(i)||(Kx.add(i),console.warn(`[smbls/scratch] theme param "${t}" on "${e}"`+(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=(e,t,r,n)=>{let o=lT[t];if(!o)return se(r,n);let s=null,i=o(r,n,a=>{!s&&fT(a)&&(s=a)});return s&&uT(e,t,n,r,i,s),i},Kg=(e,t)=>xt(e,t),dT=e=>k(e)&&N(e.value),pT=e=>{for(let t in e){let r=e[t];if(w(r)&&r.startsWith("var(--"))return!0}return!1},_a=(e,t)=>{let r=E();return dT(e)?!r.useVariable&&pT(e)?e:Lo(e.value,t):Lo(e,t)},Qx=(e,t)=>{let r=new Set;for(let n of t){let o=n.slice(0,1);if(!(o==="@"||o==="."||o===":")&&Jx(n))for(let s in e){if(r.has(s))continue;let i=e[s]?.[n];if(i===void 0)continue;let a=se(i,`@${s}`);a!==void 0&&w(a)&&/^[a-z][a-zA-Z]+$/.test(a)&&!Zx.has(a)&&r.add(s)}}return r},hT=new Set(["none","inherit","initial","unset","revert","revert-layer"]),gT=/^(?:#[0-9a-f]{3,8}$|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix)\()/i,mT=/gradient\(|url\(|image-set\(|var\(/i,Gx=e=>{if(!w(e))return!1;let t=e.trim();return mT.test(t)?!1:gT.test(t)?!0:Zx.has(t)&&!hT.has(t)},yT=e=>e.startsWith("[data-theme=")||e.startsWith("@media"),ba=(e,t)=>{for(let r in t){let n=t[r];k(n)?ba(e[r]||(e[r]={}),n):e[r]=n}return e},Yx=(e,t,r,n)=>{if(ba(e,{[`[data-theme="${t}"] &`]:r}),t!=="light"&&t!=="dark")return;let o=Do(t,n);o&&ba(e,{[o]:{[Io(n)]:r}})},ew=(e,t,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 e)if(e[l])for(let f of Object.keys(e[l]))i.add(f);let a=Qx(e,i),c={};for(let l of i){let f=l.slice(0,1);if(f==="@")continue;if(f==="."||f===":"){let _={};for(let x in e)N(e[x]?.[l])&&(_[x]=e[x][l]);let b=n&&N(n[l])?n[l]:void 0;if(!Object.keys(_).length&&!b)continue;let y=f==="."?l.slice(1):l.replace(/^:+/,"");c[l]=ew(_,`${t}-${y}`,r,b);continue}let u=n&&!N(n[l])?n[l]:void 0,d=new Set(Object.keys(e));u!==void 0&&(d.add("light"),d.add("dark"),s&&d.add(s));let p={},g;for(let _ of d){if(a.has(_))continue;let b=e[_]?.[l];if((b===void 0||N(b))&&(b=u),b===void 0)continue;let y=qg(t,l,b,`@${_}`);y!==void 0&&(p[_]=y,(s&&_===s||!s&&(_==="light"||g===void 0))&&(g=y))}let h={},m=Object.keys(p).filter(_=>p[_]!==g);if(m.length){let _=p.light!==void 0?p.light:g,b=p.dark!==void 0?p.dark:g;if(Jx(l)&&Gx(_)&&Gx(b)){h[l]=_===b?_:`light-dark(${_}, ${b})`;for(let y in p)y==="light"||y==="dark"||Yx(h,y,{[l]:p[y]},r)}else{g!==void 0&&(h[l]=g);for(let y of m)Yx(h,y,{[l]:p[y]},r)}}else{if(g===void 0)continue;h[l]=g}ba(c,h),c[`.${l}`]=h}return(c.background||c.color||c.backgroundColor)&&(c[".inversed"]={color:c.background||c.backgroundColor,background:c.color}),c},Hg=(e,t,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 e)if(e[l])for(let f of Object.keys(e[l]))a.add(f);let c=Qx(e,a);for(let l of a){let f=l.slice(0,1),u=Object.values(e).some(d=>N(d?.[l]));if(f==="."&&u){let d=l.slice(1),p={};for(let g in e)N(e[g]?.[l])&&(p[g]=e[g][l]);i[l]=Hg(p,`${t}-${d}`,r)}else if(f===":"&&u){let d=l.replace(/^:+/,""),p={};for(let g in e)N(e[g]?.[l])&&(p[g]=e[g][l]);i[l]=Hg(p,`${t}-${d}`,r)}else if(f!=="@"&&f!=="."&&f!==":"){let p=`--${r.varPrefix?r.varPrefix+"-":""}theme-${t}-${l}`,g=s&&s!=="auto"?String(s).replace(/^'|'$/g,""):null,h;for(let m in e){if(c.has(m))continue;let _=e[m]?.[l];if(_===void 0)continue;let b=qg(t,l,_,`@${m}`);if(b===void 0)continue;(g&&m===g||!g&&(m==="light"||h===void 0))&&(h=b);let y=`[data-theme="${m}"]`;if(o[y]||(o[y]={}),o[y][p]=b,m==="dark"||m==="light"){let x=`@media (prefers-color-scheme: ${m})`;o[x]||(o[x]={}),o[x][p]=b}}h!==void 0&&(n[p]=h),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},Lo=(e,t,r,n)=>{let o=E(),{cssVars:s}=o,i={value:e},a=!r&&!n,c;if(N(e)){if(a&&o.useVariable){let l={};for(let f in e)f.startsWith("@")&&N(e[f])&&(l[f.slice(1)]=e[f]);if(Object.keys(l).length){let f=Hg(l,t,o);Object.assign(i,f)}}else if(a){let l={},f={};for(let u in e)u.startsWith("@")?N(e[u])&&(l[u.slice(1)]=e[u]):f[u]=e[u];c=ew(l,t,o,f),Object.assign(i,c)}for(let l in e){let f=l.slice(0,1),u=e[l];if(f==="@"||f===":"||f==="."){let d=f==="@"&&l;i[l]=Lo(u,t,l,n||d)}else if(!a){let d=qg(t,l,u,n),p=[...new Set([n,r].filter(_=>_).map(_=>_.slice(1)))],g=p.length?"-"+p.join("-"):"",m=`--${o.varPrefix?o.varPrefix+"-":""}theme-${t}${g}-${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(e[l])&&(i[l]=c[l])}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(w(e)&&he(e)){let f=o.theme[e.slice(2)];return xt(f,n)}return i},Wg=(e,t)=>{let r={};for(let n in e){let o=n.slice(0,1);if(N(e[n]))if(t&&yT(n))r[n]=ba({},e[n]);else{if(o==="@")continue;o===":"?r[`&${n}`]=Wg(e[n],t):o==="."&&(r[`&${n}`]=Wg(e[n],t))}else r[n]=e[n]}return r},tw=(e,t)=>{let r=t.shift();return e[r]?tw(e[r],t):e},Xx=(e,t)=>O(t)?tw(e,t):w(t)&&e[t]?e[t]:e;var xt=(e,t)=>{let r=E();if(w(e)&&he(e)&&(e=xt(e.slice(2))),!e||!w(e)){r.verbose&&console.warn(`${e} - Theme is not a string`);return}let[n,...o]=O(e)?e:e.split(" "),s=r.theme[n];return s&&o.length?s=Xx(s,o):s&&t&&(s=Xx(s,t)),Wg(s,!r.useVariable)};P();P();var xa=(e,t)=>{let r=E(),n=`--font-${t}`;if(!e||O(e)&&!e[0])return;let o;if(e.isVariable){let s=bt(e.url,r.files)||e.url;Co(s)?o=Eo(s):o=Ir(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap",unicodeRange:e.unicodeRange})}else if(e[0])o=kn(t,e,r.files);else{let s=Array.isArray(e.url)?e.url.map(i=>bt(i,r.files)||i):bt(e.url,r.files)||e.url;o=Ir(t,s,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch,unicodeRange:e.unicodeRange})}return{var:n,value:e,fontFace:o}},wa=(e,t)=>{let r=E(),{fontFamily:n}=r;return Sn(t||n,e)},Mo=(e,t)=>{let r=E(),{fontFamily:n,fontFamilyTypes:o}=r,{value:s,type:i}=e;e.isDefault&&(!e.isSystemFallback||!n.default)&&(n.default=t),k(s)&&(s=bn(s));let a=`--font-family-${t}`,c=`${s.join(", ")}, ${o[i]}`;return{var:a,value:c,arr:s,type:i,isSystemFallback:!!e.isSystemFallback}};P();var uf=e=>{let t=E(),{typography:r,media:n}=t;for(let o in e){let s=o.slice(0,1)==="@",i=e[o];if(!s)continue;let{mediaRegenerate:a}=e,c=o.slice(1),{type:l,base:f,ratio:u,range:d,subSequence:p,h1Matches:g,unit:h}=e;pe(i,{type:l,base:f,ratio:u,range:d,subSequence:p,h1Matches:g,unit:h});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),_=i.unit||h,b=!i.unit&&m.has(h)?"rem":_,y=n[c],x="@media "+(y==="print"?`${y}`:`screen and ${y}`);if(r.templates[x]={fontSize:i.base/r.browserDefault+b},!a){pe(i,{sequence:{},scales:{},vars:{}}),Ye(i),$r(e,o);continue}pe(i,{sequence:{},scales:{},templates:{},vars:{}}),Ye(i),$r(e,o)}},df=e=>{let t=E();if(e.h1Matches){let r=e.unit,n=ua(e),{templates:o}=e;for(let s in n){let i=`h${parseInt(s)+1}`,a=o[i];o[i]={fontSize:t.useVariable?`var(${n[s]?.variable})`:`${n[s]?.scaling}${r}`,margin:a?a.margin:0,lineHeight:a?a.lineHeight:e.lineHeight,letterSpacing:a?a.letterSpacing:e.letterSpacing,fontWeight:a?a.fontWeight:900-s*100}}}},Sa=()=>{let e=E(),{typography:t}=e;Ye(t),df(t),ur(t),uf(t)},ka=e=>{let t=E(),{typography:r}=t;return Xt(e,"fontSize",r)};P();var va=e=>{if(!w(e))return;let r=E().shape;if(r)return r[e]!==void 0?r[e]:r[e.toLowerCase()]};P();var Ca=()=>{let e=E(),{timing:t}=e;Ye(t),ur(t)},wt=e=>{let t=E(),{timing:r}=t;return r[e]||r[Ki(e)]||e},it=(e,t="timing")=>{let r=E(),{timing:n}=r;return Xt(e,t,n)};P();var Ea=()=>{let e=E(),{fontFamily:t,theme:r,typography:n}=e,o=e.document;return nr(o)?(Sr(e,"document",o),o=e.document={}):o||(o=e.document={}),pe(o,{theme:r.document,fontFamily:Sn(t),fontSize:n.base,lineHeight:n.lineHeight})};P();var Yg={document:ee},Fo=(e,t)=>{let r=E();if(!e){r.verbose&&console.warn("setSVG: val is not defined",t);return}return r.useSvgSprite?pa(t,e):e},Aa=(e,t=Yg)=>{let r=E(),n=Object.keys(e).length?{}:r.svg;for(let o in e)n[o]=e[o];nw(n,t)},On=(e,t)=>{let r=E();return r.useIconSprite&&!r.semanticIcons?.[t]?Fo(e,t):e},Rn=(e,t=Yg)=>{let r=E(),n=Object.keys(e).length?{}:r.icons;for(let o in e)n[o]=e[o];nw(n,t)},Gg=(e,t={isRoot:!0})=>{if(!e||!e.createElementNS)return;let r=e.createElementNS("http://www.w3.org/2000/svg","svg");return t.isRoot&&(r.setAttribute("aria-hidden","true"),r.setAttribute("width","0"),r.setAttribute("height","0"),r.setAttribute("style","position:absolute"),r.setAttribute("id","svgSprite")),r},bT=(e,t)=>{let r=typeof DOMParser<"u"?DOMParser:null;if(r){let n=`<svg xmlns="http://www.w3.org/2000/svg">${t}</svg>`,s=new r().parseFromString(n,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},rw=(e,t,r)=>{for(;t.firstChild;){let n=t.firstChild;r.appendChild(e.importNode(n,!0)),n.remove()}},nw=(e,t=Yg)=>{let r=E(),n=t.document||ee;if(!n||!n.documentElement)return r.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),Po(e);let o=n.querySelector("#svgSprite"),s=Po(e),i=`<svg aria-hidden="true" width="0" height="0" style="position:absolute" id="svgSprite">${s}</svg>`,a=bT(n,s);if(o)if(a)rw(n,a,o);else if(n.body.insertAdjacentHTML)o.insertAdjacentHTML("beforeend",s);else{let c=Gg(n,{isRoot:!1});c.innerHTML=s,o.append(...c.children)}else if(a){let c=Gg(n);c&&c.nodeType&&(rw(n,a,c),n.body.prepend(c))}else if(n.body.insertAdjacentHTML)n.body.insertAdjacentHTML("afterbegin",i);else{let c=Gg(n);c&&c.nodeType&&(c.innerHTML=s,n.body.prepend(c))}};P();var Ta=(e={})=>{let t=E(),r=t.typography||{},n=t.document||{},o=k(t.reset)?t.reset:t.reset={};if(o[":root"]){let c=o,l=r.templates||{};c.body={...t.useDocumentTheme?xt("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=t.useDocumentTheme?xt("document"):{};if(o.html&&Ke(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=t.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,g=l.slice(1),h=c[g];if(!h)continue;let m="@media "+(h==="print"?h:"screen and "+h);o[m]||(o[m]={}),o[m].html||(o[m].html={}),o[m].html.fontSize=d/p+u}}return ne(pe(o,e),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",...a,fontSize:r.unit?r.base/r.browserDefault+r.unit:r.browserDefault+"px",fontFamily:n.fontFamily,lineHeight:n.lineHeight},body:{boxSizing:"border-box",height:"100%",margin:0,fontFamily:n.fontFamily,fontSize:r.unit?"1"+t.unit.default:r.base/r.browserDefault+t.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}},ot)};P();var _T=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),xT=/^-?[A-Z][0-9]?$/,Zt=e=>st(e),pf=e=>{if(w(e))return rt.test(e)?e:e.split(/\s+/).map(t=>{if(t=t.trim(),!t)return"";if(he(t))return`var(${t})`;if(/^\d/.test(t)||t.includes("px")||t==="0")return t;let r=se(t);return Tt(r)?r:t}).join(" ")},hf=(e,t)=>ya(e,t),Oa=(e,t)=>{if(w(e))return rt.test(e)?e:cr(e).map(r=>(r=r.trim(),r?r.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(he(n))return`var(${n})`;if(n==="inset"||n==="none")return n;let o=se(n);if(Tt(o)){let i=Pe(n,t);return k(i)?Object.values(i).filter(a=>a.includes(": "+t))[0]:i}if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em")return n;let s=we(n,"shadow");return s&&s.shadow?s.shadow:n}).join(" "):"")).join(", ")},Ra=(e,t)=>{let r=e.indexOf("(");if(r===-1)return e;let n=e.slice(0,r+1),o=e.slice(r+1,e.lastIndexOf(")")),s=")",a=cr(o).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||_T.has(f)||f==="transparent"||rt.test(f))return f;let u=se(f);return Tt(u)?u:f}).join(" ")));return n+a.join(", ")+s},gf=(e,t)=>{if(!w(e))return;let r=E();return cr(e).map(n=>{let o=n.trim();if(he(o))return`var(${o})`;if(/^var\(/.test(o)||o.includes("url"))return o;if(r.gradient?.[o]){let s=Pe(o,t);if(w(s))return s;if(k(s)){for(let i in s)if(w(s[i]))return s[i]}return o}return o.includes("gradient")?Ra(o,t):o.includes("/")||o.startsWith("http")||o.includes(".")&&!Me(o)?`url(${o})`:o}).join(", ")},mf=e=>w(e)&&e.split(" ").map(t=>we(t,"gap").gap).join(" "),yf=e=>{if(!w(e))return e;let t=E();return Zi(e).map(r=>xT.test(r)?Cn(r,t.spacing):r).join(" ")},Xg=e=>{if(!w(e))return;let t=e.split(" ");return t.length?t.map(r=>he(r)?`var(${r})`:r.length<3||r.includes("ms")?it(r).timing||r:wt(r)?wt(r):r).join(" "):e},Pa=(e,t,r)=>{if(w(e))return e.split(",").map(n=>it(n).timing||n).join(",")},bf=e=>{if(!w(e))return;let t=e.split(",");if(t.length)return t.map(Xg).join(",")};function me(e,t,r={},n={}){let o=fe.call(this,t||r[e]);if(o==null)return;let s;if(w(o)){if(/^(?:env|var)\(/.test(o.trim()))return{[e]:o};if(o.includes("(")){let c=fr(o);s=c[0],o=c[1]}let i=r.scaleBoxSize,a=ha(e);!i&&a&&!n.ratio&&(o=ma(o))}return n.ratio?Ot(r,e,o,s):we(o,e,void 0,s)}var M=(e,t=null,r)=>me(e,t,r,{ratio:!0}),dr=(e,t,r,n="borderRadius")=>{if(w(e))return{[n]:e.split(" ").map(o=>{let s=va(o);return s!==void 0?s:Ot(t,r,o)[r]}).join(" ")}};P();var jo="__smblsThemeRootOwner",Bo=e=>{let t=e&&e.__prefersListener,r=e&&e.__prefersMq;if(t&&r)try{typeof r.removeEventListener=="function"?r.removeEventListener("change",t):typeof r.removeListener=="function"&&r.removeListener(t)}catch{try{r.removeListener(t)}catch{}}e&&(e.__prefersListener=null,e.__prefersMq=null)},ow=(e,t,r)=>{if(!(!e||!t)){Bo(e),e.__prefersListener=r,e.__prefersMq=t;try{t.addEventListener("change",r)}catch{t.addListener(r)}}},wT=(e,t)=>{let r=E(),{cssVars:n}=r,o=t.startsWith("--")?t:`--${t}`;return n[o]=e,e},Xe=e=>e,_f={color:Mr,gradient:$o,font:xa,fontFamily:Mo,fontfamily:Mo,theme:_a,icons:On,semanticIcons:Xe,semanticicons:Xe,svg:Fo,svgData:Xe,typography:Xe,shadow:Nr,spacing:Xe,media:Xe,grid:Xe,class:Xe,timing:Xe,reset:Xe,unit:Xe,animation:Xe,vars:wT,sizes:Xe,shape:Xe},ST=(e,t,r,n)=>{Sr(e,r,t);let o={};for(let s of n)e[s]===t&&(e[s]=o);return e.verbose&&console.warn("[scratch] design-system family",r,"resolved to a host object; parked it and allocated a plain bucket"),o},Zg=(e,t,r)=>{let n=E(),o=sa(e),s=o.toLowerCase(),i=n[o]||n[s]||n[e],a=nr(i)?ST(n,i,s,[o,s,e]):i,c=_f[o]||_f[s];if(c)try{let l=c(t,r);return a&&(a[r]=l),a}catch(l){n.verbose&&console.warn("Error setting",s,"value",t,r,l)}if(!c){let l=a||(n[s]={});return l[r]=t,l}n.verbose&&console.warn("Can not find",s,"method in scratch")},Jg=(e,t)=>{let r=E(),n=e.toLowerCase();return nr(t)?(Sr(r,n,t),r.verbose&&console.warn("[scratch] ignoring host object passed as the",n,"design-system family"),r[n]||r[e]):t==null?(r.verbose&&console.warn("[scratch] skipping empty design-system family",n),r[n]||r[e]):(Object.keys(t).sort((s,i)=>{let a=k(t[s])||O(t[s])?1:0,c=k(t[i])||O(t[i])?1:0;return a-c}).forEach(s=>{try{return Zg(n,t[s],s)}catch(i){r.verbose&&console.warn("Error setting",n,"value",t[s],s,i)}}),r[n]||r[e])},xf=(e,t)=>{let r=t||E();r.globalTheme=e;let o=Yn(r)||(typeof document<"u"?document:null),s=o&&o.defaultView||(typeof window<"u"?window:null);if(o){let a=r.themeRoot||o.documentElement,c=e&&e!=="auto";if(a[jo]=r,c)Bo(r),a.setAttribute("data-theme",e),r.resolvedTheme=e,e==="dark"||e==="light"?a.style.colorScheme=e: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",ow(r,f,l)}else Bo(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},kT={},Pn=(e,t=kT)=>{let r=t.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:g,hoverMedia:h,files:m,assets:_,...b}=e;t.newConfig&&(r=nf(t.newConfig)),rr(b.document)&&(r.__domDocument=b.document,delete b.document),rr(r.document)&&(r.__domDocument||(r.__domDocument=r.document),r.document={}),m!==void 0&&(r.files=m),_!==void 0&&(r.assets=_),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),e.useThemeSuffixedVars!==void 0&&(r.useThemeSuffixedVars=e.useThemeSuffixedVars),p!==void 0&&(r.useDefaultConfig=p),g!==void 0&&(r.semanticIcons=g),h!==void 0&&(r.hoverMedia=h),r.verbose&&console.log(r);let x=Yn(r)||(typeof document<"u"?document:null),S=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")Bo(r),v.setAttribute("data-theme",r.globalTheme),r.resolvedTheme=r.globalTheme,v[jo]=r,r.globalTheme==="dark"||r.globalTheme==="light"?v.style.colorScheme=r.globalTheme:v.style.colorScheme="light dark";else if(v[jo]&&v[jo]!==r&&v.hasAttribute("data-theme"))Bo(r),r.resolvedTheme=v.getAttribute("data-theme");else if(S&&S.matchMedia){let V=q=>{let W=q.matches?"dark":"light";v.setAttribute("data-theme",W),r.resolvedTheme=W},Ne=S.matchMedia("(prefers-color-scheme: dark)");V(Ne),v.style.colorScheme="light dark",v[jo]=r,ow(r,Ne,V)}else Bo(r),v.setAttribute("data-theme","light"),r.resolvedTheme="light",v.style.colorScheme="light",v[jo]=r;r.__svgCache||(r.__svgCache={}),Ro(b);let D=Object.keys(b).filter(R=>!R.startsWith("__")),L=new Set(D);if(D.forEach(R=>{let V=R.toLowerCase();V!==R&&L.has(V)&&ne(b[V],b[R],ot)}),D.map(R=>{let V=R.toLowerCase();if(!(V!==R&&L.has(V)))return Jg(R,b[R])}),r.varPrefix&&(r.typography&&(r.typography.varPrefix=r.varPrefix),r.spacing&&(r.spacing.varPrefix=r.varPrefix),r.timing&&(r.timing.varPrefix=r.varPrefix)),b.typography)try{Sa()}catch(R){r.verbose&&console.warn("Error applying typography sequence",R)}if(b.spacing)try{ga()}catch(R){r.verbose&&console.warn("Error applying spacing sequence",R)}if(b.timing)try{Ca()}catch(R){r.verbose&&console.warn("Error applying timing sequence",R)}Ea();let T=Ta();return T&&(r.reset=T),r};var Vo=new Map,mw=null,em=null,vT=null;function Ia(e){e.batchAtomicCss&&(em=e.batchAtomicCss),e.compoundCssClass&&(vT=e.compoundCssClass)}var CT=new Set,iw=e=>!!(e&&e.documentElement&&typeof e.createElement=="function"&&e.head!==void 0);function rm(e){try{let t=E();t&&(t.__domDocument=e)}catch{}e&&CT.add(e)}function $a(){try{let e=E();if(e){if(iw(e.__domDocument))return e.__domDocument;if(iw(e.document))return e.document}}catch{}return typeof document<"u"?document:null}var Ze={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};function Cf(){return{...Ze}}function nm(){for(let e in Ze)Ze[e]=0;kf=!1}var kf=!1,Sf=(e,t)=>`${e} ${t}${e===1?"":"s"}`;function ET(e){let t=Date.parse(e);if(!isFinite(t))return"";let r=Math.floor((Date.now()-t)/864e5);return r<1?" (today)":` (${Sf(r,"day")} ago)`}function AT(){try{let e=FT();if(!e.length)return-1;let t=0;for(let r=0;r<e.length;r++)t+=e[r].cssRules?e[r].cssRules.length:0;return t}catch{return-1}}function TT(e,t){if(kf)return!1;kf=!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 (${e}) \u2014 the engine emitted ${Sf(Ze.variable,"variable rule")} and ${Sf(Ze.atomic,"atomic rule")}, while the design system held ${Sf(t,"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
- package : ${n}
44
+ package : ${o}
45
45
  built : ${r}
46
- source : ${o}
47
- emitted : ${JSON.stringify(Xt)}
48
- sheets : the style[data-smbls] tiers currently hold ${uT()} rule(s)
46
+ source : ${n}
47
+ emitted : ${JSON.stringify(Ze)}
48
+ sheets : the style[data-smbls] tiers currently hold ${AT()} 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 nw(){try{let t=C(),e=t&&(t.CSS_VARS||t.cssVars);return e?Object.keys(e).length:0}catch{return 0}}function Yx(t){wf||Xt.variable>0||Xt.atomic>0||sw(Math.max(t,nw()))}function Xg(t){let e=t&&(t.CSS_VARS||t.cssVars);return sw(e?Object.keys(e).length:nw())}function sw(t){let e=kf();if(t===0)return{ok:!0,reason:"no-design-system",stats:e,varCount:t};if(!vf())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 dT(r,t),{ok:!1,reason:r,stats:e,varCount:t}}var pT={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 Ro(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Sf(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 hT(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Sf(e)}var gT={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select"};function Ln(t,e){let r=gT[t];return r?`${t}:${e};${r}:${e};`:`${t}:${e};`}function Kg(t){let e="";for(let r in t){let o=t[r];if(typeof o!="object"||o===null)continue;let n="";for(let s in o){let i=s.charCodeAt(0)===45&&s.charCodeAt(1)===45;n+=Ln(i?s:Ro(s),o[s])}e+=`${r}{${n}}`}return e}var mT="@media (hover: hover)",yT=/(?:^|[^\\]):hover(?![\w-])/;function Zg(){try{let t=C();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function Pe(t,e,r){return r===!1||!yT.test(e)||r===void 0&&!Zg()?t:`${mT}{${t}}`}function Xx(t,e,r){let o=(r?r+"":"")+t+":"+e,n=Oo.get(o),s=n?null:Ro(t);if(!n){let c=pT[t]||Sf(t),l=hT(e);n=r?`_${r}_${c}-${l}`:`_${c}-${l}`,Oo.set(o,n)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return n;let i=s||Ro(t),a=`.${n}{${Ln(i,e)}}`;return Zt(a,void 0,"atomic"),n}var Zx=new WeakMap,Jx=new WeakMap;function Zt(t,e,r){let o=vf(e,bT(t));if(!o)return Xt.dropped++,"dropped";let n=Zx.get(o);if(n||(n=new Set,Zx.set(o,n)),n.has(t))return Xt.duplicate++,Xt[r||"global"]++,"duplicate";let s=Jx.get(o);if(s&&s.has(t))return Xt.invalid++,"invalid";try{o.insertRule(t,o.cssRules.length)}catch{return s||(s=new Set,Jx.set(o,s)),s.add(t),Xt.invalid++,"invalid"}return n.add(t),Xt[r||"global"]++,"inserted"}var Re="0:0",Qx="1:0",tw=/\((max|min)-width:\s*([\d.]+)(px|em|rem)?\)/g;function bT(t){if(typeof t!="string"||!t)return Re;if(t.charCodeAt(0)===64){if(!t.startsWith("@media")&&!t.startsWith("@supports")&&!t.startsWith("@container"))return Re;let e=1/0,r=-1/0;tw.lastIndex=0;let o;for(;o=tw.exec(t);){let n=parseFloat(o[2])*(o[3]==="em"||o[3]==="rem"?16:1);o[1]==="max"?e=Math.min(e,n):r=Math.max(r,n)}return e!==1/0?"2:"+-e:r!==-1/0?"3:"+r:Qx}return t.charCodeAt(0)!==46||/^\.[\w-]+\{/.test(t)?Re:Qx}var ew=t=>{let e=t.indexOf(":");return[Number(t.slice(0,e)),Number(t.slice(e+1))]},_T=(t,e)=>{let[r,o]=ew(t),[n,s]=ew(e);return r!==n?r<n:o<s},xT=t=>t.getAttribute("data-tier")||Re,rw=new WeakMap;function vf(t,e){let r=t||Pa();if(!r||!r.head)return null;let o=e||Re,n=rw.get(r);n||(n=new Map,rw.set(r,n));let s=n.get(o);if(s&&s.ownerNode&&s.ownerNode.parentNode===r.head)return s;o!==Re&&vf(r,Re);let i=o===Re?r.head.querySelector("style[data-smbls]:not([data-tier])"):r.head.querySelector(`style[data-smbls][data-tier="${o}"]`);if(!i){i=r.createElement("style"),i.setAttribute("data-smbls",""),o!==Re&&i.setAttribute("data-tier",o);let c=r.head.querySelectorAll("style[data-smbls]"),l=null;for(let u=0;u<c.length;u++)if(_T(o,xT(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 n.set(o,a),o===Re&&(ow=a),a}function wT(t){let e=t||Pa();if(!e||!e.head)return[];let r=[],o=e.head.querySelectorAll("style[data-smbls]");for(let n=0;n<o.length;n++)o[n].sheet&&r.push(o[n].sheet);return r}var ST=8;function we(t,e,r){if(!t||typeof t!="object")return"";let o=null,n=0,s=[],i=[];for(let c in t){let l=t[c];l==null||l===!1||l===""||(typeof l=="object"?i.push([c,l]):qg?(o||(o=[]),o.push(c,String(l)),n++):s.push(Xx(c,String(l),r)))}if(o&&n>=ST){let c=o.join("\0"),l=qg(c),f=l.indexOf("\0"),u=l.substring(0,f),d=l.substring(f+1);if(d){let h=d.split(`
52
- `);for(let g=0;g<h.length;g++)h[g]&&Zt(h[g],void 0,"atomic")}s.push(u)}else if(o)for(let c=0;c<o.length;c+=2)s.push(Xx(o[c],o[c+1],r));let a=[];for(let c=0;c<i.length;c++)a.push(CT(i[c][0],i[c][1],r));return s.concat(a).join(" ").trim()}var Wg=new Map,kT=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function vT(t){return typeof t!="string"||!t||t.startsWith("@media")||t.startsWith("@supports")?!1:t.split(",").every(e=>kT.test(e.trim()))}function CT(t,e,r){let o=JSON.stringify(e),n=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,s=n&&Zg(),i=(r?r+"":"")+t+o+(n&&!s?"rawhover":""),a=Oo.get(i);if(a){let b=Wg.get(a);if(b)for(let _=0;_<b.length;_++)Zt(b[_],void 0,"atomic");return a}a=r?`_${r}_c${Sf(i)}`:`_c${Sf(i)}`;let c=`.${a}`,l=vT(t)?`.${a}.${a}`:c,f="",u=[],d=b=>typeof b=="string"&&(b.indexOf("{")!==-1||b.indexOf("}")!==-1),h=(b,_)=>{let y="";for(let x in _){let k=_[x];if(k!=null)if(typeof k=="object")h([...b,x],k);else{if(d(k))continue;y+=Ln(Ro(x),k)}}y&&(b.length===0?f+=y:u.push({chain:b,body:y}))};h([],e);let g=b=>{let _=b.length===1?l:c;if(!b.length)return _;let y=b[0].split(",").map(x=>x.trim()).map(x=>x.includes("&")?x.replace(/&/g,_):x.startsWith(":")?`${_}${x}`:`${_} ${x}`);for(let x=1;x<b.length;x++){let k=b[x].split(",").map(O=>O.trim()),E=[];for(let O of y)for(let $ of k)$.includes("&")?E.push($.replace(/&/g,O)):$.startsWith(":")?E.push(O+$):E.push(O+" "+$);y=E}return y.join(", ")},p=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(f){let b=`${t}{${c}{${f}}}`;p.push(b),Zt(b,void 0,"atomic")}for(let b of u){let _=g(b.chain),y=Pe(`${t}{${_}{${b.body}}}`,_,s);p.push(y),Zt(y,void 0,"atomic")}return Wg.set(a,p),Oo.set(i,a),a}let m=g([t]);if(f){let b=Pe(`${m}{${f}}`,m,s);p.push(b),Zt(b,void 0,"atomic")}for(let b of u){let _=g([t,...b.chain]),y=Pe(`${_}{${b.body}}`,_,s);p.push(y),Zt(y,void 0,"atomic")}return Wg.set(a,p),Oo.set(i,a),a}function St(t){if(t==null||typeof t!="string"&&typeof t!="object")return;if(vf(),typeof t=="string"){let s=t.indexOf("--")!==-1;Zt(t,void 0,s?"variable":"global"),s&&Yx(1);return}let e=Zg(),r=0,o=Object.keys(t),n=s=>{let i=s.match(/max-width:\s*(\d+)/);return i?parseInt(i[1]):0};o.sort((s,i)=>{let a=s.startsWith("@media"),c=i.startsWith("@media");return!a&&!c?0:a?c?n(i)-n(s):1:-1});for(let s of o){let i=t[s];if(s.startsWith("@keyframes")){let a=Kg(i);a&&Zt(`${s}{${a}}`,void 0,"keyframes");continue}if(s.startsWith("@media")||s.startsWith("@supports"))for(let a in i){let c=i[a];if(a.startsWith("@keyframes")){let l=Kg(c);l&&Zt(`${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 h=d?u:Ro(u);l+=Ln(h,c[u])}r+=f,Zt(Pe(`${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:Ro(a);Zt(`${s}{${Ln(f,c)}}`,void 0,l?"variable":"global")}}else{let a="",c=!1,l=0;for(let f in i){let u=i[f];if(typeof u=="object"&&u!==null)c=!0;else{let d=f.charCodeAt(0)===45&&f.charCodeAt(1)===45;d&&l++;let h=d?f:Ro(f);a+=Ln(h,u)}}if(r+=l,a&&Zt(Pe(`${s}{${a}}`,s,e),void 0,l?"variable":"global"),c){let f=[],u=[];for(let d in i)typeof i[d]=="object"&&i[d]!==null&&(d.startsWith("@media")||d.startsWith("@supports")?f.push(d):u.push(d));f.sort((d,h)=>{let g=p=>{let m=p.match(/max-width:\s*(\d+)/);return m?parseInt(m[1]):0};return g(h)-g(d)});for(let d of u)St({[`${s} ${d}`]:i[d]});for(let d of f)St({[d]:{[s]:i[d]}})}}}r>0&&Yx(r)}function Mn(t,e){return Zt(`@keyframes ${t}{${Kg(e)}}`,void 0,"keyframes"),t}function iw(){Oo.clear(),ow=null}function Jg(){return Oo.size}R();var Km={};P(Km,{DELEGATED_EVENTS:()=>Un,LIFECYCLE_EVENTS:()=>Nr,MIXINS:()=>Cf,NON_BUBBLING_EVENTS:()=>Ef,REGISTRY:()=>jt,SVG_TAGS:()=>jn,addDelegatedEvent:()=>Ia,addMethods:()=>Kn,applyExtends:()=>zn,cacheNode:()=>Fr,create:()=>ae,createHTMLNode:()=>Nn,detectTag:()=>Mr,dispose:()=>Vr,flushMounts:()=>Ba,globalEventKeyInfo:()=>Af,isSvgTag:()=>Bn,isValidTag:()=>Fn,refreshContextProto:()=>Df,registerEvent:()=>Vn,registerGlobalEvent:()=>Tf,remove:()=>qn,removeDelegatedEvent:()=>Da,update:()=>Hn});var tm="http://www.w3.org/2000/svg",jn=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"]),ET=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 Fn(t){return ET.has(t)||jn.has(t)}function Bn(t){return jn.has(t)}function Mr(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"&&Fn(e))return e;if(!r||typeof r!="string")return"div";let o=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]),n=r.toLowerCase();return n.includes(".")&&(n=n.split(".")[0]),n.includes("_")&&(n=n.split("_")[0]),Fn(n)&&!o.has(n)?n:"div"}var aw={};function Nn(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(Bn(t)){let o=e?.parent;if(t==="svg"||o?.node?.namespaceURI===tm)return r.createElementNS(tm,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Fr(t){let e=t.tag=Mr(t),o=Bn(e)&&(e==="svg"||t.parent?.node?.namespaceURI===tm)?"svg:"+e:e,n=t?.context?.document||globalThis.document,s=aw[o];if(s||(s=aw[o]=Nn(e,t)),!s)return null;let i=n&&s.ownerDocument!==n?Nn(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"]),Cf={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},Nr=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"]),Ef=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"]),em=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),Un=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 om=new WeakMap,AT={passive:!0},TT={passive:!0,capture:!0},nm=(t,e)=>em.has(t)?e?TT:AT:e||!1;function lw(t){let e=om.get(t);return e||(e={handlers:new Map,installed:new Set},om.set(t,e)),e}function OT(t,e){let r=lw(e);if(r.installed.has(t))return;r.installed.add(t);let o=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave",n=t==="mouseenter"||t==="mouseleave";e.addEventListener(t,s=>{let i=s.target;for(;i&&i!==e;){let a=r.handlers.get(t);if(a){let c=a.get(i);if(c){if(n&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(c(s),s.cancelBubble)return}}i=i.parentNode}},nm(t,o))}function Ia(t,e,r,o){o||(o=e.ownerDocument?.documentElement||e.getRootNode());let n=lw(o);OT(t,o),n.handlers.has(t)||n.handlers.set(t,new WeakMap),n.handlers.get(t).set(e,r)}function Da(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let o=om.get(r);if(!o)return;let n=o.handlers.get(t);n&&n.delete(e)}function cw(t){return Un.has(t)&&!Nr.has(t)}function fw(t,e){let{context:r}=t,o=r?.designSystem;return n=>{o&&it(o);try{let s=e.call(t,n,t,t.state,r);if(s&&typeof s.then=="function"){s.catch(i=>{t.error=i,console.error("[DOMQL] Async event error:",i)}).finally(()=>{o&&et()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),r?.strictMode)throw s}o&&et()}}function Vn(t,e,r){let{node:o,context:n}=e;if(!o)return;let s=fw(e,r),i=Ef.has(t);if(!i&&cw(t)){let a=n?.rootNode||o.ownerDocument?.documentElement;Ia(t,o,s,a)}else o.addEventListener(t,s,nm(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!i&&cw(t)){let a=n?.rootNode||o.ownerDocument?.documentElement;Da(t,o,a)}else o.removeEventListener(t,s,nm(t,!1))})}var rm=[["onDocument","document"],["onWindow","window"]];function Af(t){if(typeof t!="string")return null;for(let e=0;e<rm.length;e++){let r=rm[e][0];if(t.length<=r.length||!t.startsWith(r))continue;let o=t.charCodeAt(r.length);if(!(o<65||o>90))return{target:rm[e][1],eventName:t.slice(r.length).toLowerCase()}}return null}var RT=/^[A-Za-z_$][\w$]*$/;function PT(t,e,r){let o=e,n=!1,s,i=!1;if(e&&typeof e=="object"&&typeof e!="function"&&(o=e.handler,n=!!e.capture,i=!!e.once,typeof e.passive=="boolean"&&(s=e.passive)),typeof o=="string"&&RT.test(o)){let a=o;o=function(l){return t.call(a,l)}}return typeof o!="function"?null:(s===void 0&&(s=em.has(r)),{handler:o,capture:n,passive:s,once:i})}function IT(t,e){let r=t.node?.ownerDocument||t.context?.document||(typeof document<"u"?document:null);if(!r||typeof r.addEventListener!="function")return null;if(e==="document")return r;let o=r.defaultView||(typeof window<"u"?window:null);return o&&typeof o.addEventListener=="function"?o:null}function DT(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 Tf(t,e,r){let o=e.__ref;if(!o)return;let n=PT(e,r,t.eventName);if(!n)return;let s=IT(e,t.target);if(!s)return;o.__globalEvents||(o.__globalEvents=new Map);let i=t.target+":"+t.eventName+":"+(n.capture?1:0);if(o.__globalEvents.has(i))return;let a=fw(e,n.handler),c=f=>{DT(e)&&a(f)},l={capture:n.capture,passive:n.passive,once:n.once};s.addEventListener(t.eventName,c,l),o.__globalEvents.set(i,{target:s,eventName:t.eventName,listener:c,options:l}),o.__eventCleanup||(o.__eventCleanup=[]),o.__eventCleanup.push(()=>{s.removeEventListener(t.eventName,c,l),o.__globalEvents&&o.__globalEvents.delete(i)})}function uw(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 zn(t,e,r){let o=uw(e);if(!o.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<o.length;i++){let a=dw(o[i],s);a&&a!==e&&pw(t,a,r,new Set([e]))}}function dw(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(n=>n.trim()),o=e[r[0]]||e[`smbls.${r[0]}`];for(let n=1;n<r.length&&o;n++)o=o[r[n]];return o||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function pw(t,e,r,o=new Set){if(o.has(e))return;o.add(e);let n=uw(e);if(n.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<n.length;a++){let c=dw(n[a],i);c&&pw(t,c,r,o)}}for(let s in e){if(s==="extends"||s==="extend")continue;let i=e[s];t[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[s]={...i}:t[s]=i:typeof t[s]=="object"&&typeof i=="object"&&!Array.isArray(t[s])&&!Array.isArray(i)&&t[s]!==null&&i!==null?t[s]=hw(t[s],i):t[s]=i}}function hw(t,e){let r={...t};for(let o in e){let n=r[o],s=e[o];n&&s&&typeof n=="object"&&typeof s=="object"&&!Array.isArray(n)&&!Array.isArray(s)&&typeof n!="function"&&typeof s!="function"?r[o]=hw(n,s):r[o]=s}return r}rn();R();var $T=["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"],Of={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"]},mw=["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"],Br=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()):yw(t),LT=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate"]),yw=t=>LT.has(t)?t.toLowerCase():null,MT=new Set(["draggable","contenteditable","spellcheck","autocorrect"]),dr=t=>typeof t=="string"&&(MT.has(t)||t.startsWith("aria-")),Xe=(t,e)=>e!==!0&&e!==!1?e:dr(t)?e?"true":"false":e===!0?"":e,Ur=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Br(e)||Of.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(Of,t)?Of[t].includes(e):!1,am=t=>{if(!w(t))return!1;let e=t.toLowerCase();return mw.includes(e)},FT=(t,e,r)=>{let o={};for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(r&&n in r)continue;if(n==="aria"&&e[n]&&typeof e[n]=="object"){for(let a in e[n])yt(e[n][a])&&(o["aria-"+a]=e[n][a]);continue}if(n==="data"&&e[n]&&typeof e[n]=="object"){for(let a in e[n])if(yt(e[n][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());o["data-"+c]=e[n][a]}continue}let s=Ur(t,n),i=am(n);if(yt(e[n])&&(s||i)){let a=Br(n)||n;o[a]=e[n]}}return o},NT=(t,e)=>{let r={};if(t.attr)for(let o in t.attr)r[o]=t.attr[o](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let n=t.aria[o];typeof n=="function"&&(r["aria-"+o]=n(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let o in t.data){let n=t.data[o];if(typeof n=="function"){let s=o.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());r["data-"+s]=n(e,e.state,e.context)}}return r},jr=(t,e)=>{let r=t.call("exec",e,t);if(r)return w(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},sm=(t,e)=>{let r=(t.preSrc||"")+(jr(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:o}=t;if(!o.files&&!o.assets)return r;if(r.startsWith("/assets/")){let n=r.slice(8),s=o.assets&&(o.assets[r]||o.assets[n]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let n=r.slice(7),s=o.files&&(o.files[r]||o.files[n]);return s&&s.content?s.content.src:r}if(o.assets){let n=o.assets[r];if(n&&n.content)return n.content.src}if(o.files){let n=o.files[r];if(n&&n.content)return n.content.src}return r},im={src:t=>sm(t,t.src),href:t=>jr(t,t.href),action:t=>jr(t,t.action),poster:t=>sm(t,t.poster),data:t=>jr(t,t.data)},cm=t=>{let e=t.tag||"div",r={};for(let o in im)if(t[o]!==void 0&&Ur(e,o)){let n=im[o](t);n!==void 0&&(r[o]=n)}return r},gw=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},jT=(t,e,r)=>{if(t==="$"){let n=gw(e,r);return n===void 0&&(n=!!r[e]),n}let o=r[e]===!0||r.state[e];if(!o){let n=gw(e,r);n!==void 0&&(o=n)}return t==="."?!!o:!o},BT=new Set(["$",".","!"]),UT=(t,e,r)=>{let o={},n=(s,i,a,c)=>{let l=i;o[s]=f=>{if(jT(a,c,f))return A(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!BT.has(i))continue;let a=t[s];if(!a||typeof a!="object")continue;let c=s.slice(1);for(let l in a){if(r&&l in r)continue;if(l==="aria"&&a[l]&&typeof a[l]=="object"){for(let h in a[l])n("aria-"+h,a[l][h],i,c);continue}if(l==="data"&&a[l]&&typeof a[l]=="object"){for(let h in a[l]){let g=h.replace(/([A-Z])/g,p=>"-"+p.toLowerCase());n("data-"+g,a[l][h],i,c)}continue}let f=Ur(e,l),u=am(l);if(!f&&!u)continue;let d=Br(l)||l;n(d,a[l],i,c)}}return o};function Hn(t={},e={}){let r=this,o=r.__ref;if(!o)return;if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof r.onBeforeUpdate=="function"&&lm(o))try{let s=r.onBeforeUpdate(r,r.state,r.context,e);if(s&&typeof s.then=="function")s.then(()=>pr(o,!1),i=>{pr(o,!0),r.context?.plugins?.length&&Et("error",r,{hook:"onBeforeUpdate",error:i})||console.error("[DOMQL] onBeforeUpdate error:",i)});else if(pr(o,!1),s===!1)return r}catch(s){throw pr(o,!0),s}let n=!t||Object.keys(t).length===0;if(Pc(()=>{if(t.state&&mt(r.state)&&r.state.$update(t.state),t.text!==void 0&&(r.text=t.text,!o.__exec.text&&r.node&&Wn(r,t.text??"")),t.html!==void 0&&(r.html=t.html,!o.__exec.html&&r.node&&(r.node.innerHTML=t.html)),t.style&&r.node?.style){if(!o.__exec.style)for(let s in t.style){let i=t.style[s];if(i==null)continue;let a=s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=String(i).replace(/\s*!important\s*$/,"");r.node.style.setProperty(a,c,"important")}r.style||(r.style={}),Object.assign(r.style,t.style)}if(t.attr&&r.node?.setAttribute){for(let s in t.attr){let i=t.attr[s];i==null||i===!1&&!dr(s)?r.node.removeAttribute(s):typeof i!="function"&&typeof i!="object"&&r.node.setAttribute(s,Xe(s,i))}r.attr||(r.attr={}),Object.assign(r.attr,t.attr)}if(t.data&&r.node?.dataset){for(let s in t.data)r.node.dataset[s]=t.data[s];r.data||(r.data={}),Object.assign(r.data,t.data)}for(let s in t){if(jt.has(s)||s==="state")continue;let i=t[s],a=r[s];if(a&&a.__ref&&typeof a.update=="function")a.update(i,e);else if(typeof i=="object"&&i!==null){let c=s.charCodeAt(0);c>=65&&c<=90&&ae(i,r,s,e)}else s!=="text"&&s!=="html"&&s!=="style"&&s!=="attr"&&s!=="data"&&(r[s]=i)}}),r.node&&n&&o.__effects&&o.__effects.length)for(let s=0;s<o.__effects.length;s++){let i=o.__effects[s];i&&!i._disposed&&!i._isSubscribeToEffect&&typeof i._execute=="function"&&i._execute()}else if(r.node&&o.__conditionalRunners)for(let s of o.__conditionalRunners)s();return Et("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}function Vr(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(o){console.error("[smbls] onBeforeRemove error:",o)}if(e.__effects){for(let o=0;o<e.__effects.length;o++)e.__effects[o].dispose();e.__effects.length=0}if(e.__eventCleanup){for(let o=0;o<e.__eventCleanup.length;o++)e.__eventCleanup[o]();e.__eventCleanup.length=0}if(e.__children){let o=e.__children.slice();e.__children.length=0;for(let n=0;n<o.length;n++){let s=t[o[n]];s&&s.__ref&&Vr(s)}}t.node?.parentNode?t.node.remove():t.tag==="fragment"&&e.__fragmentAnchor?.parentNode&&e.__fragmentAnchor.remove();let r=t.state?.$destroy||t.state?.destroy;if(typeof r=="function"&&t.state.__element===t&&r.call(t.state),t.parent?.__ref?.__children){let o=t.parent.__ref.__children.indexOf(t.key);o!==-1&&t.parent.__ref.__children.splice(o,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(o){console.error("[smbls] onRemove error:",o)}t.node=null,t.parent=null,t.__ref=null}function qn(){Vr(this)}R();R();R();var VT=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],zT=["none","forwards","backwards","both"],HT=["normal","reverse","alternate","alternate-reverse"],WT=["running","paused"],qT=t=>/^[\d.]+m?s$/.test(t),KT=/^(?: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*\))$/,GT=t=>{let e=String(t).trim().toLowerCase();if(e===""||e==="none"||e==="initial"||e==="unset")return!0;let r=e.match(/[a-z0-9]+\([^()]*\)/g);return!r||r.join("").replace(/\s+/g,"")!==e.replace(/\s+/g,"")?!1:r.every(o=>KT.test(o.replace(/\s+/g,"")))},bw=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),YT={transform:GT,translate:bw,rotate:t=>bw(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},XT=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(!S(t))return null;let e=null,r=-1;for(let o in t){let n=XT(o);n==null||!S(t[o])||n>=r&&(r=n,e=t[o])}return e},JT=t=>{let e=ZT(t);if(!e)return!1;let r=Object.keys(e);if(!r.length)return!1;for(let o of r){let n=YT[o];if(!n)return!1;let s=e[o];if(s==null||typeof s=="object"||typeof s=="function"||!n(s))return!1}return!0},QT=(t,e)=>{if(S(t))return t;let{animation:r}=e.context&&e.context.designSystem||{},o=r&&r[t];return S(o)?o:null},t1=["reverse","alternate","alternate-reverse"],_w=(t,e,r)=>{let o=r||e.animationDirection;return o&&t1.includes(String(o))?"both":JT(QT(t,e))?"backwards":"both"},e1=0,xw=new Map,fm=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(S(t)){let n=JSON.stringify(t),s=xw.get(n);if(s)return s;let i=`smbls-anim-${e1++}`,a=Mn(i,t);return xw.set(n,a),a}let o=r&&r[t];return S(o)?Mn(t,o):t},r1=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},o=t.split(/\s+/),n=null,s=[],i=null,a=null,c=null,l=null,f=null;for(let u of o)r&&r[u]?n=u:qT(u)?s.push(u):VT.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):HT.includes(u)?c=u:zT.includes(u)?l=u:WT.includes(u)?f=u:n||(n=u);return{name:n,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},um={animation:(t,e)=>{if(t!=null){if(w(t)&&t.includes(" ")){let r=r1(t,e);return{animationName:fm(r.name||t,e),animationDuration:r.durations[0]||ie(e.animationDuration||"A").timing,animationDelay:r.durations[1]||ie(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||xe(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||_w(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:fm(t,e),animationDuration:ie(e.animationDuration||"A").timing,animationDelay:ie(e.animationDelay||"0s").timing,animationTimingFunction:xe(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||_w(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}}},animationName:(t,e)=>({animationName:fm(t,e)}),animationDuration:t=>({animationDuration:ie(t).timing}),animationDelay:t=>({animationDelay:ie(t).timing}),animationTimingFunction:t=>({animationTimingFunction:xe(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};R();var dm={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>L("height",t,e),width:(t,e)=>L("width",t,e),boxSizing:t=>At(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...bt("height",e),...bt("width",r||e)}},inlineSize:(t,e)=>L("inlineSize",t,e),blockSize:(t,e)=>L("blockSize",t,e),minWidth:(t,e)=>L("minWidth",t,e),maxWidth:(t,e)=>L("maxWidth",t,e),widthRange:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...bt("minWidth",e),...bt("maxWidth",r||e)}},minHeight:(t,e)=>L("minHeight",t,e),maxHeight:(t,e)=>L("maxHeight",t,e),heightRange:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...bt("minHeight",e),...bt("maxHeight",r||e)}},size:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...L("inlineSize",e),...L("blockSize",r||e)}},minBlockSize:(t,e)=>L("minBlockSize",t,e),minInlineSize:(t,e)=>L("minInlineSize",t,e),maxBlockSize:(t,e)=>L("maxBlockSize",t,e),maxInlineSize:(t,e)=>L("maxInlineSize",t,e),minSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...bt("minInlineSize",e),...bt("minBlockSize",r||e)}},maxSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...bt("maxInlineSize",e),...bt("maxBlockSize",r||e)}},borderWidth:(t,e)=>L("borderWidth",t,e),borderTopWidth:(t,e)=>L("borderTopWidth",t,e),borderRightWidth:(t,e)=>L("borderRightWidth",t,e),borderBottomWidth:(t,e)=>L("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>L("borderLeftWidth",t,e),textDecorationThickness:(t,e)=>L("textDecorationThickness",t,e),textUnderlineOffset:(t,e)=>L("textUnderlineOffset",t,e),padding:(t,e)=>L("padding",t,e),scrollPadding:(t,e)=>L("scrollPadding",t,e),paddingInline:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...bt("paddingInlineStart",e),...bt("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...bt("paddingBlockStart",e),...bt("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>L("paddingBlockStart",t,e),paddingBottom:(t,e)=>L("paddingBlockEnd",t,e),paddingLeft:(t,e)=>L("paddingInlineStart",t,e),paddingRight:(t,e)=>L("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>L("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>L("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>L("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>L("paddingInlineEnd",t,e),margin:(t,e)=>L("margin",t,e),marginInline:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...bt("marginInlineStart",e),...bt("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!w(e.marginBlock))return;let[r,o]=e.marginBlock.split(" ");return{...bt("marginBlockStart",r),...bt("marginBlockEnd",o||r)}},marginTop:(t,e)=>L("marginBlockStart",t,e),marginBottom:(t,e)=>L("marginBlockEnd",t,e),marginLeft:(t,e)=>L("marginInlineStart",t,e),marginRight:(t,e)=>L("marginInlineEnd",t,e),marginInlineStart:(t,e)=>L("marginInlineStart",t,e),marginInlineEnd:(t,e)=>L("marginInlineEnd",t,e),marginBlockStart:(t,e)=>L("marginBlockStart",t,e),marginBlockEnd:(t,e)=>L("marginBlockEnd",t,e),gap:t=>({gap:hf(t)}),columnGap:(t,e)=>Oe(e,"columnGap",t),rowGap:(t,e)=>Oe(e,"rowGap",t),flexWrap:t=>{if(t!=null)return{display:"flex",flexWrap:t}},flexFlow:(t,e)=>{let r=e.reverse;if(!w(t))return;let[o,n]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(o="row"),(t.startsWith("y")||t==="column")&&(o="column"),{display:"flex",flexFlow:(o||"")+(!o.includes("-reverse")&&r?"-reverse":"")+" "+(n||"")}},flexAlign:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>ur(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>ur(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>ur(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>ur(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>ur(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>ur(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var pm={fontSize:t=>wa(t)||t,fontFamily:t=>({fontFamily:_a(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 hm={overflow:t=>({overflow:t}),cursor:(t,e,r,o)=>{if(!t)return;let n=o.assets&&o.assets[t];if(n&&n.content)t=`url(${n.content.src})`;else{let s=o.files&&o.files[t];s&&s.content&&(t=`url(${s.content.src})`)}return{cursor:t}},opacity:t=>t!=null?{opacity:String(t)}:void 0,visibility:t=>t!=null?{visibility:t}:void 0,pointerEvents:t=>t!=null?{pointerEvents:t}:void 0};var gm={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>wt(r,"k").k).join(" ")}},left:t=>wt(t,"left"),top:t=>wt(t,"top"),right:t=>wt(t,"right"),bottom:t=>wt(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>wt(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=>wt(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};R();var Rf=0,mm=()=>{Rf++},ym=()=>{Rf>0&&Rf--},ce=({context:t,state:e})=>{let r=t?.designSystem,o=e?.root?.globalTheme||r?.globalTheme;return o&&o!=="auto"?o:Rf>0?null:r&&r.resolvedTheme||null},Jt=(t,e)=>{if(e==null||e==="")return;if(!S(e))return{[t]:e};let r={},o=!1;for(let n in e){let s=e[n];if(!(s==null||s==="")){if(S(s)){let i=Jt(t,s);i&&(r[n]=i,o=!0);continue}r[n]={[t]:s},o=!0}}return o?r:void 0},bm={theme:(t,e)=>{if(t)return e.themeModifier?_e(t,`@${e.themeModifier}`):_e(t)},color:(t,e)=>{let r=ce(e);if(t)return Jt("color",Rt(t,r))},background:(t,e)=>{let r=ce(e);if(t)return w(t)&&t.includes("gradient")&&t.includes("(")?{background:Ta(t,r)}:Jt("background",Rt(t,r))},backgroundColor:(t,e)=>{let r=ce(e);if(t)return Jt("backgroundColor",Rt(t,r))},backgroundImage:(t,e,r,o)=>{let n=ce(e);if(!t)return;let s=o.assets&&o.assets[t];if(s&&s.content)t=s.content.src;else{let i=o.files&&o.files[t];i&&i.content&&(t=i.content.src)}return Jt("backgroundImage",pf(t,n))},textStroke:t=>{let e=uf(t);if(e!=null)return{WebkitTextStroke:e}},outline:t=>({outline:Ye(t)}),outlineWidth:(t,e)=>L("outlineWidth",t,e),outlineColor:(t,e)=>{let r=ce(e);if(t)return Jt("outlineColor",Rt(t,r))},outlineOffset:(t,e)=>L("outlineOffset",t,e),border:t=>({border:Ye(t)}),borderColor:(t,e)=>{let r=ce(e);if(t)return Jt("borderColor",Rt(t,r))},borderTopColor:(t,e)=>{let r=ce(e);if(t)return Jt("borderTopColor",Rt(t,r))},borderBottomColor:(t,e)=>{let r=ce(e);if(t)return Jt("borderBottomColor",Rt(t,r))},borderLeftColor:(t,e)=>{let r=ce(e);if(t)return Jt("borderLeftColor",Rt(t,r))},borderRightColor:(t,e)=>{let r=ce(e);if(t)return Jt("borderRightColor",Rt(t,r))},borderLeft:t=>({borderLeft:Ye(t)}),borderTop:t=>({borderTop:Ye(t)}),borderRight:t=>({borderRight:Ye(t)}),borderBottom:t=>({borderBottom:Ye(t)}),shadow:(t,e)=>{let r=ce(e);if(t)return Jt("boxShadow",df(t,r))},boxShadow:(t,e)=>{if(!w(t))return;let[r,o]=t.split("!importan"),n=ce(e),s=o?" !important":"",i=Aa(r.trim(),n);return w(i)?{boxShadow:i+s}:Jt("boxShadow",i)},textShadow:(t,{context:e})=>Jt("textShadow",Aa(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:Ye(t)})};var $a={transition:t=>{let e=mf(t);if(e!=null)return{transition:e}},transitionDuration:t=>({transitionDuration:Oa(t)}),transitionDelay:t=>({transitionDelay:Oa(t)}),transitionTimingFunction:t=>({transitionTimingFunction:xe(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};R();var _m={flow:(t,e)=>{let r=e.reverse;if(!w(t))return;let[o,n]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(o="row"),(t.startsWith("y")||t==="column")&&(o="column"),{display:"flex",flexFlow:(o||"")+(!o.includes("-reverse")&&r?"-reverse":"")+" "+(n||"")}},wrap:(t,e)=>{if(t!=null)return{display:"flex",flexWrap:t}},align:(t,e)=>{if(!w(t))return;let[r,o]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:o}}};R();var o1=/(^|[^\w.-])([A-Za-z_][\w-]*)/g,ww=t=>{if(!w(t))return t;let e=C().sizes;return e?t.replace(o1,(r,o,n)=>{let s=e[n];return s==null?r:o+String(s)}):t},Ze=t=>ww(gf(t)),xm={gridTemplateColumns:t=>({gridTemplateColumns:Ze(t)}),gridTemplateRows:t=>({gridTemplateRows:Ze(t)}),gridAutoColumns:t=>({gridAutoColumns:Ze(t)}),gridAutoRows:t=>({gridAutoRows:Ze(t)}),area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:Ze(t)}),templateColumns:t=>({gridTemplateColumns:Ze(t)}),autoColumns:t=>({gridAutoColumns:Ze(t)}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:Ze(t)}),templateRows:t=>({gridTemplateRows:Ze(t)}),autoRows:t=>({gridAutoRows:Ze(t)}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var _t={...um,...dm,...pm,...hm,...gm,...bm,...$a,..._m,...xm};var kt=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","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 n1=/^-?[A-Z][0-9]?$/,s1=/^[a-z][0-9]?$/,Sw=/var\(\s*(--[A-Za-z0-9-]+)/g,i1=t=>{let e=new Set,r=new Set;if(!t||typeof t!="object")return{knownLetters:e,knownVars:r};for(let o in t){let n=t[o];if(!(!n||typeof n!="object")){if(n.sequence&&typeof n.sequence=="object")for(let s in n.sequence)e.add(s);if(n.vars&&typeof n.vars=="object")for(let s in n.vars)r.add(s)}}return{knownLetters:e,knownVars:r}},a1=(t,e)=>{if(!e.size)return[];let r=t.split(/[(),\s]+/).filter(Boolean),o=new Set;for(let n of r){if(!n1.test(n))continue;let s=n.charCodeAt(0)===45?n.slice(1):n;e.has(s)&&o.add(n)}return[...o]},c1=(t,e)=>{if(!e.size)return[];let r=[];Sw.lastIndex=0;let o;for(;o=Sw.exec(t);){let n=o[1];if(e.has(n))continue;let s=n.lastIndexOf("-");if(s===-1)continue;let i=n.slice(s+1);if(!s1.test(i))continue;let a=n.slice(0,s+1)+i.toUpperCase();a!==n&&e.has(a)&&r.push({varName:n,corrected:a})}return r},Pf=new Set,kw=(t,e,r)=>{if(!It()||!w(e)||!e)return;let o;try{o=C()}catch{return}let{knownLetters:n,knownVars:s}=i1(o);if(!n.size&&!s.size)return;let i=a1(e,n),a=c1(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}`;Pf.has(f)||(Pf.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}`;Pf.has(u)||(Pf.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 l1=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,f1=(t,e,r)=>{let{context:o}=r;if(!o.designSystem?.media)return;let n=t.slice(1),s=o.designSystem.media[n],i=le(e,r);if(!s)return{[t]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match(l1),c=a?a[1]||a[2]:n,l={[`${s} &`]:i};if(c==="dark"||c==="light"){let f=o.designSystem?.scopeSelector||":root",u=f===":root"?":root:not([data-theme])":`${f}:not([data-theme])`;l[`@media (prefers-color-scheme: ${c})`]={[`${u} &`]:i}}return l},vw=(t,e,r)=>({[t]:le(e,r)}),La=(t,e,r)=>{let o=`&${t}`,n=le(e,r);if(t.includes(",")&&n){let s={},i={};for(let a in n)typeof n[a]=="object"&&n[a]!==null?i[a]=n[a]:s[a]=n[a];if(Object.keys(i).length){let a=o.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[o]=s);for(let l in i){let f=a.map(u=>`${u} ${l}`).join(", ");c[f]=i[l]}return c}}return{[o]:n}},wm=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},u1=(t,e,r)=>{let o=t.slice(1),n=wm(o,r);if(n===void 0&&(n=!!r[o]),!!n)return le(e,r)},d1=(t,e,r)=>({[t]:e}),p1=(t,e,r)=>{let o=t.slice(1),n=r[o]===!0||r.state?.[o];if(!n)if(typeof r[o]=="function")try{n=r[o](r,r.state,r.context)}catch{}else{let s=wm(o,r);s!==void 0&&(n=s)}if(n)return le(e,r)},h1=(t,e,r)=>{let o=t.slice(1),n=r[o]===!0||r.state?.[o];if(!n)if(typeof r[o]=="function")try{n=r[o](r,r.state,r.context)}catch{}else{let s=wm(o,r);s!==void 0&&(n=s)}if(!n)return le(e,r)},Sm=(t,e)=>le(t,e),km={"@":f1,":":La,"[":La,"*":La,"+":La,"~":La,"&":vw,">":vw,$:u1,"-":d1,".":p1,"!":h1};var If=kr(),Cw=(t,e,r)=>{let o=e?.context?.designSystem;o&&it(o);try{let n={},s={},i=(a,c)=>{if(r.unpack){n={...n,...c};return}n[a]=c};for(let a in t){let c=t[a];if(c!==null)if(a==="class"&&e.call("isString",t.class)){let l=c.split(" ");if(l.length){let f=e.context.designSystem.class,u=l.reduce((d,h)=>ht(d,f[h]),{});n.designSystemClass=u}}else if(a==="true"){let l=ft(c,e);ht(n,Sm(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),!If&&S(n[a])&&(n[a].label=a)}else if(_t[a]){let l=ft(c,e);if(l===null)continue;T(l)&&(l=l.reduce((u,d)=>ht(u,d),{}));let f=_t[a](l,e,e.state,e.context);T(f)&&(f=f.reduce((u,d)=>ht(u,d),{})),f&&i(a,f),!If&&S(n[a])&&(n[a].label=a)}else if(kt.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})`),If||kw(a,l,e),i(a,{[a]:l}),!If&&S(n[a])&&(n[a].label=a)}else s[a]=c}return[n,s]}finally{o&&et()}},Ew=(t,e)=>{let r={};for(let o in t){let n=km[o.slice(0,1)];if(n){let s=n(o,t[o],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]&&typeof r[i]=="object"&&typeof s[i]=="object"?qt(r[i],s[i]):r[i]=s[i])}}return r},le=(t,e,r={unpack:!0})=>{let[o,n]=Cw(t,e,r),s=Ew(n,e),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return qs(o,s);o._selectors=s}return o},g1=(t,e)=>{let r={};if(t.class)for(let o in t.class)r[o]=t.class[o](e);return r};R();var Aw=t=>{if(S(t))return le(t,t)},m1=(t,e)=>{let r=Aw(t);return typeof e=="function"?e(r):we(r)};R();function Cm(t,e,r){let o=t?.context?.analyze;if(!o||!o.emit||e==="warn"&&!o.shouldCapture("warnings")||e==="error"&&!o.shouldCapture("errors"))return;let n=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");o.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:e==="error"?"error":"warning",level:e,hook:e==="error"?"el.error":"el.warn",element:{key:t.key!=null?String(t.key):null,name:t.__name||null,tag:t.tag||null},message:n||null,args:r})}var Tw=new Set;function y1(t,e,r){let o=String(e);if(Tw.has(o))return;Tw.add(o);let n=t?.__ref?.path,s=Array.isArray(n)&&n.length?n.join("."):t?.key!=null?String(t.key):"(unknown element)",i=r!=null?`resolves to a non-function (${typeof r}) \u2014 it cannot be called`:"is not registered in context.methods, context.functions, or context.utils, and is not an element method",a=`[smbls] el.call('${o}') at <${s}>: "${o}" ${i}. Returning undefined (unchanged behavior) \u2014 check the name for typos or register the function on the project. Warned once per name; repeat misses are silent.`;Cm(t,"error",[a]),console.error(a)}function b1(...t){return Cm(this,"warn",t),Pi.apply(this,t)}function _1(...t){return Cm(this,"error",t),po.apply(this,t)}var Ow={update:Hn,remove:qn,getDB:Li,getQuery:Mi,getRootData:Ti,getChildren:ki,getPath:vi,nextElement:Ii,previousElement:Di,verbose:ln,warn:b1,error:_1,variables:$i,spotByPath:Si,set(t,e){let r=this.__ref;if(r){if(r.__setLocked){r.__setQueued={content:t,options:e};return}r.__setLocked=!0}try{if(this.removeContent(),t!=null){let o=this.context?.__create;o&&o(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(r){r.__setLocked=!1;let o=r.__setQueued;o&&(r.__setQueued=null,this.set(o.content,o.options))}}},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,o=this.key,n=this.parse();return this.remove(),e(n,r,o,t)},lookup(t){let e=this.parent;for(;e;){if(typeof t=="function"){if(t(e))return e}else if(typeof t=="string"){if(e.key===t)return e;if(e[t]&&e[t].__ref)return e[t]}e=e.parent}return null},lookdown(t){let e=this.__ref;if(!e?.__children)return null;for(let r of e.__children){let o=this[r];if(!o)continue;if(typeof t=="function"){if(t(o))return o}else if(typeof t=="string"&&o.key===t)return o;let n=o.lookdown?.(t);if(n)return n}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let o of r.__children){let n=this[o];n&&(typeof t=="function"?t(n)&&e.push(n):typeof t=="string"&&n.key===t&&e.push(n),n.lookdownAll?.(t,e))}return e},getRef(){return this.__ref},getRoot:Ai,getRootState:Ei,getRootContext:Oi,getContext:Ri,parse(t){let e={},r=t?new Set(t):null,o=this.__ref?.__exec;for(let n in this)if(!(n==="parent"||n==="node"||n==="__ref")&&!r?.has(n)){if(o&&o[n]!==void 0){e[n]=o[n];continue}typeof this[n]!="function"&&(e[n]=this[n])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let o of r.__children)this[o]?.parseDeep&&(e[o]=this[o].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let r of t)e[r]=this[r];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(let e in t){let r=t[e];if(r==null)continue;let o=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),n=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(o,n,"important")}},call(t,...e){let r=this.context,o=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof o=="function")return o.call(this,...e);It()&&y1(this,t,o)},removeContent(){let t=this.__ref;if(!t?.__children)return;let e=this.content;if(e?.remove){e.remove(),delete this.content;let r=t.__children.indexOf("content");r!==-1&&t.__children.splice(r,1)}e?.node?.parentNode&&e.node.parentNode.removeChild(e.node)}},vm=new WeakMap;function x1(t){if(!t)return Ow;let e=vm.get(t);if(e)return e;e=Object.create(Ow);let r=t.methods;if(r)for(let o in r)e[o]=r[o];return vm.set(t,e),e}function Kn(t){let e=x1(t.context);Object.setPrototypeOf(t,e)}function Df(t){if(!t)return!1;let e=vm.get(t);if(!e)return!1;let r=t.methods;if(!r)return!1;for(let o in r)e[o]=r[o];return!0}var $f=[],Lf=!1,zr=0;function Mf(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function Rw(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 Em(){return zr?Mf()-zr>=50:!1}var Gn=0;function Am(){Gn===0&&!zr&&(zr=Mf()),Gn++}function Tm(){Gn>0&&Gn--,Gn===0&&!Lf&&(zr=0)}function Om(t){$f.push(t),Lf||(Lf=!0,Rw(Pw))}function Pw(){for(zr=Mf();$f.length;){let t=$f.shift();try{t()}catch(e){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",e?.message||e)}if(Mf()-zr>=50)break}if($f.length){Rw(Pw);return}Lf=!1,zr=0,Gn=0}R();rn();var $m={};P($m,{STATE_METHODS:()=>Iw,applyInitialState:()=>Nf,applyStateMethods:()=>fe,callStateMethod:()=>Ma,createState:()=>Pm,isTracking:()=>Dm,useHostState:()=>Im});var Iw=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"]),Ff=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},Ie=(t,e,r,{onlyIfAbsent:o}={})=>{Ff(t,"$"+e,r),!(o&&Object.prototype.hasOwnProperty.call(t,e))&&Ff(t,e,r)},Ma=(t,e,...r)=>{if(!t)return;let o=t["$"+e];if(typeof o=="function")return o.apply(t,r);let n=t[e];if(typeof n=="function")return n.apply(t,r)},fe=(t,e)=>{if(mt(e)){let n=e.__raw||e;Ie(n,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),Ie(n,"set",function(s,i={}){return e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,i),e},{onlyIfAbsent:!0}),Ie(n,"setByPath",function(s,i,a={}){let c=s.split("."),l=e;for(let f=0;f<c.length-1;f++)l[c[f]]===void 0&&(l[c[f]]={}),l=l[c[f]];return l[c[c.length-1]]=i,e}),Ie(n,"getByPath",function(s){let i=s.split("."),a=e;for(let c=0;c<i.length;c++){if(a==null)return;a=a[i[c]]}return a}),Ie(n,"removeByPath",function(s,i={}){let a=s.split("."),c=e;for(let l=0;l<a.length-1;l++){if(c==null)return e;c=c[a[l]]}return c&&delete c[a[a.length-1]],e}),Ie(n,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),Ie(n,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),Ie(n,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),Ie(n,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&mt(a.parent);)a=a.parent;return Ma(a,"update",s,i)}),Ie(n,"parentUpdate",function(s,i={}){if(e.parent)return Ma(e.parent,"update",s,i)}),Ie(n,"quietReplace",function(s,i={}){return e.$replace(s,{quiet:!0,...i})}),Object.getOwnPropertyDescriptor(n,"root")||Object.defineProperty(n,"root",{get:function(){let s=e,i=mt(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,mt(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]},o={update(n){if(!n||typeof n!="object")return e;for(let s in n)e[s]=n[s];return e},apply(n){if(typeof n!="function")return e;let s=n(e);return s?e.$update(s):e},parse(){return{...e}},toggle(n){return e[n]=!e[n],e},set(n){if(!n||typeof n!="object")return e;r();for(let s in n)e[s]=n[s];return e},replace(n){return e.$set(n)},clean(){return r(),e}};for(let n in o)if(Ff(e,"$"+n,o[n]),typeof e[n]!="function"){if(Object.prototype.hasOwnProperty.call(e,n)){$c(n,"");continue}Ff(e,n,o[n])}};var Pm=function(t,e,r){return t.state=Nf(t,e,r),t.state},Nf=function(t,e,r){let{__ref:o}=t,n=t.state;if(n==null||n===!1){let s=e?.state||{};return fe(t,s),s}if(typeof n=="string")return o&&(o.__state=n),o.__stateType="string",w1(n,t,e);if(typeof n=="number"||typeof n=="boolean"){o&&(o.__state=n,o.__stateType=typeof n,o.__hasRootState=!0);let s=tr({value:n});return s.__element=t,e?.state&&(s.parent=e.state),fe(t,s),s}if(typeof n=="function"&&(n=n(t,e?.state)||{}),typeof n=="object"&&!mt(n)){o&&(o.__hasRootState=!0),n.isRootState&&o&&(o.__hasRootState=!0);let s=tr({...n});if(s.__element=t,!Object.getOwnPropertyDescriptor(s,"root")){let i=e?.state?.root||e?.state||s;Object.defineProperty(s,"root",{get:()=>i,enumerable:!1,configurable:!0})}return e?.state&&(s.parent=e.state,e.state.__children&&(e.state.__children[t.key]=s)),fe(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,r),s}return mt(n)?(n.__element=t,n):e?.state||{}};function Rm(t,e){if(!e)return t;let r=e.split("/"),o=t;for(let n of r){if(o==null)return{};o=o[n]}return o??{}}function w1(t,e,r){if(!r?.state)return{};if(t===".")return r.state;if(t.startsWith("../")){let n=t.slice(3),s=r.state?.parent;return n&&s?Rm(s,n):s??r.state??{}}if(t.startsWith("~/")){let n=r.state;for(;n?.parent;)n=n.parent;let s=t.slice(2);return s?Rm(n,s):n??{}}let o=Rm(r.state,t);if(o&&typeof o=="object"&&!mt(o)&&!Object.getOwnPropertyDescriptor(o,"root")){let n=r.state?.root||r.state;Object.defineProperty(o,"root",{get:()=>n,enumerable:!1,configurable:!0})}return o}var Im=(t,e)=>{if(!t)return $w;let r=k1(t,e);return!r||!r.state?$w:C1(r.state)},Dm=()=>Ic()!=null,S1=128;function k1(t,e){let r=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,o=t,n=null;for(let s=0;s<S1&&o;s++){if(r(o)&&o.state)return o;if(o.state&&!n&&(n=o),!o.parent||o.parent===o)break;o=o.parent}return n}var v1={get(t,e){return t[e]}},Dw=new WeakMap,C1=t=>{let e=Dw.get(t);return e||(e=new Proxy(t,v1),Dw.set(t,e)),e},$w=new Proxy(Object.create(null),{get(){},has(){return!1}});var jf="3.14.782";var Lw="__SMBLS_ELEMENT_ID_ENGINE__",Mw=(t,e,r)=>{let o=e||jf,n=r||(typeof globalThis<"u"?globalThis:null);if(!n)return t;let s=n[Lw];return s&&s.engine&&s.version===o?s.engine:(s||(n[Lw]={version:o,engine:t}),t)};var Hw=Mw({uniqId:1,scopedStyleId:0},jf),Na=[],Nm=!1;function Fw(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function E1(){return typeof document<"u"&&document.visibilityState==="hidden"}var A1=250;function Ww(){if(!Nm){if(Nm=!0,typeof requestAnimationFrame!="function"){setTimeout(Ba,0);return}E1()?setTimeout(Ba,A1):requestAnimationFrame(Ba)}}var T1=300,O1=15e4;function Ba(){if(Nm=!1,!Na.length)return;let t=Na.splice(0,Na.length);for(let e=0;e<t.length;e++){let r=t[e];if(r.node){if(!r.node.isConnected){let o=r.__ref||(r.__ref={});o.__mountAttempts=(o.__mountAttempts||0)+1,o.__mountFirstAttemptAt==null&&(o.__mountFirstAttemptAt=Fw());let n=Fw()-o.__mountFirstAttemptAt;o.__mountAttempts<=T1&&n<O1?(Na.push(r),Ww()):console.warn("[DOMQL] onMounted dropped after",o.__mountAttempts,"attempts /",n,"ms \u2014 node never connected:",r.key||r.tag||r);continue}Qt("Mounted",r,r.__ref?.__mountOptions||{})}}}function jm(t,e){typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,Na.push(t),Ww())}function Nw(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&Et("contentUpdate",t,e);let r=t.context?.designSystem;r&&it(r);try{t.onContentUpdate(t,t.state,t.context,e)}catch(o){if(t.context?.plugins?.length&&Et("error",t,{hook:"onContentUpdate",error:o})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',o),t.context?.strictMode)throw o}finally{r&&et()}}function Xn(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function R1(t){return t.charAt(2).toLowerCase()+t.slice(3)}function P1(t){return t.toLowerCase()}function Bm(t){let e=t.charCodeAt(0);return e===58||e===64||e===38}function ja(t,e){let r={...t};for(let o in e){let n=r[o],s=e[o];n&&s&&typeof n=="object"&&typeof s=="object"&&!Array.isArray(n)&&!Array.isArray(s)&&typeof n!="function"&&typeof s!="function"?r[o]=ja(n,s):r[o]=s}return r}function ae(t,e,r,o={},n){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});let s=Object.create(null);s.key=r||t.key||`_${Hw.uniqId++}`,s.parent=e||null,s.context=t.context||e?.context||o.context||{},s.context.__create||(s.context.__create=ae);let i=s.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||s,path:e?.__ref?.path?[...e.__ref.path,s.key]:[s.key],origin:t};if(r&&!t.extends&&!t.extend){let p=r.indexOf("_"),m=r.indexOf("."),b=p>0?p:-1;if(m>0&&(b<0||m<b)&&(b=m),b>0){let _=r.substring(0,b),y=s.context?.components;y&&(y[_]||y["smbls."+_])?t={...t,extends:_}:y&&It()&&(/^[A-Z]\w*_\d+$/.test(r)||/^[A-Z]\w*\.\w+$/.test(r))&&console.warn(`[smbls] auto-extend: key "${r}" looks like an instance of "${_}" but neither "${_}" nor "smbls.${_}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}zn(s,t,o);let a=new Set(["childProps","attr","style","scope","data"]),c=s.props&&typeof s.props=="object"?s.props:null;for(let p in t){if(p==="parent"||p==="node"||p==="__ref"||p==="extends"||p==="context"||p==="props")continue;let m=t[p],b=s[p],_=b&&m&&typeof b=="object"&&typeof m=="object"&&!Array.isArray(b)&&!Array.isArray(m)&&typeof b!="function"&&typeof m!="function";_&&p.charCodeAt(0)>=65&&p.charCodeAt(0)<=90?s[p]=ja(b,m):_&&a.has(p)?s[p]={...b,...m}:_&&Bm(p)?s[p]=ja(b,m):s[p]=m}function l(p){for(let m in p){let b=p[m],_=s[m],y=_&&b&&typeof _=="object"&&typeof b=="object"&&!Array.isArray(_)&&!Array.isArray(b)&&typeof _!="function"&&typeof b!="function";y&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?s[m]=ja(_,b):y&&a.has(m)?s[m]={..._,...b}:y&&Bm(m)?s[m]=ja(_,b):s[m]=b}}c&&l(c),t.props&&typeof t.props=="object"&&l(t.props),t.data!==void 0&&(s.data=t.data),t.classlist!==void 0&&(s.classlist=t.classlist),t.text!==void 0&&(s.text=t.text),t.html!==void 0&&(s.html=t.html);let f=s.scope&&typeof s.scope=="object"?s.scope:null,u=e?.scope,d=s.context&&typeof s.context.globalScope=="object"&&s.context.globalScope||null,h=u||d||null;if(t.scope!==void 0||f){let p={};f&&Object.assign(p,f),t.scope!==void 0&&Object.assign(p,t.scope),s.scope=Dc(p,h)}else h&&(s.scope=h);if(t.if!==void 0&&(s.if=t.if),Kn(s),I1(s,e,t),s.if!=null){let p;if(typeof s.if=="function")try{p=s.if(s,s.state,s.context)}catch(m){if(p=!1,i.__ifError=m,typeof console<"u"&&console.warn){let b=s.key||s.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${b} \u2014 treating as false:`,m?.message||m)}}else p=s.if;i.__if=!!p}if(i.__if)typeof s.if=="function"&&(i.__ifInitialized=!0);else return e&&(e[s.key]=s),typeof s.if=="function"&&Gw(s,i,s.if),s;s.tag||(s.tag=Mr(s)),Qt("Init",s,o);let g=s.node=Fr(s);if(!g)return s;if(s.tag==="fragment"){let m=(s.context?.document||globalThis.document).createComment("");g.appendChild(m),i.__fragmentAnchor=m}Qt("AttachNode",s,o),g.setAttribute&&s.key&&g.setAttribute("data-key",s.key),e&&(e[s.key]=s,e.__ref?.__children&&(e.__ref.__children.includes(s.key)||e.__ref.__children.push(s.key))),g.setAttribute&&s.context?.scopeSelector&&s.context.scopeSelector!==":root"&&s.context.key&&s.key===s.context.key&&g.setAttribute("data-smbls-app",s.context.key),s.id&&g.setAttribute&&(g.id=s.id),Jw(s,o),Kw(s),Um(s),Xw(s),K1(s);try{Qw(s,o)}catch(p){if(typeof console<"u"&&console.error){let m=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${m}:`,p?.message||p,p?.stack?`
53
- `+p.stack.split(`
51
+ Do NOT trust any browser measurement taken on this page until that reads clean.`),!0}function yw(){try{let e=E(),t=e&&(e.CSS_VARS||e.cssVars);return t?Object.keys(t).length:0}catch{return 0}}function aw(e){kf||Ze.variable>0||Ze.atomic>0||bw(Math.max(e,yw()))}function om(e){let t=e&&(e.CSS_VARS||e.cssVars);return bw(t?Object.keys(t).length:yw())}function bw(e){let t=Cf();if(e===0)return{ok:!0,reason:"no-design-system",stats:t,varCount:e};if(!Ef())return{ok:!0,reason:"no-sheet",stats:t,varCount:e};if(t.variable>0||t.atomic>0)return{ok:!0,reason:null,stats:t,varCount:e};let r=t.invalid>0?"every rule was rejected as malformed":"no rule was ever produced";return TT(r,e),{ok:!1,reason:r,stats:t,varCount:e}}var OT={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 Dn(e){return e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}function vf(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=t*16777619>>>0;return t.toString(36)}function RT(e){let t=String(e);return t.length<=20?t.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():vf(t)}var PT={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select"};function Uo(e,t){let r=PT[e];return r?`${e}:${t};${r}:${t};`:`${e}:${t};`}function tm(e){let t="";for(let r in e){let n=e[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+=Uo(i?s:Dn(s),n[s])}t+=`${r}{${o}}`}return t}var DT="@media (hover: hover)",IT=/(?:^|[^\\]):hover(?![\w-])/;function sm(){try{let e=E();if(e&&e.hoverMedia===!1)return!1}catch{}return!0}function pr(e,t,r){return r===!1||!IT.test(t)||r===void 0&&!sm()?e:`${DT}{${e}}`}function cw(e,t,r){let n=(r?r+"":"")+e+":"+t,o=Vo.get(n),s=o?null:Dn(e);if(!o){let c=OT[e]||vf(e),l=RT(t);o=r?`_${r}_${c}-${l}`:`_${c}-${l}`,Vo.set(n,o)}if(typeof t=="string"&&(t.indexOf("}")!==-1||t.indexOf("{")!==-1))return o;let i=s||Dn(e),a=`.${o}{${Uo(i,t)}}`;return Rt(a,void 0,"atomic"),o}var lw=new WeakMap,fw=new WeakMap;function Rt(e,t,r){let n=Ef(t,$T(e));if(!n)return Ze.dropped++,"dropped";let o=lw.get(n);if(o||(o=new Set,lw.set(n,o)),o.has(e))return Ze.duplicate++,Ze[r||"global"]++,"duplicate";let s=fw.get(n);if(s&&s.has(e))return Ze.invalid++,"invalid";try{n.insertRule(e,n.cssRules.length)}catch{return s||(s=new Set,fw.set(n,s)),s.add(e),Ze.invalid++,"invalid"}return o.add(e),Ze[r||"global"]++,"inserted"}var Pt="0:0",uw="1:0",dw=/\((max|min)-width:\s*([\d.]+)(px|em|rem)?\)/g;function $T(e){if(typeof e!="string"||!e)return Pt;if(e.charCodeAt(0)===64){if(!e.startsWith("@media")&&!e.startsWith("@supports")&&!e.startsWith("@container"))return Pt;let t=1/0,r=-1/0;dw.lastIndex=0;let n;for(;n=dw.exec(e);){let o=parseFloat(n[2])*(n[3]==="em"||n[3]==="rem"?16:1);n[1]==="max"?t=Math.min(t,o):r=Math.max(r,o)}return t!==1/0?"2:"+-t:r!==-1/0?"3:"+r:uw}return e.charCodeAt(0)!==46||/^\.[\w-]+\{/.test(e)?Pt:uw}var pw=e=>{let t=e.indexOf(":");return[Number(e.slice(0,t)),Number(e.slice(t+1))]},LT=(e,t)=>{let[r,n]=pw(e),[o,s]=pw(t);return r!==o?r<o:n<s},MT=e=>e.getAttribute("data-tier")||Pt,hw=new WeakMap;function Ef(e,t){let r=e||$a();if(!r||!r.head)return null;let n=t||Pt,o=hw.get(r);o||(o=new Map,hw.set(r,o));let s=o.get(n);if(s&&s.ownerNode&&s.ownerNode.parentNode===r.head)return s;n!==Pt&&Ef(r,Pt);let i=n===Pt?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!==Pt&&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,MT(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===Pt&&(mw=a),a}function FT(e){let t=e||$a();if(!t||!t.head)return[];let r=[],n=t.head.querySelectorAll("style[data-smbls]");for(let o=0;o<n.length;o++)n[o].sheet&&r.push(n[o].sheet);return r}var NT=8;function at(e,t,r){if(!e||typeof e!="object")return"";let n=null,o=0,s=[],i=[];for(let c in e){let l=e[c];l==null||l===!1||l===""||(typeof l=="object"?i.push([c,l]):em?(n||(n=[]),n.push(c,String(l)),o++):s.push(cw(c,String(l),r)))}if(n&&o>=NT){let c=n.join("\0"),l=em(c),f=l.indexOf("\0"),u=l.substring(0,f),d=l.substring(f+1);if(d){let p=d.split(`
52
+ `);for(let g=0;g<p.length;g++)p[g]&&Rt(p[g],void 0,"atomic")}s.push(u)}else if(n)for(let c=0;c<n.length;c+=2)s.push(cw(n[c],n[c+1],r));let a=[];for(let c=0;c<i.length;c++)a.push(UT(i[c][0],i[c][1],r));return s.concat(a).join(" ").trim()}var gw=new Map,jT=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function Da(e){return/^@(media|supports|container)\b/.test(e)}function BT(e){return typeof e!="string"||!e||Da(e)?!1:e.split(",").every(t=>jT.test(t.trim()))}function UT(e,t,r){let n=JSON.stringify(t),o=e.indexOf(":hover")!==-1||n.indexOf(":hover")!==-1,s=o&&sm(),i=(r?r+"":"")+e+n+(o&&!s?"rawhover":""),a=Vo.get(i);if(a){let b=gw.get(a);if(b)for(let y=0;y<b.length;y++)Rt(b[y],void 0,"atomic");return a}a=r?`_${r}_c${vf(i)}`:`_c${vf(i)}`;let c=`.${a}`,l=BT(e)?`.${a}.${a}`:c,f="",u=[],d=b=>typeof b=="string"&&(b.indexOf("{")!==-1||b.indexOf("}")!==-1),p=(b,y)=>{let x="";for(let S in y){let v=y[S];if(v!=null)if(typeof v=="object")p([...b,S],v);else{if(d(v))continue;x+=Uo(Dn(S),v)}}x&&(b.length===0?f+=x:u.push({chain:b,body:x}))};p([],t);let g=b=>b.startsWith(":")||b.startsWith("["),h=(b,y=!0)=>{let x=y&&b.length===1?l:c;if(!b.length)return x;let S=b[0].split(",").map(v=>v.trim()).map(v=>v.includes("&")?v.replace(/&/g,x):g(v)?`${x}${v}`:`${x} ${v}`);for(let v=1;v<b.length;v++){let D=b[v].split(",").map(T=>T.trim()),L=[];for(let T of S)for(let R of D)R.includes("&")?L.push(R.replace(/&/g,T)):g(R)?L.push(T+R):L.push(T+" "+R);S=L}return S.join(", ")},m=[],_=(b,y)=>{let x=b.filter(Da),S=h(b.filter(D=>!Da(D)),x.length===0),v=`${S}{${y}}`;for(let D=x.length-1;D>=0;D--)v=`${x[D]}{${v}}`;v=pr(v,S,s),m.push(v),Rt(v,void 0,"atomic")};f&&_([e],f);for(let b of u)_([e,...b.chain],b.body);return gw.set(a,m),Vo.set(i,a),a}function Se(e){if(e==null||typeof e!="string"&&typeof e!="object")return;if(Ef(),typeof e=="string"){let s=e.indexOf("--")!==-1;Rt(e,void 0,s?"variable":"global"),s&&aw(1);return}let t=sm(),r=0,n=Object.keys(e),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=e[s];if(s.startsWith("@keyframes")){let a=tm(i);a&&Rt(`${s}{${a}}`,void 0,"keyframes");continue}if(Da(s))for(let a in i){let c=i[a];if(a.startsWith("@keyframes")){let l=tm(c);l&&Rt(`${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:Dn(u);l+=Uo(p,c[u])}r+=f,Rt(pr(`${s}{${a}{${l}}}`,a,t),void 0,f?"variable":"global")}else{let l=a.charCodeAt(0)===45&&a.charCodeAt(1)===45;l&&r++;let f=l?a:Dn(a);Rt(`${s}{${Uo(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:Dn(f);a+=Uo(p,u)}}if(r+=l,a&&Rt(pr(`${s}{${a}}`,s,t),void 0,l?"variable":"global"),c){let f=[],u=[];for(let d in i)typeof i[d]=="object"&&i[d]!==null&&(Da(d)?f.push(d):u.push(d));f.sort((d,p)=>{let g=h=>{let m=h.match(/max-width:\s*(\d+)/);return m?parseInt(m[1]):0};return g(p)-g(d)});for(let d of u)Se({[`${s} ${d}`]:i[d]});for(let d of f)Se({[d]:{[s]:i[d]}})}}}r>0&&aw(r)}function zo(e,t){return Rt(`@keyframes ${e}{${tm(t)}}`,void 0,"keyframes"),e}function _w(){Vo.clear(),mw=null}function im(){return Vo.size}P();var ey={};I(ey,{DELEGATED_EVENTS:()=>Go,LIFECYCLE_EVENTS:()=>Ur,MIXINS:()=>Af,NON_BUBBLING_EVENTS:()=>Tf,REGISTRY:()=>Ve,SVG_TAGS:()=>qo,addDelegatedEvent:()=>La,addMethods:()=>es,applyExtends:()=>Xo,cacheNode:()=>Br,create:()=>ct,createHTMLNode:()=>Wo,detectTag:()=>jr,dispose:()=>Wr,flushMounts:()=>za,globalEventKeyInfo:()=>Of,isSvgTag:()=>Ko,isValidTag:()=>Ho,refreshContextProto:()=>Ff,registerEvent:()=>Yo,registerGlobalEvent:()=>Rf,remove:()=>Qo,removeDelegatedEvent:()=>Ma,update:()=>Zo});var cm="http://www.w3.org/2000/svg",qo=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"]),VT=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 Ho(e){return VT.has(e)||qo.has(e)}function Ko(e){return qo.has(e)}function jr(e){let{tag:t,key:r}=e;if(typeof t=="function")try{t=t(e,e.state,e.context)}catch(s){t=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(t===!0&&(t=r),typeof t=="string"&&Ho(t))return t;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]),Ho(o)&&!n.has(o)?o:"div"}var xw={};function Wo(e,t){let r=t?.context?.document||globalThis.document;if(!r)return null;if(e==="string")return r.createTextNode(t?.text||"");if(e==="fragment")return r.createDocumentFragment();if(Ko(e)){let n=t?.parent;if(e==="svg"||n?.node?.namespaceURI===cm)return r.createElementNS(cm,e);if(e!=="svg")return r.createElement("div")}return r.createElement(e)}function Br(e){let t=e.tag=jr(e),n=Ko(t)&&(t==="svg"||e.parent?.node?.namespaceURI===cm)?"svg:"+t:t,o=e?.context?.document||globalThis.document,s=xw[n];if(s||(s=xw[n]=Wo(t,e)),!s)return null;let i=o&&s.ownerDocument!==o?Wo(t,e):s.cloneNode(!0);return t==="string"&&(i.nodeValue=e.text||""),i}var Ve=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"]),Af={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},Ur=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"]),Tf=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"]),lm=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),Go=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 um=new WeakMap,zT={passive:!0},HT={passive:!0,capture:!0},dm=(e,t)=>lm.has(e)?t?HT:zT:t||!1;function kw(e){let t=um.get(e);return t||(t={handlers:new Map,installed:new Set},um.set(e,t)),t}function WT(e,t){let r=kw(t);if(r.installed.has(e))return;r.installed.add(e);let n=e==="focus"||e==="blur"||e==="focusin"||e==="focusout"||e==="mouseenter"||e==="mouseleave",o=e==="mouseenter"||e==="mouseleave";t.addEventListener(e,s=>{let i=s.target;for(;i&&i!==t;){let a=r.handlers.get(e);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}},dm(e,n))}function La(e,t,r,n){n||(n=t.ownerDocument?.documentElement||t.getRootNode());let o=kw(n);WT(e,n),o.handlers.has(e)||o.handlers.set(e,new WeakMap),o.handlers.get(e).set(t,r)}function Ma(e,t,r){r||(r=t.ownerDocument?.documentElement||t.getRootNode());let n=um.get(r);if(!n)return;let o=n.handlers.get(e);o&&o.delete(t)}function ww(e){return Go.has(e)&&!Ur.has(e)}function vw(e,t){let{context:r}=e,n=r?.designSystem;return o=>{n&&oe(n);try{let s=t.call(e,o,e,e.state,r);if(s&&typeof s.then=="function"){s.catch(i=>{e.error=i,console.error("[DOMQL] Async event error:",i)}).finally(()=>{n&&te()});return}}catch(s){if(e.error=s,console.error("[DOMQL] Event error:",s),r?.strictMode)throw s}n&&te()}}function Yo(e,t,r){let{node:n,context:o}=t;if(!n)return;let s=vw(t,r),i=Tf.has(e);if(!i&&ww(e)){let a=o?.rootNode||n.ownerDocument?.documentElement;La(e,n,s,a)}else n.addEventListener(e,s,dm(e,!1));t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{if(!i&&ww(e)){let a=o?.rootNode||n.ownerDocument?.documentElement;Ma(e,n,a)}else n.removeEventListener(e,s,dm(e,!1))})}var fm=[["onDocument","document"],["onWindow","window"],["onVisualViewport","visualViewport"],["onMediaQuery","mediaQuery"]];function Of(e){if(typeof e!="string")return null;for(let t=0;t<fm.length;t++){let r=fm[t][0];if(e.length<=r.length||!e.startsWith(r))continue;let n=e.charCodeAt(r.length);if(!(n<65||n>90))return{target:fm[t][1],eventName:e.slice(r.length).toLowerCase()}}return null}var qT=/^[A-Za-z_$][\w$]*$/;function KT(e,t,r){let n=t,o=!1,s,i=!1,a=null;if(t&&typeof t=="object"&&typeof t!="function"&&(n=t.handler,o=!!t.capture,i=!!t.once,typeof t.passive=="boolean"&&(s=t.passive),typeof t.query=="string"&&(a=t.query)),typeof n=="string"&&qT.test(n)){let c=n;n=function(f){return e.call(c,f)}}return typeof n!="function"?null:(s===void 0&&(s=lm.has(r)),{handler:n,capture:o,passive:s,once:i,query:a})}function GT(e,t,r){let n=e.node?.ownerDocument||e.context?.document||(typeof document<"u"?document:null);if(!n||typeof n.addEventListener!="function")return null;if(t==="document")return n;let o=n.defaultView||(typeof window<"u"?window:null);if(!o)return null;if(t==="window")return typeof o.addEventListener=="function"?o:null;if(t==="visualViewport"){let s=o.visualViewport;return s&&typeof s.addEventListener=="function"?s:null}if(t==="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 YT(e,t,r,n){try{return e.addEventListener(t,r,n),!0}catch{return typeof e.addListener=="function"?(e.addListener(r),!0):!1}}function XT(e,t,r,n){try{e.removeEventListener(t,r,n)}catch{typeof e.removeListener=="function"&&e.removeListener(r)}}function ZT(e){let t=e.node;if(!t)return!1;let r=t.nodeType===11?e.__ref?.__fragmentAnchor:t;return r?r.isConnected!==!1:!1}function Rf(e,t,r){if(t.__ref){if(Array.isArray(r)){if(e.target!=="mediaQuery")return;for(let o=0;o<r.length;o++)Sw(e,t,r[o]);return}Sw(e,t,r)}}function Sw(e,t,r){let n=t.__ref,o=KT(t,r,e.eventName);if(!o||e.target==="mediaQuery"&&e.eventName!=="change")return;let s=GT(t,e.target,o);if(!s)return;let i=e.target+":"+(o.query?o.query+":":"")+e.eventName+":"+(o.capture?1:0);if(n.__globalEvents&&n.__globalEvents.has(i))return;let a=vw(t,o.handler),c=f=>{ZT(t)&&a(f)},l={capture:o.capture,passive:o.passive,once:o.once};YT(s,e.eventName,c,l)&&(n.__globalEvents||(n.__globalEvents=new Map),n.__globalEvents.set(i,{target:s,eventName:e.eventName,listener:c,options:l}),n.__eventCleanup||(n.__eventCleanup=[]),n.__eventCleanup.push(()=>{XT(s,e.eventName,c,l),n.__globalEvents&&n.__globalEvents.delete(i)}))}function Cw(e){let t=[];return e.extends&&(Array.isArray(e.extends)?t.push(...e.extends):t.push(e.extends)),e.extend&&(Array.isArray(e.extend)?t.push(...e.extend):t.push(e.extend)),t}function Xo(e,t,r){let n=Cw(t);if(!n.length)return;let s=(e.context||r?.context||{}).components||{};for(let i=0;i<n.length;i++){let a=Ew(n[i],s);a&&a!==t&&Aw(e,a,r,new Set([t]))}}function Ew(e,t){if(typeof e=="string"){if(e.includes(">")){let r=e.split(">").map(o=>o.trim()),n=t[r[0]]||t[`smbls.${r[0]}`];for(let o=1;o<r.length&&n;o++)n=n[r[o]];return n||null}return t[e]||t[`smbls.${e}`]||null}return typeof e=="object"&&e!==null?e:null}function Aw(e,t,r,n=new Set){if(n.has(t))return;n.add(t);let o=Cw(t);if(o.length){let i=(e.context||r?.context||{}).components||{};for(let a=0;a<o.length;a++){let c=Ew(o[a],i);c&&Aw(e,c,r,n)}}for(let s in t){if(s==="extends"||s==="extend")continue;let i=t[s];e[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?e[s]={...i}:e[s]=i:typeof e[s]=="object"&&typeof i=="object"&&!Array.isArray(e[s])&&!Array.isArray(i)&&e[s]!==null&&i!==null?e[s]=Tw(e[s],i):e[s]=i}}function Tw(e,t){let r={...e};for(let n in t){let o=r[n],s=t[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Tw(o,s):r[n]=s}return r}oo();P();var JT=["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"],Pf={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"]},Rw=["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"],zr=e=>e.startsWith("aria")&&e.length>4&&e.charCodeAt(4)>=65&&e.charCodeAt(4)<=90?"aria-"+e.charAt(4).toLowerCase()+e.slice(5).replace(/([A-Z])/g,t=>"-"+t.toLowerCase()):e.startsWith("data")&&e.length>4&&e.charCodeAt(4)>=65&&e.charCodeAt(4)<=90?"data-"+e.charAt(4).toLowerCase()+e.slice(5).replace(/([A-Z])/g,t=>"-"+t.toLowerCase()):Pw(e),QT=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate"]),Pw=e=>QT.has(e)?e.toLowerCase():null,e1=new Set(["draggable","contenteditable","spellcheck","autocorrect"]),hr=e=>typeof e=="string"&&(e1.has(e)||e.startsWith("aria-")),Jt=(e,t)=>t!==!0&&t!==!1?t:hr(e)?t?"true":"false":t===!0?"":t,Hr=(e,t)=>t.startsWith("aria-")||t.startsWith("data-")||zr(t)||Pf.default.includes(t)?!0:Object.prototype.hasOwnProperty.call(Pf,e)?Pf[e].includes(t):!1,gm=e=>{if(!w(e))return!1;let t=e.toLowerCase();return Rw.includes(t)},t1=(e,t,r)=>{let n={};for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){if(r&&o in r)continue;if(o==="aria"&&t[o]&&typeof t[o]=="object"){for(let a in t[o])ke(t[o][a])&&(n["aria-"+a]=t[o][a]);continue}if(o==="data"&&t[o]&&typeof t[o]=="object"){for(let a in t[o])if(ke(t[o][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());n["data-"+c]=t[o][a]}continue}let s=Hr(e,o),i=gm(o);if(ke(t[o])&&(s||i)){let a=zr(o)||o;n[a]=t[o]}}return n},r1=(e,t)=>{let r={};if(e.attr)for(let n in e.attr)r[n]=e.attr[n](t,t.state,t.context);if(e.aria&&typeof e.aria=="object")for(let n in e.aria){let o=e.aria[n];typeof o=="function"&&(r["aria-"+n]=o(t,t.state,t.context))}if(e.data&&typeof e.data=="object")for(let n in e.data){let o=e.data[n];if(typeof o=="function"){let s=n.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());r["data-"+s]=o(t,t.state,t.context)}}return r},Vr=(e,t)=>{let r=e.call("exec",t,e);if(r)return w(r)&&r.includes("{{")&&(r=e.call("replaceLiteralsWithObjectFields",r)),r},pm=(e,t)=>{let r=(e.preSrc||"")+(Vr(e,t)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:n}=e;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},hm={src:e=>pm(e,e.src),href:e=>Vr(e,e.href),action:e=>Vr(e,e.action),poster:e=>pm(e,e.poster),data:e=>Vr(e,e.data)},mm=e=>{let t=e.tag||"div",r={};for(let n in hm)if(e[n]!==void 0&&Hr(t,n)){let o=hm[n](e);o!==void 0&&(r[n]=o)}return r},Ow=(e,t)=>{let r=t.context?.cases?.[e];if(r!==void 0)return A(r)?r.call(t,t):!!r},n1=(e,t,r)=>{if(e==="$"){let o=Ow(t,r);return o===void 0&&(o=!!r[t]),o}let n=r[t]===!0||r.state[t];if(!n){let o=Ow(t,r);o!==void 0&&(n=o)}return e==="."?!!n:!n},o1=new Set(["$",".","!"]),s1=(e,t,r)=>{let n={},o=(s,i,a,c)=>{let l=i;n[s]=f=>{if(n1(a,c,f))return A(l)?l(f):l}};for(let s in e){let i=s.charAt(0);if(!o1.has(i))continue;let a=e[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 g=p.replace(/([A-Z])/g,h=>"-"+h.toLowerCase());o("data-"+g,a[l][p],i,c)}continue}let f=Hr(t,l),u=gm(l);if(!f&&!u)continue;let d=zr(l)||l;o(d,a[l],i,c)}}return n};function Zo(e={},t={}){let r=this,n=r.__ref;if(!n)return;if((typeof e=="string"||typeof e=="number")&&(e={text:e}),!t.preventListeners&&typeof r.onBeforeUpdate=="function"&&ym(n))try{let s=r.onBeforeUpdate(r,r.state,r.context,t);if(s&&typeof s.then=="function")s.then(()=>gr(n,!1),i=>{gr(n,!0),r.context?.plugins?.length&&Ee("error",r,{hook:"onBeforeUpdate",error:i})||console.error("[DOMQL] onBeforeUpdate error:",i)});else if(gr(n,!1),s===!1)return r}catch(s){throw gr(n,!0),s}let o=!e||Object.keys(e).length===0;if($c(()=>{if(e.state&&ge(r.state)&&r.state.$update(e.state),e.text!==void 0&&(r.text=e.text,!n.__exec.text&&r.node&&Jo(r,e.text??"")),e.html!==void 0&&(r.html=e.html,!n.__exec.html&&r.node&&(r.node.innerHTML=e.html)),e.style&&r.node?.style){if(!n.__exec.style)for(let s in e.style){let i=e.style[s];if(i==null)continue;let a=s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=String(i).replace(/\s*!important\s*$/,"");r.node.style.setProperty(a,c,"important")}r.style||(r.style={}),Object.assign(r.style,e.style)}if(e.attr&&r.node?.setAttribute){for(let s in e.attr){let i=e.attr[s];i==null||i===!1&&!hr(s)?r.node.removeAttribute(s):typeof i!="function"&&typeof i!="object"&&r.node.setAttribute(s,Jt(s,i))}r.attr||(r.attr={}),Object.assign(r.attr,e.attr)}if(e.data&&r.node?.dataset){for(let s in e.data)r.node.dataset[s]=e.data[s];r.data||(r.data={}),Object.assign(r.data,e.data)}for(let s in e){if(Ve.has(s)||s==="state")continue;let i=e[s],a=r[s];if(a&&a.__ref&&typeof a.update=="function")a.update(i,t);else if(typeof i=="object"&&i!==null){let c=s.charCodeAt(0);c>=65&&c<=90&&ct(i,r,s,t)}else s!=="text"&&s!=="html"&&s!=="style"&&s!=="attr"&&s!=="data"&&(r[s]=i)}}),r.node&&o&&n.__effects&&n.__effects.length)for(let s=0;s<n.__effects.length;s++){let i=n.__effects[s];i&&!i._disposed&&!i._isSubscribeToEffect&&typeof i._execute=="function"&&i._execute()}else if(r.node&&n.__conditionalRunners)for(let s of n.__conditionalRunners)s();return Ee("update",r),!t.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,t),r}function Wr(e){if(!e)return;let t=e.__ref;if(!t)return;t.__disposed=!0;try{typeof e.onBeforeRemove=="function"&&e.onBeforeRemove(e,e.state,e.context)}catch(n){console.error("[smbls] onBeforeRemove error:",n)}if(t.__effects){for(let n=0;n<t.__effects.length;n++)t.__effects[n].dispose();t.__effects.length=0}if(t.__eventCleanup){for(let n=0;n<t.__eventCleanup.length;n++)t.__eventCleanup[n]();t.__eventCleanup.length=0}if(t.__children){let n=t.__children.slice();t.__children.length=0;for(let o=0;o<n.length;o++){let s=e[n[o]];s&&s.__ref&&Wr(s)}}e.node?.parentNode?e.node.remove():e.tag==="fragment"&&t.__fragmentAnchor?.parentNode&&t.__fragmentAnchor.remove();let r=e.state?.$destroy||e.state?.destroy;if(typeof r=="function"&&e.state.__element===e&&r.call(e.state),e.parent?.__ref?.__children){let n=e.parent.__ref.__children.indexOf(e.key);n!==-1&&e.parent.__ref.__children.splice(n,1),delete e.parent[e.key]}try{typeof e.onRemove=="function"&&e.onRemove(e)}catch(n){console.error("[smbls] onRemove error:",n)}e.node=null,e.parent=null,e.__ref=null}function Qo(){Wr(this)}P();P();P();var i1=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],a1=["none","forwards","backwards","both"],c1=["normal","reverse","alternate","alternate-reverse"],l1=["running","paused"],f1=e=>/^[\d.]+m?s$/.test(e),u1=/^(?: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*\))$/,d1=e=>{let t=String(e).trim().toLowerCase();if(t===""||t==="none"||t==="initial"||t==="unset")return!0;let r=t.match(/[a-z0-9]+\([^()]*\)/g);return!r||r.join("").replace(/\s+/g,"")!==t.replace(/\s+/g,"")?!1:r.every(n=>u1.test(n.replace(/\s+/g,"")))},Dw=e=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(e).toLowerCase())||/^(none|initial|unset)$/.test(String(e).trim().toLowerCase()),p1={transform:d1,translate:Dw,rotate:e=>Dw(e)||/^\s*(?:[xyz]\s+)?0(?:deg|rad|turn|grad)?\s*$/.test(String(e).toLowerCase()),scale:e=>/^(none|initial|unset)$/.test(String(e).trim().toLowerCase())||/^(?:\s*1(?:\.0+)?)+\s*$/.test(String(e)),opacity:e=>/^(initial|unset)$/.test(String(e).trim().toLowerCase())||Number(e)===1},h1=e=>{let t=String(e).trim().toLowerCase();if(t==="from")return 0;if(t==="to")return 100;let r=t.match(/^(\d+(?:\.\d+)?)%$/);return r?Number(r[1]):null},g1=e=>{if(!k(e))return null;let t=null,r=-1;for(let n in e){let o=h1(n);o==null||!k(e[n])||o>=r&&(r=o,t=e[n])}return t},m1=e=>{let t=g1(e);if(!t)return!1;let r=Object.keys(t);if(!r.length)return!1;for(let n of r){let o=p1[n];if(!o)return!1;let s=t[n];if(s==null||typeof s=="object"||typeof s=="function"||!o(s))return!1}return!0},y1=(e,t)=>{if(k(e))return e;let{animation:r}=t.context&&t.context.designSystem||{},n=r&&r[e];return k(n)?n:null},b1=["reverse","alternate","alternate-reverse"],Iw=(e,t,r)=>{let n=r||t.animationDirection;return n&&b1.includes(String(n))?"both":m1(y1(e,t))?"backwards":"both"},_1=0,$w=new Map,bm=(e,t)=>{let{animation:r}=t.context&&t.context.designSystem||{};if(k(e)){let o=JSON.stringify(e),s=$w.get(o);if(s)return s;let i=`smbls-anim-${_1++}`,a=zo(i,e);return $w.set(o,a),a}let n=r&&r[e];return k(n)?zo(e,n):e},x1=(e,t)=>{let{animation:r}=t.context&&t.context.designSystem||{},n=e.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:f1(u)?s.push(u):i1.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):c1.includes(u)?c=u:a1.includes(u)?l=u:l1.includes(u)?f=u:o||(o=u);return{name:o,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},_m={animation:(e,t)=>{if(e!=null){if(w(e)&&e.includes(" ")){let r=x1(e,t);return{animationName:bm(r.name||e,t),animationDuration:r.durations[0]||it(t.animationDuration||"A").timing,animationDelay:r.durations[1]||it(t.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||wt(t.animationTimingFunction||"ease"),animationFillMode:r.fillMode||t.animationFillMode||Iw(r.name||e,t,r.direction),animationIterationCount:r.iterationCount!=null?r.iterationCount:t.animationIterationCount||1,animationPlayState:r.playState||t.animationPlayState,animationDirection:r.direction||t.animationDirection}}return{animationName:bm(e,t),animationDuration:it(t.animationDuration||"A").timing,animationDelay:it(t.animationDelay||"0s").timing,animationTimingFunction:wt(t.animationTimingFunction||"ease"),animationFillMode:t.animationFillMode||Iw(e,t),animationIterationCount:t.animationIterationCount||1,animationPlayState:t.animationPlayState,animationDirection:t.animationDirection}}},animationName:(e,t)=>({animationName:bm(e,t)}),animationDuration:e=>({animationDuration:it(e).timing}),animationDelay:e=>({animationDelay:it(e).timing}),animationTimingFunction:e=>({animationTimingFunction:wt(e)}),animationIterationCount:e=>({animationIterationCount:e}),animationFillMode:e=>({animationFillMode:e}),animationPlayState:e=>({animationPlayState:e}),animationDirection:e=>({animationDirection:e})};P();var xm={show:e=>e?void 0:{display:"none !important"},hide:e=>e?{display:"none !important"}:void 0,height:(e,t)=>M("height",e,t),width:(e,t)=>M("width",e,t),boxSizing:e=>Ae(e)?{boxSizing:"border-box"}:{boxSizing:e},boxSize:e=>{if(!w(e))return;let[t,r]=e.split(" ");return{...me("height",t),...me("width",r||t)}},inlineSize:(e,t)=>M("inlineSize",e,t),blockSize:(e,t)=>M("blockSize",e,t),minWidth:(e,t)=>M("minWidth",e,t),maxWidth:(e,t)=>M("maxWidth",e,t),widthRange:e=>{if(!w(e))return;let[t,r]=e.split(" ");return{...me("minWidth",t),...me("maxWidth",r||t)}},minHeight:(e,t)=>M("minHeight",e,t),maxHeight:(e,t)=>M("maxHeight",e,t),heightRange:e=>{if(!w(e))return;let[t,r]=e.split(" ");return{...me("minHeight",t),...me("maxHeight",r||t)}},size:e=>{if(!w(e))return;let[t,r]=e.split(" ");return{...M("inlineSize",t),...M("blockSize",r||t)}},minBlockSize:(e,t)=>M("minBlockSize",e,t),minInlineSize:(e,t)=>M("minInlineSize",e,t),maxBlockSize:(e,t)=>M("maxBlockSize",e,t),maxInlineSize:(e,t)=>M("maxInlineSize",e,t),minSize:e=>{if(!w(e))return;let[t,r]=e.split(" ");return{...me("minInlineSize",t),...me("minBlockSize",r||t)}},maxSize:e=>{if(!w(e))return;let[t,r]=e.split(" ");return{...me("maxInlineSize",t),...me("maxBlockSize",r||t)}},borderWidth:(e,t)=>M("borderWidth",e,t),borderTopWidth:(e,t)=>M("borderTopWidth",e,t),borderRightWidth:(e,t)=>M("borderRightWidth",e,t),borderBottomWidth:(e,t)=>M("borderBottomWidth",e,t),borderLeftWidth:(e,t)=>M("borderLeftWidth",e,t),textDecorationThickness:(e,t)=>M("textDecorationThickness",e,t),textUnderlineOffset:(e,t)=>M("textUnderlineOffset",e,t),padding:(e,t)=>M("padding",e,t),scrollPadding:(e,t)=>M("scrollPadding",e,t),paddingInline:e=>{if(!w(e))return;let[t,r]=e.split(" ");return{...me("paddingInlineStart",t),...me("paddingInlineEnd",r||t)}},paddingBlock:e=>{if(!w(e))return;let[t,r]=e.split(" ");return{...me("paddingBlockStart",t),...me("paddingBlockEnd",r||t)}},paddingTop:(e,t)=>M("paddingBlockStart",e,t),paddingBottom:(e,t)=>M("paddingBlockEnd",e,t),paddingLeft:(e,t)=>M("paddingInlineStart",e,t),paddingRight:(e,t)=>M("paddingInlineEnd",e,t),paddingBlockStart:(e,t)=>M("paddingBlockStart",e,t),paddingBlockEnd:(e,t)=>M("paddingBlockEnd",e,t),paddingInlineStart:(e,t)=>M("paddingInlineStart",e,t),paddingInlineEnd:(e,t)=>M("paddingInlineEnd",e,t),margin:(e,t)=>M("margin",e,t),marginInline:e=>{if(!w(e))return;let[t,r]=e.split(" ");return{...me("marginInlineStart",t),...me("marginInlineEnd",r||t)}},marginBlock:(e,t)=>{if(!w(t.marginBlock))return;let[r,n]=t.marginBlock.split(" ");return{...me("marginBlockStart",r),...me("marginBlockEnd",n||r)}},marginTop:(e,t)=>M("marginBlockStart",e,t),marginBottom:(e,t)=>M("marginBlockEnd",e,t),marginLeft:(e,t)=>M("marginInlineStart",e,t),marginRight:(e,t)=>M("marginInlineEnd",e,t),marginInlineStart:(e,t)=>M("marginInlineStart",e,t),marginInlineEnd:(e,t)=>M("marginInlineEnd",e,t),marginBlockStart:(e,t)=>M("marginBlockStart",e,t),marginBlockEnd:(e,t)=>M("marginBlockEnd",e,t),gap:e=>({gap:mf(e)}),columnGap:(e,t)=>Ot(t,"columnGap",e),rowGap:(e,t)=>Ot(t,"rowGap",e),flexWrap:e=>{if(e!=null)return{display:"flex",flexWrap:e}},flexFlow:(e,t)=>{let r=t.reverse;if(!w(e))return;let[n,o]=(e||"row").split(" ");return(e.startsWith("x")||e==="row")&&(n="row"),(e.startsWith("y")||e==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},flexAlign:e=>{if(!w(e))return;let[t,r]=e.split(" ");return{display:"flex",alignItems:t,justifyContent:r}},round:(e,t)=>dr(e??t.borderRadius,t,"round"),borderRadius:(e,t)=>dr(e??t.round,t,"borderRadius"),borderTopLeftRadius:(e,t)=>dr(e,t,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(e,t)=>dr(e,t,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(e,t)=>dr(e,t,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(e,t)=>dr(e,t,"borderBottomRightRadius","borderBottomRightRadius")};var wm={fontSize:e=>ka(e)||e,fontFamily:e=>({fontFamily:wa(e)||e}),fontWeight:e=>({fontWeight:e,fontVariationSettings:'"wght" '+e}),lineClamp:e=>{if(e!=null)return e==="none"?{WebkitLineClamp:"none",lineClamp:"none"}:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:String(e),lineClamp:String(e),overflow:"hidden"}}};var Sm={overflow:e=>({overflow:e}),cursor:(e,t,r,n)=>{if(!e)return;let o=n.assets&&n.assets[e];if(o&&o.content)e=`url(${o.content.src})`;else{let s=n.files&&n.files[e];s&&s.content&&(e=`url(${s.content.src})`)}return{cursor:e}},opacity:e=>e!=null?{opacity:String(e)}:void 0,visibility:e=>e!=null?{visibility:e}:void 0,pointerEvents:e=>e!=null?{pointerEvents:e}:void 0};var km={inset:(e,t)=>{if(t.call("isNumber",e))return{inset:e};if(t.call("isString",e))return{inset:e.split(" ").map(r=>we(r,"k").k).join(" ")}},left:e=>we(e,"left"),top:e=>we(e,"top"),right:e=>we(e,"right"),bottom:e=>we(e,"bottom"),verticalInset:e=>{if(typeof e!="string")return;let t=e.split(" ").map(r=>we(r,"k").k);return{top:t[0],bottom:t[1]||t[0]}},horizontalInset:e=>{if(typeof e!="string")return;let t=e.split(" ").map(r=>we(r,"k").k);return{left:t[0],right:t[1]||t[0]}}};P();var Df=0,If=()=>{Df++},$f=()=>{Df>0&&Df--},lt=({context:e,state:t})=>{let r=e?.designSystem,n=t?.root?.globalTheme||r?.globalTheme;return n&&n!=="auto"?n:Df>0?null:r&&r.resolvedTheme||null},Je=(e,t)=>{if(t==null||t==="")return;if(!k(t))return{[e]:t};let r={},n=!1;for(let o in t){let s=t[o];if(!(s==null||s==="")){if(k(s)){let i=Je(e,s);i&&(r[o]=i,n=!0);continue}r[o]={[e]:s},n=!0}}return n?r:void 0},vm={theme:(e,t)=>{if(e)return t.themeModifier?xt(e,`@${t.themeModifier}`):xt(e)},color:(e,t)=>{let r=lt(t);if(e)return Je("color",Pe(e,r))},background:(e,t)=>{let r=lt(t);if(e)return w(e)&&e.includes("gradient")&&e.includes("(")?{background:Ra(e,r)}:Je("background",Pe(e,r))},backgroundColor:(e,t)=>{let r=lt(t);if(e)return Je("backgroundColor",Pe(e,r))},backgroundImage:(e,t,r,n)=>{let o=lt(t);if(!e)return;let s=n.assets&&n.assets[e];if(s&&s.content)e=s.content.src;else{let i=n.files&&n.files[e];i&&i.content&&(e=i.content.src)}return Je("backgroundImage",gf(e,o))},textStroke:e=>{let t=pf(e);if(t!=null)return{WebkitTextStroke:t}},outline:e=>({outline:Zt(e)}),outlineWidth:(e,t)=>M("outlineWidth",e,t),outlineColor:(e,t)=>{let r=lt(t);if(e)return Je("outlineColor",Pe(e,r))},outlineOffset:(e,t)=>M("outlineOffset",e,t),border:e=>({border:Zt(e)}),borderColor:(e,t)=>{let r=lt(t);if(e)return Je("borderColor",Pe(e,r))},borderTopColor:(e,t)=>{let r=lt(t);if(e)return Je("borderTopColor",Pe(e,r))},borderBottomColor:(e,t)=>{let r=lt(t);if(e)return Je("borderBottomColor",Pe(e,r))},borderLeftColor:(e,t)=>{let r=lt(t);if(e)return Je("borderLeftColor",Pe(e,r))},borderRightColor:(e,t)=>{let r=lt(t);if(e)return Je("borderRightColor",Pe(e,r))},borderLeft:e=>({borderLeft:Zt(e)}),borderTop:e=>({borderTop:Zt(e)}),borderRight:e=>({borderRight:Zt(e)}),borderBottom:e=>({borderBottom:Zt(e)}),shadow:(e,t)=>{let r=lt(t);if(e)return Je("boxShadow",hf(e,r))},boxShadow:(e,t)=>{if(!w(e))return;let[r,n]=e.split("!importan"),o=lt(t),s=n?" !important":"",i=Oa(r.trim(),o);return w(i)?{boxShadow:i+s}:Je("boxShadow",i)},textShadow:(e,{context:t})=>Je("textShadow",Oa(e,t.designSystem.globalTheme)),columnRule:e=>({columnRule:Zt(e)})};var Fa={transition:e=>{let t=bf(e);if(t!=null)return{transition:t}},transitionDuration:e=>({transitionDuration:Pa(e)}),transitionDelay:e=>({transitionDelay:Pa(e)}),transitionTimingFunction:e=>({transitionTimingFunction:wt(e)}),transitionProperty:e=>({transitionProperty:e,willChange:e})};P();var Cm={flow:(e,t)=>{let r=t.reverse;if(!w(e))return;let[n,o]=(e||"row").split(" ");return(e.startsWith("x")||e==="row")&&(n="row"),(e.startsWith("y")||e==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},wrap:(e,t)=>{if(e!=null)return{display:"flex",flexWrap:e}},align:(e,t)=>{if(!w(e))return;let[r,n]=e.split(" ");return{display:"flex",alignItems:r,justifyContent:n}}};P();var w1=/(^|[^\w.-])([A-Za-z_][\w-]*)/g,Lw=e=>{if(!w(e))return e;let t=E().sizes;return t?e.replace(w1,(r,n,o)=>{let s=t[o];return s==null?r:n+String(s)}):e},Qt=e=>Lw(yf(e)),Em={gridTemplateColumns:e=>({gridTemplateColumns:Qt(e)}),gridTemplateRows:e=>({gridTemplateRows:Qt(e)}),gridAutoColumns:e=>({gridAutoColumns:Qt(e)}),gridAutoRows:e=>({gridAutoRows:Qt(e)}),area:e=>({gridArea:e}),template:e=>({gridTemplate:e}),templateAreas:e=>({gridTemplateAreas:e}),column:e=>({gridColumn:e}),columns:e=>({gridTemplateColumns:Qt(e)}),templateColumns:e=>({gridTemplateColumns:Qt(e)}),autoColumns:e=>({gridAutoColumns:Qt(e)}),columnStart:e=>({gridColumnStart:e}),row:e=>({gridRow:e}),rows:e=>({gridTemplateRows:Qt(e)}),templateRows:e=>({gridTemplateRows:Qt(e)}),autoRows:e=>({gridAutoRows:Qt(e)}),rowStart:e=>({gridRowStart:e}),autoFlow:e=>({gridAutoFlow:e})};var ye={..._m,...xm,...wm,...Sm,...km,...vm,...Fa,...Cm,...Em};var ve=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","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 S1=/^-?[A-Z][0-9]?$/,k1=/^[a-z][0-9]?$/,Mw=/var\(\s*(--[A-Za-z0-9-]+)/g,v1=e=>{let t=new Set,r=new Set;if(!e||typeof e!="object")return{knownLetters:t,knownVars:r};for(let n in e){let o=e[n];if(!(!o||typeof o!="object")){if(o.sequence&&typeof o.sequence=="object")for(let s in o.sequence)t.add(s);if(o.vars&&typeof o.vars=="object")for(let s in o.vars)r.add(s)}}return{knownLetters:t,knownVars:r}},C1=(e,t)=>{if(!t.size)return[];let r=e.split(/[(),\s]+/).filter(Boolean),n=new Set;for(let o of r){if(!S1.test(o))continue;let s=o.charCodeAt(0)===45?o.slice(1):o;t.has(s)&&n.add(o)}return[...n]},E1=(e,t)=>{if(!t.size)return[];let r=[];Mw.lastIndex=0;let n;for(;n=Mw.exec(e);){let o=n[1];if(t.has(o))continue;let s=o.lastIndexOf("-");if(s===-1)continue;let i=o.slice(s+1);if(!k1.test(i))continue;let a=o.slice(0,s+1)+i.toUpperCase();a!==o&&t.has(a)&&r.push({varName:o,corrected:a})}return r},Lf=new Set,Fw=(e,t,r)=>{if(!Oe()||!w(t)||!t)return;let n;try{n=E()}catch{return}let{knownLetters:o,knownVars:s}=v1(n);if(!o.size&&!s.size)return;let i=C1(t,o),a=E1(t,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}::${e}::bare::${l}::${t}`;Lf.has(f)||(Lf.add(f),console.warn(`[smbls/css-in-props] "${e}" on <${c}> looks like it contains an un-wrapped design-system token ("${l}") \u2014 "${e}" 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 "${e}" declaration (not just this argument). Wrap it in var(--<family>-${l.replace("-","")}) (or calc(-1 * var(--<family>-${l.replace("-","")})) for a negative). Value: "${t}"`))}for(let{varName:l,corrected:f}of a){let u=`${c}::${e}::case::${l}::${t}`;Lf.has(u)||(Lf.add(u),console.warn(`[smbls/css-in-props] "${e}" 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: "${t}"`))}};P();var A1=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,T1=(e,t,r)=>{let{context:n}=r;if(!n.designSystem?.media)return;let o=e.slice(1),s=n.designSystem.media[o],i=ft(t,r);if(!s)return{[e]: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(A1),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},Nw=(e,t,r)=>({[e]:ft(t,r)}),Na=(e,t,r)=>{let n=`&${e}`,o=ft(t,r);if(e.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}},Am=(e,t)=>{let r=t.context?.cases?.[e];if(r!==void 0)return A(r)?r.call(t,t):!!r},O1=(e,t,r)=>{let n=e.slice(1),o=Am(n,r);if(o===void 0&&(o=!!r[n]),!!o)return ft(t,r)},R1=(e,t,r)=>({[e]:t}),P1=(e,t,r)=>{let n=e.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=Am(n,r);s!==void 0&&(o=s)}if(o)return ft(t,r)},D1=(e,t,r)=>{let n=e.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=Am(n,r);s!==void 0&&(o=s)}if(!o)return ft(t,r)},Tm=(e,t)=>ft(e,t),Om={"@":T1,":":Na,"[":Na,"*":Na,"+":Na,"~":Na,"&":Nw,">":Nw,$:O1,"-":R1,".":P1,"!":D1};var Mf=Cr(),jw=(e,t,r)=>{let n=t?.context?.designSystem;n&&oe(n);try{let o={},s={},i=(a,c)=>{if(r.unpack){o={...o,...c};return}o[a]=c};for(let a in e){let c=e[a];if(c!==null)if(a==="class"&&t.call("isString",e.class)){let l=c.split(" ");if(l.length){let f=t.context.designSystem.class,u=l.reduce((d,p)=>pe(d,f[p]),{});o.designSystemClass=u}}else if(a==="true"){let l=fe(c,t);pe(o,Tm(l,t))}else if(t.classlist[a]){let l=t.classlist[a],f=A(l)?l(t,t.state,t.context):l;f&&i(a,f),!Mf&&k(o[a])&&(o[a].label=a)}else if(ye[a]){let l=fe(c,t);if(l===null)continue;O(l)&&(l=l.reduce((u,d)=>pe(u,d),{}));let f=ye[a](l,t,t.state,t.context);O(f)&&(f=f.reduce((u,d)=>pe(u,d),{})),f&&i(a,f),!Mf&&k(o[a])&&(o[a].label=a)}else if(ve.has(a)){let l=fe(c,t);if(l===null)continue;typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),Mf||Fw(a,l,t),i(a,{[a]:l}),!Mf&&k(o[a])&&(o[a].label=a)}else s[a]=c}return[o,s]}finally{n&&te()}},Bw=(e,t)=>{let r={};for(let n in e){let o=Om[n.slice(0,1)];if(o){let s=o(n,e[n],t);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]&&typeof r[i]=="object"&&typeof s[i]=="object"?Ke(r[i],s[i]):r[i]=s[i])}}return r},ft=(e,t,r={unpack:!0})=>{let[n,o]=jw(e,t,r),s=Bw(o,t),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return Qs(n,s);n._selectors=s}return n},I1=(e,t)=>{let r={};if(e.class)for(let n in e.class)r[n]=e.class[n](t);return r};P();var Uw=e=>{if(k(e))return ft(e,e)},$1=(e,t)=>{let r=Uw(e);return typeof t=="function"?t(r):at(r)};P();function Pm(e,t,r){let n=e?.context?.analyze;if(!n||!n.emit||t==="warn"&&!n.shouldCapture("warnings")||t==="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:t==="error"?"error":"warning",level:t,hook:t==="error"?"el.error":"el.warn",element:{key:e.key!=null?String(e.key):null,name:e.__name||null,tag:e.tag||null},message:o||null,args:r})}var Vw=new Set;function L1(e,t,r){let n=String(t);if(Vw.has(n))return;Vw.add(n);let o=e?.__ref?.path,s=Array.isArray(o)&&o.length?o.join("."):e?.key!=null?String(e.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.`;Pm(e,"error",[a]),console.error(a)}function M1(...e){return Pm(this,"warn",e),Fi.apply(this,e)}function F1(...e){return Pm(this,"error",e),mn.apply(this,e)}var zw={update:Zo,remove:Qo,getDB:Ui,getQuery:Vi,getRootData:$i,getChildren:Oi,getPath:Ri,nextElement:Ni,previousElement:ji,verbose:uo,warn:M1,error:F1,variables:Bi,spotByPath:Ti,set(e,t){let r=this.__ref;if(r){if(r.__setLocked){r.__setQueued={content:e,options:t};return}r.__setLocked=!0}try{if(this.removeContent(),e!=null){let n=this.context?.__create;n&&n(e,this,"content",t)}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(e){let t=this.context?.__create;if(!t)return this;let r=this.parent,n=this.key,o=this.parse();return this.remove(),t(o,r,n,e)},lookup(e){let t=this.parent;for(;t;){if(typeof e=="function"){if(e(t))return t}else if(typeof e=="string"){if(t.key===e)return t;if(t[e]&&t[e].__ref)return t[e]}t=t.parent}return null},lookdown(e){let t=this.__ref;if(!t?.__children)return null;for(let r of t.__children){let n=this[r];if(!n)continue;if(typeof e=="function"){if(e(n))return n}else if(typeof e=="string"&&n.key===e)return n;let o=n.lookdown?.(e);if(o)return o}return null},lookdownAll(e,t=[]){let r=this.__ref;if(!r?.__children)return t;for(let n of r.__children){let o=this[n];o&&(typeof e=="function"?e(o)&&t.push(o):typeof e=="string"&&o.key===e&&t.push(o),o.lookdownAll?.(e,t))}return t},getRef(){return this.__ref},getRoot:Ii,getRootState:Di,getRootContext:Li,getContext:Mi,parse(e){let t={},r=e?new Set(e):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){t[o]=n[o];continue}typeof this[o]!="function"&&(t[o]=this[o])}return t},parseDeep(e){let t=this.parse(e),r=this.__ref;if(r?.__children)for(let n of r.__children)this[n]?.parseDeep&&(t[n]=this[n].parseDeep(e));return t},keys(){return Object.keys(this)},log(...e){if(e.length){let t={};for(let r of e)t[r]=this[r];console.log(t)}else console.log(this)},setProps(e,t){return this.update(e,t)},setNodeStyles(e){if(this.node?.style)for(let t in e){let r=e[t];if(r==null)continue;let n=t.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(n,o,"important")}},call(e,...t){let r=this.context,n=r?.methods?.[e]||r?.functions?.[e]||r?.utils?.[e]||this[e];if(typeof n=="function")return n.call(this,...t);Oe()&&L1(this,e,n)},removeContent(){let e=this.__ref;if(!e?.__children)return;let t=this.content;if(t?.remove){t.remove(),delete this.content;let r=e.__children.indexOf("content");r!==-1&&e.__children.splice(r,1)}t?.node?.parentNode&&t.node.parentNode.removeChild(t.node)}},Rm=new WeakMap;function N1(e){if(!e)return zw;let t=Rm.get(e);if(t)return t;t=Object.create(zw);let r=e.methods;if(r)for(let n in r)t[n]=r[n];return Rm.set(e,t),t}function es(e){let t=N1(e.context);Object.setPrototypeOf(e,t)}function Ff(e){if(!e)return!1;let t=Rm.get(e);if(!t)return!1;let r=e.methods;if(!r)return!1;for(let n in r)t[n]=r[n];return!0}var Nf=[],jf=!1,qr=0;function Bf(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function Hw(e){let t=typeof globalThis<"u"?globalThis.scheduler:null;if(t&&typeof t.yield=="function"){t.yield().then(e,e);return}if(typeof MessageChannel=="function"){let r=new MessageChannel;r.port1.onmessage=()=>{r.port1.close(),e()},r.port2.postMessage(0);return}setTimeout(e,0)}function Dm(){return qr?Bf()-qr>=50:!1}var ts=0;function Im(){ts===0&&!qr&&(qr=Bf()),ts++}function $m(){ts>0&&ts--,ts===0&&!jf&&(qr=0)}function Lm(e){Nf.push(e),jf||(jf=!0,Hw(Ww))}function Ww(){for(qr=Bf();Nf.length;){let e=Nf.shift();try{e()}catch(t){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",t?.message||t)}if(Bf()-qr>=50)break}if(Nf.length){Hw(Ww);return}jf=!1,qr=0,ts=0}P();oo();var Bm={};I(Bm,{STATE_METHODS:()=>qw,applyInitialState:()=>Vf,applyStateMethods:()=>ut,callStateMethod:()=>ja,createState:()=>Fm,isTracking:()=>jm,useHostState:()=>Nm});var qw=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"]),Uf=(e,t,r)=>{Object.defineProperty(e,t,{value:r,enumerable:!1,configurable:!0,writable:!0})},Dt=(e,t,r,{onlyIfAbsent:n}={})=>{Uf(e,"$"+t,r),!(n&&Object.prototype.hasOwnProperty.call(e,t))&&Uf(e,t,r)},ja=(e,t,...r)=>{if(!e)return;let n=e["$"+t];if(typeof n=="function")return n.apply(e,r);let o=e[t];if(typeof o=="function")return o.apply(e,r)},ut=(e,t)=>{if(ge(t)){let o=t.__raw||t;Dt(o,"toggle",function(s,i={}){t[s]=!t[s]},{onlyIfAbsent:!0}),Dt(o,"set",function(s,i={}){return t.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&t.$update(s,i),t},{onlyIfAbsent:!0}),Dt(o,"setByPath",function(s,i,a={}){let c=s.split("."),l=t;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,t}),Dt(o,"getByPath",function(s){let i=s.split("."),a=t;for(let c=0;c<i.length;c++){if(a==null)return;a=a[i[c]]}return a}),Dt(o,"removeByPath",function(s,i={}){let a=s.split("."),c=t;for(let l=0;l<a.length-1;l++){if(c==null)return t;c=c[a[l]]}return c&&delete c[a[a.length-1]],t}),Dt(o,"reset",function(s={}){let i=t.$parse();return t.$set(i,s)}),Dt(o,"apply",function(s,i={}){if(typeof s=="function"){let a=s(t);return t.$update(a,i)}}),Dt(o,"applyFunction",function(s,i={}){if(typeof s=="function")return s(t),t.$update(t.$parse(),i)}),Dt(o,"rootUpdate",function(s,i={}){let a=t;for(;a?.parent&&ge(a.parent);)a=a.parent;return ja(a,"update",s,i)}),Dt(o,"parentUpdate",function(s,i={}){if(t.parent)return ja(t.parent,"update",s,i)}),Dt(o,"quietReplace",function(s,i={}){return t.$replace(s,{quiet:!0,...i})}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=t,i=ge(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,ge(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!t||typeof t!="object")return;let r=()=>{for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&delete t[o]},n={update(o){if(!o||typeof o!="object")return t;for(let s in o)t[s]=o[s];return t},apply(o){if(typeof o!="function")return t;let s=o(t);return s?t.$update(s):t},parse(){return{...t}},toggle(o){return t[o]=!t[o],t},set(o){if(!o||typeof o!="object")return t;r();for(let s in o)t[s]=o[s];return t},replace(o){return t.$set(o)},clean(){return r(),t}};for(let o in n)if(Uf(t,"$"+o,n[o]),typeof t[o]!="function"){if(Object.prototype.hasOwnProperty.call(t,o)){Fc(o,"");continue}Uf(t,o,n[o])}};var Fm=function(e,t,r){return e.state=Vf(e,t,r),e.state},Vf=function(e,t,r){let{__ref:n}=e,o=e.state;if(o==null||o===!1){let s=t?.state||{};return ut(e,s),s}if(typeof o=="string")return n&&(n.__state=o),n.__stateType="string",j1(o,e,t);if(typeof o=="number"||typeof o=="boolean"){n&&(n.__state=o,n.__stateType=typeof o,n.__hasRootState=!0);let s=tr({value:o});return s.__element=e,t?.state&&(s.parent=t.state),ut(e,s),s}if(typeof o=="function"&&(o=o(e,t?.state)||{}),typeof o=="object"&&!ge(o)){n&&(n.__hasRootState=!0),o.isRootState&&n&&(n.__hasRootState=!0);let s=tr({...o});if(s.__element=e,!Object.getOwnPropertyDescriptor(s,"root")){let i=t?.state?.root||t?.state||s;Object.defineProperty(s,"root",{get:()=>i,enumerable:!1,configurable:!0})}return t?.state&&(s.parent=t.state,t.state.__children&&(t.state.__children[e.key]=s)),ut(e,s),typeof e.onStateCreated=="function"&&e.onStateCreated(e,s,e.context,r),s}return ge(o)?(o.__element=e,o):t?.state||{}};function Mm(e,t){if(!t)return e;let r=t.split("/"),n=e;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function j1(e,t,r){if(!r?.state)return{};if(e===".")return r.state;if(e.startsWith("../")){let o=e.slice(3),s=r.state?.parent;return o&&s?Mm(s,o):s??r.state??{}}if(e.startsWith("~/")){let o=r.state;for(;o?.parent;)o=o.parent;let s=e.slice(2);return s?Mm(o,s):o??{}}let n=Mm(r.state,e);if(n&&typeof n=="object"&&!ge(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 Nm=(e,t)=>{if(!e)return Gw;let r=U1(e,t);return!r||!r.state?Gw:z1(r.state)},jm=()=>Lc()!=null,B1=128;function U1(e,t){let r=typeof t=="function"?t:typeof t=="string"?s=>!!s?.[t]:s=>!!s?.state,n=e,o=null;for(let s=0;s<B1&&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 V1={get(e,t){return e[t]}},Kw=new WeakMap,z1=e=>{let t=Kw.get(e);return t||(t=new Proxy(e,V1),Kw.set(e,t)),t},Gw=new Proxy(Object.create(null),{get(){},has(){return!1}});var zf="3.14.783";var Yw="__SMBLS_ELEMENT_ID_ENGINE__",Xw=(e,t,r)=>{let n=t||zf,o=r||(typeof globalThis<"u"?globalThis:null);if(!o)return e;let s=o[Yw];return s&&s.engine&&s.version===n?s.engine:(s||(o[Yw]={version:n,engine:e}),e)};var sS=Xw({uniqId:1,scopedStyleId:0},zf),Ua=[],Hm=!1;function Zw(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function H1(){return typeof document<"u"&&document.visibilityState==="hidden"}var W1=250;function iS(){if(!Hm){if(Hm=!0,typeof requestAnimationFrame!="function"){setTimeout(za,0);return}H1()?setTimeout(za,W1):requestAnimationFrame(za)}}var q1=300,K1=15e4;function za(){if(Hm=!1,!Ua.length)return;let e=Ua.splice(0,Ua.length);for(let t=0;t<e.length;t++){let r=e[t];if(r.node){if(!r.node.isConnected){let n=r.__ref||(r.__ref={});n.__mountAttempts=(n.__mountAttempts||0)+1,n.__mountFirstAttemptAt==null&&(n.__mountFirstAttemptAt=Zw());let o=Zw()-n.__mountFirstAttemptAt;n.__mountAttempts<=q1&&o<K1?(Ua.push(r),iS()):console.warn("[DOMQL] onMounted dropped after",n.__mountAttempts,"attempts /",o,"ms \u2014 node never connected:",r.key||r.tag||r);continue}Qe("Mounted",r,r.__ref?.__mountOptions||{})}}}function Wm(e,t){typeof e.onMounted=="function"&&(e.__ref.__mountOptions=t,Ua.push(e),iS())}function Jw(e,t){if(typeof e.onContentUpdate!="function")return;e.context?.plugins?.length&&Ee("contentUpdate",e,t);let r=e.context?.designSystem;r&&oe(r);try{e.onContentUpdate(e,e.state,e.context,t)}catch(n){if(e.context?.plugins?.length&&Ee("error",e,{hook:"onContentUpdate",error:n})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',n),e.context?.strictMode)throw n}finally{r&&te()}}function ns(e){return e.length>2&&e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>=65&&e.charCodeAt(2)<=90}function G1(e){return e.charAt(2).toLowerCase()+e.slice(3)}function Y1(e){return e.toLowerCase()}function qm(e){let t=e.charCodeAt(0);return t===58||t===64||t===38||t===91}function Va(e,t){let r={...e};for(let n in t){let o=r[n],s=t[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Va(o,s):r[n]=s}return r}function ct(e,t,r,n={},o){if(e==null||e===!1)return null;(typeof e=="string"||typeof e=="number")&&(e={text:e});let s=Object.create(null);s.key=r||e.key||`_${sS.uniqId++}`,s.parent=t||null,s.context=e.context||t?.context||n.context||{},s.context.__create||(s.context.__create=ct);let i=s.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:t?.__ref?.root||s,path:t?.__ref?.path?[...t.__ref.path,s.key]:[s.key],origin:e};if(r&&!e.extends&&!e.extend){let h=r.indexOf("_"),m=r.indexOf("."),_=h>0?h:-1;if(m>0&&(_<0||m<_)&&(_=m),_>0){let b=r.substring(0,_),y=s.context?.components;y&&(y[b]||y["smbls."+b])?e={...e,extends:b}:y&&Oe()&&(/^[A-Z]\w*_\d+$/.test(r)||/^[A-Z]\w*\.\w+$/.test(r))&&console.warn(`[smbls] auto-extend: key "${r}" looks like an instance of "${b}" but neither "${b}" nor "smbls.${b}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}Xo(s,e,n);let a=new Set(["childProps","attr","style","scope","data"]),c=s.props&&typeof s.props=="object"?s.props:null;for(let h in e){if(h==="parent"||h==="node"||h==="__ref"||h==="extends"||h==="context"||h==="props")continue;let m=e[h],_=s[h],b=_&&m&&typeof _=="object"&&typeof m=="object"&&!Array.isArray(_)&&!Array.isArray(m)&&typeof _!="function"&&typeof m!="function";b&&h.charCodeAt(0)>=65&&h.charCodeAt(0)<=90?s[h]=Va(_,m):b&&a.has(h)?s[h]={..._,...m}:b&&qm(h)?s[h]=Va(_,m):s[h]=m}function l(h){for(let m in h){let _=h[m],b=s[m],y=b&&_&&typeof b=="object"&&typeof _=="object"&&!Array.isArray(b)&&!Array.isArray(_)&&typeof b!="function"&&typeof _!="function";y&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?s[m]=Va(b,_):y&&a.has(m)?s[m]={...b,..._}:y&&qm(m)?s[m]=Va(b,_):s[m]=_}}c&&l(c),e.props&&typeof e.props=="object"&&l(e.props),e.data!==void 0&&(s.data=e.data),e.classlist!==void 0&&(s.classlist=e.classlist),e.text!==void 0&&(s.text=e.text),e.html!==void 0&&(s.html=e.html);let f=s.scope&&typeof s.scope=="object"?s.scope:null,u=t?.scope,d=s.context&&typeof s.context.globalScope=="object"&&s.context.globalScope||null,p=u||d||null;if(e.scope!==void 0||f){let h={};f&&Object.assign(h,f),e.scope!==void 0&&Object.assign(h,e.scope),s.scope=Mc(h,p)}else p&&(s.scope=p);if(e.if!==void 0&&(s.if=e.if),es(s),X1(s,t,e),s.if!=null){let h;if(typeof s.if=="function")try{h=s.if(s,s.state,s.context)}catch(m){if(h=!1,i.__ifError=m,typeof console<"u"&&console.warn){let _=s.key||s.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${_} \u2014 treating as false:`,m?.message||m)}}else h=s.if;i.__if=!!h}if(i.__if)typeof s.if=="function"&&(i.__ifInitialized=!0);else return t&&(t[s.key]=s),typeof s.if=="function"&&lS(s,i,s.if),s;s.tag||(s.tag=jr(s)),Qe("Init",s,n);let g=s.node=Br(s);if(!g)return s;if(s.tag==="fragment"){let m=(s.context?.document||globalThis.document).createComment("");g.appendChild(m),i.__fragmentAnchor=m}Qe("AttachNode",s,n),g.setAttribute&&s.key&&g.setAttribute("data-key",s.key),t&&(t[s.key]=s,t.__ref?.__children&&(t.__ref.__children.includes(s.key)||t.__ref.__children.push(s.key))),g.setAttribute&&s.context?.scopeSelector&&s.context.scopeSelector!==":root"&&s.context.key&&s.key===s.context.key&&g.setAttribute("data-smbls-app",s.context.key),s.id&&g.setAttribute&&(g.id=s.id),hS(s,n),cS(s),Km(s),dS(s),dO(s);try{gS(s,n)}catch(h){if(typeof console<"u"&&console.error){let m=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${m}:`,h?.message||h,h?.stack?`
53
+ `+h.stack.split(`
54
54
  `).slice(0,6).join(`
55
- `):"")}}if(Bf(s,!0),tS(s,e,n),typeof s.html=="function"&&s.node&&!s.node.innerHTML){let p=s.context?.designSystem;p&&it(p);try{let m=s.html(s,s.state,s.context);m!=null&&typeof m!="function"&&(s.node.innerHTML=m)}catch{}finally{p&&et()}}if(Qt("Create",s,o),Qt("Complete",s,o),Qt("Render",s,o),Qt("RenderRouter",s,o),jm(s,o),typeof s.onFrame=="function"){let p=s.onFrame,m=s.context?.designSystem,b=()=>{if(s.node){if(s.node.isConnected){m&&it(m);try{p(s,s.state,s.context)}catch(_){console.error("[DOMQL] onFrame error:",_)}finally{m&&et()}}requestAnimationFrame(b)}};requestAnimationFrame(b)}return s}function I1(t,e,r){let o=!e,n=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=o&&n&&t.context?.state,i=r.state!==void 0&&!s?r.state:t.state&&!mt(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,fe(t,t.state);else if(t.context?.state){let a=t.context.state,c={...a},l=t.context?.polyglot;if(l?.translations){let f=t.context,u=a.lang||l.defaultLang||"en",d=new Set,h=(m,b)=>{d.has(m)||sr(f,m,c)&&(c[m]=b,d.add(m),He(f,m))},g=l.translations[u];if(g&&typeof g=="object")for(let m in g)h(m,g[m]);let p=new Set(l.languages||[]);for(let m in l.translations)p.has(m)||h(m,l.translations[m])}t.state=mt(c)?c:tr(c),t.state.__element=t,t.state.root=t.state,fe(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),fe(t,t.state);return}if(typeof i=="string"){if(t.state=qw(i,e),t.state&&typeof t.state=="object"&&!mt(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}fe(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=mt(a)?a:tr(a||{})}else mt(i)?t.state=i:t.state=tr({...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,fe(t,t.state)}function Lm(t,e){if(!e)return t;let r=e.split("/"),o=t;for(let n of r){if(o==null)return{};o=o[n]}return o??{}}function qw(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let n=t.slice(3);return n?Lm(e.state,n):e.state??{}}if(t.startsWith("~/")){let n=e.state?.root||e.state,s=t.slice(2);return s?Lm(n,s):n??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=Lm(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let o=e.context?.polyglot;if(o?.translations){let n=e.state?.root?.lang||o.defaultLang||"en",s=o.translations[n];if(s?.[t]!==void 0)return s[t];if(o.translations[t]!==void 0)return o.translations[t]}return{}}var D1=new Set(["s","state","ctx","context"]);function $1(t){try{let r=Function.prototype.toString.call(t).match(/^[^(]*\(([^)]*)\)/);return r?r[1].split(",").map(o=>o.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function L1(t){if(typeof t!="function"||t.length!==2)return!1;let e=$1(t);if(e.length<2)return!1;let r=e[1].replace(/[{}[\]]/g,"").trim();return r.length>0&&!D1.has(r)}function M1(t){let e=t.__ref,r=t.tag||"div",o=t.context?.designSystem,n=[],s=Object.keys(t);for(let i=0;i<s.length;i++){let a=s[i];if(typeof t[a]!="function"||jt.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||Xn(a)||_t[a]||kt&&kt.has(a)||Ur(r,a)||(It()&&L1(t[a])&&console.warn(`[smbls] custom prop "${a}"${t.key?` on key "${t.key}"`:""} is a function \u2014 it will be auto-invoked on read and its RETURN VALUE stored, not preserved as a callable reference. If you meant to stash a callback, use el.call('${a}', \u2026) instead of reading el.${a}(\u2026) directly (see RULES.md Rule 8).`),n.push({prop:a,fn:t[a]}))}for(let i=0;i<n.length;i++){let{prop:a,fn:c}=n[i];e.__exec[a]=c,Object.defineProperty(t,a,{get(){o&&it(o);try{return c(t,t.state,t.context)}catch{return}finally{o&&et()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function F1(t,e){if(!(!Array.isArray(e)||e.length===0))for(let r=0;r<e.length;r++){let o=e[r];try{typeof o=="function"?o(t,t.state,t.context):typeof o=="string"&&t.state?.[o]}catch{}}}function Bt(t,e,r){return!Array.isArray(e)||e.length===0?r:function(...o){return F1(t,e),r.apply(this,o)}}function Fa(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function vt(t,e){return()=>t.path.join(".")+"::"+e}function Kw(t,e){let r=t.__ref,o=!!(e&&e.skipIfEffect);if(M1(t),typeof t.text=="function"){let s=t.text,i=Bt(t,t.textDeps,s),a=Q(()=>{if(!r.contentManaged)try{let c=i(t,t.state,t.context);t.node&&c!=null&&typeof c!="function"&&typeof c!="object"&&(typeof c=="string"&&c.includes("{{")&&(c=no.call(t,c,t.state)),Wn(t,c))}catch{}},{depth:r.path.length,label:vt(r,"text")});r.__effects.push(a),r.__exec.text=s}else if(typeof t.text=="string"&&t.text.includes("{{")){let s=t.text,i=Q(()=>{if(r.contentManaged)return;let a=no.call(t,s,t.state);a!=null&&(t.text=a),t.node&&Wn(t,a??"")},{depth:r.path.length,label:vt(r,"text")});r.__effects.push(i),r.__exec.text=s}for(let s of Object.keys(t))if(typeof t[s]=="function"&&!jt.has(s)&&!Xn(s)&&!r.__exec[s]){if(_t[s]){let i=t[s],a=Bt(t,t[s+"Deps"],i),c=s,l,f=Q(()=>{let u=t.context?.designSystem;u&&it(u);try{let d=a(t,t.state,t.context),h=_t[c](d,t,t.state,t.context),g=c==="show"||c==="hide";if(h&&t.node){let p=Vm(h),m=g&&t.node.style.display!=="none";(p===null||p!==l||m)&&(l=p,Yn(t.node,h))}else if(t.node&&g){l=void 0;let p=r.__explicitDisplay;t.node.style.display=typeof p=="string"?p:""}}finally{u&&et()}},{depth:r.path.length,label:vt(r,c)});r.__effects.push(f),r.__exec[s]=i}else if(kt&&kt.has(s)){let i=t[s],a=Bt(t,t[s+"Deps"],i),c=s,l,f=Q(()=>{let u=t.context?.designSystem;u&&it(u);try{let d=a(t,t.state,t.context);if(t.node)if(d!=null){let h=c+":"+String(d);h!==l&&(l=h,Yn(t.node,{[c]:d}))}else l=void 0,t.node.style[c]=""}finally{u&&et()}},{depth:r.path.length,label:vt(r,c)});r.__effects.push(f),r.__exec[s]=i}}if(typeof t.html=="function"){let s=t.html,i=Bt(t,t.htmlDeps,s),a=Q(()=>{let c=t.context?.designSystem;c&&it(c);try{let l=i(t,t.state,t.context);t.node&&l!=null&&typeof l!="function"&&(t.node.innerHTML=l)}finally{c&&et()}},{depth:r.path.length,label:vt(r,"html")});r.__effects.push(a),r.__exec.html=s}if(typeof t.value=="function"){let s=t.value,i=Bt(t,t.valueDeps,s),a=Q(()=>{try{let c=i(t,t.state,t.context);if(!t.node||!("value"in t.node))return;let l=c==null?"":String(c);if(t.node.value===l)return;let f=typeof document<"u"&&document.activeElement===t.node,u=f&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,d=f&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=l,f&&u!=null&&d!=null)try{t.node.setSelectionRange(u,d)}catch{}}catch{}},{depth:r.path.length,label:vt(r,"value")});r.__effects.push(a),r.__exec.value=s}if(typeof t.style=="function"){let s=t.style,i=Bt(t,t.styleDeps,s),a,c=Q(()=>{let l=i(t,t.state,t.context),f=Vm(l);(f===null||f!==a)&&(a=f,Yn(t.node,l))},{depth:r.path.length,label:vt(r,"style")});r.__effects.push(c),r.__exec.style=s}else if(t.style&&typeof t.style=="object")for(let s in t.style){let i=t.style[s];if(typeof i!="function")continue;let a=Bt(t,Fa(t.styleDeps,s),i),c,l=Q(()=>{try{let f=a(t,t.state,t.context);if(t.node){let u=s+":"+String(f);u!==c&&(c=u,Yn(t.node,{[s]:f}))}}catch{}},{depth:r.path.length,label:vt(r,"style."+s)});r.__effects.push(l)}if(t.attr&&typeof t.attr=="object"){for(let s in t.attr)if(typeof t.attr[s]=="function"){let i=Bt(t,Fa(t.attrDeps,s),t.attr[s]),a=s,c=Q(()=>{try{let l=i(t,t.state,t.context);t.node?.setAttribute&&(l==null||l===!1&&!dr(a)?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,Xe(a,l)))}catch{}},{depth:r.path.length,label:vt(r,"attr."+a)});r.__effects.push(c)}}if(t.aria&&typeof t.aria=="object")for(let s in t.aria){if(typeof t.aria[s]!="function")continue;let i=Bt(t,Fa(t.ariaDeps,s),t.aria[s]),a="aria-"+s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=Q(()=>{try{let l=i(t,t.state,t.context);if(!t.node?.setAttribute)return;l==null?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,Xe(a,l))}catch{}},{depth:r.path.length,label:vt(r,"aria."+s)});r.__effects.push(c)}if(t.data&&typeof t.data=="object")for(let s in t.data){if(typeof t.data[s]!="function")continue;let i=Bt(t,Fa(t.dataDeps,s),t.data[s]),c="data-"+s.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),l=Q(()=>{try{let f=i(t,t.state,t.context);if(!t.node?.setAttribute)return;f==null||f===!1?t.node.removeAttribute(c):typeof f!="function"&&typeof f!="object"&&t.node.setAttribute(c,f===!0?"":f)}catch{}},{depth:r.path.length,label:vt(r,"data."+s)});r.__effects.push(l)}let n=t.classlist&&typeof t.classlist=="object"&&!Array.isArray(t.classlist)?t.classlist:t.class&&typeof t.class=="object"&&!Array.isArray(t.class)?t.class:null;if(n)for(let s in n){if(typeof n[s]!="function")continue;let i=Bt(t,Fa(t.classDeps,s),n[s]),a=Q(()=>{try{let c=i(t,t.state,t.context);if(!t.node?.classList)return;typeof c=="string"?t.node.classList.add(c):c?t.node.classList.add(s):t.node.classList.remove(s)}catch{}},{depth:r.path.length,label:vt(r,"class."+s)});r.__effects.push(a)}!o&&typeof t.if=="function"&&Gw(t,r,t.if);for(let s of Object.keys(t)){if(jt.has(s)||typeof t[s]!="function")continue;let i=s.charCodeAt(0);if(i>=65&&i<=90||Xn(s))continue;let a=t[s];r.__exec[s]=a;let c=t.tag||"div";if(Ur(c,s)&&!_t[s]&&!(kt&&kt.has(s))){let l=Br(s)||s,f=Bt(t,t[s+"Deps"],a),u=Q(()=>{try{let d=f(t,t.state,t.context);t.node?.setAttribute&&(d==null||d===!1&&!dr(l)?t.node.removeAttribute(l):typeof d!="function"&&typeof d!="object"&&(l==="src"&&"src"in t.node?t.node.src=d:t.node.setAttribute(l,Xe(l,d))))}catch{}},{depth:r.path.length,label:vt(r,s)});r.__effects.push(u)}}if(B1(t),z1(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let s=t.onStateUpdate,i=t.stateDeps,a=!1,c=[],l=Q(()=>{let f=[];for(let g=0;g<i.length;g++){let p=i[g];try{f[g]=typeof p=="function"?p(t,t.state,t.context):t.state?.[p]}catch{f[g]=void 0}}if(!a){a=!0,c=f;return}let u=f.length!==c.length;for(let g=0;!u&&g<f.length;g++)f[g]!==c[g]&&(u=!0);let d=c;if(c=f,!u)return;let h=t.context?.designSystem;h&&it(h);try{s(t,t.state,t.context,{prev:d,next:f})}catch(g){if(t.context?.plugins?.length&&Et("error",t,{hook:"onStateUpdate",error:g})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',g),t.context?.strictMode)throw g}finally{h&&et()}},{depth:r.path.length,label:vt(r,"onStateUpdate")});r.__effects.push(l)}V1(t)}function jw(t){let e=t.parent,r=e?.node;if(!r||!t.node){tS(t,t.parent);return}let o=null,n=Object.keys(e),s=n.indexOf(t.key);for(let i=s+1;i<n.length;i++){let a=e[n[i]];if(a?.node?.parentNode===r){o=a.node;break}}o?r.insertBefore(t.node,o):r.appendChild(t.node)}function Gw(t,e,r){let o=Bt(t,t.ifDeps,r),n=Q(()=>{let s;try{s=o(t,t.state,t.context)}catch(a){if(s=!1,e.__ifError=a,typeof console<"u"&&console.warn){let c=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${c} \u2014 treating as false:`,a?.message||a)}return}let i=e.__if;if(e.__if=!!s,i&&!e.__if&&t.node){t.node.remove();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=Fr(t)),t.node&&(t.node.ref=t),jw(t),Um(t),Qt("Render",t,{}),jm(t,{});else{if(e.__ifInitialized=!0,t.tag||(t.tag=Mr(t)),Qt("Init",t,{}),t.node||(t.node=Fr(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}Qt("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),Jw(t,{}),Kw(t,{skipIfEffect:!0}),Um(t),Xw(t),Qw(t,{}),jw(t),Qt("Create",t,{}),Qt("Complete",t,{}),Qt("Render",t,{}),Qt("RenderRouter",t,{}),jm(t,{})}},{depth:e.path.length,label:vt(e,"if")});e.__effects.push(n)}function Wn(t,e){let r=t.node;if(!r)return;let o=e==null||typeof e=="object"?"":String(e);if(t.tag==="string"){r.nodeValue!==o&&(r.nodeValue=o);return}let n=t.__ref,s=n?n.__textNode:null;if(s&&s.parentNode!==r&&(s=null),!s){let i=r.firstChild;i&&i.nodeType===3&&(s=i)}s?s.nodeValue!==o&&(s.nodeValue=o):r.firstChild?(s=(r.ownerDocument||t.context?.document||globalThis.document).createTextNode(o),r.insertBefore(s,r.firstChild)):(r.textContent=o,s=r.firstChild&&r.firstChild.nodeType===3?r.firstChild:null),n&&(n.__textNode=s||null)}function Um(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&Wn(t,t.text),W1(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in e){let r=String(t.value);e.value!==r&&(e.value=r)}if(t.style&&typeof t.style=="object"&&Yn(e,t.style),t.attr&&typeof t.attr=="object")for(let r in t.attr){let o=t.attr[r];typeof o=="function"||typeof o=="object"||o!=null&&(o===!1&&!dr(r)||e.setAttribute&&e.setAttribute(r,Xe(r,o)))}if(t.data&&typeof t.data=="object")for(let r in t.data){let o=t.data[r];typeof o=="function"||typeof o=="object"||o==null||o===!1||e.dataset&&(e.dataset[r]=o===!0?"":o)}if(t.classlist||t.class){let r=t.classlist||t.class;if(typeof r=="string")r.split(" ").forEach(o=>o&&e.classList.add(o));else if(typeof r=="object")for(let o in r){let n=typeof r[o]=="function"?r[o](t,t.state,t.context):r[o];n&&e.classList.add(typeof n=="string"?n:o)}}}}function Vm(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function Yn(t,e){if(!t||!e||!t.style)return;let r=null;for(let o in e){let n=e[o];if(n!=null){if(o.charAt(0)==="&"&&typeof n=="object"){r||(r={}),r[o]=n;continue}try{let s=String(n),i=o.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),a=s.trim(),c=/\s*!important\s*$/.test(a),l=a.replace(/\s*!important\s*$/,"");t.style.setProperty(i,l,c?"important":"")}catch{}}}r&&N1(t,r)}function N1(t,e){let r=`_ds${Hw.scopedStyleId++}`;t.classList.add(r);let o=t.ownerDocument,n=o.querySelector("style[data-smbls-scoped]");n||(n=o.createElement("style"),n.setAttribute("data-smbls-scoped",""),o.head.appendChild(n));let s="";for(let i in e){let a="."+r,c=i.replace(/&/g,a).split(",").map(f=>{let u=f.trim();return u.includes(a)?u:a+u}).join(", "),l=e[i];if(typeof l=="object"){let f="",u="";for(let d in l){let h=l[d];if(typeof h=="object"){let g=d.includes("&")?c.split(", ").map(m=>d.replace(/&/g,m)).join(", "):c.split(", ").map(m=>`${m} ${d}`).join(", "),p="";for(let m in h)p+=`${m.replace(/[A-Z]/g,b=>"-"+b.toLowerCase())}: ${h[m]};`;u+=Pe(`${g} { ${p} }`,g)+`
56
- `}else f+=`${d.replace(/[A-Z]/g,g=>"-"+g.toLowerCase())}: ${h};`}f&&(s+=Pe(`${c} { ${f} }`,c)+`
57
- `),u&&(s+=u)}}s&&(n.textContent+=s)}var Bw=new Set;function Uw(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 j1(t,e,r){let o=Uw(r);queueMicrotask(()=>{if(!t.__ref)return;let n;try{n=e(t,t.state,t.context)}catch{return}if(Uw(n)===o)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";Bw.has(s)||(Bw.add(s),console.warn(`[smbls] subscribeTo function at "${s}" resolved to a DIFFERENT key list one microtask after create \u2014 wired [${r.join(", ")||"(none)"}], probed [${Array.isArray(n)?n.join(", "):String(n)}]. subscribeTo's function form is resolved ONCE at element-create time (registerSubscribeToEffects, @symbo.ls/element create.js) \u2014 this element stays wired to the ORIGINAL list for its whole lifetime, so this drift is invisible to the reactive effect and any key only present in the new list will never trigger onUpdate. If the watched key genuinely is not known until later (e.g. a module config that loads after shell boot), route the write through an imperative call instead of subscribeTo \u2014 see functions/moduleOpenBridge.js's moduleOpenPage (workspace repo) for the house pattern.`))})}function B1(t){let e=t.subscribeTo,r=typeof e=="function",o=e;if(r)try{o=e(t,t.state,t.context)}catch{o=null}if(r&&It()&&j1(t,e,Array.isArray(o)?o:[]),!Array.isArray(o)||o.length===0)return;let n=t.__ref;for(let s=0;s<o.length;s++){let i=o[s];if(typeof i!="string"||i.length===0)continue;let a=i.split("."),c=a[0],l=a.slice(1),f={value:!1},u=Q(()=>{let d=t.state&&(mt(t.state)?t.state.root:null);if(!d||!mt(d))return;let h=d;h=h[c];for(let p=0;p<l.length&&!(h==null||typeof h!="object");p++)if(mt(h))h=h[l[p]];else break;if(!f.value)return;let g=!1;if(typeof t.onBeforeUpdate=="function"){let p=t.context?.designSystem;p&&it(p);try{if(lm(n)){let m=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});m&&typeof m.then=="function"?m.then(()=>pr(n,!1),b=>{pr(n,!0),t.context?.plugins?.length&&Et("error",t,{hook:"onBeforeUpdate",error:b})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",b)}):(pr(n,!1),m===!1&&(g=!0))}}catch(m){pr(n,!0),t.context?.plugins?.length&&Et("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}finally{p&&et()}}if(!g&&t.node&&n.__effects)for(let p=0;p<n.__effects.length;p++){let m=n.__effects[p];m&&m!==u&&!m._disposed&&!m._isSubscribeToEffect&&typeof m._execute=="function"&&m._execute()}if(!g&&typeof t.onUpdate=="function"){let p=t.context?.designSystem;p&&it(p);try{t.onUpdate(t,t.state,t.context)}catch(m){t.context?.plugins?.length&&Et("error",t,{hook:"onUpdate",error:m})||console.error("[DOMQL] subscribeTo onUpdate error:",m)}finally{p&&et()}}},{depth:n.path.length,label:vt(n,"subscribeTo("+i+")")});f.value=!0,u._isSubscribeToEffect=!0,n.__effects.push(u)}}function Wm(t,e){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&(t==="@dark"||t==="@light"||!e.context?.designSystem?.media?.[t.slice(1)])}var Vw=new Set;function U1(t,e){let r=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",o=r+"::"+t;Vw.has(o)||(Vw.add(o),console.warn(`[smbls/css] "${t}" at ${r} is a CHILD-COMPONENT key nested inside a pseudo/selector block (":hover", "@dark", etc.) \u2014 that is never a valid CSS selector fragment. The rule is DROPPED (not shipped as a dead/never-matching selector). To reveal a child on a parent state, target the child's OWN class from the parent selector instead, e.g. move the declaration onto the child element itself, or use a sibling-selector combinator in a top-level style block.`))}function Zn(t,e,r){let o={},n=new Set,s=(i,a,c)=>{let l=c?new Set(Object.keys(o)):null;if(_t[i]){let f=_t[i](a,e,e.state,e.context);if(f){let u=Array.isArray(f)?f:[f];for(let d of u)d&&Object.assign(o,d)}}else o[i]=a;if(c)for(let f in o)l.has(f)||n.add(f)};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=t[i];if(typeof a=="function"&&(a=a(e,e.state,e.context)),a==null||typeof a=="function")continue;if(typeof a=="object"&&!Array.isArray(a)){if(i==="style"){for(let u in a){let d=a[u];if(typeof d=="function"&&(d=d(e,e.state,e.context)),d==null||typeof d=="function")continue;let h=typeof e[u]=="function"&&(_t[u]||kt&&kt.has(u));s(u,d,h)}continue}if(Wm(i,e)){let u=Zn(a,e,!1);Object.keys(u).length&&(o[`[data-theme="${i.slice(1)}"] &`]=u);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(i)){It()&&U1(i,e);continue}let l=i;if(i.charCodeAt(0)===64&&!i.startsWith("@media")&&!i.startsWith("@keyframes")){let u=e.context?.designSystem?.media?.[i.slice(1)];u&&(l=`@media ${u}`)}let f=Zn(a,e,!1);Object.keys(f).length&&(o[l]=f);continue}let c=typeof e[i]=="function"&&(_t[i]||kt&&kt.has(i));s(i,a,c)}if(r)for(let i in o)n.add(i);for(let i of n){let a=o[i];typeof a=="string"&&!a.includes("!important")&&(o[i]=a+" !important")}return o}function qm(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)&&qm(t[r],e+1))return!0}return!1}function Yw(t,e,r){if(!e||typeof e!="object"||Array.isArray(e))return null;if(Wm(t,r)){let s=Zn(e,r,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let o=t;if(t.charAt(0)==="@"&&!t.startsWith("@media")&&!t.startsWith("@keyframes")){let s=r.context?.designSystem?.media?.[t.slice(1)];s&&(o=`@media ${s}`)}let n=Zn(e,r,!1);return Object.keys(n).length?{cssProp:o,block:n}:null}function V1(t){let e=t.__ref;for(let r of Object.keys(t)){if(!Bm(r))continue;let o=t[r];if(!o||typeof o!="object"||Array.isArray(o)||!qm(o))continue;let n=null,s,i=Q(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&it(a);let c,l=!1;try{let f=Yw(r,o,t),u=f?Vm(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=we({[f.cssProp]:f.block},null,t.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&et()}if(!(l||!t.node.classList)){if(n)for(let f of n)t.node.classList.remove(f);if(c&&c.length)for(let f of c)t.node.classList.add(f);n=c}},{depth:e.path.length,label:vt(e,"cssBlock("+r+")")});e.__effects.push(i)}}function z1(t){let e=t.__ref;e.__conditionalRunners=[];let r=new Map;for(let o of Object.keys(t)){let n=o.charAt(0);if(n!=="."&&n!=="!")continue;let s=o.slice(1);if(!s)continue;if(/[:@\s>~+[\]]/.test(s)){if(typeof console<"u"&&console.warn){let u=s.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${o}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${n}\` is read as one prop name. Nest the selector inside instead: \`${n}${u}: { '${s.slice(u.length)}': {...} }\`.`)}continue}let i=t[o];if(!i||typeof i!="object")continue;let a=n==="!",c={lastMatch:!1,appliedKeys:null,appliedClasses:null},l=()=>{let u,d=t[s];if(d===void 0){let p=!!t.state&&s in t.state,m=t.state?t.state[s]:void 0;if(p||m!==void 0)u=m;else{let b=t.context?.cases?.[s];if(b===void 0)return;try{u=typeof b=="function"?b.call(t,t):b}catch(_){u=!1,e.__conditionalError=_,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,_?.message||_)}}}else if(typeof d=="function")try{u=d(t,t.state,t.context)}catch(p){u=!1,e.__conditionalError=p,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,p?.message||p)}else u=d;let h=a?!u:!!u;if(!t.node||h===c.lastMatch)return;c.lastMatch=h;let g=t.context?.designSystem;g&&it(g);try{if(h){let p={},m={},b=!1;for(let y in i){if(!Object.prototype.hasOwnProperty.call(i,y))continue;let x=i[y],k=y.charAt(0);if((k===":"||k==="@"||k==="&")&&x&&typeof x=="object"&&!Array.isArray(x)){if(Wm(y,t)){let O=Zn(x,t,!1);Object.keys(O).length&&(m[`[data-theme="${y.slice(1)}"] &`]=O,b=!0)}else{let O=y;if(k==="@"&&!y.startsWith("@media")&&!y.startsWith("@keyframes")){let I=t.context?.designSystem?.media?.[y.slice(1)];I&&(O=`@media ${I}`)}let $=Zn(x,t,!1);Object.keys($).length&&(m[O]=$,b=!0)}continue}let E=typeof x=="function"?x(t,t.state,t.context):x;if(E!=null)if(_t[y]){let O=_t[y](E,t,t.state,t.context);if(O){let $=Array.isArray(O)?O:[O];for(let I of $)I&&Object.assign(p,I)}}else kt&&kt.has(y)&&(p[y]=E)}let _=Object.keys(p);if(_.length){Yn(t.node,p);for(let y of _)r.set(y,o);c.appliedKeys=_}else c.appliedKeys=null;if(b){let y=we(m,null,t.context?.cssPrefix),x=y?y.split(" ").filter(Boolean):[];if(x.length&&t.node.classList){for(let k of x)t.node.classList.add(k);c.appliedClasses=x}else c.appliedClasses=null}else if(c.appliedClasses){for(let y of c.appliedClasses)t.node.classList.remove(y);c.appliedClasses=null}}else{if(c.appliedKeys){for(let p of c.appliedKeys)r.get(p)===o&&(t.node.style[p]="",r.delete(p));c.appliedKeys=null}if(c.appliedClasses){for(let p of c.appliedClasses)t.node.classList.remove(p);c.appliedClasses=null}}}finally{g&&et()}};e.__conditionalRunners.push(l);let f=Q(l,{depth:e.path.length,label:vt(e,"conditional("+o+")")});e.__effects.push(f)}}var Mm=new WeakSet;function H1(t){let e=t.ownerDocument;!e||Mm.has(e)||(Mm.add(e),queueMicrotask(()=>{Mm.delete(e);let r=e.body||e.documentElement;r&&r.offsetWidth}))}var Fm=new WeakSet,zw=!1;function W1(t){let{node:e}=t;if(!e)return;if(zw||(zw=!0,we({display:"none"})),Fm.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}Fm.add(t);let r=t.context?.designSystem;r&&it(r),mm();try{let o={},n=!1;if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&_t.theme){let s=_t.theme(t.theme,t,t.state,t.context);if(s){if(Array.isArray(s))for(let i of s)i&&Object.assign(o,i);else Object.assign(o,s);n=!0}}for(let s of Object.keys(t)){if(typeof t[s]=="function"||jt.has(s)||s==="theme")continue;let i=s.charCodeAt(0);if(!(i>=65&&i<=90)&&!Xn(s)){if(_t[s]){let a=t[s],c=_t[s](a,t,t.state,t.context);if(c){if(Array.isArray(c))for(let l of c)l&&Object.assign(o,l);else Object.assign(o,c);n=!0}}else if(kt&&kt.has(s)){let a=t[s];a!=null&&typeof a!="object"&&(o[s]=a,n=!0)}else if(s.charCodeAt(0)===45){let a=t[s];a!=null&&typeof a!="object"&&(o[s]=a,n=!0)}else if(s.charAt(0)==="&"||s.charAt(0)==="@"||s.charAt(0)===":"){let a=t[s];if(a&&typeof a=="object"&&!Array.isArray(a)){if(qm(a))continue;let c=Yw(s,a,t);c&&(o[c.cssProp]=c.block,n=!0)}}}}if(n){o.display&&String(o.display).includes("!important")&&(e.style.setProperty("display",String(o.display).replace(/\s*!important\s*$/,""),"important"),delete o.display);let s=we(o,null,t.context?.cssPrefix);if(s&&e.classList){let a=s.split(" ").filter(Boolean),c=!1;for(let l of a)e.classList.add(l),c||(l.charCodeAt(0)===95&&l.charCodeAt(1)===99||l.charCodeAt(0)===95&&l.indexOf("_c",1)!==-1)&&(c=!0);c&&H1(e)}let i=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(i!=null){let a=o.display;if(a&&a!==i)if(i==="none"){let c=[];for(let l of e.classList)l.startsWith("_d-")&&l!=="_d-none"&&c.push(l);for(let l of c)e.classList.remove(l);e.classList.add("_d-none")}else e.style.display==="none"&&(typeof t.hide=="function"||typeof t.show=="function")||(e.style.display=t.display),t.__ref&&(t.__ref.__explicitDisplay=t.display)}}}finally{ym(),r&&et(),Fm.delete(t)}}function Xw(t){let{node:e}=t;if(!e||!e.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(let n in t.aria){let s=t.aria[n];if(typeof s=="function"||typeof s=="object"||s==null)continue;let i="aria-"+n.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());e.setAttribute(i,Xe(i,s))}let r=cm(t);for(let n in r){let s=r[n];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(n,s===!0?"":s)}let o=t.tag||"div";for(let n of Object.keys(t)){if(typeof t[n]=="function"||jt.has(n)||n==="on"||r[n]!==void 0)continue;let s=n.charCodeAt(0);if(!(s>=65&&s<=90)&&!Xn(n)&&!(_t[n]||kt&&kt.has(n))&&Ur(o,n)){let i=t[n];if(i==null||(typeof i=="string"&&i.includes("{{")&&(i=no(i,t,t.state,t.context),t[n]=i),i==null||typeof i=="function"||typeof i=="object")||i===!1&&!dr(Br(n)||n))continue;let a=Br(n)||n;e.setAttribute(a,Xe(a,i))}}}function q1(t,e){let r=t.node,o=t.__ref,n=o.__autoGrow;if(!e){if(n&&n.active){try{r.removeEventListener("input",n.resize)}catch{}r.style.height="",n.appliedMax!=null&&r.style.maxHeight===n.appliedMax&&(r.style.maxHeight=""),n.active=!1,n.appliedMax=null,n.lastMeasure=0}return}n||(n=o.__autoGrow={active:!1,appliedMax:null,lastMeasure:0,resize:()=>{if(r.scrollHeight===0&&n.lastMeasure>0)return;r.style.height="auto";let i=r.scrollHeight;r.style.height=i+"px",i>0&&(n.lastMeasure=i)}},o.__eventCleanup||(o.__eventCleanup=[]),o.__eventCleanup.push(()=>{try{r.removeEventListener("input",n.resize)}catch{}})),n.active||(r.addEventListener("input",n.resize),n.active=!0);let s=typeof e=="object"&&e.max!=null?String(e.max):null;s!==n.appliedMax&&(s==null?n.appliedMax!=null&&r.style.maxHeight===n.appliedMax&&(r.style.maxHeight=""):r.style.maxHeight=s,n.appliedMax=s),n.resize()}function K1(t){if(!t.autoGrow)return;let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let r=t.__ref,o=t.autoGrow,n=typeof o=="function"?Bt(t,t.autoGrowDeps,o):null,s=Q(()=>{let i=t.autoGrow,a=i;if(typeof i=="function")try{a=(i===o&&n?n:i)(t,t.state,t.context)}catch{a=null}q1(t,a)},{depth:r.path.length,label:vt(r,"autoGrow")});r.__effects||(r.__effects=[]),r.__effects.push(s),n&&(r.__exec.autoGrow=o)}var Zw=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function Jw(t,e){for(let r of Object.keys(t)){if(!Xn(r)||Zw.has(r))continue;let o=Af(r);if(o){Tf(o,t,t[r]);continue}let n=t[r];if(typeof n=="string"&&/^[A-Za-z_$][\w$]*$/.test(n)){let i=n;n=function(c){return t.call(i,c)}}if(typeof n!="function")continue;let s=R1(r);Nr.has(s)||Vn(P1(s),t,n)}G1(t)}function G1(t){let e=t.node;if(!e||!e.addEventListener)return;let r={},o=!1;for(let d of Zw){let h=t[d];typeof h=="function"&&(r[d]=h,o=!0)}if(!o)return;let n=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,s=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600,i=0,a=0,c=0,l=!1,f=d=>{let h=d.touches&&d.touches[0]||d.changedTouches&&d.changedTouches[0];h&&(i=h.clientX,a=h.clientY,c=Date.now(),l=!0)},u=d=>{if(!l)return;l=!1;let h=d.changedTouches&&d.changedTouches[0]||d.touches&&d.touches[0];if(!h)return;let g=h.clientX-i,p=h.clientY-a,m=Date.now()-c;if(m>s)return;let b=Math.abs(g),_=Math.abs(p);if(Math.max(b,_)<n)return;let y;if(b>_*1.2)y=g<0?"left":"right";else if(_>b*1.2)y=p<0?"up":"down";else return;let x="onSwipe"+y.charAt(0).toUpperCase()+y.slice(1),k=r[x],E=r.onSwipe;k&&k.call(t,d,t,t.state,t.context),E&&E.call(t,{direction:y,dx:g,dy:p,dt:m,event:d},t,t.state,t.context)};e.addEventListener("touchstart",f,{passive:!0}),e.addEventListener("touchend",u,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{e.removeEventListener("touchstart",f)}catch{}try{e.removeEventListener("touchend",u)}catch{}})}function Ua(t,e){let r={...t};for(let o in e){let n=r[o],s=e[o];n&&s&&typeof n=="object"&&typeof s=="object"&&!Array.isArray(n)&&!Array.isArray(s)&&typeof n!="function"&&typeof s!="function"?r[o]=Ua(n,s):r[o]=s}return r}function zm(t,e,r,o){if(!e||!t.node)return;let n=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 k=_;(typeof _=="string"||typeof _=="number")&&(k={value:_,text:_}),b=y?{...y,state:k}:{state:k}}else y&&(b=Ua(y,b));if(n&&!b.ignoreChildExtends)if(b.extends){let k=Array.isArray(b.extends)?b.extends:[b.extends],E=Array.isArray(n)?n:[n];b={...b,extends:[...E,...k]}}else b={...b,extends:n};let x=b?.key||_&&typeof _=="object"&&_.key||`${m}`;try{return ae(b,t,x,r)}catch(k){if(typeof console<"u"&&console.error){let E=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${x}" failed to construct at ${E} (initial render, skipping this row):`,k?.message||k)}return null}},u=t.__ref;if(!(o===!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 h=u.__childrenChunkGen=(u.__childrenChunkGen||0)+1;Am();let g=null,p=m=>{if(u.__disposed||u.__childrenChunkGen!==h){g&&g.parentNode&&g.remove();return}for(let b=m;b<e.length;b++){let _=f(b);if(_?.node&&(g?t.node.insertBefore(_.node,g):a.appendChild(_.node)),b+1<e.length&&Em()){g||(g=i.createComment("smbls-mount"),a.appendChild(g),t.node.appendChild(a));let y=b+1;Om(()=>p(y));return}}g?(g.remove(),t.node.tagName==="SELECT"&&Bf(t,!0)):t.node.appendChild(a)};return p(0),Tm(),!0}if(typeof e=="string"){let s=qw(e,t);if(Array.isArray(s))return zm(t,s,r,o)}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=Ua(t.childProps,i)),n&&!i.ignoreChildExtends)if(i.extends){let a=Array.isArray(i.extends)?i.extends:[i.extends],c=Array.isArray(n)?n:[n];i={...i,extends:[...c,...a]}}else i={...i,extends:n};ae(i,t,s,r)}}}function Bf(t,e){let r=t.node;if(!r||r.tagName!=="SELECT")return;let o=r.options;if(!o||!o.length)return;let n=t.__ref,s=n&&n.__exec&&n.__exec.value,i=typeof s=="function",a=t.value!=null&&typeof t.value!="function";if(i||a){let f;if(i)try{f=s(t,t.state,t.context)}catch{return}else f=t.value;let u=f==null?"":String(f);r.value!==u&&(r.value=u);return}let c=e||!(n&&n.__selectSynced);if(n&&(n.__selectSynced=!0),!c)return;let l=-1;for(let f=0;f<o.length;f++)o[f].defaultSelected&&(l=f);l>=0&&r.selectedIndex!==l&&(r.selectedIndex=l)}function Qw(t,e){let{children:r,content:o}=t,n=t.childExtends;if(typeof r=="function"){let u=r;try{r=u(t,t.state,t.context)}catch(m){if(r=void 0,typeof console<"u"&&console.error){let b=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${b} (initial run, treating as empty):`,m?.message||m)}}t.children=r;let d=t.__ref,h=!1,g=Bt(t,t.childrenDeps,u),p=Q(()=>{let m=h;h=!0;let b;try{b=g(t,t.state,t.context)}catch(I){if(typeof console<"u"&&console.error){let D=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${D}${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,k=_?[]:null;if(Array.isArray(b)&&t.childrenAs==="state"){let I=t.childProps,D=[],W=new Map;for(let q=0;q<b.length;q++){let xt=b[q],M=I;if(typeof I=="function")try{M=I(t,xt)}catch{M=null}let ot=M&&M.key||xt&&xt.key||`${q}`;D.push(ot),W.set(ot,{rawChild:xt,childProps:M})}let Pt=new Set(D),F=d.__children.slice();for(let q of F)if(!Pt.has(q)){let xt=t[q];xt?.remove&&xt.remove(),delete t[q],x&&x.push(q)}let Y=t.childExtends,at=t.tag==="fragment",z=t.context?.document||globalThis.document,G=at?null:z?.createDocumentFragment(),Vt=new Set;for(let q of D){let xt=W.get(q),M=xt.rawChild,ot=t[q];if(ot&&ot.state){if(M&&typeof M=="object"){let Ct=ot.state,Qe=Ct.$replace||Ct.replace,nt=Ct.$update||Ct.update;try{if(typeof Qe=="function")Qe.call(Ct,M);else if(typeof nt=="function"){for(let N in Ct)if(!(N==="__element"||N==="root"||N==="parent"||N==="update")&&!Object.prototype.hasOwnProperty.call(M,N))try{Ct[N]=void 0}catch{}nt.call(Ct,M)}else for(let N in M)Ct[N]=M[N]}catch(N){if(typeof console<"u"&&console.error){let pt=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${q}" failed to patch at ${pt} (reconcile, keeping its previous data for this pass):`,N?.message||N)}}}k&&k.push(q);continue}let V=M;(typeof M=="string"||typeof M=="number")&&(V={value:M,text:M});let X=xt.childProps,B=X?{...X,state:V}:{state:V};if(Y&&!B.ignoreChildExtends)if(B.extends){let Ct=Array.isArray(B.extends)?B.extends:[B.extends],Qe=Array.isArray(Y)?Y:[Y];B={...B,extends:[...Qe,...Ct]}}else B={...B,extends:Y};let dt;try{dt=ae(B,t,q,e)}catch(Ct){if(typeof console<"u"&&console.error){let Qe=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${q}" failed to construct at ${Qe} (reconcile, skipping this row):`,Ct?.message||Ct)}Vt.add(q);continue}!at&&dt?.node&&G&&G.appendChild(dt.node),y&&y.push(q)}if(!at&&G&&G.childNodes.length&&t.node&&t.node.appendChild(G),!at&&t.node){let q=null;for(let xt of D){let M=t[xt]?.node;if(!M)continue;let ot=q?q.nextSibling:t.node.firstChild;M!==ot&&t.node.insertBefore(M,ot),q=M}}d.__children=Vt.size?D.filter(q=>!Vt.has(q)):D,_&&(y.length||x.length)&&Nw(t,{added:y,removed:x,kept:k}),Bf(t,!1);return}let $=_?[...d.__children]:null;for(let I of[...d.__children]){let D=t[I];D?.remove&&D.remove(),delete t[I]}d.__children=[],zm(t,b,e),Bf(t,!1),_&&Nw(t,{added:[...d.__children],removed:$,kept:[]})},{depth:d.path.length,label:vt(d,"children")});d.__effects.push(p)}let s=zm(t,r,e,!0);if(o!=null&&!(o&&o.__ref)){let u=o;if(typeof u=="string"||typeof u=="number"?u={text:u}:typeof u!="object"&&(u={}),t.childProps&&(u=Ua(t.childProps,u)),n&&!u.ignoreChildExtends)if(u.extends){let d=Array.isArray(u.extends)?u.extends:[u.extends],h=Array.isArray(n)?n:[n];u={...u,extends:[...h,...d]}}else u={...u,extends:n};ae(u,t,"content",e)}if(r&&!s)return;let i=t.context?.components||{};{let u=Object.keys(t);for(let d=0;d<u.length;d++){let h=u[d];if(!h.endsWith("Extends")||typeof t[h]!="string")continue;let g=h.slice(0,-7);if(!g||g.charCodeAt(0)<65||g.charCodeAt(0)>90)continue;let p={extends:t[h]};delete t[h];for(let m=d+1;m<u.length;m++){let b=u[m],_=b.charCodeAt(0);if(_>=65&&_<=90||jt.has(b)||typeof t[b]=="function"&&(b.startsWith("on")||b.startsWith(".")))break;let y=t[b];y!==void 0&&(p[b]=y,delete t[b])}t[g]&&typeof t[g]=="object"?t[g]={...p,...t[g]}:t[g]=p}}let a=e?.mountYield===!0||t.yieldChildren===!0,c=Object.keys(t),l=u=>{if(jt.has(u)||typeof t[u]!="object"||t[u]===null)return;let d=u.charCodeAt(0);if(d<65||d>90)return;let h=t[u];if(!h.__ref){if(!h.extends&&!h.extend){let g=i[u]||i[`smbls.${u}`];g&&(h={...h,extends:g})}if(t.childProps&&(h=Ua(t.childProps,h)),n&&!h.ignoreChildExtends)if(h.extends){let g=Array.isArray(h.extends)?h.extends:[h.extends],p=Array.isArray(n)?n:[n];h={...h,extends:[...p,...g]}}else h={...h,extends:n};ae(h,t,u,e)}};if(!a){for(let u of c)l(u);return}Am();let f=u=>{for(let d=u;d<c.length;d++)if(l(c[d]),d+1<c.length&&Em()){let h=d+1;Om(()=>f(h));return}};f(0),Tm()}function tS(t,e,r){let{node:o}=t;if(!o)return;o.ref=t;let n=e?.tag==="fragment"?e.__ref?.__fragmentAnchor:null;if(n){let i=n.parentNode;if(i){if(r?.position==="before"&&r.node)i.insertBefore(o,r.node);else if(r?.position==="after"&&r.node){let a=r.node.nextSibling;i.insertBefore(o,a||n)}else i.insertBefore(o,n);return}}let s=e?.node||(e?.nodeType?e:null);if(s)if(r?.position==="before"&&r.node)s.insertBefore(o,r.node);else if(r?.position==="after"&&r.node){let i=r.node.nextSibling;i?s.insertBefore(o,i):s.appendChild(o)}else s.appendChild(o)}var Hm=3;function lm(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=Hm?!1:(t.__inBeforeUpdate=!0,!0)}function pr(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===Hm&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${Hm}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function Qt(t,e,r){let o=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&Et(o,e,r);let n="on"+t,s=e[n];if(typeof s=="function"){let c=t==="Render"?"__inRender":t==="RenderRouter"?"__inRenderRouter":null;if(c){if(e.__ref[c])return!0;e.__ref[c]=!0}let l=e.context?.designSystem;l&&it(l);let f=!!c;try{let u=s(e,e.state,e.context,r);if(u&&typeof u.then=="function"){let d=e.__ref;return u.catch(h=>{e.context?.plugins?.length&&Et("error",e,{hook:n,error:h})||console.error(`[DOMQL] Lifecycle "${n}" error:`,h)}).finally(()=>{c&&d&&(d[c]=!1)}),f=!1,!0}if(u===!1)return!1}catch(u){if(e.context?.plugins?.length&&Et("error",e,{hook:n,error:u})||console.error(`[DOMQL] Lifecycle "${n}" error:`,u),e.context?.strictMode)throw u}finally{l&&et(),f&&e.__ref&&(e.__ref[c]=!1)}}return!0}var eS={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"]},rS={"gradient-blue-light":`linear-gradient(to right,
55
+ `):"")}}if(Wf(s,!0),mS(s,t,o),typeof s.html=="function"&&s.node&&!s.node.innerHTML){let h=s.context?.designSystem;h&&oe(h);try{let m=s.html(s,s.state,s.context);m!=null&&typeof m!="function"&&(s.node.innerHTML=m)}catch{}finally{h&&te()}}if(Qe("Create",s,n),Qe("Complete",s,n),Qe("Render",s,n),Qe("RenderRouter",s,n),Wm(s,n),typeof s.onFrame=="function"){let h=s.onFrame,m=s.context?.designSystem,_=()=>{if(s.node){if(s.node.isConnected){m&&oe(m);try{h(s,s.state,s.context)}catch(b){console.error("[DOMQL] onFrame error:",b)}finally{m&&te()}}requestAnimationFrame(_)}};requestAnimationFrame(_)}return s}function X1(e,t,r){let n=!t,o=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=n&&o&&e.context?.state,i=r.state!==void 0&&!s?r.state:e.state&&!ge(e.state)?e.state:void 0;if(i==null){if(t?.state)e.state=t.state,ut(e,e.state);else if(e.context?.state){let a=e.context.state,c={...a},l=e.context?.polyglot;if(l?.translations){let f=e.context,u=a.lang||l.defaultLang||"en",d=new Set,p=(m,_)=>{d.has(m)||ir(f,m,c)&&(c[m]=_,d.add(m),Wt(f,m))},g=l.translations[u];if(g&&typeof g=="object")for(let m in g)p(m,g[m]);let h=new Set(l.languages||[]);for(let m in l.translations)h.has(m)||p(m,l.translations[m])}e.state=ge(c)?c:tr(c),e.state.__element=e,e.state.root=e.state,ut(e,e.state)}else e.state={},Object.defineProperty(e.state,"root",{value:e.state,enumerable:!1,configurable:!0,writable:!0}),ut(e,e.state);return}if(typeof i=="string"){if(e.state=aS(i,t),e.state&&typeof e.state=="object"&&!ge(e.state)){let a=t?.state?.root||t?.state||e.state;Object.defineProperty(e.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}ut(e,e.state);return}if(typeof i=="function"){let a=i(e,t?.state);e.state=ge(a)?a:tr(a||{})}else ge(i)?e.state=i:e.state=tr({...i});e.state.__element=e,t?.state?(e.state.parent=t.state,e.state.root=t.state.root||t.state):e.state.root=e.state,ut(e,e.state)}function Um(e,t){if(!t)return e;let r=t.split("/"),n=e;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function aS(e,t){if(!t)return{};if(e===".")return t.state||{};if(e.startsWith("../")){let o=e.slice(3);return o?Um(t.state,o):t.state??{}}if(e.startsWith("~/")){let o=t.state?.root||t.state,s=e.slice(2);return s?Um(o,s):o??{}}if(t.state?.[e]!==void 0)return t.state[e];let r=Um(t.state,e);if(r!=null&&Object.keys(r).length>0)return r;let n=t.context?.polyglot;if(n?.translations){let o=t.state?.root?.lang||n.defaultLang||"en",s=n.translations[o];if(s?.[e]!==void 0)return s[e];if(n.translations[e]!==void 0)return n.translations[e]}return{}}var Z1=new Set(["s","state","ctx","context"]);function J1(e){try{let r=Function.prototype.toString.call(e).match(/^[^(]*\(([^)]*)\)/);return r?r[1].split(",").map(n=>n.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function Q1(e){if(typeof e!="function"||e.length!==2)return!1;let t=J1(e);if(t.length<2)return!1;let r=t[1].replace(/[{}[\]]/g,"").trim();return r.length>0&&!Z1.has(r)}function eO(e){let t=e.__ref,r=e.tag||"div",n=e.context?.designSystem,o=[],s=Object.keys(e);for(let i=0;i<s.length;i++){let a=s[i];if(typeof e[a]!="function"||Ve.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||ns(a)||ye[a]||ve&&ve.has(a)||Hr(r,a)||(Oe()&&Q1(e[a])&&console.warn(`[smbls] custom prop "${a}"${e.key?` on key "${e.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:e[a]}))}for(let i=0;i<o.length;i++){let{prop:a,fn:c}=o[i];t.__exec[a]=c,Object.defineProperty(e,a,{get(){n&&oe(n);try{return c(e,e.state,e.context)}catch{return}finally{n&&te()}},set(l){delete t.__exec[a],Object.defineProperty(e,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function tO(e,t){if(!(!Array.isArray(t)||t.length===0))for(let r=0;r<t.length;r++){let n=t[r];try{typeof n=="function"?n(e,e.state,e.context):typeof n=="string"&&e.state?.[n]}catch{}}}function Fe(e,t,r){return!Array.isArray(t)||t.length===0?r:function(...n){return tO(e,t),r.apply(this,n)}}function Ba(e,t){if(!(!e||Array.isArray(e)||typeof e!="object"))return e[t]}function Ce(e,t){return()=>e.path.join(".")+"::"+t}function cS(e,t){let r=e.__ref,n=!!(t&&t.skipIfEffect);if(eO(e),typeof e.text=="function"){let s=e.text,i=Fe(e,e.textDeps,s),a=Z(()=>{if(!r.contentManaged)try{let c=i(e,e.state,e.context);e.node&&c!=null&&typeof c!="function"&&typeof c!="object"&&(typeof c=="string"&&c.includes("{{")&&(c=cn.call(e,c,e.state)),Jo(e,c))}catch{}},{depth:r.path.length,label:Ce(r,"text")});r.__effects.push(a),r.__exec.text=s}else if(typeof e.text=="string"&&e.text.includes("{{")){let s=e.text,i=Z(()=>{if(r.contentManaged)return;let a=cn.call(e,s,e.state);a!=null&&(e.text=a),e.node&&Jo(e,a??"")},{depth:r.path.length,label:Ce(r,"text")});r.__effects.push(i),r.__exec.text=s}for(let s of Object.keys(e))if(typeof e[s]=="function"&&!Ve.has(s)&&!ns(s)&&!r.__exec[s]){if(ye[s]){let i=e[s],a=Fe(e,e[s+"Deps"],i),c=s,l,f=null,u,d=Z(()=>{let p=e.context?.designSystem;p&&oe(p);try{let g=a(e,e.state,e.context);If();let h;try{h=ye[c](g,e,e.state,e.context)}finally{$f()}if(Array.isArray(h)){let _={};for(let b of h)if(b)for(let y in b)_[y]=b[y];h=_}let m=c==="show"||c==="hide";if(h&&e.node&&rO(h)){let _=Hf(h);if(_===null||_!==u){u=_;let b=at(h,null,e.context?.cssPrefix),y=b?b.split(" ").filter(Boolean):null;if(e.node.classList){if(f)for(let x of f)e.node.classList.remove(x);if(y&&y.length)for(let x of y)e.node.classList.add(x);f=y}}l=void 0}else if(h&&e.node){if(f){for(let y of f)e.node.classList.remove(y);f=null,u=void 0}let _=Hf(h),b=m&&e.node.style.display!=="none";(_===null||_!==l||b)&&(l=_,rs(e.node,h))}else if(e.node&&m){l=void 0;let _=r.__explicitDisplay;e.node.style.display=typeof _=="string"?_:""}}finally{p&&te()}},{depth:r.path.length,label:Ce(r,c)});r.__effects.push(d),r.__exec[s]=i}else if(ve&&ve.has(s)){let i=e[s],a=Fe(e,e[s+"Deps"],i),c=s,l,f=Z(()=>{let u=e.context?.designSystem;u&&oe(u);try{let d=a(e,e.state,e.context);if(e.node)if(d!=null){let p=c+":"+String(d);p!==l&&(l=p,rs(e.node,{[c]:d}))}else l=void 0,e.node.style[c]=""}finally{u&&te()}},{depth:r.path.length,label:Ce(r,c)});r.__effects.push(f),r.__exec[s]=i}}if(typeof e.html=="function"){let s=e.html,i=Fe(e,e.htmlDeps,s),a=Z(()=>{let c=e.context?.designSystem;c&&oe(c);try{let l=i(e,e.state,e.context);e.node&&l!=null&&typeof l!="function"&&(e.node.innerHTML=l)}finally{c&&te()}},{depth:r.path.length,label:Ce(r,"html")});r.__effects.push(a),r.__exec.html=s}if(typeof e.value=="function"){let s=e.value,i=Fe(e,e.valueDeps,s),a=Z(()=>{try{let c=i(e,e.state,e.context);if(!e.node||!("value"in e.node))return;let l=c==null?"":String(c);if(e.node.value===l)return;let f=typeof document<"u"&&document.activeElement===e.node,u=f&&typeof e.node.selectionStart=="number"?e.node.selectionStart:null,d=f&&typeof e.node.selectionEnd=="number"?e.node.selectionEnd:null;if(e.node.value=l,f&&u!=null&&d!=null)try{e.node.setSelectionRange(u,d)}catch{}}catch{}},{depth:r.path.length,label:Ce(r,"value")});r.__effects.push(a),r.__exec.value=s}if(typeof e.style=="function"){let s=e.style,i=Fe(e,e.styleDeps,s),a,c=Z(()=>{let l=i(e,e.state,e.context),f=Hf(l);(f===null||f!==a)&&(a=f,rs(e.node,l))},{depth:r.path.length,label:Ce(r,"style")});r.__effects.push(c),r.__exec.style=s}else if(e.style&&typeof e.style=="object")for(let s in e.style){let i=e.style[s];if(typeof i!="function")continue;let a=Fe(e,Ba(e.styleDeps,s),i),c,l=Z(()=>{try{let f=a(e,e.state,e.context);if(e.node){let u=s+":"+String(f);u!==c&&(c=u,rs(e.node,{[s]:f}))}}catch{}},{depth:r.path.length,label:Ce(r,"style."+s)});r.__effects.push(l)}if(e.attr&&typeof e.attr=="object"){for(let s in e.attr)if(typeof e.attr[s]=="function"){let i=Fe(e,Ba(e.attrDeps,s),e.attr[s]),a=s,c=Z(()=>{try{let l=i(e,e.state,e.context);e.node?.setAttribute&&(l==null||l===!1&&!hr(a)?e.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&e.node.setAttribute(a,Jt(a,l)))}catch{}},{depth:r.path.length,label:Ce(r,"attr."+a)});r.__effects.push(c)}}if(e.aria&&typeof e.aria=="object")for(let s in e.aria){if(typeof e.aria[s]!="function")continue;let i=Fe(e,Ba(e.ariaDeps,s),e.aria[s]),a="aria-"+s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=Z(()=>{try{let l=i(e,e.state,e.context);if(!e.node?.setAttribute)return;l==null?e.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&e.node.setAttribute(a,Jt(a,l))}catch{}},{depth:r.path.length,label:Ce(r,"aria."+s)});r.__effects.push(c)}if(e.data&&typeof e.data=="object")for(let s in e.data){if(typeof e.data[s]!="function")continue;let i=Fe(e,Ba(e.dataDeps,s),e.data[s]),c="data-"+s.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),l=Z(()=>{try{let f=i(e,e.state,e.context);if(!e.node?.setAttribute)return;f==null||f===!1?e.node.removeAttribute(c):typeof f!="function"&&typeof f!="object"&&e.node.setAttribute(c,f===!0?"":f)}catch{}},{depth:r.path.length,label:Ce(r,"data."+s)});r.__effects.push(l)}let o=e.classlist&&typeof e.classlist=="object"&&!Array.isArray(e.classlist)?e.classlist:e.class&&typeof e.class=="object"&&!Array.isArray(e.class)?e.class:null;if(o)for(let s in o){if(typeof o[s]!="function")continue;let i=Fe(e,Ba(e.classDeps,s),o[s]),a=Z(()=>{try{let c=i(e,e.state,e.context);if(!e.node?.classList)return;typeof c=="string"?e.node.classList.add(c):c?e.node.classList.add(s):e.node.classList.remove(s)}catch{}},{depth:r.path.length,label:Ce(r,"class."+s)});r.__effects.push(a)}!n&&typeof e.if=="function"&&lS(e,r,e.if);for(let s of Object.keys(e)){if(Ve.has(s)||typeof e[s]!="function")continue;let i=s.charCodeAt(0);if(i>=65&&i<=90||ns(s))continue;let a=e[s];r.__exec[s]=a;let c=e.tag||"div";if(Hr(c,s)&&!ye[s]&&!(ve&&ve.has(s))){let l=zr(s)||s,f=Fe(e,e[s+"Deps"],a),u=Z(()=>{try{let d=f(e,e.state,e.context);e.node?.setAttribute&&(d==null||d===!1&&!hr(l)?e.node.removeAttribute(l):typeof d!="function"&&typeof d!="object"&&(l==="src"&&"src"in e.node?e.node.src=d:e.node.setAttribute(l,Jt(l,d))))}catch{}},{depth:r.path.length,label:Ce(r,s)});r.__effects.push(u)}}if(sO(e),cO(e),typeof e.onStateUpdate=="function"&&Array.isArray(e.stateDeps)){let s=e.onStateUpdate,i=e.stateDeps,a=!1,c=[],l=Z(()=>{let f=[];for(let g=0;g<i.length;g++){let h=i[g];try{f[g]=typeof h=="function"?h(e,e.state,e.context):e.state?.[h]}catch{f[g]=void 0}}if(!a){a=!0,c=f;return}let u=f.length!==c.length;for(let g=0;!u&&g<f.length;g++)f[g]!==c[g]&&(u=!0);let d=c;if(c=f,!u)return;let p=e.context?.designSystem;p&&oe(p);try{s(e,e.state,e.context,{prev:d,next:f})}catch(g){if(e.context?.plugins?.length&&Ee("error",e,{hook:"onStateUpdate",error:g})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',g),e.context?.strictMode)throw g}finally{p&&te()}},{depth:r.path.length,label:Ce(r,"onStateUpdate")});r.__effects.push(l)}aO(e)}function Qw(e){let t=e.parent,r=t?.node;if(!r||!e.node){mS(e,e.parent);return}let n=null,o=Object.keys(t),s=o.indexOf(e.key);for(let i=s+1;i<o.length;i++){let a=t[o[i]];if(a?.node?.parentNode===r){n=a.node;break}}n?r.insertBefore(e.node,n):r.appendChild(e.node)}function lS(e,t,r){let n=Fe(e,e.ifDeps,r),o=Z(()=>{let s;try{s=n(e,e.state,e.context)}catch(a){if(s=!1,t.__ifError=a,typeof console<"u"&&console.warn){let c=e.key||e.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${c} \u2014 treating as false:`,a?.message||a)}return}let i=t.__if;if(t.__if=!!s,i&&!t.__if&&e.node){e.node.remove();try{typeof e.onRemove=="function"&&e.onRemove(e)}catch(a){console.error("[smbls] onRemove error:",a)}}else if(!i&&t.__if)if(t.__ifInitialized)e.node||(e.node=Br(e)),e.node&&(e.node.ref=e),Qw(e),Km(e),Qe("Render",e,{}),Wm(e,{});else{if(t.__ifInitialized=!0,e.tag||(e.tag=jr(e)),Qe("Init",e,{}),e.node||(e.node=Br(e)),!e.node)return;if(e.parent?.__ref?.__children&&!e.parent.__ref.__children.includes(e.key)&&e.parent.__ref.__children.push(e.key),e.tag==="fragment"&&!t.__fragmentAnchor){let c=(e.context?.document||globalThis.document).createComment("");e.node.appendChild(c),t.__fragmentAnchor=c}Qe("AttachNode",e,{}),e.node.setAttribute&&e.key&&e.node.setAttribute("data-key",e.key),e.id&&e.node.setAttribute&&(e.node.id=e.id),hS(e,{}),cS(e,{skipIfEffect:!0}),Km(e),dS(e),gS(e,{}),Qw(e),Qe("Create",e,{}),Qe("Complete",e,{}),Qe("Render",e,{}),Qe("RenderRouter",e,{}),Wm(e,{})}},{depth:t.path.length,label:Ce(t,"if")});t.__effects.push(o)}function Jo(e,t){let r=e.node;if(!r)return;let n=t==null||typeof t=="object"?"":String(t);if(e.tag==="string"){r.nodeValue!==n&&(r.nodeValue=n);return}let o=e.__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||e.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 Km(e){let{node:t}=e;if(t){if((typeof e.text=="string"&&!e.text.includes("{{")||typeof e.text=="number")&&Jo(e,e.text),fO(e),typeof e.html=="string"&&(t.innerHTML=e.html),e.value!=null&&typeof e.value!="function"&&"value"in t){let r=String(e.value);t.value!==r&&(t.value=r)}if(e.style&&typeof e.style=="object"&&rs(t,e.style),e.attr&&typeof e.attr=="object")for(let r in e.attr){let n=e.attr[r];typeof n=="function"||typeof n=="object"||n!=null&&(n===!1&&!hr(r)||t.setAttribute&&t.setAttribute(r,Jt(r,n)))}if(e.data&&typeof e.data=="object")for(let r in e.data){let n=e.data[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||t.dataset&&(t.dataset[r]=n===!0?"":n)}if(e.classlist||e.class){let r=e.classlist||e.class;if(typeof r=="string")r.split(" ").forEach(n=>n&&t.classList.add(n));else if(typeof r=="object")for(let n in r){let o=typeof r[n]=="function"?r[n](e,e.state,e.context):r[n];o&&t.classList.add(typeof o=="string"?o:n)}}}}function Hf(e){if(e==null||typeof e!="object")return"s:"+String(e);try{return"o:"+JSON.stringify(e)}catch{return null}}function rO(e){if(!e||typeof e!="object")return!1;for(let t in e){let r=e[t];if(r&&typeof r=="object"&&!Array.isArray(r))return!0}return!1}function rs(e,t){if(!e||!t||!e.style)return;let r=null;for(let n in t){let o=t[n];if(o!=null){if(n.charAt(0)==="&"&&typeof o=="object"){r||(r={}),r[n]=o;continue}try{let s=String(o),i=n.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),a=s.trim(),c=/\s*!important\s*$/.test(a),l=a.replace(/\s*!important\s*$/,"");e.style.setProperty(i,l,c?"important":"")}catch{}}}r&&nO(e,r)}function nO(e,t){let r=`_ds${sS.scopedStyleId++}`;e.classList.add(r);let n=e.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 t){let a="."+r,c=i.replace(/&/g,a).split(",").map(f=>{let u=f.trim();return u.includes(a)?u:a+u}).join(", "),l=t[i];if(typeof l=="object"){let f="",u="";for(let d in l){let p=l[d];if(typeof p=="object"){let g=d.includes("&")?c.split(", ").map(m=>d.replace(/&/g,m)).join(", "):c.split(", ").map(m=>`${m} ${d}`).join(", "),h="";for(let m in p)h+=`${m.replace(/[A-Z]/g,_=>"-"+_.toLowerCase())}: ${p[m]};`;u+=pr(`${g} { ${h} }`,g)+`
56
+ `}else f+=`${d.replace(/[A-Z]/g,g=>"-"+g.toLowerCase())}: ${p};`}f&&(s+=pr(`${c} { ${f} }`,c)+`
57
+ `),u&&(s+=u)}}s&&(o.textContent+=s)}var eS=new Set;function tS(e){if(!Array.isArray(e))return"";let t=[];for(let r=0;r<e.length;r++)typeof e[r]=="string"&&e[r].length&&t.push(e[r]);return t.sort(),t.join("|")}function oO(e,t,r){let n=tS(r);queueMicrotask(()=>{if(!e.__ref)return;let o;try{o=t(e,e.state,e.context)}catch{return}if(tS(o)===n)return;let s=e.__ref.path?e.__ref.path.join("."):e.key||"?";eS.has(s)||(eS.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 sO(e){let t=e.subscribeTo,r=typeof t=="function",n=t;if(r)try{n=t(e,e.state,e.context)}catch{n=null}if(r&&Oe()&&oO(e,t,Array.isArray(n)?n:[]),!Array.isArray(n)||n.length===0)return;let o=e.__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=Z(()=>{let d=e.state&&(ge(e.state)?e.state.root:null);if(!d||!ge(d))return;let p=d;p=p[c];for(let h=0;h<l.length&&!(p==null||typeof p!="object");h++)if(ge(p))p=p[l[h]];else break;if(!f.value)return;let g=!1;if(typeof e.onBeforeUpdate=="function"){let h=e.context?.designSystem;h&&oe(h);try{if(ym(o)){let m=e.onBeforeUpdate(e,e.state,e.context,{updateBySubscription:!0});m&&typeof m.then=="function"?m.then(()=>gr(o,!1),_=>{gr(o,!0),e.context?.plugins?.length&&Ee("error",e,{hook:"onBeforeUpdate",error:_})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",_)}):(gr(o,!1),m===!1&&(g=!0))}}catch(m){gr(o,!0),e.context?.plugins?.length&&Ee("error",e,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}finally{h&&te()}}if(!g&&e.node&&o.__effects)for(let h=0;h<o.__effects.length;h++){let m=o.__effects[h];m&&m!==u&&!m._disposed&&!m._isSubscribeToEffect&&typeof m._execute=="function"&&m._execute()}if(!g&&typeof e.onUpdate=="function"){let h=e.context?.designSystem;h&&oe(h);try{e.onUpdate(e,e.state,e.context)}catch(m){e.context?.plugins?.length&&Ee("error",e,{hook:"onUpdate",error:m})||console.error("[DOMQL] subscribeTo onUpdate error:",m)}finally{h&&te()}}},{depth:o.path.length,label:Ce(o,"subscribeTo("+i+")")});f.value=!0,u._isSubscribeToEffect=!0,o.__effects.push(u)}}function Zm(e,t){return e.charCodeAt(0)===64&&e.length>1&&!e.startsWith("@media")&&!e.startsWith("@keyframes")&&!e.startsWith("@supports")&&!e.startsWith("@container")&&(e==="@dark"||e==="@light"||!t.context?.designSystem?.media?.[e.slice(1)])}function Jm(e,t){if(e.charCodeAt(0)!==64||/^@(media|supports|container|keyframes)\b/.test(e))return e;let r=t.context?.designSystem?.media?.[e.slice(1)];return r?/^@(media|supports|container)\b/.test(r)?r:`@media ${r}`:e}var rS=new Set;function iO(e,t){let r=t?.__ref?.path?t.__ref.path.join("."):t?.key||"?",n=r+"::"+e;rS.has(n)||(rS.add(n),console.warn(`[smbls/css] "${e}" 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 os(e,t,r){let n={},o=new Set,s=(i,a,c)=>{let l=c?new Set(Object.keys(n)):null;if(ye[i]){let f=ye[i](a,t,t.state,t.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 e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;let a=e[i];if(typeof a=="function"&&(a=a(t,t.state,t.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(t,t.state,t.context)),d==null||typeof d=="function")continue;let p=typeof t[u]=="function"&&(ye[u]||ve&&ve.has(u));s(u,d,p)}continue}if(Zm(i,t)){let u=os(a,t,!1);Object.keys(u).length&&(n[`[data-theme="${i.slice(1)}"] &`]=u);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(i)){Oe()&&iO(i,t);continue}let l=Jm(i,t),f=os(a,t,!1);Object.keys(f).length&&(n[l]=f);continue}let c=typeof t[i]=="function"&&(ye[i]||ve&&ve.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 Qm(e,t){if(t===void 0&&(t=0),t>8)return!1;if(typeof e=="function")return!0;if(e&&typeof e=="object"&&!Array.isArray(e)){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&Qm(e[r],t+1))return!0}return!1}function fS(e,t,r){if(!t||typeof t!="object"||Array.isArray(t))return null;if(Zm(e,r)){let s=os(t,r,!1);return Object.keys(s).length?{cssProp:`[data-theme="${e.slice(1)}"] &`,block:s}:null}let n=Jm(e,r),o=os(t,r,!1);return Object.keys(o).length?{cssProp:n,block:o}:null}function aO(e){let t=e.__ref;for(let r of Object.keys(e)){if(!qm(r))continue;let n=e[r];if(!n||typeof n!="object"||Array.isArray(n)||!Qm(n))continue;let o=null,s,i=Z(()=>{if(!e.node)return;let a=e.context?.designSystem;a&&oe(a);let c,l=!1;try{let f=fS(r,n,e),u=f?Hf(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=at({[f.cssProp]:f.block},null,e.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&te()}if(!(l||!e.node.classList)){if(o)for(let f of o)e.node.classList.remove(f);if(c&&c.length)for(let f of c)e.node.classList.add(f);o=c}},{depth:t.path.length,label:Ce(t,"cssBlock("+r+")")});t.__effects.push(i)}}function cO(e){let t=e.__ref;t.__conditionalRunners=[];let r=new Map;for(let n of Object.keys(e)){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 ${e.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=e[n];if(!i||typeof i!="object")continue;let a=o==="!",c={lastMatch:!1,appliedKeys:null,appliedClasses:null},l=()=>{let p,g=e[s];if(g===void 0){let _=!!e.state&&s in e.state,b=e.state?e.state[s]:void 0;if(_||b!==void 0)p=b;else{let y=e.context?.cases?.[s];if(y===void 0)return;try{p=typeof y=="function"?y.call(e,e):y}catch(x){p=!1,t.__conditionalError=x,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${n}\` case fn threw on ${e.key||"?"} \u2014 treating as false:`,x?.message||x)}}}else if(typeof g=="function")try{p=g(e,e.state,e.context)}catch(_){p=!1,t.__conditionalError=_,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${n}\` predicate threw on ${e.key||"?"} \u2014 treating as false:`,_?.message||_)}else p=g;let h=a?!p:!!p;if(!e.node||h===c.lastMatch)return;c.lastMatch=h;let m=e.context?.designSystem;m&&oe(m);try{if(h){let _={},b={},y=!1;for(let S in i){if(!Object.prototype.hasOwnProperty.call(i,S))continue;let v=i[S],D=S.charAt(0);if((D===":"||D==="@"||D==="&"||D==="[")&&v&&typeof v=="object"&&!Array.isArray(v)){if(Zm(S,e)){let T=os(v,e,!1);Object.keys(T).length&&(b[`[data-theme="${S.slice(1)}"] &`]=T,y=!0)}else{let T=Jm(S,e),R=os(v,e,!1);Object.keys(R).length&&(b[T]=R,y=!0)}continue}let L=typeof v=="function"?v(e,e.state,e.context):v;if(L!=null)if(ye[S]){let T=ye[S](L,e,e.state,e.context);if(T){let R=Array.isArray(T)?T:[T];for(let V of R)V&&Object.assign(_,V)}}else ve&&ve.has(S)&&(_[S]=L)}let x=Object.keys(_);if(x.length){rs(e.node,_);for(let S of x)r.set(S,n);c.appliedKeys=x}else c.appliedKeys=null;if(y){let S=at(b,null,e.context?.cssPrefix),v=S?S.split(" ").filter(Boolean):[];if(v.length&&e.node.classList){for(let D of v)e.node.classList.add(D);c.appliedClasses=v}else c.appliedClasses=null}else if(c.appliedClasses){for(let S of c.appliedClasses)e.node.classList.remove(S);c.appliedClasses=null}}else{if(c.appliedKeys){for(let _ of c.appliedKeys)r.get(_)===n&&(e.node.style[_]="",r.delete(_));c.appliedKeys=null}if(c.appliedClasses){for(let _ of c.appliedClasses)e.node.classList.remove(_);c.appliedClasses=null}}}finally{m&&te()}};t.__conditionalRunners.push(l);let f=Fe(e,e[s+"Deps"],l),u=Z(f,{depth:t.path.length,label:Ce(t,"conditional("+n+")")}),d=t.__exec&&t.__exec[s]||e[s];u._sources.size===0&&typeof d=="function"&&Oe()&&console.warn(`[smbls] conditional \`${n}\` on ${e.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.`),t.__effects.push(u)}}var Vm=new WeakSet;function lO(e){let t=e.ownerDocument;!t||Vm.has(t)||(Vm.add(t),queueMicrotask(()=>{Vm.delete(t);let r=t.body||t.documentElement;r&&r.offsetWidth}))}var zm=new WeakSet,nS=!1;function oS(e){return e.startsWith("[data-theme=")||e.startsWith("@media")&&e.includes("prefers-color-scheme")}function Gm(e,t){let r={...e};for(let n in t){let o=t[n],s=r[n];r[n]=o&&typeof o=="object"&&s&&typeof s=="object"?Gm(s,o):o}return r}function uS(e,t){let r={};for(let n in e){let o=e[n];if(o&&typeof o=="object"){let s=uS(o,t);Object.keys(s).length&&(r[n]=s)}else t.has(n)||(r[n]=o)}return r}function fO(e){let{node:t}=e;if(!t)return;if(nS||(nS=!0,at({display:"none"})),zm.has(e)){console.error("[applyCssInProps] re-entry detected for element",e.key,"prop path:",e.__ref?.path);return}zm.add(e);let r=e.context?.designSystem;r&&oe(r),If();try{let n={},o=!1,s=null,i=null,a=null,c=(l,f)=>{if(f&&typeof f=="object"&&oS(l)){i||(i={});let u=i[l];u&&(f=Gm(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(e,"theme")&&typeof e.theme!="function"&&ye.theme){let l=ye.theme(e.theme,e,e.state,e.context);if(l){let f=u=>{for(let d in u){let p=u[d];p&&typeof p=="object"&&oS(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(e)){if(typeof e[l]=="function"||Ve.has(l)||l==="theme")continue;let f=l.charCodeAt(0);if(!(f>=65&&f<=90)&&!ns(l)){if(ye[l]){let u=e[l],d=ye[l](u,e,e.state,e.context);if(d){if(Array.isArray(d)){for(let p of d)if(p)for(let g in p)c(g,p[g])}else for(let p in d)c(p,d[p]);o=!0}}else if(ve&&ve.has(l)){let u=e[l];u!=null&&typeof u!="object"&&(c(l,u),o=!0)}else if(l.charCodeAt(0)===45){let u=e[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=e[l];if(u&&typeof u=="object"&&!Array.isArray(u)){if(Qm(u))continue;let d=fS(l,u,e);d&&(c(d.cssProp,d.block),o=!0)}}}}if(s)for(let l in s){let f=a?uS(s[l],a):s[l];i&&i[l]&&(f=Gm(f,i[l])),Object.keys(f).length?n[l]=f:delete n[l]}if(o){n.display&&String(n.display).includes("!important")&&(t.style.setProperty("display",String(n.display).replace(/\s*!important\s*$/,""),"important"),delete n.display);let l=at(n,null,e.context?.cssPrefix);if(l&&t.classList){let u=l.split(" ").filter(Boolean),d=!1;for(let p of u)t.classList.add(p),d||(p.charCodeAt(0)===95&&p.charCodeAt(1)===99||p.charCodeAt(0)===95&&p.indexOf("_c",1)!==-1)&&(d=!0);d&&lO(t)}let f=e.display!=null&&typeof e.display!="function"?e.display:e.hide===!0||e.show===!1?"none":null;if(f!=null){let u=n.display;if(u&&u!==f)if(f==="none"){let d=[];for(let p of t.classList)p.startsWith("_d-")&&p!=="_d-none"&&d.push(p);for(let p of d)t.classList.remove(p);t.classList.add("_d-none")}else t.style.display==="none"&&(typeof e.hide=="function"||typeof e.show=="function")||(t.style.display=e.display),e.__ref&&(e.__ref.__explicitDisplay=e.display)}}}finally{$f(),r&&te(),zm.delete(e)}}function dS(e){let{node:t}=e;if(!t||!t.setAttribute)return;if(e.aria&&typeof e.aria=="object")for(let o in e.aria){let s=e.aria[o];if(typeof s=="function"||typeof s=="object"||s==null)continue;let i="aria-"+o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());t.setAttribute(i,Jt(i,s))}let r=mm(e);for(let o in r){let s=r[o];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&t.setAttribute(o,s===!0?"":s)}let n=e.tag||"div";for(let o of Object.keys(e)){if(typeof e[o]=="function"||Ve.has(o)||o==="on"||r[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!ns(o)&&!(ye[o]||ve&&ve.has(o))&&Hr(n,o)){let i=e[o];if(i==null||(typeof i=="string"&&i.includes("{{")&&(i=cn(i,e,e.state,e.context),e[o]=i),i==null||typeof i=="function"||typeof i=="object")||i===!1&&!hr(zr(o)||o))continue;let a=zr(o)||o;t.setAttribute(a,Jt(a,i))}}}function uO(e,t){let r=e.node,n=e.__ref,o=n.__autoGrow;if(!t){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 t=="object"&&t.max!=null?String(t.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 dO(e){if(!e.autoGrow)return;let t=e.node;if(!t||t.tagName!=="TEXTAREA")return;let r=e.__ref,n=e.autoGrow,o=typeof n=="function"?Fe(e,e.autoGrowDeps,n):null,s=Z(()=>{let i=e.autoGrow,a=i;if(typeof i=="function")try{a=(i===n&&o?o:i)(e,e.state,e.context)}catch{a=null}uO(e,a)},{depth:r.path.length,label:Ce(r,"autoGrow")});r.__effects||(r.__effects=[]),r.__effects.push(s),o&&(r.__exec.autoGrow=n)}var pS=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function hS(e,t){for(let r of Object.keys(e)){if(!ns(r)||pS.has(r))continue;let n=Of(r);if(n){Rf(n,e,e[r]);continue}let o=e[r];if(typeof o=="string"&&/^[A-Za-z_$][\w$]*$/.test(o)){let i=o;o=function(c){return e.call(i,c)}}if(typeof o!="function")continue;let s=G1(r);Ur.has(s)||Yo(Y1(s),e,o)}pO(e)}function pO(e){let t=e.node;if(!t||!t.addEventListener)return;let r={},n=!1;for(let d of pS){let p=e[d];typeof p=="function"&&(r[d]=p,n=!0)}if(!n)return;let o=typeof e.swipeThreshold=="number"?e.swipeThreshold:40,s=typeof e.swipeMaxDuration=="number"?e.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 g=p.clientX-i,h=p.clientY-a,m=Date.now()-c;if(m>s)return;let _=Math.abs(g),b=Math.abs(h);if(Math.max(_,b)<o)return;let y;if(_>b*1.2)y=g<0?"left":"right";else if(b>_*1.2)y=h<0?"up":"down";else return;let x="onSwipe"+y.charAt(0).toUpperCase()+y.slice(1),S=r[x],v=r.onSwipe;S&&S.call(e,d,e,e.state,e.context),v&&v.call(e,{direction:y,dx:g,dy:h,dt:m,event:d},e,e.state,e.context)};t.addEventListener("touchstart",f,{passive:!0}),t.addEventListener("touchend",u,{passive:!0}),e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{try{t.removeEventListener("touchstart",f)}catch{}try{t.removeEventListener("touchend",u)}catch{}})}function Ha(e,t){let r={...e};for(let n in t){let o=r[n],s=t[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Ha(o,s):r[n]=s}return r}function Ym(e,t,r,n){if(!t||!e.node)return;let o=e.childExtends;if(Array.isArray(t)){let s=e.tag==="fragment",i=e.context?.document||globalThis.document,a=s?null:i?.createDocumentFragment();if(!s&&!a)return;let c=e.childProps,l=e.childrenAs,f=m=>{let _=t[m],b=_;(typeof _=="string"||typeof _=="number")&&(_={text:_});let y=c;if(typeof c=="function")try{y=c(e,_)}catch{y=null}if(l==="state"){let S=b;(typeof b=="string"||typeof b=="number")&&(S={value:b,text:b}),_=y?{...y,state:S}:{state:S}}else y&&(_=Ha(y,_));if(o&&!_.ignoreChildExtends)if(_.extends){let S=Array.isArray(_.extends)?_.extends:[_.extends],v=Array.isArray(o)?o:[o];_={..._,extends:[...v,...S]}}else _={..._,extends:o};let x=_?.key||b&&typeof b=="object"&&b.key||`${m}`;try{return ct(_,e,x,r)}catch(S){if(typeof console<"u"&&console.error){let v=e.__ref?.path?.join(".")||e.key||"<root>";console.error(`[smbls] child "${x}" failed to construct at ${v} (initial render, skipping this row):`,S?.message||S)}return null}},u=e.__ref;if(!(n===!0&&!s&&!!u&&(r?.mountYield===!0||e.yieldChildren===!0))){for(let m=0;m<t.length;m++){let _=f(m);!s&&_?.node&&a.appendChild(_.node)}return s||e.node.appendChild(a),!0}let p=u.__childrenChunkGen=(u.__childrenChunkGen||0)+1;Im();let g=null,h=m=>{if(u.__disposed||u.__childrenChunkGen!==p){g&&g.parentNode&&g.remove();return}for(let _=m;_<t.length;_++){let b=f(_);if(b?.node&&(g?e.node.insertBefore(b.node,g):a.appendChild(b.node)),_+1<t.length&&Dm()){g||(g=i.createComment("smbls-mount"),a.appendChild(g),e.node.appendChild(a));let y=_+1;Lm(()=>h(y));return}}g?(g.remove(),e.node.tagName==="SELECT"&&Wf(e,!0)):e.node.appendChild(a)};return h(0),$m(),!0}if(typeof t=="string"){let s=aS(t,e);if(Array.isArray(s))return Ym(e,s,r,n)}if(typeof t=="object")for(let s in t){if(Ve.has(s))continue;let i=t[s];if(!(i==null||i===!1)){if((typeof i=="string"||typeof i=="number")&&(i={text:i}),e.childProps&&(i=Ha(e.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};ct(i,e,s,r)}}}function Wf(e,t){let r=e.node;if(!r||r.tagName!=="SELECT")return;let n=r.options;if(!n||!n.length)return;let o=e.__ref,s=o&&o.__exec&&o.__exec.value,i=typeof s=="function",a=e.value!=null&&typeof e.value!="function";if(i||a){let f;if(i)try{f=s(e,e.state,e.context)}catch{return}else f=e.value;let u=f==null?"":String(f);r.value!==u&&(r.value=u);return}let c=t||!(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 gS(e,t){let{children:r,content:n}=e,o=e.childExtends;if(typeof r=="function"){let u=r;try{r=u(e,e.state,e.context)}catch(m){if(r=void 0,typeof console<"u"&&console.error){let _=e.__ref?.path?.join(".")||e.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${_} (initial run, treating as empty):`,m?.message||m)}}e.children=r;let d=e.__ref,p=!1,g=Fe(e,e.childrenDeps,u),h=Z(()=>{let m=p;p=!0;let _;try{_=g(e,e.state,e.context)}catch(T){if(typeof console<"u"&&console.error){let R=e.__ref?.path?.join(".")||e.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${R}${m?"":" (initial tracking run)"}:`,T?.message||T)}return}if(!m||_===e.children)return;e.children=_,d.__childrenChunkGen!=null&&d.__childrenChunkGen++;let b=typeof e.onContentUpdate=="function",y=b?[]:null,x=b?[]:null,S=b?[]:null;if(Array.isArray(_)&&e.childrenAs==="state"){let T=e.childProps,R=[],V=new Map;for(let z=0;z<_.length;z++){let de=_[z],F=T;if(typeof T=="function")try{F=T(e,de)}catch{F=null}let J=F&&F.key||de&&de.key||`${z}`;R.push(J),V.set(J,{rawChild:de,childProps:F})}let Ne=new Set(R),q=d.__children.slice();for(let z of q)if(!Ne.has(z)){let de=e[z];de?.remove&&de.remove(),delete e[z],x&&x.push(z)}let W=e.childExtends,re=e.tag==="fragment",B=e.context?.document||globalThis.document,X=re?null:B?.createDocumentFragment(),$e=new Set;for(let z of R){let de=V.get(z),F=de.rawChild,J=e[z];if(J&&J.state){if(F&&typeof F=="object"){let ie=J.state,Ft=ie.$replace||ie.replace,dd=ie.$update||ie.update;try{if(typeof Ft=="function")Ft.call(ie,F);else if(typeof dd=="function"){for(let Le in ie)if(!(Le==="__element"||Le==="root"||Le==="parent"||Le==="update")&&!Object.prototype.hasOwnProperty.call(F,Le))try{ie[Le]=void 0}catch{}dd.call(ie,F)}else for(let Le in F)ie[Le]=F[Le]}catch(Le){if(typeof console<"u"&&console.error){let ae=e.__ref?.path?.join(".")||e.key||"<root>";console.error(`[smbls] child "${z}" failed to patch at ${ae} (reconcile, keeping its previous data for this pass):`,Le?.message||Le)}}}S&&S.push(z);continue}let be=F;(typeof F=="string"||typeof F=="number")&&(be={value:F,text:F});let K=de.childProps,$=K?{...K,state:be}:{state:be};if(W&&!$.ignoreChildExtends)if($.extends){let ie=Array.isArray($.extends)?$.extends:[$.extends],Ft=Array.isArray(W)?W:[W];$={...$,extends:[...Ft,...ie]}}else $={...$,extends:W};let _e;try{_e=ct($,e,z,t)}catch(ie){if(typeof console<"u"&&console.error){let Ft=e.__ref?.path?.join(".")||e.key||"<root>";console.error(`[smbls] child "${z}" failed to construct at ${Ft} (reconcile, skipping this row):`,ie?.message||ie)}$e.add(z);continue}!re&&_e?.node&&X&&X.appendChild(_e.node),y&&y.push(z)}if(!re&&X&&X.childNodes.length&&e.node&&e.node.appendChild(X),!re&&e.node){let z=null;for(let de of R){let F=e[de]?.node;if(!F)continue;let J=z?z.nextSibling:e.node.firstChild;F!==J&&e.node.insertBefore(F,J),z=F}}d.__children=$e.size?R.filter(z=>!$e.has(z)):R,b&&(y.length||x.length)&&Jw(e,{added:y,removed:x,kept:S}),Wf(e,!1);return}let L=b?[...d.__children]:null;for(let T of[...d.__children]){let R=e[T];R?.remove&&R.remove(),delete e[T]}d.__children=[],Ym(e,_,t),Wf(e,!1),b&&Jw(e,{added:[...d.__children],removed:L,kept:[]})},{depth:d.path.length,label:Ce(d,"children")});d.__effects.push(h)}let s=Ym(e,r,t,!0);if(n!=null&&!(n&&n.__ref)){let u=n;if(typeof u=="string"||typeof u=="number"?u={text:u}:typeof u!="object"&&(u={}),e.childProps&&(u=Ha(e.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};ct(u,e,"content",t)}if(r&&!s)return;let i=e.context?.components||{};{let u=Object.keys(e);for(let d=0;d<u.length;d++){let p=u[d];if(!p.endsWith("Extends")||typeof e[p]!="string")continue;let g=p.slice(0,-7);if(!g||g.charCodeAt(0)<65||g.charCodeAt(0)>90)continue;let h={extends:e[p]};delete e[p];for(let m=d+1;m<u.length;m++){let _=u[m],b=_.charCodeAt(0);if(b>=65&&b<=90||Ve.has(_)||typeof e[_]=="function"&&(_.startsWith("on")||_.startsWith(".")))break;let y=e[_];y!==void 0&&(h[_]=y,delete e[_])}e[g]&&typeof e[g]=="object"?e[g]={...h,...e[g]}:e[g]=h}}let a=t?.mountYield===!0||e.yieldChildren===!0,c=Object.keys(e),l=u=>{if(Ve.has(u)||typeof e[u]!="object"||e[u]===null)return;let d=u.charCodeAt(0);if(d<65||d>90)return;let p=e[u];if(!p.__ref){if(!p.extends&&!p.extend){let g=i[u]||i[`smbls.${u}`];g&&(p={...p,extends:g})}if(e.childProps&&(p=Ha(e.childProps,p)),o&&!p.ignoreChildExtends)if(p.extends){let g=Array.isArray(p.extends)?p.extends:[p.extends],h=Array.isArray(o)?o:[o];p={...p,extends:[...h,...g]}}else p={...p,extends:o};ct(p,e,u,t)}};if(!a){for(let u of c)l(u);return}Im();let f=u=>{for(let d=u;d<c.length;d++)if(l(c[d]),d+1<c.length&&Dm()){let p=d+1;Lm(()=>f(p));return}};f(0),$m()}function mS(e,t,r){let{node:n}=e;if(!n)return;n.ref=e;let o=t?.tag==="fragment"?t.__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=t?.node||(t?.nodeType?t: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 Xm=3;function ym(e){return!e||e.__inBeforeUpdate||(e.__beforeUpdateFailCount||0)>=Xm?!1:(e.__inBeforeUpdate=!0,!0)}function gr(e,t){e&&(e.__inBeforeUpdate=!1,t?(e.__beforeUpdateFailCount=(e.__beforeUpdateFailCount||0)+1,e.__beforeUpdateFailCount===Xm&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${Xm}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):e.__beforeUpdateFailCount=0)}function Qe(e,t,r){let n=e.charAt(0).toLowerCase()+e.slice(1);t.context?.plugins?.length&&Ee(n,t,r);let o="on"+e,s=t[o];if(typeof s=="function"){let c=e==="Render"?"__inRender":e==="RenderRouter"?"__inRenderRouter":null;if(c){if(t.__ref[c])return!0;t.__ref[c]=!0}let l=t.context?.designSystem;l&&oe(l);let f=!!c;try{let u=s(t,t.state,t.context,r);if(u&&typeof u.then=="function"){let d=t.__ref;return u.catch(p=>{t.context?.plugins?.length&&Ee("error",t,{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(t.context?.plugins?.length&&Ee("error",t,{hook:o,error:u})||console.error(`[DOMQL] Lifecycle "${o}" error:`,u),t.context?.strictMode)throw u}finally{l&&te(),f&&t.__ref&&(t.__ref[c]=!1)}}return!0}var yS={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"]},bS={"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}`},sA=t=>{let e=[],r=(o,n)=>{for(let s in o){let i=n?`${n}/${s}`:s;
80
80
  #1E54F0 36%,
81
81
  #8B4CCA 69%,
82
82
  #C66894 100%
83
- )`};var Y1={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"}}}},X1={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},Z1={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"}}},oS={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...Y1,...X1,...Z1,none:{color:"none",background:"none"},transparent:{color:"currentColor",background:"transparent"}};var nS={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var sS={ratio:1.618,subSequence:!0};var iS={SourceSans:[{url:""}]},aS={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 cS={symbols:'<svg height="24" width="24"><path d="M13.843 2.7C19.063 2.7 23 6.366 23 11.228c0 3.754-2.862 6.584-6.658 6.584-3.287 0-5.007-2.318-5.007-4.609 0-2.395 1.923-4.344 4.287-4.344.566 0 1.023.12 1.309.223a.212.212 0 01.137.229l-.016.058-.514 1.18a.223.223 0 01-.245.13 2.965 2.965 0 00-.506-.046c-1.245 0-2.258 1.027-2.258 2.288 0 1.33 1.165 2.373 2.651 2.373 2.195 0 3.913-1.777 3.913-4.046 0-3.024-2.294-5.135-5.58-5.135-4.076 0-7.393 3.36-7.393 7.491a7.519 7.519 0 002.871 5.924l-4.96 3.18A12.042 12.042 0 012 14.7c0-6.617 5.313-12 11.843-12z" fill-rule="evenodd"/></svg>',logo:'<svg height="24" width="24"><path d="M13.843 2.7C19.063 2.7 23 6.366 23 11.228c0 3.754-2.862 6.584-6.658 6.584-3.287 0-5.007-2.318-5.007-4.609 0-2.395 1.923-4.344 4.287-4.344.566 0 1.023.12 1.309.223a.212.212 0 01.137.229l-.016.058-.514 1.18a.223.223 0 01-.245.13 2.965 2.965 0 00-.506-.046c-1.245 0-2.258 1.027-2.258 2.288 0 1.33 1.165 2.373 2.651 2.373 2.195 0 3.913-1.777 3.913-4.046 0-3.024-2.294-5.135-5.58-5.135-4.076 0-7.393 3.36-7.393 7.491a7.519 7.519 0 002.871 5.924l-4.96 3.18A12.042 12.042 0 012 14.7c0-6.617 5.313-12 11.843-12z" fill-rule="evenodd"/></svg>',arrowDownCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-circle"><circle cx="12" cy="12" r="10"/><path d="M8 12l4 4 4-4M12 8v8"/></svg>',arrowDownLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-left"><path d="M17 7L7 17M17 17H7V7"/></svg>',arrowDownRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-right"><path d="M7 7l10 10M17 7v10H7"/></svg>',arrowDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down"><path d="M12 5v14M19 12l-7 7-7-7"/></svg>',arrowLeftCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left-circle"><circle cx="12" cy="12" r="10"/><path d="M12 8l-4 4 4 4M16 12H8"/></svg>',arrowLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>',arrowRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><path d="M5 12h14M12 5l7 7-7 7"/></svg>',arrowRightCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right-circle"><circle cx="12" cy="12" r="10"/><path d="M12 16l4-4-4-4M8 12h8"/></svg>',arrowUpCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-circle"><circle cx="12" cy="12" r="10"/><path d="M16 12l-4-4-4 4M12 16V8"/></svg>',arrowUpLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-left"><path d="M17 17L7 7M7 17V7h10"/></svg>',arrowUpRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-right"><path d="M7 17L17 7M7 7h10v10"/></svg>',arrowUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up"><path d="M12 19V5M5 12l7-7 7 7"/></svg>',checkCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check-circle"><path d="M22 11.08V12a10 10 0 11-5.93-9.14"/><path d="M22 4L12 14.01l-3-3"/></svg>',check:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><path d="M20 6L9 17l-5-5"/></svg>',chevronDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><path d="M6 9l6 6 6-6"/></svg>',chevronLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-left"><path d="M15 18l-6-6 6-6"/></svg>',chevronRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><path d="M9 18l6-6-6-6"/></svg>',chevronUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-up"><path d="M18 15l-6-6-6 6"/></svg>',copy:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-copy"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>',eyeOff:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye-off"><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24M1 1l22 22"/></svg>',eye:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>',info:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-info"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4M12 8h.01"/></svg>',lock:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-lock"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0110 0v4"/></svg>',minus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-minus"><path d="M5 12h14"/></svg>',sun:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>',moon:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg>',moreHorizontal:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-horizontal"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>',moreVertical:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-vertical"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>',send:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-send"><path d="M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"/></svg>',smile:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-smile"><circle cx="12" cy="12" r="10"/><path d="M8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01"/></svg>',search:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"/><path d="M21 21l-4.35-4.35"/></svg>',upload:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-upload"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M17 8l-5-5-5 5M12 3v12"/></svg>',video:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-video"><path d="M23 7l-7 5 7 5V7z"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></svg>',x:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><path d="M18 6L6 18M6 6l12 12"/></svg>',star:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>',plus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><path d="M12 5v14M5 12h14"/></svg>'};var lS={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 fS={base:150,ratio:1.333,unit:"ms",subSequence:!0};var uS={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var Va={version:"0.0.1",color:eS,gradient:rS,theme:oS,typography:nS,spacing:sS,font:iS,fontFamily:aS,timing:fS,icons:cS,media:lS,sizes:uS,reset:{html:{},body:{}},animation:{fadeIn:{from:{opacity:0},to:{opacity:1}}},devices:{},class:{},svg:{},grid:{},shape:{}};var Qn={};P(Qn,{A:()=>T0,AssetPicture:()=>OS,Audio:()=>IS,Avatar:()=>z0,B:()=>ZS,Block:()=>dS,Box:()=>Wf,Br:()=>e0,Button:()=>P0,ButtonSet:()=>L0,COMPONENTS:()=>Po,Caption:()=>VS,Checkbox:()=>u0,CheckboxHgroup:()=>d0,Circle:()=>ES,CircleButton:()=>D0,Clickable:()=>kS,Data:()=>QS,Dialog:()=>F0,DialogFooter:()=>j0,DialogHeader:()=>N0,Dropdown:()=>W0,DropdownList:()=>q0,DropdownParent:()=>K0,DropdownParentFocus:()=>G0,DropdownSiblingFocus:()=>Y0,FileIcon:()=>v0,Flex:()=>hS,Focusable:()=>vS,FocusableComponent:()=>CS,Footnote:()=>XS,Form:()=>xS,Grid:()=>mS,Gutter:()=>bS,H1:()=>LS,H2:()=>MS,H3:()=>FS,H4:()=>NS,H5:()=>jS,H6:()=>BS,Headline:()=>GS,Hgroup:()=>i0,HgroupButton:()=>c0,HgroupRows:()=>a0,Hoverable:()=>SS,Hr:()=>t0,I:()=>JS,Icon:()=>S0,IconButton:()=>M0,IconText:()=>k0,Iframe:()=>wS,Img:()=>_S,Inline:()=>pS,InlineFlex:()=>gS,InlineGrid:()=>yS,Input:()=>l0,Italic:()=>qS,KangorooButton:()=>$0,Li:()=>r0,Link:()=>Sy,Notification:()=>X0,NumberInput:()=>f0,Ol:()=>n0,P:()=>US,Picture:()=>TS,Radio:()=>p0,RadioHgroup:()=>h0,Range:()=>H0,RouteLink:()=>O0,RouterLink:()=>ky,SHAPES:()=>zf,Select:()=>R0,Shape:()=>Qm,Span:()=>$S,SquareButton:()=>I0,Strong:()=>zS,Subhead:()=>YS,Svg:()=>RS,Text:()=>DS,Textarea:()=>y0,TextareaWithButton:()=>b0,Theme:()=>AS,Title:()=>KS,Toggle:()=>g0,ToggleHgroup:()=>m0,Tooltip:()=>B0,TooltipHidden:()=>U0,TooltipParent:()=>V0,U:()=>HS,Ul:()=>o0,Underline:()=>WS,Video:()=>PS,depth:()=>Hf,focusableRingEnabled:()=>Uf,getSystemGlobalTheme:()=>za});var Gm={};P(Gm,{Block:()=>dS,Flex:()=>hS,Grid:()=>mS,Gutter:()=>bS,Inline:()=>pS,InlineFlex:()=>gS,InlineGrid:()=>yS});var dS={display:"block"},pS={display:"inline"},hS={display:"flex"},gS={display:"inline-flex"},mS={display:"grid"},yS={display:"inline-grid"},bS={boxSize:"C1"};var Ym={};P(Ym,{Img:()=>_S});R();var _S={tag:"img",attr:{title:t=>t.title||t.alt,alt:t=>t.alt!=null?t.alt:t.title||"",src:t=>{let e=Kt(t);return e&&e.src||t.src},srcset:t=>{let e=Kt(t);return(e?Wi(e):"")||t.srcset}}};var Xm={};P(Xm,{Form:()=>xS});var xS={tag:"form"};var Zm={};P(Zm,{Iframe:()=>wS});var wS={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var Jm={};P(Jm,{Clickable:()=>kS,Focusable:()=>vS,FocusableComponent:()=>CS,Hoverable:()=>SS,focusableRingEnabled:()=>Uf});var J1={appearance:"none",cursor:"pointer",fontFamily:"inherit"},SS={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}}},kS={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}};function Uf(t){let e=t.context&&t.context.designSystem;return!e||e.focusableRing!==!1}var vS={border:"none",outline:t=>Uf(t)?"solid 0 currentColor":"none",":focus-visible":{opacity:1,outline:t=>Uf(t)?"solid X currentColor":"none"},attr:{tabIndex:t=>t.tabIndex}},CS={extends:"Focusable",tag:"button",fontSize:"A",type:"button",border:"none",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",fontFamily:"inherit",style:J1};var ry={};P(ry,{Picture:()=>TS});var ey={};P(ey,{Theme:()=>AS,getSystemGlobalTheme:()=>za});var ty={};P(ty,{Circle:()=>ES,SHAPES:()=>zf,Shape:()=>Qm,default:()=>Q1,depth:()=>Hf});R();var Se=C(),Hf={4:{boxShadow:`rgba(0,0,0,.10) 0 2${Se.unit.default} 4${Se.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${Se.unit.default} 6${Se.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${Se.unit.default} 10${Se.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${Se.unit.default} 16${Se.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${Se.unit.default} 26${Se.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${Se.unit.default} 42${Se.unit.default}`}},Jn=t=>rt(t.shapeDirectionColor)||rt(t.borderColor)||rt(t.backgroundColor)||rt(t.background),Vf=t=>{let e=$a.transition(t.transition,t);return e&&e.transition},zf={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:Jn(t),transition:Vf(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:Jn(t),transition:Vf(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:Jn(t),transition:Vf(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:Vf(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${Jn(t)} 25%, transparent 25%), linear-gradient(315deg, ${Jn(t)} 25%, transparent 25%)`},"&:after":{background:Jn(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)"}}}},Qm={deps:{exec:ft,getSpacingBasedOnRatio:Oe,getMediaColor:Rt},classlist:{shape:t=>t.deps.exec(zf[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=zf[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}}},ES={round:"100%"},Q1=Qm;R();var za=({context:t,state:e})=>{let r=e&&e.root,o=r&&r.globalTheme||t.designSystem&&t.designSystem.globalTheme;return o==="auto"?null:o},AS={deps:{depth:Hf},classlist:{depth:t=>!At(t.depth)&&t.deps.depth[t.depth]}};var TS={deps:{getSystemGlobalTheme:za},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:za},tag:"source",attr:{media:t=>{let{key:e,context:r,deps:o}=t,{media:n}=r.designSystem,s=o.getSystemGlobalTheme(t),i=(t.media||e).slice(1);return i===s?"(min-width: 0px)":i==="dark"||i==="light"?"(max-width: 0px)":n[i]}}},Img:{width:"inherit",ignoreChildExtends:!0,height:"inherit",src:(t,e)=>t.parent?.src||e.src}};var oy={};P(oy,{AssetPicture:()=>OS});R();var OS={tag:"picture",children:t=>{let e=Kt(t);if(e)return qi(e,t.alt)}};var ny={};P(ny,{Svg:()=>RS});var RS={tag:"svg",attr:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},html:t=>{let{context:e}=t;if(t.semanticIcons)return;if(t.html&&typeof t.html!="function")return t.call("exec",t.html,t);let{designSystem:r,utils:o}=e,n=r&&r.svg,s=t.spriteId||r&&r.useSvgSprite,i=t.call("exec",t.src,t),a=d=>`<use xlink:href="#${d}" />`;if(typeof i=="string"){let d=i.match(/^\s*<symbol\b[^>]*\bid="([^"]+)"/);if(d){let h=d[1],g=e.document||(typeof document<"u"?document:null);if(!(g&&typeof g.getElementById=="function"&&g.getElementById(h))){let m=o&&o.scratchSystem&&o.scratchSystem.appendSVGSprite;r&&!r.__svgCache&&(r.__svgCache={}),typeof m=="function"?m({[h]:i},{document:g}):o&&typeof o.init=="function"&&o.init({svg:{[h]:i}},{document:g,emotion:e.emotion})}return a(h)}}if(!s&&i)return i;let c=t.spriteId;if(c)return a(c);if(n&&n[i])return a(i);let l=Symbol.for(i),f=n[l];if(f&&n[f])return a(f);if(!i)return a("");if(typeof i=="string"&&!i.includes("<"))return typeof console<"u"&&console.warn&&console.warn(`[Svg] Unknown sprite symbol "${i}" \u2014 not registered in design-system sprite. Set the icon name to one that exists in designSystem.icons / context.svg, or register the SVG body via utils.init({ svg: { '${i}': '<svg>...</svg>' } }).`),a("");let u=0;for(let d=0;d<i.length;d++)u=(u<<5)-u+i.charCodeAt(d)|0;return f=n[l]=`svg-${(u>>>0).toString(36)}`,o.init({svg:{[f]:i}},{document:e.document,emotion:e.emotion}),a(f)}};var sy={};P(sy,{Video:()=>PS});R();var PS={tag:"video",controls:!0,attr:{src:t=>{let e=Kt(t);return e&&e.src||t.src}},children:t=>{let e=Kt(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 iy={};P(iy,{Audio:()=>IS});R();var IS={tag:"audio",controls:!0,attr:{src:t=>{let e=Kt(t);return e&&e.src||t.src}},children:t=>{let e=Kt(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 ay={};P(ay,{B:()=>ZS,Caption:()=>VS,Data:()=>QS,Footnote:()=>XS,H1:()=>LS,H2:()=>MS,H3:()=>FS,H4:()=>NS,H5:()=>jS,H6:()=>BS,Headline:()=>GS,I:()=>JS,Italic:()=>qS,P:()=>US,Span:()=>$S,Strong:()=>zS,Subhead:()=>YS,Text:()=>DS,Title:()=>KS,U:()=>HS,Underline:()=>WS});var DS={},$S={tag:"span"},LS={tag:"h1"},MS={tag:"h2"},FS={tag:"h3"},NS={tag:"h4"},jS={tag:"h5"},BS={tag:"h6"},US={tag:"p"},VS={tag:"caption"},zS={tag:"strong",fontWeight:"700"},HS={tag:"u"},WS={tag:"u"},qS={tag:"i"},KS={},GS={tag:"h6",fontSize:"B",fontWeight:500},YS={tag:"span",fontSize:"Z1"},XS={tag:"span",fontSize:"Z"},ZS={tag:"b"},JS={tag:"i"},QS={tag:"data"};var cy={};P(cy,{Box:()=>Wf,Br:()=>e0,Hr:()=>t0,Li:()=>r0,Ol:()=>n0,Ul:()=>o0});var tO=t=>{if(!t.context)return;let{props:e,__ref:r}=t,o=le(e,t,{unpack:!1});r.__class=o},Wf={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:tO},t0={tag:"hr",margin:"C1 0"},e0={tag:"br"},r0={tag:"li"},o0={tag:"ul",childExtends:{extends:"Li"}},n0={tag:"ol",childExtends:{extends:"Li"}};var ly={};P(ly,{Hgroup:()=>i0,HgroupButton:()=>c0,HgroupRows:()=>a0});var s0=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},i0={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:s0,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:s0,margin:"0",color:"paragraph"}},a0={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},c0={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var fy={};P(fy,{Input:()=>l0});var l0={extends:["Focusable"],tag:"input",border:"none",type:"input",theme:"field",fontSize:"A",round:"C",lineHeight:"1",padding:"Z2 B",attr:{pattern:t=>t.pattern,minLength:t=>t.minlength,maxLength:t=>t.maxlength,name:t=>t.name,autocomplete:t=>t.autocomplete,placeholder:t=>t.placeholder,value:t=>{if(!t.value)return;let e=t.call("exec",t.value,t);return t.call("isString",e)&&e.includes("{{")?t.call("replaceLiteralsWithObjectFields",e):e},checked:t=>t.call("exec",t.checked,t),disabled:t=>t.disabled||null,readonly:t=>t.readonly,required:t=>t.required,type:t=>t.type}};var uy={};P(uy,{NumberInput:()=>f0});var f0={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 dy={};P(dy,{Checkbox:()=>u0,CheckboxHgroup:()=>d0});var u0={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"}}},d0={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var py={};P(py,{Radio:()=>p0,RadioHgroup:()=>h0});var p0={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}},h0={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var hy={};P(hy,{Toggle:()=>g0,ToggleHgroup:()=>m0});var g0={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}},m0={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var gy={};P(gy,{Textarea:()=>y0,TextareaWithButton:()=>b0});var y0={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"}},b0={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 my={};P(my,{FileIcon:()=>v0,Icon:()=>S0,IconText:()=>k0});var _0=new Set,x0=(t,e)=>{if(!_0.has(t)&&(_0.add(t),typeof console<"u"&&console.warn)){let r=e&&e.__ref&&e.__ref.path,o=r&&r.length?` at <${r.join(".")}>`:"";console.warn(`[Icon] Unknown icon name "${t}"${o} \u2014 not registered in designSystem.icons, rendering the noIcon placeholder. Fix the name or register the icon in the design system.`)}},w0=new WeakMap,eO=t=>{let e=w0.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},w0.set(t,e)),e},rO=(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},oO=(t,e,r)=>{let o=r&&r.context&&r.context.document||(typeof document<"u"?document:null);it(t);try{let n=C();n&&!n.__svgCache&&(n.__svgCache={}),t.__svgCache||(t.__svgCache={});let s={};for(let i in e){let a=Eo(e[i],i);a&&(t.icons[i]=a,s[i]=a)}return t.useIconSprite&&o&&Object.keys(s).length&&Ao(s,{document:o}),Object.keys(s).length>0}finally{et()}},nO=(t,e,r,o,n)=>{let s=t&&t.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=eO(s);if(a.failed.has(e))return!1;let c=a.waiting.get(e);if(c||(c=new Set,a.waiting.set(e,c)),c.add(n),a.pending.has(e))return!0;let l=Promise.resolve().then(()=>i(e,t)).then(f=>{let u=rO(f,r);return u?oO(s,u,o):!1}).catch(f=>(typeof console<"u"&&console.error&&console.error(`[Icon] iconsLoader failed for "${e}":`,f),!1)).then(f=>{a.pending.delete(e);let u=a.waiting.get(e);a.waiting.delete(e),f||a.failed.add(e),u&&u.forEach(d=>{try{d(f)}catch(h){console.error("[Icon] repaint error:",h)}})});return a.pending.set(e,l),!0},S0={extends:"Svg",width:"A",height:"A",display:"inline-block",style:{fill:"currentColor","*":{fill:"currentColor"}},onInit:(t,e,r)=>{let{parent:o}=t,{icons:n,useIconSprite:s,verbose:i}=r&&r.designSystem,{toCamelCase:a}=r&&r.utils,c=g=>{let p=g[".isActive"];if(p)return g.call("exec",p.name||p.icon)},l=(g,p,m)=>{let{semanticIcons:b}=m&&m.designSystem,{toCamelCase:_}=m&&m.utils,y=f(g,p),k=_(y).split(/([a-z])([A-Z])/g),E=k[1]?k[0]:y.split(".")[0].split(" ")[0],O=b&&b[E];if(O){let $=y.includes(".")?"sfsymbols."+y.split(".").slice(1).join("."):"sfsymbols";return y=O[$]||O[y.split(".")[0].split(" ")[0]],{tag:"span",semanticIcons:!0,width:"A",height:"A",lineHeight:"1em",":after":{fontSize:"Z",fontWeight:"300",content:`"${y}"`,textAlign:"center",display:"inline-block",style:{color:"currentColor",fontFamily:"'SF Pro Icons', 'SF Pro', 'SF Symbols', 'Segoe UI'"}}}}},f=(g,p)=>{let{key:m}=g,b=g.call("exec",g.name||g.icon||m,g);return g.call("isString",b)&&b.includes("{{")&&(b=g.call("replaceLiteralsWithObjectFields",b)),g.call("isString",b)?b:m},u=t.src,d,h=()=>{let g=f(t,e),p=g;if(g.includes(" ")){let D=g.split(" ");g=D[0]+D.slice(1).map(W=>W.charAt(0).toUpperCase()+W.slice(1)).join("")}let m=a(g),b=m.split(/([a-z])([A-Z])/g),_=l(t,e,r);if(_){Object.assign(t,_);return}let y;t.isActive&&(y=c(t));let x=o[".isActive"];o&&o.isActive&&x&&x.icon&&(y=t.call("exec",x.icon||x.Icon.name||x.Icon.icon,t)),t.call("isString",y)&&y.includes("{{")&&(y=t.call("replaceLiteralsWithObjectFields",y));let k;n[y]&&(k=y),n[m]?k=m:n[b[0]+b[1]]?k=b[0]+b[1]:n[b[0]]?k=b[0]:i&&t.warn("Can't find icon:",g,k);let E=n[k],O=o&&o.src||u;!E&&!O&&(nO(r,p,m,t,W=>{if(!(d&&d._disposed)){if(!W)return x0(p,t);h()}})||x0(p,t));let $=s&&k,I=E||O||n.noIcon;if(!(t.spriteId===$&&t.src===I&&t.node&&t.node.innerHTML)&&(t.spriteId=$,t.src=I,typeof t.html=="function"&&t.node)){let D=t.context&&t.context.designSystem;D&&it(D);try{let W=t.html(t,t.state,t.context);W!=null&&typeof W!="function"&&(t.node.innerHTML=W)}finally{D&&et()}}};d=Q(h,{depth:t.__ref&&t.__ref.path&&t.__ref.path.length||0}),t.__ref&&(t.__ref.__effects||(t.__ref.__effects=[]),t.__ref.__effects.push(d))},attr:{viewBox:"0 0 24 24","aria-hidden":t=>t.ariaLabel||t.role==="img"?null:"true",focusable:"false"}},k0={display:"flex",align:"center center",lineHeight:1,".reversed":{flow:"row-reverse"},".vertical":{flow:"column"},Icon:{if:t=>{let{parent:e}=t,r=typeof t.icon=="string"&&t.icon;return t.call("exec",r||e.icon||t.name||t.sfSymbols||e.sfSymbols,t)},icon:t=>t.call("exec",t.parent.icon,t.parent)},text:t=>t.text},v0={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var vy={};P(vy,{A:()=>T0,Link:()=>Sy,RouteLink:()=>O0,RouterLink:()=>ky});var Ha={};P(Ha,{default:()=>lO,getActiveRoute:()=>wy,lastLevel:()=>Kf,lastPathname:()=>qf,matchRoute:()=>by,parseQuery:()=>_y,parseRoutePattern:()=>yy,router:()=>Je,runGuards:()=>xy});R();var E0=/^:(.+)/,A0=/^\*$/,C0=new Map,yy=t=>{let e=C0.get(t);if(e)return e;let r=t.replace(/^\//,"").split("/"),o=[],n=!1;for(let i=0;i<r.length;i++){let a=r[i].match(E0);a?o.push({index:i,name:a[1]}):A0.test(r[i])&&(n=!0)}let s={segments:r,params:o,hasWildcard:n,pattern:t};return C0.set(t,s),s},by=(t,e,r=0)=>{let n=t.replace(/^\//,"").split("/").filter(Boolean).slice(r),s="/"+(n[0]||"");if(!e)return{key:null,content:null,params:{},routePath:s};let i=null,a=-1,c={};for(let l in e){if(l==="/*")continue;let f=yy(l),u=sO(n,f);u>a&&(a=u,i=l,c=iO(n,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},sO=(t,e)=>{let{segments:r,hasWildcard:o}=e;if(!o&&r.length!==t.length&&r.length!==1&&r.length>t.length)return-1;let n=0,s=Math.min(r.length,t.length);for(let i=0;i<s;i++)if(r[i]===t[i])n+=3;else if(E0.test(r[i]))n+=1;else if(A0.test(r[i]))n+=.5;else return-1;return n},iO=(t,e)=>{let r={};for(let{index:o,name:n}of e.params)t[o]&&(r[n]=decodeURIComponent(t[o]));return r},_y=t=>{if(!t||t==="?")return{};let e={};return new URLSearchParams(t).forEach((o,n)=>{e[n]!==void 0?(Array.isArray(e[n])||(e[n]=[e[n]]),e[n].push(o)):e[n]=o}),e},xy=async(t,e)=>{if(!t||!t.length)return!0;for(let r of t){let o=await r(e);if(o===!1)return!1;if(typeof o=="string")return o}return!0},wy=(t=0,e)=>{e||(e=typeof v<"u"?v.location.pathname:"/");let o=e.split("/")[t+1];if(o)return`/${o}`},qf,Kf=0,aO=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,cO={level:Kf,pushState:!0,initialRender:!1,scrollToTop:!0,scrollToNode:!1,get scrollNode(){return typeof tt<"u"&&(tt.scrollingElement||tt.documentElement)||null},scrollBody:!1,useFragment:!1,updateState:!0,scrollToOffset:0,contentElementKey:"content",scrollToOptions:{behavior:"smooth"},useParamsMatching:!0},Je=async(t,e,r={},o={})=>{let n=e||void 0,s=n?.context?.window||v,i=n?.context?.document||tt,a={...cO,...n.context.routerOptions,...o};Kf=a.lastLevel;let c=n.__ref;(a.contentElementKey!=="content"&&a.contentElementKey!==c.contentElementKey||!c.contentElementKey)&&(c.contentElementKey=a.contentElementKey||"content");let l=c.contentElementKey||a.contentElementKey||"content",f=s.location.origin!=="null"?s.location.origin:"http://localhost";t=aO(t);let u=typeof s.URL=="function"?s.URL:typeof globalThis<"u"&&globalThis.URL||URL,d=new u(f+t),{pathname:h,search:g,hash:p}=d,m=_y(g),b=n.node,_=p&&p!==s.location.hash.slice(1),y=h!==qf;qf=h;let x=c.__routerRendered,k,E,O,$;if(a.useParamsMatching){let F=by(h,n.routes,a.level);k=F.key,E=F.routePath,O=F.content,$=F.params}else{k=wy(a.level,h),E=k;let F=n.routes;O=F?F[k||"/"]||F["/*"]:null,$={}}let I=a.scrollToNode?b:a.scrollNode;if(n.state?.root?.debugging){n.state.root.debugging=!1;return}if(!O){a.onNotFound?a.onNotFound({pathname:h,route:k,element:n}):a.silent||console.warn("[smbls/router] no content matched for path",h,"\u2014 available routes:",Object.keys(n.routes||{}));return}if(a.guards&&a.guards.length){let F={pathname:h,route:k,params:$,query:m,hash:p,element:n,state:r},Y=await xy(a.guards,F);if(Y===!1)return;if(typeof Y=="string")return Je(Y,e,r,{...o,guards:[]})}if(a.pushState)try{s.history.pushState(r,null,h+(g||"")+(p||""))}catch{}if(y||!_){let F={route:k,routePath:E,hash:p,debugging:!1};Object.keys($).length&&(F.params=$),Object.keys(m).length&&(F.query=m),a.updateState&&n.state.update(F,{preventContentUpdate:!0})}let D=!x||x.content!==O||x.route!==k;if(y||D||a.force===!0){l&&a.removeOldElement&&n[l].remove();let F=n.__ref?.origin?.content,Y={};if(F)for(let z in F){let G=F[z];z==="__ref"||z==="props"||z==="node"||z==="parent"||z==="key"||(typeof G=="string"||typeof G=="number"||typeof G=="boolean"||typeof G=="object"&&G!==null&&!G.node&&!G.__ref)&&(Y[z]=G)}let at={...Y,...typeof O=="object"?O:{extends:O}};a.useFragment&&(at.tag="fragment");try{if(typeof n?.set!="function")return;n.set(at,{contentElementKey:l}),c.__routerRendered={content:O,route:k}}catch(z){console.error("[smbls/router] failed to render route content",h,z)}}let Pt=!y&&_;if(a.scrollToTop&&!Pt&&I?.scrollTo&&I.scrollTo({...a.scrollToOptions||{},top:0,left:0}),a.scrollToNode&&O[l]?.node?.scrollTo&&O[l].node.scrollTo({...a.scrollToOptions||{},top:0,left:0}),p){let F=i.getElementById(p.slice(1));if(F&&I?.scrollTo){let Y=s.getComputedStyle?s.getComputedStyle(F):null,at=Y&&parseFloat(Y.scrollMarginTop)||0,z=F.getBoundingClientRect().top+I.scrollTop-at-(a.scrollToOffset||0);I.scrollTo({...a.scrollToOptions||{},top:z,left:0})}}Cr("routeChanged",n,a)},lO=Je;var fO=(t,e,r)=>{let{context:o}=e,{href:n,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",n,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=o,d=e.__ref.root,h=a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")||a.startsWith("sketch:")||a.startsWith("whatsapp:")||a.startsWith("sms:")||a.startsWith("skype:")||a.startsWith("viber:")||a.startsWith("callto:")||a.startsWith("facetime:")||a.startsWith("facetime-audio:")||a.startsWith("geo:")||a.startsWith("maps:");if(a&&!h){t.preventDefault();try{let g=d;if(u&&u.customRouterElement){let p=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let b of p){if(!m||!m[b]){m=null;break}m=m[b]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||Je)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}},Sy={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:t=>jr(t,t.href)||jr(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:fO},T0={extends:"Link"},ky={onClick:(t,e,r)=>{let{context:o}=e,{href:n,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",n,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=o,d=e.__ref.root,h=a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")||a.startsWith("sketch:")||a.startsWith("whatsapp:")||a.startsWith("sms:")||a.startsWith("skype:")||a.startsWith("viber:")||a.startsWith("callto:")||a.startsWith("facetime:")||a.startsWith("facetime-audio:")||a.startsWith("geo:")||a.startsWith("maps:");if(a&&!h){t.preventDefault();try{let g=d;if(u&&u.customRouterElement){let p=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let b of p){if(!m||!m[b]){m=null;break}m=m[b]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||Je)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}}},O0={extends:[Sy,ky]};var Cy={};P(Cy,{Select:()=>R0});var R0={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 Ey={};P(Ey,{Button:()=>P0,ButtonSet:()=>L0,CircleButton:()=>D0,IconButton:()=>M0,KangorooButton:()=>$0,SquareButton:()=>I0});var P0={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)},I0={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"},D0={extends:"SquareButton",round:"C"},$0={extends:"Button",childExtends:"IconText"},L0={tag:"nav",display:"flex",childExtends:"SquareButton"},M0={extends:["SquareButton","ClickableItem"],round:"Z"};var Ay={};P(Ay,{Dialog:()=>F0,DialogFooter:()=>j0,DialogHeader:()=>N0});var F0={display:"flex",tag:"dialog",flow:"column",border:"0",theme:"dialog",round:"Z2"},N0={extends:"Hgroup",minWidth:"100%",gap:"A",Title:{align:"center space-between",Text:{text:"Title"},SquareButton:{icon:"x",theme:"transparent"}},Paragraph:{color:"caption"}},j0={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 Ty={};P(Ty,{Tooltip:()=>B0,TooltipHidden:()=>U0,TooltipParent:()=>V0});R();var B0={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=>yt(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)}},U0={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)}},V0={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:r}=t,o=e||r;if(!o)return;let n=o&&o[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":n||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var Oy={};P(Oy,{Avatar:()=>z0});var uO=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)},z0={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=uO(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 Ry={};P(Ry,{Range:()=>H0});var H0={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:xn("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:xn("#fff",.35)}},":focus":{"::-webkit-slider-thumb":{borderColor:"#3C6AC0"}}},"@light":{background:"gray9","::-webkit-slider-thumb":{background:"white",borderColor:"gray9"},":hover":{"::-webkit-slider-thumb":{borderColor:"gray7"}},":focus":{"::-webkit-slider-thumb":{borderColor:"blue"}}},deps:{returnPropertyValue:(t,e,r)=>{let o=t.call("exec",t[e],t);return(t.call("isFunction",o)?o(t,t.state):o!==void 0?o:r!==void 0?r:0)+""}},attr:{type:"range",value:(t,e)=>t.call("exec",e.value||t.value||t.defaultValue,t),min:(t,e)=>t.deps.returnPropertyValue(t,"min",0),max:(t,e)=>t.deps.returnPropertyValue(t,"max",100),step:(t,e)=>t.deps.returnPropertyValue(t,"step",1)}};var Py={};P(Py,{Dropdown:()=>W0,DropdownList:()=>q0,DropdownParent:()=>K0,DropdownParentFocus:()=>G0,DropdownSiblingFocus:()=>Y0});var W0={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"},q0={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"}}},K0={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},G0={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()}}},Y0={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 Iy={};P(Iy,{Notification:()=>X0});var X0={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 Po=Object.assign({},Gm,Ym,Xm,Zm,Jm,ry,oy,ny,ty,sy,iy,ey,ay,cy,ly,fy,uy,dy,py,hy,gy,my,vy,Cy,Ey,Ay,Ty,Oy,Ry,Py,Iy);function Gf(t){if(t==null)return 0;if(typeof t!="object")return Z0(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let o=0;o<t.length;o++)e=(e^Gf(t[o]))*16777619;return e>>>0}let r=Object.keys(t).sort();for(let o=0;o<r.length;o++)e=(e^Z0(r[o]))*16777619,e=(e^Gf(t[r[o]]))*16777619;return e>>>0}function Z0(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e}function Yf(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!=typeof e||typeof t!="object")return!1;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!Yf(t[n],e[n]))return!1;return!0}let r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(let n=0;n<r.length;n++){let s=r[n];if(!Object.prototype.hasOwnProperty.call(e,s)||!Yf(t[s],e[s]))return!1}return!0}function Dy(t,e){if(e===void 0)return t;if(t===void 0)return e;if(e===null)return null;if(typeof e!="object"||Array.isArray(e))return e;if(typeof t!="object"||Array.isArray(t))return{...e};let r=!1,o={};for(let n in t)if(n in e){let s=Dy(t[n],e[n]);o[n]=s,s!==t[n]&&(r=!0)}else o[n]=t[n];for(let n in e)n in t||(o[n]=e[n],r=!0);return r?o:t}function $y(t,e,r){if(!e||typeof e!="object")return t;if(!t||typeof t!="object")return e;if(r||(r=new WeakSet),r.has(e))return t;r.add(e);for(let o in e){let n=e[o];n&&typeof n=="object"&&!Array.isArray(n)&&t[o]&&typeof t[o]=="object"&&!Array.isArray(t[o])?$y(t[o],n,r):t[o]=n}return t}function Hr(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 ts(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Wa(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Hr(e)}function J0(t){return t.split(`
84
- `).map(Hr).join(`
85
- `)}var Q0={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 tk(t,e){let r=Q0[t]||Hr(t),o=Wa(e),n=`_${r}-${o}`,s=ts(t),i=gO[s],a=i?`${s}: ${e};${i}: ${e}`:`${s}: ${e}`,c=`.${n}{${a}}`;return`${n}
86
- ${c}`}var gO={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select"},mO="@media (hover: hover)",yO=/(?:^|[^\\]):hover(?![\w-])/,ek=t=>typeof t=="string"&&(t.indexOf("{")!==-1||t.indexOf("}")!==-1);function rk(t){let e=t.split("\0"),r=[],o=[];for(let n=0;n+1<e.length;n+=2){let s=e[n],i=e[n+1];if(!i||ek(i))continue;let a=Q0[s]||Hr(s),c=Wa(i),l=`_${a}-${c}`,f=ts(s);r.push(l),o.push(`.${l}{${f}:${i}}`)}return r.join(" ")+"\0"+o.join(`
87
- `)}function ok(t,e,r){let o=t+e,n=`_c${Hr(o)}`,s=e.split("\0"),i="";for(let l=0;l+1<s.length;l+=2){let f=s[l],u=s[l+1];u&&(ek(u)||(i+=`${ts(f)}:${u};`))}let a,c;if(t.startsWith("@media"))c=`.${n}`,a=`${t}{${c}{${i}}}`;else if(t.startsWith(":")||t.startsWith("&")){let l=t.startsWith("&")?t.slice(1):t;c=`.${n}${l}`,a=`${c}{${i}}`}else t.includes("&")?(c=t.replace("&",`.${n}`),a=`${c}{${i}}`):(c=`.${n} ${t}`,a=`${c}{${i}}`);return r!==!1&&yO.test(c)&&(a=`${mO}{${a}}`),`${n}
88
- ${a}`}var Ly=null;function Zf(t){Ly=t}var De={structuralHash:Gf,deepEqual:Yf,mergeStructural:Dy,overwriteDeep:$y,shortHash:Hr,toKebab:ts,sanitizeValue:Wa,batchShortHash:J0,atomicCssClass:tk,batchAtomicCss:rk,compoundCssClass:ok},nk=!1,Xf=null;function sk(t){return Xf||(Xf=import(t||"@symbo.ls/wasm/pkg").then(e=>(e.structuralHash&&(De.structuralHash=e.structuralHash),e.deepEqual&&(De.deepEqual=e.deepEqual),e.mergeStructural&&(De.mergeStructural=e.mergeStructural),e.overwriteDeep&&(De.overwriteDeep=e.overwriteDeep),e.shortHash&&(De.shortHash=e.shortHash),e.toKebab&&(De.toKebab=e.toKebab),e.sanitizeValue&&(De.sanitizeValue=e.sanitizeValue),e.batchShortHash&&(De.batchShortHash=e.batchShortHash),e.atomicCssClass&&(De.atomicCssClass=e.atomicCssClass),e.batchAtomicCss&&(De.batchAtomicCss=e.batchAtomicCss),e.compoundCssClass&&(De.compoundCssClass=e.compoundCssClass),nk=!0,Ly&&e.batchAtomicCss&&Ly({batchAtomicCss:e.batchAtomicCss,compoundCssClass:e.compoundCssClass}),!0)).catch(e=>(console.debug("[smbls] WASM not available, using JS fallbacks:",e.message),!1)),Xf)}function ik(){return nk}R();var qa={};P(qa,{CDN_PROVIDERS:()=>ge,DOMQL_EVENTS:()=>Zd,DOMQ_PROPERTIES:()=>wr,ENV:()=>pp,HTML_TAGS:()=>on,METHODS:()=>Jo,METHODS_EXL:()=>Us,NODE_ENV:()=>Ce,OPTIONS:()=>di,PACKAGE_MANAGER_TO_CDN:()=>Or,PARSED_DOMQ_PROPERTIES:()=>Bs,PROPS_METHODS:()=>Sr,STATE_METHODS:()=>io,STATE_PROPERTIES:()=>Xd,SVG_TAGS:()=>C_,TYPES:()=>Ds,UNIVERSAL_RESERVED_KEYS:()=>Tl,addCaching:()=>fl,addContext:()=>ll,addExtend:()=>Np,addExtends:()=>Ue,addItemAfterEveryElement:()=>Fd,addProtoToArray:()=>Ms,addRef:()=>il,applyCSS:()=>Fy,applyDependentState:()=>oh,applyEvent:()=>ml,applyEventUpdate:()=>yl,applyExtends:()=>T_,applyProps:()=>si,arrayContainsOtherArray:()=>Rd,arraysEqual:()=>jd,arrayzeValue:()=>go,buildImgSrcset:()=>Wi,buildSourcesAndImg:()=>qi,cache:()=>ch,call:()=>Ch,captureSnapshot:()=>Ah,checkForStateTypes:()=>Qp,checkIfInherits:()=>gl,checkIfStringIsInArray:()=>Vd,clone:()=>Qd,cloneAndMergeArrayExtend:()=>Zs,cloneFunction:()=>Sp,collectExtendsList:()=>nn,concatAddExtends:()=>Lp,copyJavaScriptToClipboard:()=>Kh,copyStringToClipboard:()=>qh,createBasedOnType:()=>sl,createElement:()=>Jp,createElementExtends:()=>Kc,createExtends:()=>Qs,createExtendsFromKeys:()=>sn,createExtendsStack:()=>Zc,createIfConditionFlag:()=>kp,createInheritedState:()=>th,createKey:()=>Ys,createNestedObject:()=>ip,createNestedObjectByKeyPath:()=>rh,createObjectWithoutPrototype:()=>Bc,createParent:()=>al,createPath:()=>cl,createProps:()=>ii,createPropsStack:()=>ol,createRoot:()=>Zp,createScope:()=>sh,createSnapshotId:()=>Gs,customDecodeURIComponent:()=>Yd,customEncodeURIComponent:()=>Gd,cutArrayAfterValue:()=>Ld,cutArrayBeforeValue:()=>$d,debounce:()=>Xs,debounceOnContext:()=>_p,decodeNewlines:()=>Kd,deepClone:()=>lt,deepContains:()=>np,deepDefaults:()=>ji,deepDestringifyFunctions:()=>de,deepExtend:()=>qc,deepMerge:()=>st,deepMergeExtends:()=>Ve,deepStringifyFunctions:()=>zs,defineSetter:()=>kh,destringifyGlobalScope:()=>Ws,detectHeightOnInit:()=>Ih,detectInfiniteLoop:()=>fp,document:()=>tt,encodeNewlines:()=>qd,error:()=>po,excludeKeysFromObject:()=>dp,exec:()=>ft,extendCachedRegistry:()=>Mp,extendStackRegistry:()=>ti,extractArrayExtend:()=>ri,fetchLibraryData:()=>Dl,fibonacciNumberByIndex:()=>Dh,filterArrays:()=>Bd,filterArraysFast:()=>Ud,finalizeExtends:()=>Jc,findClosestNumber:()=>Il,findClosestNumberInFactory:()=>zh,findInheritedState:()=>hl,findKeyPosition:()=>Hd,flattenExtend:()=>an,formatDate:()=>Ph,generateHash:()=>zc,generateHeadArrayTags:()=>Pl,generateKey:()=>Ks,generateMetaTags:()=>Uh,get:()=>xh,getActiveRoute:()=>wy,getCDNDirUrl:()=>Ol,getCDNUrl:()=>Ae,getCapitalCaseKeys:()=>Up,getCdnProviderFromConfig:()=>dn,getChildStateInKey:()=>pl,getChildren:()=>ki,getContext:()=>Ri,getCookie:()=>Tp,getDB:()=>Li,getEmotionStylesheet:()=>Zh,getExtendsInElement:()=>jp,getExtendsStack:()=>Js,getExtendsStackRegistry:()=>Wc,getFrequencyInArray:()=>Pd,getHashedExtend:()=>ei,getImportMapScript:()=>Rh,getInObjectByPath:()=>lp,getLocalStorage:()=>Rp,getNev:()=>yp,getPageMetadata:()=>Vh,getParentStateInKey:()=>dl,getPath:()=>vi,getQuery:()=>Mi,getRef:()=>Sh,getRoot:()=>Ai,getRootContext:()=>Oi,getRootData:()=>Ti,getRootState:()=>Ei,getRootStateInKey:()=>ul,getSpreadChildren:()=>Vp,global:()=>Ad,hasFunction:()=>Be,hasHandlerPlugin:()=>tn,hasOwnProperty:()=>ep,hashContent:()=>mn,inheritChildExtends:()=>Yc,inheritChildPropsExtends:()=>Gc,inheritParentProps:()=>ai,inheritRecursiveChildExtends:()=>Xc,init:()=>hr,initProps:()=>Gp,is:()=>Wt,isArray:()=>T,isBoolean:()=>Lc,isContextComponent:()=>zp,isCyclic:()=>up,isDOMNode:()=>Ht,isDate:()=>Fc,isDefined:()=>yt,isDevelopment:()=>vr,isEmpty:()=>Nc,isEmptyObject:()=>rp,isEqualDeep:()=>jc,isFunction:()=>A,isHtmlElement:()=>Ps,isLocal:()=>mp,isLoudDevRuntime:()=>It,isMalformedDependency:()=>pn,isMethod:()=>Eh,isMobile:()=>Ep,isNode:()=>or,isNot:()=>Od,isNotProduction:()=>lo,isNull:()=>Mc,isNumber:()=>je,isObject:()=>S,isObjectLike:()=>H,isPhoto:()=>$h,isPolyglotWritableKey:()=>sr,isProduction:()=>kr,isStaging:()=>gp,isState:()=>eh,isString:()=>w,isStringFunction:()=>wp,isTest:()=>Vc,isTesting:()=>hp,isUndefined:()=>At,isUniversallyReservedKey:()=>Th,isUnresolvableDependency:()=>ho,isValidDependencyMap:()=>hn,isValidHtmlTag:()=>Ip,isWrappedLibrary:()=>Ui,joinArrays:()=>Yo,jointStacks:()=>Fp,keys:()=>El,lastLevel:()=>Kf,lastPathname:()=>qf,loadCssFile:()=>Nh,loadJavascript:()=>jh,loadJavascriptFile:()=>Lh,loadJavascriptFileEmbedSync:()=>Fh,loadJavascriptFileSync:()=>Mh,loadRemoteCSS:()=>Bh,loadRemoteScript:()=>gn,log:()=>vh,logGroupIf:()=>Cp,logIf:()=>vp,lookdown:()=>bh,lookdownAll:()=>_h,lookup:()=>yh,lowercaseFirstLetter:()=>so,makeObjectWithoutPrototype:()=>op,map:()=>Jd,mapStringsWithContextComponents:()=>oi,markPolyglotSeeded:()=>He,matchRoute:()=>by,matchesComponentNaming:()=>ze,memoize:()=>xp,merge:()=>ht,mergeSharedLibraries:()=>Vi,nextElement:()=>Ii,normalizeIgnoreList:()=>Bi,normalizeLibraryKey:()=>yn,objectToString:()=>Hs,objectizeStringProperty:()=>ni,overwrite:()=>qs,overwriteDeep:()=>qt,overwriteShallow:()=>co,overwriteState:()=>nh,parse:()=>Al,parseDeep:()=>wi,parseQuery:()=>_y,parseRoutePattern:()=>yy,pickupElementFromProps:()=>el,pickupPropsFromElement:()=>tl,polyglotSeededKeys:()=>ui,previousElement:()=>Di,propExists:()=>qp,propertizeElement:()=>rl,propertizeUpdate:()=>Wp,reinit:()=>My,remove:()=>ex,removeChars:()=>Gh,removeCookie:()=>Op,removeDuplicateProps:()=>li,removeDuplicatesInArray:()=>Xo,removeFromArray:()=>Id,removeFromObject:()=>sp,removeNestedKeyByPath:()=>ap,removeValueFromArray:()=>Ls,removeValueFromArrayAll:()=>Md,reorderArrayByValues:()=>Nd,replaceLiteralsWithObjectFields:()=>no,replaceOctalEscapeSequences:()=>Wd,resolveAsset:()=>Kt,resolveHandler:()=>en,resolveSharedLibraries:()=>Wh,returnValueAsText:()=>nl,router:()=>Je,runGuards:()=>xy,runPluginHook:()=>Et,scratchSystem:()=>In,scratchUtils:()=>Ir,self:()=>Td,set:()=>To,setActiveRootState:()=>Ci,setCookie:()=>Ap,setHashedExtend:()=>Hc,setInObjectByPath:()=>cp,setLocalStorage:()=>Pp,setNodeStyles:()=>Cl,setProps:()=>wh,setPropsPrototype:()=>ci,sharedLibrary:()=>Hh,splitPackageSpecifier:()=>Fi,spotByPath:()=>Si,srcsetFor:()=>bn,stringIncludesAny:()=>Ns,stringToObject:()=>tp,stripVersionRangePrefix:()=>Ni,swapItemsInArray:()=>Dd,syncProps:()=>fi,toCamelCase:()=>zi,toDashCase:()=>Hi,toDescriptionCase:()=>Xh,toPriorityOrder:()=>pe,toTitleCase:()=>Yh,toggleFullscreen:()=>Oh,triggerEventOn:()=>Cr,triggerEventOnUpdate:()=>ih,trimStringFromSymbols:()=>zd,unstackArrayOfObjects:()=>$s,update:()=>Kp,updateProps:()=>Yp,variables:()=>$i,verbose:()=>ln,warn:()=>Pi,window:()=>v});R();R();var _O=C(),ak=(t=_O,e)=>{let r=S(e.localFile)?e.localFile:{},o=lt(r.designSystem||{});return st(t,o,ne)},xO={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},es=(t,e)=>{let r=!e||e===":root",o={};for(let n in t)if(n.startsWith("@media")){let s=r?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`;o[n]={[s]:t[n]}}else r?o[n]=t[n]:o[`${e}${n}, ${n} ${e}`]=t[n];return o},hr=(t,e=xO)=>{let r=ak(t||{},e),o=e.scopeSelector||":root",n=e.globalTheme;if(typeof window<"u"&&window.location){let p=new URLSearchParams(window.location.search).get("globalTheme");p&&(n=p)}let s=To({verbose:e.verbose,useReset:e.useReset,useFontImport:e.useFontImport,useVariable:e.useVariable,useSvgSprite:e.useSvgSprite,useDocumentTheme:e.useDocumentTheme,useIconSprite:e.useIconSprite,useDefaultConfig:e.useDefaultConfig,globalTheme:n,themeRoot:e.themeRoot,files:e.files,assets:e.assets,...r},{newConfig:e.newConfig,config:e.config});s&&(s.scopeSelector=o);let i=Ji(s.font,s.files),a=s.useReset,c=s.useVariable,l=s.useFontImport,f=s.useSvgSprite,u=t.svg,d=s.useIconSprite,h=t.icons;l&&St(i),c&&(St({[o]:s.CSS_VARS}),s.CSS_MEDIA_VARS&&St(es(s.CSS_MEDIA_VARS,o))),a&&St(s.reset);let g=s.animation;if(g){let p={};for(let m in g)p[`@keyframes ${m}`]=g[m];St(p)}return(u||f)&&Ca(s.svg,{document:e.document}),(h||d)&&Ao(s.icons,{document:e.document}),s},Jf={},My=(t,e=Jf)=>{let r=ak(t||{},e),o=e.scopeSelector||":root",n=To({verbose:!1,...r});return e.preventInject||(St({[o]:n.CSS_VARS}),n.CSS_MEDIA_VARS&&St(es(n.CSS_MEDIA_VARS,o)),St(n.reset)),n},Fy=(t,e=Jf)=>{St(t)},wO=(t,e=Jf)=>{let r=e.scopeSelector||":root";St({[r]:t.CSS_VARS}),t.CSS_MEDIA_VARS&&St(es(t.CSS_MEDIA_VARS,r))};var SO=(t,e=Jf)=>{};R();var ck=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,kO=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},Ny={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},Ka=(t,e)=>{if(!e)return t;let r=Array.isArray(e)?e:e.split("."),o=t;for(let n of r){if(!o||!o[n])return null;o=o[n]}return o},lk=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=Ny:e.router=ht(e.router||{},Ny);let r=e.router,o=async(s,i)=>{let a=s.context?.window||v,c=kO(r);if(!c){if(!a.location)return;let{pathname:f,search:u,hash:d}=a.location;f=ck(f),c=f+u+d}let l=s;if(r.customRouterElement){let f=Ka(s,r.customRouterElement);f&&(l=f,s.routes&&(l.routes=s.routes))}l.routes&&await Je(c,l,{},{initialRender:!0,pushState:!1})},n=!At(t.onRenderRouter);return r&&r.initRouter&&!n&&(t.onRenderRouter=o),vO(e,r),r},jy=(t,e)=>{if(e.router===!1)return;let r=e.router||Ny;if(!r.popState)return;let o=e.utils&&e.utils.router?e.utils.router:Je,n=e.window||v,s=async i=>{let{pathname:a,search:c,hash:l}=n.location;a=ck(a);let f=a+c+l,u=t;if(r.customRouterElement){let d=Ka(t,r.customRouterElement);d&&(u=d,t.routes&&(u.routes=t.routes))}await u.call("router",f,u,{},{pushState:!1,scrollToTop:!1,level:0,event:i})};n.addEventListener("popstate",s),e.__teardowns=e.__teardowns||[],e.__teardowns.push(()=>n.removeEventListener("popstate",s))},vO=(t,e)=>{let{components:r}=t;if(e&&e.injectRouterInLinkComponent)return st(r.Link||r["smbls.Link"],r.RouterLink||r["smbls.RouterLink"])};R();var By=v&&v.location?v.location.host.includes("dev."):vr(),fk=By?"http://localhost:8080/get":"https://api.symbols.app/get",CO={endpoint:fk},uk=async(t,e=CO)=>{let r=e.endpoint||fk,o=e.serviceRoute?T(e.serviceRoute)?e.serviceRoute.map(s=>s.toLowerCase()+"=true").join("&"):e.serviceRoute:"",n;try{return n=await globalThis.fetch(r+"/?"+o,{method:"GET",headers:{"Content-Type":"application/json","X-AppKey":t,"X-Metadata":e.metadata}}),await n.json()}catch(s){if(A(e.onError))return e.onError(s);console.error(s)}},EO=async(t,e)=>{let{editor:r}=e;if(r&&r.remote){let o=await uk(t,r),n=By||e.isDevelopment?de(o):de(o.releases[0]);r.serviceRoute?T(r.serviceRoute)?r.serviceRoute.forEach(s=>{qt(e[s],n[s.toLowerCase()])}):qt(e[r.serviceRoute],n):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{qt(e[s],n[s.toLowerCase()])})}return e},AO=async(t,e,r)=>{let{editor:o}=e;if(o&&o.remote){let n=await uk(t,o),s=By||e.isDevelopment?de(n):de(n.releases[0]);r(s)}},dk=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await EO(t,e)}catch(r){console.error(r)}},pk=(t,e,r,o)=>{if(e&&r.editor)try{r.editor.async&&AO(e,r,o||(n=>{let s=n.designSystem;S(s)&&r.utils.init(s),S(n.state)&&t.state.set(n.state)}))}catch(n){console.error(n)}};var Ga=t=>{if(!t||t.__destroyed)return!1;let e=t.context;if(!e)return t.__destroyed=!0,!1;if(Array.isArray(e.__teardowns)){for(let r of e.__teardowns)try{r()}catch(o){console.error("[smbls] destroy teardown error:",o)}e.__teardowns.length=0}try{Vr(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 Vy={};P(Vy,{Helmet:()=>mk,applyMetadata:()=>ns,default:()=>DO,extractMetadata:()=>RO,generateHeadHtml:()=>IO,helmetPlugin:()=>Uy,resolveMetadata:()=>Wr});R();var TO={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"}},OO=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}"]`},hk=t=>de({v:t}).v,gk=(t,e,r,o)=>{try{return ft(t,e,r)}catch(n){console.warn(`[helmet] metadata factory for "${o}" threw; treating as unset:`,n&&n.message||n);return}},Wr=(t,e,r)=>{if(!t)return{};let o=t;w(o)&&Be(o)&&(o=hk(o));let n=A(o)?gk(o,e,r,"metadata"):S(o)?{...o}:{};if(!S(n))return{};for(let s in n){let i=n[s];w(i)&&Be(i)&&(i=hk(i)),A(i)?i=gk(i,e,r,s):w(i)&&Be(i)&&(i=void 0),w(i)&&i.includes("{{")&&e?.call&&(i=e.call("replaceLiteralsWithObjectFields",i,r)),n[s]=i}return n},RO=(t,e="/",r,o)=>{let s=(t.pages||{})[e],i={};if(t.integrations?.seo&&(i={...t.integrations.seo}),t.app?.metadata){let c=Wr(t.app.metadata,r,o);i={...i,...c}}let a=new Set;if(s){let c=s.metadata||s.helmet||{},l=Wr(c,r,o);for(let f in l)a.add(f);i={...i,...l},!i.title&&s.state?.title&&(i.title=s.state.title,a.add("title")),!i.description&&s.state?.description&&(i.description=s.state.description,a.add("description"))}if(i.title||(i.title=t.name||"Symbols"),i.title&&(a.has("title")||!i["og:title"])&&(a.has("og:title")||(i["og:title"]=i.title)),i.description&&(a.has("description")||!i["og:description"])&&(a.has("og:description")||(i["og:description"]=i.description)),i.title&&!i["twitter:title"]&&(i["twitter:title"]=i.title),i.description&&!i["twitter:description"]&&(i["twitter:description"]=i.description),i["og:url"]||i.url){let c=(i["og:url"]||i.url||"").replace(/\/$/,"");if(c&&e&&e!=="/"){let l=e.startsWith("/")?e:"/"+e;i["og:url"]=c+l}}if(t.files)for(let c in i){let l=i[c];if(typeof l=="string"&&l.length>0&&!l.startsWith("/")&&!l.startsWith("http")){let f=t.files[l];f?.src&&(i[c]=f.src)}}return i},PO=(t,e)=>{let r=e.createElement(t.tag);return t.attr&&r.setAttribute(t.attr,t.key),(e.head||e.querySelector("head")).appendChild(r),r},os=t=>{let e=5381,r=String(t);for(let o=0;o<r.length;o++)e=(e*33^r.charCodeAt(o))>>>0;return e.toString(36)},rs=(t,e,r,o)=>{let n=t.head||t.querySelector("head");if(!n)return;let s=new Map;for(let a of n.querySelectorAll(`[${e}]`))s.set(a.getAttribute(e),a);let i=new Set;for(let a of r)i.add(a);for(let[a,c]of s)i.has(a)||c.remove();for(let a of r){if(s.has(a))continue;let c=o(a);c&&(c.setAttribute(e,a),n.appendChild(c))}},ns=(t,e)=>{if(!(!S(t)||!e)){for(let r in t){let o=t[r];if(o==null||r==="jsonLd"||r==="styles"||r==="scripts"||r==="alternate"||r==="favicons"||r==="icon"||r==="favicon")continue;let n=TO[r];if(!n)continue;let s=OO(n),i=e.querySelector(s)||PO(n,e);i&&(r==="title"?i.textContent=o:n.valueAttr?i.setAttribute(n.valueAttr,o):i.setAttribute("content",o))}if(Array.isArray(t.jsonLd)){let o=t.jsonLd.filter(s=>s!=null).map(s=>w(s)?s:JSON.stringify(s)),n=o.map(os);rs(e,"data-smbls-jsonld",n,s=>{let i=n.indexOf(s),a=e.createElement("script");return a.setAttribute("type","application/ld+json"),a.textContent=o[i],a})}if(Array.isArray(t.styles)){let r=t.styles.filter(n=>n!=null&&String(n).trim()),o=r.map(os);rs(e,"data-smbls-style",o,n=>{let s=o.indexOf(n),i=e.createElement("style");return i.textContent=String(r[s]),i})}if(Array.isArray(t.scripts)){let r=t.scripts.filter(n=>n&&(w(n)?n.trim():n.src)),o=r.map(n=>w(n)?n:String(n.src));rs(e,"data-smbls-script",o,n=>{let s=o.indexOf(n),i=r[s],a=e.createElement("script");return w(i)?a.setAttribute("src",i):(i.src&&a.setAttribute("src",i.src),i.type&&a.setAttribute("type",i.type),i.async&&(a.async=!0),i.defer&&(a.defer=!0),i.integrity&&a.setAttribute("integrity",i.integrity),i.crossorigin&&a.setAttribute("crossorigin",i.crossorigin),i.referrerpolicy&&a.setAttribute("referrerpolicy",i.referrerpolicy),i.nomodule&&(a.noModule=!0),i.body&&(a.textContent=String(i.body))),a})}if(Array.isArray(t.alternate)){let r=t.alternate.filter(n=>S(n)),o=r.map(n=>`${n.hreflang||""}|${n.href||""}`);rs(e,"data-smbls-alternate",o,n=>{let s=o.indexOf(n),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(n=>n!=null),o=r.map(n=>S(n)?os(JSON.stringify(n)):String(n));rs(e,"data-smbls-favicon",o,n=>{let s=o.indexOf(n),i=r[s],a=e.createElement("link");if(a.setAttribute("rel","icon"),S(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),o=r.endsWith(".svg")?"image/svg+xml":r.endsWith(".png")?"image/png":"";rs(e,"data-smbls-single-icon",[r],n=>{let s=e.createElement("link");return s.setAttribute("rel","icon"),s.setAttribute("href",n),o&&s.setAttribute("type",o),s})}}},ct=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,r=>e[r])},IO=t=>{let e=['<meta charset="UTF-8">'],r=new Set(["charset","jsonLd","styles","scripts"]),o=!1;for(let[n,s]of Object.entries(t)){if(!s&&s!==0&&s!==!1||r.has(n)||typeof s=="function")continue;if(n==="title"){e.push(`<title>${ct(s)}</title>`);continue}if(n==="viewport"){o||(e.push(`<meta name="viewport" content="${ct(s)}">`),o=!0);continue}if(n==="canonical"){e.push(`<link rel="canonical" href="${ct(s)}">`);continue}if(n==="icon"||n==="favicon"){let f=ct(s),u=f.endsWith(".svg")?' type="image/svg+xml"':f.endsWith(".png")?' type="image/png"':"";e.push(`<link rel="icon" href="${f}"${u}>`);continue}if(n==="favicons"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${ct(h)}"`).join(" ");e.push(`<link rel="icon" ${u}>`)}else typeof f=="string"&&e.push(`<link rel="icon" href="${ct(f)}">`)});continue}if(n==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${ct(h)}"`).join(" ");e.push(`<link rel="alternate" ${u}>`)}});continue}let i=["og:","article:","product:","fb:","profile:","book:","business:","music:","video:"],a=["twitter:","DC:","DCTERMS:"],c=i.some(f=>n.startsWith(f)),l=a.some(f=>n.startsWith(f));if(n.startsWith("http-equiv:")){let f=n.replace("http-equiv:","");e.push(`<meta http-equiv="${ct(f)}" content="${ct(s)}">`)}else if(n.startsWith("itemprop:")){let f=n.replace("itemprop:","");e.push(`<meta itemprop="${ct(f)}" content="${ct(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>e.push(`<meta property="${ct(n)}" content="${ct(f)}">`)):e.push(`<meta property="${ct(n)}" content="${ct(s)}">`):l?e.push(`<meta name="${ct(n)}" content="${ct(s)}">`):Array.isArray(s)?s.forEach(f=>e.push(`<meta name="${ct(n)}" content="${ct(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.push(`<meta name="${ct(n)}" content="${ct(s)}">`)}if(o||e.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),Array.isArray(t.jsonLd))for(let n of t.jsonLd){if(n==null)continue;let s=typeof n=="string"?n:JSON.stringify(n),i=String(s).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${os(s)}">${i}<\/script>`)}if(Array.isArray(t.styles))for(let n of t.styles){if(n==null||!String(n).trim())continue;let s=String(n).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${os(s)}">${s}</style>`)}if(Array.isArray(t.scripts))for(let n of t.scripts){if(!n)continue;let s=typeof n=="string",i=s?n:n.src;if(!i&&!(n&&n.body))continue;let a=[];i&&a.push(`src="${ct(i)}"`),s||(n.type&&a.push(`type="${ct(n.type)}"`),n.async&&a.push("async"),n.defer&&a.push("defer"),n.integrity&&a.push(`integrity="${ct(n.integrity)}"`),n.crossorigin&&a.push(`crossorigin="${ct(n.crossorigin)}"`),n.referrerpolicy&&a.push(`referrerpolicy="${ct(n.referrerpolicy)}"`),n.nomodule&&a.push("nomodule"));let c=` data-smbls-script="${ct(i||os(n.body||""))}"`;if(!s&&n.body){let l=String(n.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${a.join(" ")}${c}>${l}<\/script>`)}else e.push(`<script ${a.join(" ")}${c}><\/script>`)}return e.join(`
89
- `)},mk={define:{metadata:(t,e,r)=>{let o=e.context?.document||typeof document<"u"&&document;if(!o)return;let n=Q(()=>{let s=Wr(t,e,e.state);ns(s,o);let i=e.state?.root;S(i)&&(i.$helmet=s)});e.__ref?.__effects&&e.__ref.__effects.push(n)}}},Uy={name:"helmet",create(t){if(!t.metadata)return;let e=t.context?.document||typeof document<"u"&&document;if(!e)return;let r=Q(()=>{let o=t.metadata;if(!o)return;let n=Wr(o,t,t.state);ns(n,e)});t.__ref?.__effects&&t.__ref.__effects.push(r)},update(t){let e=t.metadata;if(!e)return;let r=t.context?.document||typeof document<"u"&&document;if(!r)return;let o=Wr(e,t,t.state);ns(o,r)}},DO=mk;Ar();var yk=(t,e,r,o)=>{t&&xi(t,e,r,o)},bk=(t,e,r)=>{if(!t)return;let o=e.context?.document||typeof document<"u"&&document;if(!o)return;let n=Wr(t,e,r);ns(n,o)},_k=async(t,e)=>{if(!t)return;let r={tag:"fragment",...t},o=async()=>{await e.set(r,{preventDefineUpdate:"$router"})};return e.lazyLoad?window.requestAnimationFrame(o):await o(),r},ss={routes:t=>t,metadata:bk,fetch:yk,$router:_k},xk=(t={})=>{let e={routes:r=>r};return t.metadata!==!1&&(e.metadata=bk),t.fetch!==!1&&(e.fetch=yk),t.router!==!1&&(e.$router=_k),e};var zy={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},Qf={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},tu={...zy,router:Qf},$O={state:{},pages:{},components:{},router:Qf,define:ss},qr=$O;R();R();var wk=(t,e)=>H(t.extends)?t.extends:[];R();var Hy={};P(Hy,{default:()=>FO,getActiveLang:()=>Kr,getLanguages:()=>Xa,getLocalStateLang:()=>ec,initPolyglot:()=>ru,loadTranslations:()=>Ja,polyglotPlugin:()=>as,setLang:()=>Qa,translate:()=>Za,upsertTranslation:()=>tc});R();var kk="smbls_lang",LO="smbls_t_",MO="smbls_tv_",is={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)}}},Ya={};function Kr(){let t=this?.context,e=t?.polyglot;return(this?.state?.root||t?.state?.root)?.lang||t?.state?.lang||e?.defaultLang||"en"}function Xa(){let t=this?.context?.polyglot;return t?t.languages?t.languages:t.translations?Object.keys(t.translations):[]:[]}var eu=(t,e)=>{if(!t||!e)return;if(t[e]!==void 0)return t[e];if(e.indexOf(".")===-1)return;let r=e.split("."),o=t;for(let n=0;n<r.length;n++){if(o==null)return;o=o[r[n]]}return o},Sk=(t,e,r)=>{let o=e.lastIndexOf(".");if(o===-1)return t[e+"_"+r];let n=eu(t,e.substring(0,o));if(n!=null)return n[e.substring(o+1)+"_"+r]};function Za(t,e){if(!t)return"";let r=this?.context,o=r?.polyglot,n=e||this.call("getActiveLang"),s=this?.state;if(s){let l=Sk(s,t,n);if(l!==void 0)return l}if(o?.translations){let l=o.translations[n];if(l){let f=eu(l,t);if(f!==void 0)return f}}let a=(s?.root||r?.state?.root)?.translations;if(a){let l=a[n];if(l){let f=eu(l,t);if(f!==void 0)return f}}let c=o?.defaultLang||"en";if(s){let l=Sk(s,t,c);if(l!==void 0)return l}if(o?.translations){let l=o.translations[c];if(l){let f=eu(l,t);if(f!==void 0)return f}}return t}async function Ja(t){let e=this?.context,r=e?.polyglot,o=this?.state?.root||e?.state?.root;if(!r||!o)return;let n=r.storagePrefix||LO,s=r.storageVersionPrefix||(r.storagePrefix?r.storagePrefix.replace(/_$/,"v_"):MO);if(r.translations&&r.translations[t]&&!r.fetch||!r.fetch||r._fetchFailed?.[t])return;if(!o.translations?.[t]){let c=is.get(n+t);if(c)try{let l=JSON.parse(c),f={translations:{...o.translations||{}}};f.translations[t]=l,o.update&&o.update(f)}catch(l){console.warn("[polyglot] Failed to apply language update:",l.message)}}let i=(r.storagePrefix||"smbls")+":"+t;if(Ya[i])return Ya[i];let a=this;return Ya[i]=(async()=>{try{let c=r.fetch,l=parseInt(is.get(s+t),10)||0,f,u,d;if(A(c)){let g=await c(t,l,a);if(!g||g.changed===!1)return;f=g.translations||g.data||g,u=g.version||0,d=!0}else if(S(c)){let g=a.getDB||(()=>e.fetch),p=A(g)?await g.call(a):e.fetch;if(!p)return;let m=c.rpc||c.from||"get_translations_if_changed",b={p_lang:t,p_cached_version:l,...c.params||{}},_=await p.rpc({from:m,params:b});if(_.error)throw r._fetchFailed||(r._fetchFailed={}),r._fetchFailed[t]=!0,_.error;let y=_.data;if(!y||!y.changed)return;f=y.translations||{},u=y.version||0,d=!0}else return;if(!d||!f)return;is.set(n+t,JSON.stringify(f)),u&&is.set(s+t,String(u));let h={translations:{...o.translations||{}}};h.translations[t]=f,o.update&&o.update(h)}catch(c){if(r.verbose!==!1){let l=c?.message||c?.details||(typeof c=="object"?JSON.stringify(c):String(c));console.warn("[polyglot] Failed to load translations for",t,"-",l)}}finally{delete Ya[i]}})(),Ya[i]}async function Qa(t){let e=this?.context,r=e?.polyglot,o=this?.state?.root||e?.state?.root;if(!o)return;let n=r?.storageLangKey||kk;if(is.set(n,t),this.call("getActiveLang")===t)return;r?.fetch&&await this.call("loadTranslations",t),e?.state&&(e.state.lang=t);let s=r?.translations?.[t],i={lang:t},a=l=>sr(e,l,o);if(s&&typeof s=="object")for(let l in s){if(!a(l))continue;let f=s[l];(Array.isArray(f)||typeof f=="string"||typeof f=="number")&&(i[l]=f)}o.update&&o.update(i);for(let l in i)l!=="lang"&&He(e,l);if(s&&typeof s=="object")for(let l in s){if(!a(l))continue;let f=s[l];if(f&&typeof f=="object"&&!Array.isArray(f)&&o[l]&&typeof o[l]=="object"&&!Array.isArray(o[l])){for(let u in f)o[l][u]=f[u];He(e,l)}}let c=this?.context?.document||globalThis.document;if(c&&s){let l=c.querySelectorAll("[data-key]");for(let f of l){let u=f.ref;if(!u)continue;let d=u.__ref?.__exec?.text;if(typeof d=="string"&&d.includes("{{"))try{let h=u.call("replaceLiteralsWithObjectFields",d,u.state);h!=null&&f.textContent!==h&&(f.textContent=h)}catch{}}}}async function tc(t,e,r){let o=this?.context,n=o?.polyglot,s=this?.state?.root||o?.state?.root;if(s?.translations?.[e]&&(s.translations[e][t]=r),n?.translations?.[e]&&(n.translations[e][t]=r),n?.fetch&&S(n.fetch)){let i=this.getDB||(()=>o.fetch),a=A(i)?await i.call(this):o.fetch;if(!a)return;let c=n.fetch.table||"translations",l=await a.upsert({from:c,data:{key:t,lang:e,text:r}});if(l?.error)throw l.error;return l.data}}async function ru(){let t=this?.context,e=t?.polyglot;if(!e)return;let r=this?.state?.root||t?.state?.root;if(!r)return;let o=e.storageLangKey||kk,s=is.get(o)||Kr.call(this);r.update&&r.lang!==s&&r.update({lang:s}),e.fetch&&!(e.translations&&e.translations[s])&&await this.call("loadTranslations",s)}function ec(t){try{let e=Kr.call(this),r=this?.state;if(!r)return"";let o=t.lastIndexOf(".");if(o===-1)return r[t+e]??"";let n=t.substring(0,o).split("."),s=r;for(let i=0;i<n.length;i++){if(s==null)return"";s=s[n[i]]}return s==null?"":s[t.substring(o+1)+e]??""}catch{return""}}var as={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,ru.call(t))}},FO=as;Ar();var qy={};P(qy,{SYSTEM_METRICS:()=>rc,capsizeHandler:()=>Wy,capsizePlugin:()=>nu,computeCapsize:()=>vk,default:()=>NO,resolveFontSizePx:()=>Ck,resolveMetrics:()=>Ek});var rc={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}},ou=t=>parseFloat(t.toFixed(4)),vk=(t,e,r)=>{let{ascent:o,descent:n,lineGap:s,unitsPerEm:i,capHeight:a}=e,c=Math.abs(n),l=o+c+s,f=r!==void 0?r:l/i*t,u=f/t,d=l/i,h=(o-a+s/2)/i-(u-d)/2,g=(c+s/2)/i-(u-d)/2;return{fontSize:`${ou(t/16)}rem`,lineHeight:`${ou(f)}px`,capHeightTrim:`${ou(-h)}em`,baselineTrim:`${ou(-g)}em`}},Ck=(t,e)=>{if(typeof t=="number")return t;let r=e?.designSystem;if(!r)return null;let{typography:o}=r;if(o?.sequence){let s=String(t).toUpperCase(),i=o.sequence[s];if(i)return i.decimal||i.val}let n=parseFloat(t);return isNaN(n)?null:typeof t=="string"&&t.endsWith("rem")?n*(r.typography?.browserDefault||16):n},Ek=(t,e)=>{let o=e?.designSystem?.font_family||{};if(t){let s=o[t];if(s?.metrics)return s.metrics;let i=String(t).toLowerCase().replace(/['"]/g,"").trim();if(rc[i])return rc[i]}let n=o.default||Object.keys(o)[0];if(n){let s=o[n];if(s?.metrics)return s.metrics;if(s?.value&&Array.isArray(s.value))for(let i of s.value){let a=i.toLowerCase().replace(/['"]/g,"").trim();if(rc[a])return rc[a]}}return null},Wy=(t,e,r,o)=>{if(!t)return;let n=Ck(e.fontSize,o);if(!n)return;let s=Ek(e.fontFamily,o);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=vk(n,s,i),f={};return e.lineHeight||(f.lineHeight=a),f["::before"]={content:'""',marginBottom:c,display:"table"},f["::after"]={content:'""',marginTop:l,display:"table"},f},nu={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},NO=nu;var Qy={};P(Qy,{PRESERVE_VALUE_KEYS:()=>$t,SKIP_INLINE_KEYS:()=>Gr,abbrToProp:()=>Dt,decode:()=>Pk,encode:()=>Tk,expand:()=>Do,isComponentKey:()=>$e,isSelectorKey:()=>Le,parse:()=>$o,parseFurther:()=>Mo,propToAbbr:()=>ke,shorten:()=>oc,shorthandPlugin:()=>nc,stringify:()=>Io,stringifyFurther:()=>Lo});var ke={attr:"at",childExtends:"cex",childExtendsRecursive:"cexr",childProps:"cp",children:"ch",childrenAs:"cha",class:"cl",content:"cnt",context:"ctx",data:"dt",extends:"ext",hide:"hd",html:"htm",if:"if",ignoreChildExtends:"icex",key:"ky",query:"qy",routes:"rt",scope:"scp",show:"shw",state:"st",style:"sy",tag:"tg",text:"tx",align:"aln",boxSize:"bsz",flow:"fl",heightRange:"hr",horizontalInset:"hi",round:"rnd",shadow:"shd",size:"sz",templateColumns:"tcol",verticalInset:"vi",widthRange:"wr",wrap:"wrp",aspectRatio:"ar",blockSize:"bks",boxSizing:"bxs",height:"h",inlineSize:"ins",margin:"m",marginBottom:"mb",marginLeft:"ml",marginRight:"mr",marginTop:"mt",maxBlockSize:"mxbs",maxHeight:"mxh",maxInlineSize:"mxis",maxWidth:"mxw",minBlockSize:"mnbs",minHeight:"mnh",minInlineSize:"mnis",minWidth:"mnw",padding:"p",paddingBottom:"pb",paddingInline:"pil",paddingLeft:"pl",paddingRight:"pr",paddingTop:"pt",width:"w",alignContent:"ac",alignItems:"ai",alignSelf:"as",flex:"fx",flexBasis:"fxb",flexDirection:"fxd",flexFlow:"fxf",flexGrow:"fxg",flexShrink:"fxs",flexWrap:"fxw",gap:"g",justifyContent:"jc",justifyItems:"ji",justifySelf:"js",order:"od",placeContent:"pcn",placeItems:"pit",placeSelf:"psl",rowGap:"rg",columnGap:"cg",gridArea:"ga",gridAutoColumns:"gac",gridAutoFlow:"gaf",gridAutoRows:"gar",gridColumn:"gc",gridColumnEnd:"gce",gridColumnStart:"gcs",gridRow:"gr",gridRowEnd:"gre",gridRowStart:"grs",gridTemplateAreas:"gta",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",bottom:"bot",float:"flt",inset:"ist",left:"lft",position:"pos",right:"rgt",top:"tp",zIndex:"zi",clear:"clr",contain:"ctn",cursor:"cur",display:"d",opacity:"op",overflow:"ov",overflowX:"ovx",overflowY:"ovy",pointerEvents:"pe",resize:"rsz",userSelect:"us",visibility:"vis",background:"bg",backgroundAttachment:"bga",backgroundBlendMode:"bgbm",backgroundClip:"bgcl",backgroundColor:"bgc",backgroundImage:"bgi",backgroundOrigin:"bgo",backgroundPosition:"bgp",backgroundPositionX:"bgpx",backgroundPositionY:"bgpy",backgroundRepeat:"bgr",backgroundRepeatX:"bgrx",backgroundRepeatY:"bgry",backgroundSize:"bgs",color:"c",theme:"thm",themeModifier:"thmm",border:"bd",borderBottom:"bdb",borderBottomLeftRadius:"bdblr",borderBottomRightRadius:"bdbrr",borderCollapse:"bdcl",borderColor:"bdc",borderImage:"bdi",borderImageOutset:"bdio",borderImageRepeat:"bdir",borderImageSlice:"bdis",borderImageSource:"bdisrc",borderImageWidth:"bdiw",borderLeft:"bdl",borderRadius:"bdr",borderRight:"bdrg",borderSpacing:"bdsp",borderStyle:"bdst",borderTop:"bdt",borderTopLeftRadius:"bdtlr",borderTopRightRadius:"bdtrr",borderWidth:"bdw",outline:"ol",outlineColor:"olc",outlineOffset:"olo",outlineStyle:"ols",outlineWidth:"olw",boxShadow:"bxsh",textShadow:"txsh",direction:"dir",fontDisplay:"fdi",fontFamily:"ff",fontFeatureSettings:"ffs",fontKerning:"fk",fontOpticalSizing:"fos",fontPalette:"fpl",fontSize:"fs",fontSizeAdjust:"fsa",fontSmooth:"fsm",fontStretch:"fsr",fontStyle:"fsy",fontSynthesis:"fsyn",fontVariant:"fv",fontVariationSettings:"fvs",fontWeight:"fw",hyphens:"hyp",letterSpacing:"ls",lineHeight:"lh",tabSize:"tsz",textAlign:"ta",textDecoration:"td",textDecorationColor:"tdc",textDecorationLine:"tdl",textDecorationStyle:"tds",textIndent:"ti",textOverflow:"tov",textStroke:"tsk",textTransform:"tt",unicodeBidi:"ub",verticalAlign:"va",whiteSpace:"ws",wordBreak:"wbr",wordSpacing:"wsp",wordWrap:"wwr",writingMode:"wm",captionSide:"cps",counterIncrement:"ci",counterReset:"cr",emptyCells:"ec",listStyle:"lst",listStyleImage:"lsi",listStylePosition:"lsp",listStyleType:"lsty",quotes:"qt",tableLayout:"tl",columnCount:"cc",columnFill:"cf",columnRule:"crl",columnRuleColor:"crlc",columnRuleStyle:"crls",columnRuleWidth:"crlw",columnSpan:"cspn",columnWidth:"cwi",columns:"col",backdropFilter:"bdf",boxDecorationBreak:"bxdb",clipPath:"cpth",filter:"fil",isolation:"iso",mixBlendMode:"mbm",objectFit:"obf",objectPosition:"obp",perspective:"prs",perspectiveOrigin:"prso",willChange:"wc",transform:"tf",transformOrigin:"tfo",transformStyle:"tfs",transition:"trn",transitionDelay:"trnd",transitionDuration:"trndr",transitionProperty:"trnp",transitionTimingFunction:"trntf",animation:"an",animationDelay:"and",animationDirection:"andr",animationDuration:"andur",animationFillMode:"anfm",animationIterationCount:"anic",animationName:"ann",animationPlayState:"anps",animationTimingFunction:"antf",scrollBehavior:"sb",scrollMargin:"smr",scrollMarginBottom:"smrb",scrollMarginLeft:"smrl",scrollMarginRight:"smrr",scrollMarginTop:"smrt",scrollPadding:"spd",scrollPaddingBottom:"spdb",scrollPaddingLeft:"spdl",scrollPaddingRight:"spdr",scrollPaddingTop:"spdt",scrollSnapAlign:"ssa",scrollSnapStop:"sss",scrollSnapType:"sst",breakAfter:"bka",breakBefore:"bkb",breakInside:"bki",pageBreakAfter:"pbka",pageBreakBefore:"pbkb",pageBreakInside:"pbki",accessKey:"ack",className:"cn",contentEditable:"ced",contextMenu:"cmu",draggable:"drg",hidden:"hid",id:"id",is:"is",lang:"lng",nonce:"nnc",spellCheck:"spc",tabIndex:"tbi",title:"ttl",translate:"trl",accept:"acp",acceptCharset:"accs",action:"act",autoComplete:"atc",autoFocus:"atf",capture:"cap",challenge:"chg",checked:"chk",cols:"cls",colSpan:"csn",controls:"ctl",default:"def",defer:"dfr",disabled:"dis",encType:"ect",form:"frm",formAction:"fac",formEncType:"fect",formMethod:"fme",formNoValidate:"fnv",formTarget:"ftg",high:"hgh",inputMode:"imd",kind:"knd",label:"lbl",list:"lis",loop:"lp",low:"lw",max:"mx",maxLength:"mxl",method:"mtd",min:"mn",minLength:"mnl",multiple:"mul",muted:"mut",name:"nm",open:"opn",optimum:"opt",pattern:"ptn",placeholder:"phd",readOnly:"ro",required:"req",reversed:"rev",rows:"rws",rowSpan:"rsn",selected:"sel",span:"spn",start:"srt",step:"stp",type:"typ",value:"val",download:"dl",href:"hrf",hrefLang:"hrl",ping:"png",referrerPolicy:"rfp",rel:"rl",target:"tgt",allow:"alw",allowFullScreen:"afs",allowPaymentRequest:"apr",alt:"alt",cellPadding:"cpg",cellSpacing:"csg",cite:"cit",coords:"crd",crossOrigin:"cor",dateTime:"dtm",fetchPriority:"fpr",headers:"hds",httpEquiv:"hte",integrity:"itg",isMap:"ism",keyType:"kty",loading:"ldg",manifest:"mft",media:"mda",poster:"pst",preload:"prl",radioGroup:"rdg",sandbox:"sbx",scoped:"scod",seamless:"sml",shape:"shp",sizes:"szs",src:"src",srcDoc:"srd",srcLang:"srl",srcSet:"srs",useMap:"ump",ariaActiveDescendant:"aad",ariaAtomic:"aat",ariaBusy:"abu",ariaChecked:"achk",ariaControls:"acl",ariaCurrent:"acr",ariaDescribedBy:"adb",ariaDetails:"adt",ariaDisabled:"adis",ariaDropEffect:"ade",ariaErrorMessage:"aem",ariaExpanded:"aexp",ariaGrabbed:"agr",ariaHasPopup:"ahp",ariaHidden:"ahid",ariaInvalid:"ainv",ariaLabel:"alb",ariaLabelledBy:"alby",ariaLive:"alv",ariaModal:"amod",ariaMultiSelectable:"ams",ariaOrientation:"aor",ariaOwns:"aow",ariaPosInSet:"apis",ariaPressed:"aprs",ariaReadOnly:"aro",ariaRelevant:"arl",ariaRequired:"areq",ariaSelected:"asel",ariaSetSize:"assz",ariaValueMax:"avmx",ariaValueMin:"avmn",ariaValueNow:"avn",role:"role",onInit:"@in",onRender:"@rn",onUpdate:"@up",onStateChange:"@sc",onStateUpdate:"@su",onClick:"@ck",onContextMenu:"@cm",onDblClick:"@dc",onMouseDown:"@md",onMouseEnter:"@me",onMouseLeave:"@ml",onMouseMove:"@mm",onMouseOut:"@mo",onMouseOver:"@mv",onMouseUp:"@mu",onKeyDown:"@kd",onKeyPress:"@kp",onKeyUp:"@ku",onBlur:"@bl",onFocus:"@fc",onFocusIn:"@fi",onFocusOut:"@fo",onBeforeInput:"@bi",onChange:"@cg",onFormData:"@fd",onInput:"@ip",onInvalid:"@iv",onReset:"@rs",onSearch:"@sr",onSelect:"@sl",onSubmit:"@sm",onTouchCancel:"@tc",onTouchEnd:"@te",onTouchMove:"@tm",onTouchStart:"@ts",onPointerCancel:"@pc",onPointerDown:"@pd",onPointerEnter:"@pe",onPointerLeave:"@ple",onPointerMove:"@pm",onPointerOut:"@po",onPointerOver:"@pov",onPointerUp:"@pu",onDrag:"@dg",onDragEnd:"@dge",onDragEnter:"@dgn",onDragLeave:"@dgl",onDragOver:"@dgo",onDragStart:"@dgs",onDrop:"@dp",onResize:"@rz",onScroll:"@scl",onWheel:"@wh",onCopy:"@cy",onCut:"@ct",onPaste:"@pt",onCompositionEnd:"@cpe",onCompositionStart:"@cps",onCompositionUpdate:"@cpu",onAnimationEnd:"@ae",onAnimationIteration:"@ai",onAnimationStart:"@as",onTransitionEnd:"@tre",onTransitionStart:"@trs",onAbort:"@ab",onCanPlay:"@cap",onCanPlayThrough:"@cpt",onDurationChange:"@duc",onEmptied:"@em",onEncrypted:"@enc",onEnded:"@end",onError:"@er",onLoad:"@ld",onLoadedData:"@ldd",onLoadedMetadata:"@ldm",onPause:"@pa",onPlay:"@pl",onPlaying:"@plg",onProgress:"@prg",onRateChange:"@rc",onSeeked:"@sk",onSeeking:"@skg",onStalled:"@stl",onSuspend:"@ssp",onTimeUpdate:"@tu",onVolumeChange:"@vc",onWaiting:"@wt",icon:"ico",iconText:"ict",lookup:"lkp",router:"rtr",shapeModifier:"shpm"},Dt=Object.create(null);for(let t in ke)Dt[ke[t]]=t;var Ky=Object.create(null);for(let t in ke){let e=ke[t];if(Ky[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${Ky[e]}"`);Ky[e]=t}var $t=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),Gr=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function $e(t){return/^[A-Z]/.test(t)}function Le(t){return/^[:@.!$>&]/.test(t)||t.startsWith("> ")}function Tk(t){if(!t||typeof t!="object")return"";let e=[];for(let r in t){let o=t[r];if(typeof o=="function"||o!==null&&typeof o=="object"&&!Array.isArray(o)||o===void 0)continue;let n=ke[r]||r;if(o===!0)e.push(n);else if(o===!1)e.push("!"+n);else if(Array.isArray(o)){let s=o.map(i=>su(i));e.push(n+":"+s.join(","))}else e.push(n+":"+su(o))}return e.join(" ")}function su(t){return String(t).replace(/ /g,"_")}function oc(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?oc(r):r});let e={};for(let r in t){let o=t[r];if($e(r)){e[r]=Gy(o);continue}if(Le(r)){e[r]=Gy(o);continue}let n=ke[r]||r;if($t.has(r)||$t.has(n)){e[n]=o;continue}e[n]=Gy(o)}return e}function Gy(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?oc(e):e}):typeof t=="object"?oc(t):t}function Io(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(o){return o!==null&&typeof o=="object"?Io(o):o});let e={},r=[];for(let o in t){let n=t[o];if($e(o)){e[o]=Ak(n);continue}if(Le(o)){e[o]=Ak(n);continue}let s=ke[o]||o;if($t.has(o)||$t.has(s)){e[s]=n;continue}if(typeof n=="function"){e[s]=n;continue}if(n==null){e[s]=n;continue}if(Gr.has(o)||Gr.has(s)){e[s]=n;continue}if(Array.isArray(n)){if(n.some(function(a){return a!==null&&typeof a=="object"})){e[s]=n.map(function(a){return a!==null&&typeof a=="object"?Io(a):a});continue}if(n.length<=1){e[s]=n;continue}r.push(s+":"+n.map(su).join(","));continue}if(typeof n=="object"){e[s]=Io(n);continue}n===!0?r.push(s):n===!1?r.push("!"+s):typeof n=="number"||typeof n=="string"&&(n.includes(",")||n.includes("_"))?e[s]=n:r.push(s+":"+su(n))}return r.length&&(e.in=r.join(" ")),e}function Ak(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Io(e):e}):typeof t=="object"?Io(t):t}function Pk(t){if(!t||typeof t!="string")return{};let e={},r=Ik(t);for(let o of r){if(o.startsWith("!")){let c=o.slice(1),l=Dt[c]||c;e[l]=!1;continue}let n=o.indexOf(":");if(n===-1){let c=Dt[o]||o;e[c]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(Ok);continue}e[a]=Ok(i)}return e}function Ik(t){return t.trim().split(/\s+/).filter(Boolean)}function Ok(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function Rk(t){return t.replace(/_/g," ")}function jO(t){if(!t||typeof t!="string")return{};let e={},r=Ik(t);for(let o of r){if(o.startsWith("!")){let c=o.slice(1),l=Dt[c]||c;e[l]=!1;continue}let n=o.indexOf(":");if(n===-1){let c=Dt[o]||o;e[c]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(Rk);continue}e[a]=Rk(i)}return e}function Do(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Do(r):r});let e={};for(let r in t){let o=t[r];if($e(r)){e[r]=Yy(o);continue}let n=Dt[r]||r;if(Le(r)&&n===r){e[r]=Yy(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=Yy(o)}return e}function Yy(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Do(e):e}):typeof t=="object"?Do(t):t}function $o(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?$o(r):r});let e={};if(typeof t.in=="string"){let r=jO(t.in);for(let o in r)e[o]=r[o]}for(let r in t){if(r==="in")continue;let o=t[r];if($e(r)){e[r]=Xy(o);continue}let n=Dt[r]||r;if(Le(r)&&n===r){e[r]=Xy(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=Xy(o)}return e}function Xy(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?$o(e):e}):typeof t=="object"?$o(t):t}function Dk(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function BO(t){let e="",r=0;for(;r<t.length;){if(t[r]==="\\"&&r+1<t.length){let o=t[r+1];if(o===","||o==="_"||o==="\\"){e+=o,r+=2;continue}}t[r]==="_"?e+=" ":e+=t[r],r++}return e}function UO(t){let e=[],r="",o=0;for(;o<t.length;){if(t[o]==="\\"&&o+1<t.length){r+=t[o]+t[o+1],o+=2;continue}if(t[o]===","){e.push(r),r="",o++;continue}r+=t[o],o++}return e.push(r),e}function $k(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 Lo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(o){return o!==null&&typeof o=="object"?Lo(o):o});let e={},r=[];for(let o in t){let n=t[o];if($e(o)){let i=Lk(n);e[o]=$k(i)?i.in:i;continue}if(Le(o)){let i=Lk(n);e[o]=$k(i)?i.in:i;continue}let s=ke[o]||o;if($t.has(o)||$t.has(s)){e[s]=n;continue}if(typeof n=="function"){e[s]=n;continue}if(n==null){e[s]=n;continue}if(Gr.has(o)||Gr.has(s)){e[s]=n;continue}if(Array.isArray(n)){if(n.some(function(a){return a!==null&&typeof a=="object"})){e[s]=n.map(function(a){return a!==null&&typeof a=="object"?Lo(a):a});continue}if(n.length<=1){e[s]=n;continue}r.push(s+":"+n.map(Dk).join(","));continue}if(typeof n=="object"){e[s]=Lo(n);continue}if(n===!0){r.push(s);continue}if(n===!1){r.push("!"+s);continue}if(typeof n=="number"){r.push(s+":#"+n);continue}r.push(s+":"+Dk(n))}return r.length&&(e.in=r.join(" ")),e}function Lk(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Lo(e):e}):typeof t=="object"?Lo(t):t}function Mk(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):BO(t)}function Zy(t){if(!t||typeof t!="string")return{};let e={},r=t.trim().split(/\s+/).filter(Boolean);for(let o of r){if(o.startsWith("!")){let l=o.slice(1),f=Dt[l]||l;e[f]=!1;continue}let n=o.indexOf(":");if(n===-1){let l=Dt[o]||o;e[l]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s,c=UO(i);if(c.length>1){e[a]=c.map(Mk);continue}e[a]=Mk(i)}return e}function Mo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Mo(r):r});let e={};if(typeof t.in=="string"){let r=Zy(t.in);for(let o in r)e[o]=r[o]}for(let r in t){if(r==="in")continue;let o=t[r];if($e(r)){typeof o=="string"?e[r]=Zy(o):e[r]=Jy(o);continue}let n=Dt[r]||r;if(Le(r)&&n===r){typeof o=="string"?e[r]=Zy(o):e[r]=Jy(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=Jy(o)}return e}function Jy(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Mo(e):e}):typeof t=="object"?Mo(t):t}var VO={shorten:Do,stringify:$o,stringifyFurther:Mo};function zO(t,e){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(o=>e(o));let r={};for(let o in t){let n=t[o];r[o]=n&&typeof n=="object"?e(n):n}return r}var HO=["components","pages","snippets"],nc={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let o=VO[e===!0?"shorten":e];if(o){for(let n of HO)t[n]&&(t[n]=zO(t[n],o));t.app&&typeof t.app=="object"&&(t.app=o(t.app))}}};var ub={};P(ub,{LEVELS:()=>sc,analyzePlugin:()=>ls,attachBrowserListeners:()=>hu,attachNetworkListeners:()=>ac,classifyEvent:()=>ib,createAnalyzeState:()=>gu,createBeaconSink:()=>lb,createConsoleSink:()=>ab,createDedupe:()=>ob,createEnrich:()=>eb,createMemorySink:()=>cb,createPipeline:()=>lu,createRedact:()=>cu,createRemoteSink:()=>uu,createSample:()=>nb,createSummarize:()=>rb,default:()=>ls,emitFetchEvent:()=>Hk,makeEvent:()=>Z,meetsLevel:()=>iu,normalizeLevel:()=>ic,resolveSinks:()=>pu,summarizeElement:()=>Fo});var WO=0,qO=()=>`${Date.now().toString(36)}-${(WO++).toString(36)}`,Z=(t,e,r={})=>({id:qO(),ts:Date.now(),type:t,level:e,...r}),KO=t=>{let e=[],r=t,o=0;for(;r&&o<32;)r.key!=null&&e.unshift(String(r.key)),r=r.parent,o++;return e.join(" > ")},Fo=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:KO(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var cs=t=>t?.context?.analyze,GO={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"}},YO=(t,{category:e,type:r,level:o})=>n=>{let s=cs(n);!s||!s.shouldCapture(e)||s.emit(Z(r,o,{hook:t,element:Fo(n)}))},Fk=t=>(e,r)=>{let o=cs(e);!o||!o.shouldCapture("state")||o.emit(Z("state","debug",{hook:t,element:Fo(e),changedKeys:r?.changedKeys||null}))},ls={name:"analyze",error(t,e){let r=cs(t);if(!r||r.config.enabled===!1||!r.shouldCapture("errors"))return;let o=e?.error||e?.err||(e instanceof Error?e:null);r.emit(Z("error","error",{hook:e?.hook||"error",element:Fo(t),error:o,message:o?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=cs(t);e&&(!e.shouldCapture("navigation")&&!e.shouldCapture("lifecycle")||e.emit(Z("navigation","info",{hook:"renderRouter",route:t.context?.routerOptions?.currentRoute||null})))},beforeUpdate(t){let e=cs(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=cs(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(Z("update","debug",{hook:"update",element:Fo(t),durationMs:r}))},beforeStateUpdate:Fk("beforeStateUpdate"),stateUpdate:Fk("stateUpdate")};for(let[t,e]of Object.entries(GO))ls[t]=YO(t,e);R();var sc={error:0,warn:1,info:2,debug:3,trace:4};var iu=(t,e)=>{let r=sc[t],o=sc[e];return r==null||o==null?!0:r<=o},ic=t=>sc[t]!=null?t:"warn";R();var au=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var XO=(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},ZO=(t,e)=>{if(e!=="redact"){if(e==="hash"){let r=0,o=String(t);for(let n=0;n<o.length;n++)r=(r<<5)-r+o.charCodeAt(n)|0;return`#${(r>>>0).toString(36)}`}return"***"}},tb=(t,e,r,o)=>{if(o>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>tb(s,e,r,o+1));let n={};for(let s of Object.keys(t))if(XO(s,e)||au.test(s)){let a=ZO(t[s],r);a!==void 0&&(n[s]=a)}else n[s]=tb(t[s],e,r,o+1);return n},cu=(t=[],e="mask")=>{let r=Array.isArray(t)?t:[t];return o=>{if(!o)return o;let{id:n,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:h,...g}=o,p=tb(g,r,e,0);return{id:n,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:h,...p}}};var eb=t=>{let e=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,r=typeof navigator<"u"?navigator.userAgent:null,o=t.config.buildHash||null,n=t.config.appId||null;return s=>{if(!s)return s;let i=t.context?.routerOptions?.currentRoute||null,a=v,c=a&&a.innerWidth?{w:a.innerWidth,h:a.innerHeight}:null;return{...s,session:e,app:{id:n,build:o,route:i},meta:{ua:r,viewport:c}}}},rb=()=>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},ob=(t=1e3,e=500)=>{let r=new Map;return o=>{if(!o)return o;let n=`${o.type}:${o.level}:${o.message||""}:${o.error?.message||""}`,s=r.get(n),i=o.ts||Date.now();if(s&&i-s<t)return null;if(r.set(n,i),r.size>e){let a=Math.ceil(e/10),c=0;for(let l of r.keys()){if(c++>=a)break;r.delete(l)}}return o}},nb=t=>e=>{if(!e)return e;let r=t[e.type];return r==null||r>=1?e:Math.random()>r?null:e},Nk={redact:t=>cu(t.config.redact||[],t.config.maskStrategy),enrich:t=>eb(t),summarize:()=>rb(),dedupe:t=>ob(t.config.cache?.dedupeWindowMs||1e3),sample:t=>nb(t.config.sample||{})},JO=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let r=Nk[t];return r?r(e):null}return null},lu=t=>{let e=t.config,r=Array.isArray(e.transformers)?e.transformers.slice():[],o=r.findIndex(s=>s==="redact");o>=0&&r.splice(o,1);let n=[];e.redact!==!1&&n.push(Nk.redact(t));for(let s of r){let i=JO(s,t);i&&n.push(i)}return s=>{let i=s;for(let a of n){if(i==null)return null;let c=a(i);if(c==null)return null;if(Array.isArray(c)){let l=n.slice(n.indexOf(a)+1),f=[];for(let u of c){let d=u,h=!1;for(let g of l)if(d=g(d),d==null){h=!0;break}!h&&d!=null&&f.push(d)}return f}i=c}return i}};R();R();var fu=typeof v<"u"&&typeof v.document<"u",QO=5e3,tR=50,eR=3,rR=1500,oR=1e3,ib=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",nR=t=>{try{return JSON.stringify(t)}catch{return null}},sR=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},iR=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}},aR=()=>{if(!fu)return null;try{let t=v.document?.documentElement?.getAttribute("data-theme")||null,e=typeof v.matchMedia=="function"?v.matchMedia("(prefers-color-scheme: dark)").matches:null;return{active:t||(e?"dark":e===!1?"light":null),forced:t||null,prefers:e==null?null:e?"dark":"light"}}catch{return null}},cR=()=>{if(!fu)return null;let t=v.location,e=typeof navigator<"u"?navigator:null,r=typeof screen<"u"?screen:null;return{url:t?.href||null,path:t?.pathname||null,referrer:v.document?.referrer||null,title:v.document?.title||null,ua:e?.userAgent||null,browser:iR(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:sR(),viewport:v.innerWidth?{w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}:null,screen:r?{w:r.width||null,h:r.height||null,availW:r.availWidth||null,availH:r.availHeight||null,colorDepth:r.colorDepth||null,orientation:r.orientation?.type||null}:null,theme:aR()}},uu=(t={})=>{let e=t.url,r=typeof t.transport=="function"?t.transport:null,o=typeof t.syncTransport=="function"?t.syncTransport:null;if(!e&&!r)return()=>{};let n=t.apiKey||null,s=t.appKey||t.appId||null,i=t.tenantKey||t.tenant||null,a=t.release||null,c=t.env||null,l=t.sdk||null,f=typeof t.getAuth=="function"?t.getAuth:null,u=typeof t.getContext=="function"?t.getContext:null,d=typeof t.classify=="function"?t.classify:ib,h=typeof t.beforeSend=="function"?t.beforeSend:null,g=t.debug===!0,p=typeof t.getDebug=="function"?t.getDebug:null,m=t.batchMs!=null?t.batchMs:QO,b=t.maxBatch||tR,_=t.maxRetries!=null?t.maxRetries:eR,y=t.backoffMs||rR,x=t.queueLimit||oR,k=t.sampleRate!=null?t.sampleRate:1,E=()=>typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,O=t.sessionId||E(),$=[],I=[],D=null,W=null,Pt=()=>{D||!$.length||(D=setTimeout(z,m))},F=M=>{if(W)return;let ot=y*Math.pow(2,Math.max(0,M-1));W=setTimeout(()=>{if(W=null,!I.length)return;let V=I.shift();at(V.envelope,V.attempt)},ot)},Y=(M,ot=!1)=>{let V=u?sb(u):null,X={id:O,sentAt:Date.now()};ot&&(X.endedAt=Date.now());let B={v:1,session:X,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:cR(),user:V?.user||null,traits:V?.traits||null,tags:V?.tags||null,events:M};if((p?sb(p)===!0:g)&&(B.app.debug=!0),h)try{return h(B)||null}catch{return B}return B},at=async(M,ot=1)=>{if(M)try{let V=!0;if(r){let X=await r(M);V=X!==!1&&X?.ok!==!1}else V=await lR(e,M,{apiKey:n,getAuth:f});!V&&ot<_&&(I.push({envelope:M,attempt:ot+1}),F(ot+1))}catch{ot<_&&(I.push({envelope:M,attempt:ot+1}),F(ot+1))}},z=(M=!1,ot=!1)=>{if(D&&(clearTimeout(D),D=null),!$.length&&!ot)return;let V=$;$=[];let X=Y(V,ot);if(X){if(M&&fu){if(typeof o=="function"&&sb(()=>o(X)))return;if(navigator.sendBeacon&&e){let B=nR(X);if(B)try{navigator.sendBeacon(e,new v.Blob([B],{type:"application/json"}));return}catch{}}}at(X)}},G=!1,Vt=()=>{G||(G=!0,z(!0,!0))};fu&&(v.addEventListener("pagehide",Vt,{passive:!0}),v.addEventListener("beforeunload",Vt,{passive:!0}),v.addEventListener("visibilitychange",()=>{v.document.visibilityState==="hidden"&&z(!0)},{passive:!0}));let q=M=>{if(!M||k<1&&Math.random()>k)return;G&&(G=!1);let ot={...M,log_type:d(M)};$.push(ot),$.length>x&&($=$.slice(-x)),$.length>=b?z():Pt()},xt=M=>(z(!1,!0),O=M||E(),G=!1,q.sessionId=O,O);return q.flush=()=>z(!1),q.endSession=Vt,q.startNewSession=xt,q.sessionId=O,q},sb=t=>{try{return t()}catch{return null}},lR=async(t,e,{apiKey:r,getAuth:o})=>{let n={"Content-Type":"application/json","X-Analyze-Beacon":"1"};if(r&&(n["X-Analyze-Key"]=r),o)try{let s=await o();s&&(n.Authorization=`Bearer ${s}`)}catch{}try{return(await fetch(t,{method:"POST",headers:n,body:JSON.stringify(e),keepalive:!0,credentials:"omit",mode:"cors"})).ok}catch{return!1}};var fR={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},uR="\x1B[0m",du=typeof v<"u"&&typeof v.document<"u",ab=(t={})=>{let e=t.minLevel||null,r=console.error.bind(console),o=console.warn.bind(console),n=console.log.bind(console);return s=>{if(!s)return;let i=s.level==="error"?r:s.level==="warn"?o:n,a=`[analyze:${s.type}]`;if(du)i(a,s);else{let c=fR[s.level]||"";i(`${c}${a}${uR}`,s)}}},cb=(t,e={})=>{let r=e.max||t.config.cache?.max||500,o=new Array(r),n=0,s=0,i=a=>{o[n]=a,n=(n+1)%r,s<r&&s++};return t.__memory={push:i,snapshot:()=>{let a=new Array(s),c=(n-s+r)%r;for(let l=0;l<s;l++)a[l]=o[(c+l)%r];return a},query:(a={})=>{let c=t.__memory.snapshot(),l=a.sinceMs?Date.now()-a.sinceMs:0;return c.filter(f=>!(!f||a.level&&f.level!==a.level||a.type&&f.type!==a.type||l&&f.ts<l))},clear:()=>{n=0,s=0}},i},lb=(t={})=>{let e=t.url,r=t.batchMs!=null?t.batchMs:5e3,o=t.maxBatch||50;if(!e)return()=>{};let n=[],s=null,i=()=>{if(s&&(clearTimeout(s),s=null),!n.length)return;let c=JSON.stringify({events:n});n=[];let l=du?new v.Blob([c],{type:"application/json"}):c;if(du&&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(()=>{})};du&&(v.addEventListener("pagehide",i,{passive:!0}),v.addEventListener("beforeunload",i,{passive:!0}));let a=c=>{c&&(n.push(c),n.length>=o?i():s||(s=setTimeout(i,r)))};return a.flush=i,a},jk={console:ab,memory:cb,beacon:lb,remote:uu},Bk=(t,e)=>e.getDebug!=null||e.debug!=null?e:{...e,getDebug:()=>t.config.debug===!0},pu=t=>{let e=Array.isArray(t.config.sinks)?t.config.sinks:["console"],r=[];for(let o of e)if(typeof o=="function")r.push(o);else if(typeof o=="string"){let n=jk[o];if(!n)continue;r.push(o==="memory"?n(t,{}):n(o==="remote"?Bk(t,{}):{}))}else if(o&&typeof o=="object"&&o.type){let n=jk[o.type];if(!n)continue;r.push(o.type==="memory"?n(t,o):n(o.type==="remote"?Bk(t,o):o))}return r};R();var dR=typeof v<"u"&&typeof v.document<"u",pR=new Set(["password","hidden"]),Uk=(t,e)=>{let r=0,o=null,n=null;return(...s)=>{let i=Date.now();i-r>=e?(r=i,t(...s)):(n=s,o||(o=setTimeout(()=>{r=Date.now(),o=null,n&&(t(...n),n=null)},e-(i-r))))}},fb="__analyzeKeyPath",fs=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[fb])return e[fb];let r=[],o=e,n=0,s=null;for(;o&&n<64;){if(o.getAttribute){let a=o.getAttribute("data-key");a&&(s==null&&(s=a),r.unshift(a))}o=o.parentNode,n++}let i;if(r.length)i={selector:null,key:s,path:r.join(" > "),tag:e.tagName?.toLowerCase()||null};else{let a=(e.tagName||"unknown").toLowerCase(),c=e.id?`#${e.id}`:"",l=e.className&&typeof e.className=="string"?"."+e.className.trim().split(/\s+/).slice(0,2).join("."):"";i={selector:`${a}${c}${l}`,key:null,path:null}}try{e[fb]=i}catch{}return i},hR=(t,e)=>{if(e==="mask")return"***";if(e!=="redact"){if(e==="hash"){let r=0,o=String(t||"");for(let n=0;n<o.length;n++)r=(r<<5)-r+o.charCodeAt(n)|0;return`#${(r>>>0).toString(36)}`}return"***"}},gR=t=>!!(!t||t.tagName==="INPUT"&&pR.has(t.type)||au.test(t.name||"")||au.test(t.id||"")||t.dataset?.analyze==="skip"),hu=t=>{if(!dR)return;let e=t.config.capture,r=t.config.throttle,o=t.__teardown,n=(s,i,a,c)=>{s.addEventListener(i,a,c),o.push(()=>s.removeEventListener(i,a,c))};if(e.errors&&(n(v,"error",s=>{t.emit(Z("error","error",{hook:"window.onerror",message:s.message||null,error:s.error||null,source:s.filename||null,line:s.lineno||null,col:s.colno||null}))}),n(v,"unhandledrejection",s=>{let i=s.reason,a=i instanceof Error?i:null;t.emit(Z("error","error",{hook:"unhandledrejection",message:a?.message||(typeof i=="string"?i:"Unhandled promise rejection"),error:a}))})),e.pointer){n(v,"click",i=>{t.emit(Z("pointer","info",{hook:"click",target:fs(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:Vk(i)}))},{passive:!0,capture:!0}),n(v,"dblclick",i=>{t.emit(Z("pointer","info",{hook:"dblclick",target:fs(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),n(v,"contextmenu",i=>{t.emit(Z("pointer","info",{hook:"contextmenu",target:fs(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=Uk(i=>{t.emit(Z("pointer","trace",{hook:"pointermove",x:i.clientX,y:i.clientY}))},r.pointermove);n(v,"pointermove",s,{passive:!0})}if(e.keyboard&&n(v,"keydown",s=>{t.emit(Z("keyboard","info",{hook:"keydown",code:s.code,key:s.key&&s.key.length===1?"\xB7":s.key,modifiers:Vk(s),target:fs(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=gR(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=hR(a.value,t.config.maskStrategy)),t.emit(Z("forms","info",{hook:i.type,target:fs(i),field:{name:a.name||null,type:a.type||a.tagName.toLowerCase()},value:u}))};n(v,"input",s,{passive:!0,capture:!0}),n(v,"change",s,{passive:!0,capture:!0}),n(v,"submit",i=>{t.emit(Z("forms","info",{hook:"submit",target:fs(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=Uk(()=>{t.emit(Z("scroll","trace",{hook:"scroll",x:v.scrollX,y:v.scrollY}))},r.scroll);n(v,"scroll",s,{passive:!0,capture:!0})}if(e.viewport){let s=Xs(()=>{t.emit(Z("viewport","info",{hook:"resize",w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}))},r.resize);n(v,"resize",s,{passive:!0}),n(v,"orientationchange",()=>{t.emit(Z("viewport","info",{hook:"orientationchange",orientation:typeof screen<"u"&&screen.orientation?screen.orientation.type:null}))},{passive:!0}),n(v.document,"visibilitychange",()=>{t.emit(Z("viewport","info",{hook:"visibilitychange",hidden:v.document.hidden}))},{passive:!0}),t.emit(Z("viewport","info",{hook:"initial",w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}))}if(e.console)for(let s of["log","warn","error","debug"]){let i=console[s];console[s]=function(...a){try{t.emit(Z("console",s==="error"?"error":s==="warn"?"warn":"debug",{hook:`console.${s}`,args:a.map(zk)}))}catch{}return i.apply(console,a)},o.push(()=>{console[s]=i})}if(e.performance&&typeof PerformanceObserver<"u")try{let s=new PerformanceObserver(a=>{for(let c of a.getEntries())t.emit(Z("performance","info",{hook:c.entryType,name:c.name,startTime:c.startTime,duration:c.duration,value:c.value!=null?c.value:null}))}),i=["largest-contentful-paint","layout-shift","longtask","paint","first-input","event"];for(let a of i)try{s.observe({type:a,buffered:!0})}catch{}o.push(()=>s.disconnect())}catch{}},Vk=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),mR=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=zk(t.cause)),e},zk=t=>{if(t==null)return t;if(t instanceof Error)return mR(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};R();var yR=typeof v<"u"&&typeof v.document<"u",Hk=(t,e)=>{let r=t?.analyze;if(!r||!r.shouldCapture("network"))return;let o=e.phase==="error"?"error":"info";r.emit(Z("network",o,{hook:`fetch.${e.phase}`,source:"symbo-fetch",...e}))},ac=t=>{if(yR&&t.config.capture.network&&!t.__networkListeners){if(t.__networkListeners=!0,t.__teardown.push(()=>{t.__networkListeners=!1}),typeof v.fetch=="function"){let e=v.fetch.bind(v),r=function(o,n){if(n?.headers?.["X-Analyze-Beacon"]||!t.shouldCapture("network"))return e(o,n);let s=typeof o=="string"?o:o&&o.url||"",i=(n?.method||typeof o=="object"&&o?.method||"GET").toUpperCase(),a=typeof performance<"u"?performance.now():Date.now();return t.emit(Z("network","info",{hook:"fetch.start",source:"window.fetch",url:s,method:i})),e(o,n).then(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;return t.emit(Z("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(Z("network","error",{hook:"fetch.error",source:"window.fetch",url:s,method:i,error:c,durationMs:l})),c})};v.fetch=r,t.__teardown.push(()=>{v.fetch=e})}if(typeof v.XMLHttpRequest=="function"){let e=v.XMLHttpRequest,r=e.prototype.open,o=e.prototype.send;e.prototype.open=function(n,s){return this.__analyze={method:String(n).toUpperCase(),url:String(s)},r.apply(this,arguments)},e.prototype.send=function(n){let s=this.__analyze;if(!s||!t.shouldCapture("network"))return o.apply(this,arguments);let i=typeof performance<"u"?performance.now():Date.now();t.emit(Z("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(Z("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(Z("network","error",{hook:"xhr.error",source:"xhr",url:s.url,method:s.method,status:this.status,durationMs:l}))};return this.addEventListener("loadend",a),this.addEventListener("error",c),o.apply(this,arguments)},t.__teardown.push(()=>{e.prototype.open=r,e.prototype.send=o})}}};var bR={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},_R={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},xR={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},wR={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},SR=t=>{let e={...bR,...t};return e.replay&&Object.assign(e,_R),e.telemetry&&Object.assign(e,xR),e.remote&&Object.assign(e,wR),Object.assign(e,t),e},kR=64,vR=()=>{if(typeof v>"u"||!v.location)return null;try{let e=new URLSearchParams(v.location.search).get("analyze");return e||null}catch{return null}},gu=(t={})=>{let e=t===!0?{}:{...t};e.capture=SR(e.capture||{});let r=vR();(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=ic(e.level||"warn"),e.cache={max:500,dedupeWindowMs:1e3,...e.cache||{}},e.throttle={pointermove:80,mousemove:80,scroll:100,resize:200,...e.throttle||{}},e.maskFormValues==null&&(e.maskFormValues=!0),e.maskStrategy||(e.maskStrategy="mask"),Array.isArray(e.sinks)||(e.sinks=["console","memory"]),Array.isArray(e.transformers)||(e.transformers=["enrich","summarize"]);let o={config:e,context:null,__ready:!1,__paused:!1,__preBuffer:[],__teardown:[],__pipeline:null,__sinks:null,__memory:null,__initialSnapshot:null},n=()=>{o.__pipeline||(o.__pipeline=lu(o),o.__sinks=pu(o))};return o.shouldCapture=s=>o.config.enabled===!1?!1:!!o.config.capture[s],o.emit=s=>{if(s&&o.config.enabled!==!1&&!o.__paused&&iu(s.level,o.config.level)){if(!o.__ready){if(s.level!=="error"&&!o.config.captureDuringHydration)return;o.__preBuffer.length<kR&&o.__preBuffer.push(s);return}n(),Wk(o,s)}},o.activate=s=>{if(o.context==null&&(o.context=s||null),o.__ready)return;o.__ready=!0;let i=o.__preBuffer;if(o.__preBuffer=[],i.length){n();for(let a of i)Wk(o,a)}try{hu(o)}catch(a){console.error("[analyze] browser attach error:",a)}try{ac(o)}catch(a){console.error("[analyze] network attach error:",a)}for(let a of o.__onActivate||[])try{a(o)}catch(c){console.error("[analyze] onActivate error:",c)}},o.pause=()=>{o.__paused=!0},o.resume=()=>{o.__paused=!1},o.setLevel=s=>{o.config.level=ic(s)},o.setCapture=(s,i)=>{if(o.config.capture[s]=!!i,s==="network"&&i&&o.__ready)try{ac(o)}catch(a){console.error("[analyze] network attach error:",a)}},o.query=s=>o.__memory?o.__memory.query(s):[],o.snapshot=()=>o.__memory?o.__memory.snapshot():[],o.emitNetwork=s=>{if(!o.shouldCapture("network"))return;let i=s?.phase,a=i==="error"?"error":i==="success"&&s.ok===!1?"warn":"info";o.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:"network",level:a,hook:`fetch.${i||"unknown"}`,...s})},o.flush=()=>{if(o.__sinks)for(let s of o.__sinks)typeof s.flush=="function"&&s.flush()},o.startNewSession=s=>{let i=s||(typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),a=Array.isArray(o.config.sinks)?o.config.sinks:[];for(let c of a)c&&typeof c=="object"&&c.type==="remote"&&(c.sessionId=i);if(o.__sinks)for(let c of o.__sinks)typeof c.startNewSession=="function"&&c.startNewSession(i);return i},o.replay=()=>({initialSnapshot:o.__initialSnapshot,events:o.snapshot()}),o.destroy=()=>{for(let s of o.__teardown)try{s()}catch{}o.__teardown=[],o.__ready=!1,o.__paused=!0},o.__onActivate=[],o.onActivate=s=>{o.__onActivate.push(s)},o},Wk=(t,e)=>{let r=t.__pipeline(e);if(r==null)return;let o=Array.isArray(r)?r:[r];for(let n of o){if(typeof t.config.onEvent=="function")try{t.config.onEvent(n)}catch{}for(let s of t.__sinks)try{s(n)}catch(i){console.error("[analyze] sink error:",i)}}};var hb={};P(hb,{Inspect:()=>mu,inspectPlugin:()=>pb});R();function qk(t){return w(t)?t:T(t)?t.find(e=>w(e)):""}function db(t){if(!t)return;let e=t.__ref.__componentKey,r=t.extends&&qk(t.extends),o=t.parent&&t.parent.childExtends&&qk(t.parent.childExtends);return(e||r||o||"").split("_")[0].split(".")[0].split("+")[0]}function yu(t){if(!t||!t.__ref)return;let{components:e,pages:r,editor:o}=t.context,n=db(t);return o&&o.onInitInspect&&!o.onInitInspect(n,t,t.state)?yu(t.parent):n&&(e[n]||r[n])?t:yu(t.parent)}var CR=(t,e,r)=>{let o=r.window||window;o.onkeydown=n=>{n.altKey&&n.shiftKey&&t.state.update({debugging:!0,preventSelect:!0},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0})},o.onkeyup=n=>{t.state.preventSelect&&(!n.altKey||!n.shiftKey)&&(t.state.replace({debugging:!1,preventSelect:!1},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0}),t.Inspector.state.update({area:!1}))}},mu={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:CR,onMousemove:(t,e,r)=>{let o=t.target.ref,n=yu(o),s=e.Inspector.state;if(!n||!r.debugging||!n.__ref)return s.update({area:!1});let i=db(n),a=l=>{s.update({area:l,focusKey:i})},c=()=>{if(t.altKey&&t.shiftKey){let{x:l,y:f,width:u,height:d}=n.node.getBoundingClientRect(),h={x:l,y:f,width:u,height:d};if(!s.area)return a(h);s.area.x!==h.x&&a(h)}else s.area&&s.update({area:!1})};window.requestAnimationFrame(()=>{c(),window.requestAnimationFrame(c)})},onMousedown:(t,e,r)=>{if(!r.debugging)return;let o=t.target.ref,n=yu(o);if(!n)return;let s=db(n);if(!s)return;let i=o.context.editor;if(i&&i.onInspect)return i.onInspect(s,o,o.state,{allowRouterWhileInspect:!0});let a=JSON.stringify({componentKey:`${s}`});return o.context.socket?.emit&&o.context.socket.emit("route",a),t.preventDefault(),t.stopPropagation(),!1},Inspector:{state:{},transition:"all, defaultBezier, X",position:"fixed",hide:(t,e)=>!(e.area&&e.parent.debugging),style:{boxShadow:"0 0 10px #3686F733, 0 0 0 3px #3686F766, 0 0 100vmax 100vmax #000A",zIndex:"9999999",borderRadius:"10px",pointerEvents:"none"},Span:{position:"absolute",margin:"A2 0",fontSize:"Z",color:"text",zIndex:"99999999",transition:"all, defaultBezier, X",textDecoration:"underline",fontWeight:"500",top:"100%",style:{boxShadow:"0 25px 10px 35px black",textShadow:"0 0 10px black"},text:"{{ focusKey }}"},onInit:({context:t})=>{let{components:e}=t;if(S(e)){let{Content:r,...o}=e;for(let n in o)Qn[n]||(o[n].__ref||(o[n].__ref={}),o[n].__ref.__componentKey||(o[n].__ref.__componentKey=n))}},onBeforeUpdate:(t,e,r)=>{let{area:o}=r,n=r.area&&r.parent.debugging,s;if(!n)s="display: none !important";else if(o){let{x:i,y:a,width:c,height:l}=o;s=`
83
+ )`};var hO={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"}}}},gO={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},mO={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"}}},_S={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...hO,...gO,...mO,none:{color:"none",background:"none"},transparent:{color:"currentColor",background:"transparent"}};var xS={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var wS={ratio:1.618,subSequence:!0};var SS={SourceSans:[{url:""}]},kS={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 vS={symbols:'<svg height="24" width="24"><path d="M13.843 2.7C19.063 2.7 23 6.366 23 11.228c0 3.754-2.862 6.584-6.658 6.584-3.287 0-5.007-2.318-5.007-4.609 0-2.395 1.923-4.344 4.287-4.344.566 0 1.023.12 1.309.223a.212.212 0 01.137.229l-.016.058-.514 1.18a.223.223 0 01-.245.13 2.965 2.965 0 00-.506-.046c-1.245 0-2.258 1.027-2.258 2.288 0 1.33 1.165 2.373 2.651 2.373 2.195 0 3.913-1.777 3.913-4.046 0-3.024-2.294-5.135-5.58-5.135-4.076 0-7.393 3.36-7.393 7.491a7.519 7.519 0 002.871 5.924l-4.96 3.18A12.042 12.042 0 012 14.7c0-6.617 5.313-12 11.843-12z" fill-rule="evenodd"/></svg>',logo:'<svg height="24" width="24"><path d="M13.843 2.7C19.063 2.7 23 6.366 23 11.228c0 3.754-2.862 6.584-6.658 6.584-3.287 0-5.007-2.318-5.007-4.609 0-2.395 1.923-4.344 4.287-4.344.566 0 1.023.12 1.309.223a.212.212 0 01.137.229l-.016.058-.514 1.18a.223.223 0 01-.245.13 2.965 2.965 0 00-.506-.046c-1.245 0-2.258 1.027-2.258 2.288 0 1.33 1.165 2.373 2.651 2.373 2.195 0 3.913-1.777 3.913-4.046 0-3.024-2.294-5.135-5.58-5.135-4.076 0-7.393 3.36-7.393 7.491a7.519 7.519 0 002.871 5.924l-4.96 3.18A12.042 12.042 0 012 14.7c0-6.617 5.313-12 11.843-12z" fill-rule="evenodd"/></svg>',arrowDownCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-circle"><circle cx="12" cy="12" r="10"/><path d="M8 12l4 4 4-4M12 8v8"/></svg>',arrowDownLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-left"><path d="M17 7L7 17M17 17H7V7"/></svg>',arrowDownRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-right"><path d="M7 7l10 10M17 7v10H7"/></svg>',arrowDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down"><path d="M12 5v14M19 12l-7 7-7-7"/></svg>',arrowLeftCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left-circle"><circle cx="12" cy="12" r="10"/><path d="M12 8l-4 4 4 4M16 12H8"/></svg>',arrowLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>',arrowRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><path d="M5 12h14M12 5l7 7-7 7"/></svg>',arrowRightCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right-circle"><circle cx="12" cy="12" r="10"/><path d="M12 16l4-4-4-4M8 12h8"/></svg>',arrowUpCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-circle"><circle cx="12" cy="12" r="10"/><path d="M16 12l-4-4-4 4M12 16V8"/></svg>',arrowUpLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-left"><path d="M17 17L7 7M7 17V7h10"/></svg>',arrowUpRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-right"><path d="M7 17L17 7M7 7h10v10"/></svg>',arrowUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up"><path d="M12 19V5M5 12l7-7 7 7"/></svg>',checkCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check-circle"><path d="M22 11.08V12a10 10 0 11-5.93-9.14"/><path d="M22 4L12 14.01l-3-3"/></svg>',check:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><path d="M20 6L9 17l-5-5"/></svg>',chevronDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><path d="M6 9l6 6 6-6"/></svg>',chevronLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-left"><path d="M15 18l-6-6 6-6"/></svg>',chevronRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><path d="M9 18l6-6-6-6"/></svg>',chevronUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-up"><path d="M18 15l-6-6-6 6"/></svg>',copy:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-copy"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>',eyeOff:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye-off"><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24M1 1l22 22"/></svg>',eye:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>',info:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-info"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4M12 8h.01"/></svg>',lock:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-lock"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0110 0v4"/></svg>',minus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-minus"><path d="M5 12h14"/></svg>',sun:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>',moon:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg>',moreHorizontal:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-horizontal"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>',moreVertical:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-vertical"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>',send:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-send"><path d="M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"/></svg>',smile:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-smile"><circle cx="12" cy="12" r="10"/><path d="M8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01"/></svg>',search:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"/><path d="M21 21l-4.35-4.35"/></svg>',upload:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-upload"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M17 8l-5-5-5 5M12 3v12"/></svg>',video:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-video"><path d="M23 7l-7 5 7 5V7z"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></svg>',x:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><path d="M18 6L6 18M6 6l12 12"/></svg>',star:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>',plus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><path d="M12 5v14M5 12h14"/></svg>'};var CS={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 ES={base:150,ratio:1.333,unit:"ms",subSequence:!0};var AS={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var Wa={version:"0.0.1",color:yS,gradient:bS,theme:_S,typography:xS,spacing:wS,font:SS,fontFamily:kS,timing:ES,icons:vS,media:CS,sizes:AS,reset:{html:{},body:{}},animation:{fadeIn:{from:{opacity:0},to:{opacity:1}}},devices:{},class:{},svg:{},grid:{},shape:{}};var is={};I(is,{A:()=>H0,AssetPicture:()=>WS,Audio:()=>GS,Avatar:()=>sk,B:()=>p0,Block:()=>TS,Box:()=>Xf,Br:()=>y0,Button:()=>K0,ButtonSet:()=>Z0,COMPONENTS:()=>In,Caption:()=>o0,Checkbox:()=>A0,CheckboxHgroup:()=>T0,Circle:()=>VS,CircleButton:()=>Y0,Clickable:()=>jS,Data:()=>g0,Dialog:()=>Q0,DialogFooter:()=>tk,DialogHeader:()=>ek,Dropdown:()=>ak,DropdownList:()=>ck,DropdownParent:()=>lk,DropdownParentFocus:()=>fk,DropdownSiblingFocus:()=>uk,FileIcon:()=>B0,Flex:()=>RS,Focusable:()=>BS,FocusableComponent:()=>US,Footnote:()=>d0,Form:()=>MS,Grid:()=>DS,Gutter:()=>$S,H1:()=>ZS,H2:()=>JS,H3:()=>QS,H4:()=>e0,H5:()=>t0,H6:()=>r0,Headline:()=>f0,Hgroup:()=>S0,HgroupButton:()=>v0,HgroupRows:()=>k0,Hoverable:()=>NS,Hr:()=>m0,I:()=>h0,Icon:()=>N0,IconButton:()=>J0,IconText:()=>j0,Iframe:()=>FS,Img:()=>LS,Inline:()=>OS,InlineFlex:()=>PS,InlineGrid:()=>IS,Input:()=>C0,Italic:()=>c0,KangorooButton:()=>X0,Li:()=>b0,Link:()=>Oy,Notification:()=>dk,NumberInput:()=>E0,Ol:()=>x0,P:()=>n0,Picture:()=>HS,Radio:()=>O0,RadioHgroup:()=>R0,Range:()=>ik,RouteLink:()=>W0,RouterLink:()=>Ry,SHAPES:()=>Gf,Select:()=>q0,Shape:()=>iy,Span:()=>XS,SquareButton:()=>G0,Strong:()=>s0,Subhead:()=>u0,Svg:()=>qS,Text:()=>YS,Textarea:()=>I0,TextareaWithButton:()=>$0,Theme:()=>zS,Title:()=>l0,Toggle:()=>P0,ToggleHgroup:()=>D0,Tooltip:()=>rk,TooltipHidden:()=>nk,TooltipParent:()=>ok,U:()=>i0,Ul:()=>_0,Underline:()=>a0,Video:()=>KS,depth:()=>Yf,focusableRingEnabled:()=>qf,getSystemGlobalTheme:()=>qa});var ty={};I(ty,{Block:()=>TS,Flex:()=>RS,Grid:()=>DS,Gutter:()=>$S,Inline:()=>OS,InlineFlex:()=>PS,InlineGrid:()=>IS});var TS={display:"block"},OS={display:"inline"},RS={display:"flex"},PS={display:"inline-flex"},DS={display:"grid"},IS={display:"inline-grid"},$S={boxSize:"C1"};var ry={};I(ry,{Img:()=>LS});P();var LS={tag:"img",attr:{title:e=>e.title||e.alt,alt:e=>e.alt!=null?e.alt:e.title||"",src:e=>{let t=Ge(e);return t&&t.src||e.src},srcset:e=>{let t=Ge(e);return(t?Yi(t):"")||e.srcset}}};var ny={};I(ny,{Form:()=>MS});var MS={tag:"form"};var oy={};I(oy,{Iframe:()=>FS});var FS={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var sy={};I(sy,{Clickable:()=>jS,Focusable:()=>BS,FocusableComponent:()=>US,Hoverable:()=>NS,focusableRingEnabled:()=>qf});var yO={appearance:"none",fontFamily:"inherit"},NS={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}}},jS={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}};function qf(e){let t=e.context&&e.context.designSystem;return!t||t.focusableRing!==!1}var BS={border:"none",outline:e=>qf(e)?"solid 0 currentColor":"none",":focus-visible":{opacity:1,outline:e=>qf(e)?"solid X currentColor":"none"},attr:{tabIndex:e=>e.tabIndex}},US={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:yO};var ly={};I(ly,{Picture:()=>HS});var cy={};I(cy,{Theme:()=>zS,getSystemGlobalTheme:()=>qa});var ay={};I(ay,{Circle:()=>VS,SHAPES:()=>Gf,Shape:()=>iy,default:()=>bO,depth:()=>Yf});P();var St=E(),Yf={4:{boxShadow:`rgba(0,0,0,.10) 0 2${St.unit.default} 4${St.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${St.unit.default} 6${St.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${St.unit.default} 10${St.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${St.unit.default} 16${St.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${St.unit.default} 26${St.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${St.unit.default} 42${St.unit.default}`}},ss=e=>se(e.shapeDirectionColor)||se(e.borderColor)||se(e.backgroundColor)||se(e.background),Kf=e=>{let t=Fa.transition(e.transition,e);return t&&t.transition},Gf={rectangle:{},circle:{borderRadius:"100%"},bubble:{},tv:{borderRadius:"1.15em/2.5em"},tooltip:e=>({position:e.position||"relative","&:before":{content:'""',display:"block",width:"0px",height:"0px",border:".35em solid",borderColor:ss(e),transition:Kf(e),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:e=>({position:"relative","&:before":{content:'""',display:"block",background:ss(e),transition:Kf(e),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:e=>({position:"relative","&:before, &:after":{content:'""',display:"block",position:"absolute",zIndex:"-1",borderRadius:".25em",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",height:"73%",background:ss(e),transition:Kf(e),transitionProperty:"background"},"&:before":{left:"0",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"},"&:after":{left:"100%",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}}),chevron:e=>({position:"relative","&:before, &:after":{content:'""',display:"block",position:"absolute",zIndex:"-1",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",transition:Kf(e),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${ss(e)} 25%, transparent 25%), linear-gradient(315deg, ${ss(e)} 25%, transparent 25%)`},"&:after":{background:ss(e),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)"}}}},iy={deps:{exec:fe,getSpacingBasedOnRatio:Ot,getMediaColor:Pe},classlist:{shape:e=>e.deps.exec(Gf[e.shape],e),shapeDirection:e=>{if(!e.shape||!e.shapeDirection)return;let t=Gf[e.shape+"Direction"];return e.shape&&t?t[e.shapeDirection||"left"]:null},shapeDirectionColor:e=>{let t={borderColor:e.deps.getMediaColor(e.background||e.backgroundColor)};return e.shapeDirection?t:null}}},VS={round:"100%"},bO=iy;P();var qa=({context:e,state:t})=>{let r=t&&t.root,n=r&&r.globalTheme||e.designSystem&&e.designSystem.globalTheme;return n==="auto"?null:n},zS={deps:{depth:Yf},classlist:{depth:e=>!Ae(e.depth)&&e.deps.depth[e.depth]}};var HS={deps:{getSystemGlobalTheme:qa},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:qa},tag:"source",attr:{media:e=>{let{key:t,context:r,deps:n}=e,{media:o}=r.designSystem,s=n.getSystemGlobalTheme(e),i=(e.media||t).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:(e,t)=>e.parent?.src||t.src}};var fy={};I(fy,{AssetPicture:()=>WS});P();var WS={tag:"picture",children:e=>{let t=Ge(e);if(t)return Xi(t,e.alt)}};var uy={};I(uy,{Svg:()=>qS});var qS={tag:"svg",attr:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},html:e=>{let{context:t}=e;if(e.semanticIcons)return;if(e.html&&typeof e.html!="function")return e.call("exec",e.html,e);let{designSystem:r,utils:n}=t,o=r&&r.svg,s=e.spriteId||r&&r.useSvgSprite,i=e.call("exec",e.src,e),a=d=>`<use xlink:href="#${d}" />`;if(typeof i=="string"){let d=i.match(/^\s*<symbol\b[^>]*\bid="([^"]+)"/);if(d){let p=d[1],g=t.document||(typeof document<"u"?document:null);if(!(g&&typeof g.getElementById=="function"&&g.getElementById(p))){let m=n&&n.scratchSystem&&n.scratchSystem.appendSVGSprite;r&&!r.__svgCache&&(r.__svgCache={}),typeof m=="function"?m({[p]:i},{document:g}):n&&typeof n.init=="function"&&n.init({svg:{[p]:i}},{document:g,emotion:t.emotion})}return a(p)}}if(!s&&i)return i;let c=e.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:t.document,emotion:t.emotion}),a(f)}};var dy={};I(dy,{Video:()=>KS});P();var KS={tag:"video",controls:!0,attr:{src:e=>{let t=Ge(e);return t&&t.src||e.src}},children:e=>{let t=Ge(e);if(!(!t||!Array.isArray(t.variants)||!t.variants.length))return t.variants.map(r=>({tag:"source",attr:{src:r.src,type:r.format}}))},childExtends:{tag:"source"}};var py={};I(py,{Audio:()=>GS});P();var GS={tag:"audio",controls:!0,attr:{src:e=>{let t=Ge(e);return t&&t.src||e.src}},children:e=>{let t=Ge(e);if(!(!t||!Array.isArray(t.variants)||!t.variants.length))return t.variants.map(r=>({tag:"source",attr:{src:r.src,type:r.format}}))},childExtends:{tag:"source"}};var hy={};I(hy,{B:()=>p0,Caption:()=>o0,Data:()=>g0,Footnote:()=>d0,H1:()=>ZS,H2:()=>JS,H3:()=>QS,H4:()=>e0,H5:()=>t0,H6:()=>r0,Headline:()=>f0,I:()=>h0,Italic:()=>c0,P:()=>n0,Span:()=>XS,Strong:()=>s0,Subhead:()=>u0,Text:()=>YS,Title:()=>l0,U:()=>i0,Underline:()=>a0});var YS={},XS={tag:"span"},ZS={tag:"h1"},JS={tag:"h2"},QS={tag:"h3"},e0={tag:"h4"},t0={tag:"h5"},r0={tag:"h6"},n0={tag:"p"},o0={tag:"caption"},s0={tag:"strong",fontWeight:"700"},i0={tag:"u"},a0={tag:"u"},c0={tag:"i"},l0={},f0={tag:"h6",fontSize:"B",fontWeight:500},u0={tag:"span",fontSize:"Z1"},d0={tag:"span",fontSize:"Z"},p0={tag:"b"},h0={tag:"i"},g0={tag:"data"};var gy={};I(gy,{Box:()=>Xf,Br:()=>y0,Hr:()=>m0,Li:()=>b0,Ol:()=>x0,Ul:()=>_0});var _O=e=>{if(!e.context)return;let{props:t,__ref:r}=e,n=ft(t,e,{unpack:!1});r.__class=n},Xf={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:_O},m0={tag:"hr",margin:"C1 0"},y0={tag:"br"},b0={tag:"li"},_0={tag:"ul",childExtends:{extends:"Li"}},x0={tag:"ol",childExtends:{extends:"Li"}};var my={};I(my,{Hgroup:()=>S0,HgroupButton:()=>v0,HgroupRows:()=>k0});var w0=e=>{if(e.text!=null||e.html!=null)return!0;for(let t in e){let r=t.charCodeAt(0);if(r>=65&&r<=90)return!0}return!1},S0={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:w0,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:w0,margin:"0",color:"paragraph"}},k0={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},v0={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var yy={};I(yy,{Input:()=>C0});var C0={extends:["Focusable"],tag:"input",border:"none",type:"input",theme:"field",fontSize:"A",round:"C",lineHeight:"1",padding:"Z2 B",attr:{pattern:e=>e.pattern,minLength:e=>e.minlength,maxLength:e=>e.maxlength,name:e=>e.name,autocomplete:e=>e.autocomplete,placeholder:e=>e.placeholder,value:e=>{if(!e.value)return;let t=e.call("exec",e.value,e);return e.call("isString",t)&&t.includes("{{")?e.call("replaceLiteralsWithObjectFields",t):t},checked:e=>e.call("exec",e.checked,e),disabled:e=>e.disabled||null,readonly:e=>e.readonly,required:e=>e.required,type:e=>e.type}};var by={};I(by,{NumberInput:()=>E0});var E0={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:e=>e.step,min:e=>e.min,max:e=>e.max}};var _y={};I(_y,{Checkbox:()=>A0,CheckboxHgroup:()=>T0});var A0={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:e=>e.call("exec",e.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"}}},T0={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var xy={};I(xy,{Radio:()=>O0,RadioHgroup:()=>R0});var O0={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}},R0={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var wy={};I(wy,{Toggle:()=>P0,ToggleHgroup:()=>D0});var P0={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}},D0={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var Sy={};I(Sy,{Textarea:()=>I0,TextareaWithButton:()=>$0});var I0={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"}},$0={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 ky={};I(ky,{FileIcon:()=>B0,Icon:()=>N0,IconText:()=>j0});var L0=new Set,M0=(e,t)=>{if(!L0.has(e)&&(L0.add(e),typeof console<"u"&&console.warn)){let r=t&&t.__ref&&t.__ref.path,n=r&&r.length?` at <${r.join(".")}>`:"";console.warn(`[Icon] Unknown icon name "${e}"${n} \u2014 not registered in designSystem.icons, rendering the noIcon placeholder. Fix the name or register the icon in the design system.`)}},F0=new WeakMap,xO=e=>{let t=F0.get(e);return t||(t={pending:new Map,waiting:new Map,failed:new Set},F0.set(e,t)),t},wO=(e,t)=>{if(!e)return null;let r=e.default||e;return typeof r=="string"?r.trim()?{[t]:r}:null:typeof r=="object"&&!Array.isArray(r)&&Object.keys(r).length?r:null},SO=(e,t,r)=>{let n=r&&r.context&&r.context.document||(typeof document<"u"?document:null);oe(e);try{let o=E();o&&!o.__svgCache&&(o.__svgCache={}),e.__svgCache||(e.__svgCache={});let s={};for(let i in t){let a=On(t[i],i);a&&(e.icons[i]=a,s[i]=a)}return e.useIconSprite&&n&&Object.keys(s).length&&Rn(s,{document:n}),Object.keys(s).length>0}finally{te()}},kO=(e,t,r,n,o)=>{let s=e&&e.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=xO(s);if(a.failed.has(t))return!1;let c=a.waiting.get(t);if(c||(c=new Set,a.waiting.set(t,c)),c.add(o),a.pending.has(t))return!0;let l=Promise.resolve().then(()=>i(t,e)).then(f=>{let u=wO(f,r);return u?SO(s,u,n):!1}).catch(f=>(typeof console<"u"&&console.error&&console.error(`[Icon] iconsLoader failed for "${t}":`,f),!1)).then(f=>{a.pending.delete(t);let u=a.waiting.get(t);a.waiting.delete(t),f||a.failed.add(t),u&&u.forEach(d=>{try{d(f)}catch(p){console.error("[Icon] repaint error:",p)}})});return a.pending.set(t,l),!0},N0={extends:"Svg",width:"A",height:"A",display:"inline-block",style:{fill:"currentColor","*":{fill:"currentColor"}},onInit:(e,t,r)=>{let{parent:n}=e,{icons:o,useIconSprite:s,verbose:i}=r&&r.designSystem,{toCamelCase:a}=r&&r.utils,c=g=>{let h=g[".isActive"];if(h)return g.call("exec",h.name||h.icon)},l=(g,h,m)=>{let{semanticIcons:_}=m&&m.designSystem,{toCamelCase:b}=m&&m.utils,y=f(g,h),S=b(y).split(/([a-z])([A-Z])/g),v=S[1]?S[0]:y.split(".")[0].split(" ")[0],D=_&&_[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=(g,h)=>{let{key:m}=g,_=g.call("exec",g.name||g.icon||m,g);return g.call("isString",_)&&_.includes("{{")&&(_=g.call("replaceLiteralsWithObjectFields",_)),g.call("isString",_)?_:m},u=e.src,d,p=()=>{let g=f(e,t),h=g;if(g.includes(" ")){let R=g.split(" ");g=R[0]+R.slice(1).map(V=>V.charAt(0).toUpperCase()+V.slice(1)).join("")}let m=a(g),_=m.split(/([a-z])([A-Z])/g),b=l(e,t,r);if(b){Object.assign(e,b);return}let y;e.isActive&&(y=c(e));let x=n[".isActive"];n&&n.isActive&&x&&x.icon&&(y=e.call("exec",x.icon||x.Icon.name||x.Icon.icon,e)),e.call("isString",y)&&y.includes("{{")&&(y=e.call("replaceLiteralsWithObjectFields",y));let S;o[y]&&(S=y),o[m]?S=m:o[_[0]+_[1]]?S=_[0]+_[1]:o[_[0]]?S=_[0]:i&&e.warn("Can't find icon:",g,S);let v=o[S],D=n&&n.src||u;!v&&!D&&(kO(r,h,m,e,V=>{if(!(d&&d._disposed)){if(!V)return M0(h,e);p()}})||M0(h,e));let L=s&&S,T=v||D||o.noIcon;if(!(e.spriteId===L&&e.src===T&&e.node&&e.node.innerHTML)&&(e.spriteId=L,e.src=T,typeof e.html=="function"&&e.node)){let R=e.context&&e.context.designSystem;R&&oe(R);try{let V=e.html(e,e.state,e.context);V!=null&&typeof V!="function"&&(e.node.innerHTML=V)}finally{R&&te()}}};d=Z(p,{depth:e.__ref&&e.__ref.path&&e.__ref.path.length||0}),e.__ref&&(e.__ref.__effects||(e.__ref.__effects=[]),e.__ref.__effects.push(d))},attr:{viewBox:"0 0 24 24","aria-hidden":e=>e.ariaLabel||e.role==="img"?null:"true",focusable:"false"}},j0={display:"flex",align:"center center",lineHeight:1,".reversed":{flow:"row-reverse"},".vertical":{flow:"column"},Icon:{if:e=>{let{parent:t}=e,r=e.call("exec",e.icon,e);return e.call("exec",r||t.icon||e.name||e.sfSymbols||t.sfSymbols,e)},icon:e=>e.call("exec",e.parent.icon,e.parent)},text:e=>e.text},B0={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var Py={};I(Py,{A:()=>H0,Link:()=>Oy,RouteLink:()=>W0,RouterLink:()=>Ry});var Ka={};I(Ka,{default:()=>TO,getActiveRoute:()=>Ty,lastLevel:()=>Jf,lastPathname:()=>Zf,matchRoute:()=>Cy,parseQuery:()=>Ey,parseRoutePattern:()=>vy,router:()=>er,runGuards:()=>Ay});P();var V0=/^:(.+)/,z0=/^\*$/,U0=new Map,vy=e=>{let t=U0.get(e);if(t)return t;let r=e.replace(/^\//,"").split("/"),n=[],o=!1;for(let i=0;i<r.length;i++){let a=r[i].match(V0);a?n.push({index:i,name:a[1]}):z0.test(r[i])&&(o=!0)}let s={segments:r,params:n,hasWildcard:o,pattern:e};return U0.set(e,s),s},Cy=(e,t,r=0)=>{let o=e.replace(/^\//,"").split("/").filter(Boolean).slice(r),s="/"+(o[0]||"");if(!t)return{key:null,content:null,params:{},routePath:s};let i=null,a=-1,c={};for(let l in t){if(l==="/*")continue;let f=vy(l),u=vO(o,f);u>a&&(a=u,i=l,c=CO(o,f))}return!i&&t["/*"]&&(i="/*"),{key:i,content:i?t[i]:null,params:c,routePath:s}},vO=(e,t)=>{let{segments:r,hasWildcard:n}=t;if(!n&&r.length!==e.length&&r.length!==1&&r.length>e.length)return-1;let o=0,s=Math.min(r.length,e.length);for(let i=0;i<s;i++)if(r[i]===e[i])o+=3;else if(V0.test(r[i]))o+=1;else if(z0.test(r[i]))o+=.5;else return-1;return o},CO=(e,t)=>{let r={};for(let{index:n,name:o}of t.params)e[n]&&(r[o]=decodeURIComponent(e[n]));return r},Ey=e=>{if(!e||e==="?")return{};let t={};return new URLSearchParams(e).forEach((n,o)=>{t[o]!==void 0?(Array.isArray(t[o])||(t[o]=[t[o]]),t[o].push(n)):t[o]=n}),t},Ay=async(e,t)=>{if(!e||!e.length)return!0;for(let r of e){let n=await r(t);if(n===!1)return!1;if(typeof n=="string")return n}return!0},Ty=(e=0,t)=>{t||(t=typeof C<"u"?C.location.pathname:"/");let n=t.split("/")[e+1];if(n)return`/${n}`},Zf,Jf=0,EO=e=>!e||e==="srcdoc"||e==="about:srcdoc"?"/":e,AO={level:Jf,pushState:!0,initialRender:!1,scrollToTop:!0,scrollToNode:!1,get scrollNode(){return typeof ee<"u"&&(ee.scrollingElement||ee.documentElement)||null},scrollBody:!1,useFragment:!1,updateState:!0,scrollToOffset:0,contentElementKey:"content",scrollToOptions:{behavior:"smooth"},useParamsMatching:!0},er=async(e,t,r={},n={})=>{let o=t||void 0,s=o?.context?.window||C,i=o?.context?.document||ee,a={...AO,...o.context.routerOptions,...n};Jf=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";e=EO(e);let u=typeof s.URL=="function"?s.URL:typeof globalThis<"u"&&globalThis.URL||URL,d=new u(f+e),{pathname:p,search:g,hash:h}=d,m=Ey(g),_=o.node,b=h&&h!==s.location.hash.slice(1),y=p!==Zf;Zf=p;let x=c.__routerRendered,S,v,D,L;if(a.useParamsMatching){let q=Cy(p,o.routes,a.level);S=q.key,v=q.routePath,D=q.content,L=q.params}else{S=Ty(a.level,p),v=S;let q=o.routes;D=q?q[S||"/"]||q["/*"]:null,L={}}let T=a.scrollToNode?_:a.scrollNode;if(o.state?.root?.debugging){o.state.root.debugging=!1;return}if(!D){a.onNotFound?a.onNotFound({pathname:p,route:S,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 q={pathname:p,route:S,params:L,query:m,hash:h,element:o,state:r},W=await Ay(a.guards,q);if(W===!1)return;if(typeof W=="string")return er(W,t,r,{...n,guards:[]})}if(a.pushState)try{s.history.pushState(r,null,p+(g||"")+(h||""))}catch{}if(y||!b){let q={route:S,routePath:v,hash:h,params:L,query:m,debugging:!1};a.updateState&&o.state.update(q,{preventContentUpdate:!0})}let R=!x||x.content!==D||x.route!==S;if(y||R||a.force===!0){l&&a.removeOldElement&&o[l].remove();let q=o.__ref?.origin?.content,W={};if(q)for(let B in q){let X=q[B];B==="__ref"||B==="props"||B==="node"||B==="parent"||B==="key"||(typeof X=="string"||typeof X=="number"||typeof X=="boolean"||typeof X=="object"&&X!==null&&!X.node&&!X.__ref)&&(W[B]=X)}let re={...W,...typeof D=="object"?D:{extends:D}};a.useFragment&&(re.tag="fragment");try{if(typeof o?.set!="function")return;o.set(re,{contentElementKey:l}),c.__routerRendered={content:D,route:S}}catch(B){console.error("[smbls/router] failed to render route content",p,B)}}let Ne=!y&&b;if(a.scrollToTop&&!Ne&&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}),h){let q=i.getElementById(h.slice(1));if(q&&T?.scrollTo){let W=s.getComputedStyle?s.getComputedStyle(q):null,re=W&&parseFloat(W.scrollMarginTop)||0,B=q.getBoundingClientRect().top+T.scrollTop-re-(a.scrollToOffset||0);T.scrollTo({...a.scrollToOptions||{},top:B,left:0})}}Ar("routeChanged",o,a)},TO=er;var OO=(e,t,r)=>{let{context:n}=t,{href:o,scrollToTop:s,stopPropagation:i}=t,a=t.call("exec",o,t);if(t.call("isString",a)&&a.includes("{{")&&(a=t.call("replaceLiteralsWithObjectFields",a)),i&&e.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=n,d=t.__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){e.preventDefault();try{let g=d;if(u&&u.customRouterElement){let h=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let _ of h){if(!m||!m[_]){m=null;break}m=m[_]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||er)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:t.call("isDefined",s)?s:!0,...u,...t.routerOptions})}catch(g){console.warn(g)}}},Oy={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:e=>Vr(e,e.href)||Vr(e,e.call("exec",e,e).href),"aria-label":e=>e.aria?e.aria.label:e.text},onClick:OO},H0={extends:"Link"},Ry={onClick:(e,t,r)=>{let{context:n}=t,{href:o,scrollToTop:s,stopPropagation:i}=t,a=t.call("exec",o,t);if(t.call("isString",a)&&a.includes("{{")&&(a=t.call("replaceLiteralsWithObjectFields",a)),i&&e.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=n,d=t.__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){e.preventDefault();try{let g=d;if(u&&u.customRouterElement){let h=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let _ of h){if(!m||!m[_]){m=null;break}m=m[_]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||er)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:t.call("isDefined",s)?s:!0,...u,...t.routerOptions})}catch(g){console.warn(g)}}}},W0={extends:[Oy,Ry]};var Dy={};I(Dy,{Select:()=>q0});var q0={extends:"Focusable",tag:"select",fontSize:"A",border:"none",boxSizing:"border-box",theme:"field",cursor:"pointer",childProps:{tag:"option",attr:{value:e=>e.value,selected:e=>e.selected,disabled:e=>e.disabled}},attr:{name:e=>e.name,disabled:e=>e.disabled,value:e=>{if(!e.value)return;let t=e.call("exec",e.value,e);return e.call("isString",t)&&t.includes("{{")?e.call("replaceLiteralsWithObjectFields",t):t}}};var Iy={};I(Iy,{Button:()=>K0,ButtonSet:()=>Z0,CircleButton:()=>Y0,IconButton:()=>J0,KangorooButton:()=>X0,SquareButton:()=>G0});var K0={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:e=>e.call("exec",e.disabled)},G0={extends:"Button",fontSize:"A",width:"A",minHeight:"auto",padding:"Z",aspectRatio:"1 / 1",boxSize:"fit-content fit-content",justifyContent:"center",round:"Z2",boxSizing:"content-box"},Y0={extends:"SquareButton",round:"C"},X0={extends:"Button",childExtends:"IconText"},Z0={tag:"nav",display:"flex",childExtends:"SquareButton"},J0={extends:["SquareButton","ClickableItem"],round:"Z"};var $y={};I($y,{Dialog:()=>Q0,DialogFooter:()=>tk,DialogHeader:()=>ek});var Q0={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"}},tk={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 Ly={};I(Ly,{Tooltip:()=>rk,TooltipHidden:()=>nk,TooltipParent:()=>ok});P();var rk={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:e=>ke(e.parent.title)||e.parent.title,width:"fit-content",fontWeight:500,color:"gray12",text:e=>e.parent.title},P:{if:(e,t)=>e.call("isDefined",e.call("exec",e.parent.description,e))||e.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"gray6",fontWeight:"400",text:(e,t)=>e.call("exec",e.parent.description,e)}},nk={extends:"Tooltip",position:"absolute",pointerEvents:"none",opacity:"0",visibility:"hidden",transition:"C defaultBezier opacity, C defaultBezier visibility, B defaultBezier transform",onInit:e=>{let t=!e.shapeDirection||e.shapeDirection==="top"?{top:"112%",left:"50%",transform:"translate3d(-50%,10%,0)",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:e.shapeDirection==="right"?{transform:"translate3d(10%,-50%,0)",left:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:e.shapeDirection==="bottom"?{transform:"translate3d(-50%,-10%,0)",bottom:"112%",left:"50%",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:e.shapeDirection==="left"?{transform:"translate3d(10%,-50%,0)",right:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:{};Object.assign(e,t)}},ok={position:"relative",zIndex:999,onInit:e=>{let{Tooltip:t,TooltipHidden:r}=e,n=t||r;if(!n)return;let o=n&&n[".isActive"];Object.assign(e,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":o||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var My={};I(My,{Avatar:()=>sk});var RO=e=>{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(e||"").trim().charAt(0).toUpperCase()||"?"}</text></svg>`;return"data:image/svg+xml;utf8,"+encodeURIComponent(r)},sk={extends:"Img",display:"block",avatarType:"adventurer-neutral",borderRadius:"100%",boxSize:"C+X C+X",src:e=>`https://api.dicebear.com/7.x/${e.avatarType||"initials"}/svg?seed=${e.key||"no-avatar"}`,onError:(e,t)=>{if(!t.node||t.node.__avatarFallbackApplied)return;t.node.__avatarFallbackApplied=!0;let r=t.node.getAttribute("alt")||(t.key!=="no-avatar"?t.key:"");t.node.src=RO(r)},attr:{alt:e=>e.alt!=null?e.alt:e.text?e.call("exec",e.text,e):e.key&&e.key!=="no-avatar"?e.key:""}};var Fy={};I(Fy,{Range:()=>ik});var ik={tag:"input",appearance:"none",width:"100%",height:"2px",outline:"none",flex:1,onInput:(e,t,r)=>{t.call("isFunction",t.onInput)?t.onInput(e,t,r):r.update({value:parseFloat(t.node.value)})},onChange:(e,t,r)=>{t.call("isFunction",t.onChange)?t.onChange(e,t,r):r.update({value:parseFloat(t.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:ko("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:ko("#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:(e,t,r)=>{let n=e.call("exec",e[t],e);return(e.call("isFunction",n)?n(e,e.state):n!==void 0?n:r!==void 0?r:0)+""}},attr:{type:"range",value:(e,t)=>e.call("exec",t.value||e.value||e.defaultValue,e),min:(e,t)=>e.deps.returnPropertyValue(e,"min",0),max:(e,t)=>e.deps.returnPropertyValue(e,"max",100),step:(e,t)=>e.deps.returnPropertyValue(e,"step",1)}};var Ny={};I(Ny,{Dropdown:()=>ak,DropdownList:()=>ck,DropdownParent:()=>lk,DropdownParentFocus:()=>fk,DropdownSiblingFocus:()=>uk});var ak={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"},ck={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:e=>e.options||[],childrenAs:"props",".hidden":{transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},childExtends:{extends:"Button",state:{},isActive:({key:e,state:t})=>t.active===e,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:e,state:t})=>t.active===e,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"}}},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:(e,t)=>{t.node===document.activeElement&&t.node.blur()}},Dropdown:{onClick:()=>{document.activeElement?.blur()}}},uk={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:(e,t)=>{t.node===document.activeElement&&t.node.blur()}}};var jy={};I(jy,{Notification:()=>dk});var dk={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 In=Object.assign({},ty,ry,ny,oy,sy,ly,fy,uy,ay,dy,py,cy,hy,gy,my,yy,by,_y,xy,wy,Sy,ky,Py,Dy,Iy,$y,Ly,My,Fy,Ny,jy);function Qf(e){if(e==null)return 0;if(typeof e!="object")return pk(String(e));let t=2166136261;if(Array.isArray(e)){t=(t^91)*16777619;for(let n=0;n<e.length;n++)t=(t^Qf(e[n]))*16777619;return t>>>0}let r=Object.keys(e).sort();for(let n=0;n<r.length;n++)t=(t^pk(r[n]))*16777619,t=(t^Qf(e[r[n]]))*16777619;return t>>>0}function pk(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=t*16777619>>>0;return t}function eu(e,t){if(e===t)return!0;if(e===null||t===null||typeof e!=typeof t||typeof e!="object")return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(!eu(e[o],t[o]))return!1;return!0}let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let o=0;o<r.length;o++){let s=r[o];if(!Object.prototype.hasOwnProperty.call(t,s)||!eu(e[s],t[s]))return!1}return!0}function By(e,t){if(t===void 0)return e;if(e===void 0)return t;if(t===null)return null;if(typeof t!="object"||Array.isArray(t))return t;if(typeof e!="object"||Array.isArray(e))return{...t};let r=!1,n={};for(let o in e)if(o in t){let s=By(e[o],t[o]);n[o]=s,s!==e[o]&&(r=!0)}else n[o]=e[o];for(let o in t)o in e||(n[o]=t[o],r=!0);return r?n:e}function Uy(e,t,r){if(!t||typeof t!="object")return e;if(!e||typeof e!="object")return t;if(r||(r=new WeakSet),r.has(t))return e;r.add(t);for(let n in t){let o=t[n];o&&typeof o=="object"&&!Array.isArray(o)&&e[n]&&typeof e[n]=="object"&&!Array.isArray(e[n])?Uy(e[n],o,r):e[n]=o}return e}function Kr(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=t*16777619>>>0;return t.toString(36)}function as(e){return e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}function Ga(e){let t=String(e);return t.length<=20?t.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Kr(t)}function hk(e){return e.split(`
84
+ `).map(Kr).join(`
85
+ `)}var gk={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 mk(e,t){let r=gk[e]||Kr(e),n=Ga(t),o=`_${r}-${n}`,s=as(e),i=$O[s],a=i?`${s}: ${t};${i}: ${t}`:`${s}: ${t}`,c=`.${o}{${a}}`;return`${o}
86
+ ${c}`}var $O={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select"},LO="@media (hover: hover)",MO=/(?:^|[^\\]):hover(?![\w-])/,yk=e=>typeof e=="string"&&(e.indexOf("{")!==-1||e.indexOf("}")!==-1);function bk(e){let t=e.split("\0"),r=[],n=[];for(let o=0;o+1<t.length;o+=2){let s=t[o],i=t[o+1];if(!i||yk(i))continue;let a=gk[s]||Kr(s),c=Ga(i),l=`_${a}-${c}`,f=as(s);r.push(l),n.push(`.${l}{${f}:${i}}`)}return r.join(" ")+"\0"+n.join(`
87
+ `)}function _k(e,t,r){let n=e+t,o=`_c${Kr(n)}`,s=t.split("\0"),i="";for(let l=0;l+1<s.length;l+=2){let f=s[l],u=s[l+1];u&&(yk(u)||(i+=`${as(f)}:${u};`))}let a,c;if(e.startsWith("@media"))c=`.${o}`,a=`${e}{${c}{${i}}}`;else if(e.startsWith(":")||e.startsWith("&")||e.startsWith("[")&&!e.includes("&")){let l=e.startsWith("&")?e.slice(1):e;c=`.${o}${l}`,a=`${c}{${i}}`}else e.includes("&")?(c=e.replace("&",`.${o}`),a=`${c}{${i}}`):(c=`.${o} ${e}`,a=`${c}{${i}}`);return r!==!1&&MO.test(c)&&(a=`${LO}{${a}}`),`${o}
88
+ ${a}`}var Vy=null;function ru(e){Vy=e}var It={structuralHash:Qf,deepEqual:eu,mergeStructural:By,overwriteDeep:Uy,shortHash:Kr,toKebab:as,sanitizeValue:Ga,batchShortHash:hk,atomicCssClass:mk,batchAtomicCss:bk,compoundCssClass:_k},xk=!1,tu=null;function wk(e){return tu||(tu=import(e||"@symbo.ls/wasm/pkg").then(t=>(t.structuralHash&&(It.structuralHash=t.structuralHash),t.deepEqual&&(It.deepEqual=t.deepEqual),t.mergeStructural&&(It.mergeStructural=t.mergeStructural),t.overwriteDeep&&(It.overwriteDeep=t.overwriteDeep),t.shortHash&&(It.shortHash=t.shortHash),t.toKebab&&(It.toKebab=t.toKebab),t.sanitizeValue&&(It.sanitizeValue=t.sanitizeValue),t.batchShortHash&&(It.batchShortHash=t.batchShortHash),t.atomicCssClass&&(It.atomicCssClass=t.atomicCssClass),t.batchAtomicCss&&(It.batchAtomicCss=t.batchAtomicCss),t.compoundCssClass&&(It.compoundCssClass=t.compoundCssClass),xk=!0,Vy&&t.batchAtomicCss&&Vy({batchAtomicCss:t.batchAtomicCss,compoundCssClass:t.compoundCssClass}),!0)).catch(t=>(console.debug("[smbls] WASM not available, using JS fallbacks:",t.message),!1)),tu)}function Sk(){return xk}P();var Ya={};I(Ya,{CDN_PROVIDERS:()=>mt,DOMQL_EVENTS:()=>np,DOMQ_PROPERTIES:()=>kr,ENV:()=>_p,HTML_TAGS:()=>so,METHODS:()=>eo,METHODS_EXL:()=>Gs,NODE_ENV:()=>Ct,OPTIONS:()=>_i,PACKAGE_MANAGER_TO_CDN:()=>Pr,PARSED_DOMQ_PROPERTIES:()=>Ks,PROPS_METHODS:()=>vr,STATE_METHODS:()=>fn,STATE_PROPERTIES:()=>rp,SVG_TAGS:()=>I_,TYPES:()=>Bs,UNIVERSAL_RESERVED_KEYS:()=>Pl,addCaching:()=>pl,addContext:()=>dl,addExtend:()=>Hp,addExtends:()=>Vt,addItemAfterEveryElement:()=>zd,addProtoToArray:()=>zs,addRef:()=>ll,applyCSS:()=>Hy,applyDependentState:()=>lh,applyEvent:()=>_l,applyEventUpdate:()=>xl,applyExtends:()=>M_,applyProps:()=>di,arrayContainsOtherArray:()=>Md,arraysEqual:()=>Wd,arrayzeValue:()=>bn,buildImgSrcset:()=>Yi,buildSourcesAndImg:()=>Xi,cache:()=>hh,call:()=>Dh,captureSnapshot:()=>$h,checkForStateTypes:()=>sh,checkIfInherits:()=>bl,checkIfStringIsInArray:()=>Gd,clone:()=>sp,cloneAndMergeArrayExtend:()=>oi,cloneFunction:()=>Tp,collectExtendsList:()=>io,concatAddExtends:()=>Up,copyJavaScriptToClipboard:()=>eg,copyStringToClipboard:()=>Qh,createBasedOnType:()=>cl,createElement:()=>oh,createElementExtends:()=>Xc,createExtends:()=>ii,createExtendsFromKeys:()=>ao,createExtendsStack:()=>el,createIfConditionFlag:()=>Op,createInheritedState:()=>ih,createKey:()=>ri,createNestedObject:()=>dp,createNestedObjectByKeyPath:()=>ch,createObjectWithoutPrototype:()=>zc,createParent:()=>fl,createPath:()=>ul,createProps:()=>pi,createPropsStack:()=>il,createRoot:()=>nh,createScope:()=>uh,createSnapshotId:()=>ti,customDecodeURIComponent:()=>tp,customEncodeURIComponent:()=>ep,cutArrayAfterValue:()=>Ud,cutArrayBeforeValue:()=>Bd,debounce:()=>ni,debounceOnContext:()=>Cp,decodeNewlines:()=>Qd,deepClone:()=>le,deepContains:()=>fp,deepDefaults:()=>Wi,deepDestringifyFunctions:()=>pt,deepExtend:()=>Yc,deepMerge:()=>ne,deepMergeExtends:()=>zt,deepStringifyFunctions:()=>Xs,defineSetter:()=>Rh,destringifyGlobalScope:()=>Js,detectHeightOnInit:()=>jh,detectInfiniteLoop:()=>mp,document:()=>ee,encodeNewlines:()=>Jd,error:()=>mn,excludeKeysFromObject:()=>bp,exec:()=>fe,extendCachedRegistry:()=>Vp,extendStackRegistry:()=>ai,extractArrayExtend:()=>li,fetchLibraryData:()=>Ml,fibonacciNumberByIndex:()=>Bh,filterArrays:()=>qd,filterArraysFast:()=>Kd,finalizeExtends:()=>tl,findClosestNumber:()=>Ll,findClosestNumberInFactory:()=>Xh,findInheritedState:()=>yl,findKeyPosition:()=>Xd,flattenExtend:()=>co,formatDate:()=>Nh,generateHash:()=>qc,generateHeadArrayTags:()=>$l,generateKey:()=>ei,generateMetaTags:()=>Gh,get:()=>Ah,getActiveRoute:()=>Ty,getCDNDirUrl:()=>Dl,getCDNUrl:()=>At,getCapitalCaseKeys:()=>Kp,getCdnProviderFromConfig:()=>go,getChildStateInKey:()=>ml,getChildren:()=>Oi,getContext:()=>Mi,getCookie:()=>$p,getDB:()=>Ui,getEmotionStylesheet:()=>og,getExtendsInElement:()=>Wp,getExtendsStack:()=>si,getExtendsStackRegistry:()=>Gc,getFrequencyInArray:()=>Fd,getHashedExtend:()=>ci,getImportMapScript:()=>Fh,getInObjectByPath:()=>gp,getLocalStorage:()=>Mp,getNev:()=>kp,getPageMetadata:()=>Yh,getParentStateInKey:()=>gl,getPath:()=>Ri,getQuery:()=>Vi,getRef:()=>Oh,getRoot:()=>Ii,getRootContext:()=>Li,getRootData:()=>$i,getRootState:()=>Di,getRootStateInKey:()=>hl,getSpreadChildren:()=>Gp,global:()=>Id,hasFunction:()=>Ut,hasHandlerPlugin:()=>ro,hasOwnProperty:()=>ap,hashContent:()=>_o,inheritChildExtends:()=>Jc,inheritChildPropsExtends:()=>Zc,inheritParentProps:()=>hi,inheritRecursiveChildExtends:()=>Qc,init:()=>mr,initProps:()=>eh,is:()=>qe,isArray:()=>O,isBoolean:()=>Nc,isContextComponent:()=>Yp,isCyclic:()=>yp,isDOMNode:()=>We,isDate:()=>Bc,isDefined:()=>ke,isDevelopment:()=>Er,isEmpty:()=>Uc,isEmptyObject:()=>cp,isEqualDeep:()=>Vc,isFunction:()=>A,isHtmlElement:()=>Ns,isLocal:()=>Sp,isLoudDevRuntime:()=>Oe,isMalformedDependency:()=>mo,isMethod:()=>Ih,isMobile:()=>Dp,isNode:()=>or,isNot:()=>Ld,isNotProduction:()=>pn,isNull:()=>jc,isNumber:()=>Bt,isObject:()=>k,isObjectLike:()=>N,isPhoto:()=>Uh,isPolyglotWritableKey:()=>ir,isProduction:()=>Cr,isStaging:()=>wp,isState:()=>ah,isString:()=>w,isStringFunction:()=>Ap,isTest:()=>Wc,isTesting:()=>xp,isUndefined:()=>Ae,isUniversallyReservedKey:()=>Lh,isUnresolvableDependency:()=>yn,isValidDependencyMap:()=>yo,isValidHtmlTag:()=>Np,isWrappedLibrary:()=>Kt,joinArrays:()=>Zn,jointStacks:()=>zp,keys:()=>Ol,lastLevel:()=>Jf,lastPathname:()=>Zf,loadCssFile:()=>Wh,loadJavascript:()=>qh,loadJavascriptFile:()=>Vh,loadJavascriptFileEmbedSync:()=>Hh,loadJavascriptFileSync:()=>zh,loadRemoteCSS:()=>Kh,loadRemoteScript:()=>bo,log:()=>Ph,logGroupIf:()=>Pp,logIf:()=>Rp,lookdown:()=>Ch,lookdownAll:()=>Eh,lookup:()=>vh,lowercaseFirstLetter:()=>ln,makeObjectWithoutPrototype:()=>lp,map:()=>op,mapStringsWithContextComponents:()=>fi,markPolyglotSeeded:()=>Wt,matchRoute:()=>Cy,matchesComponentNaming:()=>Ht,memoize:()=>Ep,merge:()=>pe,mergeSharedLibraries:()=>qi,nextElement:()=>Ni,normalizeIgnoreList:()=>Dr,normalizeLibraryKey:()=>xo,objectToString:()=>Zs,objectizeStringProperty:()=>ui,overwrite:()=>Qs,overwriteDeep:()=>Ke,overwriteShallow:()=>dn,overwriteState:()=>fh,parse:()=>Rl,parseDeep:()=>Ai,parseQuery:()=>Ey,parseRoutePattern:()=>vy,pickupElementFromProps:()=>ol,pickupPropsFromElement:()=>nl,polyglotSeededKeys:()=>bi,previousElement:()=>ji,propExists:()=>Jp,propertizeElement:()=>sl,propertizeUpdate:()=>Zp,reinit:()=>zy,remove:()=>cx,removeChars:()=>tg,removeCookie:()=>Lp,removeDuplicateProps:()=>mi,removeDuplicatesInArray:()=>Jn,removeFromArray:()=>Nd,removeFromObject:()=>up,removeNestedKeyByPath:()=>pp,removeValueFromArray:()=>Vs,removeValueFromArrayAll:()=>Vd,reorderArrayByValues:()=>Hd,replaceLiteralsWithObjectFields:()=>cn,replaceOctalEscapeSequences:()=>Zd,resolveAsset:()=>Ge,resolveHandler:()=>no,resolveSharedLibraries:()=>Jh,returnValueAsText:()=>al,router:()=>er,runGuards:()=>Ay,runPluginHook:()=>Ee,scratchSystem:()=>No,scratchUtils:()=>Lr,self:()=>$d,set:()=>Pn,setActiveRootState:()=>Pi,setCookie:()=>Ip,setHashedExtend:()=>Kc,setInObjectByPath:()=>hp,setLocalStorage:()=>Fp,setNodeStyles:()=>Tl,setProps:()=>Th,setPropsPrototype:()=>gi,sharedLibrary:()=>Zh,splitPackageSpecifier:()=>zi,spotByPath:()=>Ti,srcsetFor:()=>wo,stringIncludesAny:()=>Ws,stringToObject:()=>ip,stripVersionRangePrefix:()=>Hi,swapItemsInArray:()=>jd,syncProps:()=>yi,toCamelCase:()=>Ki,toDashCase:()=>Gi,toDescriptionCase:()=>ng,toPriorityOrder:()=>ht,toTitleCase:()=>rg,toggleFullscreen:()=>Mh,triggerEventOn:()=>Ar,triggerEventOnUpdate:()=>dh,trimStringFromSymbols:()=>Yd,unstackArrayOfObjects:()=>Us,update:()=>Qp,updateProps:()=>th,variables:()=>Bi,verbose:()=>uo,warn:()=>Fi,window:()=>C});P();P();var NO=E(),kk=(e=NO,t)=>{let r=k(t.localFile)?t.localFile:{},n=le(r.designSystem||{});return ne(e,n,ot)},jO={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},cs=(e,t)=>{let r=!t||t===":root",n={};for(let o in e)if(o.startsWith("@media")){let s=r?":root:not([data-theme])":`:root:not([data-theme]) ${t}:not([data-theme])`;n[o]={[s]:e[o]}}else r?n[o]=e[o]:n[`${t}${o}, ${o} ${t}`]=e[o];return n},mr=(e,t=jO)=>{let r=kk(e||{},t),n=t.scopeSelector||":root",o=t.globalTheme;if(typeof window<"u"&&window.location){let h=new URLSearchParams(window.location.search).get("globalTheme");h&&(o=h)}let s=Pn({verbose:t.verbose,useReset:t.useReset,useFontImport:t.useFontImport,useVariable:t.useVariable,useSvgSprite:t.useSvgSprite,useDocumentTheme:t.useDocumentTheme,useIconSprite:t.useIconSprite,useDefaultConfig:t.useDefaultConfig,globalTheme:o,themeRoot:t.themeRoot,files:t.files,assets:t.assets,...r},{newConfig:t.newConfig,config:t.config});s&&(s.scopeSelector=n);let i=ra(s.font,s.files),a=s.useReset,c=s.useVariable,l=s.useFontImport,f=s.useSvgSprite,u=e.svg,d=s.useIconSprite,p=e.icons;l&&Se(i),c&&(Se({[n]:s.CSS_VARS}),s.CSS_MEDIA_VARS&&Se(cs(s.CSS_MEDIA_VARS,n))),a&&Se(s.reset);let g=s.animation;if(g){let h={};for(let m in g)h[`@keyframes ${m}`]=g[m];Se(h)}return(u||f)&&Aa(s.svg,{document:t.document}),(p||d)&&Rn(s.icons,{document:t.document}),s},nu={},zy=(e,t=nu)=>{let r=kk(e||{},t),n=t.scopeSelector||":root",o=Pn({verbose:!1,...r});return t.preventInject||(Se({[n]:o.CSS_VARS}),o.CSS_MEDIA_VARS&&Se(cs(o.CSS_MEDIA_VARS,n)),Se(o.reset)),o},Hy=(e,t=nu)=>{Se(e)},BO=(e,t=nu)=>{let r=t.scopeSelector||":root";Se({[r]:e.CSS_VARS}),e.CSS_MEDIA_VARS&&Se(cs(e.CSS_MEDIA_VARS,r))};var UO=(e,t=nu)=>{};P();var vk=e=>!e||e==="srcdoc"||e==="about:srcdoc"||e==="blank"||e==="about:blank"?"/":e,VO=e=>{let t=e&&e.initialPath;return typeof t!="string"||!t?null:t[0]==="/"?t:"/"+t},Wy={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},Xa=(e,t)=>{if(!t)return e;let r=Array.isArray(t)?t:t.split("."),n=e;for(let o of r){if(!n||!n[o])return null;n=n[o]}return n},Ck=(e,t)=>{if(t.router===!1)return;t.router===!0?t.router=Wy:t.router=pe(t.router||{},Wy);let r=t.router,n=async(s,i)=>{let a=s.context?.window||C,c=VO(r);if(!c){if(!a.location)return;let{pathname:f,search:u,hash:d}=a.location;f=vk(f),c=f+u+d}let l=s;if(r.customRouterElement){let f=Xa(s,r.customRouterElement);f&&(l=f,s.routes&&(l.routes=s.routes))}l.routes&&await er(c,l,{},{initialRender:!0,pushState:!1})},o=!Ae(e.onRenderRouter);return r&&r.initRouter&&!o&&(e.onRenderRouter=n),zO(t,r),r},qy=(e,t)=>{if(t.router===!1)return;let r=t.router||Wy;if(!r.popState)return;let n=t.utils&&t.utils.router?t.utils.router:er,o=t.window||C,s=async i=>{let{pathname:a,search:c,hash:l}=o.location;a=vk(a);let f=a+c+l,u=e;if(r.customRouterElement){let d=Xa(e,r.customRouterElement);d&&(u=d,e.routes&&(u.routes=e.routes))}await u.call("router",f,u,{},{pushState:!1,scrollToTop:!1,level:0,event:i})};o.addEventListener("popstate",s),t.__teardowns=t.__teardowns||[],t.__teardowns.push(()=>o.removeEventListener("popstate",s))},zO=(e,t)=>{let{components:r}=e;if(t&&t.injectRouterInLinkComponent)return ne(r.Link||r["smbls.Link"],r.RouterLink||r["smbls.RouterLink"])};P();var Ky=C&&C.location?C.location.host.includes("dev."):Er(),Ek=Ky?"http://localhost:8080/get":"https://api.symbols.app/get",HO={endpoint:Ek},Ak=async(e,t=HO)=>{let r=t.endpoint||Ek,n=t.serviceRoute?O(t.serviceRoute)?t.serviceRoute.map(s=>s.toLowerCase()+"=true").join("&"):t.serviceRoute:"",o;try{return o=await globalThis.fetch(r+"/?"+n,{method:"GET",headers:{"Content-Type":"application/json","X-AppKey":e,"X-Metadata":t.metadata}}),await o.json()}catch(s){if(A(t.onError))return t.onError(s);console.error(s)}},WO=async(e,t)=>{let{editor:r}=t;if(r&&r.remote){let n=await Ak(e,r),o=Ky||t.isDevelopment?pt(n):pt(n.releases[0]);r.serviceRoute?O(r.serviceRoute)?r.serviceRoute.forEach(s=>{Ke(t[s],o[s.toLowerCase()])}):Ke(t[r.serviceRoute],o):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{Ke(t[s],o[s.toLowerCase()])})}return t},qO=async(e,t,r)=>{let{editor:n}=t;if(n&&n.remote){let o=await Ak(e,n),s=Ky||t.isDevelopment?pt(o):pt(o.releases[0]);r(s)}},Tk=async(e,t)=>{if(e&&t.editor)try{t.editor.async||await WO(e,t)}catch(r){console.error(r)}},Ok=(e,t,r,n)=>{if(t&&r.editor)try{r.editor.async&&qO(t,r,n||(o=>{let s=o.designSystem;k(s)&&r.utils.init(s),k(o.state)&&e.state.set(o.state)}))}catch(o){console.error(o)}};var Za=e=>{if(!e||e.__destroyed)return!1;let t=e.context;if(!t)return e.__destroyed=!0,!1;if(Array.isArray(t.__teardowns)){for(let r of t.__teardowns)try{r()}catch(n){console.error("[smbls] destroy teardown error:",n)}t.__teardowns.length=0}try{Wr(e)}catch(r){console.error("[smbls] dispose error:",r)}if(t.fetch&&t.fetch.__resolved&&delete t.fetch.__resolved,t.fetch&&t.fetch.__resolving&&delete t.fetch.__resolving,t.db&&t.db.__resolved&&delete t.db.__resolved,t.db&&t.db.__resolving&&delete t.db.__resolving,t.analyze?.destroy)try{t.analyze.destroy()}catch(r){console.error("[analyze] destroy error:",r)}return e.__destroyed=!0,!0};var Yy={};I(Yy,{Helmet:()=>Dk,applyMetadata:()=>us,default:()=>JO,extractMetadata:()=>YO,generateHeadHtml:()=>ZO,helmetPlugin:()=>Gy,resolveMetadata:()=>Gr});P();var KO={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"}},GO=e=>{if(e.tag==="link")return`link[${e.attr}="${e.key}"]`;if(e.tag&&!e.attr&&!e.key)return e.tag;if(e.tag&&e.attr&&e.key)return`${e.tag}[${e.attr}="${e.key}"]`},Rk=e=>pt({v:e}).v,Pk=(e,t,r,n)=>{try{return fe(e,t,r)}catch(o){console.warn(`[helmet] metadata factory for "${n}" threw; treating as unset:`,o&&o.message||o);return}},Gr=(e,t,r)=>{if(!e)return{};let n=e;w(n)&&Ut(n)&&(n=Rk(n));let o=A(n)?Pk(n,t,r,"metadata"):k(n)?{...n}:{};if(!k(o))return{};for(let s in o){let i=o[s];w(i)&&Ut(i)&&(i=Rk(i)),A(i)?i=Pk(i,t,r,s):w(i)&&Ut(i)&&(i=void 0),w(i)&&i.includes("{{")&&t?.call&&(i=t.call("replaceLiteralsWithObjectFields",i,r)),o[s]=i}return o},YO=(e,t="/",r,n)=>{let s=(e.pages||{})[t],i={};if(e.integrations?.seo&&(i={...e.integrations.seo}),e.app?.metadata){let c=Gr(e.app.metadata,r,n);i={...i,...c}}let a=new Set;if(s){let c=s.metadata||s.helmet||{},l=Gr(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=e.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&&t&&t!=="/"){let l=t.startsWith("/")?t:"/"+t;i["og:url"]=c+l}}if(e.files)for(let c in i){let l=i[c];if(typeof l=="string"&&l.length>0&&!l.startsWith("/")&&!l.startsWith("http")){let f=e.files[l];f?.src&&(i[c]=f.src)}}return i},XO=(e,t)=>{let r=t.createElement(e.tag);return e.attr&&r.setAttribute(e.attr,e.key),(t.head||t.querySelector("head")).appendChild(r),r},fs=e=>{let t=5381,r=String(e);for(let n=0;n<r.length;n++)t=(t*33^r.charCodeAt(n))>>>0;return t.toString(36)},ls=(e,t,r,n)=>{let o=e.head||e.querySelector("head");if(!o)return;let s=new Map;for(let a of o.querySelectorAll(`[${t}]`))s.set(a.getAttribute(t),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(t,a),o.appendChild(c))}},us=(e,t)=>{if(!(!k(e)||!t)){for(let r in e){let n=e[r];if(n==null||r==="jsonLd"||r==="styles"||r==="scripts"||r==="alternate"||r==="favicons"||r==="icon"||r==="favicon")continue;let o=KO[r];if(!o)continue;let s=GO(o),i=t.querySelector(s)||XO(o,t);i&&(r==="title"?i.textContent=n:o.valueAttr?i.setAttribute(o.valueAttr,n):i.setAttribute("content",n))}if(Array.isArray(e.jsonLd)){let n=e.jsonLd.filter(s=>s!=null).map(s=>w(s)?s:JSON.stringify(s)),o=n.map(fs);ls(t,"data-smbls-jsonld",o,s=>{let i=o.indexOf(s),a=t.createElement("script");return a.setAttribute("type","application/ld+json"),a.textContent=n[i],a})}if(Array.isArray(e.styles)){let r=e.styles.filter(o=>o!=null&&String(o).trim()),n=r.map(fs);ls(t,"data-smbls-style",n,o=>{let s=n.indexOf(o),i=t.createElement("style");return i.textContent=String(r[s]),i})}if(Array.isArray(e.scripts)){let r=e.scripts.filter(o=>o&&(w(o)?o.trim():o.src)),n=r.map(o=>w(o)?o:String(o.src));ls(t,"data-smbls-script",n,o=>{let s=n.indexOf(o),i=r[s],a=t.createElement("script");return w(i)?a.setAttribute("src",i):(i.src&&a.setAttribute("src",i.src),i.type&&a.setAttribute("type",i.type),i.async&&(a.async=!0),i.defer&&(a.defer=!0),i.integrity&&a.setAttribute("integrity",i.integrity),i.crossorigin&&a.setAttribute("crossorigin",i.crossorigin),i.referrerpolicy&&a.setAttribute("referrerpolicy",i.referrerpolicy),i.nomodule&&(a.noModule=!0),i.body&&(a.textContent=String(i.body))),a})}if(Array.isArray(e.alternate)){let r=e.alternate.filter(o=>k(o)),n=r.map(o=>`${o.hreflang||""}|${o.href||""}`);ls(t,"data-smbls-alternate",n,o=>{let s=n.indexOf(o),i=t.createElement("link");i.setAttribute("rel","alternate");for(let[a,c]of Object.entries(r[s]))i.setAttribute(a,c);return i})}if(Array.isArray(e.favicons)){let r=e.favicons.filter(o=>o!=null),n=r.map(o=>k(o)?fs(JSON.stringify(o)):String(o));ls(t,"data-smbls-favicon",n,o=>{let s=n.indexOf(o),i=r[s],a=t.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(e.icon||e.favicon){let r=String(e.icon||e.favicon),n=r.endsWith(".svg")?"image/svg+xml":r.endsWith(".png")?"image/png":"";ls(t,"data-smbls-single-icon",[r],o=>{let s=t.createElement("link");return s.setAttribute("rel","icon"),s.setAttribute("href",o),n&&s.setAttribute("type",n),s})}}},ce=e=>{if(e==null)return"";let t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return e.toString().replace(/[&<>"']/g,r=>t[r])},ZO=e=>{let t=['<meta charset="UTF-8">'],r=new Set(["charset","jsonLd","styles","scripts"]),n=!1;for(let[o,s]of Object.entries(e)){if(!s&&s!==0&&s!==!1||r.has(o)||typeof s=="function")continue;if(o==="title"){t.push(`<title>${ce(s)}</title>`);continue}if(o==="viewport"){n||(t.push(`<meta name="viewport" content="${ce(s)}">`),n=!0);continue}if(o==="canonical"){t.push(`<link rel="canonical" href="${ce(s)}">`);continue}if(o==="icon"||o==="favicon"){let f=ce(s),u=f.endsWith(".svg")?' type="image/svg+xml"':f.endsWith(".png")?' type="image/png"':"";t.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}="${ce(p)}"`).join(" ");t.push(`<link rel="icon" ${u}>`)}else typeof f=="string"&&t.push(`<link rel="icon" href="${ce(f)}">`)});continue}if(o==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,p])=>`${d}="${ce(p)}"`).join(" ");t.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:","");t.push(`<meta http-equiv="${ce(f)}" content="${ce(s)}">`)}else if(o.startsWith("itemprop:")){let f=o.replace("itemprop:","");t.push(`<meta itemprop="${ce(f)}" content="${ce(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>t.push(`<meta property="${ce(o)}" content="${ce(f)}">`)):t.push(`<meta property="${ce(o)}" content="${ce(s)}">`):l?t.push(`<meta name="${ce(o)}" content="${ce(s)}">`):Array.isArray(s)?s.forEach(f=>t.push(`<meta name="${ce(o)}" content="${ce(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&t.push(`<meta name="${ce(o)}" content="${ce(s)}">`)}if(n||t.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),Array.isArray(e.jsonLd))for(let o of e.jsonLd){if(o==null)continue;let s=typeof o=="string"?o:JSON.stringify(o),i=String(s).replace(/<\/script/gi,"<\\/script");t.push(`<script type="application/ld+json" data-smbls-jsonld="${fs(s)}">${i}<\/script>`)}if(Array.isArray(e.styles))for(let o of e.styles){if(o==null||!String(o).trim())continue;let s=String(o).replace(/<\/style/gi,"<\\/style");t.push(`<style data-smbls-style="${fs(s)}">${s}</style>`)}if(Array.isArray(e.scripts))for(let o of e.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="${ce(i)}"`),s||(o.type&&a.push(`type="${ce(o.type)}"`),o.async&&a.push("async"),o.defer&&a.push("defer"),o.integrity&&a.push(`integrity="${ce(o.integrity)}"`),o.crossorigin&&a.push(`crossorigin="${ce(o.crossorigin)}"`),o.referrerpolicy&&a.push(`referrerpolicy="${ce(o.referrerpolicy)}"`),o.nomodule&&a.push("nomodule"));let c=` data-smbls-script="${ce(i||fs(o.body||""))}"`;if(!s&&o.body){let l=String(o.body).replace(/<\/script/gi,"<\\/script");t.push(`<script ${a.join(" ")}${c}>${l}<\/script>`)}else t.push(`<script ${a.join(" ")}${c}><\/script>`)}return t.join(`
89
+ `)},Dk={define:{metadata:(e,t,r)=>{let n=t.context?.document||typeof document<"u"&&document;if(!n)return;let o=Z(()=>{let s=Gr(e,t,t.state);us(s,n);let i=t.state?.root;k(i)&&(i.$helmet=s)});t.__ref?.__effects&&t.__ref.__effects.push(o)}}},Gy={name:"helmet",create(e){if(!e.metadata)return;let t=e.context?.document||typeof document<"u"&&document;if(!t)return;let r=Z(()=>{let n=e.metadata;if(!n)return;let o=Gr(n,e,e.state);us(o,t)});e.__ref?.__effects&&e.__ref.__effects.push(r)},update(e){let t=e.metadata;if(!t)return;let r=e.context?.document||typeof document<"u"&&document;if(!r)return;let n=Gr(t,e,e.state);us(n,r)}},JO=Dk;Or();var Ik=(e,t,r,n)=>{e&&Ei(e,t,r,n)},$k=(e,t,r)=>{if(!e)return;let n=t.context?.document||typeof document<"u"&&document;if(!n)return;let o=Gr(e,t,r);us(o,n)},Lk=async(e,t)=>{if(!e)return;let r={tag:"fragment",...e},n=async()=>{await t.set(r,{preventDefineUpdate:"$router"})};return t.lazyLoad?window.requestAnimationFrame(n):await n(),r},ds={routes:e=>e,metadata:$k,fetch:Ik,$router:Lk},Mk=(e={})=>{let t={routes:r=>r};return e.metadata!==!1&&(t.metadata=$k),e.fetch!==!1&&(t.fetch=Ik),e.router!==!1&&(t.$router=Lk),t};var Xy={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},ou={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},su={...Xy,router:ou},QO={state:{},pages:{},components:{},router:ou,define:ds},Yr=QO;P();P();var Fk=(e,t)=>N(e.extends)?e.extends:[];P();var Zy={};I(Zy,{default:()=>rR,getActiveLang:()=>Xr,getLanguages:()=>Qa,getLocalStateLang:()=>oc,initPolyglot:()=>au,loadTranslations:()=>tc,polyglotPlugin:()=>hs,setLang:()=>rc,translate:()=>ec,upsertTranslation:()=>nc});P();var jk="smbls_lang",eR="smbls_t_",tR="smbls_tv_",ps={get(e){try{return window?.localStorage.getItem(e)}catch{return null}},set(e,t){try{window?.localStorage.setItem(e,t)}catch(r){console.warn("[polyglot] localStorage unavailable:",r.message)}},remove(e){try{window?.localStorage.removeItem(e)}catch(t){console.warn("[polyglot] localStorage unavailable:",t.message)}}},Ja={};function Xr(){let e=this?.context,t=e?.polyglot;return(this?.state?.root||e?.state?.root)?.lang||e?.state?.lang||t?.defaultLang||"en"}function Qa(){let e=this?.context?.polyglot;return e?e.languages?e.languages:e.translations?Object.keys(e.translations):[]:[]}var iu=(e,t)=>{if(!e||!t)return;if(e[t]!==void 0)return e[t];if(t.indexOf(".")===-1)return;let r=t.split("."),n=e;for(let o=0;o<r.length;o++){if(n==null)return;n=n[r[o]]}return n},Nk=(e,t,r)=>{let n=t.lastIndexOf(".");if(n===-1)return e[t+"_"+r];let o=iu(e,t.substring(0,n));if(o!=null)return o[t.substring(n+1)+"_"+r]};function ec(e,t){if(!e)return"";let r=this?.context,n=r?.polyglot,o=t||this.call("getActiveLang"),s=this?.state;if(s){let l=Nk(s,e,o);if(l!==void 0)return l}if(n?.translations){let l=n.translations[o];if(l){let f=iu(l,e);if(f!==void 0)return f}}let a=(s?.root||r?.state?.root)?.translations;if(a){let l=a[o];if(l){let f=iu(l,e);if(f!==void 0)return f}}let c=n?.defaultLang||"en";if(s){let l=Nk(s,e,c);if(l!==void 0)return l}if(n?.translations){let l=n.translations[c];if(l){let f=iu(l,e);if(f!==void 0)return f}}return e}async function tc(e){let t=this?.context,r=t?.polyglot,n=this?.state?.root||t?.state?.root;if(!r||!n)return;let o=r.storagePrefix||eR,s=r.storageVersionPrefix||(r.storagePrefix?r.storagePrefix.replace(/_$/,"v_"):tR);if(r.translations&&r.translations[e]&&!r.fetch||!r.fetch||r._fetchFailed?.[e])return;if(!n.translations?.[e]){let c=ps.get(o+e);if(c)try{let l=JSON.parse(c),f={translations:{...n.translations||{}}};f.translations[e]=l,n.update&&n.update(f)}catch(l){console.warn("[polyglot] Failed to apply language update:",l.message)}}let i=(r.storagePrefix||"smbls")+":"+e;if(Ja[i])return Ja[i];let a=this;return Ja[i]=(async()=>{try{let c=r.fetch,l=parseInt(ps.get(s+e),10)||0,f,u,d;if(A(c)){let g=await c(e,l,a);if(!g||g.changed===!1)return;f=g.translations||g.data||g,u=g.version||0,d=!0}else if(k(c)){let g=a.getDB||(()=>t.fetch),h=A(g)?await g.call(a):t.fetch;if(!h)return;let m=c.rpc||c.from||"get_translations_if_changed",_={p_lang:e,p_cached_version:l,...c.params||{}},b=await h.rpc({from:m,params:_});if(b.error)throw r._fetchFailed||(r._fetchFailed={}),r._fetchFailed[e]=!0,b.error;let y=b.data;if(!y||!y.changed)return;f=y.translations||{},u=y.version||0,d=!0}else return;if(!d||!f)return;ps.set(o+e,JSON.stringify(f)),u&&ps.set(s+e,String(u));let p={translations:{...n.translations||{}}};p.translations[e]=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",e,"-",l)}}finally{delete Ja[i]}})(),Ja[i]}async function rc(e){let t=this?.context,r=t?.polyglot,n=this?.state?.root||t?.state?.root;if(!n)return;let o=r?.storageLangKey||jk;if(ps.set(o,e),this.call("getActiveLang")===e)return;r?.fetch&&await this.call("loadTranslations",e),t?.state&&(t.state.lang=e);let s=r?.translations?.[e],i={lang:e},a=l=>ir(t,l,n);if(s&&typeof s=="object")for(let l in s){if(!a(l))continue;let f=s[l];(Array.isArray(f)||typeof f=="string"||typeof f=="number")&&(i[l]=f)}n.update&&n.update(i);for(let l in i)l!=="lang"&&Wt(t,l);if(s&&typeof s=="object")for(let l in s){if(!a(l))continue;let f=s[l];if(f&&typeof f=="object"&&!Array.isArray(f)&&n[l]&&typeof n[l]=="object"&&!Array.isArray(n[l])){for(let u in f)n[l][u]=f[u];Wt(t,l)}}let c=this?.context?.document||globalThis.document;if(c&&s){let l=c.querySelectorAll("[data-key]");for(let f of l){let u=f.ref;if(!u)continue;let d=u.__ref?.__exec?.text;if(typeof d=="string"&&d.includes("{{"))try{let p=u.call("replaceLiteralsWithObjectFields",d,u.state);p!=null&&f.textContent!==p&&(f.textContent=p)}catch{}}}}async function nc(e,t,r){let n=this?.context,o=n?.polyglot,s=this?.state?.root||n?.state?.root;if(s?.translations?.[t]&&(s.translations[t][e]=r),o?.translations?.[t]&&(o.translations[t][e]=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:e,lang:t,text:r}});if(l?.error)throw l.error;return l.data}}async function au(){let e=this?.context,t=e?.polyglot;if(!t)return;let r=this?.state?.root||e?.state?.root;if(!r)return;let n=t.storageLangKey||jk,s=ps.get(n)||Xr.call(this);r.update&&r.lang!==s&&r.update({lang:s}),t.fetch&&!(t.translations&&t.translations[s])&&await this.call("loadTranslations",s)}function oc(e){try{let t=Xr.call(this),r=this?.state;if(!r)return"";let n=e.lastIndexOf(".");if(n===-1)return r[e+t]??"";let o=e.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[e.substring(n+1)+t]??""}catch{return""}}var hs={name:"polyglot",render(e){e.parent&&e.parent.parent||e.__polyglotInitialized||(e.__polyglotInitialized=!0,au.call(e))}},rR=hs;Or();var Qy={};I(Qy,{SYSTEM_METRICS:()=>sc,capsizeHandler:()=>Jy,capsizePlugin:()=>lu,computeCapsize:()=>Bk,default:()=>nR,resolveFontSizePx:()=>Uk,resolveMetrics:()=>Vk});var sc={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}},cu=e=>parseFloat(e.toFixed(4)),Bk=(e,t,r)=>{let{ascent:n,descent:o,lineGap:s,unitsPerEm:i,capHeight:a}=t,c=Math.abs(o),l=n+c+s,f=r!==void 0?r:l/i*e,u=f/e,d=l/i,p=(n-a+s/2)/i-(u-d)/2,g=(c+s/2)/i-(u-d)/2;return{fontSize:`${cu(e/16)}rem`,lineHeight:`${cu(f)}px`,capHeightTrim:`${cu(-p)}em`,baselineTrim:`${cu(-g)}em`}},Uk=(e,t)=>{if(typeof e=="number")return e;let r=t?.designSystem;if(!r)return null;let{typography:n}=r;if(n?.sequence){let s=String(e).toUpperCase(),i=n.sequence[s];if(i)return i.decimal||i.val}let o=parseFloat(e);return isNaN(o)?null:typeof e=="string"&&e.endsWith("rem")?o*(r.typography?.browserDefault||16):o},Vk=(e,t)=>{let n=t?.designSystem?.font_family||{};if(e){let s=n[e];if(s?.metrics)return s.metrics;let i=String(e).toLowerCase().replace(/['"]/g,"").trim();if(sc[i])return sc[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(sc[a])return sc[a]}}return null},Jy=(e,t,r,n)=>{if(!e)return;let o=Uk(t.fontSize,n);if(!o)return;let s=Vk(t.fontFamily,n);if(!s)return;let i=t.lineHeight?parseFloat(t.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=Bk(o,s,i),f={};return t.lineHeight||(f.lineHeight=a),f["::before"]={content:'""',marginBottom:c,display:"table"},f["::after"]={content:'""',marginTop:l,display:"table"},f},lu={name:"capsize",init(e){e.useCapsize===void 0&&e.fontSize&&(e.useCapsize=!0)}},nR=lu;var ib={};I(ib,{PRESERVE_VALUE_KEYS:()=>Ie,SKIP_INLINE_KEYS:()=>Zr,abbrToProp:()=>De,decode:()=>Kk,encode:()=>Hk,expand:()=>Ln,isComponentKey:()=>$t,isSelectorKey:()=>Lt,parse:()=>Mn,parseFurther:()=>Nn,propToAbbr:()=>kt,shorten:()=>ic,shorthandPlugin:()=>ac,stringify:()=>$n,stringifyFurther:()=>Fn});var kt={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"},De=Object.create(null);for(let e in kt)De[kt[e]]=e;var eb=Object.create(null);for(let e in kt){let t=kt[e];if(eb[t])throw new Error(`Duplicate abbreviation "${t}" for "${e}" \u2014 already used by "${eb[t]}"`);eb[t]=e}var Ie=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),Zr=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function $t(e){return/^[A-Z]/.test(e)}function Lt(e){return/^[:@.!$>&]/.test(e)||e.startsWith("> ")}function Hk(e){if(!e||typeof e!="object")return"";let t=[];for(let r in e){let n=e[r];if(typeof n=="function"||n!==null&&typeof n=="object"&&!Array.isArray(n)||n===void 0)continue;let o=kt[r]||r;if(n===!0)t.push(o);else if(n===!1)t.push("!"+o);else if(Array.isArray(n)){let s=n.map(i=>fu(i));t.push(o+":"+s.join(","))}else t.push(o+":"+fu(n))}return t.join(" ")}function fu(e){return String(e).replace(/ /g,"_")}function ic(e){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(function(r){return r!==null&&typeof r=="object"?ic(r):r});let t={};for(let r in e){let n=e[r];if($t(r)){t[r]=tb(n);continue}if(Lt(r)){t[r]=tb(n);continue}let o=kt[r]||r;if(Ie.has(r)||Ie.has(o)){t[o]=n;continue}t[o]=tb(n)}return t}function tb(e){return e==null||typeof e=="function"?e:Array.isArray(e)?e.map(function(t){return t!==null&&typeof t=="object"?ic(t):t}):typeof e=="object"?ic(e):e}function $n(e){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(function(n){return n!==null&&typeof n=="object"?$n(n):n});let t={},r=[];for(let n in e){let o=e[n];if($t(n)){t[n]=zk(o);continue}if(Lt(n)){t[n]=zk(o);continue}let s=kt[n]||n;if(Ie.has(n)||Ie.has(s)){t[s]=o;continue}if(typeof o=="function"){t[s]=o;continue}if(o==null){t[s]=o;continue}if(Zr.has(n)||Zr.has(s)){t[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){t[s]=o.map(function(a){return a!==null&&typeof a=="object"?$n(a):a});continue}if(o.length<=1){t[s]=o;continue}r.push(s+":"+o.map(fu).join(","));continue}if(typeof o=="object"){t[s]=$n(o);continue}o===!0?r.push(s):o===!1?r.push("!"+s):typeof o=="number"||typeof o=="string"&&(o.includes(",")||o.includes("_"))?t[s]=o:r.push(s+":"+fu(o))}return r.length&&(t.in=r.join(" ")),t}function zk(e){return e==null||typeof e=="function"?e:Array.isArray(e)?e.map(function(t){return t!==null&&typeof t=="object"?$n(t):t}):typeof e=="object"?$n(e):e}function Kk(e){if(!e||typeof e!="string")return{};let t={},r=Gk(e);for(let n of r){if(n.startsWith("!")){let c=n.slice(1),l=De[c]||c;t[l]=!1;continue}let o=n.indexOf(":");if(o===-1){let c=De[n]||n;t[c]=!0;continue}let s=n.slice(0,o),i=n.slice(o+1),a=De[s]||s;if(i.includes(",")){t[a]=i.split(",").map(Wk);continue}t[a]=Wk(i)}return t}function Gk(e){return e.trim().split(/\s+/).filter(Boolean)}function Wk(e){let t=e.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(t)?Number(t):t}function qk(e){return e.replace(/_/g," ")}function oR(e){if(!e||typeof e!="string")return{};let t={},r=Gk(e);for(let n of r){if(n.startsWith("!")){let c=n.slice(1),l=De[c]||c;t[l]=!1;continue}let o=n.indexOf(":");if(o===-1){let c=De[n]||n;t[c]=!0;continue}let s=n.slice(0,o),i=n.slice(o+1),a=De[s]||s;if(i.includes(",")){t[a]=i.split(",").map(qk);continue}t[a]=qk(i)}return t}function Ln(e){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(function(r){return r!==null&&typeof r=="object"?Ln(r):r});let t={};for(let r in e){let n=e[r];if($t(r)){t[r]=rb(n);continue}let o=De[r]||r;if(Lt(r)&&o===r){t[r]=rb(n);continue}if(Ie.has(o)||Ie.has(r)){t[o]=n;continue}t[o]=rb(n)}return t}function rb(e){return e==null||typeof e=="function"?e:Array.isArray(e)?e.map(function(t){return t!==null&&typeof t=="object"?Ln(t):t}):typeof e=="object"?Ln(e):e}function Mn(e){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(function(r){return r!==null&&typeof r=="object"?Mn(r):r});let t={};if(typeof e.in=="string"){let r=oR(e.in);for(let n in r)t[n]=r[n]}for(let r in e){if(r==="in")continue;let n=e[r];if($t(r)){t[r]=nb(n);continue}let o=De[r]||r;if(Lt(r)&&o===r){t[r]=nb(n);continue}if(Ie.has(o)||Ie.has(r)){t[o]=n;continue}t[o]=nb(n)}return t}function nb(e){return e==null||typeof e=="function"?e:Array.isArray(e)?e.map(function(t){return t!==null&&typeof t=="object"?Mn(t):t}):typeof e=="object"?Mn(e):e}function Yk(e){return String(e).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function sR(e){let t="",r=0;for(;r<e.length;){if(e[r]==="\\"&&r+1<e.length){let n=e[r+1];if(n===","||n==="_"||n==="\\"){t+=n,r+=2;continue}}e[r]==="_"?t+=" ":t+=e[r],r++}return t}function iR(e){let t=[],r="",n=0;for(;n<e.length;){if(e[n]==="\\"&&n+1<e.length){r+=e[n]+e[n+1],n+=2;continue}if(e[n]===","){t.push(r),r="",n++;continue}r+=e[n],n++}return t.push(r),t}function Xk(e){if(e==null||typeof e!="object"||Array.isArray(e))return!1;let t=Object.keys(e);return t.length===1&&t[0]==="in"&&typeof e.in=="string"}function Fn(e){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(function(n){return n!==null&&typeof n=="object"?Fn(n):n});let t={},r=[];for(let n in e){let o=e[n];if($t(n)){let i=Zk(o);t[n]=Xk(i)?i.in:i;continue}if(Lt(n)){let i=Zk(o);t[n]=Xk(i)?i.in:i;continue}let s=kt[n]||n;if(Ie.has(n)||Ie.has(s)){t[s]=o;continue}if(typeof o=="function"){t[s]=o;continue}if(o==null){t[s]=o;continue}if(Zr.has(n)||Zr.has(s)){t[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){t[s]=o.map(function(a){return a!==null&&typeof a=="object"?Fn(a):a});continue}if(o.length<=1){t[s]=o;continue}r.push(s+":"+o.map(Yk).join(","));continue}if(typeof o=="object"){t[s]=Fn(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+":"+Yk(o))}return r.length&&(t.in=r.join(" ")),t}function Zk(e){return e==null||typeof e=="function"?e:Array.isArray(e)?e.map(function(t){return t!==null&&typeof t=="object"?Fn(t):t}):typeof e=="object"?Fn(e):e}function Jk(e){return e.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(e)?Number(e.slice(1)):sR(e)}function ob(e){if(!e||typeof e!="string")return{};let t={},r=e.trim().split(/\s+/).filter(Boolean);for(let n of r){if(n.startsWith("!")){let l=n.slice(1),f=De[l]||l;t[f]=!1;continue}let o=n.indexOf(":");if(o===-1){let l=De[n]||n;t[l]=!0;continue}let s=n.slice(0,o),i=n.slice(o+1),a=De[s]||s,c=iR(i);if(c.length>1){t[a]=c.map(Jk);continue}t[a]=Jk(i)}return t}function Nn(e){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(function(r){return r!==null&&typeof r=="object"?Nn(r):r});let t={};if(typeof e.in=="string"){let r=ob(e.in);for(let n in r)t[n]=r[n]}for(let r in e){if(r==="in")continue;let n=e[r];if($t(r)){typeof n=="string"?t[r]=ob(n):t[r]=sb(n);continue}let o=De[r]||r;if(Lt(r)&&o===r){typeof n=="string"?t[r]=ob(n):t[r]=sb(n);continue}if(Ie.has(o)||Ie.has(r)){t[o]=n;continue}t[o]=sb(n)}return t}function sb(e){return e==null||typeof e=="function"?e:Array.isArray(e)?e.map(function(t){return t!==null&&typeof t=="object"?Nn(t):t}):typeof e=="object"?Nn(e):e}var aR={shorten:Ln,stringify:Mn,stringifyFurther:Nn};function cR(e,t){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>t(n));let r={};for(let n in e){let o=e[n];r[n]=o&&typeof o=="object"?t(o):o}return r}var lR=["components","pages","snippets"],ac={name:"shorthand",prepareContext(e){let t=e.shorthand;if(!t)return;let n=aR[t===!0?"shorten":t];if(n){for(let o of lR)e[o]&&(e[o]=cR(e[o],n));e.app&&typeof e.app=="object"&&(e.app=n(e.app))}}};var bb={};I(bb,{LEVELS:()=>cc,analyzePlugin:()=>ms,attachBrowserListeners:()=>_u,attachNetworkListeners:()=>fc,classifyEvent:()=>pb,createAnalyzeState:()=>xu,createBeaconSink:()=>mb,createConsoleSink:()=>hb,createDedupe:()=>fb,createEnrich:()=>cb,createMemorySink:()=>gb,createPipeline:()=>hu,createRedact:()=>pu,createRemoteSink:()=>mu,createSample:()=>ub,createSummarize:()=>lb,default:()=>ms,emitFetchEvent:()=>iv,makeEvent:()=>G,meetsLevel:()=>uu,normalizeLevel:()=>lc,resolveSinks:()=>bu,summarizeElement:()=>jn});var fR=0,uR=()=>`${Date.now().toString(36)}-${(fR++).toString(36)}`,G=(e,t,r={})=>({id:uR(),ts:Date.now(),type:e,level:t,...r}),dR=e=>{let t=[],r=e,n=0;for(;r&&n<32;)r.key!=null&&t.unshift(String(r.key)),r=r.parent,n++;return t.join(" > ")},jn=e=>e?{key:e.key!=null?String(e.key):null,name:e.__name||e.name||null,path:dR(e),tag:e.tag||null,component:e.component||null,route:e.context?.routerOptions?.currentRoute||null}:null;var gs=e=>e?.context?.analyze,pR={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=(e,{category:t,type:r,level:n})=>o=>{let s=gs(o);!s||!s.shouldCapture(t)||s.emit(G(r,n,{hook:e,element:jn(o)}))},Qk=e=>(t,r)=>{let n=gs(t);!n||!n.shouldCapture("state")||n.emit(G("state","debug",{hook:e,element:jn(t),changedKeys:r?.changedKeys||null}))},ms={name:"analyze",error(e,t){let r=gs(e);if(!r||r.config.enabled===!1||!r.shouldCapture("errors"))return;let n=t?.error||t?.err||(t instanceof Error?t:null);r.emit(G("error","error",{hook:t?.hook||"error",element:jn(e),error:n,message:n?.message||(typeof t?.message=="string"?t.message:null)}))},renderRouter(e){let t=gs(e);t&&(!t.shouldCapture("navigation")&&!t.shouldCapture("lifecycle")||t.emit(G("navigation","info",{hook:"renderRouter",route:e.context?.routerOptions?.currentRoute||null})))},beforeUpdate(e){let t=gs(e);!t||!t.shouldCapture("updates")||e.__ref&&(e.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(e){let t=gs(e);if(!t||!t.shouldCapture("updates"))return;let r=null;e.__ref?.__analyzeUpdateStart!=null&&(r=(typeof performance<"u"?performance.now():Date.now())-e.__ref.__analyzeUpdateStart,e.__ref.__analyzeUpdateStart=null),t.emit(G("update","debug",{hook:"update",element:jn(e),durationMs:r}))},beforeStateUpdate:Qk("beforeStateUpdate"),stateUpdate:Qk("stateUpdate")};for(let[e,t]of Object.entries(pR))ms[e]=hR(e,t);P();var cc={error:0,warn:1,info:2,debug:3,trace:4};var uu=(e,t)=>{let r=cc[e],n=cc[t];return r==null||n==null?!0:r<=n},lc=e=>cc[e]!=null?e:"warn";P();var du=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var gR=(e,t)=>{for(let r of t)if(r instanceof RegExp){if(r.test(e))return!0}else if(typeof r=="string"&&e.toLowerCase().includes(r.toLowerCase()))return!0;return!1},mR=(e,t)=>{if(t!=="redact"){if(t==="hash"){let r=0,n=String(e);for(let o=0;o<n.length;o++)r=(r<<5)-r+n.charCodeAt(o)|0;return`#${(r>>>0).toString(36)}`}return"***"}},ab=(e,t,r,n)=>{if(n>6||e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(s=>ab(s,t,r,n+1));let o={};for(let s of Object.keys(e))if(gR(s,t)||du.test(s)){let a=mR(e[s],r);a!==void 0&&(o[s]=a)}else o[s]=ab(e[s],t,r,n+1);return o},pu=(e=[],t="mask")=>{let r=Array.isArray(e)?e:[e];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,...g}=n,h=ab(g,r,t,0);return{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:p,...h}}};var cb=e=>{let t=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,r=typeof navigator<"u"?navigator.userAgent:null,n=e.config.buildHash||null,o=e.config.appId||null;return s=>{if(!s)return s;let i=e.context?.routerOptions?.currentRoute||null,a=C,c=a&&a.innerWidth?{w:a.innerWidth,h:a.innerHeight}:null;return{...s,session:t,app:{id:o,build:n,route:i},meta:{ua:r,viewport:c}}}},lb=()=>e=>{if(!e)return e;if(e.element&&typeof e.element=="object"){let t=e.element;(t.node||t.parent||t.__ref)&&(e={...e,element:{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,tag:t.tag||null,component:t.component||null}})}return e.error instanceof Error&&(e={...e,error:{name:e.error.name,message:e.error.message,stack:e.error.stack}}),e},fb=(e=1e3,t=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<e)return null;if(r.set(o,i),r.size>t){let a=Math.ceil(t/10),c=0;for(let l of r.keys()){if(c++>=a)break;r.delete(l)}}return n}},ub=e=>t=>{if(!t)return t;let r=e[t.type];return r==null||r>=1?t:Math.random()>r?null:t},ev={redact:e=>pu(e.config.redact||[],e.config.maskStrategy),enrich:e=>cb(e),summarize:()=>lb(),dedupe:e=>fb(e.config.cache?.dedupeWindowMs||1e3),sample:e=>ub(e.config.sample||{})},yR=(e,t)=>{if(typeof e=="function")return e;if(typeof e=="string"){let r=ev[e];return r?r(t):null}return null},hu=e=>{let t=e.config,r=Array.isArray(t.transformers)?t.transformers.slice():[],n=r.findIndex(s=>s==="redact");n>=0&&r.splice(n,1);let o=[];t.redact!==!1&&o.push(ev.redact(e));for(let s of r){let i=yR(s,e);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 g of l)if(d=g(d),d==null){p=!0;break}!p&&d!=null&&f.push(d)}return f}i=c}return i}};P();P();var gu=typeof C<"u"&&typeof C.document<"u",bR=5e3,_R=50,xR=3,wR=1500,SR=1e3,pb=e=>e?e.level==="error"||e.type==="error"?"bug":e.type==="network"?"network":e.type==="console"?e.level==="error"||e.level==="warn"?"bug":"log":e.level==="warn"?"bug":e.level==="info"?"log":"verbose":"verbose",kR=e=>{try{return JSON.stringify(e)}catch{return null}},vR=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},CR=e=>{if(!e)return null;let t=String(e),r;return(r=t.match(/Edg\/([\d.]+)/))?{name:"Edge",version:r[1]}:(r=t.match(/OPR\/([\d.]+)/))?{name:"Opera",version:r[1]}:(r=t.match(/Firefox\/([\d.]+)/))?{name:"Firefox",version:r[1]}:/Chrome\/([\d.]+)/.test(t)&&/Safari\//.test(t)?(r=t.match(/Chrome\/([\d.]+)/),{name:"Chrome",version:r[1]}):(r=t.match(/Version\/([\d.]+).*Safari/))?{name:"Safari",version:r[1]}:{name:null,version:null}},ER=()=>{if(!gu)return null;try{let e=C.document?.documentElement?.getAttribute("data-theme")||null,t=typeof C.matchMedia=="function"?C.matchMedia("(prefers-color-scheme: dark)").matches:null;return{active:e||(t?"dark":t===!1?"light":null),forced:e||null,prefers:t==null?null:t?"dark":"light"}}catch{return null}},AR=()=>{if(!gu)return null;let e=C.location,t=typeof navigator<"u"?navigator:null,r=typeof screen<"u"?screen:null;return{url:e?.href||null,path:e?.pathname||null,referrer:C.document?.referrer||null,title:C.document?.title||null,ua:t?.userAgent||null,browser:CR(t?.userAgent),language:t?.language||null,languages:t?.languages||null,timezone:vR(),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:ER()}},mu=(e={})=>{let t=e.url,r=typeof e.transport=="function"?e.transport:null,n=typeof e.syncTransport=="function"?e.syncTransport:null;if(!t&&!r)return()=>{};let o=e.apiKey||null,s=e.appKey||e.appId||null,i=e.tenantKey||e.tenant||null,a=e.release||null,c=e.env||null,l=e.sdk||null,f=typeof e.getAuth=="function"?e.getAuth:null,u=typeof e.getContext=="function"?e.getContext:null,d=typeof e.classify=="function"?e.classify:pb,p=typeof e.beforeSend=="function"?e.beforeSend:null,g=e.debug===!0,h=typeof e.getDebug=="function"?e.getDebug:null,m=e.batchMs!=null?e.batchMs:bR,_=e.maxBatch||_R,b=e.maxRetries!=null?e.maxRetries:xR,y=e.backoffMs||wR,x=e.queueLimit||SR,S=e.sampleRate!=null?e.sampleRate:1,v=()=>typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,D=e.sessionId||v(),L=[],T=[],R=null,V=null,Ne=()=>{R||!L.length||(R=setTimeout(B,m))},q=F=>{if(V)return;let J=y*Math.pow(2,Math.max(0,F-1));V=setTimeout(()=>{if(V=null,!T.length)return;let be=T.shift();re(be.envelope,be.attempt)},J)},W=(F,J=!1)=>{let be=u?db(u):null,K={id:D,sentAt:Date.now()};J&&(K.endedAt=Date.now());let $={v:1,session:K,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:AR(),user:be?.user||null,traits:be?.traits||null,tags:be?.tags||null,events:F};if((h?db(h)===!0:g)&&($.app.debug=!0),p)try{return p($)||null}catch{return $}return $},re=async(F,J=1)=>{if(F)try{let be=!0;if(r){let K=await r(F);be=K!==!1&&K?.ok!==!1}else be=await TR(t,F,{apiKey:o,getAuth:f});!be&&J<b&&(T.push({envelope:F,attempt:J+1}),q(J+1))}catch{J<b&&(T.push({envelope:F,attempt:J+1}),q(J+1))}},B=(F=!1,J=!1)=>{if(R&&(clearTimeout(R),R=null),!L.length&&!J)return;let be=L;L=[];let K=W(be,J);if(K){if(F&&gu){if(typeof n=="function"&&db(()=>n(K)))return;if(navigator.sendBeacon&&t){let $=kR(K);if($)try{navigator.sendBeacon(t,new C.Blob([$],{type:"application/json"}));return}catch{}}}re(K)}},X=!1,$e=()=>{X||(X=!0,B(!0,!0))};gu&&(C.addEventListener("pagehide",$e,{passive:!0}),C.addEventListener("beforeunload",$e,{passive:!0}),C.addEventListener("visibilitychange",()=>{C.document.visibilityState==="hidden"&&B(!0)},{passive:!0}));let z=F=>{if(!F||S<1&&Math.random()>S)return;X&&(X=!1);let J={...F,log_type:d(F)};L.push(J),L.length>x&&(L=L.slice(-x)),L.length>=_?B():Ne()},de=F=>(B(!1,!0),D=F||v(),X=!1,z.sessionId=D,D);return z.flush=()=>B(!1),z.endSession=$e,z.startNewSession=de,z.sessionId=D,z},db=e=>{try{return e()}catch{return null}},TR=async(e,t,{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(e,{method:"POST",headers:o,body:JSON.stringify(t),keepalive:!0,credentials:"omit",mode:"cors"})).ok}catch{return!1}};var OR={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},RR="\x1B[0m",yu=typeof C<"u"&&typeof C.document<"u",hb=(e={})=>{let t=e.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(yu)i(a,s);else{let c=OR[s.level]||"";i(`${c}${a}${RR}`,s)}}},gb=(e,t={})=>{let r=t.max||e.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 e.__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=e.__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},mb=(e={})=>{let t=e.url,r=e.batchMs!=null?e.batchMs:5e3,n=e.maxBatch||50;if(!t)return()=>{};let o=[],s=null,i=()=>{if(s&&(clearTimeout(s),s=null),!o.length)return;let c=JSON.stringify({events:o});o=[];let l=yu?new C.Blob([c],{type:"application/json"}):c;if(yu&&navigator.sendBeacon)try{navigator.sendBeacon(t,l);return}catch{}typeof fetch<"u"&&fetch(t,{method:"POST",headers:{"Content-Type":"application/json","X-Analyze-Beacon":"1"},body:c,keepalive:!0}).catch(()=>{})};yu&&(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},tv={console:hb,memory:gb,beacon:mb,remote:mu},rv=(e,t)=>t.getDebug!=null||t.debug!=null?t:{...t,getDebug:()=>e.config.debug===!0},bu=e=>{let t=Array.isArray(e.config.sinks)?e.config.sinks:["console"],r=[];for(let n of t)if(typeof n=="function")r.push(n);else if(typeof n=="string"){let o=tv[n];if(!o)continue;r.push(n==="memory"?o(e,{}):o(n==="remote"?rv(e,{}):{}))}else if(n&&typeof n=="object"&&n.type){let o=tv[n.type];if(!o)continue;r.push(n.type==="memory"?o(e,n):o(n.type==="remote"?rv(e,n):n))}return r};P();var PR=typeof C<"u"&&typeof C.document<"u",DR=new Set(["password","hidden"]),nv=(e,t)=>{let r=0,n=null,o=null;return(...s)=>{let i=Date.now();i-r>=t?(r=i,e(...s)):(o=s,n||(n=setTimeout(()=>{r=Date.now(),n=null,o&&(e(...o),o=null)},t-(i-r))))}},yb="__analyzeKeyPath",ys=e=>{let t=e.target;if(!t)return{selector:null,key:null,path:null};if(t[yb])return t[yb];let r=[],n=t,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:t.tagName?.toLowerCase()||null};else{let a=(t.tagName||"unknown").toLowerCase(),c=t.id?`#${t.id}`:"",l=t.className&&typeof t.className=="string"?"."+t.className.trim().split(/\s+/).slice(0,2).join("."):"";i={selector:`${a}${c}${l}`,key:null,path:null}}try{t[yb]=i}catch{}return i},IR=(e,t)=>{if(t==="mask")return"***";if(t!=="redact"){if(t==="hash"){let r=0,n=String(e||"");for(let o=0;o<n.length;o++)r=(r<<5)-r+n.charCodeAt(o)|0;return`#${(r>>>0).toString(36)}`}return"***"}},$R=e=>!!(!e||e.tagName==="INPUT"&&DR.has(e.type)||du.test(e.name||"")||du.test(e.id||"")||e.dataset?.analyze==="skip"),_u=e=>{if(!PR)return;let t=e.config.capture,r=e.config.throttle,n=e.__teardown,o=(s,i,a,c)=>{s.addEventListener(i,a,c),n.push(()=>s.removeEventListener(i,a,c))};if(t.errors&&(o(C,"error",s=>{e.emit(G("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;e.emit(G("error","error",{hook:"unhandledrejection",message:a?.message||(typeof i=="string"?i:"Unhandled promise rejection"),error:a}))})),t.pointer){o(C,"click",i=>{e.emit(G("pointer","info",{hook:"click",target:ys(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:ov(i)}))},{passive:!0,capture:!0}),o(C,"dblclick",i=>{e.emit(G("pointer","info",{hook:"dblclick",target:ys(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),o(C,"contextmenu",i=>{e.emit(G("pointer","info",{hook:"contextmenu",target:ys(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=nv(i=>{e.emit(G("pointer","trace",{hook:"pointermove",x:i.clientX,y:i.clientY}))},r.pointermove);o(C,"pointermove",s,{passive:!0})}if(t.keyboard&&o(C,"keydown",s=>{e.emit(G("keyboard","info",{hook:"keydown",code:s.code,key:s.key&&s.key.length===1?"\xB7":s.key,modifiers:ov(s),target:ys(s)}))},{passive:!0,capture:!0}),t.forms){let s=i=>{let a=i.target;if(!a||!a.tagName||!["INPUT","TEXTAREA","SELECT"].includes(a.tagName))return;let l=$R(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:e.config.maskFormValues!==!1&&(u=IR(a.value,e.config.maskStrategy)),e.emit(G("forms","info",{hook:i.type,target:ys(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=>{e.emit(G("forms","info",{hook:"submit",target:ys(i)}))},{passive:!0,capture:!0})}if(t.scroll){let s=nv(()=>{e.emit(G("scroll","trace",{hook:"scroll",x:C.scrollX,y:C.scrollY}))},r.scroll);o(C,"scroll",s,{passive:!0,capture:!0})}if(t.viewport){let s=ni(()=>{e.emit(G("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",()=>{e.emit(G("viewport","info",{hook:"orientationchange",orientation:typeof screen<"u"&&screen.orientation?screen.orientation.type:null}))},{passive:!0}),o(C.document,"visibilitychange",()=>{e.emit(G("viewport","info",{hook:"visibilitychange",hidden:C.document.hidden}))},{passive:!0}),e.emit(G("viewport","info",{hook:"initial",w:C.innerWidth,h:C.innerHeight,dpr:C.devicePixelRatio||1}))}if(t.console)for(let s of["log","warn","error","debug"]){let i=console[s];console[s]=function(...a){try{e.emit(G("console",s==="error"?"error":s==="warn"?"warn":"debug",{hook:`console.${s}`,args:a.map(sv)}))}catch{}return i.apply(console,a)},n.push(()=>{console[s]=i})}if(t.performance&&typeof PerformanceObserver<"u")try{let s=new PerformanceObserver(a=>{for(let c of a.getEntries())e.emit(G("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{}},ov=e=>({shift:!!e.shiftKey,ctrl:!!e.ctrlKey,alt:!!e.altKey,meta:!!e.metaKey}),LR=e=>{let t={name:e.name||"Error",message:typeof e.message=="string"?e.message:String(e),stack:typeof e.stack=="string"?e.stack:null};return e.cause!==void 0&&(t.cause=sv(e.cause)),t},sv=e=>{if(e==null)return e;if(e instanceof Error)return LR(e);if(typeof e=="object")try{return JSON.parse(JSON.stringify(e))}catch{return String(e)}return e};P();var MR=typeof C<"u"&&typeof C.document<"u",iv=(e,t)=>{let r=e?.analyze;if(!r||!r.shouldCapture("network"))return;let n=t.phase==="error"?"error":"info";r.emit(G("network",n,{hook:`fetch.${t.phase}`,source:"symbo-fetch",...t}))},fc=e=>{if(MR&&e.config.capture.network&&!e.__networkListeners){if(e.__networkListeners=!0,e.__teardown.push(()=>{e.__networkListeners=!1}),typeof C.fetch=="function"){let t=C.fetch.bind(C),r=function(n,o){if(o?.headers?.["X-Analyze-Beacon"]||!e.shouldCapture("network"))return t(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 e.emit(G("network","info",{hook:"fetch.start",source:"window.fetch",url:s,method:i})),t(n,o).then(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;return e.emit(G("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 e.emit(G("network","error",{hook:"fetch.error",source:"window.fetch",url:s,method:i,error:c,durationMs:l})),c})};C.fetch=r,e.__teardown.push(()=>{C.fetch=t})}if(typeof C.XMLHttpRequest=="function"){let t=C.XMLHttpRequest,r=t.prototype.open,n=t.prototype.send;t.prototype.open=function(o,s){return this.__analyze={method:String(o).toUpperCase(),url:String(s)},r.apply(this,arguments)},t.prototype.send=function(o){let s=this.__analyze;if(!s||!e.shouldCapture("network"))return n.apply(this,arguments);let i=typeof performance<"u"?performance.now():Date.now();e.emit(G("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;e.emit(G("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;e.emit(G("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)},e.__teardown.push(()=>{t.prototype.open=r,t.prototype.send=n})}}};var FR={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},NR={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},jR={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},BR={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},UR=e=>{let t={...FR,...e};return t.replay&&Object.assign(t,NR),t.telemetry&&Object.assign(t,jR),t.remote&&Object.assign(t,BR),Object.assign(t,e),t},VR=64,zR=()=>{if(typeof C>"u"||!C.location)return null;try{let t=new URLSearchParams(C.location.search).get("analyze");return t||null}catch{return null}},xu=(e={})=>{let t=e===!0?{}:{...e};t.capture=UR(t.capture||{});let r=zR();(r==="debug"||t.debug)&&(t.level="debug",t.debug=!0,t.capture={...t.capture,lifecycle:!0,state:!0,updates:!0,console:!0,network:!0}),r==="off"&&(t.enabled=!1),t.level=lc(t.level||"warn"),t.cache={max:500,dedupeWindowMs:1e3,...t.cache||{}},t.throttle={pointermove:80,mousemove:80,scroll:100,resize:200,...t.throttle||{}},t.maskFormValues==null&&(t.maskFormValues=!0),t.maskStrategy||(t.maskStrategy="mask"),Array.isArray(t.sinks)||(t.sinks=["console","memory"]),Array.isArray(t.transformers)||(t.transformers=["enrich","summarize"]);let n={config:t,context:null,__ready:!1,__paused:!1,__preBuffer:[],__teardown:[],__pipeline:null,__sinks:null,__memory:null,__initialSnapshot:null},o=()=>{n.__pipeline||(n.__pipeline=hu(n),n.__sinks=bu(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&&uu(s.level,n.config.level)){if(!n.__ready){if(s.level!=="error"&&!n.config.captureDuringHydration)return;n.__preBuffer.length<VR&&n.__preBuffer.push(s);return}o(),av(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)av(n,a)}try{_u(n)}catch(a){console.error("[analyze] browser attach error:",a)}try{fc(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=lc(s)},n.setCapture=(s,i)=>{if(n.config.capture[s]=!!i,s==="network"&&i&&n.__ready)try{fc(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},av=(e,t)=>{let r=e.__pipeline(t);if(r==null)return;let n=Array.isArray(r)?r:[r];for(let o of n){if(typeof e.config.onEvent=="function")try{e.config.onEvent(o)}catch{}for(let s of e.__sinks)try{s(o)}catch(i){console.error("[analyze] sink error:",i)}}};var wb={};I(wb,{Inspect:()=>wu,inspectPlugin:()=>xb});P();function cv(e){return w(e)?e:O(e)?e.find(t=>w(t)):""}function _b(e){if(!e)return;let t=e.__ref.__componentKey,r=e.extends&&cv(e.extends),n=e.parent&&e.parent.childExtends&&cv(e.parent.childExtends);return(t||r||n||"").split("_")[0].split(".")[0].split("+")[0]}function Su(e){if(!e||!e.__ref)return;let{components:t,pages:r,editor:n}=e.context,o=_b(e);return n&&n.onInitInspect&&!n.onInitInspect(o,e,e.state)?Su(e.parent):o&&(t[o]||r[o])?e:Su(e.parent)}var HR=(e,t,r)=>{let n=r.window||window;n.onkeydown=o=>{o.altKey&&o.shiftKey&&e.state.update({debugging:!0,preventSelect:!0},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0})},n.onkeyup=o=>{e.state.preventSelect&&(!o.altKey||!o.shiftKey)&&(e.state.replace({debugging:!1,preventSelect:!1},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0}),e.Inspector.state.update({area:!1}))}},wu={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:HR,onMousemove:(e,t,r)=>{let n=e.target.ref,o=Su(n),s=t.Inspector.state;if(!o||!r.debugging||!o.__ref)return s.update({area:!1});let i=_b(o),a=l=>{s.update({area:l,focusKey:i})},c=()=>{if(e.altKey&&e.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:(e,t,r)=>{if(!r.debugging)return;let n=e.target.ref,o=Su(n);if(!o)return;let s=_b(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),e.preventDefault(),e.stopPropagation(),!1},Inspector:{state:{},transition:"all, defaultBezier, X",position:"fixed",hide:(e,t)=>!(t.area&&t.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:e})=>{let{components:t}=e;if(k(t)){let{Content:r,...n}=t;for(let o in n)is[o]||(n[o].__ref||(n[o].__ref={}),n[o].__ref.__componentKey||(n[o].__ref.__componentKey=o))}},onBeforeUpdate:(e,t,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}}},pb={name:"inspect",beforeCreate(t,e){Array.isArray(t.extends)?t.extends.push(mu):t.extends?t.extends=[t.extends,mu]:t.extends=[mu]}};var mb={};P(mb,{apiUrl:()=>gb,channelByApiUrl:()=>OR,channelNames:()=>AR,channels:()=>te,currentChannel:()=>Yr,defaultChannel:()=>FR,deployTarget:()=>$R,isKnownChannel:()=>MR,mermaidUrl:()=>DR,normalizeOwnerSegment:()=>NR,normalizeProjectKey:()=>BR,normalizeProjectSlug:()=>jR,parseSymboLsHost:()=>UR,previewProjectUrl:()=>IR,previewUrl:()=>Xk,resolveChannel:()=>No,screenshotCdnHost:()=>Zk,screenshotCdnUrl:()=>LR,setChannel:()=>TR,shellUrl:()=>PR,socketUrl:()=>RR});var te={channels:{local:{api:"http://localhost:8080",socket:"http://localhost:8080",shell:"http://my.localhost:1355",preview:"http://preview.localhost:1355",mermaidApex:"localhost:1355",deploy:{}},development:{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.my.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},"demo-dev":{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.demo.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-demo-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},next:{api:"https://next.api.symbols.app",socket:"https://next.api.symbols.app",shell:"https://next.my.symbols.app",preview:"https://next.preview.symbols.app",mermaidApex:"next.symbo.ls",deploy:{shellBucket:"smbls-my-next",previewWorker:"smbls-preview-next",mermaidWorker:"mermaid-next"}},test:{api:"https://test.api.symbols.app",socket:"https://test.api.symbols.app",shell:"https://test.my.symbols.app",preview:"https://test.preview.symbols.app",mermaidApex:"test.symbo.ls",deploy:{shellBucket:"smbls-my-test",previewWorker:"smbls-preview-test",mermaidWorker:"mermaid-test"}},upcoming:{api:"https://upcoming.api.symbols.app",socket:"https://upcoming.api.symbols.app",shell:"https://upcoming.my.symbols.app",preview:"https://upcoming.preview.symbols.app",mermaidApex:"upcoming.symbo.ls",deploy:{shellBucket:"smbls-my-upcoming",previewWorker:"smbls-preview-upcoming",mermaidWorker:"mermaid-upcoming"}},staging:{api:"https://staging.api.symbols.app",socket:"https://staging.api.symbols.app",shell:"https://staging.my.symbols.app",preview:"https://staging.preview.symbols.app",mermaidApex:"staging.symbo.ls",deploy:{shellBucket:"smbls-my-staging",previewWorker:"smbls-preview-staging",mermaidWorker:"mermaid-staging"}},demo:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://demo.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-demo",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}},production:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://my.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-prod",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}}},defaultChannel:"production",screenshotCdn:"screenshots.api.symbols.app"};var AR=Object.keys(te.channels),gr=t=>!!(t&&te.channels[t]),No=t=>gr(t)?te.channels[t]:te.channels[te.defaultChannel],TR=t=>{typeof globalThis>"u"||(globalThis.__SYMBOLS_CHANNEL__=gr(t)?t:null,us=void 0)},us,cc=t=>typeof process<"u"&&process.env&&process.env[t]||null,Yr=()=>{if(us!==void 0)return us;let t=typeof globalThis<"u"?globalThis.__SYMBOLS_CHANNEL__:null,e=cc("SYMBOLS_CHANNEL"),r=cc("NODE_ENV");return us=gr(t)&&t||gr(e)&&e||gr(r)&&r||te.defaultChannel,us===te.defaultChannel&&!gr(t)&&!gr(e)&&!gr(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 "${te.defaultChannel}". Outbound URLs (shellUrl/apiUrl) will target production; set SYMBOLS_CHANNEL (preferred), NODE_ENV, or globalThis.__SYMBOLS_CHANNEL__ to a known channel.`),us},Kk=["production","staging","upcoming","next","test","development","local","demo","demo-dev"],Gk=t=>{let e=Kk.indexOf(t);return e===-1?Kk.length:e},OR=t=>{if(!t)return null;let e=Object.keys(te.channels).filter(r=>te.channels[r].api===t);return e.length===0?null:e.length===1?e[0]:e.sort((r,o)=>Gk(r)-Gk(o))[0]},gb=(t=Yr())=>cc("SYMBOLS_API_URL")||No(t).api,RR=(t=Yr())=>cc("SYMBOLS_SOCKET_URL")||No(t).socket,PR=(t=Yr())=>No(t).shell||null,Xk=(t=Yr())=>No(t).preview||null,IR=({owner:t,key:e,env:r="production"}={},o=Yr())=>{let n=Xk(o);if(!n||!t||!e)return null;let s=n.match(/^(https?:\/\/)(.+)$/);if(!s)return null;let[,i,a]=s,c=`${encodeURIComponent(t)}--${encodeURIComponent(e)}`,l=`${i}${c}.${a}/`;return!r||r==="production"||r==="prod"?l:`${l}?env=${encodeURIComponent(r)}`},DR=({owner:t,key:e,env:r="production"}={},o=Yr())=>{let n=No(o).mermaidApex;if(!n||!t||!e)return null;let i=!r||r==="production"||r==="prod"?"":`--${encodeURIComponent(r)}`,a=`${encodeURIComponent(t)}--${encodeURIComponent(e)}${i}`;return`${n.startsWith("localhost")?"http":"https"}://${a}.${n}`},$R=(t=Yr())=>No(t).deploy||{},Zk=()=>cc("SYMBOLS_SCREENSHOT_CDN")||te.screenshotCdn,LR=({owner:t,key:e,page:r="root",componentKey:o,env:n="production",width:s}={})=>{if(!t||!e)return null;let i=o?`component/${encodeURIComponent(o)}`:encodeURIComponent(String(r||"root").replace(/^\/+/,"").replace(/\//g,"-")||"root"),a=[];n&&n!=="production"&&a.push(`env=${encodeURIComponent(n)}`),s&&a.push(`w=${Number(s)}`);let c=a.length?`?${a.join("&")}`:"";return`https://${Zk()}/${encodeURIComponent(t)}/${encodeURIComponent(e)}/${i}.webp${c}`},MR=gr,FR=te.defaultChannel,NR=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"",jR=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"",BR=(t,e={})=>{let r=String(t||"").trim();if(!r)return"";/\.symbo\.ls$/iu.test(r)&&(r=r.replace(/\.symbo\.ls$/iu,"")),r.includes("/")&&(r=r.split("/").pop());let o=typeof e.owner=="string"?e.owner.trim():"";return o&&r.startsWith(`${o}--`)?r=r.slice(o.length+2):!o&&r.includes("--")&&(r=r.slice(r.indexOf("--")+2)),r},Yk={at:"production",prod:"production",production:"production",dev:"development",development:"development",next:"next",upcoming:"upcoming",test:"test",staging:"staging"},UR=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=Yk[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?Yk[u]||u:null;return{projectKey:f,owner:l,env:d||a,sysEnv:a}}}}}if(r.length>=5)return{projectKey:r[1],owner:r[2],env:r[0]};let o=r[1],n=r[0];if(n.includes("--")){let[s,i]=n.split("--",2);return!s||!i?null:{projectKey:s,owner:o,env:i}}return{projectKey:n,owner:o,env:"production"}};var _b={};P(_b,{BUILD_DOMQL_SYSTEM_PROMPT:()=>fv,DEFAULT_MAX_TOKENS:()=>vu,DEFAULT_MODEL:()=>Xr,DEFAULT_PROVIDER:()=>Su,DEFAULT_TEMPERATURE:()=>ku,MODEL_TIER_ALIASES:()=>bb,PROVIDER_MODELS:()=>Qk,SIMONE_BASE_URL:()=>lc,SIMONE_CHAT_PATH:()=>bu,SIMONE_CODE_PATH:()=>_u,SIMONE_CODE_SYMBOLS_PATH:()=>xu,SIMONE_HEALTH_PATH:()=>wu,SIMONE_TOOLS_PATH:()=>Jk,WORKSPACE_SYSTEM_PROMPT:()=>lv,buildMessages:()=>nv,chat:()=>fc,health:()=>ov,parseSimoneResponse:()=>av,resolveModel:()=>uv,streamChat:()=>fc,streamCode:()=>ev,streamCodeSymbols:()=>rv,toLegacyEnvelope:()=>cv});var lc="https://symbols-service-production.up.railway.app",bu="/api/chat",_u="/api/code",xu="/api/code-symbols",wu="/api/health",Jk="/api/tools",Su="openai-compatible",Xr="claude-sonnet-4-6",ku=.7,vu=4096,Qk={"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 tv(t,e){return t?t.replace(/\/$/,"")+e:e}function VR(t){if(!t.startsWith("data: "))return null;let e=t.slice(6);if(e==="[DONE]")return{done:!0};try{return{chunk:JSON.parse(e)}}catch{return{raw:e}}}async function fc(t,e={},r){let{baseUrl:o=lc,path:n=bu,provider:s=Su,model:i=Xr,temperature:a=.7,maxTokens:c=4096,effort:l,apiKeys:f,signal:u,headers:d}=e;if(!Array.isArray(t)||t.length===0)throw new TypeError("simone: messages must be a non-empty array");let h={messages:t,provider:s,model:i,temperature:a,maxTokens:c};l&&(h.effort=l),f&&(h.apiKeys=f);let g=await fetch(tv(o,n),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...d},body:JSON.stringify(h),signal:u});if(!g.ok){let x=g.statusText;try{let E=await g.text();try{let O=JSON.parse(E);x=O.error||O.detail||x}catch{x=E||x}}catch{}let k=new Error(`simone: HTTP ${g.status} \u2014 ${x}`);throw k.status=g.status,k}if(!g.body||typeof g.body.getReader!="function"){let x=await g.text();return r&&r(x),{text:x,errors:[]}}let p=g.body.getReader(),m=new TextDecoder,b=[],_=[],y="";try{for(;;){let{done:x,value:k}=await p.read();if(x)break;y+=m.decode(k,{stream:!0});let E=y.indexOf(`
96
- `);for(;E!==-1;){let O=y.slice(0,E).trim();if(y=y.slice(E+1),O){let $=VR(O);if($?.done)return{text:b.join(""),errors:_};let I=$?.chunk;I?.delta&&(b.push(I.delta),r&&r(I.delta)),I?.error&&_.push(I.error)}E=y.indexOf(`
97
- `)}}return{text:b.join(""),errors:_}}finally{p.cancel().catch(()=>{})}}function ev(t,e={},r){return fc(t,{...e,path:_u},r)}function rv(t,e={},r){return fc(t,{...e,path:xu},r)}async function ov(t={}){let{baseUrl:e=lc,signal:r,headers:o}=t,n=await fetch(tv(e,wu),{method:"GET",headers:o,signal:r});if(!n.ok)throw new Error(`simone health: HTTP ${n.status}`);return n.json()}function nv({system:t,history:e=[],user:r,context:o}){let n=[];t&&n.push({role:"system",content:t});for(let s of e)!s||!s.role||typeof s.content!="string"||!s.content||n.push({role:s.role,content:s.content});if(r){let s=r;if(o!=null){let i=typeof o=="string"?o:JSON.stringify(o,null,2);s=`${s}
95
+ `}return t.node.style=s,t.Span.node.innerText=r.focusKey,!1}}},xb={name:"inspect",beforeCreate(e,t){Array.isArray(e.extends)?e.extends.push(wu):e.extends?e.extends=[e.extends,wu]:e.extends=[wu]}};var kb={};I(kb,{apiUrl:()=>Sb,channelByApiUrl:()=>GR,channelNames:()=>qR,channels:()=>et,currentChannel:()=>Jr,defaultChannel:()=>rP,deployTarget:()=>QR,isKnownChannel:()=>tP,mermaidUrl:()=>JR,normalizeOwnerSegment:()=>nP,normalizeProjectKey:()=>sP,normalizeProjectSlug:()=>oP,parseSymboLsHost:()=>iP,previewProjectUrl:()=>ZR,previewUrl:()=>dv,resolveChannel:()=>Bn,screenshotCdnHost:()=>pv,screenshotCdnUrl:()=>eP,setChannel:()=>KR,shellUrl:()=>XR,socketUrl:()=>YR});var et={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 qR=Object.keys(et.channels),yr=e=>!!(e&&et.channels[e]),Bn=e=>yr(e)?et.channels[e]:et.channels[et.defaultChannel],KR=e=>{typeof globalThis>"u"||(globalThis.__SYMBOLS_CHANNEL__=yr(e)?e:null,bs=void 0)},bs,uc=e=>typeof process<"u"&&process.env&&process.env[e]||null,Jr=()=>{if(bs!==void 0)return bs;let e=typeof globalThis<"u"?globalThis.__SYMBOLS_CHANNEL__:null,t=uc("SYMBOLS_CHANNEL"),r=uc("NODE_ENV");return bs=yr(e)&&e||yr(t)&&t||yr(r)&&r||et.defaultChannel,bs===et.defaultChannel&&!yr(e)&&!yr(t)&&!yr(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 "${et.defaultChannel}". Outbound URLs (shellUrl/apiUrl) will target production; set SYMBOLS_CHANNEL (preferred), NODE_ENV, or globalThis.__SYMBOLS_CHANNEL__ to a known channel.`),bs},lv=["production","staging","upcoming","next","test","development","local","demo","demo-dev"],fv=e=>{let t=lv.indexOf(e);return t===-1?lv.length:t},GR=e=>{if(!e)return null;let t=Object.keys(et.channels).filter(r=>et.channels[r].api===e);return t.length===0?null:t.length===1?t[0]:t.sort((r,n)=>fv(r)-fv(n))[0]},Sb=(e=Jr())=>uc("SYMBOLS_API_URL")||Bn(e).api,YR=(e=Jr())=>uc("SYMBOLS_SOCKET_URL")||Bn(e).socket,XR=(e=Jr())=>Bn(e).shell||null,dv=(e=Jr())=>Bn(e).preview||null,ZR=({owner:e,key:t,env:r="production"}={},n=Jr())=>{let o=dv(n);if(!o||!e||!t)return null;let s=o.match(/^(https?:\/\/)(.+)$/);if(!s)return null;let[,i,a]=s,c=`${encodeURIComponent(e)}--${encodeURIComponent(t)}`,l=`${i}${c}.${a}/`;return!r||r==="production"||r==="prod"?l:`${l}?env=${encodeURIComponent(r)}`},JR=({owner:e,key:t,env:r="production"}={},n=Jr())=>{let o=Bn(n).mermaidApex;if(!o||!e||!t)return null;let i=!r||r==="production"||r==="prod"?"":`--${encodeURIComponent(r)}`,a=`${encodeURIComponent(e)}--${encodeURIComponent(t)}${i}`;return`${o.startsWith("localhost")?"http":"https"}://${a}.${o}`},QR=(e=Jr())=>Bn(e).deploy||{},pv=()=>uc("SYMBOLS_SCREENSHOT_CDN")||et.screenshotCdn,eP=({owner:e,key:t,page:r="root",componentKey:n,env:o="production",width:s}={})=>{if(!e||!t)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://${pv()}/${encodeURIComponent(e)}/${encodeURIComponent(t)}/${i}.webp${c}`},tP=yr,rP=et.defaultChannel,nP=e=>e==null||typeof e!="string"?"":String(e).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"",oP=e=>e==null||typeof e!="string"?"":String(e).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"",sP=(e,t={})=>{let r=String(e||"").trim();if(!r)return"";/\.symbo\.ls$/iu.test(r)&&(r=r.replace(/\.symbo\.ls$/iu,"")),r.includes("/")&&(r=r.split("/").pop());let n=typeof t.owner=="string"?t.owner.trim():"";return n&&r.startsWith(`${n}--`)?r=r.slice(n.length+2):!n&&r.includes("--")&&(r=r.slice(r.indexOf("--")+2)),r},uv={at:"production",prod:"production",production:"production",dev:"development",development:"development",next:"next",upcoming:"upcoming",test:"test",staging:"staging"},iP=e=>{if(typeof e!="string"||!e)return null;let t=e.toLowerCase().replace(/^www\./,"").replace(/\/$/,"");if(!t.endsWith(".symbo.ls"))return null;let r=t.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=uv[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?uv[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 Eb={};I(Eb,{BUILD_DOMQL_SYSTEM_PROMPT:()=>Ev,DEFAULT_MAX_TOKENS:()=>Ou,DEFAULT_MODEL:()=>Qr,DEFAULT_PROVIDER:()=>Au,DEFAULT_TEMPERATURE:()=>Tu,MODEL_TIER_ALIASES:()=>Cb,PROVIDER_MODELS:()=>gv,SIMONE_BASE_URL:()=>dc,SIMONE_CHAT_PATH:()=>ku,SIMONE_CODE_PATH:()=>vu,SIMONE_CODE_SYMBOLS_PATH:()=>Cu,SIMONE_HEALTH_PATH:()=>Eu,SIMONE_TOOLS_PATH:()=>hv,WORKSPACE_SYSTEM_PROMPT:()=>Cv,buildMessages:()=>xv,chat:()=>pc,health:()=>_v,parseSimoneResponse:()=>kv,resolveModel:()=>Av,streamChat:()=>pc,streamCode:()=>yv,streamCodeSymbols:()=>bv,toLegacyEnvelope:()=>vv});var dc="https://symbols-service-production.up.railway.app",ku="/api/chat",vu="/api/code",Cu="/api/code-symbols",Eu="/api/health",hv="/api/tools",Au="openai-compatible",Qr="claude-sonnet-4-6",Tu=.7,Ou=4096,gv={"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 mv(e,t){return e?e.replace(/\/$/,"")+t:t}function aP(e){if(!e.startsWith("data: "))return null;let t=e.slice(6);if(t==="[DONE]")return{done:!0};try{return{chunk:JSON.parse(t)}}catch{return{raw:t}}}async function pc(e,t={},r){let{baseUrl:n=dc,path:o=ku,provider:s=Au,model:i=Qr,temperature:a=.7,maxTokens:c=4096,effort:l,apiKeys:f,signal:u,headers:d}=t;if(!Array.isArray(e)||e.length===0)throw new TypeError("simone: messages must be a non-empty array");let p={messages:e,provider:s,model:i,temperature:a,maxTokens:c};l&&(p.effort=l),f&&(p.apiKeys=f);let g=await fetch(mv(n,o),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...d},body:JSON.stringify(p),signal:u});if(!g.ok){let x=g.statusText;try{let v=await g.text();try{let D=JSON.parse(v);x=D.error||D.detail||x}catch{x=v||x}}catch{}let S=new Error(`simone: HTTP ${g.status} \u2014 ${x}`);throw S.status=g.status,S}if(!g.body||typeof g.body.getReader!="function"){let x=await g.text();return r&&r(x),{text:x,errors:[]}}let h=g.body.getReader(),m=new TextDecoder,_=[],b=[],y="";try{for(;;){let{done:x,value:S}=await h.read();if(x)break;y+=m.decode(S,{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=aP(D);if(L?.done)return{text:_.join(""),errors:b};let T=L?.chunk;T?.delta&&(_.push(T.delta),r&&r(T.delta)),T?.error&&b.push(T.error)}v=y.indexOf(`
97
+ `)}}return{text:_.join(""),errors:b}}finally{h.cancel().catch(()=>{})}}function yv(e,t={},r){return pc(e,{...t,path:vu},r)}function bv(e,t={},r){return pc(e,{...t,path:Cu},r)}async function _v(e={}){let{baseUrl:t=dc,signal:r,headers:n}=e,o=await fetch(mv(t,Eu),{method:"GET",headers:n,signal:r});if(!o.ok)throw new Error(`simone health: HTTP ${o.status}`);return o.json()}function xv({system:e,history:t=[],user:r,context:n}){let o=[];e&&o.push({role:"system",content:e});for(let s of t)!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
- \`\`\``}n.push({role:"user",content:s})}return n}var iv=/```(?<lang>[a-zA-Z0-9_+-]*)\n(?<code>[\s\S]*?)```/g,zR=new Set(["component","components","page","pages","function","method","state","theme","color","font","icon"]);function HR(t){let e=[];for(let r of t.matchAll(iv))e.push({lang:(r.groups?.lang||"").toLowerCase(),code:r.groups?.code??""});return e}function WR(t){return t.replace(iv,"").trim()}function yb(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 sv(t){return!!t&&typeof t=="object"&&typeof t.type=="string"&&zR.has(t.type)}function av(t){let e=(typeof t=="string"?t:"").trim();if(!e)return{kind:"text",text:"",message:""};let r=HR(e),o=r.filter(i=>/^(js|javascript|ts|typescript|jsx|tsx)$/.test(i.lang)),n=r.filter(i=>i.lang==="json"),s=WR(e);for(let i of n){let a=yb(i.code);if(sv(a))return{kind:"asset",text:s||a.description||"",asset:a,message:a.description||s||`Generated ${a.type}: ${a.title||a.key||""}`.trim()}}if(o.length>0){let i=o[0].code,a=yb("["+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=yb(e);if(sv(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 cv(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 lv=["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(" "),fv=["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
- `),bb={Starter:Xr,Free:Xr,Pro:"claude-opus-4-6"};function uv(t){return t?bb[t]||t:Xr}var dv={"@symbo.ls/signal":Cd,"@symbo.ls/scratch":Hg,"@symbo.ls/element":Km,"@symbo.ls/css":Qg,"@symbo.ls/utils":$l,"@symbo.ls/state":$m,"@symbo.ls/router":Ha,"@symbo.ls/polyglot":Hy,"@symbo.ls/helmet":Vy,"@symbo.ls/fetch":uo,"@symbo.ls/capsize":qy,"@symbo.ls/shorthand":Qy,"@symbo.ls/analyze":ub,"@symbo.ls/inspect":hb,"@symbo.ls/channels":mb,"@symbo-ls/simone-server":_b},pv=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:{}),o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in dv)o[n]||(o[n]=dv[n]);if(e)for(let n in e)o[n]||(o[n]=e[n]);return o},hv=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:null);if(!r||!e||typeof e!="object")return null;let o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in e){let s=e[n];if(typeof s!="function"||Object.prototype.hasOwnProperty.call(o,n))continue;let i=a=>(Object.defineProperty(o,n,{configurable:!0,enumerable:!0,writable:!0,value:a}),a);Object.defineProperty(o,n,{configurable:!0,enumerable:!0,get:()=>i(s()),set:i})}return o},gv=["@symbo.ls/sdk"],mv=(t,e)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r||!t||typeof t!="object")return null;let o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in t){let s=t[n];!s||typeof s!="object"&&typeof s!="function"||o[n]||(o[n]=s)}return o},qR=/^@symbo[-.]ls\//,KR=t=>t.includes("/")?t.slice(t.indexOf("/")+1):t,yv=(t,e)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r||!Array.isArray(t))return null;let o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n of t){let s=n&&n.library?n.library:n;if(!s||typeof s!="object"||s.__isStub)continue;let i=s.key||s.name||s.__libraryKey,a=[];for(let c of[s.key,s.name,s.__libraryKey,s.__libraryName]){if(typeof c!="string"||!c||c!==i&&!qR.test(c))continue;let l=KR(c);l&&!a.includes(l)&&a.push(l)}for(let c of a)for(let l of[`@symbo-ls/${c}`,`@symbo.ls/${c}`])o[l]||(o[l]=s)}return o};R();var xv=t=>{let e=typeof window<"u"?window:globalThis||{};e.document||(e.document={body:{}});let r=typeof document<"u"?document:e.document;t.document=t.document||r;let o=t.window;return o&&o!==e&&typeof o.URL!="function"?(typeof console<"u"&&console.warn&&!globalThis.__smblsRouterUrlWarned&&(globalThis.__smblsRouterUrlWarned=!0,console.warn("[smbls/router] context.window lacks URL, falling back to globalThis \u2014 passed-in window may be a stub (warned once; applies to every embed app this session)")),t.window=e):t.window=o||e,t.window},bv=(t="smbls")=>{let e={};for(let r in Po)Object.prototype.hasOwnProperty.call(Po,r)&&(ze(r)?e[`smbls.${r}`]=Po[r]:e[r]=Po[r]);return e},wv=t=>t.components?{...bv(),...t.components}:bv(),Sv=t=>({...qa,...Ha,...Ir,...t.utils,...t.snippets,...t.functions}),kv=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var GR=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,YR=3e3,XR=(t,e,r=o=>import(o))=>{if(typeof globalThis>"u")return Promise.resolve(null);try{let o=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});if(o[t])return Promise.resolve(o[t]);let n=Promise.resolve().then(()=>r(e)).then(i=>(i&&!o[t]&&(o[t]=i),o[t]||null)).catch(()=>null);return new Promise(i=>{let a=setTimeout(()=>i(null),YR);n.then(c=>{clearTimeout(a),i(c)})})}catch{return Promise.resolve(null)}},_v={},vv=async({dependencies:t,dependenciesOnDemand:e,document:r,preventCaching:o=!1,cdnProvider:n,packageManager:s,symbolsConfig:i,registerDependency:a=XR})=>{if(n||(n=Or[s]||dn(i)||"esmsh"),!t)return null;if(!hn(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=vr()&&o?`?${Math.random()}`:"",f=async(d,h)=>{let g=Ae(d,h,n)+l;try{await Promise.race([gn(g,{document:r,type:"module"}),new Promise((p,m)=>setTimeout(()=>m(new Error(`Timeout loading ${d}`)),1e4))]),await a(d,g)}catch(p){if(console.error(`Failed to load ${d} from ${n}:`,p),n!=="symbols")try{let m=Ae(d,h,"symbols")+l;await Promise.race([gn(m,{document:r,type:"module"}),new Promise((b,_)=>setTimeout(()=>_(new Error(`Timeout fallback ${d}`)),2e4))]),console.log(`Successfully loaded ${d} from fallback (symbols.ls)`),await a(d,m)}catch(m){console.error(`Failed to load ${d} from fallback:`,m)}}},u=[];for(let d in t){let h=t[d];if(!(e&&e[d])&&!_v[d]&&(_v[d]=!0,!ho(d))){if(pn(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}GR(d)||u.push(f(d,h))}}return u.length&&await Promise.allSettled(u),t},Cv=async(t,e)=>{let r=e.window||window,o=e.cdnProvider||dn(e.symbolsConfig)||"esmsh",n=async i=>async(a,c)=>{let f=(i.window||window).packages[a];return typeof f=="function"?f():f},s=async i=>async(a,c=o)=>{let{dependenciesOnDemand:l}=i,f=i.document||document,u=i.window||window;if(!u.packages[a]&&ho(a))return await u.require(a,c);if(!u.packages[a]){let d=vr()?`?${Math.random()}`:"";if(l&&l[a]){let h=l[a],g=Ae(a,h,c)+d;try{await i.utils.loadRemoteScript(g,{window:u,document:f})}catch(p){if(console.error(`Failed to load ${a} from ${c}:`,p),c!=="symbols"){let m=Ae(a,h,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let h=Ae(a,"latest",c)+d;try{await i.utils.loadRemoteScript(h,{window:u,document:f})}catch(g){if(console.error(`Failed to load ${a} from ${c}:`,g),c!=="symbols"){let p=Ae(a,"latest","symbols")+d;await i.utils.loadRemoteScript(p,{window:u,document:f})}}u.packages[a]="loadedOnDeman"}}return await u.require(a,c)};r.packages?r.packages=ht(r.packages,t):r.packages=t,r.require||(e.utils.require=await n(e),r.require=e.utils.require),r.requireOnDemand||(e.utils.requireOnDemand=await s(e),r.requireOnDemand=e.utils.requireOnDemand)},ZR=/\s+/g,Ev=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,JR=(t,e)=>{let r="";for(let o in t){let n=t[o];typeof n=="boolean"&&n?r+=` ${o}`:typeof n=="string"?r+=` ${n}`:typeof n=="function"&&(r+=` ${Ev(n,e)}`)}return r},QR=(t,e,r)=>{if(!t)return;let{key:o}=e;t===!0&&(t=e.classlist={key:o}),typeof t=="string"&&(t=e.classlist={default:t}),t!==null&&typeof t=="object"&&!Array.isArray(t)&&(t=JR(t,e));let n=t.replace(ZR," ").trim();if(r&&typeof r.setAttribute=="function")r.setAttribute("class",n);else if(r)try{r.className=n}catch{}return n},tP=()=>(t,e,r)=>{let o=Ev(t,e);if(t){let{__ref:n}=e;n.__class.style=o}Av()(e.classlist,e,e.state,!0)},Av=()=>(t,e,r,o)=>{if(e.style&&!o)return;let{__ref:n}=e,{__class:s,__classNames:i}=n;if(!(t===null||typeof t!="object"||Array.isArray(t))){e.class&&(i.classProps=e.class),e.attr?.class&&(i.class=e.attr.class);for(let a in s){let c=s[a];if(!c){delete i[a];continue}let l;typeof c=="string"||typeof c=="number"?l=c:typeof c=="boolean"?l=e.key:l=we(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];e.node&&QR(i,e,e.node)}},eP=()=>({style:tP(),classlist:Av()}),rP=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],xb=new WeakSet,wb=!1,oP=t=>!!t&&typeof t=="object",Tv=(t,e)=>{let r=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,o=e.initOptions||{},n=e.registry||eP(),s=e.designSystem?st(lt(e.designSystem),lt(Va),ne):lt(Va),i={};for(let p of rP)e[p]!==void 0&&(i[p]=e[p]);let a,c=oP(r),f=c&&xb.has(r)&&!e.skipDesignSystemInit,u=!f&&!wb,d=f?`[data-smbls-app="${t}"]`:":root";if(e.scopeSelector=d,e.skipDesignSystemInit){if(a=C(t)||C(),a&&(a.__domDocument=r),a?.CSS_VARS){it(a);try{St({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&St(es(a.CSS_MEDIA_VARS,d))}finally{et()}}}else if(u){let p=C();p&&(p.__domDocument=r),a=hr(s,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...tu,...i,...o}),a&&a!==p&&(a.__domDocument=r),c&&xb.add(r),wb=!0}else{let p=ra(t,s,{cleanBase:!0});for(let m in i)p[m]=i[m];if(p.__domDocument=r,f){let m=t.replace(/[^a-zA-Z0-9]/g,"").substring(0,6);e.cssPrefix=m,p.varPrefix=m}it(p);try{a=hr(p,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...tu,...i,...o})}finally{et()}c&&xb.add(r),wb=!0}let h=a?.CONFIG||a,g=h?.font;if(g){it(h);try{for(let p in g){let m=g[p];if(!m?.fontFace)continue;let b=Array.isArray(m.fontFace)?m.fontFace:[m.fontFace];for(let _ of b)typeof _=="string"&&_.includes("font-family")&&St(`@font-face { ${_} }`)}}finally{et()}}return[a,n]},Ov=(t,e)=>{let r={};e.state&&st(r,e.state),t&&t.state&&st(r,t.state);let o=e.polyglot;if(o?.translations){let n=null;try{typeof localStorage<"u"&&(n=localStorage.getItem(o.storageLangKey||"smbls_lang")||localStorage.getItem("lang"))}catch{}let s=n||r.lang||o.defaultLang||"en";n&&n!==r.lang&&(r.lang=n);let i=new Set,a=new Set,c=(u,d)=>{if(!a.has(u)){if(!sr(e,u,r)){i.add(u);return}r[u]=d,a.add(u),He(e,u)}},l=o.translations[s];if(l&&typeof l=="object")for(let u in l)c(u,l[u]);let f=new Set(o.languages||[]);for(let u in o.translations)f.has(u)||c(u,o.translations[u]);i.size&&o.verbose!==!1&&e.verbose!==!1&&console.warn(`[polyglot] ${i.size} translation key${i.size===1?"":"s"} collide${i.size===1?"s":""} with a declared root-state key (${[...i].join(", ")}) \u2014 the declared value wins and the translation is NOT seeded into state. Rename the translation key, or read it with \`{{ key | polyglot }}\` instead of a bare \`{{ key }}\`.`)}return r.isRootState=!0,lt(r)},Rv=(t,e)=>{S(t.routes)&&S(e.pages)&&ht(t.routes,e.pages);let r=t.routes||e.pages||{},o=[];for(let n in r){if(n.charCodeAt(0)===47)continue;let i="/"+(n==="index"?"":n);Object.prototype.hasOwnProperty.call(r,i)?o.push(`${n} -> ${i}`):r[i]=r[n],delete r[n]}return o.length&&e&&e.verbose!==!1&&console.warn(`[smbls] preparePages kept ${o.length} explicitly declared route${o.length===1?"":"s"} over a same-named page key (${o.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},Pv=t=>{Vi(t,t.sharedLibraries)};var uc={polyglot:Za,getLocalStateLang:ec,getActiveLang:Kr,getLang:Kr,setLang:Qa,getLanguages:Xa,loadTranslations:Ja,upsertTranslation:tc};Ar();var Me=Object.create(null);Me.open="0";Me.close="1";Me.ping="2";Me.pong="3";Me.message="4";Me.upgrade="5";Me.noop="6";var dc=Object.create(null);Object.keys(Me).forEach(t=>{dc[Me[t]]=t});var pc={type:"error",data:"parser error"};var $v=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Lv=typeof ArrayBuffer=="function",Mv=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,hc=({type:t,data:e},r,o)=>$v&&e instanceof Blob?r?o(e):Iv(e,o):Lv&&(e instanceof ArrayBuffer||Mv(e))?r?o(e):Iv(new Blob([e]),o):o(Me[t]+(e||"")),Iv=(t,e)=>{let r=new FileReader;return r.onload=function(){let o=r.result.split(",")[1];e("b"+(o||""))},r.readAsDataURL(t)};function Dv(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var Sb;function Fv(t,e){if($v&&t.data instanceof Blob)return t.data.arrayBuffer().then(Dv).then(e);if(Lv&&(t.data instanceof ArrayBuffer||Mv(t.data)))return e(Dv(t.data));hc(t,!1,r=>{Sb||(Sb=new TextEncoder),e(Sb.encode(r))})}var Nv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Nv.length;t++)gc[Nv.charCodeAt(t)]=t;var jv=t=>{let e=t.length*.75,r=t.length,o,n=0,s,i,a,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);let l=new ArrayBuffer(e),f=new Uint8Array(l);for(o=0;o<r;o+=4)s=gc[t.charCodeAt(o)],i=gc[t.charCodeAt(o+1)],a=gc[t.charCodeAt(o+2)],c=gc[t.charCodeAt(o+3)],f[n++]=s<<2|i>>4,f[n++]=(i&15)<<4|a>>2,f[n++]=(a&3)<<6|c&63;return l};var nP=typeof ArrayBuffer=="function",mc=(t,e)=>{if(typeof t!="string")return{type:"message",data:Bv(t,e)};let r=t.charAt(0);return r==="b"?{type:"message",data:sP(t.substring(1),e)}:dc[r]?t.length>1?{type:dc[r],data:t.substring(1)}:{type:dc[r]}:pc},sP=(t,e)=>{if(nP){let r=jv(t);return Bv(r,e)}else return{base64:!0,data:t}},Bv=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer;var Uv="",Vv=(t,e)=>{let r=t.length,o=new Array(r),n=0;t.forEach((s,i)=>{hc(s,!1,a=>{o[i]=a,++n===r&&e(o.join(Uv))})})},zv=(t,e)=>{let r=t.split(Uv),o=[];for(let n=0;n<r.length;n++){let s=mc(r[n],e);if(o.push(s),s.type==="error")break}return o};function Hv(){return new TransformStream({transform(t,e){Fv(t,r=>{let o=r.length,n;if(o<126)n=new Uint8Array(1),new DataView(n.buffer).setUint8(0,o);else if(o<65536){n=new Uint8Array(3);let s=new DataView(n.buffer);s.setUint8(0,126),s.setUint16(1,o)}else{n=new Uint8Array(9);let s=new DataView(n.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(o))}t.data&&typeof t.data!="string"&&(n[0]|=128),e.enqueue(n),e.enqueue(r)})}})}var kb;function Cu(t){return t.reduce((e,r)=>e+r.length,0)}function Eu(t,e){if(t[0].length===e)return t.shift();let r=new Uint8Array(e),o=0;for(let n=0;n<e;n++)r[n]=t[0][o++],o===t[0].length&&(t.shift(),o=0);return t.length&&o<t[0].length&&(t[0]=t[0].slice(o)),r}function Wv(t,e){kb||(kb=new TextDecoder);let r=[],o=0,n=-1,s=!1;return new TransformStream({transform(i,a){for(r.push(i);;){if(o===0){if(Cu(r)<1)break;let c=Eu(r,1);s=(c[0]&128)===128,n=c[0]&127,n<126?o=3:n===126?o=1:o=2}else if(o===1){if(Cu(r)<2)break;let c=Eu(r,2);n=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),o=3}else if(o===2){if(Cu(r)<8)break;let c=Eu(r,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(pc);break}n=f*Math.pow(2,32)+l.getUint32(4),o=3}else{if(Cu(r)<n)break;let c=Eu(r,n);a.enqueue(mc(s?c:kb.decode(c),e)),o=0}if(n===0||n>t){a.enqueue(pc);break}}}})}var vb=4;function ut(t){if(t)return iP(t)}function iP(t){for(var e in ut.prototype)t[e]=ut.prototype[e];return t}ut.prototype.on=ut.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};ut.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};ut.prototype.off=ut.prototype.removeListener=ut.prototype.removeAllListeners=ut.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var o,n=0;n<r.length;n++)if(o=r[n],o===e||o.fn===e){r.splice(n,1);break}return r.length===0&&delete this._callbacks["$"+t],this};ut.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],o=1;o<arguments.length;o++)e[o-1]=arguments[o];if(r){r=r.slice(0);for(var o=0,n=r.length;o<n;++o)r[o].apply(this,e)}return this};ut.prototype.emitReserved=ut.prototype.emit;ut.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};ut.prototype.hasListeners=function(t){return!!this.listeners(t).length};var mr=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),Ut=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),qv="arraybuffer";function Au(t,...e){return e.reduce((r,o)=>(t.hasOwnProperty(o)&&(r[o]=t[o]),r),{})}var aP=Ut.setTimeout,cP=Ut.clearTimeout;function yr(t,e){e.useNativeTimers?(t.setTimeoutFn=aP.bind(Ut),t.clearTimeoutFn=cP.bind(Ut)):(t.setTimeoutFn=Ut.setTimeout.bind(Ut),t.clearTimeoutFn=Ut.clearTimeout.bind(Ut))}var lP=1.33;function Kv(t){return typeof t=="string"?fP(t):Math.ceil((t.byteLength||t.size)*lP)}function fP(t){let e=0,r=0;for(let o=0,n=t.length;o<n;o++)e=t.charCodeAt(o),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(o++,r+=4);return r}function Tu(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Gv(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function Yv(t){let e={},r=t.split("&");for(let o=0,n=r.length;o<n;o++){let s=r[o].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}var Ou=class extends Error{constructor(e,r,o){super(e),this.description=r,this.context=o,this.type="TransportError"}},br=class extends ut{constructor(e){super(),this.writable=!1,yr(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,r,o){return super.emitReserved("error",new Ou(e,r,o)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let r=mc(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=Gv(e);return r.length?"?"+r:""}};var yc=class extends br{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let r=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||r()})),this.writable||(o++,this.once("drain",function(){--o||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let r=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};zv(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,Vv(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]=Tu()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}};var Xv=!1;try{Xv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var Zv=Xv;function uP(){}var Cb=class extends yc{constructor(e){if(super(e),typeof location<"u"){let r=location.protocol==="https:",o=location.port;o||(o=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||o!==e.port}}doWrite(e,r){let o=this.request({method:"POST",data:e});o.on("success",r),o.on("error",(n,s)=>{this.onError("xhr post error",n,s)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,o)=>{this.onError("xhr poll error",r,o)}),this.pollXhr=e}},Zr=class t extends ut{constructor(e,r,o){super(),this.createRequest=e,yr(this,o),this._opts=o,this._method=o.method||"GET",this._uri=r,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var e;let r=Au(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;let o=this._xhr=this.createRequest(r);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let n in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(n)&&o.setRequestHeader(n,this._opts.extraHeaders[n])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var n;o.readyState===3&&((n=this._opts.cookieJar)===null||n===void 0||n.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(n){this.setTimeoutFn(()=>{this._onError(n)},0);return}typeof document<"u"&&(this._index=t.requestsCount++,t.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=uP,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()}};Zr.requestsCount=0;Zr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Jv);else if(typeof addEventListener=="function"){let t="onpagehide"in Ut?"pagehide":"unload";addEventListener(t,Jv,!1)}}function Jv(){for(let t in Zr.requests)Zr.requests.hasOwnProperty(t)&&Zr.requests[t].abort()}var dP=(function(){let t=Qv({xdomain:!1});return t&&t.responseType!==null})(),Jr=class extends Cb{constructor(e){super(e);let r=e&&e.forceBase64;this.supportsBinary=dP&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Zr(Qv,this.uri(),e)}};function Qv(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Zv))return new XMLHttpRequest}catch{}if(!e)try{return new Ut[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var tC=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",Ab=class extends br{get name(){return"websocket"}doOpen(){let e=this.uri(),r=this.opts.protocols,o=tC?{}:Au(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,o)}catch(n){return this.emitReserved("error",n)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let r=0;r<e.length;r++){let o=e[r],n=r===e.length-1;hc(o,this.supportsBinary,s=>{try{this.doWrite(o,s)}catch{}n&&mr(()=>{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]=Tu()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}},Eb=Ut.WebSocket||Ut.MozWebSocket,Qr=class extends Ab{createSocket(e,r,o){return tC?new Eb(e,r,o):r?new Eb(e,r):new Eb(e)}doWrite(e,r){this.ws.send(r)}};var ds=class extends br{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=Wv(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=e.readable.pipeThrough(r).getReader(),n=Hv();n.readable.pipeTo(e.writable),this._writer=n.writable.getWriter();let s=()=>{o.read().then(({done:a,value:c})=>{a||(this.onPacket(c),s())}).catch(a=>{})};s();let i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let r=0;r<e.length;r++){let o=e[r],n=r===e.length-1;this._writer.write(o).then(()=>{n&&mr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var Tb={websocket:Qr,webtransport:ds,polling:Jr};var pP=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,hP=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ps(t){if(t.length>8e3)throw"URI too long";let e=t,r=t.indexOf("["),o=t.indexOf("]");r!=-1&&o!=-1&&(t=t.substring(0,r)+t.substring(r,o).replace(/:/g,";")+t.substring(o,t.length));let n=pP.exec(t||""),s={},i=14;for(;i--;)s[hP[i]]=n[i]||"";return r!=-1&&o!=-1&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=gP(s,s.path),s.queryKey=mP(s,s.query),s}function gP(t,e){let r=/\/{2,9}/g,o=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&o.splice(0,1),e.slice(-1)=="/"&&o.splice(o.length-1,1),o}function mP(t,e){let r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,n,s){n&&(r[n]=s)}),r}var Ob=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ru=[];Ob&&addEventListener("offline",()=>{Ru.forEach(t=>t())},!1);var jo=class t extends ut{constructor(e,r){if(super(),this.binaryType=qv,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(r=e,e=null),e){let o=ps(e);r.hostname=o.host,r.secure=o.protocol==="https"||o.protocol==="wss",r.port=o.port,o.query&&(r.query=o.query)}else r.host&&(r.hostname=ps(r.host).host);yr(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(o=>{let n=o.prototype.name;this.transports.push(n),this._transportsByName[n]=o}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Yv(this.opts.query)),Ob&&(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"})},Ru.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 o=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let e=this.opts.rememberUpgrade&&t.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let r=this.createTransport(e);r.open(),this.setTransport(r)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",t.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let r=new Error("server error");r.code=e.data,this._onError(r);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let o=0;o<this.writeBuffer.length;o++){let n=this.writeBuffer[o].data;if(n&&(r+=Kv(n)),o>0&&r>this._maxPayload)return this.writeBuffer.slice(0,o);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,mr(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,o){return this._sendPacket("message",e,r,o),this}send(e,r,o){return this._sendPacket("message",e,r,o),this}_sendPacket(e,r,o,n){if(typeof r=="function"&&(n=r,r=void 0),typeof o=="function"&&(n=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;let s={type:e,data:r,options:o};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),n&&this.once("flush",n),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},o=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():e()}):this.upgrading?o():e()),this}_onError(e){if(t.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Ob&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let o=Ru.indexOf(this._offlineEventListener);o!==-1&&Ru.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}};jo.protocol=vb;var Pu=class extends jo{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let r=this.createTransport(e),o=!1;jo.priorWebsocketSuccess=!1;let n=()=>{o||(r.send([{type:"ping",data:"probe"}]),r.once("packet",u=>{if(!o)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;jo.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(f(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{let d=new Error("probe error");d.transport=r.name,this.emitReserved("upgradeError",d)}}))};function s(){o||(o=!0,f(),r.close(),r=null)}let i=u=>{let d=new Error("probe error: "+u);d.transport=r.name,s(),this.emitReserved("upgradeError",d)};function a(){i("transport closed")}function c(){i("socket closed")}function l(u){r&&u.name!==r.name&&s()}let f=()=>{r.removeListener("open",n),r.removeListener("error",i),r.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};r.once("open",n),r.once("error",i),r.once("close",a),this.once("close",c),this.once("upgrading",l),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{o||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let r=[];for(let o=0;o<e.length;o++)~this.transports.indexOf(e[o])&&r.push(e[o]);return r}},hs=class extends Pu{constructor(e,r={}){let o=typeof e=="object"?e:r;(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(n=>Tb[n]).filter(n=>!!n)),super(e,o)}};var mV=hs.protocol;function eC(t,e="",r){let o=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),o=ps(t)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";let s=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+s+":"+o.port+e,o.href=o.protocol+"://"+s+(r&&r.port===o.port?"":":"+o.port),o}var Mb={};P(Mb,{Decoder:()=>$b,Encoder:()=>Db,PacketType:()=>U,isPacketValid:()=>FP,protocol:()=>dC});var bP=typeof ArrayBuffer=="function",_P=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,rC=Object.prototype.toString,xP=typeof Blob=="function"||typeof Blob<"u"&&rC.call(Blob)==="[object BlobConstructor]",wP=typeof File=="function"||typeof File<"u"&&rC.call(File)==="[object FileConstructor]";function _c(t){return bP&&(t instanceof ArrayBuffer||_P(t))||xP&&t instanceof Blob||wP&&t instanceof File}function bc(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,o=t.length;r<o;r++)if(bc(t[r]))return!0;return!1}if(_c(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return bc(t.toJSON(),!0);for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&bc(t[r]))return!0;return!1}function oC(t){let e=[],r=t.data,o=t;return o.data=Rb(r,e),o.attachments=e.length,{packet:o,buffers:e}}function Rb(t,e){if(!t)return t;if(_c(t)){let r={_placeholder:!0,num:e.length};return e.push(t),r}else if(Array.isArray(t)){let r=new Array(t.length);for(let o=0;o<t.length;o++)r[o]=Rb(t[o],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){let r={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=Rb(t[o],e));return r}return t}function nC(t,e){return t.data=Pb(t.data,e),delete t.attachments,t}function Pb(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]=Pb(t[r],e);else if(typeof t=="object")for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=Pb(t[r],e));return t}var fC=eE(lC(),1),Ib=(0,fC.default)("socket.io-parser"),uC=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],dC=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 Db=class{constructor(e){this.replacer=e}encode(e){return Ib("encoding packet %j",e),(e.type===U.EVENT||e.type===U.ACK)&&bc(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)),Ib("encoded %j as %s",e,r),r}encodeAsBinary(e){let r=oC(e),o=this.encodeAsString(r.packet),n=r.buffers;return n.unshift(o),n}},$b=class t extends ut{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);let o=r.type===U.BINARY_EVENT;o||r.type===U.BINARY_ACK?(r.type=o?U.EVENT:U.ACK,this.reconstructor=new Lb(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(_c(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0,o={type:Number(e.charAt(0))};if(U[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===U.BINARY_EVENT||o.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(!pC(a)||a<0)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");o.attachments=a}if(e.charAt(r+1)==="/"){let s=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););o.nsp=e.substring(s,r)}else o.nsp="/";let n=e.charAt(r+1);if(n!==""&&Number(n)==n){let s=r+1;for(;++r;){let i=e.charAt(r);if(i==null||Number(i)!=i){--r;break}if(r===e.length)break}o.id=Number(e.substring(s,r+1))}if(e.charAt(++r)){let s=this.tryParse(e.substr(r));if(t.isPayloadValid(o.type,s))o.data=s;else throw new Error("invalid payload")}return Ib("decoded %s as %j",e,o),o}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case U.CONNECT:return $u(r);case U.DISCONNECT:return r===void 0;case U.CONNECT_ERROR:return typeof r=="string"||$u(r);case U.EVENT:case U.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&uC.indexOf(r[0])===-1);case U.ACK:case U.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},Lb=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=nC(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function $P(t){return typeof t=="string"}var pC=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function LP(t){return t===void 0||pC(t)}function $u(t){return Object.prototype.toString.call(t)==="[object Object]"}function MP(t,e){switch(t){case U.CONNECT:return e===void 0||$u(e);case U.DISCONNECT:return e===void 0;case U.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&uC.indexOf(e[0])===-1);case U.ACK:return Array.isArray(e);case U.CONNECT_ERROR:return typeof e=="string"||$u(e);default:return!1}}function FP(t){return $P(t.nsp)&&LP(t.id)&&MP(t.type,t.data)}function ue(t,e,r){return t.on(e,r),function(){t.off(e,r)}}var NP=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),bs=class extends ut{constructor(e,r,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=r,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[ue(e,"open",this.onopen.bind(this)),ue(e,"packet",this.onpacket.bind(this)),ue(e,"error",this.onerror.bind(this)),ue(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...r){var o,n,s;if(NP.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=(n=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||n===void 0?void 0:n.writable,c=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,r){var o;let n=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(n===void 0){this.acks[e]=r;return}let s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);r.call(this,new Error("operation has timed out"))},n),i=(...a)=>{this.io.clearTimeoutFn(s),r.apply(this,a)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...r){return new Promise((o,n)=>{let s=(i,a)=>i?n(i):o(a);s.withError=!0,r.push(s),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());let o={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((n,...s)=>(this._queue[0],n!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(n)):(this._queue.shift(),r&&r(null,...s)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type: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(o=>String(o.id)===e)){let o=this.acks[e];delete this.acks[e],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case 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 o=new Error(e.data.message);o.data=e.data.data,this.emitReserved("connect_error",o);break}}onevent(e){let r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let r=this._anyListeners.slice();for(let o of r)o.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let r=this,o=!1;return function(...n){o||(o=!0,r.packet({type:U.ACK,id:e,data:n}))}}onack(e){let r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type: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 o=0;o<r.length;o++)if(e===r[o])return r.splice(o,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let r=this._anyOutgoingListeners;for(let o=0;o<r.length;o++)if(e===r[o])return r.splice(o,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let r=this._anyOutgoingListeners.slice();for(let o of r)o.apply(this,e.data)}}};function Uo(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}Uo.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};Uo.prototype.reset=function(){this.attempts=0};Uo.prototype.setMin=function(t){this.ms=t};Uo.prototype.setMax=function(t){this.max=t};Uo.prototype.setJitter=function(t){this.jitter=t};var _s=class extends ut{constructor(e,r){var o;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,yr(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((o=r.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new Uo({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;let n=r.parser||Mb;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new hs(this.uri,this.opts);let r=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;let n=ue(r,"open",function(){o.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=ue(r,"error",s);if(this._timeout!==!1){let a=this._timeout,c=this.setTimeoutFn(()=>{n(),s(new Error("timeout")),r.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(n),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(ue(e,"ping",this.onping.bind(this)),ue(e,"data",this.ondata.bind(this)),ue(e,"error",this.onerror.bind(this)),ue(e,"close",this.onclose.bind(this)),ue(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){mr(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let o=this.nsps[e];return o?this._autoConnect&&!o.active&&o.connect():(o=new bs(this,e,r),this.nsps[e]=o),o}_destroy(e){let r=Object.keys(this.nsps);for(let o of r)if(this.nsps[o].active)return;this._close()}_packet(e){let r=this.encoder.encode(e);for(let o=0;o<r.length;o++)this.engine.write(r[o],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,r){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let r=this.backoff.duration();this._reconnecting=!0;let o=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(n=>{n?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",n)):e.onreconnect()}))},r);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var xc={};function xs(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let r=eC(t,e.path||"/socket.io"),o=r.source,n=r.id,s=r.path,i=xc[n]&&s in xc[n].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new _s(o,e):(xc[n]||(xc[n]=new _s(o,e)),c=xc[n]),r.query&&!e.query&&(e.query=r.queryKey),c.socket(r.path,e)}Object.assign(xs,{Manager:_s,Socket:bs,io:xs,connect:xs});R();var Fb=new Set(["__proto__","constructor","prototype"]),Nb=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(Fb.has(t[e]))return!1;return!0},hC=(t,e)=>{!t||!Nb(e)||e.reduce((r,o,n,s)=>{if(r&&o in r){if(n!==s.length-1)return r[o];delete r[o]}},t)},gC=(t,e,r,o=!1)=>{!t||!Nb(e)||e.reduce((n,s,i,a)=>{if(n){if(i!==a.length-1)return!n[s]&&o&&(n[s]={}),n[s];n[s]=r}},t)},Lu=(t,e)=>{let r=new Set;if(!Array.isArray(e))return r;for(let[o,n,s]of e)if(!(!Array.isArray(n)||!n.length))switch(r.add(n[0]),o){case"delete":hC(t,n);break;case"update":case"set":gC(t,n,s,!0);break;default:break}return r},wc=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},mC=(t,e)=>{for(let r in e){if(Fb.has(r))continue;let o=e[r],n=t[r];if(o&&typeof o=="object"&&!Array.isArray(o)){if(!n||typeof n!="object"||Array.isArray(n)){r in t||(t[r]=JSON.parse(JSON.stringify(o)));continue}mC(n,o)}else r in t||(t[r]=o)}},jb=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let n={designSystem:t.__rawDesignSystem};Lu(n,e)}let r=JSON.parse(JSON.stringify(t.__rawDesignSystem)),o=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[];for(let n of o){let s=n&&n.designSystem;s&&typeof s=="object"&&mC(r,s)}return r};R();var yC=(t,e,r)=>{let o=!1;return(n={})=>{let{data:s}=n,{schema:i}=n;s&&(s=t.call("deepDestringifyFunctions",s,Array.isArray(s)?[]:{}),Object.entries(s).forEach(([a,c])=>{if(r[a]&&typeof r[a]=="object")if(a==="designSystem"){if(wc(r,c),o){let l=jb(r);l&&hr(l)}}else co(r[a],c);else r[a]=c}),o=!0,i&&(r.schema=i))}},bC=(t,e,r)=>(o={})=>{let{changes:n}=o;if(!n||!Array.isArray(n)||!n.length)return;n=t.call("deepDestringifyFunctions",n,Array.isArray(n)?[]:{});let s=n.filter(c=>Array.isArray(c)&&Array.isArray(c[1])&&c[1][0]==="designSystem"),i=s.length?n.filter(c=>!s.includes(c)):n,a=Lu(r,i);if(s.length&&a.add("designSystem"),a.has("designSystem")){let c=jb(r,s);c?hr(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 jP={success:"green",error:"red",warning:"yellow"},_C=(t,e,r)=>{if(t.symbols){if(!r.connected){r.notifications.connected={title:"Connected",message:"to the Symbols live server"},r.update({connected:!0});let o=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(o)},3e3)}}else if(r.connected){r.notifications.connected={title:"Disconnected",type:"error"},r.update({connected:!1});let o=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected&&e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(o)},3e3)}},xC={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:jP[t.type||"success"],icon:null,Flex:{Title:{text:"{{ title }}"},P:{text:"{{ title }}"}},onRender:(e,r,o)=>{r.update({animation:"fadeInUp"})},onClick:(e,r,o)=>{delete o.notifications[r.key],r.update({animation:"fadeOutDown"}),o.onClose&&o.onClose(e,r,o)}}),IconText:null,childrenAs:"state",children:({state:t})=>t.notifications}};var BP=!1,UP=()=>BP?"http://localhost:8080":"https://api.symbols.app",VP=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}},zP=async t=>{try{let e=t||UP(),r=await v.fetch(`${e}/service-token`,{method:"GET"}),o;try{let n=await r.clone().json();if(n&&typeof n.token=="string")return n.token.trim();o=await r.text()}catch{o=await r.text()}return(o||"").replace(/\s+/gu,"")||void 0}catch(e){console.error("[sync] Failed to fetch service-token",e)}},kC=(t,e,r,o)=>{t.on("snapshot",yC(e,r,o)),t.on("ops",bC(e,r,o)),t.on("clients",n=>{o.editor?.verbose&&_C(n,e,r)}),t.on("disconnect",n=>{o.editor?.verbose&&console.info("[sync] disconnected",n)})},HP=async(t,e,r,o)=>{let n=await zP(o);if(!n)return console.warn("[sync] no service token \u2014 collab disabled"),null;let s=r.key;if(!s)return console.warn("[sync] ctx.key missing \u2014 collab cannot authenticate"),null;let i=r.editor?.projectId||null,a=xs(o,{path:"/collab-socket",transports:["websocket"],auth:{token:n,projectId:i,projectKey:s,branch:"main",live:!0,clientType:"platform"},reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return a.on("connect",()=>{r.editor?.verbose&&console.info("[sync] connected (collab)")}),kC(a,t,e,r),a},WP=(t,e,r)=>{let o=xs({transports:["websocket","polling"],reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return o.on("connect",()=>{r.editor?.verbose!==!1&&console.info("[sync] connected (runner)")}),kC(o,t,e,r),o.on("reload",()=>{typeof v<"u"&&v.location&&v.location.reload()}),o},qP=async(t,e,r)=>{let{mode:o,baseUrl:n}=VP(r);return o?o==="collab"?HP(t,e,r,n):o==="runner"?WP(t,e,r):null:null},KP={onInit:qP};var vC=t=>typeof t>"u",wC=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),SC=t=>t?.editor?.runtime==="runner",CC=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},EC={name:"sync",beforeCreate(t,e){let r=e&&e.editor;(r&&!vC(r.liveSync)?r.liveSync:wC(e)||SC(e))&&(wC(e)&&!SC(e)&&!e?.key||CC(t,KP))}},AC={name:"notifications",beforeCreate(t,e){if(!e)return;let r=vC(e.notifications)?null:e.notifications,o=e.editor&&e.editor.verbose===!0;(r===!0||r!==!1&&o)&&CC(t,xC)}};var Vb={};P(Vb,{AlertTemplate:()=>Ku,ConfirmTemplate:()=>Wu,CustomTemplate:()=>Yu,ModalLayer:()=>Hu,ModalRoot:()=>zu,PromptTemplate:()=>Gu,windowsComponents:()=>Ub});var Bb={};P(Bb,{alertDialog:()=>Uu,closeAllModals:()=>ju,closeModal:()=>Fu,confirmDialog:()=>Bu,getLayer:()=>Mu,openModal:()=>Nu,promptDialog:()=>Vu,windowsFunctions:()=>_r});function J(t){let e=t;for(;e;){if(e.layer!==void 0)return e.layer;e=e.parent}return null}function ws(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 Mu(){return J(this)}var GP=(t,e)=>{let r=t&&t["ModalLayer_"+e],o=r?.node||r?.__ref?.node;!o||typeof o.style?.setProperty!="function"||(o.style.setProperty("display","none","important"),o.style.setProperty("opacity","0","important"),o.style.setProperty("visibility","hidden","important"),o.style.setProperty("pointer-events","none","important"))},TC=(t,e)=>{let r=t&&t["ModalLayer_"+e],o=r?.node||r?.__ref?.node;!o||typeof o.style?.removeProperty!="function"||(o.style.removeProperty("display"),o.style.removeProperty("opacity"),o.style.removeProperty("visibility"),o.style.removeProperty("pointer-events"))};function Fu(t){let e=ws(this);if(!e)return;let r=e.state?.stack||[];if(!r.length)return;let o,n,s;if(t){if(s=[],o=r.filter((i,a)=>{let c=i.id!==t;return c||s.push(a),c}),o.length===r.length)return;n=r.filter(i=>i.id===t)}else o=r.slice(0,-1),n=r.slice(-1),s=[r.length-1];e.state.update({stack:o});for(let i of s)GP(e,i);for(let i of n)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function Nu(t={}){let e=ws(this);if(!e)return console.warn("[windows] openModal: ModalRoot is not mounted on the app root. Add `ModalRoot: {}` to your shell tree and import windowsComponents into context."),null;e.__modalIdCounter=(e.__modalIdCounter||0)+1;let r=t.id||`modal_${e.__modalIdCounter}_${Date.now().toString(36)}`,o={id:r,template:t.template||"custom",title:t.title,message:t.message,icon:t.icon,confirmText:t.confirmText,cancelText:t.cancelText,okText:t.okText,confirmTheme:t.confirmTheme,placeholder:t.placeholder,defaultValue:t.defaultValue,dismissOnBackdrop:t.dismissOnBackdrop,content:t.content,width:t.width,maxWidth:t.maxWidth,maxHeight:t.maxHeight,onConfirm:t.onConfirm,onCancel:t.onCancel,onOk:t.onOk,onClose:t.onClose},n=e.state?.stack||[];if(n.length>=5)return console.warn("[windows] openModal: stack already at the 5-layer maximum, dropping the new layer. Close some modals first."),null;let s=n.length;return TC(e,s),e.state.update({stack:[...n,o]}),r}function ju(){let t=ws(this);!t||!t.state?.stack?.length||t.state.update({stack:[]})}function Bu(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"confirm"})}function Uu(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"alert"})}function Vu(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"prompt"})}var _r={openModal:Nu,closeModal:Fu,closeAllModals:ju,confirmDialog:Bu,alertDialog:Uu,promptDialog:Vu,getLayer:Mu};var YP=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),OC=t=>{if(!t?.querySelectorAll)return[];let e=t.querySelectorAll(YP),r=[];for(let o=0;o<e.length;o++){let n=e[o];(n.offsetParent!==null||n===document.activeElement)&&r.push(n)}return r},RC=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},zu={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 _r)a in r.functions||(r.functions[a]=_r[a])}t.__modalOpeners=t.__modalOpeners||[],t.__prevStackLen=t.state&&t.state.stack&&t.state.stack.length||0;let o=()=>{let a=t.state?.stack||[];if(!a.length)return;let c=a.length-1,l=a[c];t.state.update({stack:a.slice(0,-1)});let f=t["ModalLayer_"+c],u=f?.node||f?.__ref?.node;if(u?.style?.setProperty&&(u.style.setProperty("display","none","important"),u.style.setProperty("opacity","0","important"),u.style.setProperty("visibility","hidden","important"),u.style.setProperty("pointer-events","none","important")),typeof l?.onClose=="function")try{l.onClose()}catch(d){console.warn("[windows] onClose threw:",d)}},n=a=>{let c=t.state?.stack;if(c?.length){if(a.key==="Tab"){let l=RC(t);if(!l)return;let f=OC(l);if(!f.length){a.preventDefault();let g=l.querySelector?.('[role="dialog"]')||l;try{g.focus?.()}catch{}return}let u=f[0],d=f[f.length-1],h=document.activeElement;if(!l.contains(h)){a.preventDefault();try{u.focus()}catch{}return}if(a.shiftKey&&h===u){a.preventDefault();try{d.focus()}catch{}}else if(!a.shiftKey&&h===d){a.preventDefault();try{u.focus()}catch{}}return}a.key==="Escape"&&c[c.length-1]?.dismissOnBackdrop!==!1&&(a.preventDefault(),o())}};window.addEventListener("keydown",n),t.__escHandler=n;let s=a=>{let c=t.state?.stack||[];if(a<0||a>=c.length)return;let l=c[a];t.state.update({stack:c.filter((d,h)=>h!==a)});let f=t["ModalLayer_"+a],u=f?.node||f?.__ref?.node;if(u?.style?.setProperty&&(u.style.setProperty("display","none","important"),u.style.setProperty("opacity","0","important"),u.style.setProperty("visibility","hidden","important"),u.style.setProperty("pointer-events","none","important")),typeof l?.onClose=="function")try{l.onClose()}catch(d){console.warn("[windows] onClose threw:",d)}},i=a=>{let c=t.state?.stack||[];if(!c.length)return;let l=a.target?.closest?.('[data-key="Close"]');if(l){for(let f=c.length-1;f>=0;f--){let u=t["ModalLayer_"+f],d=u?.node||u?.__ref?.node;if(d&&d.contains(l)){a.preventDefault(),a.stopPropagation(),s(f);return}}return}for(let f=c.length-1;f>=0;f--){let u=t["ModalLayer_"+f];if((u?.node||u?.__ref?.node)===a.target){if(c[f]?.dismissOnBackdrop===!1)return;a.preventDefault(),a.stopPropagation(),s(f);return}}};document.addEventListener("click",i,!0),t.__clickDelegate=i},onUpdate:t=>{if(typeof window>"u")return;let e=(t.state&&t.state.stack||[]).length,r=t.__prevStackLen||0;if(e!==r)if(t.__prevStackLen=e,t.__modalOpeners=t.__modalOpeners||[],e>r)t.__modalOpeners[e]=document.activeElement&&document.activeElement!==document.body?document.activeElement:t.__modalOpeners[e]||null,typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>{let o=RC(t);if(!o)return;let n=OC(o)[0]||o.querySelector&&o.querySelector('[role="dialog"]')||o;try{n.focus&&n.focus()}catch{}});else{let o=null;for(let n=r;n>e;n--)t.__modalOpeners[n]&&(o=o||t.__modalOpeners[n]),t.__modalOpeners[n]=null;if(o&&typeof o.focus=="function"&&o.isConnected!==!1)try{o.focus()}catch{}}},onDestroy:t=>{typeof window>"u"||(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__===t&&(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__=null),t.__escHandler&&(window.removeEventListener("keydown",t.__escHandler),delete t.__escHandler),t.__clickDelegate&&(document.removeEventListener("click",t.__clickDelegate,!0),delete t.__clickDelegate))}};var Hu={tag:"div",position:"fixed",inset:"0",alignItems:"center",justifyContent:"center",padding:"A",background:"black.45",backdropFilter:"blur(4px)",transitionProperty:"opacity",transitionDuration:"200ms",transitionTimingFunction:"ease",zIndex:(t,e)=>`${2e3+(t.__slotIndex||0)*10}`,display:(t,e)=>t.layer?"flex":"none",opacity:(t,e)=>t.layer?"1":"0",visibility:(t,e)=>t.layer?"visible":"hidden",pointerEvents:(t,e)=>t.layer?"auto":"none",ModalWindow:{attr:{role:"dialog","aria-modal":"true",tabindex:"-1","aria-labelledby":t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}},width:t=>J(t)?.width||"H",maxWidth:t=>J(t)?.maxWidth||"90vw",maxHeight:t=>J(t)?.maxHeight||null,onClick:t=>t.stopPropagation(),onMousedown:t=>t.stopPropagation(),ModalHeader:{display:"none"},overflow:"visible",ConfirmTemplate:{hide:t=>J(t)?.template!=="confirm"},AlertTemplate:{hide:t=>J(t)?.template!=="alert"},PromptTemplate:{hide:t=>J(t)?.template!=="prompt"},CustomTemplate:{hide:t=>J(t)?.template!=="custom"}}};var Ss=(t,e,r)=>J(t)?.[e]||r,XP=t=>{let e=J(t)?.icon;return e===null||e===!1},Wu={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>Ss(t,"title","Are you sure?"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>Ss(t,"message","This action cannot be undone."),color:"dim"}},Icons:{hide:t=>XP(t),Indicator:{extends:"Icon",opacity:".7",icon:t=>Ss(t,"icon","warning")}}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"Button",theme:"ghost",text:t=>Ss(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let o=J(e);if(o?.onCancel)try{o.onCancel()}catch(n){console.warn("[windows] confirm.onCancel threw:",n)}e.call("closeModal",o?.id)}},ConfirmBtn:{extends:"Button",theme:t=>Ss(t,"confirmTheme","primary"),text:t=>Ss(t,"confirmText","Confirm"),onClick:(t,e,r)=>{let o=J(e);if(o?.onConfirm)try{o.onConfirm()}catch(n){console.warn("[windows] confirm.onConfirm threw:",n)}e.call("closeModal",o?.id)}}}};var qu=(t,e,r)=>J(t)?.[e]||r,Ku={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>qu(t,"title","Notice"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>qu(t,"message",""),color:"dim"}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:t=>qu(t,"icon","info")}}},ModalFooter:{flow:"x",align:"center end",OkBtn:{extends:"Button",theme:"primary",text:t=>qu(t,"okText","OK"),onClick:(t,e,r)=>{let o=J(e);if(o?.onOk)try{o.onOk()}catch(n){console.warn("[windows] alert.onOk threw:",n)}e.call("closeModal",o?.id)}}}};var Sc=(t,e,r)=>J(t)?.[e]||r,Gu={tag:"div",flow:"y",gap:"B",scope:{value:""},onRender:(t,e)=>{let r=J(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let o=t.InputRow&&t.InputRow.node;o&&(o.value=t.scope.value)},onUpdate:(t,e)=>{let r=J(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let o=t.InputRow&&t.InputRow.node;o&&(o.value=t.scope.value)},ModalHeader:{Hgroup:{H:{text:t=>Sc(t,"title","Enter a value"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>Sc(t,"message",""),color:"dim"}}},InputRow:{extends:"Input",autofocus:!0,placeholder:t=>Sc(t,"placeholder",""),value:(t,e)=>t.parent.scope?.value||"",onInput:(t,e,r)=>{e.parent.scope.value=t.target.value},onKeydown:(t,e,r)=>{if(t.key!=="Enter")return;t.preventDefault();let o=J(e),n=e.parent.scope?.value||"";if(o?.onConfirm)try{o.onConfirm(n)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",o?.id)}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"Button",theme:"ghost",text:t=>Sc(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let o=J(e);if(o?.onCancel)try{o.onCancel()}catch(n){console.warn("[windows] prompt.onCancel threw:",n)}e.call("closeModal",o?.id)}},ConfirmBtn:{extends:"Button",theme:"primary",text:t=>Sc(t,"confirmText","OK"),onClick:(t,e,r)=>{let o=J(e),n=e.parent.parent.scope?.value||"";if(o?.onConfirm)try{o.onConfirm(n)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",o?.id)}}}};var Yu={tag:"div",flow:"y",gap:"B",Title:{tag:"h2",text:t=>J(t)?.title||"",hide:t=>!J(t)?.title,position:"absolute",width:"1px",height:"1px",margin:"-1px",padding:"0",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0",attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},Slot:{tag:"div",onInit:t=>{let e=Q(()=>{let r=J(t),o=r?.content||null,n=r?.id||null;if(!o){t.__lastLayerId!=null&&(t.removeContent(),t.__lastLayerId=null);return}if(t.__lastLayerId!==n){t.__lastLayerId=n;try{t.set(o);let s=t.content?.context;if(s){s.functions||(s.functions={});for(let i in _r)i in s.functions||(s.functions[i]=_r[i])}}catch(s){console.warn("[windows] custom.content set failed:",s)}}});t.__ref&&t.__ref.__effects.push(e)}}};var Ub={ModalRoot:zu,ModalLayer:Hu,ConfirmTemplate:Wu,AlertTemplate:Ku,PromptTemplate:Gu,CustomTemplate:Yu};var qb={};P(qb,{Dropdown:()=>ed,DropdownList:()=>rd,DropdownParent:()=>od,DropdownParentFocus:()=>nd,DropdownRoot:()=>Qu,DropdownSiblingFocus:()=>sd,DropdownTrigger:()=>td,dropdownComponents:()=>Wb});var PC=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),ZP=(t,e,r,o)=>{let n=PC(t,r,o),s=i=>n[i]>=e.height+8;return s("bottom")?"bottom":s("top")?"top":n.bottom>=n.top?"bottom":"top"},JP=(t,e,r,o,n)=>{let s=PC(e,o,n),i=t==="top"||t==="bottom"?r.height+8:r.width+8;if(s[t]>=i)return t;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[t];return a&&s[a]>=i?a:t},Xu=(t,e,r)=>Math.max(e,Math.min(r,t)),to=(t,e,r="auto")=>{if(!t)return{left:0,top:0,side:"bottom",align:"start"};let o=typeof window<"u"?window.innerWidth:1024,n=typeof window<"u"?window.innerHeight:768,s={width:Math.max(120,e?.width||0),height:Math.max(40,e?.height||0)};if(r==="center"){let d=Xu((o-s.width)/2,8,Math.max(8,o-s.width-8)),h=Xu((n-s.height)/2,8,Math.max(8,n-s.height-8));return{left:d,top:h,side:"center",align:"center"}}let i,a;if(r==="auto")i=ZP(t,s,o,n),a="start";else{let d=r.split("-");i=d[0],a=d[1]||"start",i=JP(i,t,s,o,n)}let c,l;i==="bottom"||i==="top"?(a==="start"?c=t.left:a==="end"?c=t.right-s.width:c=t.left+(t.width-s.width)/2,l=i==="bottom"?t.bottom+8:t.top-s.height-8):(a==="start"?l=t.top:a==="end"?l=t.bottom-s.height:l=t.top+(t.height-s.height)/2,c=i==="right"?t.right+8:t.left-s.width-8);let f=Math.max(8,o-s.width-8),u=Math.max(8,n-s.height-8);return c=Xu(c,8,f),l=Xu(l,8,u),{left:c,top:l,side:i,align:a}},ks=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 eo={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:"70vh"},QP=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}},zb=t=>t?.getRoot?.()?.DropdownRoot||null,tI=0,eI=()=>`dropdown_${++tI}_${Date.now().toString(36)}`;function Zu(t={}){let e=zb(this);if(!e)return console.warn("[dropdown] openDropdown: DropdownRoot is not mounted on the app root. Add `DropdownRoot: {}` to your shell tree and import dropdown components into context."),null;let r=t.anchorEl?.node||t.anchorEl,o=t.anchorRect||QP(r);if(!o)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let n=t.id||eI(),s=t.triggerEl?.node||t.triggerEl||r||(typeof document<"u"?document.activeElement:null),i={id:n,content:t.content||null,anchor:o,placement:t.placement||eo.placement,trigger:t.trigger||eo.trigger,offset:t.offset??eo.offset,minWidth:t.minWidth||eo.minWidth,maxWidth:t.maxWidth||eo.maxWidth,maxHeight:t.maxHeight||eo.maxHeight,theme:t.theme||null,shadow:t.shadow||null,background:t.background||null,round:t.round||null,onOpen:t.onOpen,onClose:t.onClose,triggerEl:s},a=e.state?.layer;if(a?.onClose)try{a.onClose(a)}catch(c){console.warn("[dropdown] prev onClose threw:",c)}if(e.state.update({layer:i}),typeof i.onOpen=="function")try{i.onOpen(i)}catch(c){console.warn("[dropdown] onOpen threw:",c)}return n}function Ju(t){let e=zb(this);if(!e)return;let r=e.state?.layer;r&&e.state.update({layer:{...r,inert:!!t}})}function Vo(t){let e=zb(this);if(!e)return;let r=e.state?.layer;if(!r)return;let o=typeof t=="string"?t:t?.id;if(o&&r.id&&o!==r.id)return;let n=r.onClose;e.state.update({layer:null});let s=r.triggerEl;if(s&&typeof s.focus=="function")try{s.focus()}catch(i){console.warn("[dropdown] focus restore threw:",i)}if(typeof n=="function")try{n(r)}catch(i){console.warn("[dropdown] onClose threw:",i)}}var rI=`
103
+ \`\`\``}o.push({role:"user",content:s})}return o}var Sv=/```(?<lang>[a-zA-Z0-9_+-]*)\n(?<code>[\s\S]*?)```/g,cP=new Set(["component","components","page","pages","function","method","state","theme","color","font","icon"]);function lP(e){let t=[];for(let r of e.matchAll(Sv))t.push({lang:(r.groups?.lang||"").toLowerCase(),code:r.groups?.code??""});return t}function fP(e){return e.replace(Sv,"").trim()}function vb(e){if(!e||!/[{[]/.test(e))return null;try{return JSON.parse(e)}catch{}try{return JSON.parse(e.replace(/,\s*([}\]])/g,"$1"))}catch{}return null}function wv(e){return!!e&&typeof e=="object"&&typeof e.type=="string"&&cP.has(e.type)}function kv(e){let t=(typeof e=="string"?e:"").trim();if(!t)return{kind:"text",text:"",message:""};let r=lP(t),n=r.filter(i=>/^(js|javascript|ts|typescript|jsx|tsx)$/.test(i.lang)),o=r.filter(i=>i.lang==="json"),s=fP(t);for(let i of o){let a=vb(i.code);if(wv(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=vb("["+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(t.startsWith("{")){let i=vb(t);if(wv(i))return{kind:"asset",text:i.description||"",asset:i,message:i.description||`Generated ${i.type}: ${i.title||i.key||""}`.trim()}}return{kind:"text",text:t,message:t}}function vv(e){if(!e)return{code_response:{type:"error",content:"Empty response from assistant"}};switch(e.kind){case"asset":return{code_response:{type:"json_response",data:e.asset}};case"multi":return{code_response:{type:"symbols_component_code",component_code:e.code}};case"component":return{code_response:{type:"symbols_component_code",component_code:e.code,analysis_text:e.text}};default:return{code_response:{type:"plain_text_response",content:e.text||e.message||""}}}}var Cv=["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(" "),Ev=["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
+ `),Cb={Starter:Qr,Free:Qr,Pro:"claude-opus-4-6"};function Av(e){return e?Cb[e]||e:Qr}var Tv={"@symbo.ls/signal":Pd,"@symbo.ls/scratch":Qg,"@symbo.ls/element":ey,"@symbo.ls/css":am,"@symbo.ls/utils":Fl,"@symbo.ls/state":Bm,"@symbo.ls/router":Ka,"@symbo.ls/polyglot":Zy,"@symbo.ls/helmet":Yy,"@symbo.ls/fetch":gn,"@symbo.ls/capsize":Qy,"@symbo.ls/shorthand":ib,"@symbo.ls/analyze":bb,"@symbo.ls/inspect":wb,"@symbo.ls/channels":kb,"@symbo-ls/simone-server":Eb},Ov=(e,t)=>{let r=e||(typeof globalThis<"u"?globalThis:{}),n=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let o in Tv)n[o]||(n[o]=Tv[o]);if(t)for(let o in t)n[o]||(n[o]=t[o]);return n},Rv=(e,t)=>{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];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},Pv=["@symbo.ls/sdk"],Dv=(e,t)=>{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];!s||typeof s!="object"&&typeof s!="function"||n[o]||(n[o]=s)}return n},uP=/^@symbo[-.]ls\//,dP=e=>e.includes("/")?e.slice(e.indexOf("/")+1):e,Iv=(e,t)=>{let r=t||(typeof globalThis<"u"?globalThis:null);if(!r||!Array.isArray(e))return null;let n=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let o of e){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=dP(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 Mv=e=>{let t=typeof window<"u"?window:globalThis||{};t.document||(t.document={body:{}});let r=typeof document<"u"?document:t.document;e.document=e.document||r;let n=e.window;return n&&n!==t&&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)")),e.window=t):e.window=n||t,e.window},$v=(e="smbls")=>{let t={};for(let r in In)Object.prototype.hasOwnProperty.call(In,r)&&(Ht(r)?t[`smbls.${r}`]=In[r]:t[r]=In[r]);return t},Fv=e=>e.components?{...$v(),...e.components}:$v(),Nv=e=>({...Ya,...Ka,...Lr,...e.utils,...e.snippets,...e.functions}),jv=e=>({...e.methods||{},require:e.utils.require,requireOnDemand:e.utils.requireOnDemand,router:e.utils.router});var pP=e=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[e]||null,hP=3e3,gP=(e,t,r=n=>import(n))=>{if(typeof globalThis>"u")return Promise.resolve(null);try{let n=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});if(n[e])return Promise.resolve(n[e]);let o=Promise.resolve().then(()=>r(t)).then(i=>(i&&!n[e]&&(n[e]=i),n[e]||null)).catch(()=>null);return new Promise(i=>{let a=setTimeout(()=>i(null),hP);o.then(c=>{clearTimeout(a),i(c)})})}catch{return Promise.resolve(null)}},Lv={},Bv=async({dependencies:e,dependenciesOnDemand:t,document:r,preventCaching:n=!1,cdnProvider:o,packageManager:s,symbolsConfig:i,registerDependency:a=gP})=>{if(o||(o=Pr[s]||go(i)||"esmsh"),!e)return null;if(!yo(e))return console.warn(`[smbls] dependencies is ${Array.isArray(e)?"an ARRAY":`a ${typeof e}`}, 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 e){c=!0;break}if(!c)return null;let l=Er()&&n?`?${Math.random()}`:"",f=async(d,p)=>{let g=At(d,p,o)+l;try{await Promise.race([bo(g,{document:r,type:"module"}),new Promise((h,m)=>setTimeout(()=>m(new Error(`Timeout loading ${d}`)),1e4))]),await a(d,g)}catch(h){if(console.error(`Failed to load ${d} from ${o}:`,h),o!=="symbols")try{let m=At(d,p,"symbols")+l;await Promise.race([bo(m,{document:r,type:"module"}),new Promise((_,b)=>setTimeout(()=>b(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 e){let p=e[d];if(!(t&&t[d])&&!Lv[d]&&(Lv[d]=!0,!yn(d))){if(mo(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}pP(d)||u.push(f(d,p))}}return u.length&&await Promise.allSettled(u),e},Uv=async(e,t)=>{let r=t.window||window,n=t.cdnProvider||go(t.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]&&yn(a))return await u.require(a,c);if(!u.packages[a]){let d=Er()?`?${Math.random()}`:"";if(l&&l[a]){let p=l[a],g=At(a,p,c)+d;try{await i.utils.loadRemoteScript(g,{window:u,document:f})}catch(h){if(console.error(`Failed to load ${a} from ${c}:`,h),c!=="symbols"){let m=At(a,p,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let p=At(a,"latest",c)+d;try{await i.utils.loadRemoteScript(p,{window:u,document:f})}catch(g){if(console.error(`Failed to load ${a} from ${c}:`,g),c!=="symbols"){let h=At(a,"latest","symbols")+d;await i.utils.loadRemoteScript(h,{window:u,document:f})}}u.packages[a]="loadedOnDeman"}}return await u.require(a,c)};r.packages?r.packages=pe(r.packages,e):r.packages=e,r.require||(t.utils.require=await o(t),r.require=t.utils.require),r.requireOnDemand||(t.utils.requireOnDemand=await s(t),r.requireOnDemand=t.utils.requireOnDemand)},mP=/\s+/g,Vv=(e,t)=>typeof e=="function"?e(t,t?.state,t?.context):e,yP=(e,t)=>{let r="";for(let n in e){let o=e[n];typeof o=="boolean"&&o?r+=` ${n}`:typeof o=="string"?r+=` ${o}`:typeof o=="function"&&(r+=` ${Vv(o,t)}`)}return r},bP=(e,t,r)=>{if(!e)return;let{key:n}=t;e===!0&&(e=t.classlist={key:n}),typeof e=="string"&&(e=t.classlist={default:e}),e!==null&&typeof e=="object"&&!Array.isArray(e)&&(e=yP(e,t));let o=e.replace(mP," ").trim();if(r&&typeof r.setAttribute=="function")r.setAttribute("class",o);else if(r)try{r.className=o}catch{}return o},_P=()=>(e,t,r)=>{let n=Vv(e,t);if(e){let{__ref:o}=t;o.__class.style=n}zv()(t.classlist,t,t.state,!0)},zv=()=>(e,t,r,n)=>{if(t.style&&!n)return;let{__ref:o}=t,{__class:s,__classNames:i}=o;if(!(e===null||typeof e!="object"||Array.isArray(e))){t.class&&(i.classProps=t.class),t.attr?.class&&(i.class=t.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=t.key:l=at(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];t.node&&bP(i,t,t.node)}},xP=()=>({style:_P(),classlist:zv()}),wP=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],Ab=new WeakSet,Tb=!1,SP=e=>!!e&&typeof e=="object",Hv=(e,t)=>{let r=t.document||(t.parent&&t.parent.documentElement?t.parent:null)||document,n=t.initOptions||{},o=t.registry||xP(),s=t.designSystem?ne(le(t.designSystem),le(Wa),ot):le(Wa),i={};for(let h of wP)t[h]!==void 0&&(i[h]=t[h]);let a,c=SP(r),f=c&&Ab.has(r)&&!t.skipDesignSystemInit,u=!f&&!Tb,d=f?`[data-smbls-app="${e}"]`:":root";if(t.scopeSelector=d,t.skipDesignSystemInit){if(a=E(e)||E(),a&&(a.__domDocument=r),a?.CSS_VARS){oe(a);try{Se({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&Se(cs(a.CSS_MEDIA_VARS,d))}finally{te()}}}else if(u){let h=E();h&&(h.__domDocument=r),a=mr(s,{key:e,document:r,files:t.files,assets:t.assets,scopeSelector:d,...su,...i,...n}),a&&a!==h&&(a.__domDocument=r),c&&Ab.add(r),Tb=!0}else{let h=ia(e,s,{cleanBase:!0});for(let m in i)h[m]=i[m];if(h.__domDocument=r,f){let m=e.replace(/[^a-zA-Z0-9]/g,"").substring(0,6);t.cssPrefix=m,h.varPrefix=m}oe(h);try{a=mr(h,{key:e,document:r,files:t.files,assets:t.assets,scopeSelector:d,...su,...i,...n})}finally{te()}c&&Ab.add(r),Tb=!0}let p=a?.CONFIG||a,g=p?.font;if(g){oe(p);try{for(let h in g){let m=g[h];if(!m?.fontFace)continue;let _=Array.isArray(m.fontFace)?m.fontFace:[m.fontFace];for(let b of _)typeof b=="string"&&b.includes("font-family")&&Se(`@font-face { ${b} }`)}}finally{te()}}return[a,o]},Wv=(e,t)=>{let r={};t.state&&ne(r,t.state),e&&e.state&&ne(r,e.state);let n=t.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(!ir(t,u,r)){i.add(u);return}r[u]=d,a.add(u),Wt(t,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&&t.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,le(r)},qv=(e,t)=>{k(e.routes)&&k(t.pages)&&pe(e.routes,t.pages);let r=e.routes||t.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&&t&&t.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},Kv=e=>{qi(e,e.sharedLibraries)};var hc={polyglot:ec,getLocalStateLang:oc,getActiveLang:Xr,getLang:Xr,setLang:rc,getLanguages:Qa,loadTranslations:tc,upsertTranslation:nc};Or();var Mt=Object.create(null);Mt.open="0";Mt.close="1";Mt.ping="2";Mt.pong="3";Mt.message="4";Mt.upgrade="5";Mt.noop="6";var gc=Object.create(null);Object.keys(Mt).forEach(e=>{gc[Mt[e]]=e});var mc={type:"error",data:"parser error"};var Xv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Zv=typeof ArrayBuffer=="function",Jv=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,yc=({type:e,data:t},r,n)=>Xv&&t instanceof Blob?r?n(t):Gv(t,n):Zv&&(t instanceof ArrayBuffer||Jv(t))?r?n(t):Gv(new Blob([t]),n):n(Mt[e]+(t||"")),Gv=(e,t)=>{let r=new FileReader;return r.onload=function(){let n=r.result.split(",")[1];t("b"+(n||""))},r.readAsDataURL(e)};function Yv(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}var Ob;function Qv(e,t){if(Xv&&e.data instanceof Blob)return e.data.arrayBuffer().then(Yv).then(t);if(Zv&&(e.data instanceof ArrayBuffer||Jv(e.data)))return t(Yv(e.data));yc(e,!1,r=>{Ob||(Ob=new TextEncoder),t(Ob.encode(r))})}var eC="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<eC.length;e++)bc[eC.charCodeAt(e)]=e;var tC=e=>{let t=e.length*.75,r=e.length,n,o=0,s,i,a,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);let l=new ArrayBuffer(t),f=new Uint8Array(l);for(n=0;n<r;n+=4)s=bc[e.charCodeAt(n)],i=bc[e.charCodeAt(n+1)],a=bc[e.charCodeAt(n+2)],c=bc[e.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 kP=typeof ArrayBuffer=="function",_c=(e,t)=>{if(typeof e!="string")return{type:"message",data:rC(e,t)};let r=e.charAt(0);return r==="b"?{type:"message",data:vP(e.substring(1),t)}:gc[r]?e.length>1?{type:gc[r],data:e.substring(1)}:{type:gc[r]}:mc},vP=(e,t)=>{if(kP){let r=tC(e);return rC(r,t)}else return{base64:!0,data:e}},rC=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer;var nC="",oC=(e,t)=>{let r=e.length,n=new Array(r),o=0;e.forEach((s,i)=>{yc(s,!1,a=>{n[i]=a,++o===r&&t(n.join(nC))})})},sC=(e,t)=>{let r=e.split(nC),n=[];for(let o=0;o<r.length;o++){let s=_c(r[o],t);if(n.push(s),s.type==="error")break}return n};function iC(){return new TransformStream({transform(e,t){Qv(e,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))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(r)})}})}var Rb;function Ru(e){return e.reduce((t,r)=>t+r.length,0)}function Pu(e,t){if(e[0].length===t)return e.shift();let r=new Uint8Array(t),n=0;for(let o=0;o<t;o++)r[o]=e[0][n++],n===e[0].length&&(e.shift(),n=0);return e.length&&n<e[0].length&&(e[0]=e[0].slice(n)),r}function aC(e,t){Rb||(Rb=new TextDecoder);let r=[],n=0,o=-1,s=!1;return new TransformStream({transform(i,a){for(r.push(i);;){if(n===0){if(Ru(r)<1)break;let c=Pu(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(Ru(r)<2)break;let c=Pu(r,2);o=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),n=3}else if(n===2){if(Ru(r)<8)break;let c=Pu(r,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(mc);break}o=f*Math.pow(2,32)+l.getUint32(4),n=3}else{if(Ru(r)<o)break;let c=Pu(r,o);a.enqueue(_c(s?c:Rb.decode(c),t)),n=0}if(o===0||o>e){a.enqueue(mc);break}}}})}var Pb=4;function ue(e){if(e)return CP(e)}function CP(e){for(var t in ue.prototype)e[t]=ue.prototype[t];return e}ue.prototype.on=ue.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};ue.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this};ue.prototype.off=ue.prototype.removeListener=ue.prototype.removeAllListeners=ue.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var n,o=0;o<r.length;o++)if(n=r[o],n===t||n.fn===t){r.splice(o,1);break}return r.length===0&&delete this._callbacks["$"+e],this};ue.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,o=r.length;n<o;++n)r[n].apply(this,t)}return this};ue.prototype.emitReserved=ue.prototype.emit;ue.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};ue.prototype.hasListeners=function(e){return!!this.listeners(e).length};var br=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,r)=>r(t,0),ze=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),cC="arraybuffer";function Du(e,...t){return t.reduce((r,n)=>(e.hasOwnProperty(n)&&(r[n]=e[n]),r),{})}var EP=ze.setTimeout,AP=ze.clearTimeout;function _r(e,t){t.useNativeTimers?(e.setTimeoutFn=EP.bind(ze),e.clearTimeoutFn=AP.bind(ze)):(e.setTimeoutFn=ze.setTimeout.bind(ze),e.clearTimeoutFn=ze.clearTimeout.bind(ze))}var TP=1.33;function lC(e){return typeof e=="string"?OP(e):Math.ceil((e.byteLength||e.size)*TP)}function OP(e){let t=0,r=0;for(let n=0,o=e.length;n<o;n++)t=e.charCodeAt(n),t<128?r+=1:t<2048?r+=2:t<55296||t>=57344?r+=3:(n++,r+=4);return r}function Iu(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function fC(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}function uC(e){let t={},r=e.split("&");for(let n=0,o=r.length;n<o;n++){let s=r[n].split("=");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}var $u=class extends Error{constructor(t,r,n){super(t),this.description=r,this.context=n,this.type="TransportError"}},xr=class extends ue{constructor(t){super(),this.writable=!1,_r(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,r,n){return super.emitReserved("error",new $u(t,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(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){let r=_c(t,this.socket.binaryType);this.onPacket(r)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,r={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){let t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_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(t){let r=fC(t);return r.length?"?"+r:""}};var xc=class extends xr{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";let r=()=>{this.readyState="paused",t()};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(t){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)};sC(t,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,oC(t,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=Iu()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(t,r)}};var dC=!1;try{dC=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var pC=dC;function RP(){}var Db=class extends xc{constructor(t){if(super(t),typeof location<"u"){let r=location.protocol==="https:",n=location.port;n||(n=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||n!==t.port}}doWrite(t,r){let n=this.request({method:"POST",data:t});n.on("success",r),n.on("error",(o,s)=>{this.onError("xhr post error",o,s)})}doPoll(){let t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=t}},en=class e extends ue{constructor(t,r,n){super(),this.createRequest=t,_r(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 t;let r=Du(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{}(t=this._opts.cookieJar)===null||t===void 0||t.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=e.requestsCount++,e.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=RP,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete e.requests[this._index],this._xhr=null}}_onLoad(){let t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};en.requestsCount=0;en.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",hC);else if(typeof addEventListener=="function"){let e="onpagehide"in ze?"pagehide":"unload";addEventListener(e,hC,!1)}}function hC(){for(let e in en.requests)en.requests.hasOwnProperty(e)&&en.requests[e].abort()}var PP=(function(){let e=gC({xdomain:!1});return e&&e.responseType!==null})(),tn=class extends Db{constructor(t){super(t);let r=t&&t.forceBase64;this.supportsBinary=PP&&!r}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new en(gC,this.uri(),t)}};function gC(e){let t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||pC))return new XMLHttpRequest}catch{}if(!t)try{return new ze[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var mC=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",$b=class extends xr{get name(){return"websocket"}doOpen(){let t=this.uri(),r=this.opts.protocols,n=mC?{}:Du(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(t,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=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let r=0;r<t.length;r++){let n=t[r],o=r===t.length-1;yc(n,this.supportsBinary,s=>{try{this.doWrite(n,s)}catch{}o&&br(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let t=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=Iu()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}},Ib=ze.WebSocket||ze.MozWebSocket,rn=class extends $b{createSocket(t,r,n){return mC?new Ib(t,r,n):r?new Ib(t,r):new Ib(t)}doWrite(t,r){this.ws.send(r)}};var _s=class extends xr{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{let r=aC(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(r).getReader(),o=iC();o.readable.pipeTo(t.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(t){this.writable=!1;for(let r=0;r<t.length;r++){let n=t[r],o=r===t.length-1;this._writer.write(n).then(()=>{o&&br(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}};var Lb={websocket:rn,webtransport:_s,polling:tn};var DP=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,IP=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function xs(e){if(e.length>8e3)throw"URI too long";let t=e,r=e.indexOf("["),n=e.indexOf("]");r!=-1&&n!=-1&&(e=e.substring(0,r)+e.substring(r,n).replace(/:/g,";")+e.substring(n,e.length));let o=DP.exec(e||""),s={},i=14;for(;i--;)s[IP[i]]=o[i]||"";return r!=-1&&n!=-1&&(s.source=t,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=$P(s,s.path),s.queryKey=LP(s,s.query),s}function $P(e,t){let r=/\/{2,9}/g,n=t.replace(r,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&n.splice(0,1),t.slice(-1)=="/"&&n.splice(n.length-1,1),n}function LP(e,t){let r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,s){o&&(r[o]=s)}),r}var Mb=typeof addEventListener=="function"&&typeof removeEventListener=="function",Lu=[];Mb&&addEventListener("offline",()=>{Lu.forEach(e=>e())},!1);var Un=class e extends ue{constructor(t,r){if(super(),this.binaryType=cC,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(r=t,t=null),t){let n=xs(t);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=xs(r.host).host);_r(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=uC(this.opts.query)),Mb&&(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"})},Lu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){let r=Object.assign({},this.opts.query);r.EIO=Pb,r.transport=t,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[t]);return new this._transportsByName[t](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let t=this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let r=this.createTransport(t);r.open(),this.setTransport(r)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.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",e.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.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=t.data,this._onError(r);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),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 t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.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+=lC(o)),n>0&&r>this._maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,br(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,r,n){return this._sendPacket("message",t,r,n),this}send(t,r,n){return this._sendPacket("message",t,r,n),this}_sendPacket(t,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:t,data:r,options:n};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),o&&this.once("flush",o),this.flush()}close(){let t=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),t()},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():t()}):this.upgrading?n():t()),this}_onError(t){if(e.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,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(),Mb&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let n=Lu.indexOf(this._offlineEventListener);n!==-1&&Lu.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this._prevBufferLen=0}}};Un.protocol=Pb;var Mu=class extends Un{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let r=this.createTransport(t),n=!1;Un.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;Un.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&&t!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){let r=[];for(let n=0;n<t.length;n++)~this.transports.indexOf(t[n])&&r.push(t[n]);return r}},ws=class extends Mu{constructor(t,r={}){let n=typeof t=="object"?t:r;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(o=>Lb[o]).filter(o=>!!o)),super(t,n)}};var LV=ws.protocol;function yC(e,t="",r){let n=e;r=r||typeof location<"u"&&location,e==null&&(e=r.protocol+"//"+r.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=r.protocol+e:e=r.host+e),/^(https?|wss?):\/\//.test(e)||(typeof r<"u"?e=r.protocol+"//"+e:e="https://"+e),n=xs(e)),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+t,n.href=n.protocol+"://"+s+(r&&r.port===n.port?"":":"+n.port),n}var zb={};I(zb,{Decoder:()=>Ub,Encoder:()=>Bb,PacketType:()=>U,isPacketValid:()=>rD,protocol:()=>TC});var FP=typeof ArrayBuffer=="function",NP=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,bC=Object.prototype.toString,jP=typeof Blob=="function"||typeof Blob<"u"&&bC.call(Blob)==="[object BlobConstructor]",BP=typeof File=="function"||typeof File<"u"&&bC.call(File)==="[object FileConstructor]";function Sc(e){return FP&&(e instanceof ArrayBuffer||NP(e))||jP&&e instanceof Blob||BP&&e instanceof File}function wc(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,n=e.length;r<n;r++)if(wc(e[r]))return!0;return!1}if(Sc(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return wc(e.toJSON(),!0);for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&wc(e[r]))return!0;return!1}function _C(e){let t=[],r=e.data,n=e;return n.data=Fb(r,t),n.attachments=t.length,{packet:n,buffers:t}}function Fb(e,t){if(!e)return e;if(Sc(e)){let r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){let r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=Fb(e[n],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){let r={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=Fb(e[n],t));return r}return e}function xC(e,t){return e.data=Nb(e.data,t),delete e.attachments,e}function Nb(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let r=0;r<e.length;r++)e[r]=Nb(e[r],t);else if(typeof e=="object")for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=Nb(e[r],t));return e}var EC=bE(CC(),1),jb=(0,EC.default)("socket.io-parser"),AC=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],TC=5,U;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(U||(U={}));var Bb=class{constructor(t){this.replacer=t}encode(t){return jb("encoding packet %j",t),(t.type===U.EVENT||t.type===U.ACK)&&wc(t)?this.encodeAsBinary({type:t.type===U.EVENT?U.BINARY_EVENT:U.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let r=""+t.type;return(t.type===U.BINARY_EVENT||t.type===U.BINARY_ACK)&&(r+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(r+=t.nsp+","),t.id!=null&&(r+=t.id),t.data!=null&&(r+=JSON.stringify(t.data,this.replacer)),jb("encoded %j as %s",t,r),r}encodeAsBinary(t){let r=_C(t),n=this.encodeAsString(r.packet),o=r.buffers;return o.unshift(n),o}},Ub=class e extends ue{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let r;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(t);let n=r.type===U.BINARY_EVENT;n||r.type===U.BINARY_ACK?(r.type=n?U.EVENT:U.ACK,this.reconstructor=new Vb(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(Sc(t)||t.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(t),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: "+t)}decodeString(t){let r=0,n={type:Number(t.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(;t.charAt(++r)!=="-"&&r!=t.length;);let i=t.substring(s,r);if(i!=Number(i)||t.charAt(r)!=="-")throw new Error("Illegal attachments");let a=Number(i);if(!OC(a)||a<0)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");n.attachments=a}if(t.charAt(r+1)==="/"){let s=r+1;for(;++r&&!(t.charAt(r)===","||r===t.length););n.nsp=t.substring(s,r)}else n.nsp="/";let o=t.charAt(r+1);if(o!==""&&Number(o)==o){let s=r+1;for(;++r;){let i=t.charAt(r);if(i==null||Number(i)!=i){--r;break}if(r===t.length)break}n.id=Number(t.substring(s,r+1))}if(t.charAt(++r)){let s=this.tryParse(t.substr(r));if(e.isPayloadValid(n.type,s))n.data=s;else throw new Error("invalid payload")}return jb("decoded %s as %j",t,n),n}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,r){switch(t){case U.CONNECT:return ju(r);case U.DISCONNECT:return r===void 0;case U.CONNECT_ERROR:return typeof r=="string"||ju(r);case U.EVENT:case U.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&AC.indexOf(r[0])===-1);case U.ACK:case U.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},Vb=class{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){let r=xC(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function QP(e){return typeof e=="string"}var OC=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function eD(e){return e===void 0||OC(e)}function ju(e){return Object.prototype.toString.call(e)==="[object Object]"}function tD(e,t){switch(e){case U.CONNECT:return t===void 0||ju(t);case U.DISCONNECT:return t===void 0;case U.EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&AC.indexOf(t[0])===-1);case U.ACK:return Array.isArray(t);case U.CONNECT_ERROR:return typeof t=="string"||ju(t);default:return!1}}function rD(e){return QP(e.nsp)&&eD(e.id)&&tD(e.type,e.data)}function dt(e,t,r){return e.on(t,r),function(){e.off(t,r)}}var nD=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Cs=class extends ue{constructor(t,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=t,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 t=this.io;this.subs=[dt(t,"open",this.onopen.bind(this)),dt(t,"packet",this.onpacket.bind(this)),dt(t,"error",this.onerror.bind(this)),dt(t,"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(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...r){var n,o,s;if(nD.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(r.unshift(t),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(t,r){var n;let o=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(o===void 0){this.acks[t]=r;return}let s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&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[t]=i}emitWithAck(t,...r){return new Promise((n,o)=>{let s=(i,a)=>i?o(i):n(a);s.withError=!0,r.push(s),this.emit(t,...r)})}_addToQueue(t){let r;typeof t[t.length-1]=="function"&&(r=t.pop());let n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.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(t=!1){if(!this.connected||this._queue.length===0)return;let r=this._queue[0];r.pending&&!t||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:U.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(n=>String(n.id)===t)){let n=this.acks[t];delete this.acks[t],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case U.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.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(t);break;case U.ACK:case U.BINARY_ACK:this.onack(t);break;case U.DISCONNECT:this.ondisconnect();break;case U.CONNECT_ERROR:this.destroy();let n=new Error(t.data.message);n.data=t.data.data,this.emitReserved("connect_error",n);break}}onevent(t){let r=t.data||[];t.id!=null&&r.push(this.ack(t.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){let r=this._anyListeners.slice();for(let n of r)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){let r=this,n=!1;return function(...o){n||(n=!0,r.packet({type:U.ACK,id:t,data:o}))}}onack(t){let r=this.acks[t.id];typeof r=="function"&&(delete this.acks[t.id],r.withError&&t.data.unshift(null),r.apply(this,t.data))}onconnect(t,r){this.id=t,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),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(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){let r=this._anyListeners;for(let n=0;n<r.length;n++)if(t===r[n])return r.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){let r=this._anyOutgoingListeners;for(let n=0;n<r.length;n++)if(t===r[n])return r.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let r=this._anyOutgoingListeners.slice();for(let n of r)n.apply(this,t.data)}}};function zn(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}zn.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-r:e+r}return Math.min(e,this.max)|0};zn.prototype.reset=function(){this.attempts=0};zn.prototype.setMin=function(e){this.ms=e};zn.prototype.setMax=function(e){this.max=e};zn.prototype.setJitter=function(e){this.jitter=e};var Es=class extends ue{constructor(t,r){var n;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(r=t,t=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,_r(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=t;let o=r.parser||zb;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var r;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(r=this.backoff)===null||r===void 0||r.setMin(t),this)}randomizationFactor(t){var r;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(r=this.backoff)===null||r===void 0||r.setJitter(t),this)}reconnectionDelayMax(t){var r;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(r=this.backoff)===null||r===void 0||r.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new ws(this.uri,this.opts);let r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;let o=dt(r,"open",function(){n.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},i=dt(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(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let t=this.engine;this.subs.push(dt(t,"ping",this.onping.bind(this)),dt(t,"data",this.ondata.bind(this)),dt(t,"error",this.onerror.bind(this)),dt(t,"close",this.onclose.bind(this)),dt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(r){this.onclose("parse error",r)}}ondecoded(t){br(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,r){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new Cs(this,t,r),this.nsps[t]=n),n}_destroy(t){let r=Object.keys(this.nsps);for(let n of r)if(this.nsps[n].active)return;this._close()}_packet(t){let r=this.encoder.encode(t);for(let n=0;n<r.length;n++)this.engine.write(r[n],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,r){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let t=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(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}};var kc={};function As(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};let r=yC(e,t.path||"/socket.io"),n=r.source,o=r.id,s=r.path,i=kc[o]&&s in kc[o].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||i,c;return a?c=new Es(n,t):(kc[o]||(kc[o]=new Es(n,t)),c=kc[o]),r.query&&!t.query&&(t.query=r.queryKey),c.socket(r.path,t)}Object.assign(As,{Manager:Es,Socket:Cs,io:As,connect:As});P();P();var Hb=new Set(["__proto__","constructor","prototype"]),Wb=e=>{if(!Array.isArray(e))return!1;for(let t=0;t<e.length;t++)if(Hb.has(e[t]))return!1;return!0},RC=(e,t)=>{!e||!Wb(t)||t.reduce((r,n,o,s)=>{if(r&&n in r){if(o!==s.length-1)return r[n];delete r[n]}},e)},PC=(e,t,r,n=!1)=>{!e||!Wb(t)||t.reduce((o,s,i,a)=>{if(o){if(i!==a.length-1)return!o[s]&&n&&(o[s]={}),o[s];o[s]=r}},e)},Bu=(e,t)=>{let r=new Set;if(!Array.isArray(t))return r;for(let[n,o,s]of t)if(!(!Array.isArray(o)||!o.length))switch(r.add(o[0]),n){case"delete":RC(e,o);break;case"update":case"set":PC(e,o,s,!0);break;default:break}return r},vc=(e,t)=>{!e||!t||typeof t!="object"||(e.__rawDesignSystem=JSON.parse(JSON.stringify(t)))},DC=(e,t,r,n="designSystem")=>{for(let o in t){if(Hb.has(o))continue;let s=`${n}/${o}`;if(r.has(s))continue;let i=t[o],a=e[o];if(i&&typeof i=="object"&&!Array.isArray(i)){if(!a||typeof a!="object"||Array.isArray(a)){if(o in e)continue;e[o]={}}DC(e[o],i,r,s)}else o in e||(e[o]=Array.isArray(i)?JSON.parse(JSON.stringify(i)):i)}},qb=(e,t)=>{if(!e||!e.__rawDesignSystem)return null;if(Array.isArray(t)&&t.length){let o={designSystem:e.__rawDesignSystem};Bu(o,t)}let r=JSON.parse(JSON.stringify(e.__rawDesignSystem)),n=Array.isArray(e.sharedLibraries)?e.sharedLibraries:[];for(let o of n){let s=Kt(o),i=s?o.library:o,a=i&&i.designSystem;if(!a||typeof a!="object")continue;let c=Dr(i.sharedLibIgnore);if(s)for(let l of Dr(o.ignoreList))c.add(l);c.has("designSystem")||DC(r,a,c)}return r};P();var IC=(e,t,r)=>{let n=!1;return(o={})=>{let{data:s}=o,{schema:i}=o;s&&(s=e.call("deepDestringifyFunctions",s,Array.isArray(s)?[]:{}),Object.entries(s).forEach(([a,c])=>{if(r[a]&&typeof r[a]=="object")if(a==="designSystem"){if(vc(r,c),n){let l=qb(r);l&&mr(l)}}else dn(r[a],c);else r[a]=c}),n=!0,i&&(r.schema=i))}},$C=(e,t,r)=>(n={})=>{let{changes:o}=n;if(!o||!Array.isArray(o)||!o.length)return;o=e.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=Bu(r,i);if(s.length&&a.add("designSystem"),a.has("designSystem")){let c=qb(r,s);c?mr(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")&&t.update(r.state),["pages","components","snippets","functions","assets"].some(c=>a.has(c))){let{pathname:c,search:l,hash:f}=r.window.location;e.call("router",c+l+f,e.__ref.root,{},{scrollToTop:!1,force:!0})}};var oD={success:"green",error:"red",warning:"yellow"},LC=(e,t,r)=>{if(e.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,t.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,t.notifications.content.connected&&t.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(n)},3e3)}},MC={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:e})=>({animationDuration:"C",background:oD[e.type||"success"],icon:null,Flex:{Title:{text:"{{ title }}"},P:{text:"{{ title }}"}},onRender:(t,r,n)=>{r.update({animation:"fadeInUp"})},onClick:(t,r,n)=>{delete n.notifications[r.key],r.update({animation:"fadeOutDown"}),n.onClose&&n.onClose(t,r,n)}}),IconText:null,childrenAs:"state",children:({state:e})=>e.notifications}};var sD=!1,iD=()=>sD?"http://localhost:8080":"https://api.symbols.app",aD=e=>{let t=e&&e.editor&&e.editor.socketUrl||e&&e.settings&&e.settings.socketUrl;return typeof t=="string"&&t?{mode:"collab",baseUrl:t}:e&&e.editor&&e.editor.runtime==="runner"?{mode:"runner",baseUrl:null}:{mode:null,baseUrl:null}},cD=async e=>{try{let t=e||iD(),r=await C.fetch(`${t}/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(t){console.error("[sync] Failed to fetch service-token",t)}},jC=(e,t,r,n)=>{e.on("snapshot",IC(t,r,n)),e.on("ops",$C(t,r,n)),e.on("clients",o=>{n.editor?.verbose&&LC(o,t,r)}),e.on("disconnect",o=>{n.editor?.verbose&&console.info("[sync] disconnected",o)})},lD=async(e,t,r,n)=>{let o=await cD(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=As(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)")}),jC(a,e,t,r),a},fD=(e,t,r)=>{let n=As({transports:["websocket","polling"],reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return n.on("connect",()=>{r.editor?.verbose!==!1&&console.info("[sync] connected (runner)")}),jC(n,e,t,r),n.on("reload",()=>{typeof C<"u"&&C.location&&C.location.reload()}),n},uD=async(e,t,r)=>{let{mode:n,baseUrl:o}=aD(r);return n?n==="collab"?lD(e,t,r,o):n==="runner"?fD(e,t,r):null:null},dD={onInit:uD};var BC=e=>typeof e>"u",FC=e=>!!(e?.editor?.socketUrl||e?.settings?.socketUrl),NC=e=>e?.editor?.runtime==="runner",UC=(e,t)=>{Array.isArray(e.extends)?e.extends.push(t):e.extends?e.extends=[e.extends,t]:e.extends=[t]},VC={name:"sync",beforeCreate(e,t){let r=t&&t.editor;(r&&!BC(r.liveSync)?r.liveSync:FC(t)||NC(t))&&(FC(t)&&!NC(t)&&!t?.key||UC(e,dD))}},zC={name:"notifications",beforeCreate(e,t){if(!t)return;let r=BC(t.notifications)?null:t.notifications,n=t.editor&&t.editor.verbose===!0;(r===!0||r!==!1&&n)&&UC(e,MC)}};var Yb={};I(Yb,{AlertTemplate:()=>Ju,ConfirmTemplate:()=>Xu,CustomTemplate:()=>ed,ModalLayer:()=>Yu,ModalRoot:()=>Gu,PromptTemplate:()=>Qu,windowsComponents:()=>Gb});var Kb={};I(Kb,{alertDialog:()=>qu,closeAllModals:()=>Hu,closeModal:()=>Vu,confirmDialog:()=>Wu,getLayer:()=>Uu,openModal:()=>zu,promptDialog:()=>Ku,windowsFunctions:()=>wr});function Y(e){let t=e;for(;t;){if(t.layer!==void 0)return t.layer;t=t.parent}return null}function Ts(e){let t=e;for(;t;){if(t.key==="ModalRoot")return t;if(t.ModalRoot&&t.ModalRoot.__ref)return t.ModalRoot;t=t.parent}let r=e?.getRoot?.();return r?.ModalRoot?r.ModalRoot:typeof globalThis<"u"&&globalThis.__SMBLS_WINDOWS_MODAL_ROOT__?.__ref?globalThis.__SMBLS_WINDOWS_MODAL_ROOT__:null}function Uu(){return Y(this)}var pD=(e,t)=>{let r=e&&e["ModalLayer_"+t],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"))},HC=(e,t)=>{let r=e&&e["ModalLayer_"+t],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 Vu(e){let t=Ts(this);if(!t)return;let r=t.state?.stack||[];if(!r.length)return;let n,o,s;if(e){if(s=[],n=r.filter((i,a)=>{let c=i.id!==e;return c||s.push(a),c}),n.length===r.length)return;o=r.filter(i=>i.id===e)}else n=r.slice(0,-1),o=r.slice(-1),s=[r.length-1];t.state.update({stack:n});for(let i of s)pD(t,i);for(let i of o)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function zu(e={}){let t=Ts(this);if(!t)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;t.__modalIdCounter=(t.__modalIdCounter||0)+1;let r=e.id||`modal_${t.__modalIdCounter}_${Date.now().toString(36)}`,n={id:r,template:e.template||"custom",title:e.title,message:e.message,icon:e.icon,confirmText:e.confirmText,cancelText:e.cancelText,okText:e.okText,confirmTheme:e.confirmTheme,placeholder:e.placeholder,defaultValue:e.defaultValue,dismissOnBackdrop:e.dismissOnBackdrop,content:e.content,width:e.width,maxWidth:e.maxWidth,maxHeight:e.maxHeight,onConfirm:e.onConfirm,onCancel:e.onCancel,onOk:e.onOk,onClose:e.onClose},o=t.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 HC(t,s),t.state.update({stack:[...o,n]}),r}function Hu(){let e=Ts(this);!e||!e.state?.stack?.length||e.state.update({stack:[]})}function Wu(e){let t=typeof e=="string"?{message:e}:e||{};return this.call("openModal",{...t,template:"confirm"})}function qu(e){let t=typeof e=="string"?{message:e}:e||{};return this.call("openModal",{...t,template:"alert"})}function Ku(e){let t=typeof e=="string"?{message:e}:e||{};return this.call("openModal",{...t,template:"prompt"})}var wr={openModal:zu,closeModal:Vu,closeAllModals:Hu,confirmDialog:Wu,alertDialog:qu,promptDialog:Ku,getLayer:Uu};var hD=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),WC=e=>{if(!e?.querySelectorAll)return[];let t=e.querySelectorAll(hD),r=[];for(let n=0;n<t.length;n++){let o=t[n];(o.offsetParent!==null||o===document.activeElement)&&r.push(o)}return r},qC=e=>{let t=e.state?.stack||[];if(!t.length)return null;let r=e["ModalLayer_"+(t.length-1)];return r?.node||r?.__ref?.node||null},Gu={tag:"div",position:"fixed",inset:"0",zIndex:"2000",pointerEvents:"none",state:{stack:[]},subscribeTo:["stack"],ModalLayer_0:{__slotIndex:0,subscribeTo:["stack"],layer:(e,t)=>t?.stack?.[0]||null,opacity:e=>e.layer?"1":"0",visibility:e=>e.layer?"visible":"hidden",pointerEvents:e=>e.layer?"auto":"none"},ModalLayer_1:{__slotIndex:1,subscribeTo:["stack"],layer:(e,t)=>t?.stack?.[1]||null,opacity:e=>e.layer?"1":"0",visibility:e=>e.layer?"visible":"hidden",pointerEvents:e=>e.layer?"auto":"none"},ModalLayer_2:{__slotIndex:2,subscribeTo:["stack"],layer:(e,t)=>t?.stack?.[2]||null,opacity:e=>e.layer?"1":"0",visibility:e=>e.layer?"visible":"hidden",pointerEvents:e=>e.layer?"auto":"none"},ModalLayer_3:{__slotIndex:3,subscribeTo:["stack"],layer:(e,t)=>t?.stack?.[3]||null,opacity:e=>e.layer?"1":"0",visibility:e=>e.layer?"visible":"hidden",pointerEvents:e=>e.layer?"auto":"none"},ModalLayer_4:{__slotIndex:4,subscribeTo:["stack"],layer:(e,t)=>t?.stack?.[4]||null,opacity:e=>e.layer?"1":"0",visibility:e=>e.layer?"visible":"hidden",pointerEvents:e=>e.layer?"auto":"none"},onInit:(e,t)=>{if(typeof window>"u")return;globalThis.__SMBLS_WINDOWS_MODAL_ROOT__=e;let r=e.context;if(r){r.functions||(r.functions={});for(let a in wr)a in r.functions||(r.functions[a]=wr[a])}e.__modalOpeners=e.__modalOpeners||[],e.__prevStackLen=e.state&&e.state.stack&&e.state.stack.length||0;let n=()=>{let a=e.state?.stack||[];if(!a.length)return;let c=a.length-1,l=a[c];e.state.update({stack:a.slice(0,-1)});let f=e["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=e.state?.stack;if(c?.length){if(a.key==="Tab"){let l=qC(e);if(!l)return;let f=WC(l);if(!f.length){a.preventDefault();let g=l.querySelector?.('[role="dialog"]')||l;try{g.focus?.()}catch{}return}let u=f[0],d=f[f.length-1],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),e.__escHandler=o;let s=a=>{let c=e.state?.stack||[];if(a<0||a>=c.length)return;let l=c[a];e.state.update({stack:c.filter((d,p)=>p!==a)});let f=e["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=e.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=e["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=e["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),e.__clickDelegate=i},onUpdate:e=>{if(typeof window>"u")return;let t=(e.state&&e.state.stack||[]).length,r=e.__prevStackLen||0;if(t!==r)if(e.__prevStackLen=t,e.__modalOpeners=e.__modalOpeners||[],t>r)e.__modalOpeners[t]=document.activeElement&&document.activeElement!==document.body?document.activeElement:e.__modalOpeners[t]||null,typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>{let n=qC(e);if(!n)return;let o=WC(n)[0]||n.querySelector&&n.querySelector('[role="dialog"]')||n;try{o.focus&&o.focus()}catch{}});else{let n=null;for(let o=r;o>t;o--)e.__modalOpeners[o]&&(n=n||e.__modalOpeners[o]),e.__modalOpeners[o]=null;if(n&&typeof n.focus=="function"&&n.isConnected!==!1)try{n.focus()}catch{}}},onDestroy:e=>{typeof window>"u"||(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__===e&&(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__=null),e.__escHandler&&(window.removeEventListener("keydown",e.__escHandler),delete e.__escHandler),e.__clickDelegate&&(document.removeEventListener("click",e.__clickDelegate,!0),delete e.__clickDelegate))}};var Yu={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:(e,t)=>`${2e3+(e.__slotIndex||0)*10}`,display:(e,t)=>e.layer?"flex":"none",opacity:(e,t)=>e.layer?"1":"0",visibility:(e,t)=>e.layer?"visible":"hidden",pointerEvents:(e,t)=>e.layer?"auto":"none",ModalWindow:{attr:{role:"dialog","aria-modal":"true",tabindex:"-1","aria-labelledby":e=>{let t=Y(e)?.id;return t?"modal-title-"+t:null}},width:e=>Y(e)?.width||"H",maxWidth:e=>Y(e)?.maxWidth||"90vw",maxHeight:e=>Y(e)?.maxHeight||null,onClick:e=>e.stopPropagation(),onMousedown:e=>e.stopPropagation(),ModalHeader:{display:"none"},overflow:"visible",ConfirmTemplate:{hide:e=>Y(e)?.template!=="confirm"},AlertTemplate:{hide:e=>Y(e)?.template!=="alert"},PromptTemplate:{hide:e=>Y(e)?.template!=="prompt"},CustomTemplate:{hide:e=>Y(e)?.template!=="custom"}}};var Os=(e,t,r)=>Y(e)?.[t]||r,gD=e=>{let t=Y(e)?.icon;return t===null||t===!1},Xu={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:e=>Os(e,"title","Are you sure?"),attr:{id:e=>{let t=Y(e)?.id;return t?"modal-title-"+t:null}}},P:{text:e=>Os(e,"message","This action cannot be undone."),color:"dim"}},Icons:{hide:e=>gD(e),Indicator:{extends:"Icon",opacity:".7",icon:e=>Os(e,"icon","warning")}}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"Button",theme:"ghost",text:e=>Os(e,"cancelText","Cancel"),onClick:(e,t,r)=>{let n=Y(t);if(n?.onCancel)try{n.onCancel()}catch(o){console.warn("[windows] confirm.onCancel threw:",o)}t.call("closeModal",n?.id)}},ConfirmBtn:{extends:"Button",theme:e=>Os(e,"confirmTheme","primary"),text:e=>Os(e,"confirmText","Confirm"),onClick:(e,t,r)=>{let n=Y(t);if(n?.onConfirm)try{n.onConfirm()}catch(o){console.warn("[windows] confirm.onConfirm threw:",o)}t.call("closeModal",n?.id)}}}};var Zu=(e,t,r)=>Y(e)?.[t]||r,Ju={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:e=>Zu(e,"title","Notice"),attr:{id:e=>{let t=Y(e)?.id;return t?"modal-title-"+t:null}}},P:{text:e=>Zu(e,"message",""),color:"dim"}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:e=>Zu(e,"icon","info")}}},ModalFooter:{flow:"x",align:"center end",OkBtn:{extends:"Button",theme:"primary",text:e=>Zu(e,"okText","OK"),onClick:(e,t,r)=>{let n=Y(t);if(n?.onOk)try{n.onOk()}catch(o){console.warn("[windows] alert.onOk threw:",o)}t.call("closeModal",n?.id)}}}};var Cc=(e,t,r)=>Y(e)?.[t]||r,Qu={tag:"div",flow:"y",gap:"B",scope:{value:""},onRender:(e,t)=>{let r=Y(e);if(!r||e.scope._seededLayerId===r.id)return;e.scope._seededLayerId=r.id,e.scope.value=r.defaultValue||"";let n=e.InputRow&&e.InputRow.node;n&&(n.value=e.scope.value)},onUpdate:(e,t)=>{let r=Y(e);if(!r||e.scope._seededLayerId===r.id)return;e.scope._seededLayerId=r.id,e.scope.value=r.defaultValue||"";let n=e.InputRow&&e.InputRow.node;n&&(n.value=e.scope.value)},ModalHeader:{Hgroup:{H:{text:e=>Cc(e,"title","Enter a value"),attr:{id:e=>{let t=Y(e)?.id;return t?"modal-title-"+t:null}}},P:{text:e=>Cc(e,"message",""),color:"dim"}}},InputRow:{extends:"Input",autofocus:!0,placeholder:e=>Cc(e,"placeholder",""),value:(e,t)=>e.parent.scope?.value||"",onInput:(e,t,r)=>{t.parent.scope.value=e.target.value},onKeydown:(e,t,r)=>{if(e.key!=="Enter")return;e.preventDefault();let n=Y(t),o=t.parent.scope?.value||"";if(n?.onConfirm)try{n.onConfirm(o)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}t.call("closeModal",n?.id)}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"Button",theme:"ghost",text:e=>Cc(e,"cancelText","Cancel"),onClick:(e,t,r)=>{let n=Y(t);if(n?.onCancel)try{n.onCancel()}catch(o){console.warn("[windows] prompt.onCancel threw:",o)}t.call("closeModal",n?.id)}},ConfirmBtn:{extends:"Button",theme:"primary",text:e=>Cc(e,"confirmText","OK"),onClick:(e,t,r)=>{let n=Y(t),o=t.parent.parent.scope?.value||"";if(n?.onConfirm)try{n.onConfirm(o)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}t.call("closeModal",n?.id)}}}};var ed={tag:"div",flow:"y",gap:"B",Title:{tag:"h2",text:e=>Y(e)?.title||"",hide:e=>!Y(e)?.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:e=>{let t=Y(e)?.id;return t?"modal-title-"+t:null}}},Slot:{tag:"div",onInit:e=>{let t=Z(()=>{let r=Y(e),n=r?.content||null,o=r?.id||null;if(!n){e.__lastLayerId!=null&&(e.removeContent(),e.__lastLayerId=null);return}if(e.__lastLayerId!==o){e.__lastLayerId=o;try{e.set(n);let s=e.content?.context;if(s){s.functions||(s.functions={});for(let i in wr)i in s.functions||(s.functions[i]=wr[i])}}catch(s){console.warn("[windows] custom.content set failed:",s)}}});e.__ref&&e.__ref.__effects.push(t)}}};var Gb={ModalRoot:Gu,ModalLayer:Yu,ConfirmTemplate:Xu,AlertTemplate:Ju,PromptTemplate:Qu,CustomTemplate:ed};var Qb={};I(Qb,{Dropdown:()=>id,DropdownList:()=>ad,DropdownParent:()=>cd,DropdownParentFocus:()=>ld,DropdownRoot:()=>od,DropdownSiblingFocus:()=>fd,DropdownTrigger:()=>sd,dropdownComponents:()=>Jb});var KC=(e,t,r)=>({bottom:r-e.bottom,top:e.top,right:t-e.right,left:e.left}),mD=(e,t,r,n)=>{let o=KC(e,r,n),s=i=>o[i]>=t.height+8;return s("bottom")?"bottom":s("top")?"top":o.bottom>=o.top?"bottom":"top"},yD=(e,t,r,n,o)=>{let s=KC(t,n,o),i=e==="top"||e==="bottom"?r.height+8:r.width+8;if(s[e]>=i)return e;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[e];return a&&s[a]>=i?a:e},td=(e,t,r)=>Math.max(t,Math.min(r,e)),nn=(e,t,r="auto")=>{if(!e)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,t?.width||0),height:Math.max(40,t?.height||0)};if(r==="center"){let d=td((n-s.width)/2,8,Math.max(8,n-s.width-8)),p=td((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=mD(e,s,n,o),a="start";else{let d=r.split("-");i=d[0],a=d[1]||"start",i=yD(i,e,s,n,o)}let c,l;i==="bottom"||i==="top"?(a==="start"?c=e.left:a==="end"?c=e.right-s.width:c=e.left+(e.width-s.width)/2,l=i==="bottom"?e.bottom+8:e.top-s.height-8):(a==="start"?l=e.top:a==="end"?l=e.bottom-s.height:l=e.top+(e.height-s.height)/2,c=i==="right"?e.right+8:e.left-s.width-8);let f=Math.max(8,n-s.width-8),u=Math.max(8,o-s.height-8);return c=td(c,8,f),l=td(l,8,u),{left:c,top:l,side:i,align:a}},Rs=e=>{switch(e){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 on={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:"70vh"},bD=e=>{if(!e||typeof e.getBoundingClientRect!="function")return null;let t=e.getBoundingClientRect();return{left:t.left,top:t.top,right:t.right,bottom:t.bottom,width:t.width,height:t.height}},Xb=e=>e?.getRoot?.()?.DropdownRoot||null,_D=0,xD=()=>`dropdown_${++_D}_${Date.now().toString(36)}`;function rd(e={}){let t=Xb(this);if(!t)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=e.anchorEl?.node||e.anchorEl,n=e.anchorRect||bD(r);if(!n)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let o=e.id||xD(),s=e.restoreEl?.node||e.restoreEl||r||(typeof document<"u"?document.activeElement:null),i={id:o,content:e.content||null,anchor:n,placement:e.placement||on.placement,trigger:e.trigger||on.trigger,offset:e.offset??on.offset,minWidth:e.minWidth||on.minWidth,maxWidth:e.maxWidth||on.maxWidth,maxHeight:e.maxHeight||on.maxHeight,theme:e.theme||null,shadow:e.shadow||null,background:e.background||null,round:e.round||null,onOpen:e.onOpen,onClose:e.onClose,restoreEl:s},a=t.state?.layer;if(a?.onClose)try{a.onClose(a)}catch(c){console.warn("[dropdown] prev onClose threw:",c)}if(t.state.update({layer:i}),typeof i.onOpen=="function")try{i.onOpen(i)}catch(c){console.warn("[dropdown] onOpen threw:",c)}return o}function nd(e){let t=Xb(this);if(!t)return;let r=t.state?.layer;r&&t.state.update({layer:{...r,inert:!!e}})}function Hn(e){let t=Xb(this);if(!t)return;let r=t.state?.layer;if(!r)return;let n=typeof e=="string"?e:e?.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=t.node?.querySelector?.('[data-smbls-dropdown="panel"]'),l=!a||a===i?.body,f=!!(c&&a&&c.contains(a)),u=l||f;if(t.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 wD=`
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,7 +141,7 @@ ${i}
141
141
  [data-smbls-dropdown="panel"]:not([data-smbls-shadowed]) {
142
142
  box-shadow: none !important;
143
143
  }
144
- `,oI=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let t=document.createElement("style");t.id="smbls-dropdown-css",t.textContent=rI,document.head.appendChild(t)},IC=(t,e)=>{if(!t.node)return;let r=e?.background;if(!r)t.node.removeAttribute("data-smbls-surface");else{let o=/^[a-z][\w.+-]*$/i.test(r)?`var(--color-${r})`:r;t.node.style.setProperty("--smbls-dropdown-surface",o),t.node.setAttribute("data-smbls-surface","")}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")},nI=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")},Qu={tag:"div",attr:{"data-smbls-dropdown-root":"true"},position:"fixed",inset:"0",zIndex:"1500",pointerEvents:"none",state:{layer:null},onInit:t=>{if(oI(),typeof window>"u")return;let e=o=>{o.key==="Escape"&&t.state?.layer&&(o.preventDefault(),Vo.call(t))};window.addEventListener("keydown",e),t.__dropdownEscHandler=e;let r=o=>{let n=t.state?.layer;if(!n)return;let s=t.node?.querySelector('[data-smbls-dropdown="panel"]');if(s&&s.contains(o.target))return;let i=n.anchor;if(i){let a=o.clientX,c=o.clientY;if(a>=i.left&&a<=i.right&&c>=i.top&&c<=i.bottom)return}Vo.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 to(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 to(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":ks(to(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=Q(()=>{let r=t.parent?.layer,o=r?.content||null,n=r?.id||null;if(!o){if(t.__lastLayerId!=null){try{t.removeContent?.()}catch{}t.__lastLayerId=null}return}if(t.__lastLayerId!==n){t.__lastLayerId=n;try{t.set(o)}catch(s){console.warn("[dropdown] content set failed:",s)}IC(t,r),nI(t),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{if(!t.node)return;IC(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=to(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",ks(c.side))})}});t.__ref&&t.__ref.__effects?.push(e)},onRender:t=>{if(t?.node&&(t.parent?.layer?t.node.setAttribute("data-smbls-open","true"):t.node.removeAttribute("data-smbls-open")),!t?.node)return;let e=t.parent?.layer;if(!e?.anchor)return;let r=t.node.getBoundingClientRect(),o={width:r.width,height:r.height},n=t._lastSize;(!n||Math.abs(n.width-o.width)>1||Math.abs(n.height-o.height)>1)&&(t._lastSize=o);let s=to(e.anchor,o,e.placement);t.node.style.left=s.left+"px",t.node.style.top=s.top+"px",t.node.style.setProperty("--smbls-dropdown-from",ks(s.side))}}}};var Hb=t=>{let e=t?.getRoot?.()?.DropdownRoot?.state?.layer;if(e&&t.dropdownId&&e.id===t.dropdownId){t.call("closeDropdown");return}let r={anchorEl:t,trigger:t.dropdownTrigger||"click",placement:t.dropdownPlacement||"auto",content:t.dropdownContent||null,minWidth:t.dropdownMinWidth,maxWidth:t.dropdownMaxWidth,maxHeight:t.dropdownMaxHeight,theme:t.dropdownTheme,offset:t.dropdownOffset,id:t.dropdownId,onOpen:t.onDropdownOpen,onClose:t.onDropdownClose};for(let o in r)r[o]===void 0&&delete r[o];t.call("openDropdown",r)},td={position:"relative",onClick:(t,e)=>{(e.dropdownTrigger||"click")==="click"&&(t.preventDefault(),t.stopPropagation(),Hb(e))},onFocus:(t,e)=>{e.dropdownTrigger==="focus"&&Hb(e)},onMouseenter:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&clearTimeout(e._hoverTimer),e._hoverTimer=setTimeout(()=>Hb(e),120))},onMouseleave:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&(clearTimeout(e._hoverTimer),e._hoverTimer=null),e._closeTimer=setTimeout(()=>e.call("closeDropdown"),250))}};var ed={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"},rd={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"}}},od={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},nd={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()}}},sd={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 Wb={DropdownRoot:Qu,DropdownTrigger:td,Dropdown:ed,DropdownList:rd,DropdownParent:od,DropdownParentFocus:nd,DropdownSiblingFocus:sd};var Gb={};P(Gb,{DROPDOWN_DEFAULTS:()=>eo,closeDropdown:()=>Vo,computePosition:()=>to,dropdownFunctions:()=>Kb,fadeInTransform:()=>ks,openDropdown:()=>Zu,setDropdownInert:()=>Ju});var Kb={openDropdown:Zu,closeDropdown:Vo,setDropdownInert:Ju};var sI=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),iI=(t,e,r,o,n)=>{let s=sI(e,o,n),i=t==="top"||t==="bottom"?r.height+6:r.width+6;if(s[t]>=i)return t;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[t];return a&&s[a]>=i?a:t},DC=(t,e,r)=>Math.max(e,Math.min(r,t)),id=(t,e,r="bottom")=>{if(!t)return{left:0,top:0,side:"bottom"};let o=typeof window<"u"?window.innerWidth:1024,n=typeof window<"u"?window.innerHeight:768,s=iI(r,t,e,o,n),i,a;return s==="bottom"||s==="top"?(i=t.left+(t.width-e.width)/2,a=s==="bottom"?t.bottom+6:t.top-e.height-6):(a=t.top+(t.height-e.height)/2,i=s==="right"?t.right+6:t.left-e.width-6),i=DC(i,6,o-e.width-6),a=DC(a,6,n-e.height-6),{left:i,top:a,side:s}},$C=t=>{switch(t){case"bottom":return"translateY(-4px)";case"top":return"translateY(4px)";case"left":return"translateX(4px)";case"right":return"translateX(-4px)";default:return"translateY(-4px)"}};var aI=`
144
+ `,SD=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let e=document.createElement("style");e.id="smbls-dropdown-css",e.textContent=wD,document.head.appendChild(e)},GC=(e,t)=>{if(!e.node)return;let r=t?.background;if(!r)e.node.removeAttribute("data-smbls-surface");else{let n=/^[a-z][\w.+-]*$/i.test(r)?`var(--color-${r})`:r;e.node.style.setProperty("--smbls-dropdown-surface",n),e.node.setAttribute("data-smbls-surface","")}t?.theme?e.node.setAttribute("data-smbls-themed",""):e.node.removeAttribute("data-smbls-themed"),t?.shadow?e.node.setAttribute("data-smbls-shadowed",""):e.node.removeAttribute("data-smbls-shadowed")},kD=e=>{e.node&&(e.node.style.animation="none",e.node.offsetWidth,e.node.style.animation="smbls-dropdown-fade-in 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both")},od={tag:"div",attr:{"data-smbls-dropdown-root":"true"},position:"fixed",inset:"0",zIndex:"1500",pointerEvents:"none",state:{layer:null},onInit:e=>{if(SD(),typeof window>"u")return;let t=n=>{n.key==="Escape"&&e.state?.layer&&(n.preventDefault(),Hn.call(e))};window.addEventListener("keydown",t),e.__dropdownEscHandler=t;let r=n=>{let o=e.state?.layer;if(!o)return;let s=e.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}Hn.call(e)};document.addEventListener("mousedown",r,!0),e.__dropdownClickHandler=r},onRemove:e=>{typeof window>"u"||(e.__dropdownEscHandler&&window.removeEventListener("keydown",e.__dropdownEscHandler),e.__dropdownClickHandler&&document.removeEventListener("mousedown",e.__dropdownClickHandler,!0))},PanelHost:{tag:"div",position:"fixed",inset:"0",pointerEvents:"none",subscribeTo:["layer"],layer:(e,t)=>t?.layer||null,Panel:{tag:"div",attr:{"data-smbls-dropdown":"panel"},position:"fixed",subscribeTo:["layer"],left:e=>{let t=e.parent?.layer;if(!t?.anchor)return"-9999px";let r=e._lastSize||{width:280,height:200};return nn(t.anchor,r,t.placement).left+"px"},top:e=>{let t=e.parent?.layer;if(!t?.anchor)return"-9999px";let r=e._lastSize||{width:280,height:200};return nn(t.anchor,r,t.placement).top+"px"},style:e=>{let t=e.parent?.layer;if(!t?.anchor)return{};let r=e._lastSize||{width:280,height:200};return{"--smbls-dropdown-from":Rs(nn(t.anchor,r,t.placement).side)}},minWidth:e=>e.parent?.layer?.minWidth||"180px",maxWidth:e=>e.parent?.layer?.maxWidth||"90vw",maxHeight:e=>e.parent?.layer?.maxHeight||"70vh",overflow:"auto",overscrollBehavior:"contain",padding:"0",round:e=>e.parent?.layer?.round||"radiusCard",theme:e=>e.parent?.layer?.theme||null,border:"none",borderWidth:"0",shadow:e=>e.parent?.layer?.shadow||null,pointerEvents:e=>{let t=e.parent?.layer;return t?t.inert?"none":"auto":"none"},opacity:e=>e.parent?.layer?"0.999":"0",onClick:e=>e.stopPropagation(),onInit:e=>{let t=Z(()=>{let r=e.parent?.layer,n=r?.content||null,o=r?.id||null;if(!n){if(e.__lastLayerId!=null){try{e.removeContent?.()}catch{}e.__lastLayerId=null}return}if(e.__lastLayerId!==o){e.__lastLayerId=o;try{e.set(n)}catch(s){console.warn("[dropdown] content set failed:",s)}GC(e,r),kD(e),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{if(!e.node)return;GC(e,r);let s=e.parent?.layer;if(!s?.anchor)return;let i=e.node.getBoundingClientRect(),a={width:i.width,height:i.height};e._lastSize=a;let c=nn(s.anchor,a,s.placement);e.node.style.left=c.left+"px",e.node.style.top=c.top+"px",e.node.style.setProperty("--smbls-dropdown-from",Rs(c.side))})}});e.__ref&&e.__ref.__effects?.push(t)},onRender:e=>{if(e?.node&&(e.parent?.layer?e.node.setAttribute("data-smbls-open","true"):e.node.removeAttribute("data-smbls-open")),!e?.node)return;let t=e.parent?.layer;if(!t?.anchor)return;let r=e.node.getBoundingClientRect(),n={width:r.width,height:r.height},o=e._lastSize;(!o||Math.abs(o.width-n.width)>1||Math.abs(o.height-n.height)>1)&&(e._lastSize=n);let s=nn(t.anchor,n,t.placement);e.node.style.left=s.left+"px",e.node.style.top=s.top+"px",e.node.style.setProperty("--smbls-dropdown-from",Rs(s.side))}}}};var Zb=e=>{let t=e?.getRoot?.()?.DropdownRoot?.state?.layer;if(t&&e.dropdownId&&t.id===e.dropdownId){e.call("closeDropdown");return}let r={anchorEl:e,trigger:e.dropdownTrigger||"click",placement:e.dropdownPlacement||"auto",content:e.dropdownContent||null,minWidth:e.dropdownMinWidth,maxWidth:e.dropdownMaxWidth,maxHeight:e.dropdownMaxHeight,theme:e.dropdownTheme,offset:e.dropdownOffset,id:e.dropdownId,onOpen:e.onDropdownOpen,onClose:e.onDropdownClose};for(let n in r)r[n]===void 0&&delete r[n];e.call("openDropdown",r)},sd={position:"relative",onClick:(e,t)=>{(t.dropdownTrigger||"click")==="click"&&(e.preventDefault(),e.stopPropagation(),Zb(t))},onFocus:(e,t)=>{t.dropdownTrigger==="focus"&&Zb(t)},onMouseenter:(e,t)=>{t.dropdownTrigger==="hover"&&(t._hoverTimer&&clearTimeout(t._hoverTimer),t._hoverTimer=setTimeout(()=>Zb(t),120))},onMouseleave:(e,t)=>{t.dropdownTrigger==="hover"&&(t._hoverTimer&&(clearTimeout(t._hoverTimer),t._hoverTimer=null),t._closeTimer=setTimeout(()=>t.call("closeDropdown"),250))}};var id={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"},ad={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:e=>e.options||[],childrenAs:"props",".hidden":{transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},childExtends:{extends:"Button",state:{},isActive:({key:e,state:t})=>t.active===e,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:e,state:t})=>t.active===e,name:"checkmark",opacity:"0.1",".active":{opacity:"1"}},":not(:first-child)":{"@dark":{border:"solid gray4.65"},"@light":{border:"solid gray11"},borderWidth:"1px 0 0"}}},cd={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},ld={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:(e,t)=>{t.node===document.activeElement&&t.node.blur()}},Dropdown:{onClick:()=>{document.activeElement?.blur()}}},fd={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:(e,t)=>{t.node===document.activeElement&&t.node.blur()}}};var Jb={DropdownRoot:od,DropdownTrigger:sd,Dropdown:id,DropdownList:ad,DropdownParent:cd,DropdownParentFocus:ld,DropdownSiblingFocus:fd};var t_={};I(t_,{DROPDOWN_DEFAULTS:()=>on,closeDropdown:()=>Hn,computePosition:()=>nn,dropdownFunctions:()=>e_,fadeInTransform:()=>Rs,openDropdown:()=>rd,setDropdownInert:()=>nd});var e_={openDropdown:rd,closeDropdown:Hn,setDropdownInert:nd};var vD=(e,t,r)=>({bottom:r-e.bottom,top:e.top,right:t-e.right,left:e.left}),CD=(e,t,r,n,o)=>{let s=vD(t,n,o),i=e==="top"||e==="bottom"?r.height+6:r.width+6;if(s[e]>=i)return e;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[e];return a&&s[a]>=i?a:e},YC=(e,t,r)=>Math.max(t,Math.min(r,e)),ud=(e,t,r="bottom")=>{if(!e)return{left:0,top:0,side:"bottom"};let n=typeof window<"u"?window.innerWidth:1024,o=typeof window<"u"?window.innerHeight:768,s=CD(r,e,t,n,o),i,a;return s==="bottom"||s==="top"?(i=e.left+(e.width-t.width)/2,a=s==="bottom"?e.bottom+6:e.top-t.height-6):(a=e.top+(e.height-t.height)/2,i=s==="right"?e.right+6:e.left-t.width-6),i=YC(i,6,n-t.width-6),a=YC(a,6,o-t.height-6),{left:i,top:a,side:s}},XC=e=>{switch(e){case"bottom":return"translateY(-4px)";case"top":return"translateY(4px)";case"left":return"translateX(4px)";case"right":return"translateX(-4px)";default:return"translateY(-4px)"}};var ED=`
145
145
  @keyframes smbls-tooltip-fade-in {
146
146
  from { opacity: 0; transform: var(--smbls-tooltip-from, translateY(-4px)); }
147
147
  to { opacity: 1; transform: translate3d(0, 0, 0); }
@@ -149,4 +149,4 @@ ${i}
149
149
  [data-smbls-tooltip="panel"][data-smbls-open="true"] {
150
150
  animation: smbls-tooltip-fade-in 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
151
151
  }
152
- `,cI=()=>{if(typeof document>"u"||document.getElementById("smbls-tooltip-css"))return;let t=document.createElement("style");t.id="smbls-tooltip-css",t.textContent=aI,document.head.appendChild(t)},LC={tag:"div",attr:{"data-smbls-tooltip-root":"true"},position:"fixed",inset:"0",zIndex:"2500",pointerEvents:"none",state:{tip:null},onInit:()=>{cI()},Panel:{tag:"div",attr:{"data-smbls-tooltip":"panel"},position:"fixed",subscribeTo:["tip"],tip:(t,e)=>e?.tip||null,left:t=>{let e=t.tip;if(!e?.anchor)return"-9999px";let r=t._lastSize||{width:200,height:32};return id(e.anchor,r,e.placement).left+"px"},top:t=>{let e=t.tip;if(!e?.anchor)return"-9999px";let r=t._lastSize||{width:200,height:32};return id(e.anchor,r,e.placement).top+"px"},style:t=>{let e=t.tip;if(!e?.anchor)return{};let r=t._lastSize||{width:200,height:32};return{"--smbls-tooltip-from":$C(id(e.anchor,r,e.placement).side)}},text:t=>t.tip?.text||"",theme:t=>t.tip?.theme||"tooltip .quaternary",maxWidth:"280px",padding:"Y2 Z",round:"Z",fontSize:"Y2",lineHeight:"1.35",whiteSpace:"normal",pointerEvents:"none",opacity:t=>t.tip?"1":"0",visibility:t=>t.tip?"visible":"hidden",transition:"B opacity defaultBezier, B visibility defaultBezier",onRender:t=>{if(t?.node&&(t.tip?t.node.setAttribute("data-smbls-open","true"):t.node.removeAttribute("data-smbls-open")),!t?.node)return;let e=t.node.getBoundingClientRect(),r={width:e.width,height:e.height},o=t._lastSize;if(!o||Math.abs(o.width-r.width)>1||Math.abs(o.height-r.height)>1){t._lastSize=r;let n=t.getParent?.();n?.state?.tip&&n.state.update({tip:{...n.state.tip}})}}}};var lI=t=>{t.tooltipText&&t.call("openTooltip",{anchorEl:t,text:t.tooltipText,placement:t.tooltipPlacement||"bottom",theme:t.tooltipTheme,id:t.tooltipId||t.key})},MC=t=>{t._tooltipHideTimer&&(clearTimeout(t._tooltipHideTimer),t._tooltipHideTimer=null),!t._tooltipShowTimer&&(t._tooltipShowTimer=setTimeout(()=>{t._tooltipShowTimer=null,lI(t)},t.tooltipDelay??250))},FC=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))},NC={onMouseenter:(t,e)=>MC(e),onMouseleave:(t,e)=>FC(e),onFocus:(t,e)=>MC(e),onBlur:(t,e)=>FC(e)};R();var jC={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=>yt(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)}},BC={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)}},UC={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:r}=t,o=e||r;if(!o)return;let n=o&&o[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":n||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var VC={TooltipRoot:LC,TooltipTrigger:NC,Tooltip:jC,TooltipHidden:BC,TooltipParent:UC};var zC={placement:"bottom",theme:"tooltip .quaternary",delay:250,hideDelay:100},fI=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}},HC=t=>t?.getRoot?.()?.TooltipRoot||null,uI=0,dI=()=>`tooltip_${++uI}_${Date.now().toString(36)}`;function WC(t={}){let e=HC(this);if(!e)return console.warn("[tooltip] openTooltip: TooltipRoot is not mounted on the app root. Add `TooltipRoot: {}` to your shell tree and import tooltip components into context."),null;let r=t.anchorEl?.node||t.anchorEl,o=t.anchorRect||fI(r);if(!o)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let n=t.id||dI(),s={id:n,text:t.text||"",anchor:o,placement:t.placement||zC.placement,theme:t.theme||zC.theme};return e.state.update({tip:s}),n}function qC(t){let e=HC(this);if(!e)return;let r=e.state?.tip;if(!r)return;let o=typeof t=="string"?t:t?.id;o&&r.id&&o!==r.id||e.state.update({tip:null})}var KC={openTooltip:WC,closeTooltip:qC};var GC=t=>!!(t&&typeof t=="object"&&t.__isStub===!0),pI=(t,e)=>{let r=e?.sharedLibraries,o=Array.isArray(r)?r.map(s=>typeof s=="string"?s:s?.key||s?.name):r&&typeof r=="object"?Object.keys(r):null,n=0;return t.map(s=>{if(!GC(s))return s;let i=n++;if(typeof s.__libraryKey=="string"&&s.__libraryKey)return s.__libraryKey;if(o&&o[i])return o[i];if(typeof s.__stubId=="string"){let a=s.__stubId.match(/^@symbo[-.]ls\/([^/]+)/);if(a)return a[1]}return null}).filter(Boolean)},hI=async(t,e={})=>{let r=e.symbolsConfig,o=r?.owner&&r?.key?`${r.owner}--${r.key}`:r?.key,n=e.key=e.key||o||(w(t)?t:"smblsapp");if(e.define=e.define||ss,e.cssPropsRegistry=_t,e.window=xv(e),e.sharedLibraries&&e.sharedLibraries.length){if(e.sharedLibraries.some(g=>typeof g=="string"||GC(g))){e.sharedLibraries=pI(e.sharedLibraries,e.symbolsConfig);let{resolveSharedLibraries:g}=await Promise.resolve().then(()=>(R(),$l));e.sharedLibraries=await g(e.sharedLibraries,{apiBaseUrl:gb()})}yv(e.sharedLibraries),Pv(e)}wc(e,e.designSystem);let[s,i]=Tv(n,e);e.designSystem=s,e.registry=i,e.cases||(e.cases={}),e.shorthand&&nc.prepareContext(e);let a=Ov(t,e);if(e.state=a,Ci(a),e.pages=Rv(t,e),e.components=wv(e),e.utils=Sv(e),Or[e.packageManager]&&(e.dependencies=await vv(e)),e.methods=kv(e),e.routerOptions=lk(t,e),e.defaultExtends=[Wf],e.snippets=e.snippets||{},e.functions=e.functions||{},e.plugins=e.plugins||[],e.plugins.some(h=>!h||typeof h!="object")){let h=e.plugins.filter(g=>!g||typeof g!="object");e.plugins=e.plugins.filter(g=>g&&typeof g=="object"),e.verbose!==!1&&console.warn(`[smbls] context.plugins carried ${h.length} non-plugin entr${h.length===1?"y":"ies"} (${h.map(g=>JSON.stringify(g)).join(", ")}) \u2014 dropped. A published project that imports a framework plugin it does not declare ships a stub phantom here; the runtime registers polyglot/helmet/fetch/... itself from the context config, so remove the import instead.`)}e.globalScope&&S(e.globalScope)&&(e.globalScope=Ws(e.globalScope));let c=(h,g)=>{let p=g?h[g]:h;if(!S(p))return;let m=de(p);try{Object.assign(p,m)}catch(b){if(g)h[g]=m;else throw b}};c(t),c(e,"components"),c(e,"pages"),c(e,"functions"),c(e,"methods"),c(e,"snippets"),c(e,"app");let l=h=>h&&typeof h.select=="function";e.fetch?.__resolved&&!l(e.fetch.__resolved)&&delete e.fetch.__resolved,e.db?.__resolved&&!l(e.db.__resolved)&&delete e.db.__resolved;let f=h=>e.plugins.some(g=>g&&g.name===h);if(e.polyglot&&!f("polyglot")){e.plugins.push(as);for(let h in uc)typeof e.functions[h]!="function"&&(e.functions[h]=uc[h])}if(f("helmet")||e.plugins.push(Uy),e.fetch&&!f("fetch")&&e.plugins.push(gh),e.designSystem?.typography?.useCapsize!==!1&&!f("capsize")&&(e.plugins.push(nu),e.cssPropsRegistry.useCapsize=Wy),e.shorthand&&!f("shorthand")&&e.plugins.push(nc),e.analyze&&!f("analyze")){let h=e.analyze===!0?{}:e.analyze;e.analyze=gu(h),e.plugins.push(ls)}e.sync!==!1&&!f("sync")&&e.plugins.push(EC),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(AC);let d=(h,g,p)=>{if(e[h]!==!1){for(let m in g)S(e.components[m])||(e.components[m]=g[m]);for(let m in p)typeof e.functions[m]!="function"&&(e.functions[m]=p[m])}};return d("windows",Ub,_r),d("dropdown",Wb,Kb),d("tooltip",VC,KC),e},Yb=async(t,e)=>{S(e)||(e={}),or(t)?(t={},e.parent=t):w(t)?(t={},e.key=t):S(t)||(t={});let r=e.window||(typeof window<"u"?window:null),o=r?.__BRENDER__,n=null;if(o){let c=e.document||(typeof document<"u"?document:null);c&&(n=Array.from(c.head.querySelectorAll("style")))}if(await hI(t,e),e.useReset!==!1){let c=e.document||(typeof document<"u"?document:null);if(c){let l=c.head.querySelector("style[data-smbls]");l||(l=c.createElement("style"),l.setAttribute("data-smbls",""),c.head.appendChild(l));let f=l.sheet;if(f){try{f.insertRule("*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }",0)}catch{}try{f.insertRule("h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }",1)}catch{}}}}if(e.app&&S(e.app))for(let c in e.app)t[c]===void 0&&(t[c]=e.app[c]);t.extends=wk(t,e),e.router!==!1&&(t.routes=e.pages),t.state=e.state,t.context=e,t.data=t.data||{},e.skipDesignSystemInit||await Cv({functions:e.functions,utils:e.utils,snippets:e.snippets,...e.files},e);for(let c of e.plugins)if(typeof c.beforeCreate=="function")try{c.beforeCreate(t,e)}catch(l){console.error(`[smbls] plugin "${c.name||"?"}" beforeCreate error:`,l)}let s=e.document;if(!s||!s.createElement)return t;let i=e.parent||s.body;if(o)return gI(ae,t,i,e,r,n);let a=ae(t,i,e.key,{verbose:e.verbose,context:e,...e.domqlOptions});return typeof window<"u"&&!e.document&&(window.__smblsApp=a),a},gI=async(t,e,r,o,n,s)=>{let i=r.ownerDocument||document;s&&s.forEach(l=>{l.parentNode&&l.remove()});let a=[];for(let l of r.childNodes){if(l.nodeType===1){let f=l.tagName.toLowerCase();if(f==="script"||f==="link"||f==="style"||f==="svg"&&l.id)continue}a.push(l)}a.forEach(l=>l.remove()),i.querySelectorAll("[data-br]").forEach(l=>l.removeAttribute("data-br"));let c=t(e,r,o.key,{verbose:o.verbose,context:o,...o.domqlOptions});return mI(n),c},mI=t=>{t&&(delete t.__BRENDER__,delete t.__BR_REGISTRY__)};var Xb=(t,e)=>st(t,S(e)?e:{}),yI=t=>{if(typeof document>"u")return;let e=t.themeRoot||t.document&&t.document.documentElement||document.documentElement;if(!e||typeof e.setAttribute!="function")return;let r=t.globalTheme||"auto";try{if(typeof window<"u"&&window.location){let s=new URLSearchParams(window.location.search).get("globalTheme");s&&(r=s)}}catch{}let o=t.themeStorageKey;if(r==="auto"&&o&&typeof localStorage<"u")try{let s=localStorage.getItem(o);s&&(r=s)}catch{}let n=r==="auto"?(()=>{try{return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}})():r;e.setAttribute("data-theme",n),t.globalTheme=r,t.themeRoot=e},bI=()=>{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}},YC=t=>{let e=bI();e&&(t.editor||(t.editor={}),t.editor.runtime||(t.editor.runtime=e),e==="runner"&&typeof t.editor.livesync>"u"&&(t.editor.livesync=!0))},Zb=(t,e=qr,r)=>{let o={...qr,...Xb(e,r)};return YC(o),yI(o),Yb(t,o).then(s=>{if(jy(s,o),s.destroy=()=>Ga(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Ka(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},s.onCreate&&s.onCreate(s,s.state,s.context,o),s.context?.analyze?.activate)try{s.context.analyze.activate(s.context)}catch(i){console.error("[analyze] activate error:",i)}return s}).catch(s=>{throw console.error("[smbls] create error:",s),s})},_I=(t,e=qr,r)=>{let o=Zb(t,e,r),n={...qr,...Xb(e,r)},s=n.key;return pk(o,s,{utils:qa,...n}),o},xI=async(t,e=qr,r)=>{let o={...qr,...Xb(e,r)};YC(o);let n=e.key;await dk(n,o);let s=await Yb(t,o);return jy(s,o),s.destroy=()=>Ga(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Ka(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},o.onCreate&&await o.onCreate(s,s.state,s.context,o),s},wI=(t={},e=qr,r)=>Zb({deps:{isUndefined:At},...t},st({domqlOptions:{onlyResolveExtends:!0}},e),r);Zf(Ra);pv(void 0,{smbls:Jb});hv(void 0,{"@symbo.ls/windows":()=>({...Vb,...Bb}),"@symbo.ls/dropdown":()=>({...qb,...Gb})});
152
+ `,AD=()=>{if(typeof document>"u"||document.getElementById("smbls-tooltip-css"))return;let e=document.createElement("style");e.id="smbls-tooltip-css",e.textContent=ED,document.head.appendChild(e)},ZC={tag:"div",attr:{"data-smbls-tooltip-root":"true"},position:"fixed",inset:"0",zIndex:"2500",pointerEvents:"none",state:{tip:null},onInit:()=>{AD()},Panel:{tag:"div",attr:{"data-smbls-tooltip":"panel"},position:"fixed",subscribeTo:["tip"],tip:(e,t)=>t?.tip||null,left:e=>{let t=e.tip;if(!t?.anchor)return"-9999px";let r=e._lastSize||{width:200,height:32};return ud(t.anchor,r,t.placement).left+"px"},top:e=>{let t=e.tip;if(!t?.anchor)return"-9999px";let r=e._lastSize||{width:200,height:32};return ud(t.anchor,r,t.placement).top+"px"},style:e=>{let t=e.tip;if(!t?.anchor)return{};let r=e._lastSize||{width:200,height:32};return{"--smbls-tooltip-from":XC(ud(t.anchor,r,t.placement).side)}},text:e=>e.tip?.text||"",theme:e=>e.tip?.theme||"tooltip .quaternary",maxWidth:"280px",padding:"Y2 Z",round:"Z",fontSize:"Y2",lineHeight:"1.35",whiteSpace:"normal",pointerEvents:"none",opacity:e=>e.tip?"1":"0",visibility:e=>e.tip?"visible":"hidden",transition:"B opacity defaultBezier, B visibility defaultBezier",onRender:e=>{if(e?.node&&(e.tip?e.node.setAttribute("data-smbls-open","true"):e.node.removeAttribute("data-smbls-open")),!e?.node)return;let t=e.node.getBoundingClientRect(),r={width:t.width,height:t.height},n=e._lastSize;if(!n||Math.abs(n.width-r.width)>1||Math.abs(n.height-r.height)>1){e._lastSize=r;let o=e.getParent?.();o?.state?.tip&&o.state.update({tip:{...o.state.tip}})}}}};var TD=e=>{e.tooltipText&&e.call("openTooltip",{anchorEl:e,text:e.tooltipText,placement:e.tooltipPlacement||"bottom",theme:e.tooltipTheme,id:e.tooltipId||e.key})},JC=e=>{e._tooltipHideTimer&&(clearTimeout(e._tooltipHideTimer),e._tooltipHideTimer=null),!e._tooltipShowTimer&&(e._tooltipShowTimer=setTimeout(()=>{e._tooltipShowTimer=null,TD(e)},e.tooltipDelay??250))},QC=e=>{e._tooltipShowTimer&&(clearTimeout(e._tooltipShowTimer),e._tooltipShowTimer=null),!e._tooltipHideTimer&&(e._tooltipHideTimer=setTimeout(()=>{e._tooltipHideTimer=null,e.call("closeTooltip",e.tooltipId||e.key)},e.tooltipHideDelay??100))},eE={onMouseenter:(e,t)=>JC(t),onMouseleave:(e,t)=>QC(t),onFocus:(e,t)=>JC(t),onBlur:(e,t)=>QC(t)};var tE={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:e=>e.call("isDefined",e.parent.title)||e.parent.title,width:"fit-content",fontWeight:500,color:"currentColor",text:e=>e.parent.title},P:{if:(e,t)=>e.call("isDefined",e.call("exec",e.parent.description,e))||e.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"currentColor",fontWeight:"400",text:(e,t)=>e.call("exec",e.parent.description,e)}},rE={extends:"Tooltip",position:"absolute",pointerEvents:"none",opacity:"0",visibility:"hidden",transition:"C defaultBezier opacity, C defaultBezier visibility, B defaultBezier transform",onInit:e=>{let t=!e.shapeDirection||e.shapeDirection==="top"?{top:"112%",left:"50%",transform:"translate3d(-50%,10%,0)",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:e.shapeDirection==="right"?{transform:"translate3d(10%,-50%,0)",left:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:e.shapeDirection==="bottom"?{transform:"translate3d(-50%,-10%,0)",bottom:"112%",left:"50%",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:e.shapeDirection==="left"?{transform:"translate3d(10%,-50%,0)",right:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:{};Object.assign(e,t)},style:e=>{if(!e.parent||!e.parent.state.tooltipOpen)return{opacity:"",visibility:"",transform:""};let t=e.shapeDirection;return{opacity:"1",visibility:"visible",transform:t==="left"||t==="right"?"translate3d(0%,-50%,0)":"translate3d(-50%,0,0)"}},styleDeps:[e=>e.parent&&e.parent.state.tooltipOpen]},nE={position:"relative",zIndex:999,state:{tooltipOpen:!1},onInit:e=>{let{Tooltip:t,TooltipHidden:r}=e,n=t||r;if(!n)return;let o=n&&n[".isActive"];Object.assign(e,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":o||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})},onPointerdown:(e,t,r)=>{e.pointerType==="touch"&&r.update({tooltipOpen:!r.tooltipOpen})},onDocumentKeydown:(e,t,r)=>{e.key!=="Escape"||!r.tooltipOpen||r.update({tooltipOpen:!1})},onDocumentPointerdown:(e,t,r)=>{r.tooltipOpen&&(t.node&&t.node.contains(e.target)||r.update({tooltipOpen:!1}))}};var oE={TooltipRoot:ZC,TooltipTrigger:eE,Tooltip:tE,TooltipHidden:rE,TooltipParent:nE};var sE={placement:"bottom",theme:"tooltip .quaternary",delay:250,hideDelay:100},OD=e=>{if(!e||typeof e.getBoundingClientRect!="function")return null;let t=e.getBoundingClientRect();return{left:t.left,top:t.top,right:t.right,bottom:t.bottom,width:t.width,height:t.height}},iE=e=>e?.getRoot?.()?.TooltipRoot||null,RD=0,PD=()=>`tooltip_${++RD}_${Date.now().toString(36)}`;function aE(e={}){let t=iE(this);if(!t)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=e.anchorEl?.node||e.anchorEl,n=e.anchorRect||OD(r);if(!n)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let o=e.id||PD(),s={id:o,text:e.text||"",anchor:n,placement:e.placement||sE.placement,theme:e.theme||sE.theme};return t.state.update({tip:s}),o}function cE(e){let t=iE(this);if(!t)return;let r=t.state?.tip;if(!r)return;let n=typeof e=="string"?e:e?.id;n&&r.id&&n!==r.id||t.state.update({tip:null})}var lE={openTooltip:aE,closeTooltip:cE};var fE=e=>!!(e&&typeof e=="object"&&e.__isStub===!0),uE=e=>Kt(e)?e.library!==void 0?e.library:e.key??e.name:e,DD=(e,t)=>{let r=t?.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 e.map(i=>{let a=uE(i);if(!fE(a))return i;let c=s(a);return c?Kt(i)?{...i,library:c}:c:null}).filter(Boolean)},ID=async(e,t={})=>{let r=t.symbolsConfig,n=r?.owner&&r?.key?`${r.owner}--${r.key}`:r?.key,o=t.key=t.key||n||(w(e)?e:"smblsapp");if(t.define=t.define||ds,t.cssPropsRegistry=ye,t.window=Mv(t),t.sharedLibraries&&t.sharedLibraries.length){if(t.sharedLibraries.some(g=>{let h=uE(g);return typeof h=="string"||fE(h)})){t.sharedLibraries=DD(t.sharedLibraries,t.symbolsConfig);let{resolveSharedLibraries:g}=await Promise.resolve().then(()=>(P(),Fl));t.sharedLibraries=await g(t.sharedLibraries,{apiBaseUrl:Sb()})}Iv(t.sharedLibraries),Kv(t)}vc(t,t.designSystem);let[s,i]=Hv(o,t);t.designSystem=s,t.registry=i,t.cases||(t.cases={}),t.shorthand&&ac.prepareContext(t);let a=Wv(e,t);if(t.state=a,Pi(a),t.pages=qv(e,t),t.components=Fv(t),t.utils=Nv(t),Pr[t.packageManager]&&(t.dependencies=await Bv(t)),t.methods=jv(t),t.routerOptions=Ck(e,t),t.defaultExtends=[Xf],t.snippets=t.snippets||{},t.functions=t.functions||{},t.plugins=t.plugins||[],t.plugins.some(p=>!p||typeof p!="object")){let p=t.plugins.filter(g=>!g||typeof g!="object");t.plugins=t.plugins.filter(g=>g&&typeof g=="object"),t.verbose!==!1&&console.warn(`[smbls] context.plugins carried ${p.length} non-plugin entr${p.length===1?"y":"ies"} (${p.map(g=>JSON.stringify(g)).join(", ")}) \u2014 dropped. A published project that imports a framework plugin it does not declare ships a stub phantom here; the runtime registers polyglot/helmet/fetch/... itself from the context config, so remove the import instead.`)}t.globalScope&&k(t.globalScope)&&(t.globalScope=Js(t.globalScope));let c=(p,g)=>{let h=g?p[g]:p;if(!k(h))return;let m=pt(h);try{Object.assign(h,m)}catch(_){if(g)p[g]=m;else throw _}};c(e),c(t,"components"),c(t,"pages"),c(t,"functions"),c(t,"methods"),c(t,"snippets"),c(t,"app");let l=p=>p&&typeof p.select=="function";t.fetch?.__resolved&&!l(t.fetch.__resolved)&&delete t.fetch.__resolved,t.db?.__resolved&&!l(t.db.__resolved)&&delete t.db.__resolved;let f=p=>t.plugins.some(g=>g&&g.name===p);if(t.polyglot&&!f("polyglot")){t.plugins.push(hs);for(let p in hc)typeof t.functions[p]!="function"&&(t.functions[p]=hc[p])}if(f("helmet")||t.plugins.push(Gy),t.fetch&&!f("fetch")&&t.plugins.push(Sh),t.designSystem?.typography?.useCapsize!==!1&&!f("capsize")&&(t.plugins.push(lu),t.cssPropsRegistry.useCapsize=Jy),t.shorthand&&!f("shorthand")&&t.plugins.push(ac),t.analyze&&!f("analyze")){let p=t.analyze===!0?{}:t.analyze;t.analyze=xu(p),t.plugins.push(ms)}t.sync!==!1&&!f("sync")&&t.plugins.push(VC),t.inspect&&!f("inspect")&&t.plugins.push(xb),(t.notifications===!0||t.editor&&t.editor.verbose===!0)&&t.notifications!==!1&&!f("notifications")&&t.plugins.push(zC);let d=(p,g,h)=>{if(t[p]!==!1){for(let m in g)k(t.components[m])||(t.components[m]=g[m]);for(let m in h)typeof t.functions[m]!="function"&&(t.functions[m]=h[m])}};return d("windows",Gb,wr),d("dropdown",Jb,e_),d("tooltip",oE,lE),t},r_=async(e,t)=>{k(t)||(t={}),or(e)?(e={},t.parent=e):w(e)?(e={},t.key=e):k(e)||(e={});let r=t.window||(typeof window<"u"?window:null),n=r?.__BRENDER__,o=null;if(n){let c=t.document||(typeof document<"u"?document:null);c&&(o=Array.from(c.head.querySelectorAll("style")))}if(await ID(e,t),t.useReset!==!1){let c=t.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(t.app&&k(t.app))for(let c in t.app)e[c]===void 0&&(e[c]=t.app[c]);e.extends=Fk(e,t),t.router!==!1&&(e.routes=t.pages),e.state=t.state,e.context=t,e.data=e.data||{},t.skipDesignSystemInit||await Uv({functions:t.functions,utils:t.utils,snippets:t.snippets,...t.files},t);for(let c of t.plugins)if(typeof c.beforeCreate=="function")try{c.beforeCreate(e,t)}catch(l){console.error(`[smbls] plugin "${c.name||"?"}" beforeCreate error:`,l)}let s=t.document;if(!s||!s.createElement)return e;let i=t.parent||s.body;if(n)return $D(ct,e,i,t,r,o);let a=ct(e,i,t.key,{verbose:t.verbose,context:t,...t.domqlOptions});return typeof window<"u"&&!t.document&&(window.__smblsApp=a),a},$D=async(e,t,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=e(t,r,n.key,{verbose:n.verbose,context:n,...n.domqlOptions});return LD(o),c},LD=e=>{e&&(delete e.__BRENDER__,delete e.__BR_REGISTRY__)};var n_=(e,t)=>ne(e,k(t)?t:{}),MD=e=>{if(typeof document>"u")return;let t=e.themeRoot||e.document&&e.document.documentElement||document.documentElement;if(!t||typeof t.setAttribute!="function")return;let r=e.globalTheme||"auto";try{if(typeof window<"u"&&window.location){let s=new URLSearchParams(window.location.search).get("globalTheme");s&&(r=s)}}catch{}let n=e.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;t.setAttribute("data-theme",o),e.globalTheme=r,e.themeRoot=t},FD=()=>{if(typeof document>"u")return null;try{let e=document.querySelector('meta[name="symbols-runtime"]'),t=e&&e.getAttribute("content");return typeof t=="string"&&t?t:null}catch{return null}},dE=e=>{let t=FD();t&&(e.editor||(e.editor={}),e.editor.runtime||(e.editor.runtime=t),t==="runner"&&typeof e.editor.livesync>"u"&&(e.editor.livesync=!0))},o_=(e,t=Yr,r)=>{let n={...Yr,...n_(t,r)};return dE(n),MD(n),r_(e,n).then(s=>{if(qy(s,n),s.destroy=()=>Za(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Xa(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})},ND=(e,t=Yr,r)=>{let n=o_(e,t,r),o={...Yr,...n_(t,r)},s=o.key;return Ok(n,s,{utils:Ya,...o}),n},jD=async(e,t=Yr,r)=>{let n={...Yr,...n_(t,r)};dE(n);let o=t.key;await Tk(o,n);let s=await r_(e,n);return qy(s,n),s.destroy=()=>Za(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Xa(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},BD=(e={},t=Yr,r)=>o_({deps:{isUndefined:Ae},...e},ne({domqlOptions:{onlyResolveExtends:!0}},t),r);ru(Ia);Ov(void 0,{smbls:s_});Rv(void 0,{"@symbo.ls/windows":()=>({...Yb,...Kb}),"@symbo.ls/dropdown":()=>({...Qb,...t_})});