smbls 3.14.785 → 3.14.786
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 +93 -43
- package/dist/smbls.embed.iife.js +11 -11
- package/dist/smbls.esm.js +93 -43
- package/dist/smbls.iife-string.js +2 -2
- package/dist/smbls.iife.js +93 -43
- package/index.js +9 -0
- package/package.json +4 -2
package/dist/smbls.cjs
CHANGED
|
@@ -1,48 +1,59 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
`),
|
|
3
|
-
`).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),
|
|
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(
|
|
5
|
-
`;for(let l of i)
|
|
6
|
-
`:
|
|
7
|
-
`:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
"use strict";var Jv=Object.create;var Qa=Object.defineProperty;var Zv=Object.getOwnPropertyDescriptor;var Qv=Object.getOwnPropertyNames;var tC=Object.getPrototypeOf,eC=Object.prototype.hasOwnProperty;var j=(t,e)=>()=>(t&&(e=t(t=0)),e);var fu=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),P=(t,e)=>{for(var r in e)Qa(t,r,{get:e[r],enumerable:!0})},Vy=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Qv(e))!eC.call(t,n)&&n!==r&&Qa(t,n,{get:()=>e[n],enumerable:!(o=Zv(e,n))||o.enumerable});return t};var rC=(t,e,r)=>(r=t!=null?Jv(tC(t)):{},Vy(e||!t||!t.__esModule?Qa(r,"default",{value:t,enumerable:!0}):r,t)),oC=t=>Vy(Qa({},"__esModule",{value:!0}),t);var Ou,Ru,v,et,ls=j(()=>{"use strict";Ou=globalThis,Ru=globalThis,v=globalThis,et=v.document});var Ye,fs,Ut,us=j(()=>{"use strict";ls();Ye=t=>(typeof Node=="object"?t instanceof v.Node:t&&typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.nodeName=="string")||!1,fs=t=>(typeof HTMLElement=="object"?t instanceof v.HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string")||!1,Ut=t=>typeof v<"u"&&(v.Node&&t instanceof v.Node||v.Window&&t instanceof v.Window||t===v||et!==void 0&&t===et)});var S,w,Le,A,uc,dc,O,pc,z,mt,Et,ds,Vt,Pu,At=j(()=>{"use strict";us();S=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,w=t=>typeof t=="string",Le=t=>typeof t=="number",A=t=>typeof t=="function",uc=t=>t===!0||t===!1,dc=t=>t===null,O=t=>Array.isArray(t),pc=t=>t instanceof Date,z=t=>t===null?!1:typeof t=="object",mt=t=>t!==void 0,Et=t=>t===void 0,ds={boolean:uc,array:O,object:S,string:w,date:pc,number:Le,null:dc,function:A,objectLike:z,node:Ye,htmlElement:fs,defined:mt},Vt=t=>(...e)=>e.some(r=>ds[r](t)),Pu=t=>(...e)=>!e.some(r=>ds[r](t))});var Iu,Du,$u,Lu,Lo,ps,Mu,Fu,hs,Nu,ju,Bu,Uu,Vu,Hu,zu,Mo,gs,Fo=j(()=>{"use strict";Xe();At();Iu=(t,e)=>e.every(r=>t.includes(r)),Du=(t,e)=>{let r=0;for(let o=0;o<t.length;o++)t[o]===e&&r++;return r},$u=(t,e)=>{if(w(e)&&(e=parseInt(e)),Le(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},Lu=(t,e,r)=>{e<0||r<0||e>=t.length||r>=t.length||([t[e],t[r]]=[t[r],t[e]])},Lo=(...t)=>[].concat(...t),ps=(t,e=[])=>t.reduce((r,o)=>nt(r,ut(o,{exclude:e}),e),{}),Mu=(t,e)=>{let r=t.indexOf(e);return r!==-1?t.slice(0,r):t},Fu=(t,e)=>{if(!O(t))return;let r=t.indexOf(e);return r!==-1?t.slice(r+1):t},hs=(t,e)=>{let r=t.indexOf(e);if(r>-1){let o=[...t];return o.splice(r,1),o}return t},Nu=(t,e)=>t.filter(r=>r!==e),ju=(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},Bu=(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},Uu=(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},Vu=(t,e)=>t.filter(r=>!e.includes(r)),Hu=(t,e)=>{let r=new Set(e);return t.filter(o=>!r.has(o))},zu=(t,e)=>{if(!t)return 0;let r=0;for(let o=0;o<e.length;o++)t.includes(e[o])&&r++;return r},Mo=t=>O(t)?[...new Set(t)]:t,gs=(t,e)=>{for(let r in e)Object.defineProperty(t,r,{value:e[r],enumerable:!1,configurable:!0,writable:!0})}});function qr(t,e,r={}){let{bracketsLength:o=2}=r,n=o===3?"{{{":"{{";if(!t.includes(n))return t;let s=xC[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=ms(g,d);return String(p??"")}else{let h=ms(i,d);if(h!=null)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 b=ms(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 k=ms(x,d);if(k!=null&&typeof k!="object")return String(k)}}}let _=ms(g.translations,d);if(_!=null&&typeof _!="object")return String(_)}return""}})}var ys,Wu,xC,ms,Kr,qu,wC,Ku,Gu,Yu,SC,Xu,Ju,bs=j(()=>{"use strict";ys=(t,e)=>{for(let r of e)if(t.includes(r))return!0;return!1},Wu=(t,e)=>{let r=new RegExp(`[${e.join("\\")}]`,"g");return t.replace(r,"")},xC={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},ms=(t,e)=>e.split(".").reduce((r,o)=>r?.[o],t);Kr=t=>`${t.charAt(0).toLowerCase()}${t.slice(1)}`,qu=(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}},wC=/\\([0-7]{1,3})/g,Ku=t=>t.replace(wC,(e,r)=>String.fromCharCode(parseInt(r,8))),Gu=t=>t.replace(/\n/g,"/////n").replace(/`/g,"/////tilde").replace(/\$/g,"/////dlrsgn"),Yu=t=>t.replace(/\/\/\/\/\/n/g,`
|
|
3
|
+
`).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),SC=/[^a-zA-Z0-9\s]/g,Xu=t=>t.replace(SC,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),Ju=t=>t.replace(/%[0-9A-Fa-f]{2}/g,e=>String.fromCharCode(parseInt(e.slice(1),16)))});var dr,_s,Zu,Gr,pr,No,xs,Qu,jo=j(()=>{"use strict";dr=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"]),_s=new Set(["attr","style","text","html","content","data","class","state","scope","children","props","if","key","tag","query","on","context"]),Zu=["ref","parent","__element","__depends","__ref","__children","root"],Gr=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"]),pr=new Set(["update","__element"]),No=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"]),xs=new Set(["node","context","extends","__element","__ref",...No,...Gr,...pr]),Qu=new Set(["init","beforeClassAssign","render","renderRouter","attachNode","stateInit","stateCreated","beforeStateUpdate","stateUpdate","beforeUpdate","done","create","complete","frame","update","fetchError","fetchComplete"])});var eb,Yr,ct,td,pt,nt,nb,ed,ut,ws,kC,Ss,vC,CC,EC,Me,AC,TC,rb,ie,OC,RC,sb,ib,ob,ks,rd,od,hc,nd,sd,vs,Xr,Ht,gc,PC,id,ad,mc,cd,ld,fd,ud,dd,pd,hd,Xe=j(()=>{"use strict";ls();At();Fo();bs();us();jo();eb="production",Yr=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,ct=(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&&(O(t)||S(t)&&!Ut(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 ct(i,e,r,o)}}return t},td=(t,e,r)=>{for(let o in e)t[o]=ct(e[o],r)},pt=(t,e,r=[])=>{let o=r instanceof Set;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Yr(n)||(o?r.has(n):r.includes(n))||t[n]===void 0&&(t[n]=e[n]));return t},nt=(t,e,r=xs)=>nb(t,e,r,null),nb=(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)||Yr(s)||s==="constructor"||s==="prototype"||(n?r.has(s):r.includes(s)))continue;let i=t[s],a=e[s];if(z(i)&&z(a)){let c=o||[];c.push(t,e),nb(i,a,r,c),c.length-=2}else i===void 0&&(t[s]=a)}return t},ed=(t,e=[])=>{let r=e instanceof Set,o={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(Yr(n)||(r?e.has(n):e.includes(n))||(o[n]=t[n]));return o},ut=(t,e={})=>{let{exclude:r=[],cleanUndefined:o=!1,cleanNull:n=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!z(t)||Ut(t))return t;if(s.has(t))return s.get(t);let a=r instanceof Set?r:r.length>3?new Set(r):null,c=u=>a?a.has(u):r.includes(u),l=O(t)?[]:{};s.set(t,l);let f=[[t,l]];for(;f.length;){let[u,d]=f.pop();for(let h in u){if(!Object.prototype.hasOwnProperty.call(u,h)||Yr(h)||h==="__proto__"||c(h))continue;let g=u[h];if(!(o&&g===void 0)&&!(n&&g===null)){if(Ut(g)){d[h]=g;continue}if(i&&h==="extends"&&O(g)){d[h]=ps(g,r);continue}if(A(g)){d[h]=g;continue}if(z(g))if(s.has(g))d[h]=s.get(g);else{let p=O(g)?[]:{};s.set(g,p),d[h]=p,f.push([g,p])}else d[h]=g}}}return l},ws=(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]={},ws(o,e[r]);else if(O(o)){let n=e[r]=[];for(let s=0;s<o.length;s++){let i=o[s];S(i)?(n[s]={},ws(i,n[s])):A(i)?n[s]=i.toString():n[s]=i}}else e[r]=o}return e},kC=new Set(["&","*","-",":","%","{","}",">","<","@",".","/","!"," "]),Ss=(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(kC.has(s[l])){a=!0;break}let c=a?`'${s}'`:s;if(n+=`${o} ${c}: `,i instanceof RegExp)n+=String(i);else if(O(i)){n+=`[
|
|
5
|
+
`;for(let l of i)l instanceof RegExp?n+=`${o} ${String(l)},
|
|
6
|
+
`:z(l)&&l!==null?n+=`${o} ${Ss(l,e+2)},
|
|
7
|
+
`:w(l)?n+=`${o} '${l}',
|
|
8
|
+
`:n+=`${o} ${l},
|
|
9
|
+
`;n+=`${o} ]`}else z(i)?n+=Ss(i,e+1):w(i)?n+=ys(i,[`
|
|
10
|
+
`,"'"])?`\`${i}\``:`'${i}'`:n+=i;n+=`,
|
|
11
|
+
`}return n+=`${o}}`,n},vC=[/^\(\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]*\}$/],CC=/^["[{]/,EC=/^(export|import)\s/,Me=t=>{if(!t)return!1;let e=t.trim().replace(/\n\s*/g," ").trim();if(e===""||e==="{}"||e==="[]"||EC.test(e)||!vC.some(s=>s.test(e)))return!1;let o=e.charCodeAt(0),n=e.includes("=>");return!(o===123&&!n||o===91||CC.test(e)&&!n)},AC=t=>(0,eval)(t),TC=(t,e)=>{let r=/^(\s*(?:async\s+)?function\s*[\w$]*\s*\([^)]*\)\s*)\{/.exec(t);if(!r)return null;let o=r[0].length,n=[],s=o,i=1,a=null,c=t.length,l=new RegExp("^(?:const|let|var)\\s+"+e+"\\b");for(;s<c&&i>0;){let u=t[s];if(u==="/"&&t[s+1]==="/"){let d=t.indexOf(`
|
|
11
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===`
|
|
12
|
-
`)){g++;break}g++}
|
|
13
|
-
First 200 chars of source: `+String(t).slice(0,200)),t)}},
|
|
14
|
-
`);try{let i=
|
|
15
|
-
`),a="{ "+
|
|
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},rb=(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=TC(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)}},ie=(t,e={},r={window:{eval:AC}})=>{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))Me(a)?s[i]=rb(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(Me(f)?rb(f,`array index ${l} (prop "${i}")`,r):f);else if(S(f)){let u=ob(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=ob(a);if(c){s[i]=c;continue}let l=s[i]&&typeof s[i]=="object"&&!O(s[i])?s[i]:s[i]={};o.push([a,l])}else s[i]=a}}return e},OC="Set",RC="Map",sb="RegExp",ib=t=>{if(!t||typeof t!="object")return t;if(t.__type===OC&&Array.isArray(t.values))return new Set(t.values);if(t.__type===RC&&Array.isArray(t.entries))return new Map(t.entries);if(t.__type===sb&&w(t.source))try{return new RegExp(t.source,w(t.flags)?t.flags:"")}catch{return t}return t},ob=t=>{if(!t||typeof t!="object"||t.__type!==sb)return null;let e=ib(t);return e instanceof RegExp?e:null},ks=t=>{if(!t||typeof t!="object")return t;let e={},r=[];for(let i of Object.keys(t)){let a=t[i];w(a)&&Me(a)?r.push([i,a]):e[i]=ib(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}
|
|
16
17
|
${i}
|
|
17
|
-
return ${a}; })`)(e);Object.assign(e,c)}catch{for(let[a,c]of
|
|
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(`
|
|
18
19
|
`);e[a]=v.eval(`(function(__gs__) { ${l}
|
|
19
|
-
return (${c}); })`)(e)}catch{try{e[a]=v.eval(`(${c})`)}catch{e[a]=c}}}for(let[i,a]of r)if(!n(i))try{e[i]=v.eval(`(${a})`)}catch{e[i]=a}return e},tu=(t,e={verbose:!0})=>{try{return t?v.eval("("+t+")"):{}}catch(r){e.verbose&&console.warn(r)}},eu=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),Ia=t=>{for(let e in t)return!1;return!0},ru=t=>w(t)&&Ia(t),nu=()=>Object.create(null),Jo=(t,e,r={})=>{let n=r.exclude||[],o=r.preventUnderscore;for(let s in e)n.includes(s)||!o&&Vr(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},Ur=(t,e,r=[])=>{let n=r instanceof Set;for(let o in e)Vr(o)||o==="constructor"||o==="prototype"||(n?r.has(o):r.includes(o))||(t[o]=e[o]);return t},Bt=(t,e,r={},n=new WeakMap)=>{if(!U(t)||!U(e)||Nt(t)||Nt(e))return e;if(n.has(t))return n.get(t);n.set(t,t);let o=r.exclude,s=o?o instanceof Set?o:new Set(o):null,i=!r.preventForce;for(let a in e){if(!Object.prototype.hasOwnProperty.call(e,a)||s&&s.has(a)||i&&Vr(a)||a==="constructor"||a==="prototype")continue;let c=t[a],l=e[a];Nt(l)?t[a]=l:U(c)&&U(l)?t[a]=Bt(c,l,r,n):l!==void 0&&(t[a]=l)}return t},Da=(t,e,r=new Set)=>{if(typeof t!="object"||typeof e!="object"||t===null||e===null)return t===e;if(r.has(t)||r.has(e))return!0;r.add(t),r.add(e);let n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(let s=0;s<n.length;s++){let i=n[s];if(!Object.prototype.hasOwnProperty.call(e,i)||!Da(t[i],e[i],r))return!1}return!0},_0=new Set(["node","__ref"]),ou=(t,e,r=_0)=>{if(t===e)return!0;if(!U(t)||!U(e)||Nt(t)||Nt(e))return t===e;let n=r instanceof Set?r:new Set(r),o=new WeakSet;function s(i,a){if(o.has(a))return!0;o.add(a);for(let c in a){if(!Object.prototype.hasOwnProperty.call(a,c)||n.has(c))continue;if(!Object.prototype.hasOwnProperty.call(i,c))return!1;let l=a[c],f=i[c];if(Nt(l)||Nt(f)){if(l!==f)return!1}else if(U(l)&&U(f)){if(!s(f,l))return!1}else if(l!==f)return!1}return!0}return s(t,e)},su=(t,e)=>{if(e==null)return t;if(jt(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},La=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]=La(t[r]));return e},iu=(t,e)=>{if(t.length===0)return e;let r={},n=r;for(let o=0;o<t.length;o++)o===t.length-1&&e?n[t[o]]=e:(n[t[o]]={},n=n[t[o]]);return r},au=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let o=0;o<e.length-1;o++){if(r[e[o]]===void 0)return;r=r[e[o]]}let n=e[e.length-1];r&&Object.prototype.hasOwnProperty.call(r,n)&&delete r[n]},cu=(t,e,r)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let n=t;for(let o=0;o<e.length-1;o++)(!n[e[o]]||typeof n[e[o]]!="object")&&(n[e[o]]={}),n=n[e[o]];return n[e[e.length-1]]=r,t},lu=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let n=0;n<e.length;n++){if(r==null)return;r=r[e[n]]}return r},fu=t=>{let r=[],n=0;for(let o=0;o<t.length;o++)if(r.length<2)r.push(t[o]);else if(t[o]===r[o%2]?n++:(r=[t[o-1],t[o]],n=1),n>=20)return(Pm==="test"||Pm==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",r),!0},uu=t=>{let e=new WeakSet;function r(n){if(n&&typeof n=="object"){if(e.has(n))return!0;e.add(n);for(let o in n)if(Object.prototype.hasOwnProperty.call(n,o)&&r(n[o]))return console.log(n,"cycle at "+o),!0}return!1}return r(t)},du=(t,e)=>{let r=e instanceof Set?e:new Set(e),n={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&!r.has(o)&&(n[o]=t[o]);return n}});var Zo,Qo,ts,Fa=F(()=>{"use strict";Ue();Zo=(function(){let t=0;function e(){return t++,t}return e})(),Qo=Zo,ts=(t,e,r)=>(it(r,t)||r||t.key||Zo()).toString()});var ge,pu,ar,Ma,hu,gu,mu,cr,yu,zr,Vt,bu=F(()=>{"use strict";ge="production",pu=ge,ar=(t=ge)=>t==="production",Ma=(t=ge)=>t==="testing"||t==="test",hu=Ma,gu=(t=ge)=>t==="staging",mu=(t=ge)=>t==="local",cr=(t=ge)=>t==="development"||t==="dev"||t==="local",yu=(t,e=ge)=>e[t],zr=(t=ge)=>!ar(t),Vt=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 es(t,e,r){let n;return function(){let o=this,s=arguments,i=function(){n=null,r||t.apply(o,s)},a=r&&!n;clearTimeout(n),n=setTimeout(i,e),a&&t.apply(o,s)}}function wu(t,e=window){let r=function(){return t.apply(e,arguments)};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}var xu,_u,S0,Su,kn,vn,vt,Cn=F(()=>{"use strict";xu=(t,e,r=300)=>{let n;return(...o)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(t,o)},r)}},_u=t=>{let e={};return(...r)=>{let n=r[0];if(n in e)return e[n];{let o=t(n);return e[n]=o,o}}},S0=/^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/,Su=t=>S0.test(t),kn=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let r of e)if(r.resolveHandler)return!0;return!1},vn=(t,e)=>{if(typeof t=="function")return t;let r=e?.context?.plugins;if(!r)return t;for(let n of r)if(n.resolveHandler){let o=n.resolveHandler(t,e);if(typeof o=="function")return o}return t},vt=(t,e,...r)=>{let n=e?.context?.plugins;if(!n)return!1;let o=!1;for(let s of n)typeof s[t]=="function"&&(s[t](e,...r),o=!0);return o}});var ku,Dm=F(()=>{"use strict";Et();Ue();ku=(t,e)=>{let{__ref:r}=t,n=t.if;if(E(n)){let o;try{o=n(t,t.state,t.context)}catch(s){typeof console<"u"&&console.warn("[DOMQL] if condition error:",s),delete r.__if;return}o?r.__if=!0:delete r.__if}else n!=null&&typeof n=="object"?it(n,t)?r.__if=!0:delete r.__if:r.__if=!0}});var vu,Cu,Lm=F(()=>{"use strict";vu=(t,...e)=>{t&&e.map(r=>console.log(r))},Cu=(t,e,...r)=>{t&&(console.group(e),r.map(n=>console.log(n)),console.groupEnd(e))}});function Ru(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 Pu(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 Au,Eu,Tu,Ou,Fm=F(()=>{"use strict";Et();Fo();Au=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),Eu=(t,e,r=365)=>{if(At(Y)||At(Y.cookie))return;let n=new Date;n.setTime(n.getTime()+r*24*60*60*1e3);let o=`expires=${n.toUTCString()}`;Y.cookie=`${t}=${e};${o};path=/`},Tu=t=>{if(At(Y)||At(Y.cookie))return;let e=`${t}=`,n=decodeURIComponent(Y.cookie).split(";");for(let o=0;o<n.length;o++){let s=n[o];for(;s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return""},Ou=t=>{At(Y)||At(Y.cookie)||(Y.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var An,Mm,$u,Iu=F(()=>{"use strict";An={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"])},Mm=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"]),$u=t=>An.body.has(t)});var Du,Nm,En,os,Ut,Lu,Na,ss,Fu,is,ja,Ba,as,Va,Tn,w0,Te,jm,rs,cs,Mu,ns,Nu,ju,Ua,za,Wa,Ha,qa,Ka,Bm,Ga=F(()=>{"use strict";_n();Bu();Ue();Et();Du="production",Nm=t=>t.sourcemap!==!1&&Du!=="production",En=t=>{if(t.includes("+"))return t.split("+").filter(Oe);if(t.includes("_")){let[e]=t.split("_");return[e]}if(t.includes(".")&&!Oe(t.split(".")[1])){let[e]=t.split(".");return[e]}return[t]},os=(t,e,r)=>{let n=[],o=En(r);o&&(n=[...o]);let s=t.extends;return s&&(n=T(s)?[...n,...s]:[...n,s]),n},Ut=(t,e)=>{let{__ref:r}=e,{__extends:n}=r;if(!t)return n;let o=e.variant,s=e.context;if(o&&s?.components&&!Array.isArray(t)&&typeof t=="string"){let i=`${t}.${o}`;s.components[i]&&(t=i)}return n.includes(t)||(n=Array.isArray(t)?[...n,...t]:[...n,t],r.__extends=n),n},Lu=(t,e)=>{if(!t)return e;let{extends:r}=e,n=T(r)?r:[r],o=T(t)?t:[t];return{...e,extends:bn(o,n)}},Na=()=>Math.random().toString(36).substring(2),ss={},Fu={},is=t=>ss[t.__hash],ja=(t,e)=>{let r=Na();return S(t)||(t.__hash=r),r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(ss[r]=e),e},Ba=(t,e)=>t.__hash?e.concat(is(t)):ja(t,e),as=(t,e,r,n=new Set,o,s)=>{for(let i of t)T(i)?as(i,e,r,n,o,s):Tn(i,e,r,n,o,void 0,s);return e},Va=(t,e,r,n=new Set,o,s,i)=>{let a=t.extends,c={...t};delete c.extends;let l=!1;for(let f in c){l=!0;break}return l&&(e.push(c),o&&o.push(s)),a&&Tn(a,e,r,n,o,s,i),e},Tn=(t,e,r,n=new Set,o,s,i)=>{if(!t||n.has(t))return e;if(T(t))return as(t,e,r,n,o,i);let a=s;return S(t)?(a=t,t=cs(t,r)):i&&w(t)&&i.has(t)&&(a=i.get(t)),n.add(t),t?.extends?Va(t,e,r,n,o,a,i):t&&(e.push(t),o&&o.push(a)),e},w0=new Set(["parent","node","__ref","__proto__","extends","childExtends","childExtendsRecursive"]),Te=(t,e,r,n,o)=>{e=ut(e);for(let s in e){if(w0.has(s))continue;let i=t[s],a=e[s];if(a!==void 0&&Object.prototype.hasOwnProperty.call(e,s)&&s!=="__proto__"&&s!=="constructor"&&s!=="prototype"){if(i===void 0)t[s]=a,r&&n?w(a)&&!T(a)?(r[s]=r[s]||{},jm(r[s],a,n)):r[s]=n:r&&o?.[s]&&(r[s]=o[s]);else if(w(i)&&w(a)){let c=r?r[s]=r[s]||{}:void 0,l=o?.[s];Oe(s)?t[s]=Te(i,a,c,n,l):Te(i,a,c,n,l)}if(s==="extends"||s==="childExtends"||s==="childExtendsRecursive"){if(T(i)&&T(a))t[s]=i.concat(a);else if(T(i)&&w(a)){let c=Te({},i);t[s]=Te(c,a)}}}}return t},jm=(t,e,r,n)=>{if(n||(n=new WeakSet),!n.has(e)){n.add(e);for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o)||o==="__proto__"||o==="constructor"||o==="prototype")continue;let s=e[o];w(s)&&!T(s)?(t[o]=t[o]||{},jm(t[o],s,r,n)):t[o]=r}}},rs=(t,e,r)=>t.reduce((n,o,s)=>{let i=ut(o),a=r?r[s]:void 0;return Te(n,i,e,a)},{}),cs=(t,e,r={},n)=>{let o=e?.components||r.components,s=e?.pages||r.pages;if(S(t)){let i=o&&(o[t+"."+n]||o[t]||o["smbls."+t]),a=s&&t.charCodeAt(0)===47&&s[t];if(i)return i;if(a)return a;r.verbose&&(Du==="test"||Du==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},Mu=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),ns=(t,e,r,n)=>{if(!t)return[];if(t.__hash)return is(t)||[];let s=Tn(t,[],e,new Set,r,void 0,n);return r?s:Ba(t,s)},Nu=(t,e)=>{if(!t)return e;let r=T(t)?t:[t];return bn(r,e)},ju=t=>{let e=[];function r(n){for(let o in n)Object.prototype.hasOwnProperty.call(n,o)&&(Oe(o)&&e.push(o),o==="extends"&&(typeof n[o]=="string"?e.push(n[o]):Array.isArray(n[o])&&(e=e.concat(n[o]))),typeof n[o]=="object"&&n[o]!==null&&r(n[o]))}return r(t),e},Ua=(t,e,r={})=>{let{__ref:n}=t,o=t.context||e.context,s=t.variant;if(t.extends)if(Array.isArray(t.extends)&&t.extends.length>0){let[i,...a]=t.extends;if(typeof i=="string"&&s&&o?.components){let c=`${i}.${s}`;o.components[c]?Ut([c,...a],t):Ut(t.extends,t)}else Ut(t.extends,t)}else if(typeof t.extends=="string"&&s&&o?.components){let i=`${t.extends}.${s}`;o.components[i]?Ut(i,t):Ut(t.extends,t)}else Ut(t.extends,t);return za(t,e,r),Wa(t,e,r),Ha(t,e,r),t.component&&Ut(it(t.component,t),t),o.defaultExtends&&Ut(o.defaultExtends,t),xn(n.__extends)},za=(t,e,r={})=>{let{__ref:n}=t;return r.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&Ut(e.childProps.extends,t),n.__extends},Wa=(t,e,r={})=>{let{__ref:n}=t,o=r.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!o&&s&&Ut(s,t),n.__extends},Ha=(t,e,r={})=>{let{__ref:n}=t,o=e.childExtendsRecursive,s=r.ignoreChildExtendsRecursive||t.ignoreChildExtendsRecursive,i=t.key==="__text";return o&&!i&&!s&&Ut(o,t),n.__extends},qa=(t,e,r={})=>{let{__ref:n}=t,o=t.context||e.context,s=t.variant,i=Nm(r),a=i?[...n.__extends]:null,c=xn(n.__extends.map((l,f)=>cs(l,o,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&&w(h)&&S(g)&&l.set(h,g)}let f=[],u=ns(c,o,f,l);n.__extendsStack=u,n.__extendsNames=f}else{let l=ns(c,o);n.__extendsStack=l}return n.__extendsStack},Ka=(t,e,r={})=>{let{__ref:n}=t,{__extendsStack:o}=n;if(Nm(r)){let s={},i=n.__extendsNames||[],a=rs(o,s,i),c={};Te(t,a,c,void 0,s),n.__sourcemap=c}else{let s=rs(o);Te(t,s)}return t},Bm=(t,e,r={})=>(Ua(t,e,r),qa(t,e,r),Ka(t,e,r),t)});function Vu(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function Uu(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function zu(t,e,r){let{context:n}=e||{},[o]=En(r),s=r||o;return n?.components?.[s]||n?.pages?.[s]}var Oe,Bu=F(()=>{"use strict";Ga();Et();Oe=t=>{if(!S(t)||!t.length)return!1;let e=t.charCodeAt(0);return e>=65&&e<=90}});function Vm(t,e){let{props:r,on:n}=e,o=jr(t.split("on")[1]),s=n[o],i=r[t];E(s)?n[o]=(...a)=>{if(s(...a)!==!1&&E(i))return i(...a)}:n[o]=i}var Um=F(()=>{"use strict";Ho();Et()});function Ya(t,e={}){let r=e.cachedKeys||[];for(let n in t){let o=t[n];if(n.length>2&&n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n[2]===n[2].toUpperCase()&&(E(o)||o!=null&&kn(this.context))){let g=jr(n.slice(2));t.on&&(t.on[g]=o),delete t[n];continue}if(n==="childProps"){t.props[n]=o,delete t[n],r.push(n);continue}let a=this.define?.[n],c=this.context?.define?.[n],l=w(a)||E(a),f=w(c)||E(c);if(l||f)continue;let u=n.charAt(0);if(Wm.has(u)){t.props[n]=o,delete t[n],r.push(n);continue}let d=Wu.test(n)||zm.test(n)||v0(o),h=sr.has(n);!d&&!h&&(n in t.props||(t.props[n]=o),delete t[n],r.push(n))}return t}function Xa(t=this,e){let r=e.cachedKeys||[];for(let n in t.props){let o=t.props[n],s=n.length>2&&n.charCodeAt(0)===111&&n.charCodeAt(1)===110,i=E(o)||o!=null&&kn(this.context);if(s&&i){Vm(n,t),delete t.props[n];continue}if(r.includes(n)||n==="childProps")continue;let a=n.charAt(0);if(Wm.has(a))continue;let c=this.define?.[n],l=this.context?.define?.[n],f=w(c)||E(c),u=w(l)||E(l),d=Wu.test(n)||zm.test(n),h=sr.has(n);(d||h||f||u)&&(t[n]===void 0||o===null)&&(t[n]=o,t.props&&delete t.props[n])}return t}function Ja(t=this){let e=[];return Ya.call(this,t,{cachedKeys:e}),Xa.call(this,t,{cachedKeys:e}),t}function Hu(t={}){return t.on||(t.on={}),t.props||(t.props={}),Ja.call(this,t)}function Ku(t,e){this.__element.update({props:t},e)}function ps(t){let e={update:Ku.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var Wu,zm,Wm,k0,v0,us,ls,qu,ds,hs,gs,Za,fs,Gu,Yu,Xu=F(()=>{"use strict";wn();Um();Ue();Et();Ho();Cn();Wu=/^[A-Z]/,zm=/^\d+$/,Wm=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),k0=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),v0=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if(k0.has(e)||Wu.test(e))return!0;return!1},us=(t,e,r)=>{let{props:n,__ref:o}=t;if(o.__propsStack=[],n)o.__initialProps=n;else return{};return U(n)?{...n}:(o.__propsStack.push(n),{})};ls=t=>jt(t)("string","number")?{inheritedString:t}:t,qu=(t,e)=>!t||!e.length?!1:e.includes(t),ds=(t,e)=>{let{__ref:r}=t,n=r.__propsStack||[],o=e.props;if(!o)return n;let s=o[t.key],i=o.childProps||e.childProps,a=t.props?.ignoreChildProps;if(i&&!a){let c=ls(i);n.unshift(c)}if(s){let c=ls(s);n.unshift(c)}return n};hs=t=>{let e=new Set;return t.filter(r=>!r||ir.has(r)||e.has(r)?!1:(e.add(r),!0))},gs=(t,e,r)=>(e.props=t.reduce((n,o)=>{if(ir.has(o))return n;for(;E(o);)o=it(o,e);return Z(n,ut(o,{exclude:ir}))},{}),ps(e),e.props),Za=(t,e)=>{let{props:r,__ref:n}=t,o=n.__propsStack||[];if(e?.props&&(o=[...ds(t,e)]),w(r)?o.push(r):r==="inherit"&&e?.props?o.push(e.props):r&&o.push(r),T(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=hs(o),n.__propsStack},fs=(t,e)=>{let{__ref:r}=t,n=Za(t,e);n.length?gs(n,t):(r.__propsStack=[],t.props={})},Gu=function(t,e,r){let{__ref:n}=t;if(n.__if)fs(t,e);else try{fs(t,e)}catch(o){t.context?.designSystem?.verbose&&console.warn("initProps error at",n.path?.join("."),o),t.props={},n.__propsStack=[]}return ps(t),t},Yu=(t,e,r)=>{let{__ref:n}=e,s=[...n.__propsStack||[]],i=ds(e,r);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),n.__propsStack=hs(s),n.__propsStack.length&&gs(n.__propsStack,e),e}});var Hm,Qa,tc,ec,rc,Ju,nc,oc,sc,Zu,qm=F(()=>{"use strict";Ga();Fa();No();Xu();Iu();Et();Hm="production",Qa=(t,e,r)=>{let n=e.childExtends&&e.childExtends.tag,o=e.childProps&&e.childProps.tag,s=An.body.has(r)&&r;return{text:t,tag:n||o||s||"string"}},tc=(t,e,r)=>{if(t===void 0)return(Hm==="test"||Hm==="development")&&console.warn(r,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:jt(t)("string","number")?Qa(t,e,r):E(t)?{props:t}:t},ec=(t,e)=>{let r={};return r.origin=t,r.parent=e,r},rc=(t,e,r,n,o)=>{if(!e)return o;if(Ve(e)){let s={key:":root",node:e};return o[`${r}_parent`]=s,s}return e},Ju=(t,e)=>{let{__ref:r}=t,{__ref:n}=e,o=e&&e.key===":root";r?.root||(r.root=o?t:n?.root)},nc=(t,e,r)=>{let{__ref:n}=e;return n||(n=e.ref={}),n.path||(n.path=[]),n.path.concat(r)},oc=(t,e,r,n,o)=>(n.context&&!o.context&&!t.context&&(o.context=n.context),n.context||e.context||o.context||t.context),sc=(t,e,r)=>{let n=ec(t,e);return t.__ref=n,n.__defineCache||(n.__defineCache={}),n.__exec||(n.__exec={}),n.__execProps||(n.__execProps={}),n.__class||(n.__class={}),n.__classNames||(n.__classNames={}),n.__attr||(n.__attr={}),n.__changes||(n.__changes=[]),n.__children||(n.__children=[]),n.__extends=os(t,e,r),n.path=nc(t,e,r),n},Zu=(t,e,r,n,o)=>{let i=t?.__hash?{extends:[t]}:tc(t,e,r);if(!i)return;let a=rc(i,e,r,n,o),c=ts(i,a,r);sc(i,a,c);let l=us(i,a,c),f=oc(i,a,c,n,o),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var Qu,ic,ac,cc,lc,td,fc,ed,rd,nd,od,Km=F(()=>{"use strict";_n();wn();Ue();Et();Qu=t=>{let{state:e,props:r,__ref:n}=t,o=r?.state||e;return jt(o)("string","number")?(n.__state=o,{value:o}):o===!0?(n.__state=t.key,{}):o?(n.__hasRootState=!0,o):!1},ic=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},ac=(t,e)=>{if(!t.includes("../"))return;let n=t.split("../").length-1;for(let o=0;o<n;o++){if(!e.parent)return null;e=e.parent}return e},cc=(t,e,r={})=>{let n=S(t)?t.split("/"):[t],o=n.length-1;for(let s=0;s<o;s++){let i=n[s],a=n[s+1];if(i==="__proto__"||a==="__proto__")return;let c=e[i];c||(c=e[i]={}),c[a]||(c[a]={}),t=a,e=c}return r.returnParent?e:e[t]},lc=(t,e,r={})=>{let o=t.__ref.__state;if(!fc(t))return;let s=ic(o,e.state),i=e.state;if(s)i=s,o=o.replaceAll("~/","");else{let a=ac(o,e.state);a&&(i=a,o=o.replaceAll("../",""))}if(i)return cc(o,i,r)},td=(t,e)=>{let r=t.__ref,n=lc(t,e);if(n===void 0)return t.state;if(jt(n)("object","array"))return ut(n);if(jt(n)("string","number","boolean"))return r.__stateType=typeof n,{value:n};console.warn(r.__state,"is not present. Replacing with",{})},fc=t=>{let{__ref:e}=t,r=e?.__state;return!!(r&&jt(r)("number","string","boolean"))},ed=function(t){return U(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},rd=(t,e)=>{if(!t)return e||{};let r=t.split("/"),n={},o=n,s=r.length-1;for(let i=0;i<=s;i++)o[r[i]]=i===s?e||{}:{},o=o[r[i]];return n},nd=(t,e)=>{let{__element:r}=e,n=r?.state;if(!n)return;let o=ut(n,Br),s={[t.key]:o},i=w(n.__depends)?{...n.__depends,...s}:s;return Array.isArray(n)?Uo(n,{...Object.getPrototypeOf(n),__depends:i}):Object.setPrototypeOf(n,{...Object.getPrototypeOf(n),__depends:i}),o},od=(t,e,r={})=>{let{overwrite:n}=r;if(!n)return;let o=n==="shallow";if(n==="merge"){Z(t,e,Br);return}(o?Ur:Bt)(t,e,Br)}});var C0,sd,Gm=F(()=>{"use strict";C0=(t,e)=>{let r=e;for(;r;){if(r===t)return!0;r=Object.getPrototypeOf(r)}return!1},sd=(t,e)=>{let{__ref:r}=t,n=t.context||e.context||r.root?.context;n&&!n.globalScope&&(n.globalScope={});let o=e.scope||r.root?.scope,s=n?.globalScope;if(!t.scope)o?t.scope=o:s?t.scope=Object.create(s):t.scope={};else if(typeof t.scope=="object"&&t.scope!==null&&Object.getPrototypeOf(t.scope)===Object.prototype){let i=o||s;i&&!C0(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var Ym,uc,lr,dc,id,ad=F(()=>{"use strict";Et();Cn();Ym=(t,e)=>{let r="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[r]},uc=(t,e,r,n,o)=>{if(t=vn(t,e),!!E(t))try{let s=t.call(e,e,r||e.state,n||e.context,o);return s&&typeof s.then=="function"&&s.catch(i=>{e.error=i,i instanceof ReferenceError?console.warn("[DOMQL] Async event warning:",i.message):console.error("[DOMQL] Async event error:",i)}),s}catch(s){if(e.error=s,s instanceof ReferenceError?console.warn("[DOMQL] Event handler warning:",s.message):console.error("[DOMQL] Event handler error:",s),e.context?.strictMode)throw s}},lr=(t,e,r)=>{if(!e)throw new Error("Element is required");vt(t,e,r);let n=Ym(t,e);if(n){let{state:o,context:s}=e;return uc(n,e,o,s,r)}},dc=(t,e,r,n,o,s)=>{if(t=vn(t,r),!!E(t))try{let i=t.call(r,e,r,n||r.state,o||r.context,s);return i&&typeof i.then=="function"&&i.catch(a=>{r.error=a,console.error("[DOMQL] Async event update error:",a)}),i}catch(i){if(r.error=i,console.error("[DOMQL] Event update error:",i),r.context?.strictMode)throw i}},id=(t,e,r,n)=>{vt(t,r,e,n);let o=Ym(t,r);if(o){let{state:s,context:i}=r;return dc(o,e,r,s,i,n)}}});var cd,ms,ld=F(()=>{"use strict";cd={},ms={}});var Jm={};I(Jm,{restAdapter:()=>Xm,setup:()=>E0});var A0,ze,E0,Xm,Zm=F(()=>{"use strict";A0=(t,e,r)=>{let n=e&&!e.startsWith("/")?"/":"",o=new URL(`${t}${n}${e}`);if(r)for(let s in r){let i=r[s];i!=null&&o.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return o.toString()},ze=async(t,e)=>{let r=await globalThis.fetch(t,e),n=r.headers.get("content-type"),o=n&&n.includes("json")?await r.json():await r.text();return{data:o,error:r.ok?null:o?.message||o?.error||r.statusText,status:r.status}},E0=async({url:t,headers:e,auth:r,fetchOptions:n})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return Xm(t,e,r,n)},Xm=(t,e={},r,n={})=>{let o=r?.token||null,s=f=>{let u={...e,...f};return o&&(u.Authorization=`Bearer ${o}`),u},i=f=>({...s(f),"Content-Type":"application/json"}),a=f=>({...n,...f}),c=(f,u)=>{let d=u||t;if(f&&(f.startsWith("http://")||f.startsWith("https://")))return f;let h=f&&!f.startsWith("/")?"/":"";return`${d}${h}${f||""}`};return{name:"rest",setToken:f=>{o=f},getSession:async()=>{if(!r?.sessionUrl)return o?{token:o}:null;let f=await ze(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 ze(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 ze(c(r.signOutUrl,r.baseUrl),a({method:"POST",headers:s()})),o=null,{error:null}),select:({from:f,params:u,select:d,limit:h,offset:g,order:p,single:m,headers:x,baseUrl:b})=>{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(_=>`${_.by}:${_.asc===!1?"desc":"asc"}`).join(","):p.by&&(y.order=`${p.by}:${p.asc===!1?"desc":"asc"}`)),ze(A0(b||t,f||"",y),a({headers:s(x)}))},rpc:({from:f,params:u,headers:d,baseUrl:h})=>ze(c(`rpc/${f}`,h),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),insert:({from:f,data:u,headers:d,baseUrl:h})=>ze(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,x=m?`${f}/${m}`:f;return ze(c(x,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,x=m?`${f}/${m}`:f;return ze(c(x,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 ze(c(p,h),a({method:"DELETE",headers:s(d)}))}}}});var ty={};I(ty,{localAdapter:()=>Qm,setup:()=>O0});var pc,T0,O0,Qm,ey=F(()=>{"use strict";pc=(t,e)=>{if(!e)return!0;for(let r in e){let n=e[r];if(n===null){if(t[r]!==null&&t[r]!==void 0)return!1}else if(Array.isArray(n)){if(!n.includes(t[r]))return!1}else if(typeof n=="object"){for(let o in n)if(o==="gt"&&!(t[r]>n[o])||o==="gte"&&!(t[r]>=n[o])||o==="lt"&&!(t[r]<n[o])||o==="lte"&&!(t[r]<=n[o])||o==="neq"&&t[r]===n[o]||o==="like"&&!String(t[r]).includes(n[o]))return!1}else if(t[r]!==n)return!1}return!0},T0=(t,{order:e,limit:r,offset:n,single:o})=>{let s=[...t];if(e){let i=typeof e=="string"?e:e.by,a=e.asc!==!1;s.sort((c,l)=>c[i]<l[i]?a?-1:1:c[i]>l[i]?a?1:-1:0)}return n&&(s=s.slice(n)),r&&(s=s.slice(0,r)),o?{data:s[0]||null,error:null}:{data:s,error:null}},O0=async({data:t,...e})=>Qm(t,e),Qm=(t={},e={})=>{let r={},n={},o=e.persist!==!1&&typeof localStorage<"u",s=e.prefix||"smbls_db_",i=f=>{if(!r[f])if(o)try{let u=localStorage.getItem(s+f);r[f]=u?JSON.parse(u):t[f]||[]}catch{r[f]=t[f]||[]}else r[f]=t[f]||[];return r[f]},a=f=>{if(o)try{localStorage.setItem(s+f,JSON.stringify(r[f]))}catch{}},c=(f,u,d,h)=>{let g=n[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=>pc(p,u));return T0(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(pc(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 x=d||(m.id!==void 0?{id:m.id}:null),b=x?h.findIndex(y=>pc(y,x)):-1;if(b>-1){let y={...h[b]};Object.assign(h[b],m),p.push(h[b]),c(f,"UPDATE",h[b],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--)pc(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)=>{n[f]||(n[f]=[]);let h=(g,p,m)=>{u&&u!=="*"&&u!==m.event||d(g,p,m)};return n[f].push(h),()=>{let g=n[f].indexOf(h);g>-1&&n[f].splice(g,1)}}}}});var Hr={};I(Hr,{createAdapter:()=>L0,default:()=>H0,executeFetch:()=>vs,fetchPlugin:()=>gd,initAdapterAuth:()=>bc,parseDuration:()=>xs,queryClient:()=>W0,registerAdapter:()=>D0,resolveDb:()=>sy});var R0,P0,hc,bs,gc,dd,$0,I0,D0,L0,sy,xs,Dt,iy,ys,F0,ks,_s,Ss,mc,pd,yc,M0,ry,fd,ay,cy,On,ny,N0,oy,j0,xc,ly,fy,bc,hd,ee,me,ws,Wr,Re,fr,B0,V0,U0,ud,z0,vs,W0,gd,H0,ur=F(()=>{"use strict";O();R0=["select","rpc","insert","update","upsert","delete","subscribe"],P0={rest:()=>Promise.resolve().then(()=>(Zm(),Jm)),local:()=>Promise.resolve().then(()=>(ey(),ty))},hc=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),bs=(()=>{if(typeof globalThis<"u"&&globalThis[hc])return globalThis[hc];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,hc,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[hc]}catch{}return t})(),gc=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),dd=(()=>{if(typeof globalThis<"u"&&globalThis[gc])return globalThis[gc];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,gc,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[gc]}catch{}return t})(),$0=5e3,I0=t=>new Promise(e=>{if(bs[t])return e(bs[t]);let r=dd[t]||=[],n=!1,o=()=>{n||(n=!0,e(bs[t]||null))};r.push(o),setTimeout(o,$0)}),D0=(t,e)=>{bs[t]=e;let r=dd[t];if(r&&r.length){dd[t]=[];for(let n of r)n()}},L0=t=>{let e={};for(let r of R0)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},sy=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...r}=t,n=typeof e=="string"?e:typeof t=="string"?t:null;if(!n)return null;let o=bs[n]||P0[n];if(!o&&(o=await I0(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)},xs=t=>{if(!t)return 0;if(typeof t=="number")return t;let e=t.match(/^(\d+)(ms|s|m|h)$/);if(!e)return 0;let r=parseInt(e[1]),n=e[2];return n==="ms"?r:n==="s"?r*1e3:n==="m"?r*6e4:n==="h"?r*36e5:0},Dt=new Map,iy=new Map,ys=new Map,F0=(t,e,r)=>{if(t.cache?.key)return t.cache.key;let n=j0(t.params),o=r?`${r}:`:"",s=`${t.from}:${t.method}:${o}${JSON.stringify(n||"")}`;return e?`${s}:${e}`:s},ks=t=>Dt.get(t)||null,_s=(t,e,r)=>{let n=Dt.get(t),o={data:e,error:r,time:Date.now(),stale:!1};Dt.set(t,o);let s=iy.get(t);if(s)for(let i of s)E(i)&&i(o);return o},Ss=t=>{if(t){let e=Dt.get(t);e&&(e.stale=!0);return}for(let[,e]of Dt)e.stale=!0},mc=t=>{if(t){Dt.delete(t);return}Dt.clear()},pd=t=>!t&&t!==!1?{staleTime:6e4,gcTime:3e5}:t===!1?null:t===!0?{staleTime:6e4,gcTime:3e5}:typeof t=="number"?{staleTime:t,gcTime:Math.max(t*5,3e5)}:S(t)?{staleTime:xs(t),gcTime:3e5}:{staleTime:xs(t.stale||t.staleTime)||6e4,gcTime:xs(t.gc||t.gcTime||t.expire)||3e5,key:t.key},yc=null,M0=()=>{yc||(yc=setInterval(()=>{let t=Date.now();for(let[e,r]of Dt){let n=iy.get(e);!(n&&n.size>0)&&t-r.time>(r.gcTime||3e5)&&Dt.delete(e)}},3e4),yc.unref&&yc.unref())};M0();ry=3,fd=t=>Math.min(1e3*2**t,3e4),ay=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:ry,delay:fd}:typeof e=="number"?{count:e,delay:fd}:{count:e.count??ry,delay:E(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:fd}},cy=async(t,e)=>{let{count:r,delay:n}=e,o;for(let s=0;s<=r;s++)try{let i=await t();if(i?.error){if(o=i.error,s<r){let a=E(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=E(n)?n(s,i):n;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:o}},On={focus:new Set,online:new Set},ny=!1,N0=()=>{if(ny||typeof window>"u")return;ny=!0;let t=()=>{for(let r of On.focus)r()},e=()=>{for(let r of On.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},oy=(t,e)=>{let r=e.__ref;if(t===!0)return{from:r.__state||e.key,method:"select",query:!0,on:"create"};if(S(t))return{from:t,method:"select",query:!0,on:"create"};if(w(t)){let n={...t};return n.from=n.from||r.__state||e.key,n.method=n.method||"select",n.on=n.on||"create",n.query===void 0&&(n.query=!0),n}return null},j0=t=>(!t||E(t),t),xc=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},ly=(t,e)=>{let n=(t?.state?.root||e?.state?.root)?.__fetchScope;return n?String(n):void 0},fy=(t,e,r)=>{let n;if(!t)n=void 0;else if(E(t))n=t(e,e.state);else{n={};for(let o in t){let s=t[o];n[o]=E(s)?s(e,e.state):s}}return n},bc=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let r=(n,o)=>{let s=e.state?.root;s?.update&&s.update({auth:{user:n,session:o,loading:!1}})};try{let n=await t.getSession();r(n?.user||null,n)}catch(n){console.warn("[fetch] Failed to restore auth session:",n.message)}t.onAuthStateChange&&t.onAuthStateChange((n,o)=>{r(o?.user||null,o)})},hd=async(t,e)=>{if(E(t.select))return t.auth!==!1&&await bc(t,e),t;if(t.__resolved)return t.auth!==!1&&await bc(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=sy(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 bc(r,e),r):null},ee=(t,e,...r)=>{let n=E(t[e])?t[e]:null;n&&n.call(t,...r,t,t.state,t.context)},me=(t,e,r,...n)=>{let o=t&&E(t[r])?t[r]:null;o&&o.call(e,...n,e,e.state,e.context)},ws=t=>{let e={},r=t.node;if(!r)return e;if(r.tagName==="FORM"){let o=new FormData(r);for(let[s,i]of o.entries())e[s]=i;return e}let n=r.querySelectorAll("input, textarea, select");for(let o=0;o<n.length;o++){let s=n[o],i=s.name||s.getAttribute("name");i&&(s.type==="checkbox"?e[i]=s.checked:s.type==="file"?e[i]=s.files:e[i]=s.value)}return e},Wr=(t,e,r,n={})=>{let o=r&&r.startsWith("~/"),s=o&&t.state?.root||t.state;if(s?.update)if(o){let i=r.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&i in e?s.update(e,{preventFetch:!0,...n}):s.update({[i]:e},{preventFetch:!0,...n})}else{let i=r?{[r]:e}:e;s.update(i,{preventFetch:!0,...n})}},Re=(t,e)=>{let r=t?.__ref;r&&(r.__fetchStatus=e,r.__fetching=e.isFetching,r.__fetchError=e.error)},fr=async(t,e,r,n={})=>{let o=r?.fetch;if(!o||!e||!e.__ref||t.enabled===!1||E(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||E(t.skip)&&t.skip(e,e.state))return;let s=await hd(o,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:x,offset:b,order:y,headers:_,baseUrl:k,page:A,cursor:R,getNextPageParam:N,getPreviousPageParam:P,infinite:$,placeholderData:V,initialData:_t,select:H,keepPreviousData:K}=t,L=S(H)?H:void 0;if(l&&E(e.getQuery)){let st=e.getQuery(s.name||"paths");st&&(L=st.select||st.length&&st.join(",")||L)}let W=fy(f,e,r),j=pd(u),yt=ay(t),ct=xc(e,r),lt=ly(e,r),tt=ct?`:${ct}`:"",Ct=lt?`${lt}:`:"",D=j?u?.key||`${a}:${c}:${Ct}${JSON.stringify(W||"")}${$?":infinite":""}${A?":p"+JSON.stringify(A):""}${tt}`:null;if(!i.__fetchInitialized&&D&&(i.__fetchInitialized=!0,_t!==void 0)){let st=E(_t)?_t():_t;_s(D,st,null)}if((c==="select"||c==="rpc")&&D&&j){let st=ks(D);if(st&&!st.error){let G=Date.now()-st.time,bt=st.stale||G>(j.staleTime||0),z=st.data;if(E(H)&&(z=H(z,e,e.state)),d&&(z=d(z,e,e.state)),Wr(e,z,m),!bt){Re(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(V!==void 0){let G=E(V)?V(e,e.state):V;G!==void 0&&Wr(e,G,m)}}if(D&&ys.has(D)&&!n.force){let st=ys.get(D);try{let G=await Promise.race([st,new Promise((bt,z)=>setTimeout(()=>z("DEDUP_TIMEOUT"),15e3))]);if(G?.data!==void 0){let bt=G.data;E(H)&&(bt=H(bt,e,e.state)),d&&(bt=d(bt,e,e.state)),Wr(e,bt,m),ee(e,"onFetchComplete",bt),me(t,e,"onFetchComplete",bt)}}catch{}return}let J=!ks(D)?.data;Re(e,{isFetching:!0,isLoading:J,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),ee(e,"onFetchStart"),me(t,e,"onFetchStart");let ft=r?.analyze?.emitNetwork,ot=ft?typeof performance<"u"?performance.now():Date.now():0;ft&&ft({phase:"start",mode:"query",from:a,method:c,cacheKey:D,lang:ct});let Cm=cy(async()=>{if(g!==!1&&s.auth!==!1&&s.getSession){let z=await s.getSession();if(g===!0&&!z){let $t={message:"Not authenticated"};return Re(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:$t,status:"error",fetchStatus:"idle"}),ee(e,"onFetchError",$t),me(t,e,"onFetchError",$t),{data:null,error:$t}}}let st=s[c];if(!E(st))return{data:null,error:{message:`Method "${c}" not found on adapter`}};let G={from:a,select:L,params:W,single:h,limit:x,offset:b,order:y,headers:_,baseUrl:k},bt=xc(e,r);if(bt&&(G.headers={...G.headers,"Accept-Language":bt}),A!==void 0){if(w(A))A.offset!==void 0&&(G.offset=A.offset),A.limit!==void 0&&(G.limit=A.limit),A.cursor!==void 0&&(G.params={...G.params,cursor:A.cursor});else if(typeof A=="number"){let z=t.pageSize||x||20;G.offset=(A-1)*z,G.limit=z}}if(R!==void 0&&(G.params={...G.params,cursor:R}),c==="insert"||c==="update"||c==="upsert"){let z;if(p===!0||t.on==="submit")z=ws(e);else if(T(p)){let $t=ws(e);z={};for(let cf of p)z[cf]=$t[cf]}else e.state?.parse?z=e.state.parse():w(e.state)&&(z={...e.state});d&&(z=d(z,e,e.state)),G.data=z}if(c==="rpc"){let z=W;if(t.on==="submit"){let $t=ws(e);z=t.transformParams?t.transformParams($t,e,e.state):$t}G.params=z}if(c==="subscribe"){let z=s.subscribe({from:a,params:W,on:t.subscribeOn},($t,cf,JE)=>{Wr(e,$t,m),ee(e,"onFetchComplete",$t),me(t,e,"onFetchComplete",$t)});return i.__unsubscribe=z,{data:null,error:null,subscribed:!0}}return st(G)},yt);D&&ys.set(D,Cm);try{let st=await Cm;if(st?.subscribed)return;let{data:G,error:bt}=st||{};if(bt){D&&_s(D,null,bt),Re(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:bt,status:"error",fetchStatus:"idle"}),ee(e,"onFetchError",bt),me(t,e,"onFetchError",bt),ft&&ft({phase:"error",mode:"query",from:a,method:c,cacheKey:D,error:bt.message||bt,durationMs:(typeof performance<"u"?performance.now():Date.now())-ot});return}if(G!==void 0){if((c==="select"||c==="rpc")&&D){let $t=_s(D,G,null);$t.gcTime=j?.gcTime||3e5}let z=G;$&&T(G)&&(i.__pages||(i.__pages=[]),n.direction==="previous"?i.__pages.unshift(G):i.__pages.push(G),z=i.__pages.flat(),N&&(i.__nextPageParam=N(G,i.__pages),i.__hasNextPage=i.__nextPageParam!=null),P&&(i.__prevPageParam=P(G,i.__pages),i.__hasPreviousPage=i.__prevPageParam!=null)),E(H)&&(z=H(z,e,e.state)),d&&(z=d(z,e,e.state)),(!K||z!==void 0)&&Wr(e,z,m),Re(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),ee(e,"onFetchComplete",z),me(t,e,"onFetchComplete",z),ft&&ft({phase:"success",mode:"query",ok:!0,from:a,method:c,cacheKey:D,durationMs:(typeof performance<"u"?performance.now():Date.now())-ot})}}catch(st){Re(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:st,status:"error",fetchStatus:"idle"}),ee(e,"onFetchError",st),me(t,e,"onFetchError",st),ft&&ft({phase:"error",mode:"query",from:a,method:c,cacheKey:D,error:st.message||String(st),durationMs:(typeof performance<"u"?performance.now():Date.now())-ot})}finally{D&&ys.delete(D)}},B0=(t,e,r)=>{let n=t.on,o=e.__ref;o.__fetchListeners||(o.__fetchListeners=[]);let s=t.__runner||fr;if(n==="submit"){let i=c=>{c.preventDefault(),s(t,e,r)},a=e.node;a&&(a.addEventListener("submit",i),o.__fetchListeners.push(()=>a.removeEventListener("submit",i)))}else if(n==="click"){let i=()=>s(t,e,r),a=e.node;a&&(a.addEventListener("click",i),o.__fetchListeners.push(()=>a.removeEventListener("click",i)))}else n==="stateChange"&&(o.__fetchOnStateChange=()=>s(t,e,r))},V0=(t,e,r)=>{let n=e.__ref;n.__fetchCleanups||(n.__fetchCleanups=[]),N0();let o=t.refetchInterval;if(o){let s=typeof o=="number"?o:xs(o);if(s>0){let i=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&fr(t,e,r,{force:!0})},s);n.__fetchCleanups.push(()=>clearInterval(i))}}if(t.refetchOnWindowFocus!==!1){let s=()=>{let i=xc(e,r),a=ly(e,r),c=F0(t,i,a),l=ks(c),f=pd(t.cache);(!l||l.stale||Date.now()-l.time>(f?.staleTime||0))&&fr(t,e,r,{force:!0})};On.focus.add(s),n.__fetchCleanups.push(()=>On.focus.delete(s))}if(t.refetchOnReconnect!==!1){let s=()=>fr(t,e,r,{force:!0});On.online.add(s),n.__fetchCleanups.push(()=>On.online.delete(s))}},U0=(t,e,r)=>{if(!e.optimistic)return null;let n=t.__ref,o=e.as,s=t.state?.parse?t.state.parse():w(t.state)?{...t.state}:t.state;n.__optimisticSnapshot=s;let i=E(e.optimistic)?e.optimistic(r,s,t):e.optimistic;return i!==void 0&&Wr(t,i,o),s},ud=(t,e)=>{let r=t.__ref,n=r.__optimisticSnapshot;n!==void 0&&(Wr(t,n,e.as),delete r.__optimisticSnapshot)},z0=async(t,e,r)=>{let n=r?.fetch;if(!n)return;let o=await hd(n,r);if(!o)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:x,onSuccess:b,onError:y,onSettled:_}=t,k;if(c===!0||u==="submit")k=ws(e);else if(T(c)){let P=ws(e);k={};for(let $ of c)k[$]=P[$]}else e.state?.parse?k=e.state.parse():w(e.state)&&(k={...e.state});l&&(k=l(k,e,e.state)),E(x)&&x(k,e,e.state);let A=m?U0(e,t,k):null;s.__fetching=!0,Re(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),ee(e,"onFetchStart"),me(t,e,"onFetchStart");let R=r?.analyze?.emitNetwork,N=R?typeof performance<"u"?performance.now():Date.now():0;R&&R({phase:"start",mode:"mutation",from:a,method:i});try{if(d!==!1&&o.auth!==!1&&o.getSession){let W=await o.getSession();if(d===!0&&!W){A!==void 0&&ud(e,t);let j={message:"Not authenticated"};ee(e,"onFetchError",j),me(t,e,"onFetchError",j);return}}let P=o[i];if(!E(P))return;let $={from:a,data:k,headers:h,baseUrl:g};t.params&&($.params=fy(t.params,e,r));let V=xc(e,r);V&&($.headers={...$.headers,"Accept-Language":V});let _t=ay(t),H=await cy(()=>P($),_t),{data:K,error:L}=H||{};if(L){A!==void 0&&ud(e,t),Re(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:L,status:"error",fetchStatus:"idle"}),ee(e,"onFetchError",L),E(y)&&y(L,k,e),E(_)&&_(null,L,k,e),R&&R({phase:"error",mode:"mutation",from:a,method:i,error:L.message||String(L),durationMs:(typeof performance<"u"?performance.now():Date.now())-N});return}if(delete s.__optimisticSnapshot,K!==void 0){let W=f?{[f]:K}:K;e.state?.update&&e.state.update(W,{preventFetch:!0})}if(Re(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),ee(e,"onFetchComplete",K),me(t,e,"onFetchComplete",K),E(b)&&b(K,k,e),E(_)&&_(K,null,k,e),R&&R({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-N}),p){let W=T(p)?p:[p];for(let j of W)if(j===!0||j==="*")for(let[yt]of Dt)yt.startsWith(a+":")&&Ss(yt);else Ss(j)}}catch(P){A!==void 0&&ud(e,t),Re(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:P,status:"error",fetchStatus:"idle"}),ee(e,"onFetchError",P),me(t,e,"onFetchError",P),E(y)&&y(P,k,e),E(_)&&_(null,P,k,e),R&&R({phase:"error",mode:"mutation",from:a,method:i,error:P.message||String(P),durationMs:(typeof performance<"u"?performance.now():Date.now())-N})}finally{s.__fetching=!1}},vs=(t,e,r,n)=>{if(!t||!n?.fetch)return;let s=it(t,e);if(!s)return;let i=T(s)?s.map(c=>oy(it(c,e),e)).filter(Boolean):[oy(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?z0:fr;c.on==="create"?f(c,e,n):Promise.resolve().then(()=>{B0({...c,__runner:f},e,n)}),!l&&c.on==="create"&&(c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&V0(c,e,n)}let a=e.__ref;a.refetch=c=>{for(let l of i)fr(l,e,n,{force:!0,...c})},a.fetchNextPage=()=>{let c=i[0];if(!c||!c.infinite)return;let l=a.__nextPageParam;if(l==null)return;let f={...c,cursor:l};fr(f,e,n,{direction:"next",force:!0})},a.fetchPreviousPage=()=>{let c=i[0];if(!c||!c.infinite)return;let l=a.__prevPageParam;if(l==null)return;let f={...c,cursor:l};fr(f,e,n,{direction:"previous",force:!0})}},W0={invalidateQueries:t=>{if(!t){Ss();return}if(S(t))for(let[e]of Dt)(e.startsWith(t)||e.includes(t))&&Ss(e);else if(T(t)){let e=t.join(":");for(let[r]of Dt)r.includes(e)&&Ss(r)}},removeQueries:t=>{if(!t){mc();return}if(S(t))for(let[e]of Dt)(e.startsWith(t)||e.includes(t))&&mc(e)},getQueryData:t=>ks(t)?.data??void 0,setQueryData:(t,e)=>{let r=ks(t),n=E(e)?e(r?.data):e;_s(t,n,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let n=await hd(r,e);if(!n)return;let o=t.cache?.key||`${t.from}:${t.method||"select"}:${JSON.stringify(t.params||"")}`,s=n[t.method||"select"];if(!E(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=_s(o,i.data,null);a.gcTime=pd(t.cache)?.gcTime||3e5}return i},getCache:()=>Dt,clear:()=>mc(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of Dt)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||mc(r))}},gd={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||ys.clear(),vs(e,t,t.state,t.context))}},H0=vs});function As(t){let e=this,{__ref:r}=e,n=[].concat(t),o=r.root[n[0]];if(!n||!n.length)return console.log(n,"on",e.key,"is undefined");for(;o.key===n[0]&&(n.shift(),!!n.length);)if(o=o[n[0]],!o)return;return o}function yd(t){let e=this,{parent:r}=e;if(E(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 bd(t){let e=this,{__ref:r}=e,n=r?.__children;if(n)for(let o=0;o<n.length;o++){let s=n[o],i=e[s];if(s===t)return i;if(E(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 xd(t,e=[]){let r=this,{__ref:n}=r,o=n?.__children;if(o){for(let s=0;s<o.length;s++){let i=o[s],a=r[i];if(i===t)e.push(a);else if(E(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 _c(t={}){let e=this;if(e.node?.style){for(let r in t){let n=t[r],o=e[r];if(w(n)&&o)_c.call(o,n);else if(n!=null){let s=r.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),i=String(n).replace(/\s*!important\s*$/,"");e.node.style.setProperty(s,i,"important")}}return e}}function dy(t){let e=this;if(lr("beforeRemove",e,t)===!1)return e;E(e.node.remove)?e.node.remove():ar()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=Vo(e.parent.__ref.__children,e.key)),lr("remove",e,t)}function _d(t){return this[t]}function Sd(t,e){let r=this;if(t)return r.update(t,e),r}function wd(t){return t?this.__ref&&this.__ref[t]:this.__ref}function Es(){return this.getRef("__children").map(e=>this[e])}function Ts(){return this.getRef().path}function Rs(t){let e=null,r=n=>n.__element&&n.root?.isRootState;if(!this)e=uy();else if(r(this))e=this.root;else if(this.__ref&&this.__ref.path){let n=this.state&&r(this.state),o=E(this.state)&&this.parent.state&&r(this.parent.state);(n||o)&&(e=this.state.root||this.parent.state.root)}return e||(e=uy()),t?e?.[t]:e}function Ps(t){let e=this.getRootState()?.__element;return e&&Object.keys(e).length>0&&t?e[t]:e}function $s(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function Is(t){let e=this.getRoot()?.context;return t?e[t]:e}function Ds(t){let e=this.context;return t?e[t]:e}function Sc(){let t=this,e=[];for(let r in t)!Object.prototype.hasOwnProperty.call(t,r)||sr.has(r)&&!qo.has(r)||e.push(r);return e}function wc(t=[]){let e=this,r={},n=Sc.call(e),o=n.includes("children"),s=t.length?new Set(t):null;for(let i=0;i<n.length;i++){let a=n[i];if(s&&s.has(a)||!Object.prototype.hasOwnProperty.call(e,a)||o&&a==="content")continue;let c=e[a];if(a==="state"){if(e.__ref&&!e.__ref.__hasRootState)continue;let l=E(c&&c.parse)?c.parse():c;r[a]=E(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 St(c)&&Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=c)}return r}function Cs(t=[],e=new WeakSet){let r=this;if(e.has(r))return;e.add(r);let n=wc.call(r,t),o=t.length?new Set(t):null;for(let s in n){if(o&&o.has(s)||!Object.prototype.hasOwnProperty.call(r,s))continue;let i=n[s];Array.isArray(i)?n[s]=i.map(a=>U(a)?Cs.call(a,t,e):a):U(i)&&(n[s]=Cs.call(i,t,e))}return n}function Rn(...t){if(dr!=="test"&&dr!=="development")return;let e=this,{__ref:r}=e;return console.groupCollapsed(e.key),t.length?t.forEach(n=>console.log(`%c${n}:
|
|
20
|
-
`,"font-weight: bold",e[
|
|
21
|
-
${
|
|
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},rd=(t,e={verbose:!0})=>{try{return t?v.eval("("+t+")"):{}}catch(r){e.verbose&&console.warn(r)}},od=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),hc=t=>{for(let e in t)return!1;return!0},nd=t=>S(t)&&hc(t),sd=()=>Object.create(null),vs=(t,e,r={})=>{let o=r.exclude||[],n=r.preventUnderscore;for(let s in e)o.includes(s)||!n&&Yr(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},Xr=(t,e,r=[])=>{let o=r instanceof Set;for(let n in e)Yr(n)||n==="constructor"||n==="prototype"||(o?r.has(n):r.includes(n))||(t[n]=e[n]);return t},Ht=(t,e,r={},o=new WeakMap)=>{if(!z(t)||!z(e)||Ut(t)||Ut(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&&Yr(a)||a==="constructor"||a==="prototype")continue;let c=t[a],l=e[a];Ut(l)?t[a]=l:z(c)&&z(l)?t[a]=Ht(c,l,r,o):l!==void 0&&(t[a]=l)}return t},gc=(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)||!gc(t[i],e[i],r))return!1}return!0},PC=new Set(["node","__ref"]),id=(t,e,r=PC)=>{if(t===e)return!0;if(!z(t)||!z(e)||Ut(t)||Ut(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(Ut(l)||Ut(f)){if(l!==f)return!1}else if(z(l)&&z(f)){if(!s(f,l))return!1}else if(l!==f)return!1}return!0}return s(t,e)},ad=(t,e)=>{if(e==null)return t;if(Vt(e)("string","number"))delete t[e];else if(O(e))for(let r=0;r<e.length;r++)delete t[e[r]];else throw new Error("Invalid input: props must be a string or an array of strings");return t},mc=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]=mc(t[r]));return e},cd=(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},ld=(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]},fd=(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},ud=(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},dd=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(eb==="test"||eb==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",r),!0},pd=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)},hd=(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 Cs,Es,As,yc=j(()=>{"use strict";Xe();Cs=(function(){let t=0;function e(){return t++,t}return e})(),Es=Cs,As=(t,e,r)=>(ct(r,t)||r||t.key||Cs()).toString()});var Se,gd,hr,bc,md,yd,bd,gr,_d,Jr,Ot,xd=j(()=>{"use strict";Se="production",gd=Se,hr=(t=Se)=>t==="production",bc=(t=Se)=>t==="testing"||t==="test",md=bc,yd=(t=Se)=>t==="staging",bd=(t=Se)=>t==="local",gr=(t=Se)=>t==="development"||t==="dev"||t==="local",_d=(t,e=Se)=>e[t],Jr=(t=Se)=>!hr(t),Ot=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 Ts(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 vd(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 wd,Sd,IC,kd,Bo,Uo,Ct,Vo=j(()=>{"use strict";wd=(t,e,r=300)=>{let o;return(...n)=>{clearTimeout(o),o=setTimeout(()=>{e.apply(t,n)},r)}},Sd=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}}},IC=/^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/,kd=t=>IC.test(t),Bo=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let r of e)if(r.resolveHandler)return!0;return!1},Uo=(t,e)=>{if(typeof t=="function")return t;let r=e?.context?.plugins;if(!r)return t;for(let o of r)if(o.resolveHandler){let n=o.resolveHandler(t,e);if(typeof n=="function")return n}return t},Ct=(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 Cd,ab=j(()=>{"use strict";At();Xe();Cd=(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"?ct(o,t)?r.__if=!0:delete r.__if:r.__if=!0}});var Ed,Ad,cb=j(()=>{"use strict";Ed=(t,...e)=>{t&&e.map(r=>console.log(r))},Ad=(t,e,...r)=>{t&&(console.group(e),r.map(o=>console.log(o)),console.groupEnd(e))}});function Id(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 Dd(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 Td,Od,Rd,Pd,lb=j(()=>{"use strict";At();ls();Td=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),Od=(t,e,r=365)=>{if(Et(et)||Et(et.cookie))return;let o=new Date;o.setTime(o.getTime()+r*24*60*60*1e3);let n=`expires=${o.toUTCString()}`;et.cookie=`${t}=${e};${n};path=/`},Rd=t=>{if(Et(et)||Et(et.cookie))return;let e=`${t}=`,o=decodeURIComponent(et.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""},Pd=t=>{Et(et)||Et(et.cookie)||(et.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var Ho,fb,$d,Ld=j(()=>{"use strict";Ho={root:["body","html"],head:["title","base","meta","style","noscript","script"],body:new Set(["string","style","fragment","a","abbr","acronym","address","applet","area","article","aside","audio","b","basefont","bdi","bdo","big","blockquote","br","button","canvas","caption","center","cite","code","search","col","colgroup","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","hgroup","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","template","hgroup","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr","svg","path","circle","ellipse","line","polygon","polyline","rect","g","defs","symbol","use","text","tspan","image","clipPath","mask","pattern","marker","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","feBlend","feColorMatrix","feFlood","feComposite","foreignObject"])},fb=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"]),$d=t=>Ho.body.has(t)});var Md,ub,zo,Ps,zt,Fd,_c,Is,Nd,Ds,xc,wc,$s,Sc,Wo,DC,Fe,db,Os,Ls,jd,Rs,Bd,Ud,kc,vc,Cc,Ec,Ac,Tc,pb,Oc=j(()=>{"use strict";Fo();Vd();Xe();At();Md="production",ub=t=>t.sourcemap!==!1&&Md!=="production",zo=t=>{if(t.includes("+"))return t.split("+").filter(Ne);if(t.includes("_")){let[e]=t.split("_");return[e]}if(t.includes(".")&&!Ne(t.split(".")[1])){let[e]=t.split(".");return[e]}return[t]},Ps=(t,e,r)=>{let o=[],n=zo(r);n&&(o=[...n]);let s=t.extends;return s&&(o=O(s)?[...o,...s]:[...o,s]),o},zt=(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},Fd=(t,e)=>{if(!t)return e;let{extends:r}=e,o=O(r)?r:[r],n=O(t)?t:[t];return{...e,extends:Lo(n,o)}},_c=()=>Math.random().toString(36).substring(2),Is={},Nd={},Ds=t=>Is[t.__hash],xc=(t,e)=>{let r=_c();return w(t)||(t.__hash=r),r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(Is[r]=e),e},wc=(t,e)=>t.__hash?e.concat(Ds(t)):xc(t,e),$s=(t,e,r,o=new Set,n,s)=>{for(let i of t)O(i)?$s(i,e,r,o,n,s):Wo(i,e,r,o,n,void 0,s);return e},Sc=(t,e,r,o=new Set,n,s,i)=>{let a=t.extends,c={...t};delete c.extends;let l=!1;for(let f in c){l=!0;break}return l&&(e.push(c),n&&n.push(s)),a&&Wo(a,e,r,o,n,s,i),e},Wo=(t,e,r,o=new Set,n,s,i)=>{if(!t||o.has(t))return e;if(O(t))return $s(t,e,r,o,n,i);let a=s;return w(t)?(a=t,t=Ls(t,r)):i&&S(t)&&i.has(t)&&(a=i.get(t)),o.add(t),t?.extends?Sc(t,e,r,o,n,a,i):t&&(e.push(t),n&&n.push(a)),e},DC=new Set(["parent","node","__ref","__proto__","extends","childExtends","childExtendsRecursive"]),Fe=(t,e,r,o,n)=>{e=ut(e);for(let s in e){if(DC.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)&&!O(a)?(r[s]=r[s]||{},db(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];Ne(s)?t[s]=Fe(i,a,c,o,l):Fe(i,a,c,o,l)}if(s==="extends"||s==="childExtends"||s==="childExtendsRecursive"){if(O(i)&&O(a))t[s]=i.concat(a);else if(O(i)&&S(a)){let c=Fe({},i);t[s]=Fe(c,a)}}}}return t},db=(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)&&!O(s)?(t[n]=t[n]||{},db(t[n],s,r,o)):t[n]=r}}},Os=(t,e,r)=>t.reduce((o,n,s)=>{let i=ut(n),a=r?r[s]:void 0;return Fe(o,i,e,a)},{}),Ls=(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&&(Md==="test"||Md==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},jd=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),Rs=(t,e,r,o)=>{if(!t)return[];if(t.__hash)return Ds(t)||[];let s=Wo(t,[],e,new Set,r,void 0,o);return r?s:wc(t,s)},Bd=(t,e)=>{if(!t)return e;let r=O(t)?t:[t];return Lo(r,e)},Ud=t=>{let e=[];function r(o){for(let n in o)Object.prototype.hasOwnProperty.call(o,n)&&(Ne(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;if(t.extends)if(Array.isArray(t.extends)&&t.extends.length>0){let[i,...a]=t.extends;if(typeof i=="string"&&s&&n?.components){let c=`${i}.${s}`;n.components[c]?zt([c,...a],t):zt(t.extends,t)}else zt(t.extends,t)}else if(typeof t.extends=="string"&&s&&n?.components){let i=`${t.extends}.${s}`;n.components[i]?zt(i,t):zt(t.extends,t)}else zt(t.extends,t);return vc(t,e,r),Cc(t,e,r),Ec(t,e,r),t.component&&zt(ct(t.component,t),t),n.defaultExtends&&zt(n.defaultExtends,t),Mo(o.__extends)},vc=(t,e,r={})=>{let{__ref:o}=t;return r.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&zt(e.childProps.extends,t),o.__extends},Cc=(t,e,r={})=>{let{__ref:o}=t,n=r.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!n&&s&&zt(s,t),o.__extends},Ec=(t,e,r={})=>{let{__ref:o}=t,n=e.childExtendsRecursive,s=r.ignoreChildExtendsRecursive||t.ignoreChildExtendsRecursive,i=t.key==="__text";return n&&!i&&!s&&zt(n,t),o.__extends},Ac=(t,e,r={})=>{let{__ref:o}=t,n=t.context||e.context,s=t.variant,i=ub(r),a=i?[...o.__extends]:null,c=Mo(o.__extends.map((l,f)=>Ls(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=Rs(c,n,f,l);o.__extendsStack=u,o.__extendsNames=f}else{let l=Rs(c,n);o.__extendsStack=l}return o.__extendsStack},Tc=(t,e,r={})=>{let{__ref:o}=t,{__extendsStack:n}=o;if(ub(r)){let s={},i=o.__extendsNames||[],a=Os(n,s,i),c={};Fe(t,a,c,void 0,s),o.__sourcemap=c}else{let s=Os(n);Fe(t,s)}return t},pb=(t,e,r={})=>(kc(t,e,r),Ac(t,e,r),Tc(t,e,r),t)});function Hd(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function zd(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function Wd(t,e,r){let{context:o}=e||{},[n]=zo(r),s=r||n;return o?.components?.[s]||o?.pages?.[s]}var Ne,Vd=j(()=>{"use strict";Oc();At();Ne=t=>{if(!w(t)||!t.length)return!1;let e=t.charCodeAt(0);return e>=65&&e<=90}});function hb(t,e){let{props:r,on:o}=e,n=Kr(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 gb=j(()=>{"use strict";bs();At()});function Rc(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&&Bo(this.context))){let g=Kr(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(yb.has(u)){t.props[o]=n,delete t[o],r.push(o);continue}let d=qd.test(o)||mb.test(o)||LC(n),h=dr.has(o);!d&&!h&&(o in t.props||(t.props[o]=n),delete t[o],r.push(o))}return t}function Pc(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&&Bo(this.context);if(s&&i){hb(o,t),delete t.props[o];continue}if(r.includes(o)||o==="childProps")continue;let a=o.charAt(0);if(yb.has(a))continue;let c=this.define?.[o],l=this.context?.define?.[o],f=S(c)||A(c),u=S(l)||A(l),d=qd.test(o)||mb.test(o),h=dr.has(o);(d||h||f||u)&&(t[o]===void 0||n===null)&&(t[o]=n,t.props&&delete t.props[o])}return t}function Ic(t=this){let e=[];return Rc.call(this,t,{cachedKeys:e}),Pc.call(this,t,{cachedKeys:e}),t}function Kd(t={}){return t.on||(t.on={}),t.props||(t.props={}),Ic.call(this,t)}function Yd(t,e){this.__element.update({props:t},e)}function Bs(t){let e={update:Yd.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var qd,mb,yb,$C,LC,Ns,Ms,Gd,js,Us,Vs,Dc,Fs,Xd,Jd,Zd=j(()=>{"use strict";jo();gb();Xe();At();bs();Vo();qd=/^[A-Z]/,mb=/^\d+$/,yb=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),$C=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),LC=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if($C.has(e)||qd.test(e))return!0;return!1},Ns=(t,e,r)=>{let{props:o,__ref:n}=t;if(n.__propsStack=[],o)n.__initialProps=o;else return{};return z(o)?{...o}:(n.__propsStack.push(o),{})};Ms=t=>Vt(t)("string","number")?{inheritedString:t}:t,Gd=(t,e)=>!t||!e.length?!1:e.includes(t),js=(t,e)=>{let{__ref:r}=t,o=r.__propsStack||[],n=e.props;if(!n)return o;let s=n[t.key],i=n.childProps||e.childProps,a=t.props?.ignoreChildProps;if(i&&!a){let c=Ms(i);o.unshift(c)}if(s){let c=Ms(s);o.unshift(c)}return o};Us=t=>{let e=new Set;return t.filter(r=>!r||pr.has(r)||e.has(r)?!1:(e.add(r),!0))},Vs=(t,e,r)=>(e.props=t.reduce((o,n)=>{if(pr.has(n))return o;for(;A(n);)n=ct(n,e);return nt(o,ut(n,{exclude:pr}))},{}),Bs(e),e.props),Dc=(t,e)=>{let{props:r,__ref:o}=t,n=o.__propsStack||[];if(e?.props&&(n=[...js(t,e)]),S(r)?n.push(r):r==="inherit"&&e?.props?n.push(e.props):r&&n.push(r),O(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=Us(n),o.__propsStack},Fs=(t,e)=>{let{__ref:r}=t,o=Dc(t,e);o.length?Vs(o,t):(r.__propsStack=[],t.props={})},Xd=function(t,e,r){let{__ref:o}=t;if(o.__if)Fs(t,e);else try{Fs(t,e)}catch(n){t.context?.designSystem?.verbose&&console.warn("initProps error at",o.path?.join("."),n),t.props={},o.__propsStack=[]}return Bs(t),t},Jd=(t,e,r)=>{let{__ref:o}=e,s=[...o.__propsStack||[]],i=js(e,r);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),o.__propsStack=Us(s),o.__propsStack.length&&Vs(o.__propsStack,e),e}});var bb,$c,Lc,Mc,Fc,Qd,Nc,jc,Bc,tp,_b=j(()=>{"use strict";Oc();yc();us();Zd();Ld();At();bb="production",$c=(t,e,r)=>{let o=e.childExtends&&e.childExtends.tag,n=e.childProps&&e.childProps.tag,s=Ho.body.has(r)&&r;return{text:t,tag:o||n||s||"string"}},Lc=(t,e,r)=>{if(t===void 0)return(bb==="test"||bb==="development")&&console.warn(r,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:Vt(t)("string","number")?$c(t,e,r):A(t)?{props:t}:t},Mc=(t,e)=>{let r={};return r.origin=t,r.parent=e,r},Fc=(t,e,r,o,n)=>{if(!e)return n;if(Ye(e)){let s={key:":root",node:e};return n[`${r}_parent`]=s,s}return e},Qd=(t,e)=>{let{__ref:r}=t,{__ref:o}=e,n=e&&e.key===":root";r?.root||(r.root=n?t:o?.root)},Nc=(t,e,r)=>{let{__ref:o}=e;return o||(o=e.ref={}),o.path||(o.path=[]),o.path.concat(r)},jc=(t,e,r,o,n)=>(o.context&&!n.context&&!t.context&&(n.context=o.context),o.context||e.context||n.context||t.context),Bc=(t,e,r)=>{let o=Mc(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=Ps(t,e,r),o.path=Nc(t,e,r),o},tp=(t,e,r,o,n)=>{let i=t?.__hash?{extends:[t]}:Lc(t,e,r);if(!i)return;let a=Fc(i,e,r,o,n),c=As(i,a,r);Bc(i,a,c);let l=Ns(i,a,c),f=jc(i,a,c,o,n),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var ep,Uc,Vc,Hc,zc,rp,Wc,op,np,sp,ip,xb=j(()=>{"use strict";Fo();jo();Xe();At();ep=t=>{let{state:e,props:r,__ref:o}=t,n=r?.state||e;return Vt(n)("string","number")?(o.__state=n,{value:n}):n===!0?(o.__state=t.key,{}):n?(o.__hasRootState=!0,n):!1},Uc=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},Vc=(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},Hc=(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]},zc=(t,e,r={})=>{let n=t.__ref.__state;if(!Wc(t))return;let s=Uc(n,e.state),i=e.state;if(s)i=s,n=n.replaceAll("~/","");else{let a=Vc(n,e.state);a&&(i=a,n=n.replaceAll("../",""))}if(i)return Hc(n,i,r)},rp=(t,e)=>{let r=t.__ref,o=zc(t,e);if(o===void 0)return t.state;if(Vt(o)("object","array"))return ut(o);if(Vt(o)("string","number","boolean"))return r.__stateType=typeof o,{value:o};console.warn(r.__state,"is not present. Replacing with",{})},Wc=t=>{let{__ref:e}=t,r=e?.__state;return!!(r&&Vt(r)("number","string","boolean"))},op=function(t){return z(t)?!!(t.update&&t.parse&&t.clean&&t.create&&t.parent&&t.destroy&&t.rootUpdate&&t.parentUpdate&&t.keys&&t.values&&t.toggle&&t.replace&&t.quietUpdate&&t.quietReplace&&t.add&&t.apply&&t.applyReplace&&t.setByPath&&t.setPathCollection&&t.removeByPath&&t.removePathCollection&&t.getByPath&&t.applyFunction&&t.__element&&t.__children):!1},np=(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},sp=(t,e)=>{let{__element:r}=e,o=r?.state;if(!o)return;let n=ut(o,Gr),s={[t.key]:n},i=S(o.__depends)?{...o.__depends,...s}:s;return Array.isArray(o)?gs(o,{...Object.getPrototypeOf(o),__depends:i}):Object.setPrototypeOf(o,{...Object.getPrototypeOf(o),__depends:i}),n},ip=(t,e,r={})=>{let{overwrite:o}=r;if(!o)return;let n=o==="shallow";if(o==="merge"){nt(t,e,Gr);return}(n?Xr:Ht)(t,e,Gr)}});var MC,ap,wb=j(()=>{"use strict";MC=(t,e)=>{let r=e;for(;r;){if(r===t)return!0;r=Object.getPrototypeOf(r)}return!1},ap=(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&&!MC(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var Sb,qc,mr,Kc,cp,lp=j(()=>{"use strict";At();Vo();Sb=(t,e)=>{let r="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[r]},qc=(t,e,r,o,n)=>{if(t=Uo(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}},mr=(t,e,r)=>{if(!e)throw new Error("Element is required");Ct(t,e,r);let o=Sb(t,e);if(o){let{state:n,context:s}=e;return qc(o,e,n,s,r)}},Kc=(t,e,r,o,n,s)=>{if(t=Uo(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}},cp=(t,e,r,o)=>{Ct(t,r,e,o);let n=Sb(t,r);if(n){let{state:s,context:i}=r;return Kc(n,e,r,s,i,o)}}});var fp,Hs,up=j(()=>{"use strict";fp={},Hs={}});var vb={};P(vb,{restAdapter:()=>kb,setup:()=>NC});var FC,Je,NC,kb,Cb=j(()=>{"use strict";FC=(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()},Je=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}},NC=async({url:t,headers:e,auth:r,fetchOptions:o})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return kb(t,e,r,o)},kb=(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 Je(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 Je(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 Je(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:_,baseUrl:b})=>{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"}`)),Je(FC(b||t,f||"",y),a({headers:s(_)}))},rpc:({from:f,params:u,headers:d,baseUrl:h})=>Je(c(`rpc/${f}`,h),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),insert:({from:f,data:u,headers:d,baseUrl:h})=>Je(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,_=m?`${f}/${m}`:f;return Je(c(_,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,_=m?`${f}/${m}`:f;return Je(c(_,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 Je(c(p,h),a({method:"DELETE",headers:s(d)}))}}}});var Ab={};P(Ab,{localAdapter:()=>Eb,setup:()=>BC});var Gc,jC,BC,Eb,Tb=j(()=>{"use strict";Gc=(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},jC=(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}},BC=async({data:t,...e})=>Eb(t,e),Eb=(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=>Gc(p,u));return jC(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(Gc(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 _=d||(m.id!==void 0?{id:m.id}:null),b=_?h.findIndex(y=>Gc(y,_)):-1;if(b>-1){let y={...h[b]};Object.assign(h[b],m),p.push(h[b]),c(f,"UPDATE",h[b],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--)Gc(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 Qr={};P(Qr,{createAdapter:()=>qC,default:()=>rE,executeFetch:()=>Js,fetchPlugin:()=>yp,initAdapterAuth:()=>Qc,parseDuration:()=>qs,queryClient:()=>eE,registerAdapter:()=>WC,resolveDb:()=>Ib});var UC,VC,Yc,Ws,Xc,hp,HC,zC,WC,qC,Ib,qs,Mt,Db,zs,KC,Xs,Ks,Gs,Jc,gp,Zc,GC,Ob,dp,$b,Lb,qo,Rb,YC,Pb,XC,tl,Mb,Fb,Qc,mp,ae,ke,Ys,Zr,je,yr,JC,ZC,QC,pp,tE,Js,eE,yp,rE,br=j(()=>{"use strict";R();UC=["select","rpc","insert","update","upsert","delete","subscribe"],VC={rest:()=>Promise.resolve().then(()=>(Cb(),vb)),local:()=>Promise.resolve().then(()=>(Tb(),Ab))},Yc=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),Ws=(()=>{if(typeof globalThis<"u"&&globalThis[Yc])return globalThis[Yc];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Yc,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Yc]}catch{}return t})(),Xc=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),hp=(()=>{if(typeof globalThis<"u"&&globalThis[Xc])return globalThis[Xc];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Xc,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Xc]}catch{}return t})(),HC=5e3,zC=t=>new Promise(e=>{if(Ws[t])return e(Ws[t]);let r=hp[t]||=[],o=!1,n=()=>{o||(o=!0,e(Ws[t]||null))};r.push(n),setTimeout(n,HC)}),WC=(t,e)=>{Ws[t]=e;let r=hp[t];if(r&&r.length){hp[t]=[];for(let o of r)o()}},qC=t=>{let e={};for(let r of UC)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},Ib=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=Ws[o]||VC[o];if(!n&&(n=await zC(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)},qs=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},Mt=new Map,Db=new Map,zs=new Map,KC=(t,e,r)=>{if(t.cache?.key)return t.cache.key;let o=XC(t.params),n=r?`${r}:`:"",s=`${t.from}:${t.method}:${n}${JSON.stringify(o||"")}`;return e?`${s}:${e}`:s},Xs=t=>Mt.get(t)||null,Ks=(t,e,r)=>{let o=Mt.get(t),n={data:e,error:r,time:Date.now(),stale:!1};Mt.set(t,n);let s=Db.get(t);if(s)for(let i of s)A(i)&&i(n);return n},Gs=t=>{if(t){let e=Mt.get(t);e&&(e.stale=!0);return}for(let[,e]of Mt)e.stale=!0},Jc=t=>{if(t){Mt.delete(t);return}Mt.clear()},gp=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:qs(t),gcTime:3e5}:{staleTime:qs(t.stale||t.staleTime)||6e4,gcTime:qs(t.gc||t.gcTime||t.expire)||3e5,key:t.key},Zc=null,GC=()=>{Zc||(Zc=setInterval(()=>{let t=Date.now();for(let[e,r]of Mt){let o=Db.get(e);!(o&&o.size>0)&&t-r.time>(r.gcTime||3e5)&&Mt.delete(e)}},3e4),Zc.unref&&Zc.unref())};GC();Ob=3,dp=t=>Math.min(1e3*2**t,3e4),$b=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:Ob,delay:dp}:typeof e=="number"?{count:e,delay:dp}:{count:e.count??Ob,delay:A(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:dp}},Lb=async(t,e)=>{let{count:r,delay:o}=e,n;for(let s=0;s<=r;s++)try{let i=await t();if(i?.error){if(n=i.error,s<r){let a=A(o)?o(s,n):o;await new Promise(c=>setTimeout(c,a));continue}return i}return i}catch(i){if(n=i,s<r){let a=A(o)?o(s,i):o;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:n}},qo={focus:new Set,online:new Set},Rb=!1,YC=()=>{if(Rb||typeof window>"u")return;Rb=!0;let t=()=>{for(let r of qo.focus)r()},e=()=>{for(let r of qo.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},Pb=(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},XC=t=>(!t||A(t),t),tl=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},Mb=(t,e)=>{let o=(t?.state?.root||e?.state?.root)?.__fetchScope;return o?String(o):void 0},Fb=(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},Qc=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)})},mp=async(t,e)=>{if(A(t.select))return t.auth!==!1&&await Qc(t,e),t;if(t.__resolved)return t.auth!==!1&&await Qc(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=Ib(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 Qc(r,e),r):null},ae=(t,e,...r)=>{let o=A(t[e])?t[e]:null;o&&o.call(t,...r,t,t.state,t.context)},ke=(t,e,r,...o)=>{let n=t&&A(t[r])?t[r]:null;n&&n.call(e,...o,e,e.state,e.context)},Ys=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},Zr=(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})}},je=(t,e)=>{let r=t?.__ref;r&&(r.__fetchStatus=e,r.__fetching=e.isFetching,r.__fetchError=e.error)},yr=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 mp(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:_,offset:b,order:y,headers:x,baseUrl:k,page:C,cursor:T,getNextPageParam:$,getPreviousPageParam:M,infinite:D,placeholderData:V,initialData:H,select:G,keepPreviousData:ft}=t,I=w(G)?G:void 0;if(l&&A(e.getQuery)){let at=e.getQuery(s.name||"paths");at&&(I=at.select||at.length&&at.join(",")||I)}let F=Fb(f,e,r),N=gp(u),St=$b(t),Dt=tl(e,r),xe=Mb(e,r),J=Dt?`:${Dt}`:"",dt=xe?`${xe}:`:"",L=N?u?.key||`${a}:${c}:${dt}${JSON.stringify(F||"")}${D?":infinite":""}${C?":p"+JSON.stringify(C):""}${J}`:null;if(!i.__fetchInitialized&&L&&(i.__fetchInitialized=!0,H!==void 0)){let at=A(H)?H():H;Ks(L,at,null)}if((c==="select"||c==="rpc")&&L&&N){let at=Xs(L);if(at&&!at.error){let tt=Date.now()-at.time,_t=at.stale||tt>(N.staleTime||0),q=at.data;if(A(G)&&(q=G(q,e,e.state)),d&&(q=d(q,e,e.state)),Zr(e,q,m),!_t){je(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(V!==void 0){let tt=A(V)?V(e,e.state):V;tt!==void 0&&Zr(e,tt,m)}}if(L&&zs.has(L)&&!o.force){let at=zs.get(L);try{let tt=await Promise.race([at,new Promise((_t,q)=>setTimeout(()=>q("DEDUP_TIMEOUT"),15e3))]);if(tt?.data!==void 0){let _t=tt.data;A(G)&&(_t=G(_t,e,e.state)),d&&(_t=d(_t,e,e.state)),Zr(e,_t,m),ae(e,"onFetchComplete",_t),ke(t,e,"onFetchComplete",_t)}}catch{}return}let W=!Xs(L)?.data;je(e,{isFetching:!0,isLoading:W,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),ae(e,"onFetchStart"),ke(t,e,"onFetchStart");let K=r?.analyze?.emitNetwork,Z=K?typeof performance<"u"?performance.now():Date.now():0;K&&K({phase:"start",mode:"query",from:a,method:c,cacheKey:L,lang:Dt});let Uy=Lb(async()=>{if(g!==!1&&s.auth!==!1&&s.getSession){let q=await s.getSession();if(g===!0&&!q){let $t={message:"Not authenticated"};return je(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:$t,status:"error",fetchStatus:"idle"}),ae(e,"onFetchError",$t),ke(t,e,"onFetchError",$t),{data:null,error:$t}}}let at=s[c];if(!A(at))return{data:null,error:{message:`Method "${c}" not found on adapter`}};let tt={from:a,select:I,params:F,single:h,limit:_,offset:b,order:y,headers:x,baseUrl:k},_t=tl(e,r);if(_t&&(tt.headers={...tt.headers,"Accept-Language":_t}),C!==void 0){if(S(C))C.offset!==void 0&&(tt.offset=C.offset),C.limit!==void 0&&(tt.limit=C.limit),C.cursor!==void 0&&(tt.params={...tt.params,cursor:C.cursor});else if(typeof C=="number"){let q=t.pageSize||_||20;tt.offset=(C-1)*q,tt.limit=q}}if(T!==void 0&&(tt.params={...tt.params,cursor:T}),c==="insert"||c==="update"||c==="upsert"){let q;if(p===!0||t.on==="submit")q=Ys(e);else if(O(p)){let $t=Ys(e);q={};for(let lu of p)q[lu]=$t[lu]}else e.state?.parse?q=e.state.parse():S(e.state)&&(q={...e.state});d&&(q=d(q,e,e.state)),tt.data=q}if(c==="rpc"){let q=F;if(t.on==="submit"){let $t=Ys(e);q=t.transformParams?t.transformParams($t,e,e.state):$t}tt.params=q}if(c==="subscribe"){let q=s.subscribe({from:a,params:F,on:t.subscribeOn},($t,lu,SP)=>{Zr(e,$t,m),ae(e,"onFetchComplete",$t),ke(t,e,"onFetchComplete",$t)});return i.__unsubscribe=q,{data:null,error:null,subscribed:!0}}return at(tt)},St);L&&zs.set(L,Uy);try{let at=await Uy;if(at?.subscribed)return;let{data:tt,error:_t}=at||{};if(_t){L&&Ks(L,null,_t),je(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:_t,status:"error",fetchStatus:"idle"}),ae(e,"onFetchError",_t),ke(t,e,"onFetchError",_t),K&&K({phase:"error",mode:"query",from:a,method:c,cacheKey:L,error:_t.message||_t,durationMs:(typeof performance<"u"?performance.now():Date.now())-Z});return}if(tt!==void 0){if((c==="select"||c==="rpc")&&L){let $t=Ks(L,tt,null);$t.gcTime=N?.gcTime||3e5}let q=tt;D&&O(tt)&&(i.__pages||(i.__pages=[]),o.direction==="previous"?i.__pages.unshift(tt):i.__pages.push(tt),q=i.__pages.flat(),$&&(i.__nextPageParam=$(tt,i.__pages),i.__hasNextPage=i.__nextPageParam!=null),M&&(i.__prevPageParam=M(tt,i.__pages),i.__hasPreviousPage=i.__prevPageParam!=null)),A(G)&&(q=G(q,e,e.state)),d&&(q=d(q,e,e.state)),(!ft||q!==void 0)&&Zr(e,q,m),je(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),ae(e,"onFetchComplete",q),ke(t,e,"onFetchComplete",q),K&&K({phase:"success",mode:"query",ok:!0,from:a,method:c,cacheKey:L,durationMs:(typeof performance<"u"?performance.now():Date.now())-Z})}}catch(at){je(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:at,status:"error",fetchStatus:"idle"}),ae(e,"onFetchError",at),ke(t,e,"onFetchError",at),K&&K({phase:"error",mode:"query",from:a,method:c,cacheKey:L,error:at.message||String(at),durationMs:(typeof performance<"u"?performance.now():Date.now())-Z})}finally{L&&zs.delete(L)}},JC=(t,e,r)=>{let o=t.on,n=e.__ref;n.__fetchListeners||(n.__fetchListeners=[]);let s=t.__runner||yr;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))},ZC=(t,e,r)=>{let o=e.__ref;o.__fetchCleanups||(o.__fetchCleanups=[]),YC();let n=t.refetchInterval;if(n){let s=typeof n=="number"?n:qs(n);if(s>0){let i=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&yr(t,e,r,{force:!0})},s);o.__fetchCleanups.push(()=>clearInterval(i))}}if(t.refetchOnWindowFocus!==!1){let s=()=>{let i=tl(e,r),a=Mb(e,r),c=KC(t,i,a),l=Xs(c),f=gp(t.cache);(!l||l.stale||Date.now()-l.time>(f?.staleTime||0))&&yr(t,e,r,{force:!0})};qo.focus.add(s),o.__fetchCleanups.push(()=>qo.focus.delete(s))}if(t.refetchOnReconnect!==!1){let s=()=>yr(t,e,r,{force:!0});qo.online.add(s),o.__fetchCleanups.push(()=>qo.online.delete(s))}},QC=(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&&Zr(t,i,n),s},pp=(t,e)=>{let r=t.__ref,o=r.__optimisticSnapshot;o!==void 0&&(Zr(t,o,e.as),delete r.__optimisticSnapshot)},tE=async(t,e,r)=>{let o=r?.fetch;if(!o)return;let n=await mp(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:_,onSuccess:b,onError:y,onSettled:x}=t,k;if(c===!0||u==="submit")k=Ys(e);else if(O(c)){let M=Ys(e);k={};for(let D of c)k[D]=M[D]}else e.state?.parse?k=e.state.parse():S(e.state)&&(k={...e.state});l&&(k=l(k,e,e.state)),A(_)&&_(k,e,e.state);let C=m?QC(e,t,k):null;s.__fetching=!0,je(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),ae(e,"onFetchStart"),ke(t,e,"onFetchStart");let T=r?.analyze?.emitNetwork,$=T?typeof performance<"u"?performance.now():Date.now():0;T&&T({phase:"start",mode:"mutation",from:a,method:i});try{if(d!==!1&&n.auth!==!1&&n.getSession){let F=await n.getSession();if(d===!0&&!F){C!==void 0&&pp(e,t);let N={message:"Not authenticated"};ae(e,"onFetchError",N),ke(t,e,"onFetchError",N);return}}let M=n[i];if(!A(M))return;let D={from:a,data:k,headers:h,baseUrl:g};t.params&&(D.params=Fb(t.params,e,r));let V=tl(e,r);V&&(D.headers={...D.headers,"Accept-Language":V});let H=$b(t),G=await Lb(()=>M(D),H),{data:ft,error:I}=G||{};if(I){C!==void 0&&pp(e,t),je(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:I,status:"error",fetchStatus:"idle"}),ae(e,"onFetchError",I),A(y)&&y(I,k,e),A(x)&&x(null,I,k,e),T&&T({phase:"error",mode:"mutation",from:a,method:i,error:I.message||String(I),durationMs:(typeof performance<"u"?performance.now():Date.now())-$});return}if(delete s.__optimisticSnapshot,ft!==void 0){let F=f?{[f]:ft}:ft;e.state?.update&&e.state.update(F,{preventFetch:!0})}if(je(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),ae(e,"onFetchComplete",ft),ke(t,e,"onFetchComplete",ft),A(b)&&b(ft,k,e),A(x)&&x(ft,null,k,e),T&&T({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-$}),p){let F=O(p)?p:[p];for(let N of F)if(N===!0||N==="*")for(let[St]of Mt)St.startsWith(a+":")&&Gs(St);else Gs(N)}}catch(M){C!==void 0&&pp(e,t),je(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:M,status:"error",fetchStatus:"idle"}),ae(e,"onFetchError",M),ke(t,e,"onFetchError",M),A(y)&&y(M,k,e),A(x)&&x(null,M,k,e),T&&T({phase:"error",mode:"mutation",from:a,method:i,error:M.message||String(M),durationMs:(typeof performance<"u"?performance.now():Date.now())-$})}finally{s.__fetching=!1}},Js=(t,e,r,o)=>{if(!t||!o?.fetch)return;let s=ct(t,e);if(!s)return;let i=O(s)?s.map(c=>Pb(ct(c,e),e)).filter(Boolean):[Pb(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?tE:yr;c.on==="create"?f(c,e,o):Promise.resolve().then(()=>{JC({...c,__runner:f},e,o)}),!l&&c.on==="create"&&(c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&ZC(c,e,o)}let a=e.__ref;a.refetch=c=>{for(let l of i)yr(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};yr(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};yr(f,e,o,{direction:"previous",force:!0})}},eE={invalidateQueries:t=>{if(!t){Gs();return}if(w(t))for(let[e]of Mt)(e.startsWith(t)||e.includes(t))&&Gs(e);else if(O(t)){let e=t.join(":");for(let[r]of Mt)r.includes(e)&&Gs(r)}},removeQueries:t=>{if(!t){Jc();return}if(w(t))for(let[e]of Mt)(e.startsWith(t)||e.includes(t))&&Jc(e)},getQueryData:t=>Xs(t)?.data??void 0,setQueryData:(t,e)=>{let r=Xs(t),o=A(e)?e(r?.data):e;Ks(t,o,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let o=await mp(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=Ks(n,i.data,null);a.gcTime=gp(t.cache)?.gcTime||3e5}return i},getCache:()=>Mt,clear:()=>Jc(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of Mt)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||Jc(r))}},yp={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||zs.clear(),Js(e,t,t.state,t.context))}},rE=Js});function Qs(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 _p(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 xp(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 wp(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 el(t={}){let e=this;if(e.node?.style){for(let r in t){let o=t[r],n=e[r];if(S(o)&&n)el.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 jb(t){let e=this;if(mr("beforeRemove",e,t)===!1)return e;A(e.node.remove)?e.node.remove():hr()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=hs(e.parent.__ref.__children,e.key)),mr("remove",e,t)}function Sp(t){return this[t]}function kp(t,e){let r=this;if(t)return r.update(t,e),r}function vp(t){return t?this.__ref&&this.__ref[t]:this.__ref}function ti(){return this.getRef("__children").map(e=>this[e])}function ei(){return this.getRef().path}function oi(t){let e=null,r=o=>o.__element&&o.root?.isRootState;if(!this)e=Nb();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=Nb()),t?e?.[t]:e}function ni(t){let e=this.getRootState()?.__element;return e&&Object.keys(e).length>0&&t?e[t]:e}function si(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function ii(t){let e=this.getRoot()?.context;return t?e[t]:e}function ai(t){let e=this.context;return t?e[t]:e}function rl(){let t=this,e=[];for(let r in t)!Object.prototype.hasOwnProperty.call(t,r)||dr.has(r)&&!_s.has(r)||e.push(r);return e}function ol(t=[]){let e=this,r={},o=rl.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 mt(c)&&Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=c)}return r}function Zs(t=[],e=new WeakSet){let r=this;if(e.has(r))return;e.add(r);let o=ol.call(r,t),n=t.length?new Set(t):null;for(let s in o){if(n&&n.has(s)||!Object.prototype.hasOwnProperty.call(r,s))continue;let i=o[s];Array.isArray(i)?o[s]=i.map(a=>z(a)?Zs.call(a,t,e):a):z(i)&&(o[s]=Zs.call(i,t,e))}return o}function Ko(...t){if(_r!=="test"&&_r!=="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 Ep(...t){(_r==="test"||_r==="development")&&console.log(...t)}function ci(...t){(_r==="test"||_r==="development")&&console.warn(...t)}function to(...t){if(_r==="test"||_r==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&Ko.call(this),new Error(...t)}}function li(){let t=this,{key:e,parent:r}=t,{__children:o}=r.__ref,n=o.indexOf(e),s=o[n+1];return r[s]}function fi(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 ui(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,ut(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 Ap(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=>{to.call(this,s)}),n}catch(n){if(to.call(this,n),r?.strictMode)throw n}}async function di(){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(()=>(br(),Qr));await n(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:n}=await Promise.resolve().then(()=>(br(),Qr));await n(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let r=Promise.resolve().then(()=>(br(),Qr)).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(()=>(br(),Qr));await n(o,t.context)}return o}function pi(t){let e=this,r=t||Hs.useStateQuery||e.context?.useStateQuery;if(!r)return null;let o={};if(bp(e,o),r===!0)return o;let n=lE[r];return n?n(o):o}function Tp(t,e){return!!(No.has(t)||e?.context?.methods?.[t])}var _r,Bb,ri,Nb,Cp,bp,oE,Ub,nE,sE,iE,aE,cE,lE,Vb=j(()=>{"use strict";lp();jo();At();Xe();xd();Fo();up();_r="production";Bb=null,ri=t=>{Bb=t||null},Nb=()=>Bb||null;Cp=(t,e,r,o)=>Object.defineProperty(t,e,{get:r,set:o});bp=(t,e)=>{let r=t.__ref;if(!r)return;let o=r.__state;o&&typeof o=="string"&&oE(e,o);let n=r.__children;if(n)for(let a=0;a<n.length;a++){let c=t[n[a]];c&&c.__ref&&bp(c,e)}let s=r.contentElementKey||"content",i=t[s];i&&i.__ref&&bp(i,e)},oE=(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])}},Ub=(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
|
+
${Ub(i,e+1)}
|
|
22
23
|
${r}}`).join(`
|
|
23
|
-
`):""},
|
|
24
|
-
${
|
|
25
|
-
}`,
|
|
26
|
-
`+
|
|
24
|
+
`):""},nE=t=>`{
|
|
25
|
+
${Ub(t,1)}
|
|
26
|
+
}`,sE=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},iE=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("&")},aE=(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(`
|
|
27
28
|
`):"";return`SELECT ${c}
|
|
28
|
-
FROM ${a}${l}`},
|
|
29
|
+
FROM ${a}${l}`},cE=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},lE={graphql:nE,"json-api":sE,odata:iE,sql:aE,paths:cE}});var fE,Op,Hb=j(()=>{"use strict";yc();fE={snapshotId:Es},Op=(t,e)=>{let r=t.__ref,{currentSnapshot:o,calleeElement:n}=e;if(!n||n===t){let a=fE.snapshotId();return r.__currentSnapshot=a,[a,t]}let i=n.__ref.__currentSnapshot;return o<i?[i,n,!0]:[i,n]}});var nl,Rp,zb=j(()=>{nl=new Set(["__proto__","constructor","prototype","_id","__v","id","createdAt","updatedAt","schema"]),Rp=t=>typeof t=="string"&&nl.has(t)});async function Pp(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 Wb=j(()=>{"use strict"});var ce,xr,Go,hi,ve,sl,uE,eo,dE,Yo,Ip,qb=j(()=>{"use strict";ce={skypack:{url:"https://cdn.skypack.dev",formatUrl:(t,e)=>`${ce.skypack.url}/${t}${e!=="latest"?`@${e}`:""}`},esmsh:{url:"https://esm.sh",formatUrl:(t,e)=>`${ce.esmsh.url}/${t}${e!=="latest"?`@${e}`:""}`},unpkg:{url:"https://unpkg.com",formatUrl:(t,e)=>`${ce.unpkg.url}/${t}${e!=="latest"?`@${e}`:""}?module`},jsdelivr:{url:"https://cdn.jsdelivr.net/npm",formatUrl:(t,e)=>`${ce.jsdelivr.url}/${t}${e!=="latest"?`@${e}`:""}/+esm`},symbols:{url:"https://pkg.symbo.ls",formatUrl:(t,e)=>`${ce.symbols.url}/${t}${e!=="latest"?`@${e}`:""}/+esm`}},xr={"esm.sh":"esmsh",unpkg:"unpkg",skypack:"skypack",jsdelivr:"jsdelivr","pkg.symbo.ls":"symbols"},Go=(t={})=>{let{packageManager:e}=t;return xr[e]||null},hi=t=>{if(typeof t!="string")return t;let e=t.trim().match(/^[\^~](\d.*)$/);return e?e[1]:t},ve=(t,e="latest",r="esmsh")=>(ce[r]||ce.esmsh).formatUrl(t,hi(e)),sl=(t,e="latest",r="esmsh")=>{let o=ce[r]||ce.esmsh,n=hi(e);return`${o.url}/${t}${n!=="latest"?`@${n}`:""}/`},uE=/^node:|^@symbo-ls\//,eo=t=>typeof t=="string"&&uE.test(t),dE=/[<>…]/,Yo=t=>typeof t=="string"&&dE.test(t),Ip=(t,e="skypack",r={})=>{let o=t.dependencies||{},n=Object.keys(o);if(!n.length)return"";let s=r.pin||{},i={};for(let f of n){if(eo(f)||Yo(f))continue;let u=s[f]||o[f]||"latest";i[f]=ve(f,u,e),f.endsWith("/")||(i[f+"/"]=sl(f,u,e))}if(!Object.keys(i).length)return"";let a='<script type="importmap">',c="<\/script>",l=`{
|
|
29
30
|
"imports": ${JSON.stringify(i,null,2)}
|
|
30
|
-
}`;return`${a}${l}${c}`}});var Pd,_y=F(()=>{"use strict";Pd=t=>{if(!t)return"";let e=new Date(t),r=new Intl.DateTimeFormat("en",{year:"numeric"}).format(e),n=new Intl.DateTimeFormat("en",{month:"short"}).format(e);return`${new Intl.DateTimeFormat("en",{day:"2-digit"}).format(e)} ${n}, ${r}`}});var $d,Sy=F(()=>{"use strict";$d=(t,e)=>{let r=setTimeout(()=>{let{props:n}=t;if(!e.clientHeight){let{node:{clientHeight:o}}=t;o&&(e.clientHeight=o)}if(e.active){if(n.height==="auto")return;t.update({height:e.clientHeight},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});let o=setTimeout(()=>{t.update({height:"auto"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0}),clearTimeout(o)},450)}else t.update({height:"0"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});clearTimeout(r)})}});var Id,wy=F(()=>{"use strict";Id=function(e){let r=[0,1];for(let n=2;n<=e;n++)r[n]=r[n-1]+r[n-2];return r[e]}});var Dd,ky=F(()=>{"use strict";Dd=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function In(t,e={}){let{window:r=globalThis}=e,{document:n=r.document}=e;return new Promise((o,s)=>{let i=n.querySelector(`script[src="${t}"]`);if(i)return o(i);let a=n.createElement("script");a.src=t,a.async=e.async===!0,a.type=e.type||"text/javascript",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load script: ${t}`))},n.head.appendChild(a)})}async function Bd(t,e={}){let{window:r=globalThis}=e,{document:n=r.document}=e;return new Promise((o,s)=>{let i=n.querySelector(`link[href="${t}"]`);if(i)return o(i);let a=n.createElement("link");a.href=t,a.rel=e.rel||"stylesheet",a.type="text/css",a.media=e.media||"all",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load stylesheet: ${t}`))},n.head.appendChild(a)})}var Ld,Fd,Md,Nd,jd,vy=F(()=>{"use strict";Ld=(t,e=!1,r=document,n="text/javascript")=>new Promise((o,s)=>{try{let i=r.createElement("script");i.type=n,i.async=e,i.src=t,i.addEventListener("load",a=>{o({status:!0})}),i.addEventListener("error",a=>{s(new Error({status:!1,message:`Failed to load the script ${t}`}))}),r.body.appendChild(i)}catch(i){s(i)}}),Fd=(t,e=document,r="text/javascript")=>new Promise((n,o)=>{let s=e.createElement("script");s.type=r,s.src=t;let i=e.createElement("div");i.style.cssText="position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(255,255,255,0.8);z-index:9999;",e.body.appendChild(i),s.onload=()=>{console.log(`Successfully loaded: ${t}`),e.body.removeChild(i),n()},s.onerror=()=>{e.body.removeChild(i),o(new Error(`Failed to load: ${t}`))},e.body.appendChild(s)}),Md=(t,e=document,r,n="text/javascript")=>{let o=new window.XMLHttpRequest;if(o.open("GET",t,!1),o.send(),o.status===200){let s=e.createElement("script");s.type=n,s.text=o.responseText,e.body.appendChild(s),typeof r=="function"&&r()}else throw new Error(`Failed to load the script ${t}`)},Nd=(t,e=!1,r=document,n="text/javascript")=>new Promise((o,s)=>{try{let i=r.createElement("link");i.rel="stylesheet",i.href=t,i.addEventListener("load",a=>{o({status:!0})}),r.head.appendChild(i)}catch(i){s(i)}}),jd=(t,e=!1,r=document,n="text/javascript",o="smbls-script")=>{try{let s=r.createElement("script");s.type=n,s.async=e,s.id=o,s.innerHTML=t,r.body.appendChild(s)}catch(s){console.warn(s)}}});function sk(t,e){if(!e||typeof e!="object")return t;let r=o=>{if(!ok(o))return o;let s=e[o];return s?.src?s.src:o},n={...t};for(let[o,s]of Object.entries(n))typeof s=="string"?n[o]=r(s):Array.isArray(s)&&(n[o]=s.map(i=>typeof i=="string"?r(i):i));return n}function Cc(t,e){if(!t||!e)return;let r=e.split("."),n=t;for(let o of r){if(n==null||typeof n!="object")return;n=n[o]}return n}function ik(t,e,r){let o=(e.config||e.settings||{}).polyglot||e.polyglot,s=r?.lang||o?.defaultLang||"en",a=(o?.translations||{})[s]||{},c=r?.state||{},l={...t};for(let[f,u]of Object.entries(l))typeof u!="string"||!u.includes("{{")||(l[f]=u.replace(/\{\{\s*([^|{}]+?)\s*(?:\|\s*(\w+)\s*)?\}\}/g,(d,h,g)=>{let p=h.trim();if(g==="polyglot")return a[p]??Cc(a,p)??d;if(g==="getLocalStateLang")return Cc(c,p+s)??d;let m=Cc(c,p);return m!==void 0?m:a[p]??Cc(a,p)??d}));return l}function Cy(t){let e={...t};for(let[r,n]of Object.entries(e))if(typeof n=="function"){let o=n.toString(),s=o.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | getLocalStateLang }}`;continue}let i=o.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(i){e[r]=`{{ ${i[1]} | polyglot }}`;continue}let a=o.match(/s\.(\w+(?:\.\w+)+)/);if(a){e[r]=`{{ ${a[1]} }}`;continue}delete e[r]}else if(typeof n=="string"){let o=n.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(o){e[r]=`{{ ${o[1]} | getLocalStateLang }}`;continue}let s=n.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | polyglot }}`;continue}if(n.includes("=>")&&n.includes("s.")){let i=n.match(/s\.(\w+(?:\.\w+)+)/);if(i){e[r]=`{{ ${i[1]} }}`;continue}}}return e}function Ud(t,e,r,{isProduction:n=!1,channel:o="production"}={}){let s=t.pages?.[e],i=w(s?.state)&&s?.state,a=s?.metadata||s?.helmet||i||{},c=Cy(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=Cy(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?n?d.title=p:o==="development"?d.title=`${p} / dev:symbo.ls`:o==="staging"?d.title=`${p} / staging:symbo.ls`:d.title=`${p} / symbo.ls`:d.title="Symbols demo"}d=ik(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=sk(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 x=m.replace(/\{\{[^}]*\}\}/g,"").trim();x?d[p]=x:p==="title"?d[p]=g:delete d[p]}return d}var Tt,rk,Dn,nk,Ac,Vd,ok,Ay=F(()=>{"use strict";Et();Tt=t=>{if(t==null)return"";let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return t.toString().replace(/[&<>"']/g,r=>e[r])},rk=t=>Object.entries(t||{}).filter(([e,r])=>r!==void 0).map(([e,r])=>`${e}="${Tt(r)}"`).join(" "),Dn=t=>{let e=5381,r=String(t);for(let n=0;n<r.length;n++)e=(e*33^r.charCodeAt(n))>>>0;return e.toString(36)},nk=new Set(["jsonLd","styles","scripts"]),Ac=t=>{let e=[];if(Array.isArray(t.jsonLd))for(let r of t.jsonLd){if(r==null)continue;let n=typeof r=="string"?r:JSON.stringify(r),o=String(n).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${Dn(n)}">${o}<\/script>`)}if(Array.isArray(t.styles))for(let r of t.styles){if(r==null||!String(r).trim())continue;let n=String(r).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${Dn(n)}">${n}</style>`)}if(Array.isArray(t.scripts))for(let r of t.scripts){if(!r)continue;let n=typeof r=="string",o=n?r:r.src;if(!o&&!r.body)continue;let s=[];o&&s.push(`src="${Tt(o)}"`),n||(r.type&&s.push(`type="${Tt(r.type)}"`),r.async&&s.push("async"),r.defer&&s.push("defer"),r.integrity&&s.push(`integrity="${Tt(r.integrity)}"`),r.crossorigin&&s.push(`crossorigin="${Tt(r.crossorigin)}"`),r.referrerpolicy&&s.push(`referrerpolicy="${Tt(r.referrerpolicy)}"`),r.nomodule&&s.push("nomodule"));let i=` data-smbls-script="${Tt(o||Dn(r.body||""))}"`;if(!n&&r.body){let a=String(r.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${s.join(" ")}${i}>${a}<\/script>`)}else e.push(`<script ${s.join(" ")}${i}><\/script>`)}return e},Vd=(t,e)=>{e||(t={...t,robots:"noindex"});let r=Object.entries(t).reduce((n,[o,s])=>{if(!s&&s!==0&&s!==!1||nk.has(o))return n;if(o==="title")return n.push(`<title>${Tt(s)}</title>`),n;if(o==="canonical")return n.push(`<link rel="canonical" href="${Tt(s)}">`),n;if(o==="manifest")return n.push(`<link rel="manifest" href="${Tt(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="${Tt(f)}">`);else if(typeof f=="object"){let u=rk(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,h])=>h!==void 0).map(([d,h])=>`${d}="${Tt(h)}"`).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}="${Tt(l)}" content="${Tt(f)}">`);else if(Array.isArray(f))f.forEach(d=>{if(typeof d=="string"||typeof d=="number"||typeof d=="boolean")n.push(`<meta ${u}="${Tt(l)}" content="${Tt(d)}">`);else if(typeof d=="object"){let h=Object.entries(d).filter(([g,p])=>p!==void 0).map(([g,p])=>`${g}="${Tt(p)}"`).join(" ");n.push(`<meta ${h}>`)}});else if(typeof f=="object"){let d=Object.entries(f).filter(([h,g])=>g!==void 0).map(([h,g])=>`${h}="${Tt(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(...Ac(t)),r.join(`
|
|
31
|
-
`)},ok=t=>typeof t=="string"&&t.length>0&&!t.startsWith("/")&&!t.startsWith("http")});var Ec,zd,Ey=F(()=>{"use strict";Et();Ec=(t,e)=>(T(e)?e:Object.values(e)).reduce((r,n)=>Math.abs(n-t)<Math.abs(r-t)?n:r),zd=(t,e)=>(t=parseFloat(t),w(e)&&(e=Object.values(e)),Ec(t,e))});function Ln(t){let e=String(t||"").trim();if(!e)return{owner:Ty,key:"",full:""};let r=null,n=e;if(e.includes("/")){let s=e.indexOf("/");r=e.slice(0,s),n=e.slice(s+1)}n=n.replace(/\.symbo\.ls$/iu,""),r||(r=Ty);let o=n?`${r}/${n}`:"";return{owner:r,key:n,full:o}}async function Tc(t,e={}){if((e.provider||"kv")==="api")return Oy(t,e);let n=await pk(t,e);return n||Oy(t,e)}async function pk(t,e={}){let r=e.kvBaseUrl||ak,n=e.env||"production",o=`${r}/kv/${encodeURIComponent(t)}?env=${n}`;try{let s=await fetch(o,{method:"GET"});return s.ok&&(await s.json())?.value||null}catch{return null}}async function Oy(t,e={}){let r=e.apiBaseUrl||ck,{key:n}=Ln(t);try{let o=`${r}/core/projects/libraries/available?search=${encodeURIComponent(n)}&limit=10`,s=await fetch(o,{method:"GET"});if(!s.ok)return null;let i=await s.json(),c=(i?.items||i?.data||(Array.isArray(i)?i:[])).find(h=>{let{key:g}=Ln(h?.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 Ry(t,e={}){if(w(t))return t;if(S(t)){let{full:r}=Ln(t);if(!r)return null;try{let n=await Tc(r,e);return n||console.warn(`[smbls] Shared library "${r}" not found`),n}catch(n){return console.warn(`[smbls] Failed to fetch shared library "${r}":`,n.message),null}}return null}async function Hd(t,e={}){return!t||!t.length?[]:(await Promise.all(t.map(async n=>{if(zs(n)){let o=await Ry(uk(n),e);return o?{library:o,ignoreList:n.ignoreList}:null}return Ry(n,e)}))).filter(Boolean)}var Ty,ak,ck,Vs,Py,lk,fk,Us,Wd,zs,uk,dk,Ws,$y=F(()=>{"use strict";Et();Ty="system",ak="https://smbls-kv.nika-980.workers.dev",ck="https://api.symbols.app";Vs=(t,e,r,n)=>{for(let o in e){let s=n?`${n}/${o}`:o;r&&r.has(s)||(o in t?w(t[o])&&w(e[o])&&Vs(t[o],e[o],r,s):t[o]=e[o])}},Py=(t,e,r)=>{if(!w(t)||!e.size)return t;let n=`${r}/`,o=!1;for(let i of e)if(i.startsWith(n)){o=!0;break}if(!o)return t;let s={};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=`${r}/${i}`;e.has(a)||(s[i]=Py(t[i],e,a))}return s},lk=new Set,fk=t=>t.replace(/\.js$/iu,""),Us=t=>{let e=new Set;if(!Array.isArray(t))return e;for(let r of t){if(!S(r))continue;let n=r.split("/").map(o=>fk(o.trim())).filter(Boolean).join("/");n&&e.add(n)}return e},Wd=(t,e={})=>({library:t,ignoreList:Array.isArray(e.ignoreList)?e.ignoreList:[]}),zs=t=>w(t)&&Array.isArray(t.ignoreList)&&("library"in t||"key"in t||"name"in t),uk=t=>t.library!==void 0?t.library:t.key??t.name,dk=(t,e,r)=>{let n=Us(e.sharedLibIgnore);e.sharePages===!1&&n.add("pages");let o=n.size?new Set([...r,...n]):r;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&!(s==="sharePages"||s==="sharedLibIgnore")&&!o.has(s))if(w(e[s])&&w(t[s]))if(s==="designSystem")Vs(t[s],e[s],o,s);else for(let i in e[s])o.has(`${s}/${i}`)||i in t[s]||(t[s][i]=e[s][i]);else s in t||(t[s]=Py(e[s],o,s))},Ws=(t,e)=>{if(!(!e||!e.length))for(let r=0;r<e.length;r++){let n=e[r],o=lk;zs(n)&&(o=Us(n.ignoreList),n=n.library),w(n)&&dk(t,n,o)}}});var qd,Kd,Gd,Hs,Yd,qs,Xd,Gr,Iy=F(()=>{"use strict";Et();qd=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},Kd=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)}},Gd=t=>t.replace(/[^a-zA-Z0-9_]/g,""),Hs=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,"")),Yd=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),qs=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),Xd=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},Gr=t=>{if(T(t))return t;if(S(t))return t.split(" ");if(w(t))return Object.values(t);if(Ae(t))return[t]}});var Jd,Dy=F(()=>{"use strict";Jd=()=>{let t=document.styleSheets[0],e="";if(t)try{let r=t.cssRules||t.rules;for(let n=0;n<r.length;n++)e+=r[n].cssText}catch(r){console.error("Unable to access CSS rules. This may be due to CORS restrictions:",r)}else console.log("No stylesheets found in document.styleSheets[0].");return e}});var zt,Fn,Ks,Gs,Ly=F(()=>{"use strict";zt=t=>{let e=t&&t.src;if(!e||typeof e!="string")return null;let r=t.context;if(!r)return null;let n=r.assets&&r.assets[e]||r.files&&r.files[e];return n?typeof n=="string"?{src:n,type:null,variants:null}:typeof n=="object"&&typeof n.src=="string"?n:null:null},Fn=(t,{keepOneX:e=!0}={})=>{if(!Array.isArray(t)||!t.length)return"";let r=t.some(o=>typeof o.width=="number"),n=[];for(let o of t)r&&typeof o.width=="number"?n.push(`${o.src} ${o.width}w`):r||(o.scale===1&&e?n.push(o.src):o.scale&&o.scale!==1&&n.push(`${o.src} ${o.scale}x`));return n.join(", ")},Ks=t=>{if(!t||!Array.isArray(t.variants))return"";let e=t.variants.filter(r=>r.format===t.type);return Fn(e,{keepOneX:!1})},Gs=(t,e)=>{if(!t||typeof t!="object"||typeof t.src!="string")return[];if(!Array.isArray(t.variants)||!t.variants.length)return[{tag:"img",attr:{src:t.src,alt:e||""}}];let r=new Map;for(let a of t.variants)r.has(a.format)||r.set(a.format,[]),r.get(a.format).push(a);let n=[];for(let[a,c]of r)a!==t.type&&n.push({tag:"source",attr:{type:a,srcset:Fn(c,{keepOneX:!0})}});let o=r.get(t.type)||[],s=Fn(o,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...n,{tag:"img",attr:i}]}});var Oc={};I(Oc,{CDN_PROVIDERS:()=>Pe,DOMQL_EVENTS:()=>Jf,DOMQ_PROPERTIES:()=>sr,ENV:()=>pu,HTML_TAGS:()=>An,METHODS:()=>Sn,METHODS_EXL:()=>Ko,NODE_ENV:()=>ge,OPTIONS:()=>ms,PACKAGE_MANAGER_TO_CDN:()=>pr,PARSED_DOMQ_PROPERTIES:()=>qo,PROPS_METHODS:()=>ir,STATE_METHODS:()=>Br,STATE_PROPERTIES:()=>Xf,SVG_TAGS:()=>Mm,TYPES:()=>jo,UNIVERSAL_RESERVED_KEYS:()=>kc,addCaching:()=>sc,addContext:()=>oc,addExtend:()=>Nu,addExtends:()=>Ut,addItemAfterEveryElement:()=>Mf,addProtoToArray:()=>Uo,addRef:()=>ec,applyDependentState:()=>nd,applyEvent:()=>uc,applyEventUpdate:()=>dc,applyExtends:()=>Bm,applyProps:()=>fs,arrayContainsOtherArray:()=>Rf,arraysEqual:()=>jf,arrayzeValue:()=>Gr,buildImgSrcset:()=>Ks,buildSourcesAndImg:()=>Gs,cache:()=>cd,call:()=>Cd,captureSnapshot:()=>Ed,checkForStateTypes:()=>Qu,checkIfInherits:()=>fc,checkIfStringIsInArray:()=>Uf,clone:()=>Qf,cloneAndMergeArrayExtend:()=>rs,cloneFunction:()=>wu,concatAddExtends:()=>Lu,copyJavaScriptToClipboard:()=>Kd,copyStringToClipboard:()=>qd,createBasedOnType:()=>tc,createElement:()=>Zu,createElementExtends:()=>Ua,createExtends:()=>os,createExtendsFromKeys:()=>En,createExtendsStack:()=>qa,createIfConditionFlag:()=>ku,createInheritedState:()=>td,createKey:()=>ts,createNestedObject:()=>iu,createNestedObjectByKeyPath:()=>rd,createObjectWithoutPrototype:()=>La,createParent:()=>rc,createPath:()=>nc,createProps:()=>us,createPropsStack:()=>Za,createRoot:()=>Ju,createScope:()=>sd,createSnapshotId:()=>Qo,customDecodeURIComponent:()=>Yf,customEncodeURIComponent:()=>Gf,cutArrayAfterValue:()=>Lf,cutArrayBeforeValue:()=>Df,debounce:()=>es,debounceOnContext:()=>xu,decodeNewlines:()=>Kf,deepClone:()=>ut,deepContains:()=>ou,deepDefaults:()=>Vs,deepDestringifyFunctions:()=>te,deepExtend:()=>Va,deepMerge:()=>Z,deepMergeExtends:()=>Te,deepStringifyFunctions:()=>Go,defineSetter:()=>kd,destringifyGlobalScope:()=>Xo,detectHeightOnInit:()=>$d,detectInfiniteLoop:()=>fu,document:()=>Y,encodeNewlines:()=>qf,error:()=>qr,excludeKeysFromObject:()=>du,exec:()=>it,extendCachedRegistry:()=>Fu,extendStackRegistry:()=>ss,extractArrayExtend:()=>as,fetchLibraryData:()=>Tc,fibonacciNumberByIndex:()=>Id,filterArrays:()=>Bf,filterArraysFast:()=>Vf,finalizeExtends:()=>Ka,findClosestNumber:()=>Ec,findClosestNumberInFactory:()=>zd,findInheritedState:()=>lc,findKeyPosition:()=>Wf,flattenExtend:()=>Tn,formatDate:()=>Pd,generateHash:()=>Na,generateHeadArrayTags:()=>Ac,generateKey:()=>Zo,generateMetaTags:()=>Vd,get:()=>_d,getCDNUrl:()=>ye,getCapitalCaseKeys:()=>Vu,getCdnProviderFromConfig:()=>Pn,getChildStateInKey:()=>cc,getChildren:()=>Es,getContext:()=>Ds,getCookie:()=>Tu,getDB:()=>js,getEmotionStylesheet:()=>Jd,getExtendsInElement:()=>ju,getExtendsStack:()=>ns,getExtendsStackRegistry:()=>Ba,getFrequencyInArray:()=>Pf,getHashedExtend:()=>is,getImportMapScript:()=>Rd,getInObjectByPath:()=>lu,getLocalStorage:()=>Ru,getNev:()=>yu,getPageMetadata:()=>Ud,getParentStateInKey:()=>ac,getPath:()=>Ts,getQuery:()=>Bs,getRef:()=>wd,getRoot:()=>Ps,getRootContext:()=>Is,getRootData:()=>$s,getRootState:()=>Rs,getRootStateInKey:()=>ic,getSpreadChildren:()=>Uu,global:()=>Ef,hasFunction:()=>Ee,hasHandlerPlugin:()=>kn,hasOwnProperty:()=>eu,hashContent:()=>Dn,inheritChildExtends:()=>Wa,inheritChildPropsExtends:()=>za,inheritParentProps:()=>ds,inheritRecursiveChildExtends:()=>Ha,initProps:()=>Gu,is:()=>jt,isArray:()=>T,isBoolean:()=>Ra,isContextComponent:()=>zu,isCyclic:()=>uu,isDOMNode:()=>Nt,isDate:()=>$a,isDefined:()=>St,isDevelopment:()=>cr,isEmpty:()=>Ia,isEmptyObject:()=>ru,isEqualDeep:()=>Da,isFunction:()=>E,isHtmlElement:()=>Mo,isLocal:()=>mu,isLoudDevRuntime:()=>Vt,isMalformedDependency:()=>$n,isMethod:()=>Ad,isMobile:()=>Au,isNode:()=>Ve,isNot:()=>Of,isNotProduction:()=>zr,isNull:()=>Pa,isNumber:()=>Ae,isObject:()=>w,isObjectLike:()=>U,isPhoto:()=>Dd,isProduction:()=>ar,isStaging:()=>gu,isState:()=>ed,isString:()=>S,isStringFunction:()=>Su,isTest:()=>Ma,isTesting:()=>hu,isUndefined:()=>At,isUniversallyReservedKey:()=>Td,isUnresolvableDependency:()=>Kr,isValidHtmlTag:()=>$u,isWrappedLibrary:()=>zs,joinArrays:()=>bn,jointStacks:()=>Mu,keys:()=>Sc,loadCssFile:()=>Nd,loadJavascript:()=>jd,loadJavascriptFile:()=>Ld,loadJavascriptFileEmbedSync:()=>Md,loadJavascriptFileSync:()=>Fd,loadRemoteCSS:()=>Bd,loadRemoteScript:()=>In,log:()=>vd,logGroupIf:()=>Cu,logIf:()=>vu,lookdown:()=>bd,lookdownAll:()=>xd,lookup:()=>yd,lowercaseFirstLetter:()=>jr,makeObjectWithoutPrototype:()=>nu,map:()=>Zf,mapStringsWithContextComponents:()=>cs,matchesComponentNaming:()=>Oe,memoize:()=>_u,merge:()=>pt,mergeSharedLibraries:()=>Ws,nextElement:()=>Fs,normalizeIgnoreList:()=>Us,normalizeLibraryKey:()=>Ln,objectToString:()=>Yo,objectizeStringProperty:()=>ls,overwrite:()=>Jo,overwriteDeep:()=>Bt,overwriteShallow:()=>Ur,overwriteState:()=>od,parse:()=>wc,parseDeep:()=>Cs,pickupElementFromProps:()=>Xa,pickupPropsFromElement:()=>Ya,previousElement:()=>Ms,propExists:()=>qu,propertizeElement:()=>Ja,propertizeUpdate:()=>Hu,remove:()=>dy,removeChars:()=>Gd,removeCookie:()=>Ou,removeDuplicateProps:()=>hs,removeDuplicatesInArray:()=>xn,removeFromArray:()=>$f,removeFromObject:()=>su,removeNestedKeyByPath:()=>au,removeValueFromArray:()=>Vo,removeValueFromArrayAll:()=>Ff,reorderArrayByValues:()=>Nf,replaceLiteralsWithObjectFields:()=>Nr,replaceOctalEscapeSequences:()=>Hf,resolveAsset:()=>zt,resolveHandler:()=>vn,resolveSharedLibraries:()=>Hd,returnValueAsText:()=>Qa,runPluginHook:()=>vt,self:()=>Tf,setActiveRootState:()=>Os,setCookie:()=>Eu,setHashedExtend:()=>ja,setInObjectByPath:()=>cu,setLocalStorage:()=>Pu,setNodeStyles:()=>_c,setProps:()=>Sd,setPropsPrototype:()=>ps,sharedLibrary:()=>Wd,spotByPath:()=>As,srcsetFor:()=>Fn,stringIncludesAny:()=>Wo,stringToObject:()=>tu,stripVersionRangePrefix:()=>vc,swapItemsInArray:()=>If,syncProps:()=>gs,toCamelCase:()=>Hs,toDashCase:()=>qs,toDescriptionCase:()=>Xd,toTitleCase:()=>Yd,toggleFullscreen:()=>Od,triggerEventOn:()=>lr,triggerEventOnUpdate:()=>id,trimStringFromSymbols:()=>zf,unstackArrayOfObjects:()=>Bo,update:()=>Ku,updateProps:()=>Yu,variables:()=>Ns,verbose:()=>Rn,warn:()=>Ls,window:()=>v});var O=F(()=>{"use strict";Fa();bu();Et();Ue();Cn();_n();No();Dm();Lm();Ho();Fo();Fm();Iu();Bu();Xu();Ga();qm();Km();wn();Gm();gy();ld();my();ad();yy();by();xy();_y();Sy();wy();ky();vy();Ay();Ey();$y();Iy();Dy();Ly()});var _w=lf((EN,xw)=>{var Eo=1e3,To=Eo*60,Oo=To*60,pn=Oo*24,pE=pn*7,hE=pn*365.25;xw.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return gE(t);if(r==="number"&&isFinite(t))return e.long?yE(t):mE(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function gE(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*hE;case"weeks":case"week":case"w":return r*pE;case"days":case"day":case"d":return r*pn;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Oo;case"minutes":case"minute":case"mins":case"min":case"m":return r*To;case"seconds":case"second":case"secs":case"sec":case"s":return r*Eo;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function mE(t){var e=Math.abs(t);return e>=pn?Math.round(t/pn)+"d":e>=Oo?Math.round(t/Oo)+"h":e>=To?Math.round(t/To)+"m":e>=Eo?Math.round(t/Eo)+"s":t+"ms"}function yE(t){var e=Math.abs(t);return e>=pn?rf(t,e,pn,"day"):e>=Oo?rf(t,e,Oo,"hour"):e>=To?rf(t,e,To,"minute"):e>=Eo?rf(t,e,Eo,"second"):t+" ms"}function rf(t,e,r,n){var o=e>=r*1.5;return Math.round(t/r)+" "+n+(o?"s":"")}});var ww=lf((TN,Sw)=>{function bE(t){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=o,r.enabled=a,r.humanize=_w(),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 x=p,b=Number(new Date),y=b-(u||b);x.diff=y,x.prev=u,x.curr=b,u=b,m[0]=r.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let _=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(A,R)=>{if(A==="%%")return"%";_++;let N=r.formatters[R];if(typeof N=="function"){let P=m[_];A=N.call(x,P),m.splice(_,1),_--}return A}),r.formatArgs.call(x,m),(x.log||r.log).apply(x,m)}return p.namespace=f,p.useColors=r.useColors(),p.color=r.selectColor(f),p.extend=n,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 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,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}Sw.exports=bE});var kw=lf((Kt,nf)=>{Kt.formatArgs=_E;Kt.save=SE;Kt.load=wE;Kt.useColors=xE;Kt.storage=kE();Kt.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`."))}})();Kt.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 xE(){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 _E(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+nf.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),t.splice(n,0,e)}Kt.log=console.debug||console.log||(()=>{});function SE(t){try{t?Kt.storage.setItem("debug",t):Kt.storage.removeItem("debug")}catch{}}function wE(){let t;try{t=Kt.storage.getItem("debug")||Kt.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function kE(){try{return localStorage}catch{}}nf.exports=ww()(Kt);var{formatters:vE}=nf.exports;vE.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var vm={};I(vm,{ANIMATION_PROPS:()=>oh,ARIA_ROLES:()=>cv,ATTR_TRANSFORMS:()=>Qp,BLOCK_PROPS:()=>sh,CDN_PROVIDERS:()=>Pe,CONFIG:()=>Qr,CSS_NATIVE_COLOR_REGEX:()=>be,CSS_PROPS_REGISTRY:()=>mt,CSS_UNITS:()=>yn,DEFAULT_CONFIG:()=>Hi,DEFAULT_CSS_PROPERTIES_LIST:()=>kt,DELEGATED_EVENTS:()=>ro,DESIGN_SYSTEM_OPTIONS:()=>Pg,DOMQL_EVENTS:()=>Jf,DOMQ_PROPERTIES:()=>sr,DOM_EVENTS:()=>pb,ENV:()=>pu,FACTORY:()=>se,FLEX_PROPS:()=>fh,FONT_PROPS:()=>ih,GRID_PROPS:()=>uh,HTML_ATTRIBUTES:()=>hl,HTML_TAGS:()=>An,LIFECYCLE_EVENTS:()=>wr,METHODS:()=>Sn,METHODS_EXL:()=>Ko,MISC_PROPS:()=>ah,MIXINS:()=>dl,NODE_ENV:()=>ge,OPTIONS:()=>ms,PACKAGE_MANAGER_TO_CDN:()=>pr,PARSED_DOMQ_PROPERTIES:()=>qo,POSITION_PROPS:()=>ch,PROPS_METHODS:()=>ir,REGISTRY:()=>Lt,RESERVED_STORE_METHODS:()=>Lr,ROUTER_OPTIONS:()=>Pl,STANDARD_SCHEME_QUERIES:()=>Zc,STATE_PROPERTIES:()=>Xf,STORE_METHOD_NAMES:()=>Io,SVG_TAGS:()=>to,THEME_PROPS:()=>lh,TIMING_PROPS:()=>Mi,TYPES:()=>jo,UNIVERSAL_RESERVED_KEYS:()=>kc,VALUE_TRANSFORMERS:()=>cl,__resetStateShadowWarnings:()=>kf,activateConfig:()=>By,addCaching:()=>sc,addContext:()=>oc,addDelegatedEvent:()=>Li,addExtend:()=>Nu,addExtends:()=>Ut,addItemAfterEveryElement:()=>Mf,addMethods:()=>ao,addProtoToArray:()=>Uo,addRef:()=>ec,animation:()=>wp,appendSVGSprite:()=>Ei,appendSvgIconsSprite:()=>Oi,applyAttrTransforms:()=>eh,applyCSS:()=>vg,applyDependentState:()=>nd,applyDocument:()=>Ai,applyEvent:()=>uc,applyEventUpdate:()=>dc,applyExtends:()=>oo,applyHeadings:()=>rl,applyInitialState:()=>xl,applyMediaSequenceVars:()=>gr,applyProps:()=>fs,applyReset:()=>Ri,applySequenceGlobalVars:()=>fi,applySequenceVars:()=>Ge,applySpacingSequence:()=>Si,applyStateMethods:()=>Zt,applyTimingSequence:()=>Ci,applyTrueProps:()=>ph,applyTypographySequence:()=>bi,arrayContainsOtherArray:()=>Rf,arraysEqual:()=>jf,arrayzeValue:()=>Gr,batch:()=>Ne,breakpoints:()=>_p,buildImgSrcset:()=>Ks,buildSourcesAndImg:()=>Gs,buildThemeVarStyles:()=>go,cache:()=>cd,cacheNode:()=>Sr,call:()=>Cd,callStateMethod:()=>ji,camelToAttr:()=>vr,camelToLowerAttr:()=>hb,captureSnapshot:()=>Ed,changeGlobalTheme:()=>ll,changeLightness:()=>np,checkAttributeByTagName:()=>Cr,checkEventFunctions:()=>th,checkForStateTypes:()=>Qu,checkIfBoxSize:()=>_i,checkIfInherits:()=>fc,checkIfStringIsInArray:()=>Uf,class:()=>Ep,clone:()=>Qf,cloneAndMergeArrayExtend:()=>rs,cloneFunction:()=>wu,color:()=>pp,colorStringToRgbaArray:()=>re,components:()=>po,compositeOverBackdrop:()=>Xr,concatAddExtends:()=>Lu,contrastRatio:()=>jn,convertSvgToSymbol:()=>ui,copyJavaScriptToClipboard:()=>Kd,copyStringToClipboard:()=>qd,create:()=>km,createAsync:()=>GE,createBasedOnType:()=>tc,createComputed:()=>gf,createConfig:()=>ni,createDefine:()=>iS,createEffect:()=>et,createElement:()=>Zu,createElementExtends:()=>Ua,createExtends:()=>os,createExtendsFromKeys:()=>En,createExtendsStack:()=>qa,createHTMLNode:()=>Qn,createIfConditionFlag:()=>ku,createInheritedState:()=>td,createKey:()=>ts,createNestedObject:()=>iu,createNestedObjectByKeyPath:()=>rd,createObjectWithoutPrototype:()=>La,createParent:()=>rc,createPath:()=>nc,createProps:()=>us,createPropsStack:()=>Za,createRoot:()=>Ju,createScope:()=>sd,createScopeStore:()=>Do,createSignal:()=>It,createSkeleton:()=>XE,createSnapshotId:()=>Qo,createState:()=>bh,createStore:()=>Gt,createSync:()=>YE,css:()=>le,cssMediaVars:()=>Kc,cssVars:()=>qc,customDecodeURIComponent:()=>Yf,customEncodeURIComponent:()=>Gf,cutArrayAfterValue:()=>Lf,cutArrayBeforeValue:()=>Df,debounce:()=>es,debounceOnContext:()=>xu,decodeNewlines:()=>Kf,deepClone:()=>ut,deepContains:()=>ou,deepDefaults:()=>Vs,deepDestringifyFunctions:()=>te,deepExtend:()=>Va,deepMerge:()=>Z,deepMergeExtends:()=>Te,deepStringifyFunctions:()=>Go,defaultDefine:()=>yo,defineResolvedThemeSignal:()=>Wn,defineSetter:()=>kd,defineThemeSignal:()=>zn,destringifyGlobalScope:()=>Xo,destroy:()=>Ji,detectHeightOnInit:()=>$d,detectInfiniteLoop:()=>fu,detectTag:()=>_r,devices:()=>Sp,dispose:()=>Ar,encodeNewlines:()=>qf,error:()=>qr,excludeKeysFromObject:()=>du,exec:()=>it,executeAttr:()=>dv,exetuteClassPerComponent:()=>Dv,extendCachedRegistry:()=>Fu,extendStackRegistry:()=>ss,extractArrayExtend:()=>as,extractConditionalAttrs:()=>gv,fetchLibraryData:()=>Tc,fibonacciNumberByIndex:()=>Id,filterArrays:()=>Bf,filterArraysFast:()=>Vf,filterAttributesByTagName:()=>uv,finalizeExtends:()=>Ka,findClosestNumber:()=>Ec,findClosestNumberInFactory:()=>zd,findHeadingLetter:()=>Jc,findHeadings:()=>li,findInheritedState:()=>lc,findKeyPosition:()=>Wf,flattenExtend:()=>Tn,font:()=>ap,fontFace:()=>fp,fontFamily:()=>cp,fontFamilyTypes:()=>lp,formatDate:()=>Pd,generateHash:()=>Na,generateHeadArrayTags:()=>Ac,generateKey:()=>Zo,generateMetaTags:()=>Vd,generateSequence:()=>Wt,generateSequencePosition:()=>$p,generateSprite:()=>Hn,generateSubSequence:()=>ai,get:()=>_d,getActiveConfig:()=>C,getActiveDocument:()=>ul,getActiveLang:()=>xo,getCDNUrl:()=>ye,getCacheSize:()=>Kp,getCapitalCaseKeys:()=>Vu,getCdnProviderFromConfig:()=>Pn,getChildStateInKey:()=>cc,getChildren:()=>Es,getColor:()=>X,getColorShade:()=>Dc,getContext:()=>Ds,getCookie:()=>Tu,getDB:()=>js,getDefaultOrFirstKey:()=>Jr,getEmotionStylesheet:()=>Jd,getExtendsInElement:()=>ju,getExtendsStack:()=>ns,getExtendsStackRegistry:()=>Ba,getFnPrefixAndValue:()=>Ke,getFontFace:()=>sp,getFontFaceEach:()=>Zr,getFontFaceEachString:()=>Uc,getFontFaceString:()=>Qs,getFontFamily:()=>yi,getFontFormat:()=>Bc,getFontSizeByKey:()=>xi,getFrequencyInArray:()=>Pf,getHashedExtend:()=>is,getImportMapScript:()=>Rd,getInObjectByPath:()=>lu,getLanguages:()=>ta,getLocalStateLang:()=>sa,getLocalStorage:()=>Ru,getMediaColor:()=>Ot,getMediaTheme:()=>ie,getNev:()=>yu,getObserver:()=>Dr,getPageMetadata:()=>Ud,getParentStateInKey:()=>ac,getPath:()=>Ts,getQuery:()=>Bs,getRef:()=>wd,getResolvedThemeSignal:()=>jy,getRgbTone:()=>He,getRoot:()=>Ps,getRootContext:()=>Is,getRootData:()=>$s,getRootState:()=>Rs,getRootStateInKey:()=>ic,getSafeInk:()=>Qc,getSafeInkInfo:()=>Dp,getSequenceValue:()=>ci,getSequenceValueBySymbols:()=>Xc,getSequenceValuePropertyPair:()=>De,getShadow:()=>vi,getShapeByKey:()=>ki,getSignals:()=>vf,getSpacingBasedOnRatio:()=>xe,getSpacingByKey:()=>wt,getSpreadChildren:()=>Uu,getSubratio:()=>ii,getSubratioDifference:()=>si,getSystemGlobalTheme:()=>ue,getTheme:()=>pi,getThemeSignal:()=>Ny,getTimingByKey:()=>Yt,getTimingFunction:()=>ae,global:()=>Ef,gradient:()=>hp,grid:()=>Ap,hasFunction:()=>Ee,hasHandlerPlugin:()=>kn,hasOwnProperty:()=>eu,hashContent:()=>Dn,hexToRgb:()=>Qd,hexToRgbArray:()=>Rc,hexToRgba:()=>ep,hslToRgb:()=>Ic,icons:()=>yp,inheritChildExtends:()=>Wa,inheritChildPropsExtends:()=>za,inheritParentProps:()=>ds,inheritRecursiveChildExtends:()=>Ha,init:()=>Qe,initPolyglot:()=>Dl,initProps:()=>Gu,injectGlobal:()=>xt,is:()=>jt,isArray:()=>T,isBoolean:()=>Ra,isCSSVar:()=>ht,isContextComponent:()=>zu,isCyclic:()=>uu,isDOMNode:()=>Nt,isDate:()=>$a,isDefined:()=>St,isDevelopment:()=>cr,isDomDocument:()=>je,isEmpty:()=>Ia,isEmptyObject:()=>ru,isEnumeratedTrueFalseAttr:()=>Xe,isEqualDeep:()=>Da,isFunction:()=>E,isGoogleFontsUrl:()=>Bn,isHostObject:()=>Be,isHtmlElement:()=>Mo,isLocal:()=>mu,isLoudDevRuntime:()=>Vt,isMalformedDependency:()=>$n,isMethod:()=>Ad,isMobile:()=>Au,isNode:()=>Ve,isNot:()=>Of,isNotProduction:()=>zr,isNull:()=>Pa,isNumber:()=>Ae,isObject:()=>w,isObjectLike:()=>U,isPhoto:()=>Dd,isProduction:()=>ar,isRawUnitValue:()=>Lo,isResolvedColor:()=>$e,isScalingUnit:()=>Mr,isStaging:()=>gu,isState:()=>ed,isStore:()=>dt,isString:()=>S,isStringFunction:()=>Su,isSvgTag:()=>eo,isTest:()=>Ma,isTesting:()=>hu,isTracking:()=>_h,isUndefined:()=>At,isUniversallyReservedKey:()=>Td,isUnresolvableDependency:()=>Kr,isValidHtmlTag:()=>$u,isValidTag:()=>Zn,isWasmLoaded:()=>q_,isWrappedLibrary:()=>zs,isWritableFamilyBucket:()=>Af,joinArrays:()=>bn,jointStacks:()=>Mu,keyframes:()=>Jn,keys:()=>Sc,linearChannelToSrgb:()=>Mc,loadCssFile:()=>Nd,loadJavascript:()=>jd,loadJavascriptFile:()=>Ld,loadJavascriptFileEmbedSync:()=>Md,loadJavascriptFileSync:()=>Fd,loadRemoteCSS:()=>Bd,loadRemoteScript:()=>In,loadTranslations:()=>ra,loadWasm:()=>H_,log:()=>vd,logGroupIf:()=>Cu,logIf:()=>vu,lookdown:()=>bd,lookdownAll:()=>xd,lookup:()=>yd,lowercaseFirstLetter:()=>jr,makeObjectWithoutPrototype:()=>nu,map:()=>Zf,mapStringsWithContextComponents:()=>cs,matchesComponentNaming:()=>Oe,media:()=>up,memoize:()=>_u,merge:()=>pt,mergeSharedLibraries:()=>Ws,mixTwoColors:()=>Zd,mixTwoRgb:()=>rp,mixTwoRgba:()=>Lc,nextElement:()=>Fs,normalizeIgnoreList:()=>Us,normalizeLibraryKey:()=>Ln,numToLetterMap:()=>Ie,objectToString:()=>Yo,objectizeStringProperty:()=>ls,oklabToLinearSrgb:()=>Nc,oklabToOklch:()=>Xs,oklchToGamutSafeSrgb:()=>Js,oklchToOklab:()=>jc,opacify:()=>Nn,overwrite:()=>Jo,overwriteDeep:()=>Bt,overwriteShallow:()=>Ur,overwriteState:()=>od,parkHostObject:()=>or,parse:()=>wc,parseColorToken:()=>ne,parseDeep:()=>Cs,pickupElementFromProps:()=>Xa,pickupPropsFromElement:()=>Ya,polyglotFunctions:()=>ia,polyglotPlugin:()=>_o,popConfig:()=>Q,previousElement:()=>Ms,propExists:()=>qu,propertizeElement:()=>Ja,propertizeUpdate:()=>Hu,pushConfig:()=>rt,refreshContextProto:()=>yl,registerEvent:()=>no,reinit:()=>kg,relativeLuminance:()=>Yr,remove:()=>io,removeChars:()=>Gd,removeCookie:()=>Ou,removeDelegatedEvent:()=>Fi,removeDuplicateProps:()=>hs,removeDuplicatesInArray:()=>xn,removeFromArray:()=>$f,removeFromObject:()=>su,removeNestedKeyByPath:()=>au,removeValueFromArray:()=>Vo,removeValueFromArrayAll:()=>Ff,reorderArrayByValues:()=>Nf,replaceLiteralsWithObjectFields:()=>Nr,replaceOctalEscapeSequences:()=>Hf,resolveAsset:()=>zt,resolveColorRgb:()=>tn,resolveColorsInGradient:()=>$i,resolveConfigDocument:()=>mn,resolveFileSource:()=>Zp,resolveFileUrl:()=>oe,resolveHandler:()=>vn,resolvePropValue:()=>kr,resolveSharedLibraries:()=>Hd,returnSubThemeOrDefault:()=>op,returnValueAsText:()=>Qa,rgbArrayToHex:()=>Pc,rgbToHSL:()=>$c,rgbToHex:()=>tp,runPluginHook:()=>vt,runThroughMedia:()=>el,scratchDefaultConfig:()=>Un,scratchSystem:()=>Yn,scratchUtils:()=>mr,self:()=>Tf,semanticIcons:()=>bp,sequence:()=>qe,serializeAttrValue:()=>Fe,set:()=>en,setActiveConfig:()=>Gc,setActiveDocument:()=>Hp,setActiveRootState:()=>Os,setAdaptiveSchemeVar:()=>br,setClass:()=>NC,setClassname:()=>Lv,setColor:()=>yr,setCookie:()=>Eu,setCssEngineHook:()=>Ol,setCustomFont:()=>Zs,setCustomFontMedia:()=>hr,setEach:()=>Vp,setFont:()=>mi,setFontFamily:()=>Kn,setFontImport:()=>Vn,setGradient:()=>qn,setHashedExtend:()=>ja,setInCustomFontMedia:()=>Vc,setInObjectByPath:()=>cu,setLang:()=>na,setLocalStorage:()=>Pu,setMediaTheme:()=>gi,setNodeStyles:()=>_c,setObserver:()=>hf,setProps:()=>Sd,setPropsPrototype:()=>ps,setSVG:()=>Gn,setScalingVar:()=>oi,setShadow:()=>xr,setSubScalingVar:()=>Yc,setSvgIcon:()=>Ti,setTheme:()=>hi,setValue:()=>Bp,setVariables:()=>Ip,setWasmEngine:()=>Di,shadow:()=>mp,shape:()=>Rp,sharedLibrary:()=>Wd,sizes:()=>Op,spacing:()=>dp,splitSpacedValue:()=>wi,splitTopLevelCommas:()=>We,splitTransition:()=>al,spotByPath:()=>As,srcsetFor:()=>Fn,srgbChannelToLinear:()=>Fc,srgbToOklab:()=>Ys,stringIncludesAny:()=>Wo,stringToObject:()=>tu,stripVersionRangePrefix:()=>vc,svg:()=>kp,svgData:()=>vp,swapItemsInArray:()=>If,syncProps:()=>gs,templates:()=>Cp,theme:()=>gp,timing:()=>xp,toCamel:()=>ri,toCamelCase:()=>Hs,toDashCase:()=>qs,toDescriptionCase:()=>Xd,toLinearChannel:()=>Mn,toTitleCase:()=>Yd,toggleFullscreen:()=>Od,transformBackgroundImage:()=>sl,transformBorder:()=>Le,transformBorderRadius:()=>Ye,transformBoxShadow:()=>Pi,transformClassname:()=>Sb,transformDuration:()=>Ii,transformShadow:()=>ol,transformSize:()=>gt,transformSizeRatio:()=>M,transformTextStroke:()=>nl,transformTransition:()=>jp,transformersByPrefix:()=>hh,transfromGap:()=>il,translate:()=>ea,triggerEventOn:()=>lr,triggerEventOnUpdate:()=>id,trimStringFromSymbols:()=>zf,typography:()=>ti,unit:()=>ip,unstackArrayOfObjects:()=>Bo,update:()=>so,updateProps:()=>Yu,updateVars:()=>MC,upsertTranslation:()=>oa,useCssInProps:()=>Jt,useHostState:()=>xh,usePropsAsCSS:()=>xb,useSelectorsAsCSS:()=>_b,variables:()=>Ns,vars:()=>Tp,verbose:()=>Rn,warn:()=>Ls,warnStateKeyShadowsMethod:()=>Fr,window:()=>v,wrapHoverRule:()=>_e});module.exports=t0(vm);var Cf={};I(Cf,{RESERVED_STORE_METHODS:()=>Lr,STORE_METHOD_NAMES:()=>Io,__resetStateShadowWarnings:()=>kf,batch:()=>Ne,createComputed:()=>gf,createEffect:()=>et,createScopeStore:()=>Do,createSignal:()=>It,createStore:()=>Gt,getObserver:()=>Dr,getSignals:()=>vf,isStore:()=>dt,setObserver:()=>hf,warnStateKeyShadowsMethod:()=>Fr});var Mt=null,va=0,Ca=[],Dr=()=>Mt,hf=t=>{Mt=t},Aa=0,ff=[];function It(t){let e=new Set;function r(){return Mt&&(e.add(Mt),Mt._sources.add(s)),t}function n(i){i!==t&&(t=i,o0(e))}function o(){return t}let s={get:r,set:n,peek:o,_subscribers:e,_type:"signal"};return s}function gf(t){let e,r=!0,n=new Set,o={_sources:new Set,_type:"computed",_subscribers:n,_execute(){pf(o);let s=Mt;Mt=o;try{e=t(),r=!1}finally{Mt=s}},_notify(){r=!0,n.size>0&&Rm(n)},get(){return Mt&&(n.add(Mt),Mt._sources.add(o)),r&&o._execute(),e},peek(){return r&&o._execute(),e}};return o._execute(),o}var he=new Set,uf=!1,Ea=[];function Ta(t){Ea.push(t),Ea.length>32&&Ea.shift()}function et(t,e){let r=e?.depth??0,n={_sources:new Set,_type:"effect",_depth:r,_label:e?.label,_disposed:!1,_subscribers:new Set,_execute(){if(n._disposed)return;pf(n);let o=Mt;Mt=n;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{Mt=o}},_notify(){n._disposed||(va>0?Ca.push(n):Aa>0?ff.push(n):mf(n))},dispose(){n._disposed=!0,pf(n)}};return n._execute(),n}function Ne(t){va++;try{t()}finally{va--,va===0&&n0()}}var df=!1,Em=1e3,e0=8;function Tm(){return typeof performance<"u"?performance.now():Date.now()}function mf(t){he.add(t),!df&&(uf||(uf=!0,queueMicrotask(Om)))}var gn=[];function r0(){if(he.size===1){let[t]=he;he.clear(),t._disposed||t._execute();return}gn.length=0;for(let t of he)gn.push(t);he.clear(),gn.sort((t,e)=>t._depth-e._depth);for(let t=0;t<gn.length;t++){let e=gn[t];e._disposed||e._execute()}gn.length=0}function Om(t=0){if(uf=!1,he.size===0)return;df=!0;let e=Tm(),r=!1;try{for(;he.size>0;){if(++t>Em){let n=new Map;for(let a of he){let c=a._label;if(typeof c=="function")try{c=c()}catch{c="<label error>"}if(c=c||"<unlabeled>",n.set(c,(n.get(c)||0)+1),n.size>=12)break}let o=[...n.entries()].map(([a,c])=>c>1?`${a} \xD7${c}`:a).join(", "),s=new Map;for(let a of Ea)s.set(a,(s.get(a)||0)+1);let i=[...s.entries()].map(([a,c])=>c>1?`${a} \xD7${c}`:a).join(", ");console.error("[smbls] reactive effect cascade exceeded",Em,"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):",o||"<queue empty>","\u2014 last notifying store writes:",i||"<none recorded>"),he.clear();break}if(r0(),he.size>0&&Tm()-e>e0){r=!0,setTimeout(()=>Om(t),0);break}}}finally{r||(df=!1)}}function n0(){for(let t=0;t<Ca.length;t++)mf(Ca[t]);Ca.length=0}function Rm(t){Aa++;try{for(let e of t)e._notify()}finally{if(Aa--,Aa===0&&ff.length>0){let e=ff.splice(0);for(let r=0;r<e.length;r++)mf(e[r])}}}function o0(t){Rm(t)}function pf(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var nr=Symbol("store"),Oa=Symbol("signals"),Io=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],Lr=new Set(Io),_f=new Set,yf=(t,e)=>t?t+"."+e:String(e);function Fr(t,e){let r=(e||"")+"::"+t;if(_f.has(r))return;_f.add(r);let n=e?`state.${e}`:"state",o=`[smbls/state] "${t}" is a reserved store-method name and was written as DATA at ${n}.${t}. The value is preserved and readable \u2014 data wins over the method \u2014 but "${n}.${t}(\u2026)" no longer reaches the store method on this node. Use "${n}.$${t}(\u2026)" for the method, or rename the data key. Reserved: ${Io.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(o)}function kf(){_f.clear()}var bf=t=>!t||typeof t!="object"||Array.isArray(t)||t[nr]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!Sf(t),s0=12,Sf=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function wf(t,e,r){if(t===e)return!0;if(r>s0)return!1;if(Array.isArray(t)||Array.isArray(e)){if(!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!wf(t[n],e[n],r+1))return!1;return!0}if(Sf(t)&&Sf(e)){let n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(let s of n)if(!Object.prototype.hasOwnProperty.call(e,s)||!wf(t[s],e[s],r+1))return!1;return!0}return!1}function Gt(t,e,r,n){r===void 0&&(r=0),n===void 0&&(n="");let o={},s={},i=e&&e.maxDepth||8;if(t&&typeof t=="object")for(let b in t){if(b==="__proto__"||!Object.prototype.hasOwnProperty.call(t,b))continue;if(b.startsWith("__")){s[b]=t[b];continue}Lr.has(b)&&Fr(b,n);let y=t[b];r<i&&y&&typeof y=="object"&&!bf(y)?(s[b]=y,o[b]=It(Gt(y,e,r+1,yf(n,b)))):(s[b]=y,o[b]=It(y))}let a=new Proxy(s,{get(b,y){if(y===nr)return!0;if(y===Oa)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 h;if(y==="$replace")return g;if(y==="$add")return p;if(y==="$remove")return m;if(y==="$destroy")return x;if(y==="$quietUpdate")return l;if(Lr.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 h;case"replace":return g;case"add":return p;case"remove":return m;case"destroy":return x;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 k=o[y].get();if(k!==void 0||!(y!=="root"&&b.root&&b.root!==a))return k}if(b[y]!==void 0)return b[y];let _=typeof y=="string"&&!y.startsWith("__")&&y!=="then"&&y!=="constructor"&&Dr()!=null;if(y!=="root"&&b.root&&b.root!==a){let k=b.root[y];return k===void 0&&_&&!Object.prototype.hasOwnProperty.call(o,y)?(o[y]=It(void 0),o[y].get()):k}if(_)return o[y]=It(void 0),o[y].get()},set(b,y,_){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]=_,!0;Lr.has(y)&&Fr(y,n);let k=yf(n,y);if(Object.prototype.hasOwnProperty.call(o,y))if(_&&typeof _=="object"&&!bf(_)){if(_===b[y])return!0;let A=o[y].peek(),R=A&&A[nr]?A.$parse():A;if(wf(_,R,0))return!0;b[y]=_,Ta(k),o[y].set(Gt(_,e,r+1,k))}else o[y].peek()!==_&&Ta(k),b[y]=_,o[y].set(_);else b[y]=_,_&&typeof _=="object"&&!bf(_)?o[y]=It(Gt(_,e,r+1,k)):o[y]=It(_);return!0},has(b,y){return typeof y=="string"&&y.charCodeAt(0)===36&&Lr.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&&Ta(yf(n,y)),o[y].set(void 0),delete o[y]),delete b[y],!0}});function c(b,y){Ne(()=>{for(let k in b)k!=="__proto__"&&(a[k]=b[k])});let _=s.__element;return _&&_.onUpdate&&!y?.quiet&&_.onUpdate(_,a,_.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 _ in o){if(_==="parent"||_==="root"||_.startsWith("__"))continue;let k=o[_].peek();k&&k[nr]?y[_]=k.$parse(b):y[_]=k}return y}function u(){return Ne(()=>{for(let b in o)delete a[b]}),a}function d(){return Object.keys(o)}function h(){return Object.keys(o).map(b=>o[b].peek())}function g(b){return Ne(()=>{for(let y in o)y in b||delete a[y];for(let y in b)y!=="__proto__"&&(a[y]=b[y])}),a}function p(b,y){return a[b]=y,a}function m(b){return delete a[b],a}function x(){u(),s.__element=null,s.parent=null}return a}function dt(t){return t&&t[nr]===!0}function vf(t){return t[Oa]}function Do(t,e){let r={},n={};if(t&&typeof t=="object")for(let i in t)n[i]=t[i],r[i]=It(t[i]);let o=i=>{if(Object.prototype.hasOwnProperty.call(r,i))return r;let a=e;for(;a;){let c=a[Oa];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[nr]?a[xf]:null}return null};return new Proxy(n,{get(i,a){return a===nr?!0:a===Oa?r:a===xf?e:a==="__raw"?i:Object.prototype.hasOwnProperty.call(r,a)?r[a].get():e&&a!=="then"&&a!=="constructor"?e[a]:i[a]},set(i,a,c){let l=o(a);return l?(l===r&&(i[a]=c),l[a].set(c),!0):(i[a]=c,r[a]=It(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[nr]?c[xf]: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 xf=Symbol("scope.parent");var Gp={};I(Gp,{css:()=>le,getActiveDocument:()=>ul,getCacheSize:()=>Kp,injectGlobal:()=>xt,keyframes:()=>Jn,reset:()=>nb,setActiveDocument:()=>Hp,setWasmEngine:()=>Di,wrapHoverRule:()=>_e});var Up={};I(Up,{CONFIG:()=>Qr,CSS_NATIVE_COLOR_REGEX:()=>be,CSS_UNITS:()=>yn,FACTORY:()=>se,STANDARD_SCHEME_QUERIES:()=>Zc,VALUE_TRANSFORMERS:()=>cl,activateConfig:()=>By,animation:()=>wp,appendSVGSprite:()=>Ei,appendSvgIconsSprite:()=>Oi,applyDocument:()=>Ai,applyHeadings:()=>rl,applyMediaSequenceVars:()=>gr,applyReset:()=>Ri,applySequenceGlobalVars:()=>fi,applySequenceVars:()=>Ge,applySpacingSequence:()=>Si,applyTimingSequence:()=>Ci,applyTypographySequence:()=>bi,breakpoints:()=>_p,changeGlobalTheme:()=>ll,changeLightness:()=>np,checkIfBoxSize:()=>_i,class:()=>Ep,color:()=>pp,colorStringToRgbaArray:()=>re,compositeOverBackdrop:()=>Xr,contrastRatio:()=>jn,convertSvgToSymbol:()=>ui,createConfig:()=>ni,cssMediaVars:()=>Kc,cssVars:()=>qc,defineResolvedThemeSignal:()=>Wn,defineThemeSignal:()=>zn,devices:()=>Sp,document:()=>Fy,findHeadingLetter:()=>Jc,findHeadings:()=>li,font:()=>ap,fontFace:()=>fp,fontFamily:()=>cp,fontFamilyTypes:()=>lp,generateSequence:()=>Wt,generateSequencePosition:()=>$p,generateSprite:()=>Hn,generateSubSequence:()=>ai,getActiveConfig:()=>C,getColor:()=>X,getColorShade:()=>Dc,getDefaultOrFirstKey:()=>Jr,getFnPrefixAndValue:()=>Ke,getFontFace:()=>sp,getFontFaceEach:()=>Zr,getFontFaceEachString:()=>Uc,getFontFaceString:()=>Qs,getFontFamily:()=>yi,getFontFormat:()=>Bc,getFontSizeByKey:()=>xi,getMediaColor:()=>Ot,getMediaTheme:()=>ie,getResolvedThemeSignal:()=>jy,getRgbTone:()=>He,getSafeInk:()=>Qc,getSafeInkInfo:()=>Dp,getSequenceValue:()=>ci,getSequenceValueBySymbols:()=>Xc,getSequenceValuePropertyPair:()=>De,getShadow:()=>vi,getShapeByKey:()=>ki,getSpacingBasedOnRatio:()=>xe,getSpacingByKey:()=>wt,getSubratio:()=>ii,getSubratioDifference:()=>si,getTheme:()=>pi,getThemeSignal:()=>Ny,getTimingByKey:()=>Yt,getTimingFunction:()=>ae,gradient:()=>hp,grid:()=>Ap,hexToRgb:()=>Qd,hexToRgbArray:()=>Rc,hexToRgba:()=>ep,hslToRgb:()=>Ic,icons:()=>yp,isCSSVar:()=>ht,isDomDocument:()=>je,isGoogleFontsUrl:()=>Bn,isHostObject:()=>Be,isRawUnitValue:()=>Lo,isResolvedColor:()=>$e,isScalingUnit:()=>Mr,isWritableFamilyBucket:()=>Af,linearChannelToSrgb:()=>Mc,media:()=>up,mixTwoColors:()=>Zd,mixTwoRgb:()=>rp,mixTwoRgba:()=>Lc,numToLetterMap:()=>Ie,oklabToLinearSrgb:()=>Nc,oklabToOklch:()=>Xs,oklchToGamutSafeSrgb:()=>Js,oklchToOklab:()=>jc,opacify:()=>Nn,parkHostObject:()=>or,parseColorToken:()=>ne,popConfig:()=>Q,pushConfig:()=>rt,relativeLuminance:()=>Yr,reset:()=>My,resolveColorRgb:()=>tn,resolveColorsInGradient:()=>$i,resolveConfigDocument:()=>mn,resolveFileUrl:()=>oe,returnSubThemeOrDefault:()=>op,rgbArrayToHex:()=>Pc,rgbToHSL:()=>$c,rgbToHex:()=>tp,runThroughMedia:()=>el,scratchDefaultConfig:()=>Un,scratchSystem:()=>Yn,scratchUtils:()=>mr,semanticIcons:()=>bp,sequence:()=>qe,set:()=>en,setActiveConfig:()=>Gc,setAdaptiveSchemeVar:()=>br,setColor:()=>yr,setCustomFont:()=>Zs,setCustomFontMedia:()=>hr,setEach:()=>Vp,setFont:()=>mi,setFontFamily:()=>Kn,setFontImport:()=>Vn,setGradient:()=>qn,setInCustomFontMedia:()=>Vc,setMediaTheme:()=>gi,setSVG:()=>Gn,setScalingVar:()=>oi,setShadow:()=>xr,setSubScalingVar:()=>Yc,setSvgIcon:()=>Ti,setTheme:()=>hi,setValue:()=>Bp,setVariables:()=>Ip,shadow:()=>mp,shape:()=>Rp,sizes:()=>Op,spacing:()=>dp,splitSpacedValue:()=>wi,splitTopLevelCommas:()=>We,splitTransition:()=>al,srgbChannelToLinear:()=>Fc,srgbToOklab:()=>Ys,svg:()=>kp,svgData:()=>vp,templates:()=>Cp,theme:()=>gp,timing:()=>xp,toCamel:()=>ri,toLinearChannel:()=>Mn,transformBackgroundImage:()=>sl,transformBorder:()=>Le,transformBorderRadius:()=>Ye,transformBoxShadow:()=>Pi,transformDuration:()=>Ii,transformShadow:()=>ol,transformSize:()=>gt,transformSizeRatio:()=>M,transformTextStroke:()=>nl,transformTransition:()=>jp,transfromGap:()=>il,typography:()=>ti,unit:()=>ip,vars:()=>Tp});var mr={};I(mr,{CSS_NATIVE_COLOR_REGEX:()=>be,CSS_UNITS:()=>yn,applyMediaSequenceVars:()=>gr,applySequenceGlobalVars:()=>fi,applySequenceVars:()=>Ge,changeLightness:()=>np,colorStringToRgbaArray:()=>re,compositeOverBackdrop:()=>Xr,contrastRatio:()=>jn,convertSvgToSymbol:()=>ui,findHeadingLetter:()=>Jc,findHeadings:()=>li,generateSequence:()=>Wt,generateSequencePosition:()=>$p,generateSprite:()=>Hn,generateSubSequence:()=>ai,getColorShade:()=>Dc,getDefaultOrFirstKey:()=>Jr,getFnPrefixAndValue:()=>Ke,getFontFace:()=>sp,getFontFaceEach:()=>Zr,getFontFaceEachString:()=>Uc,getFontFaceString:()=>Qs,getFontFormat:()=>Bc,getRgbTone:()=>He,getSequenceValue:()=>ci,getSequenceValueBySymbols:()=>Xc,getSequenceValuePropertyPair:()=>De,getSubratio:()=>ii,getSubratioDifference:()=>si,hexToRgb:()=>Qd,hexToRgbArray:()=>Rc,hexToRgba:()=>ep,hslToRgb:()=>Ic,isCSSVar:()=>ht,isDomDocument:()=>je,isGoogleFontsUrl:()=>Bn,isHostObject:()=>Be,isRawUnitValue:()=>Lo,isResolvedColor:()=>$e,isScalingUnit:()=>Mr,isWritableFamilyBucket:()=>Af,linearChannelToSrgb:()=>Mc,mixTwoColors:()=>Zd,mixTwoRgb:()=>rp,mixTwoRgba:()=>Lc,numToLetterMap:()=>Ie,oklabToLinearSrgb:()=>Nc,oklabToOklch:()=>Xs,oklchToGamutSafeSrgb:()=>Js,oklchToOklab:()=>jc,opacify:()=>Nn,parkHostObject:()=>or,parseColorToken:()=>ne,relativeLuminance:()=>Yr,resolveConfigDocument:()=>mn,resolveFileUrl:()=>oe,returnSubThemeOrDefault:()=>op,rgbArrayToHex:()=>Pc,rgbToHSL:()=>$c,rgbToHex:()=>tp,setCustomFont:()=>Zs,setCustomFontMedia:()=>hr,setFontImport:()=>Vn,setInCustomFontMedia:()=>Vc,setScalingVar:()=>oi,setSubScalingVar:()=>Yc,setVariables:()=>Ip,splitTopLevelCommas:()=>We,srgbChannelToLinear:()=>Fc,srgbToOklab:()=>Ys,toLinearChannel:()=>Mn});var je=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0),Be=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)},Af=t=>t!==null&&typeof t=="object"&&!Be(t),or=(t,e,r)=>{if(!t)return;if(je(r)){t.__domDocument||(t.__domDocument=r);return}let n=`__host_${e}`;t[n]||(t[n]=r)},mn=t=>t?je(t.__domDocument)?t.__domDocument:je(t.document)?t.document:null:null;var Mr=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",yn=["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"],i0=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a0=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${yn.filter(t=>t!=="auto").map(i0).join("|")})$`),Lo=t=>a0.test(String(t).trim());O();var re=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];if(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&&Y&&v){let e=Y.body.appendChild(Y.createElement("fictum")),r="rgb(1, 2, 3)";if(e.style.color=r,e.style.color!==r){Y.body.removeChild(e);return}if(e.style.color=t,e.style.color===r||e.style.color==="")return Y.body.removeChild(e),[0,0,0,0];t=v.getComputedStyle(e).color,Y.body.removeChild(e)}return t.indexOf("rgb")===0?(t.indexOf("rgba")===-1&&(t=`${t}, 1`),t.match(/[\.\d]+/g).map(e=>+e)):[0,0,0,0]},Zd=(t,e,r=.5)=>(t=re(t),e=re(e),Lc(t,e,r)),Qd=(t,e=1)=>{let[r,n,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${r},${n},${o})`},Rc=(t,e=1)=>{let[r,n,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[r,n,o]},tp=(t,e,r)=>"#"+(1<<24|t<<16|e<<8|r).toString(16).slice(1),Pc=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1),ep=(t,e=1)=>{let[r,n,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${r},${n},${o},${e})`},rp=(t,e,r=.5)=>{let n=[];for(let o=0;o<3;o++)n[o]=~~(t[o]+(e[o]-t[o])*r);return`rgb(${n})`},np=(t,e)=>{let[r,n,o]=e,s=Math.max(0,Math.min(100,o+parseFloat(t)));return[r,n,s]},$c=(t,e,r)=>{let n=Math.max(t,e,r),o=n-Math.min(t,e,r),s=1-Math.abs(n+n-o-1),i=o&&(n==t?(e-r)/o:n==e?2+(r-t)/o:4+(t-e)/o);return[60*(i<0?i+6:i),s?o/s:0,(n+n-o)/2]},Ic=(t,e,r,n=e*Math.min(r,1-r),o=(s,i=(s+t/30)%12)=>r-n*Math.max(Math.min(i-3,9-i,1),-1))=>[o(0),o(8),o(4)],Dc=(t,e)=>{let r=parseInt(t,16),n=(r>>16)+e;n>255?n=255:n<0&&(n=0);let o=(r>>8&255)+e;o>255?o=255:o<0&&(o=0);let s=(r&255)+e;return s>255?s=255:s<0&&(s=0),((s|o<<8|n<<16)+16777216).toString(16).slice(1)},Lc=(t,e,r=.5)=>{let n=[];for(let o=0;o<4;o++){let s=o===3?i=>i:Math.round;n[o]=s(t[o]+(e[o]-t[o])*r)}return`rgba(${n})`},Nn=(t,e)=>{let r=re(t);if(!r){zr()&&console.warn(t+" color is not rgba");return}return r[3]=e,`rgba(${r})`},ht=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,be=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,hk=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,ne=t=>{if(!S(t))return null;if(be.test(t))return{passthrough:t};if(ht(t))return{cssVar:t};let e=t.match(hk);if(!e)return null;let[,r,n,o]=e,s=n!==void 0?`0.${n}`:void 0,i=o&&o[0]==="="?o.slice(1):o;return{name:r,alpha:s,tone:i}},$e=t=>S(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),We=t=>{let e=[],r="",n=0;for(let o of t){if(o==="("?n+=1:o===")"&&n>0&&(n-=1),o===","&&n===0){e.push(r),r="";continue}r+=o}return(r.length||!e.length)&&e.push(r),e},Mn=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),Yr=t=>.2126*Mn(t[0])+.7152*Mn(t[1])+.0722*Mn(t[2]),jn=(t,e)=>{let r=Yr(t)+.05,n=Yr(e)+.05;return r>n?r/n:n/r},Fc=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),Mc=t=>(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*255,Ys=([t,e,r])=>{let[n,o,s]=[t,e,r].map(Fc),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]},Nc=([t,e,r])=>{let n=t+.3963377774*e+.2158037573*r,o=t-.1055613458*e-.0638541728*r,s=t-.0894841775*e-1.291485548*r,i=n**3,a=o**3,c=s**3;return[4.0767416621*i-3.3077115913*a+.2309699292*c,-1.2684380046*i+2.6097574011*a-.3413193965*c,-.0041960863*i-.7034186147*a+1.707614701*c]},Xs=([t,e,r])=>{let n=Math.atan2(r,e)*180/Math.PI;return n<0&&(n+=360),[t,Math.sqrt(e*e+r*r),n]},jc=([t,e,r])=>{let n=r*Math.PI/180;return[t,e*Math.cos(n),e*Math.sin(n)]},Js=(t,e,r,n=24)=>{let o=a=>Nc(jc([t,a,r])),s=a=>a.every(c=>c>=-1e-4&&c<=1.0001),i=o(e);if(!s(i)){let a=0,c=e;for(let l=0;l<n;l++){let f=(a+c)/2;s(o(f))?a=f:c=f}i=o(a)}return i.map(a=>Mc(Math.max(0,Math.min(1,a))))},Xr=(t,e=1,r=[255,255,255])=>e>=1?t:t.map((n,o)=>n*e+r[o]*(1-e)),He=(t,e)=>{S(t)&&t.includes("rgb")&&(t=re(t).join(", ")),S(t)&&(t=t.split(",").map(o=>parseFloat(o.trim()))),Ae(e)&&(e+="");let r=Pc(t),n=e.slice(0,1);if(n==="-"||n==="+"){let o=Dc(r,parseFloat(e));return Rc(o).join(", ")}else{let[o,s,i]=t,[a,c]=$c(o/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return Ic(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var op=(t,e)=>{if(t)return t.themes&&t.themes[e]?t.themes[e]:t[e]?[t,t[e]]:t};var oe=(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},Jr=(t,e)=>{if(t[e])return t[e].value;if(t.default)return t[t.default].value;let r=Object.keys(t)[0];return r&&t[r]&&t[r].value},Bc=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},Bn=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),Vn=t=>`@import url('${t}');`,Vc=t=>`@font-face { ${t} }`,Zs=(t,e,r,n={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=Bc(a),l=c?` format('${c}')`:"";return`url('${a}')${l}`}).join(`,
|
|
31
|
+
}`;return`${a}${l}${c}`}});var Dp,Kb=j(()=>{"use strict";Dp=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 $p,Gb=j(()=>{"use strict";$p=(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 Lp,Yb=j(()=>{"use strict";Lp=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 Mp,Xb=j(()=>{"use strict";Mp=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function Xo(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 Vp(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 Fp,Np,jp,Bp,Up,Jb=j(()=>{"use strict";Fp=(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)}}),Np=(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)}),jp=(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}`)},Bp=(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)}}),Up=(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 mE(t,e){if(!e||typeof e!="object")return t;let r=n=>{if(!gE(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 il(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 yE(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]??il(a,p)??d;if(g==="getLocalStateLang")return il(c,p+s)??d;let m=il(c,p);return m!==void 0?m:a[p]??il(a,p)??d}));return l}function Zb(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 zp(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=Zb(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=Zb(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=yE(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=mE(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 _=m.replace(/\{\{[^}]*\}\}/g,"").trim();_?d[p]=_:p==="title"?d[p]=g:delete d[p]}return d}var Tt,pE,Jo,hE,al,Hp,gE,Qb=j(()=>{"use strict";At();Tt=t=>{if(t==null)return"";let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return t.toString().replace(/[&<>"']/g,r=>e[r])},pE=t=>Object.entries(t||{}).filter(([e,r])=>r!==void 0).map(([e,r])=>`${e}="${Tt(r)}"`).join(" "),Jo=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)},hE=new Set(["jsonLd","styles","scripts"]),al=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="${Jo(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="${Jo(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="${Tt(n)}"`),o||(r.type&&s.push(`type="${Tt(r.type)}"`),r.async&&s.push("async"),r.defer&&s.push("defer"),r.integrity&&s.push(`integrity="${Tt(r.integrity)}"`),r.crossorigin&&s.push(`crossorigin="${Tt(r.crossorigin)}"`),r.referrerpolicy&&s.push(`referrerpolicy="${Tt(r.referrerpolicy)}"`),r.nomodule&&s.push("nomodule"));let i=` data-smbls-script="${Tt(n||Jo(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},Hp=(t,e)=>{e||(t={...t,robots:"noindex"});let r=Object.entries(t).reduce((o,[n,s])=>{if(!s&&s!==0&&s!==!1||hE.has(n))return o;if(n==="title")return o.push(`<title>${Tt(s)}</title>`),o;if(n==="canonical")return o.push(`<link rel="canonical" href="${Tt(s)}">`),o;if(n==="manifest")return o.push(`<link rel="manifest" href="${Tt(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="${Tt(f)}">`);else if(typeof f=="object"){let u=pE(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}="${Tt(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}="${Tt(l)}" content="${Tt(f)}">`);else if(Array.isArray(f))f.forEach(d=>{if(typeof d=="string"||typeof d=="number"||typeof d=="boolean")o.push(`<meta ${u}="${Tt(l)}" content="${Tt(d)}">`);else if(typeof d=="object"){let h=Object.entries(d).filter(([g,p])=>p!==void 0).map(([g,p])=>`${g}="${Tt(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}="${Tt(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(...al(t)),r.join(`
|
|
32
|
+
`)},gE=t=>typeof t=="string"&&t.length>0&&!t.startsWith("/")&&!t.startsWith("http")});var cl,Wp,t_=j(()=>{"use strict";At();cl=(t,e)=>(O(e)?e:Object.values(e)).reduce((r,o)=>Math.abs(o-t)<Math.abs(r-t)?o:r),Wp=(t,e)=>(t=parseFloat(t),S(e)&&(e=Object.values(e)),cl(t,e))});function Zo(t){let e=String(t||"").trim();if(!e)return{owner:e_,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=e_);let n=o?`${r}/${o}`:"";return{owner:r,key:o,full:n}}async function ll(t,e={}){if((e.provider||"kv")==="api")return o_(t,e);let o=await CE(t,e);return o||o_(t,e)}async function CE(t,e={}){let r=e.kvBaseUrl||bE,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 o_(t,e={}){let r=e.apiBaseUrl||_E,{key:o}=Zo(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}=Zo(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 n_(t,e={}){if(S(t))return t;if(w(t)){let{full:r}=Zo(t);if(!r)return null;try{let o=await ll(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 Kp(t,e={}){return!t||!t.length?[]:(await Promise.all(t.map(async o=>{if(yi(o)){let n=await n_(kE(o),e);return n?{library:n,ignoreList:o.ignoreList}:null}return n_(o,e)}))).filter(Boolean)}var e_,bE,_E,gi,s_,xE,wE,r_,SE,mi,qp,yi,kE,vE,bi,i_=j(()=>{"use strict";At();e_="system",bE="https://smbls-kv.nika-980.workers.dev",_E="https://api.symbols.app";gi=(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])&&gi(t[n],e[n],r,s):t[n]=e[n])}},s_=(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]=s_(t[i],e,a))}return s},xE=new Set,wE=new Set(["components","pages","functions","snippets","methods"]),r_=(t,e)=>e===""&&wE.has(t),SE=t=>t.replace(/\.js$/iu,""),mi=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=>SE(n.trim())).filter(Boolean).join("/");o&&e.add(o)}return e},qp=(t,e={})=>({library:t,ignoreList:Array.isArray(e.ignoreList)?e.ignoreList:[]}),yi=t=>S(t)&&Array.isArray(t.ignoreList)&&("library"in t||"key"in t||"name"in t),kE=t=>t.library!==void 0?t.library:t.key??t.name,vE=(t,e,r)=>{let o=mi(e.sharedLibIgnore);e.sharePages===!1&&o.add("pages");let n=o.size?new Set([...r,...o]):r;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&!(s==="sharePages"||s==="sharedLibIgnore")&&!n.has(s))if(S(e[s])&&S(t[s]))if(s==="designSystem")gi(t[s],e[s],n,s);else for(let i in e[s])n.has(`${s}/${i}`)||(i in t[s]?r_(s,t[s][i])&&!r_(s,e[s][i])&&(t[s][i]=e[s][i]):t[s][i]=e[s][i]);else s in t||(t[s]=s_(e[s],n,s))},bi=(t,e)=>{if(!(!e||!e.length))for(let r=0;r<e.length;r++){let o=e[r],n=xE;yi(o)&&(n=mi(o.ignoreList),o=o.library),S(o)&&vE(t,o,n)}}});var Gp,Yp,Xp,_i,Jp,xi,Zp,ro,a_=j(()=>{"use strict";At();Gp=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},Yp=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)}},Xp=t=>t.replace(/[^a-zA-Z0-9_]/g,""),_i=t=>(typeof t!="string"&&(t=String(t||"")),t.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,r){return r===0?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")),Jp=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),xi=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),Zp=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},ro=t=>{if(O(t))return t;if(w(t))return t.split(" ");if(S(t))return Object.values(t);if(Le(t))return[t]}});var Qp,c_=j(()=>{"use strict";Qp=()=>{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 Wt,Qo,wi,Si,l_=j(()=>{"use strict";Wt=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},Qo=(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 Qo(e,{keepOneX:!1})},Si=(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:Qo(c,{keepOneX:!0})}});let n=r.get(t.type)||[],s=Qo(n,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...o,{tag:"img",attr:i}]}});var fl={};P(fl,{CDN_PROVIDERS:()=>ce,DOMQL_EVENTS:()=>Qu,DOMQ_PROPERTIES:()=>dr,ENV:()=>gd,HTML_TAGS:()=>Ho,METHODS:()=>No,METHODS_EXL:()=>xs,NODE_ENV:()=>Se,OPTIONS:()=>Hs,PACKAGE_MANAGER_TO_CDN:()=>xr,PARSED_DOMQ_PROPERTIES:()=>_s,PROPS_METHODS:()=>pr,STATE_METHODS:()=>Gr,STATE_PROPERTIES:()=>Zu,SVG_TAGS:()=>fb,TYPES:()=>ds,UNIVERSAL_RESERVED_KEYS:()=>nl,addCaching:()=>Bc,addContext:()=>jc,addExtend:()=>Bd,addExtends:()=>zt,addItemAfterEveryElement:()=>ju,addProtoToArray:()=>gs,addRef:()=>Mc,applyDependentState:()=>sp,applyEvent:()=>qc,applyEventUpdate:()=>Kc,applyExtends:()=>pb,applyProps:()=>Fs,arrayContainsOtherArray:()=>Iu,arraysEqual:()=>Uu,arrayzeValue:()=>ro,buildImgSrcset:()=>wi,buildSourcesAndImg:()=>Si,cache:()=>fp,call:()=>Ap,captureSnapshot:()=>Op,checkForStateTypes:()=>ep,checkIfInherits:()=>Wc,checkIfStringIsInArray:()=>zu,clone:()=>ed,cloneAndMergeArrayExtend:()=>Os,cloneFunction:()=>vd,concatAddExtends:()=>Fd,copyJavaScriptToClipboard:()=>Yp,copyStringToClipboard:()=>Gp,createBasedOnType:()=>Lc,createElement:()=>tp,createElementExtends:()=>kc,createExtends:()=>Ps,createExtendsFromKeys:()=>zo,createExtendsStack:()=>Ac,createIfConditionFlag:()=>Cd,createInheritedState:()=>rp,createKey:()=>As,createNestedObject:()=>cd,createNestedObjectByKeyPath:()=>np,createObjectWithoutPrototype:()=>mc,createParent:()=>Fc,createPath:()=>Nc,createProps:()=>Ns,createPropsStack:()=>Dc,createRoot:()=>Qd,createScope:()=>ap,createSnapshotId:()=>Es,customDecodeURIComponent:()=>Ju,customEncodeURIComponent:()=>Xu,cutArrayAfterValue:()=>Fu,cutArrayBeforeValue:()=>Mu,debounce:()=>Ts,debounceOnContext:()=>wd,decodeNewlines:()=>Yu,deepClone:()=>ut,deepContains:()=>id,deepDefaults:()=>gi,deepDestringifyFunctions:()=>ie,deepExtend:()=>Sc,deepMerge:()=>nt,deepMergeExtends:()=>Fe,deepStringifyFunctions:()=>ws,defineSetter:()=>Cp,destringifyGlobalScope:()=>ks,detectHeightOnInit:()=>$p,detectInfiniteLoop:()=>dd,document:()=>et,encodeNewlines:()=>Gu,error:()=>to,excludeKeysFromObject:()=>hd,exec:()=>ct,extendCachedRegistry:()=>Nd,extendStackRegistry:()=>Is,extractArrayExtend:()=>$s,fetchLibraryData:()=>ll,fibonacciNumberByIndex:()=>Lp,filterArrays:()=>Vu,filterArraysFast:()=>Hu,finalizeExtends:()=>Tc,findClosestNumber:()=>cl,findClosestNumberInFactory:()=>Wp,findInheritedState:()=>zc,findKeyPosition:()=>qu,flattenExtend:()=>Wo,formatDate:()=>Dp,generateHash:()=>_c,generateHeadArrayTags:()=>al,generateKey:()=>Cs,generateMetaTags:()=>Hp,get:()=>Sp,getCDNDirUrl:()=>sl,getCDNUrl:()=>ve,getCapitalCaseKeys:()=>Hd,getCdnProviderFromConfig:()=>Go,getChildStateInKey:()=>Hc,getChildren:()=>ti,getContext:()=>ai,getCookie:()=>Rd,getDB:()=>di,getEmotionStylesheet:()=>Qp,getExtendsInElement:()=>Ud,getExtendsStack:()=>Rs,getExtendsStackRegistry:()=>wc,getFrequencyInArray:()=>Du,getHashedExtend:()=>Ds,getImportMapScript:()=>Ip,getInObjectByPath:()=>ud,getLocalStorage:()=>Id,getNev:()=>_d,getPageMetadata:()=>zp,getParentStateInKey:()=>Vc,getPath:()=>ei,getQuery:()=>pi,getRef:()=>vp,getRoot:()=>ni,getRootContext:()=>ii,getRootData:()=>si,getRootState:()=>oi,getRootStateInKey:()=>Uc,getSpreadChildren:()=>zd,global:()=>Ou,hasFunction:()=>Me,hasHandlerPlugin:()=>Bo,hasOwnProperty:()=>od,hashContent:()=>Jo,inheritChildExtends:()=>Cc,inheritChildPropsExtends:()=>vc,inheritParentProps:()=>js,inheritRecursiveChildExtends:()=>Ec,initProps:()=>Xd,is:()=>Vt,isArray:()=>O,isBoolean:()=>uc,isContextComponent:()=>Wd,isCyclic:()=>pd,isDOMNode:()=>Ut,isDate:()=>pc,isDefined:()=>mt,isDevelopment:()=>gr,isEmpty:()=>hc,isEmptyObject:()=>nd,isEqualDeep:()=>gc,isFunction:()=>A,isHtmlElement:()=>fs,isLocal:()=>bd,isLoudDevRuntime:()=>Ot,isMalformedDependency:()=>Yo,isMethod:()=>Tp,isMobile:()=>Td,isNode:()=>Ye,isNot:()=>Pu,isNotProduction:()=>Jr,isNull:()=>dc,isNumber:()=>Le,isObject:()=>S,isObjectLike:()=>z,isPhoto:()=>Mp,isProduction:()=>hr,isStaging:()=>yd,isState:()=>op,isString:()=>w,isStringFunction:()=>kd,isTest:()=>bc,isTesting:()=>md,isUndefined:()=>Et,isUniversallyReservedKey:()=>Rp,isUnresolvableDependency:()=>eo,isValidHtmlTag:()=>$d,isWrappedLibrary:()=>yi,joinArrays:()=>Lo,jointStacks:()=>jd,keys:()=>rl,loadCssFile:()=>Bp,loadJavascript:()=>Up,loadJavascriptFile:()=>Fp,loadJavascriptFileEmbedSync:()=>jp,loadJavascriptFileSync:()=>Np,loadRemoteCSS:()=>Vp,loadRemoteScript:()=>Xo,log:()=>Ep,logGroupIf:()=>Ad,logIf:()=>Ed,lookdown:()=>xp,lookdownAll:()=>wp,lookup:()=>_p,lowercaseFirstLetter:()=>Kr,makeObjectWithoutPrototype:()=>sd,map:()=>td,mapStringsWithContextComponents:()=>Ls,matchesComponentNaming:()=>Ne,memoize:()=>Sd,merge:()=>pt,mergeSharedLibraries:()=>bi,nextElement:()=>li,normalizeIgnoreList:()=>mi,normalizeLibraryKey:()=>Zo,objectToString:()=>Ss,objectizeStringProperty:()=>Ms,overwrite:()=>vs,overwriteDeep:()=>Ht,overwriteShallow:()=>Xr,overwriteState:()=>ip,parse:()=>ol,parseDeep:()=>Zs,pickupElementFromProps:()=>Pc,pickupPropsFromElement:()=>Rc,previousElement:()=>fi,propExists:()=>Gd,propertizeElement:()=>Ic,propertizeUpdate:()=>Kd,remove:()=>jb,removeChars:()=>Xp,removeCookie:()=>Pd,removeDuplicateProps:()=>Us,removeDuplicatesInArray:()=>Mo,removeFromArray:()=>$u,removeFromObject:()=>ad,removeNestedKeyByPath:()=>ld,removeValueFromArray:()=>hs,removeValueFromArrayAll:()=>Nu,reorderArrayByValues:()=>Bu,replaceLiteralsWithObjectFields:()=>qr,replaceOctalEscapeSequences:()=>Ku,resolveAsset:()=>Wt,resolveHandler:()=>Uo,resolveSharedLibraries:()=>Kp,returnValueAsText:()=>$c,runPluginHook:()=>Ct,self:()=>Ru,setActiveRootState:()=>ri,setCookie:()=>Od,setHashedExtend:()=>xc,setInObjectByPath:()=>fd,setLocalStorage:()=>Dd,setNodeStyles:()=>el,setProps:()=>kp,setPropsPrototype:()=>Bs,sharedLibrary:()=>qp,spotByPath:()=>Qs,srcsetFor:()=>Qo,stringIncludesAny:()=>ys,stringToObject:()=>rd,stripVersionRangePrefix:()=>hi,swapItemsInArray:()=>Lu,syncProps:()=>Vs,toCamelCase:()=>_i,toDashCase:()=>xi,toDescriptionCase:()=>Zp,toTitleCase:()=>Jp,toggleFullscreen:()=>Pp,triggerEventOn:()=>mr,triggerEventOnUpdate:()=>cp,trimStringFromSymbols:()=>Wu,unstackArrayOfObjects:()=>ps,update:()=>Yd,updateProps:()=>Jd,variables:()=>ui,verbose:()=>Ko,warn:()=>ci,window:()=>v});var R=j(()=>{"use strict";yc();xd();At();Xe();Vo();Fo();us();ab();cb();bs();ls();lb();Ld();Vd();Zd();Oc();_b();xb();jo();wb();Vb();up();Hb();lp();zb();Wb();qb();Kb();Gb();Yb();Xb();Jb();Qb();t_();i_();a_();c_();l_()});var Lk=fu((EU,$k)=>{var Gn=1e3,Yn=Gn*60,Xn=Yn*60,Co=Xn*24,xR=Co*7,wR=Co*365.25;$k.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return SR(t);if(r==="number"&&isFinite(t))return e.long?vR(t):kR(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function SR(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*wR;case"weeks":case"week":case"w":return r*xR;case"days":case"day":case"d":return r*Co;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Xn;case"minutes":case"minute":case"mins":case"min":case"m":return r*Yn;case"seconds":case"second":case"secs":case"sec":case"s":return r*Gn;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function kR(t){var e=Math.abs(t);return e>=Co?Math.round(t/Co)+"d":e>=Xn?Math.round(t/Xn)+"h":e>=Yn?Math.round(t/Yn)+"m":e>=Gn?Math.round(t/Gn)+"s":t+"ms"}function vR(t){var e=Math.abs(t);return e>=Co?ru(t,e,Co,"day"):e>=Xn?ru(t,e,Xn,"hour"):e>=Yn?ru(t,e,Yn,"minute"):e>=Gn?ru(t,e,Gn,"second"):t+" ms"}function ru(t,e,r,o){var n=e>=r*1.5;return Math.round(t/r)+" "+o+(n?"s":"")}});var Fk=fu((AU,Mk)=>{function CR(t){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=n,r.enabled=a,r.humanize=Lk(),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 _=p,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,(C,T)=>{if(C==="%%")return"%";x++;let $=r.formatters[T];if(typeof $=="function"){let M=m[x];C=$.call(_,M),m.splice(x,1),x--}return C}),r.formatArgs.call(_,m),(_.log||r.log).apply(_,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}Mk.exports=CR});var Nk=fu((Jt,ou)=>{Jt.formatArgs=AR;Jt.save=TR;Jt.load=OR;Jt.useColors=ER;Jt.storage=RR();Jt.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`."))}})();Jt.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 ER(){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 AR(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+ou.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)}Jt.log=console.debug||console.log||(()=>{});function TR(t){try{t?Jt.storage.setItem("debug",t):Jt.storage.removeItem("debug")}catch{}}function OR(){let t;try{t=Jt.storage.getItem("debug")||Jt.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function RR(){try{return localStorage}catch{}}ou.exports=Fk()(Jt);var{formatters:PR}=ou.exports;PR.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var By={};P(By,{ANIMATION_PROPS:()=>fg,ARIA_ROLES:()=>DA,ATTR_TRANSFORMS:()=>sg,BLOCK_PROPS:()=>ug,CDN_PROVIDERS:()=>ce,CONFIG:()=>ao,CSS_NAMED_COLOR_HEX:()=>ul,CSS_NATIVE_COLOR_REGEX:()=>Zt,CSS_PROPS_REGISTRY:()=>bt,CSS_UNITS:()=>$o,DEFAULT_CONFIG:()=>ya,DEFAULT_CSS_PROPERTIES_LIST:()=>kt,DELEGATED_EVENTS:()=>Sn,DESIGN_SYSTEM_OPTIONS:()=>jm,DOMQL_EVENTS:()=>Qu,DOMQ_PROPERTIES:()=>dr,DOM_EVENTS:()=>J_,ENV:()=>gd,FACTORY:()=>ue,FLEX_PROPS:()=>bg,FONT_PROPS:()=>dg,GRID_PROPS:()=>_g,HOST_REGISTERED_PACKAGES:()=>z0,HTML_ATTRIBUTES:()=>of,HTML_TAGS:()=>Ho,LIFECYCLE_EVENTS:()=>Or,METHODS:()=>No,METHODS_EXL:()=>xs,MISC_PROPS:()=>pg,MIXINS:()=>Ql,NODE_ENV:()=>Se,OPTIONS:()=>Hs,PACKAGE_MANAGER_TO_CDN:()=>xr,PARSED_DOMQ_PROPERTIES:()=>_s,POSITION_PROPS:()=>hg,PROPS_METHODS:()=>pr,REGISTRY:()=>Ft,RESERVED_STORE_METHODS:()=>Zy,ROUTER_OPTIONS:()=>kf,SIGNAL_ENGINE_KEY:()=>Io,SIGNAL_INSTANCES_KEY:()=>Ro,STANDARD_SCHEME_QUERIES:()=>$l,STATE_PROPERTIES:()=>Zu,STORE_METHOD_NAMES:()=>Jy,SVG_TAGS:()=>xn,THEME_PROPS:()=>yg,TIMING_PROPS:()=>la,TYPES:()=>ds,UNIVERSAL_RESERVED_KEYS:()=>nl,VALUE_TRANSFORMERS:()=>zl,VERSION:()=>tb,__resetSignalEngine:()=>Eu,__resetSignalInstances:()=>Cu,__resetStateShadowWarnings:()=>Qy,activateConfig:()=>h_,addCaching:()=>Bc,addContext:()=>jc,addDelegatedEvent:()=>aa,addExtend:()=>Bd,addExtends:()=>zt,addItemAfterEveryElement:()=>ju,addMethods:()=>Tn,addProtoToArray:()=>gs,addRef:()=>Mc,animation:()=>vh,appendSVGSprite:()=>ea,appendSvgIconsSprite:()=>uo,applyAttrTransforms:()=>ag,applyCSS:()=>Im,applyDependentState:()=>sp,applyDocument:()=>ta,applyEvent:()=>qc,applyEventUpdate:()=>Kc,applyExtends:()=>vn,applyHeadings:()=>Nl,applyInitialState:()=>ff,applyMediaSequenceVars:()=>Sr,applyProps:()=>Fs,applyReset:()=>ra,applySequenceGlobalVars:()=>Ni,applySequenceVars:()=>er,applySpacingSequence:()=>Ui,applyStateMethods:()=>ne,applyTimingSequence:()=>Qi,applyTrueProps:()=>wg,applyTypographySequence:()=>Xi,arrayContainsOtherArray:()=>Iu,arraysEqual:()=>Uu,arrayzeValue:()=>ro,assertEmitIntegrity:()=>Yh,batch:()=>ac,breakpoints:()=>Sh,buildImgSrcset:()=>wi,buildSourcesAndImg:()=>Si,buildThemeVarStyles:()=>Ln,cache:()=>fp,cacheNode:()=>Tr,call:()=>Ap,callStateMethod:()=>ua,camelToAttr:()=>Pr,camelToLowerAttr:()=>Z_,captureSnapshot:()=>Op,changeGlobalTheme:()=>Wl,changeLightness:()=>sh,checkAttributeByTagName:()=>Ir,checkEventFunctions:()=>ig,checkForStateTypes:()=>ep,checkIfBoxSize:()=>Bi,checkIfInherits:()=>Wc,checkIfStringIsInArray:()=>zu,class:()=>Oh,clone:()=>ed,cloneAndMergeArrayExtend:()=>Os,cloneFunction:()=>vd,color:()=>gh,colorStringToRgbaArray:()=>le,components:()=>Dn,compositeOverBackdrop:()=>no,concatAddExtends:()=>Fd,contrastRatio:()=>rn,convertSvgToSymbol:()=>ji,copyJavaScriptToClipboard:()=>Yp,copyStringToClipboard:()=>Gp,create:()=>jy,createAsync:()=>_P,createBasedOnType:()=>Lc,createComputed:()=>Gy,createConfig:()=>Pi,createDefine:()=>XS,createEffect:()=>Q,createElement:()=>tp,createElementExtends:()=>kc,createExtends:()=>Ps,createExtendsFromKeys:()=>zo,createExtendsStack:()=>Ac,createHTMLNode:()=>_n,createIfConditionFlag:()=>Cd,createInheritedState:()=>rp,createKey:()=>As,createNestedObject:()=>cd,createNestedObjectByKeyPath:()=>np,createObjectWithoutPrototype:()=>mc,createParent:()=>Fc,createPath:()=>Nc,createProps:()=>Ns,createPropsStack:()=>Dc,createRoot:()=>Qd,createScope:()=>ap,createScopeStore:()=>lc,createSignal:()=>as,createSkeleton:()=>wP,createSnapshotId:()=>Es,createState:()=>Eg,createStore:()=>qe,createSync:()=>xP,css:()=>me,cssMediaVars:()=>Ol,cssVars:()=>Tl,customDecodeURIComponent:()=>Ju,customEncodeURIComponent:()=>Xu,cutArrayAfterValue:()=>Fu,cutArrayBeforeValue:()=>Mu,debounce:()=>Ts,debounceOnContext:()=>wd,decodeNewlines:()=>Yu,deepClone:()=>ut,deepContains:()=>id,deepDefaults:()=>gi,deepDestringifyFunctions:()=>ie,deepExtend:()=>Sc,deepMerge:()=>nt,deepMergeExtends:()=>Fe,deepStringifyFunctions:()=>ws,defaultDefine:()=>Fn,defineResolvedThemeSignal:()=>cn,defineSetter:()=>Cp,defineThemeSignal:()=>an,destringifyGlobalScope:()=>ks,destroy:()=>ka,detectHeightOnInit:()=>$p,detectInfiniteLoop:()=>dd,detectTag:()=>Ar,devices:()=>kh,dispose:()=>Dr,encodeNewlines:()=>Gu,error:()=>to,excludeKeysFromObject:()=>hd,exec:()=>ct,executeAttr:()=>FA,exetuteClassPerComponent:()=>pT,extendCachedRegistry:()=>Nd,extendStackRegistry:()=>Is,extractArrayExtend:()=>$s,extractConditionalAttrs:()=>BA,fetchLibraryData:()=>ll,fibonacciNumberByIndex:()=>Lp,filterArrays:()=>Vu,filterArraysFast:()=>Hu,filterAttributesByTagName:()=>MA,finalizeExtends:()=>Tc,findClosestNumber:()=>cl,findClosestNumberInFactory:()=>Wp,findHeadingLetter:()=>Dl,findHeadings:()=>Fi,findInheritedState:()=>zc,findKeyPosition:()=>qu,flattenExtend:()=>Wo,font:()=>lh,fontFace:()=>dh,fontFamily:()=>fh,fontFamilyTypes:()=>uh,formatDate:()=>Dp,generateHash:()=>_c,generateHeadArrayTags:()=>al,generateKey:()=>Cs,generateMetaTags:()=>Hp,generateSequence:()=>Kt,generateSequencePosition:()=>$h,generateSprite:()=>ln,generateSubSequence:()=>Li,get:()=>Sp,getActiveConfig:()=>E,getActiveDocument:()=>Xl,getActiveLang:()=>jn,getCDNDirUrl:()=>sl,getCDNUrl:()=>ve,getCacheSize:()=>Jh,getCapitalCaseKeys:()=>Hd,getCdnProviderFromConfig:()=>Go,getChildStateInKey:()=>Hc,getChildren:()=>ti,getColor:()=>ot,getColorShade:()=>ml,getContext:()=>ai,getCookie:()=>Rd,getDB:()=>di,getDefaultOrFirstKey:()=>so,getEmitStats:()=>Jl,getEmotionStylesheet:()=>Qp,getExtendsInElement:()=>Ud,getExtendsStack:()=>Rs,getExtendsStackRegistry:()=>wc,getFnPrefixAndValue:()=>tr,getFontFace:()=>ah,getFontFaceEach:()=>io,getFontFaceEachString:()=>vl,getFontFaceString:()=>Ai,getFontFamily:()=>Yi,getFontFormat:()=>Sl,getFontSizeByKey:()=>Ji,getFrequencyInArray:()=>Du,getHashedExtend:()=>Ds,getImportMapScript:()=>Ip,getInObjectByPath:()=>ud,getLanguages:()=>Ea,getLocalStateLang:()=>Pa,getLocalStorage:()=>Id,getMediaColor:()=>Rt,getMediaTheme:()=>pe,getNev:()=>_d,getObserver:()=>cc,getPageMetadata:()=>zp,getParentStateInKey:()=>Vc,getPath:()=>ei,getQuery:()=>pi,getRef:()=>vp,getResolvedThemeSignal:()=>p_,getRgbTone:()=>Be,getRoot:()=>ni,getRootContext:()=>ii,getRootData:()=>si,getRootState:()=>oi,getRootStateInKey:()=>Uc,getSafeInk:()=>Ll,getSafeInkInfo:()=>Mh,getSequenceValue:()=>Mi,getSequenceValueBySymbols:()=>Il,getSequenceValuePropertyPair:()=>Ve,getShadow:()=>Hi,getShapeByKey:()=>Zi,getSignals:()=>Xy,getSpacingBasedOnRatio:()=>Ee,getSpacingByKey:()=>xt,getSpreadChildren:()=>zd,getSubratio:()=>$i,getSubratioDifference:()=>Di,getSystemGlobalTheme:()=>ye,getTheme:()=>Wi,getThemeSignal:()=>d_,getTimingByKey:()=>te,getTimingFunction:()=>he,global:()=>Ou,gradient:()=>mh,grid:()=>Th,hasFunction:()=>Me,hasHandlerPlugin:()=>Bo,hasOwnProperty:()=>od,hashContent:()=>Jo,hexToRgb:()=>eh,hexToRgbArray:()=>dl,hexToRgba:()=>oh,hslToRgb:()=>gl,icons:()=>_h,inheritChildExtends:()=>Cc,inheritChildPropsExtends:()=>vc,inheritParentProps:()=>js,inheritRecursiveChildExtends:()=>Ec,init:()=>ir,initPolyglot:()=>Ef,initProps:()=>Xd,injectGlobal:()=>wt,is:()=>Vt,isArray:()=>O,isBoolean:()=>uc,isCSSVar:()=>ht,isContextComponent:()=>Wd,isCyclic:()=>pd,isDOMNode:()=>Ut,isDate:()=>pc,isDefined:()=>mt,isDevelopment:()=>gr,isDomDocument:()=>Ke,isEmpty:()=>hc,isEmptyObject:()=>nd,isEnumeratedTrueFalseAttr:()=>or,isEqualDeep:()=>gc,isFunction:()=>A,isGoogleFontsUrl:()=>on,isHostObject:()=>Ge,isHtmlElement:()=>fs,isLocal:()=>bd,isLoudDevRuntime:()=>Ot,isMalformedDependency:()=>Yo,isMethod:()=>Tp,isMobile:()=>Td,isNode:()=>Ye,isNot:()=>Pu,isNotProduction:()=>Jr,isNull:()=>dc,isNumber:()=>Le,isObject:()=>S,isObjectLike:()=>z,isPhoto:()=>Mp,isProduction:()=>hr,isRawUnitValue:()=>cs,isResolvedColor:()=>Ce,isScalingUnit:()=>Wr,isStaging:()=>yd,isState:()=>op,isStore:()=>gt,isString:()=>w,isStringFunction:()=>kd,isSvgTag:()=>wn,isTest:()=>bc,isTesting:()=>md,isTracking:()=>Tg,isUndefined:()=>Et,isUniversallyReservedKey:()=>Rp,isUnresolvableDependency:()=>eo,isValidHtmlTag:()=>$d,isValidTag:()=>bn,isWasmLoaded:()=>MS,isWrappedLibrary:()=>yi,isWritableFamilyBucket:()=>Tu,joinArrays:()=>Lo,jointStacks:()=>jd,keyframes:()=>yn,keys:()=>rl,linearChannelToSrgb:()=>_l,loadCssFile:()=>Bp,loadJavascript:()=>Up,loadJavascriptFile:()=>Fp,loadJavascriptFileEmbedSync:()=>jp,loadJavascriptFileSync:()=>Np,loadRemoteCSS:()=>Vp,loadRemoteScript:()=>Xo,loadTranslations:()=>Ta,loadWasm:()=>LS,log:()=>Ep,logGroupIf:()=>Ad,logIf:()=>Ed,lookdown:()=>xp,lookdownAll:()=>wp,lookup:()=>_p,lowercaseFirstLetter:()=>Kr,makeObjectWithoutPrototype:()=>sd,map:()=>td,mapStringsWithContextComponents:()=>Ls,matchesComponentNaming:()=>Ne,media:()=>ph,memoize:()=>Sd,merge:()=>pt,mergeSharedLibraries:()=>bi,mixTwoColors:()=>th,mixTwoRgb:()=>nh,mixTwoRgba:()=>yl,nextElement:()=>li,normalizeIgnoreList:()=>mi,normalizeLibraryKey:()=>Zo,numToLetterMap:()=>Ue,objectToString:()=>Ss,objectizeStringProperty:()=>Ms,oklabToLinearSrgb:()=>xl,oklabToOklch:()=>vi,oklchToGamutSafeSrgb:()=>Ci,oklchToOklab:()=>wl,opacify:()=>en,overwrite:()=>vs,overwriteDeep:()=>Ht,overwriteShallow:()=>Xr,overwriteState:()=>ip,parkHostObject:()=>ur,parse:()=>ol,parseColorToken:()=>qt,parseDeep:()=>Zs,pickupElementFromProps:()=>Pc,pickupPropsFromElement:()=>Rc,polyglotFunctions:()=>Ua,polyglotPlugin:()=>Bn,popConfig:()=>rt,popStaticCssPass:()=>mg,previousElement:()=>fi,propExists:()=>Gd,propertizeElement:()=>Ic,propertizeUpdate:()=>Kd,pushConfig:()=>st,pushStaticCssPass:()=>gg,refreshContextProto:()=>cf,registerEvent:()=>kn,registerHostPackages:()=>W0,registerSignalInstance:()=>Po,reinit:()=>Pm,relativeLuminance:()=>oo,remove:()=>An,removeChars:()=>Xp,removeCookie:()=>Pd,removeDelegatedEvent:()=>ca,removeDuplicateProps:()=>Us,removeDuplicatesInArray:()=>Mo,removeFromArray:()=>$u,removeFromObject:()=>ad,removeNestedKeyByPath:()=>ld,removeValueFromArray:()=>hs,removeValueFromArrayAll:()=>Nu,reorderArrayByValues:()=>Bu,replaceLiteralsWithObjectFields:()=>qr,replaceOctalEscapeSequences:()=>Ku,resetEmitStats:()=>Gh,resolveAsset:()=>Wt,resolveBorderValue:()=>Qt,resolveColorRgb:()=>co,resolveColorsInGradient:()=>na,resolveConfigDocument:()=>Do,resolveFileSource:()=>ng,resolveFileUrl:()=>fe,resolveHandler:()=>Uo,resolvePropValue:()=>Rr,resolveShadowValue:()=>lo,resolveSharedLibraries:()=>Kp,returnSubThemeOrDefault:()=>ih,returnValueAsText:()=>$c,rgbArrayToHex:()=>pl,rgbToHSL:()=>hl,rgbToHex:()=>rh,runPluginHook:()=>Ct,runThroughMedia:()=>Fl,scratchDefaultConfig:()=>sn,scratchSystem:()=>pn,scratchUtils:()=>kr,self:()=>Ru,semanticIcons:()=>xh,sequence:()=>Qe,serializeAttrValue:()=>ze,set:()=>po,setActiveConfig:()=>Rl,setActiveDocument:()=>Kh,setActiveRootState:()=>ri,setAdaptiveSchemeVar:()=>Cr,setClass:()=>S1,setClassname:()=>hT,setColor:()=>vr,setCookie:()=>Od,setCssEngineHook:()=>wf,setCustomFont:()=>Ei,setCustomFontMedia:()=>wr,setEach:()=>Hh,setFont:()=>Gi,setFontFamily:()=>un,setFontImport:()=>nn,setGradient:()=>fn,setHashedExtend:()=>xc,setInCustomFontMedia:()=>kl,setInObjectByPath:()=>fd,setLang:()=>Oa,setLocalStorage:()=>Dd,setMediaTheme:()=>Ki,setNodeStyles:()=>el,setObserver:()=>Yy,setProps:()=>kp,setPropsPrototype:()=>Bs,setSVG:()=>dn,setScalingVar:()=>Ii,setShadow:()=>Er,setSubScalingVar:()=>Pl,setSvgIcon:()=>fo,setTheme:()=>qi,setValue:()=>Vh,setVariables:()=>Lh,setWasmEngine:()=>ia,shadow:()=>bh,shape:()=>Ih,sharedLibrary:()=>qp,sizes:()=>Ph,spacing:()=>hh,splitSpacedValue:()=>Vi,splitTopLevelCommas:()=>Ze,splitTransition:()=>Hl,spotByPath:()=>Qs,srcsetFor:()=>Qo,srgbChannelToLinear:()=>bl,srgbToOklab:()=>ki,stringIncludesAny:()=>ys,stringToObject:()=>rd,stripVersionRangePrefix:()=>hi,svg:()=>Ch,svgData:()=>Eh,swapItemsInArray:()=>Lu,syncProps:()=>Vs,templates:()=>Ah,theme:()=>yh,timing:()=>wh,toCamel:()=>Ri,toCamelCase:()=>_i,toDashCase:()=>xi,toDescriptionCase:()=>Zp,toLinearChannel:()=>tn,toTitleCase:()=>Jp,toggleFullscreen:()=>Pp,transformBackgroundImage:()=>Ul,transformBorder:()=>He,transformBorderRadius:()=>rr,transformBoxShadow:()=>oa,transformClassname:()=>ax,transformDuration:()=>sa,transformShadow:()=>Bl,transformSize:()=>yt,transformSizeRatio:()=>B,transformTextStroke:()=>jl,transformTransition:()=>Uh,transformersByPrefix:()=>Sg,transfromGap:()=>Vl,translate:()=>Aa,triggerEventOn:()=>mr,triggerEventOnUpdate:()=>cp,trimStringFromSymbols:()=>Wu,typography:()=>Ti,unit:()=>ch,unstackArrayOfObjects:()=>ps,update:()=>Cn,updateProps:()=>Jd,updateVars:()=>w1,upsertTranslation:()=>Ra,useCssInProps:()=>oe,useHostState:()=>Ag,usePropsAsCSS:()=>sx,useSelectorsAsCSS:()=>ix,variables:()=>ui,vars:()=>Rh,verbose:()=>Ko,warn:()=>ci,warnStateKeyShadowsMethod:()=>fc,window:()=>v,wrapHoverRule:()=>Ae});module.exports=oC(By);var Au={};P(Au,{RESERVED_STORE_METHODS:()=>Zy,SIGNAL_ENGINE_KEY:()=>Io,SIGNAL_INSTANCES_KEY:()=>Ro,STORE_METHOD_NAMES:()=>Jy,VERSION:()=>tb,__resetSignalEngine:()=>Eu,__resetSignalInstances:()=>Cu,__resetStateShadowWarnings:()=>Qy,batch:()=>ac,createComputed:()=>Gy,createEffect:()=>Q,createScopeStore:()=>lc,createSignal:()=>as,createStore:()=>qe,getObserver:()=>cc,getSignals:()=>Xy,isStore:()=>gt,registerSignalInstance:()=>Po,setObserver:()=>Yy,warnStateKeyShadowsMethod:()=>fc});var yu={};P(yu,{WRITE_JOURNAL:()=>os,batch:()=>ss,createComputed:()=>sC,createEffect:()=>iC,createSignal:()=>De,getObserver:()=>gu,journalWrite:()=>ns,setObserver:()=>nC});var Bt=null,tc=0,ec=[],gu=()=>Bt,nC=t=>{Bt=t},rc=0,uu=[];function De(t){let e=new Set;function r(){return Bt&&(e.add(Bt),Bt._sources.add(s)),t}function o(i){i!==t&&(t=i,dC(e))}function n(){return t}let s={get:r,set:o,peek:n,_subscribers:e,_type:"signal"};return s}function sC(t){let e,r=!0,o=new Set,n={_sources:new Set,_type:"computed",_subscribers:o,_execute(){hu(n);let s=Bt;Bt=n;try{e=t(),r=!1}finally{Bt=s}},_notify(){r=!0,o.size>0&&qy(o)},get(){return Bt&&(o.add(Bt),Bt._sources.add(n)),r&&n._execute(),e},peek(){return r&&n._execute(),e}};return n._execute(),n}var we=new Set,du=!1,os=[];function ns(t){os.push(t),os.length>32&&os.shift()}function iC(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;hu(o);let n=Bt;Bt=o;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{Bt=n}},_notify(){o._disposed||(tc>0?ec.push(o):rc>0?uu.push(o):mu(o))},dispose(){o._disposed=!0,hu(o)}};return o._execute(),o}function ss(t){tc++;try{t()}finally{tc--,tc===0&&uC()}}var pu=!1,Hy=1e3,aC=8,cC=256,lC=4;function zy(){return typeof performance<"u"?performance.now():Date.now()}function mu(t){we.add(t),!pu&&(du||(du=!0,queueMicrotask(Wy)))}var Oo=[];function fC(){if(we.size===1){let[e]=we;return we.clear(),e._disposed?0:(e._execute(),1)}Oo.length=0;for(let e of we)Oo.push(e);we.clear(),Oo.sort((e,r)=>e._depth-r._depth);let t=0;for(let e=0;e<Oo.length;e++){let r=Oo[e];r._disposed||(r._execute(),t++)}return Oo.length=0,t}function Wy(t=0,e=0){if(du=!1,we.size===0)return;pu=!0;let r=zy(),o=!1;try{for(;we.size>0;){if(++t>Hy){let n=new Map;for(let c of we){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 os)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",Hy,"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>"),we.clear();break}if(e+=fC(),we.size>0&&(e>=cC||t>=lC)&&zy()-r>aC){o=!0,setTimeout(()=>Wy(t,e),0);break}}}finally{o||(pu=!1)}}function uC(){for(let t=0;t<ec.length;t++)mu(ec[t]);ec.length=0}function qy(t){rc++;try{for(let e of t)e._notify()}finally{if(rc--,rc===0&&uu.length>0){let e=uu.splice(0);for(let r=0;r<e.length;r++)mu(e[r])}}}function dC(t){qy(t)}function hu(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var vu={};P(vu,{RESERVED_STORE_METHODS:()=>is,STORE_METHOD_NAMES:()=>ku,__resetStateShadowWarnings:()=>pC,createScopeStore:()=>yC,createStore:()=>oc,getSignals:()=>mC,isStore:()=>gC,warnStateKeyShadowsMethod:()=>Su});var $e=Symbol("store"),nc=Symbol("signals"),ku=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],is=new Set(ku),wu=new Set,bu=(t,e)=>t?t+"."+e:String(e);function Su(t,e){let r=(e||"")+"::"+t;if(wu.has(r))return;wu.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: ${ku.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(n)}function pC(){wu.clear()}var _u=t=>!t||typeof t!="object"||Array.isArray(t)||t[$e]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!sc(t),hC=12,sc=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function ic(t,e,r){if(t===e)return!0;if(r>hC)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(!ic(t[o],e[o],r+1))return!1;return!0}if(sc(t)&&sc(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)||!ic(t[s],e[s],r+1))return!1;return!0}return!1}function oc(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 b in t){if(b==="__proto__"||!Object.prototype.hasOwnProperty.call(t,b))continue;if(b.startsWith("__")){s[b]=t[b];continue}is.has(b)&&Su(b,o);let y=t[b];r<i&&y&&typeof y=="object"&&!_u(y)?(s[b]=y,n[b]=De(oc(y,e,r+1,bu(o,b)))):(s[b]=y,n[b]=De(y))}let a=new Proxy(s,{get(b,y){if(y===$e)return!0;if(y===nc)return n;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 h;if(y==="$replace")return g;if(y==="$add")return p;if(y==="$remove")return m;if(y==="$destroy")return _;if(y==="$quietUpdate")return l;if(is.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 _;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(n,y)){let k=n[y].get();if(k!==void 0||!(y!=="root"&&b.root&&b.root!==a))return k}if(b[y]!==void 0)return b[y];let x=typeof y=="string"&&!y.startsWith("__")&&y!=="then"&&y!=="constructor"&&gu()!=null;if(y!=="root"&&b.root&&b.root!==a){let k=b.root[y];return k===void 0&&x&&!Object.prototype.hasOwnProperty.call(n,y)?(n[y]=De(void 0),n[y].get()):k}if(x)return n[y]=De(void 0),n[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(n,y))return b[y]=x,!0;is.has(y)&&Su(y,o);let k=bu(o,y);if(Object.prototype.hasOwnProperty.call(n,y))if(x&&typeof x=="object"&&!_u(x)){if(x===b[y])return!0;let C=n[y].peek(),T=C&&C[$e]?C.$parse():C;if(ic(x,T,0))return!0;b[y]=x,ns(k),n[y].set(oc(x,e,r+1,k))}else{if(Array.isArray(x)&&x!==b[y]&&Array.isArray(n[y].peek())&&ic(x,n[y].peek(),0))return!0;n[y].peek()!==x&&ns(k),b[y]=x,n[y].set(x)}else b[y]=x,x&&typeof x=="object"&&!_u(x)?n[y]=De(oc(x,e,r+1,k)):n[y]=De(x);return!0},has(b,y){return typeof y=="string"&&y.charCodeAt(0)===36&&is.has(y.slice(1))?!0:y in n||y in b},ownKeys(b){return Object.keys(n)},getOwnPropertyDescriptor(b,y){return y in n?{enumerable:!0,configurable:!0,value:n[y].peek()}:Object.getOwnPropertyDescriptor(b,y)},deleteProperty(b,y){return n[y]&&(n[y].peek()!==void 0&&ns(bu(o,y)),n[y].set(void 0),delete n[y]),delete b[y],!0}});function c(b,y){ss(()=>{for(let k in b)k!=="__proto__"&&(a[k]=b[k])});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 n){if(x==="parent"||x==="root"||x.startsWith("__"))continue;let k=n[x].peek();k&&k[$e]?y[x]=k.$parse(b):y[x]=k}return y}function u(){return ss(()=>{for(let b in n)delete a[b]}),a}function d(){return Object.keys(n)}function h(){return Object.keys(n).map(b=>n[b].peek())}function g(b){return ss(()=>{for(let y in n)y in b||delete a[y];for(let y in b)y!=="__proto__"&&(a[y]=b[y])}),a}function p(b,y){let x=Object.prototype.hasOwnProperty.call(n,b)?n[b].peek():void 0;if(Array.isArray(x))return a[b]=[...x,y],a;if(x&&typeof x=="object"&&!Array.isArray(x)){if(sc(y))x[$e]?x.$update(y):a[b]={...x,...y};else{let k=String(Object.keys(x).length);x[$e]?x.$update({[k]:y}):a[b]={...x,[k]: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 gC(t){return t&&t[$e]===!0}function mC(t){return t[nc]}function yC(t,e){let r={},o={};if(t&&typeof t=="object")for(let i in t)o[i]=t[i],r[i]=De(t[i]);let n=i=>{if(Object.prototype.hasOwnProperty.call(r,i))return r;let a=e;for(;a;){let c=a[nc];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[$e]?a[xu]:null}return null};return new Proxy(o,{get(i,a){return a===$e?!0:a===nc?r:a===xu?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]=De(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[$e]?c[xu]: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 xu=Symbol("scope.parent");var zr="3.14.779";var Ro="__SMBLS_SIGNAL_INSTANCES__",Po=(t,e,r)=>{let o=e||(typeof globalThis<"u"?globalThis:null);if(!o)return null;let n=o[Ro]||(o[Ro]={versions:[],engines:0,reported:!1});return typeof n.engines!="number"&&(n.engines=n.versions.length),n.versions.push(t||zr),r||n.engines++,n.engines>1&&!n.reported&&(n.reported=!0,console.error("[smbls] duplicate @symbo.ls/signal instance \u2014",n.engines,"copies of the reactive engine are loaded on this page:",n.versions.join(", ")+".","Each copy keeps its own observer and effect queue, so an effect created","by one copy never re-fires from another copy's store writes, and one","copy's cascade breaker cannot see the other's queue.","Copies of the SAME version adopt a single engine automatically, so","this means the versions above DIFFER: a fossil copy is resolving beside","the current one. That is a dependency-graph fault, not an application","bug \u2014 align the version wherever @symbo.ls/signal is imported, then","regenerate the lockfile so exactly one version resolves.")),n},Cu=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[Ro]};var Io="__SMBLS_SIGNAL_ENGINE__",Ky=(t,e,r)=>{let o=e||zr,n=r||(typeof globalThis<"u"?globalThis:null);if(!n)return t;let s=n[Io];return s&&s.engine&&s.version===o?(Po(o,n,!0),s.engine):(s||(n[Io]={version:o,engine:t}),Po(o,n,!1),t)},Eu=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[Io]};var Lt=Ky({...yu,...vu,VERSION:zr},zr),as=Lt.createSignal,Gy=Lt.createComputed,Q=Lt.createEffect,ac=Lt.batch,cc=Lt.getObserver,Yy=Lt.setObserver,qe=Lt.createStore,lc=Lt.createScopeStore,gt=Lt.isStore,Xy=Lt.getSignals,Jy=Lt.STORE_METHOD_NAMES,Zy=Lt.RESERVED_STORE_METHODS,fc=Lt.warnStateKeyShadowsMethod,Qy=Lt.__resetStateShadowWarnings,tb=Lt.VERSION;var Zh={};P(Zh,{assertEmitIntegrity:()=>Yh,css:()=>me,getActiveDocument:()=>Xl,getCacheSize:()=>Jh,getEmitStats:()=>Jl,injectGlobal:()=>wt,keyframes:()=>yn,reset:()=>U_,resetEmitStats:()=>Gh,setActiveDocument:()=>Kh,setWasmEngine:()=>ia,wrapHoverRule:()=>Ae});var zh={};P(zh,{CONFIG:()=>ao,CSS_NAMED_COLOR_HEX:()=>ul,CSS_NATIVE_COLOR_REGEX:()=>Zt,CSS_UNITS:()=>$o,FACTORY:()=>ue,STANDARD_SCHEME_QUERIES:()=>$l,VALUE_TRANSFORMERS:()=>zl,activateConfig:()=>h_,animation:()=>vh,appendSVGSprite:()=>ea,appendSvgIconsSprite:()=>uo,applyDocument:()=>ta,applyHeadings:()=>Nl,applyMediaSequenceVars:()=>Sr,applyReset:()=>ra,applySequenceGlobalVars:()=>Ni,applySequenceVars:()=>er,applySpacingSequence:()=>Ui,applyTimingSequence:()=>Qi,applyTypographySequence:()=>Xi,breakpoints:()=>Sh,changeGlobalTheme:()=>Wl,changeLightness:()=>sh,checkIfBoxSize:()=>Bi,class:()=>Oh,color:()=>gh,colorStringToRgbaArray:()=>le,compositeOverBackdrop:()=>no,contrastRatio:()=>rn,convertSvgToSymbol:()=>ji,createConfig:()=>Pi,cssMediaVars:()=>Ol,cssVars:()=>Tl,defineResolvedThemeSignal:()=>cn,defineThemeSignal:()=>an,devices:()=>kh,document:()=>f_,findHeadingLetter:()=>Dl,findHeadings:()=>Fi,font:()=>lh,fontFace:()=>dh,fontFamily:()=>fh,fontFamilyTypes:()=>uh,generateSequence:()=>Kt,generateSequencePosition:()=>$h,generateSprite:()=>ln,generateSubSequence:()=>Li,getActiveConfig:()=>E,getColor:()=>ot,getColorShade:()=>ml,getDefaultOrFirstKey:()=>so,getFnPrefixAndValue:()=>tr,getFontFace:()=>ah,getFontFaceEach:()=>io,getFontFaceEachString:()=>vl,getFontFaceString:()=>Ai,getFontFamily:()=>Yi,getFontFormat:()=>Sl,getFontSizeByKey:()=>Ji,getMediaColor:()=>Rt,getMediaTheme:()=>pe,getResolvedThemeSignal:()=>p_,getRgbTone:()=>Be,getSafeInk:()=>Ll,getSafeInkInfo:()=>Mh,getSequenceValue:()=>Mi,getSequenceValueBySymbols:()=>Il,getSequenceValuePropertyPair:()=>Ve,getShadow:()=>Hi,getShapeByKey:()=>Zi,getSpacingBasedOnRatio:()=>Ee,getSpacingByKey:()=>xt,getSubratio:()=>$i,getSubratioDifference:()=>Di,getTheme:()=>Wi,getThemeSignal:()=>d_,getTimingByKey:()=>te,getTimingFunction:()=>he,gradient:()=>mh,grid:()=>Th,hexToRgb:()=>eh,hexToRgbArray:()=>dl,hexToRgba:()=>oh,hslToRgb:()=>gl,icons:()=>_h,isCSSVar:()=>ht,isDomDocument:()=>Ke,isGoogleFontsUrl:()=>on,isHostObject:()=>Ge,isRawUnitValue:()=>cs,isResolvedColor:()=>Ce,isScalingUnit:()=>Wr,isWritableFamilyBucket:()=>Tu,linearChannelToSrgb:()=>_l,media:()=>ph,mixTwoColors:()=>th,mixTwoRgb:()=>nh,mixTwoRgba:()=>yl,numToLetterMap:()=>Ue,oklabToLinearSrgb:()=>xl,oklabToOklch:()=>vi,oklchToGamutSafeSrgb:()=>Ci,oklchToOklab:()=>wl,opacify:()=>en,parkHostObject:()=>ur,parseColorToken:()=>qt,popConfig:()=>rt,pushConfig:()=>st,relativeLuminance:()=>oo,reset:()=>u_,resolveBorderValue:()=>Qt,resolveColorRgb:()=>co,resolveColorsInGradient:()=>na,resolveConfigDocument:()=>Do,resolveFileUrl:()=>fe,resolveShadowValue:()=>lo,returnSubThemeOrDefault:()=>ih,rgbArrayToHex:()=>pl,rgbToHSL:()=>hl,rgbToHex:()=>rh,runThroughMedia:()=>Fl,scratchDefaultConfig:()=>sn,scratchSystem:()=>pn,scratchUtils:()=>kr,semanticIcons:()=>xh,sequence:()=>Qe,set:()=>po,setActiveConfig:()=>Rl,setAdaptiveSchemeVar:()=>Cr,setColor:()=>vr,setCustomFont:()=>Ei,setCustomFontMedia:()=>wr,setEach:()=>Hh,setFont:()=>Gi,setFontFamily:()=>un,setFontImport:()=>nn,setGradient:()=>fn,setInCustomFontMedia:()=>kl,setMediaTheme:()=>Ki,setSVG:()=>dn,setScalingVar:()=>Ii,setShadow:()=>Er,setSubScalingVar:()=>Pl,setSvgIcon:()=>fo,setTheme:()=>qi,setValue:()=>Vh,setVariables:()=>Lh,shadow:()=>bh,shape:()=>Ih,sizes:()=>Ph,spacing:()=>hh,splitSpacedValue:()=>Vi,splitTopLevelCommas:()=>Ze,splitTransition:()=>Hl,srgbChannelToLinear:()=>bl,srgbToOklab:()=>ki,svg:()=>Ch,svgData:()=>Eh,templates:()=>Ah,theme:()=>yh,timing:()=>wh,toCamel:()=>Ri,toLinearChannel:()=>tn,transformBackgroundImage:()=>Ul,transformBorder:()=>He,transformBorderRadius:()=>rr,transformBoxShadow:()=>oa,transformDuration:()=>sa,transformShadow:()=>Bl,transformSize:()=>yt,transformSizeRatio:()=>B,transformTextStroke:()=>jl,transformTransition:()=>Uh,transfromGap:()=>Vl,typography:()=>Ti,unit:()=>ch,vars:()=>Rh});var kr={};P(kr,{CSS_NAMED_COLOR_HEX:()=>ul,CSS_NATIVE_COLOR_REGEX:()=>Zt,CSS_UNITS:()=>$o,applyMediaSequenceVars:()=>Sr,applySequenceGlobalVars:()=>Ni,applySequenceVars:()=>er,changeLightness:()=>sh,colorStringToRgbaArray:()=>le,compositeOverBackdrop:()=>no,contrastRatio:()=>rn,convertSvgToSymbol:()=>ji,findHeadingLetter:()=>Dl,findHeadings:()=>Fi,generateSequence:()=>Kt,generateSequencePosition:()=>$h,generateSprite:()=>ln,generateSubSequence:()=>Li,getColorShade:()=>ml,getDefaultOrFirstKey:()=>so,getFnPrefixAndValue:()=>tr,getFontFace:()=>ah,getFontFaceEach:()=>io,getFontFaceEachString:()=>vl,getFontFaceString:()=>Ai,getFontFormat:()=>Sl,getRgbTone:()=>Be,getSequenceValue:()=>Mi,getSequenceValueBySymbols:()=>Il,getSequenceValuePropertyPair:()=>Ve,getSubratio:()=>$i,getSubratioDifference:()=>Di,hexToRgb:()=>eh,hexToRgbArray:()=>dl,hexToRgba:()=>oh,hslToRgb:()=>gl,isCSSVar:()=>ht,isDomDocument:()=>Ke,isGoogleFontsUrl:()=>on,isHostObject:()=>Ge,isRawUnitValue:()=>cs,isResolvedColor:()=>Ce,isScalingUnit:()=>Wr,isWritableFamilyBucket:()=>Tu,linearChannelToSrgb:()=>_l,mixTwoColors:()=>th,mixTwoRgb:()=>nh,mixTwoRgba:()=>yl,numToLetterMap:()=>Ue,oklabToLinearSrgb:()=>xl,oklabToOklch:()=>vi,oklchToGamutSafeSrgb:()=>Ci,oklchToOklab:()=>wl,opacify:()=>en,parkHostObject:()=>ur,parseColorToken:()=>qt,relativeLuminance:()=>oo,resolveConfigDocument:()=>Do,resolveFileUrl:()=>fe,returnSubThemeOrDefault:()=>ih,rgbArrayToHex:()=>pl,rgbToHSL:()=>hl,rgbToHex:()=>rh,setCustomFont:()=>Ei,setCustomFontMedia:()=>wr,setFontImport:()=>nn,setInCustomFontMedia:()=>kl,setScalingVar:()=>Ii,setSubScalingVar:()=>Pl,setVariables:()=>Lh,splitTopLevelCommas:()=>Ze,srgbChannelToLinear:()=>bl,srgbToOklab:()=>ki,toLinearChannel:()=>tn});var Ke=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0),Ge=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)},Tu=t=>t!==null&&typeof t=="object"&&!Ge(t),ur=(t,e,r)=>{if(!t)return;if(Ke(r)){t.__domDocument||(t.__domDocument=r);return}let o=`__host_${e}`;t[o]||(t[o]=r)},Do=t=>t?Ke(t.__domDocument)?t.__domDocument:Ke(t.document)?t.document:null:null;var Wr=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",$o=["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"],bC=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),_C=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${$o.filter(t=>t!=="auto").map(bC).join("|")})$`),cs=t=>_C.test(String(t).trim());R();var ul={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},le=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=ul[t.toLowerCase()];if(e&&(t=e),t[0]==="#")return t.length<7&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(t.length>4?t[4]+t[4]:"")),[parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16),parseInt(t.substr(5,2),16),t.length>7?parseInt(t.substr(7,2),16)/255:1];if(t.indexOf("rgb")===-1&&et&&v){let r=et.body.appendChild(et.createElement("fictum")),o="rgb(1, 2, 3)";if(r.style.color=o,r.style.color!==o){et.body.removeChild(r);return}if(r.style.color=t,r.style.color===o||r.style.color==="")return et.body.removeChild(r),[0,0,0,0];t=v.getComputedStyle(r).color,et.body.removeChild(r)}return t.indexOf("rgb")===0?(t.indexOf("rgba")===-1&&(t=`${t}, 1`),t.match(/[\.\d]+/g).map(r=>+r)):[0,0,0,0]},th=(t,e,r=.5)=>(t=le(t),e=le(e),yl(t,e,r)),eh=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${r},${o},${n})`},dl=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[r,o,n]},rh=(t,e,r)=>"#"+(1<<24|t<<16|e<<8|r).toString(16).slice(1),pl=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1),oh=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${r},${o},${n},${e})`},nh=(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})`},sh=(t,e)=>{let[r,o,n]=e,s=Math.max(0,Math.min(100,n+parseFloat(t)));return[r,o,s]},hl=(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]},gl=(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)],ml=(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)},yl=(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})`},en=(t,e)=>{let r=le(t);if(!r){Jr()&&console.warn(t+" color is not rgba");return}return r[3]=e,`rgba(${r})`},ht=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,Zt=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,EE=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,qt=t=>{if(!w(t))return null;if(Zt.test(t))return{passthrough:t};if(ht(t))return{cssVar:t};let e=t.match(EE);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}},Ce=t=>w(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),Ze=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},tn=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),oo=t=>.2126*tn(t[0])+.7152*tn(t[1])+.0722*tn(t[2]),rn=(t,e)=>{let r=oo(t)+.05,o=oo(e)+.05;return r>o?r/o:o/r},bl=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),_l=t=>(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*255,ki=([t,e,r])=>{let[o,n,s]=[t,e,r].map(bl),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]},xl=([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]},vi=([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)]},Ci=(t,e,r,o=24)=>{let n=a=>xl(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=>_l(Math.max(0,Math.min(1,a))))},no=(t,e=1,r=[255,255,255])=>e>=1?t:t.map((o,n)=>o*e+r[n]*(1-e)),Be=(t,e)=>{w(t)&&t.includes("rgb")&&(t=le(t).join(", ")),w(t)&&(t=t.split(",").map(n=>parseFloat(n.trim()))),Le(e)&&(e+="");let r=pl(t),o=e.slice(0,1);if(o==="-"||o==="+"){let n=ml(r,parseFloat(e));return dl(n).join(", ")}else{let[n,s,i]=t,[a,c]=hl(n/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return gl(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var ih=(t,e)=>{if(t)return t.themes&&t.themes[e]?t.themes[e]:t[e]?[t,t[e]]:t};var fe=(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},so=(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},Sl=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},on=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),nn=t=>`@import url('${t}');`,kl=t=>`@font-face { ${t} }`,Ei=(t,e,r,o={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=Sl(a),l=c?` format('${c}')`:"";return`url('${a}')${l}`}).join(`,
|
|
32
33
|
`);return`
|
|
33
34
|
font-family: '${t}';
|
|
34
|
-
font-style: ${
|
|
35
|
-
font-weight: ${r};`:""}${
|
|
36
|
-
font-stretch: ${
|
|
37
|
-
font-display: ${
|
|
38
|
-
src: ${i};`},
|
|
39
|
-
}`,Zr=(t,e,r)=>Object.keys(e).map(o=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l}=e[o],f=Array.isArray(s)?s.map(u=>oe(u,r)||u):oe(s,r)||s;return Zs(t,f,i,{fontStyle:a,fontDisplay:c,fontStretch:l})}),sp=t=>Object.keys(t).map(r=>Zr(r,t[r].value)),Uc=(t,e,r)=>{if(e&&e.isVariable){let s=oe(e.url,r)||e.url;return Bn(s)?Vn(s):hr(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap"})}if(e[0])return Zr(t,e,r).map(Vc);let o=Array.isArray(e.url)?e.url.map(s=>oe(s,r)||s):oe(e.url,r)||e.url;return hr(t,o,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch})},Qs=(t,e)=>Object.keys(t).map(n=>Uc(n,t[n].value,e));O();O();O();O();var Un={};I(Un,{animation:()=>wp,breakpoints:()=>_p,class:()=>Ep,color:()=>pp,devices:()=>Sp,document:()=>Fy,font:()=>ap,fontFace:()=>fp,fontFamily:()=>cp,fontFamilyTypes:()=>lp,gradient:()=>hp,grid:()=>Ap,icons:()=>yp,media:()=>up,reset:()=>My,semanticIcons:()=>bp,sequence:()=>qe,shadow:()=>mp,shape:()=>Rp,sizes:()=>Op,spacing:()=>dp,svg:()=>kp,svgData:()=>vp,templates:()=>Cp,theme:()=>gp,timing:()=>xp,typography:()=>ti,unit:()=>ip,vars:()=>Tp});var qe={"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 ip={default:"em"};var gk={browserDefault:16,base:16,type:"font-size",ratio:qe["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},ti=gk;var ap={};var cp={},lp={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},fp={};var up={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var mk={base:ti.base,type:"spacing",ratio:qe.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},dp=mk;var pp={},hp={};var gp={};var mp={};var yp={},bp={};var yk={default:150,base:150,type:"timing",ratio:qe["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},xp=yk;var Fy={};var _p={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},Sp={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 wp={};var kp={},vp={};var Cp={};var bk={},Ap=bk;var Ep={};var My={},Tp={},Op={},Rp={};var qc={},Kc={},zc=Un,Wc={},ri=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in zc){let e=t.toLowerCase();Wc[e]=zc[t];let r=ri(e);r!==e&&(Wc[r]=zc[t]),e!==t&&(Wc[t]=zc[t])}var Qr={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:qc,cssMediaVars:Kc,CSS_VARS:qc,CSS_MEDIA_VARS:Kc,_scratchConfig:!0,...Wc},zn=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return St(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let r=St(e)?e:t.globalTheme,n=It(St(r)?r:"auto");return Object.defineProperty(t,"globalTheme",{get(){return n.get()},set(o){n.set(o)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"__globalThemeSignal",{value:n,enumerable:!1,configurable:!0,writable:!0}),n},Ny=t=>t?zn(t):null,Wn=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return St(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let r=St(e)?e:t.resolvedTheme,n=It(St(r)?r:null);return Object.defineProperty(t,"resolvedTheme",{get(){return n.get()},set(o){n.set(o)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"__resolvedThemeSignal",{value:n,enumerable:!1,configurable:!0,writable:!0}),n},jy=t=>t?Wn(t):null;zn(Qr);Wn(Qr);var Hc=ut(Qr),se={active:"0",0:Qr},By=t=>(St(t)&&(se.active=t),se[t||se.active]),ei=[],rt=t=>{t&&t._scratchConfig&&ei.push(t)},Q=()=>{ei.pop()},C=t=>ei.length?ei[ei.length-1]:se[t||se.active]||Qr,Gc=t=>{if(w(t))return se.active="1",se[1]=Z(t,ut(Hc)),zn(se[1]),Wn(se[1]),t},xk=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],_k=["useVariable","globalTheme","verbose"],Sk=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],wk=t=>{for(let e of Sk){let r;for(let n of e){let o=t[n];w(o)&&(r=r?Z(o,r):o)}if(r)for(let n of e)w(t[n])&&(t[n]=r)}},ni=(t,e,{cleanBase:r=!1}={})=>{let n=r?null:C(),o=ut(!r&&n&&n._scratchConfig?n:Hc);for(let i of xk)delete o[i];for(let i of _k)Object.prototype.hasOwnProperty.call(Hc,i)?o[i]=Hc[i]:delete o[i];let s=Z(e||{},o);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s._scratchConfig=!0,wk(s),zn(s),Wn(s),t&&(se[t]=s),s};var Ie={"-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"},Pp=(t,e)=>{let{key:r,variable:n,value:o,scaling:s,index:i,scalingVariable:a}=t;e.sequence[r]={key:r,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:a,variable:n},e.scales[r]=s;let c=Vy.has(e.unit)?"rem":e.unit;e.vars[n]=s+c},Ke=t=>{if(!t.includes("("))return t;let e=t.split("(")[0],r=t.slice(t.indexOf("(")+1,t.lastIndexOf(")"));return[e,r]},Vy=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),oi=(t,e)=>{let{base:r,type:n,unit:o}=e,s=Vy.has(o)?"rem":o,i=(Mr(s)?1:r)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(n&&n.replace(".","-")),l=`${c}-ratio`;if(t>0){let f=Ie[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=Ie[t+1],u=Math.abs(t),d=Math.pow(Uy,2*u),h=Ie[u];return h?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${h}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},Yc=(t,e,r,n)=>{let{type:o}=n,i=t===2&&e.length===2?t+1:t,l=`${"--"+(n.varPrefix?n.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${l+i}))`},si=(t,e)=>{let n=(t*e-t)/1.618,o=t*e-n,s=t+n,i=(o+s)/2;return[o,i,s]},ii=(t,e)=>si(t,e).map(r=>r/t),ai=(t,e)=>{let{key:r,base:n,value:o,ratio:s,variable:i,index:a}=t,l=~~(o*s)-~~o,f,[u,d,h]=si(o,s);l>16?f=[u,d,h]:f=[u,h],f.forEach((g,p)=>{let m=~~(g/n*1e3)/1e3,x=i+(p+1),b=a+(p+1)/10,y=Yc(p+1,f,i,e),_={key:r+(p+1),variable:x,value:g,scaling:m,scalingVariable:y,index:b};Pp(_,e)})},Uy=1.618,kk=(t,e,r)=>{if(t>=0)return e*Math.pow(r,t);let n=Math.abs(t),o=e*Math.pow(r,t),s=e*Math.pow(r,n)/Math.pow(Uy,2*n);return Math.max(o,s)},Wt=t=>{let{type:e,base:r,ratio:n,range:o,subSequence:s}=t,i=Math.abs(o[0])+Math.abs(o[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=o[1]-l,u=Ie[f],d=kk(f,r,n),h=~~(d/r*100)/100,g=c+u,p=oi(f,t),m={key:u,variable:g,value:d,base:r,scaling:h,scalingVariable:p,ratio:n,index:f};Pp(m,t),s&&ai(m,t)}return t},$p=(t,e=0)=>{let{type:r,base:n,ratio:o,subSequence:s}=t,i=S(e)?e:Ie[e],a=S(e)?Object.entries(Ie).find(([,m])=>m===e)?.[0]:e;if(!i)return console.warn(`Position ${e} is out of range in numToLetterMap`),null;let c={sequence:{},scales:{},vars:{},...t},l=n*Math.pow(o,a),f=~~(l/n*100)/100,h="--"+(t.varPrefix?t.varPrefix+"-":"")+(r&&r.replace(".","-"))+"-"+i,g=oi(a,t),p={key:i,variable:h,value:l,base:n,scaling:f,scalingVariable:g,ratio:o,index:a};return Pp(p,c),s&&ai(p,c),c},ci=(t="A",e)=>{let r=C(),{unit:n}=r;if(S(t)&&ht(t))return`var(${t})`;if(S(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(S(t)){let y=r.sizes;if(y){let _=y[t]||y[t.toLowerCase()];if(_!==void 0)return t.slice(0,1)==="-"?`calc(${_} * -1)`:_}}let{sequence:o,unit:s=n.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(Lo(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+"-":""}${qs(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 x=y=>a.test(y)?`var(${d}${y}${m})`:y;if(p.includes("+")){let[y,_]=p.split("+"),k=`${x(y)} + ${x(_)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(p.includes("*")){let[y,_]=p.split("*"),k=`${x(y)} * ${x(_)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(p.includes("-")){let[y,_]=p.split("-"),k=`${x(y)} - ${x(_)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}if(!o[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 b=o?o[p]:null;if(!b){if(console.warn("can't find",o,p),Vt())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+b.val+s:g+b.scaling+s},Xc=(t,e)=>{if(!["+","-","*","/",","].filter(s=>t.includes(s+" ")).length)return t;let n=/(\s+-\s+|\s*[+*/,]\s*)/;return t.split(n).map(s=>{let i=s.trim();return!i||["+","-","*","/",","].includes(i)?s:ci(i,e)}).join("")},De=(t,e,r,n)=>{if(typeof t!="string")return C().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!n&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let s=Ke(t);n=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=Xc(t,r):t=ci(t,r),{[e]:n?`${n}(${t})`:t}},Jc=(t,e)=>Ie[t-e],li=t=>{let{h1Matches:e,sequence:r}=t;return new Array(6).fill(null).map((n,o)=>{let s=Jc(e,o);return r[s]})};O();var Ip=(t,e)=>{let r=C(),{cssVars:n}=r;U(t.value)||(n[t.var]=t.value)},fi=(t,e,r)=>{let n=C(),{unit:o}=n,s=e.unit||o.default,{base:i,ratio:a,type:c}=e,f="--"+(e.varPrefix?e.varPrefix+"-":"")+(c&&c.replace(".","-"));t[`${f}-base`]=i,t[`${f}-unit`]=s;let u=`${f}-ratio`;t[u]=a;let[d,h,g]=ii(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})`},zy=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Ge=(t,e={})=>{let r=C(),{unit:n,timing:o,cssVars:s}=r,i=t.unit||n.default,a=zy.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||fi(s,t,e);for(let u in l){let d=l[u],h=(t.type===o.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"})`)}},gr=(t,e,r={})=>{let n=C(),{unit:o,media:s,cssVars:i}=n,a=e.slice(1),c=t[e],l=c.unit||t.unit||o.default,f=zy.has(l)?"rem":l,{mediaRegenerate:u}=t,{sequence:d,scales:h}=c,g=s[a];if(!g&&n.verbose&&console.warn("Can't find media query ",g),!u){let p=i[`@media ${g}`];p||(p=i[`@media ${g}`]={}),fi(p,c,r);let m=t.unit||o.default;if(f!==m&&d)for(let x in d){let b=d[x],y=h[x]+f;p[b.variable+"_default"]=y,p[b.variable]=y}return}for(let p in d){let m=d[p],x=(Mr(f)?h[p]:d[p].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]=x}};O();var Hy=zr(),Hn=t=>{let e=C(),r="";for(let n in t)e.__svgCache[n]||(e.__svgCache[n]=!0,r+=t[n]);return r},vk=t=>{let e=t&&(t.default||t);if(!S(e))return Hy&&console.warn("parseRootAttributes:",e,"is not a string"),{};let r=e.match(/<svg\s+(.*?)>/);if(!r||!r[1])return{};let o=r[1].match(/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|\s*\/?[>"']))+.)["']?/gm);return o?o.reduce((s,i)=>{let[a,c]=i.split("=");return s[a]=c.replace(/['"]/g,""),s},{}):{}},Ck=(t,e)=>{let r=[];if(t.replace(/id="([^"]*)"/g,(o,s)=>(r.push(s),o)),!r.length)return t;let n=t;for(let o of r){let s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${e}-${o}`;n=n.replace(new RegExp(`id="${s}"`,"g"),`id="${i}"`).replace(new RegExp(`url\\(#${s}\\)`,"g"),`url(#${i})`).replace(new RegExp(`xlink:href="#${s}"`,"g"),`xlink:href="#${i}"`).replace(new RegExp(`href="#${s}"`,"g"),`href="#${i}"`)}return n},Wy=new Set,ui=(t,e)=>{let r=e&&e.default?e.default:e;if(!S(r))return Hy&&!Wy.has(t)&&(Wy.add(t),console.warn("convertSvgToSymbol:",t,"is not a string")),"";e=r;let n=e.match(/^<symbol\b[^>]*\bid="([^"]*)"/);if(n){let u=n[1];return u===t?e:e.replace(`id="${u}"`,`id="${t}"`)}let o=vk(e),{width:s,height:i}=o,a=o.viewBox||`0 0 ${s||24} ${i||24}`,f=Ck(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=Tk(f),f},Ak="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",Ek=new RegExp(`<(${Ak})\\b([^>]*?)\\s*/>`,"g"),Tk=t=>t.replace(Ek,"<$1$2></$1>");var Yn={};I(Yn,{STANDARD_SCHEME_QUERIES:()=>Zc,appendSVGSprite:()=>Ei,appendSvgIconsSprite:()=>Oi,applyDocument:()=>Ai,applyHeadings:()=>rl,applyReset:()=>Ri,applySpacingSequence:()=>Si,applyTimingSequence:()=>Ci,applyTypographySequence:()=>bi,checkIfBoxSize:()=>_i,getColor:()=>X,getFontFamily:()=>yi,getFontSizeByKey:()=>xi,getMediaColor:()=>Ot,getMediaTheme:()=>ie,getSafeInk:()=>Qc,getSafeInkInfo:()=>Dp,getShadow:()=>vi,getShapeByKey:()=>ki,getSpacingBasedOnRatio:()=>xe,getSpacingByKey:()=>wt,getTheme:()=>pi,getTimingByKey:()=>Yt,getTimingFunction:()=>ae,resolveColorRgb:()=>tn,runThroughMedia:()=>el,setAdaptiveSchemeVar:()=>br,setColor:()=>yr,setFont:()=>mi,setFontFamily:()=>Kn,setGradient:()=>qn,setMediaTheme:()=>gi,setSVG:()=>Gn,setShadow:()=>xr,setSvgIcon:()=>Ti,setTheme:()=>hi,splitSpacedValue:()=>wi});O();var Zc={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},X=(t,e,r)=>{let n=r||C();if(!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(ht(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(T(t))[o,s,i]=t;else{let u=ne(t);if(!u){let{color:d,gradient:h}=n,g=h[t]||d[t];return g?(e&&g[e]&&(g=g[e]),n.useVariable?`var(${g.var})`:g.value):t}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 n.verbose&&console.warn("Can't find color ",o),t;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"&&n.verbose&&console.warn(t," - array-form color tokens only support light/dark; falling back to the light slot for scheme",e),l=l[0])}else n.verbose&&console.warn(t," - does not have ",e);if(S(l))return X(l,null,r);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),p=g<0?"-":"+",m=Math.abs(g);return`rgb(from ${u} calc(r ${p} ${m}) calc(g ${p} ${m}) calc(b ${p} ${m}) / ${d})`}return`hsl(from ${u} h s ${i}% / ${d})`}return u}return i&&!l[i]&&(f=He(f,i),l[i]={rgb:f,var:`${l.var}-${i}`}),l[i]&&(f=l[i].rgb),s?`rgba(${f}, ${s})`:i?`rgba(${f}, 1)`:n.useVariable?`var(${l.var})`:`rgb(${f})`},tn=(t,e,r)=>{let n=e||C();if(!S(t))return null;let o=ne(t);if(o){if(o.passthrough){let d=re(o.passthrough);return d&&d.length>=3?{rgb:[d[0],d[1],d[2]],alpha:d[3]!==void 0?d[3]:1}:null}if(o.cssVar)return null}let s=o?o.name:t,{color:i,gradient:a}=n,c=i[s]||a[s];if(!c){let d=re(t);return!d||d.length<3||d[0]===0&&d[1]===0&&d[2]===0&&d[3]===0&&t.toLowerCase()!=="transparent"?null:{rgb:[d[0],d[1],d[2]],alpha:d[3]!==void 0?d[3]:1}}if(S(c))return tn(c,n,r);if(c.rgb===void 0&&w(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=He(l,o.tone));let f=S(l)?l.split(",").map(d=>parseFloat(d.trim())):l,u=o&&o.alpha!==void 0?parseFloat(o.alpha):c.alpha!==void 0?c.alpha:1;return{rgb:f,alpha:u}},Ot=(t,e,r)=>{let n=r||C();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(ht(t))return`var(${t})`;let o,s,i;if(T(t))o=t[0];else{let u=ne(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}else o=t}let{color:a,gradient:c}=n,l=a[o]||c[o],f=w(l);if(f&&l.value)return X(t,`@${e}`,r);if(f){if(n.useVariable&&l.var)return s||i?X(t,null,r):`var(${l.var})`;if(e)return X(t,`@${e}`,r);{let u={};for(let d in l){if(d.charCodeAt(0)!==64)continue;let h=d.slice(1),g=n.media&&n.media[h]||Zc[h];if(!g)continue;let p="@media "+(g==="print"?`${g}`:`screen and ${g}`);u[p]=X(t,d,r)}return u}}else return n.verbose&&console.warn("Can't find color",t),t},br=(t,e,r,n)=>{let s=`--${n.varPrefix?n.varPrefix+"-":""}${e}-${r}`,i,a={};for(let c in t){if(c.charCodeAt(0)!==64)continue;let l=c.slice(1),f=t[c],u=f&&(f.value||f);!u||typeof u!="string"||(a[l]=u,(l==="light"||i===void 0)&&(i=u))}if(i!==void 0){n.cssVars[s]=i,n.cssMediaVars||(n.cssMediaVars={});for(let c in a){let l=`[data-theme="${c}"]`;if(n.cssMediaVars[l]||(n.cssMediaVars[l]={}),n.cssMediaVars[l][s]=a[c],c==="light"||c==="dark"){let f=`@media (prefers-color-scheme: ${c})`;n.cssMediaVars[f]||(n.cssMediaVars[f]={}),n.cssMediaVars[f][s]=a[c]}}return t.var=s,s}},yr=(t,e,r)=>{let n=C();if(w(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0))return n.useVariable&&t.var&&(n.cssVars[t.var]=t.value),t;if(S(t)&&ht(t)){let p=t.slice(2);if(t=X(p),!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let m=p.split(" "),x=n.color[m[0]];if(x&&!x.value&&!x.rgb&&(S(x)||T(x)||w(x))&&(n.color[m[0]]=yr(x,m[0]),x=n.color[m[0]]),x&&x.value){let b=x.rgb,y=m[1]!==void 0?m[1]:"1",_=m[2];_&&(b=He(b,_)),t=`rgba(${b}, ${y})`}else{let b=m[2],y=m[1]!==void 0?m[1]:"1";if(b)try{let _=re(m[0]);_&&_.length>=3?t=`rgba(${He(_.slice(0,3).join(", "),b)}, ${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]}),w(t)){let p={};for(let m in t)m!=="var"&&(p[m]=yr(t[m],e,m.slice(0,1)==="@"?m.slice(1):m));return n.useVariable&&br(p,"color",e,n),p}let s=`--${n.varPrefix?n.varPrefix+"-":""}color-${e}`+(r?`-${r}`:""),i=t.value||t;if(S(i)&&!i.includes("(")&&!i.startsWith("#")){let p=ne(i);if(p&&p.name&&!p.passthrough&&!p.cssVar){let m=n.color[p.name];m&&!m.value&&!m.rgb&&(S(m)||T(m)||w(m))&&(n.color[p.name]=yr(m,p.name));let x=n.color[p.name];if(x&&x.rgb){let b=x.rgb;p.tone&&(b=He(b,p.tone));let y=p.alpha?parseFloat(p.alpha):1;i=`rgba(${b}, ${y})`}}}let a=re(i),[c,l,f,u=1]=a,d=parseFloat(u.toFixed(2)),h=`${c}, ${l}, ${f}`,g=`rgba(${h}, ${d})`;return n.useVariable&&(n.cssVars[s]=g),{var:s,rgb:h,alpha:d,value:g}},qn=(t,e,r)=>{let n=C();if(w(t)&&t.value!==void 0&&t.var!==void 0)return n.useVariable&&(n.cssVars[t.var]=t.value),t;if(S(t)&&ht(t)&&(t=X(t.slice(2))),T(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),w(t)){let i={};for(let a in t)a!=="var"&&(i[a]=qn(t[a],e,a.slice(0,1)==="@"?a.slice(1):a));return n.useVariable&&br(i,"gradient",e,n),i}let s=`--${n.varPrefix?n.varPrefix+"-":""}gradient-${e}`+(r?`-${r}`:"");return n.useVariable&&(n.cssVars[s]=t.value||t),{var:s,value:t.value||t}};O();var Qc=(t,e,r={},n)=>{let o=n||C(),{min:s=4.5,large:i=!1,scheme:a,meta:c=!1,maxIterations:l=15}=r,f=i?3:s,u=a||(o.globalTheme&&o.globalTheme!=="auto"?o.globalTheme:"light"),d=S(e)?e:String(e),h=ne(t),g=h&&!h.passthrough&&!h.cssVar?h.name:null,p=(J,ft)=>c?{value:J,...ft}:J;if(g){let J=o.color[`${g}Safe`];if(J){let ft=`${d}@${u}`,ot=J[ft]!==void 0?J[ft]:J[d];if(ot!==void 0){let wa=ot&&ot.rgb!==void 0?o.useVariable&&ot.var?`var(${ot.var})`:ot.value:X(ot,null,o);return p(wa,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=X(t,u?`@${u}`:null,o),x=tn(t,o,u),b=tn(e,o,u);if(!x||!b)return o.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=Xr(b.rgb,b.alpha),_=Xr(x.rgb,x.alpha,y),k=jn(_,y);if(k>=f-.02)return p(m,{ratio:k,deviation:0,derived:!1,overridden:!1});let[A,R,N]=Ys(x.rgb),[,P,$]=Xs([A,R,N]),V=Yr(y)>.5,_t=V?A:1-A,H=J=>{let ft=V?A-J:A+J,ot=Math.max(0,Math.min(1,ft));return{rgb:Js(ot,P,$),L:ot}},K=J=>{let{rgb:ft}=H(J),ot=Xr(ft.map(wa=>Math.round(wa)),x.alpha,y);return jn(ot,y)},L=0,W=_t,j=K(W)>=f;if(j)for(let J=0;J<l;J++){let ft=(L+W)/2;K(ft)>=f?W=ft:L=ft}else L=W;let{rgb:yt,L:ct}=H(W),lt=yt.map(J=>Math.round(J)),tt=K(W),Ct=x.alpha<1?`rgba(${lt.join(", ")}, ${x.alpha})`:`rgb(${lt.join(", ")})`,D=Math.abs(ct-A)*100;return p(Ct,{rgb:lt,ratio:tt,startRatio:k,deviation:D,derived:!0,overridden:!1,reachable:j})},Dp=(t,e,r={},n)=>Qc(t,e,{...r,meta:!0},n);O();var Ok=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"]),qy=["color","Color","background","Background","fill","Fill","stroke","Stroke"],Rk=t=>{for(let e=0;e<qy.length;e++)if(t.includes(qy[e]))return!0;return!1},tl=t=>{let e={},{state:r,media:n,helpers:o,...s}=t;return Object.keys(s).map(a=>{let l=["color","Color","background","border"].some(f=>a.includes(f));return e[a]=l?X(t[a]):t[a]}),e},di=t=>(t.value||(t.value=tl(t)),t.value),pi=(t,e)=>{let r=C();if(r.useVariable)return ie(t,e);let n=r.theme;if(S(t)){let[o,s]=t.split(" "),i=n[o];if(i){if(!s&&!e)return di(i);t=[o,s||e]}}if(U(t)&&t[1]){let o=t[0],s=t[1],{helpers:i,media:a,state:c}=n[o];if(a&&a[s])return di(a[s]);if(i&&i[s])return di(i[s]);if(c&&c[s])return di(c[s])}else if(w(t))return tl(t)},Pk=(t,e,r)=>{if(w(e))t.variants.inverse.value=tl(e);else if(e===!0){let{color:n,background:o}=r;t.variants.inverse={value:{color:o,background:n}}}},$k=(t,e,r,n)=>{let o=pi(r);n[`&:${e}`]=o,w(r)&&!r.value&&(r.value=o)},Ik=(t,e)=>{let{state:r}=t;return r?(Object.keys(r).map(o=>{let s=r[o];return $k(t,o,s,e),t}),t):void 0},Dk=(t,e,r,n)=>{let o=pi(r);n[`@media (prefers-color-scheme: ${e})`]=o,w(r)&&!r.value&&(r.value=o)},Lk=(t,e)=>{let{media:r}=t;return r?(Object.keys(r).map(o=>{let s=r[o];return(o==="dark"||o==="light")&&Dk(t,o,s,e),o==="inverse"&&Pk(t,s,e),t}),t):void 0},Fk=(t,e)=>{let r=C(),{helpers:n}=t;return n?(Object.keys(n).map(s=>{let i=n[s];return S(i)?n[s]=r.theme[i]:di(n[s]),t}),t):void 0},hi=(t,e)=>{let r=C();if(r.useVariable)return gi(t,e);let{state:n,media:o,helpers:s}=t,i=tl(t,e),c=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}`;return Ik(t,i),Lk(t,i),Fk(t,i),{var:c,value:i,state:n,media:o,helpers:s}};var Lp=(t,e,r)=>{let{cssVars:n}=r;r.cssMediaVars||(r.cssMediaVars={});let o=r.cssMediaVars,s=r.globalTheme!==void 0?r.globalTheme:"auto",i={},a=new Set;for(let l in t)if(t[l])for(let f of Object.keys(t[l]))a.add(f);let c=new Set;for(let l of a){let f=l.slice(0,1);if(!(f==="@"||f==="."||f===":")&&Rk(l))for(let u in t){if(c.has(u))continue;let d=t[u]?.[l];if(d===void 0)continue;let h=X(d,`@${u}`);h!==void 0&&S(h)&&/^[a-z][a-zA-Z]+$/.test(h)&&!Ok.has(h)&&c.add(u)}}for(let l of a){let f=l.slice(0,1),u=Object.values(t).some(d=>U(d?.[l]));if(f==="."&&u){let d=l.slice(1),h={};for(let g in t)U(t[g]?.[l])&&(h[g]=t[g][l]);i[l]=Lp(h,`${e}-${d}`,r)}else if(f===":"&&u){let d=l.replace(/^:+/,""),h={};for(let g in t)U(t[g]?.[l])&&(h[g]=t[g][l]);i[l]=Lp(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 x=t[m]?.[l];if(x===void 0)continue;let b=X(x,`@${m}`);if(b===void 0)continue;(g&&m===g||!g&&(m==="light"||p===void 0))&&(p=b);let y=`[data-theme="${m}"]`;if(o[y]||(o[y]={}),o[y][h]=b,m==="dark"||m==="light"){let _=`@media (prefers-color-scheme: ${m})`;o[_]||(o[_]={}),o[_][h]=b}}p!==void 0&&(n[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},gi=(t,e,r,n)=>{let o=C(),{cssVars:s}=o,i={value:t},a=!r&&!n;if(U(t)){if(a&&o.useVariable){let c={};for(let l in t)l.startsWith("@")&&U(t[l])&&(c[l.slice(1)]=t[l]);if(Object.keys(c).length){let l=Lp(c,e,o);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]=gi(f,e,c,n||u)}else if(!a){let u=X(f,n),d=[...new Set([n,r].filter(m=>m).map(m=>m.slice(1)))],h=d.length?"-"+d.join("-"):"",p=`--${o.varPrefix?o.varPrefix+"-":""}theme-${e}${h}-${c}`;o.useVariable?(o.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(S(t)&&ht(t)){let l=o.theme[t.slice(2)];return ie(l,n)}return i},Fp=t=>{let e=C(),r={};for(let n in t){let o=n.slice(0,1);if(U(t[n])){if(o==="@")continue;o===":"?r[`&${n}`]=Fp(t[n]):o==="."&&(r[`&${n}`]=Fp(t[n]))}else r[n]=t[n]}return r},Gy=(t,e)=>{let r=e.shift();return t[r]?Gy(t[r],e):t},Ky=(t,e)=>T(e)?Gy(t,e):S(e)&&t[e]?t[e]:t;var ie=(t,e)=>{let r=C();if(S(t)&&ht(t)&&(t=ie(t.slice(2))),!t||!S(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[n,...o]=T(t)?t:t.split(" "),s=r.theme[n];return s&&o.length?s=Ky(s,o):s&&e&&(s=Ky(s,e)),Fp(s)};O();O();var mi=(t,e)=>{let r=C(),n=`--font-${e}`;if(!t||T(t)&&!t[0])return;let o;if(t.isVariable){let s=oe(t.url,r.files)||t.url;Bn(s)?o=Vn(s):o=hr(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap"})}else if(t[0])o=Zr(e,t,r.files);else{let s=Array.isArray(t.url)?t.url.map(i=>oe(i,r.files)||i):oe(t.url,r.files)||t.url;o=hr(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch})}return{var:n,value:t,fontFace:o}},yi=(t,e)=>{let r=C(),{fontFamily:n}=r;return Jr(e||n,t)},Kn=(t,e)=>{let r=C(),{fontFamily:n,fontFamilyTypes:o}=r,{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!n.default)&&(n.default=e),w(s)&&(s=Gr(s));let a=`--font-family-${e}`,c=`${s.join(", ")}, ${o[i]}`;return{var:a,value:c,arr:s,type:i}};O();var el=t=>{let e=C(),{typography:r,media:n}=e;for(let o in t){let s=o.slice(0,1)==="@",i=t[o];if(!s)continue;let{mediaRegenerate:a}=t,c=o.slice(1),{type:l,base:f,ratio:u,range:d,subSequence:h,h1Matches:g,unit:p}=t;pt(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"]),x=i.unit||p,b=!i.unit&&m.has(p)?"rem":x,y=n[c],_="@media "+(y==="print"?`${y}`:`screen and ${y}`);if(r.templates[_]={fontSize:i.base/r.browserDefault+b},!a){pt(i,{sequence:{},scales:{},vars:{}}),Wt(i),gr(t,o);continue}pt(i,{sequence:{},scales:{},templates:{},vars:{}}),Wt(i),gr(t,o)}},rl=t=>{let e=C();if(t.h1Matches){let r=t.unit,n=li(t),{templates:o}=t;for(let s in n){let i=`h${parseInt(s)+1}`,a=o[i];o[i]={fontSize:e.useVariable?`var(${n[s]?.variable})`:`${n[s]?.scaling}${r}`,margin:a?a.margin:0,lineHeight:a?a.lineHeight:t.lineHeight,letterSpacing:a?a.letterSpacing:t.letterSpacing,fontWeight:a?a.fontWeight:900-s*100}}}},bi=()=>{let t=C(),{typography:e}=t;Wt(e),rl(e),Ge(e),el(e)},xi=t=>{let e=C(),{typography:r}=e;return De(t,"fontSize",r)};O();O();var Mk=t=>{let r=C().spacing||{},n=parseFloat(t.spacingRatio),o={...r,ratio:Number.isFinite(n)?n:r.ratio,sequence:{},scales:{}};return Wt(o),o},Nk=t=>{for(let e in t){let r=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;pt(r,{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),Wt(r),gr(t,e)}},_i=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),n=e.includes("border")||e.includes("outline");return r&&!n},Si=()=>{let t=C(),{spacing:e}=t;Wt(e),Ge(e),Nk(e)},jk=t=>{let e=C(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:Wt(t)},wt=(t,e="padding",r,n)=>{let o=jk(r);if(S(t)){if(!n&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!n&&t.includes("(")){let i=Ke(t);n=i[0],t=i[1]}}let s=n?[t]:Gr(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)=>De(s[f],e+l+i,o,n);return a[s.length].map((l,f)=>c(l,f))}return De(t,e,o,n)}},xe=(t,e,r,n)=>{let o=C(),{spacing:s}=o,i=r||t[e];if(!n&&S(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!n&&S(i)&&i.includes("(")){let a=Ke(i);n=a[0],i=a[1]}if(t.spacingRatio){let a=Mk(t);return wt(i,e,a,n)}return wt(i,e,s,n)},wi=t=>{let e=r=>{let n=["+","-","*","/"].includes(r),o=yn.some(i=>t.includes(i));return n||o?r:r.length<3&&/[A-Z]/.test(r)?r+"_default":r};return t.split(",").map(r=>r.trim()).map(e).join(",").split(" ").map(e).join(" ")};O();var ki=t=>{if(!S(t))return;let r=C().shape;if(r)return r[t]!==void 0?r[t]:r[t.toLowerCase()]};O();var xr=(t,e,r,n)=>{let o=C();if(T(t)){let a={"@light":xr(t[0],e,"light"),"@dark":xr(t[1],e,"dark")};return o.useVariable&&br(a,"shadow",e,o),a}if(w(t)){let a={};for(let c in t)a[c]=xr(t[c],e,c.startsWith("@")?c.slice(1):c);return o.useVariable&&br(a,"shadow",e,o),a}S(t)&&!be.test(t)&&(t=We(t).map(a=>(a=a.trim(),a.split(/\s+/).map(c=>{if(c=c.trim(),!c)return"";if(c.startsWith("--"))return`var(${c})`;let l=X(c);if($e(l))return l;if(/^\d/.test(c)||c==="0"||c.includes("px")||c.slice(-2)==="em"||c==="inset"||c==="none")return c;let f=wt(c,"shadow");return f&&f.shadow?f.shadow:c}).join(" "))).join(", "));let i=`--${o.varPrefix?o.varPrefix+"-":""}shadow-${e}`+(r?`-${r}`:"");return o.useVariable&&(o.cssVars[i]=t),{var:i,value:t}},vi=(t,e)=>{let r=C();if(e||(e=r.globalTheme==="auto"?null:r.globalTheme),!S(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(ht(t))return`var(${t})`;let[n]=T(t)?t:t.split(" "),s=r.shadow[n],i=w(s);if(!s)return r.verbose&&console.warn("Can't find color ",n),t;if(e){let a=s["@"+e]||s[e];if(a)return a.value!==void 0?a.value:a;r.verbose&&console.warn(t," - does not have ",e)}if(i&&s.value)return s.value;if(i){let a={};for(let c in s){if(c.charCodeAt(0)!==64)continue;let l=r.media[c.slice(1)];if(!l)continue;let f="@media "+(l==="print"?`${l}`:`screen and ${l}`),u=s[c],d=u&&(u.value!==void 0?u.value:u);d!==void 0&&(a[f]=d)}return a}return r.verbose&&console.warn("Can't find color",t),t};O();var Ci=()=>{let t=C(),{timing:e}=t;Wt(e),Ge(e)},ae=t=>{let e=C(),{timing:r}=e;return r[t]||r[Hs(t)]||t},Yt=(t,e="timing")=>{let r=C(),{timing:n}=r;return De(t,e,n)};O();var Ai=()=>{let t=C(),{fontFamily:e,theme:r,typography:n}=t,o=t.document;return Be(o)?(or(t,"document",o),o=t.document={}):o||(o=t.document={}),pt(o,{theme:r.document,fontFamily:Jr(e),fontSize:n.base,lineHeight:n.lineHeight})};O();var Np={document:Y},Gn=(t,e)=>{let r=C();if(!t){r.verbose&&console.warn("setSVG: val is not defined",e);return}return r.useSvgSprite?ui(e,t):t},Ei=(t,e=Np)=>{let r=C(),n=Object.keys(t).length?{}:r.svg;for(let o in t)n[o]=t[o];Xy(n,e)},Ti=(t,e)=>{let r=C();return r.useIconSprite&&!r.semanticIcons?.[e]?Gn(t,e):t},Oi=(t,e=Np)=>{let r=C(),n=Object.keys(t).length?{}:r.icons;for(let o in t)n[o]=t[o];Xy(n,e)},Mp=(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},Bk=(t,e)=>{let r=typeof DOMParser<"u"?DOMParser:null;if(r){let n=`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,s=new r().parseFromString(n,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},Yy=(t,e,r)=>{for(;e.firstChild;){let n=e.firstChild;r.appendChild(t.importNode(n,!0)),n.remove()}},Xy=(t,e=Np)=>{let r=C(),n=e.document||Y;if(!n||!n.documentElement)return r.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),Hn(t);let o=n.querySelector("#svgSprite"),s=Hn(t),i=`<svg aria-hidden="true" width="0" height="0" style="position:absolute" id="svgSprite">${s}</svg>`,a=Bk(n,s);if(o)if(a)Yy(n,a,o);else if(n.body.insertAdjacentHTML)o.insertAdjacentHTML("beforeend",s);else{let c=Mp(n,{isRoot:!1});c.innerHTML=s,o.append(...c.children)}else if(a){let c=Mp(n);c&&c.nodeType&&(Yy(n,a,c),n.body.prepend(c))}else if(n.body.insertAdjacentHTML)n.body.insertAdjacentHTML("afterbegin",i);else{let c=Mp(n);c&&c.nodeType&&(c.innerHTML=s,n.body.prepend(c))}};O();var Ri=(t={})=>{let e=C(),{reset:r,typography:n,document:o}=e;if(r){if(r[":root"]){let c=r,l=n.templates;c.body={...e.useDocumentTheme?ie("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}=n.templates,a=e.useDocumentTheme?ie("document"):{};if(r.html&&Bt(r.html,a),n.unit){let{media:c}=e;for(let l in n){if(l.charAt(0)!=="@")continue;let f=n[l];if(!f||f.unit===n.unit||!f.unit)continue;let u=f.unit,d=f.base||n.base,h=f.browserDefault||n.browserDefault,g=l.slice(1),p=c[g];if(!p)continue;let m="@media "+(p==="print"?p:"screen and "+p);r[m]||(r[m]={}),r[m].html||(r[m].html={}),r[m].html.fontSize=d/h+u}}return Z(pt(r,t),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",scrollBehavior:"smooth",...a,fontSize:n.unit?n.base/n.browserDefault+n.unit:n.browserDefault+"px",fontFamily:o.fontFamily,lineHeight:o.lineHeight},body:{boxSizing:"border-box",height:"100%",margin:0,fontFamily:o.fontFamily,fontSize:n.unit?"1"+e.unit.default:n.base/n.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}})}};O();var Vk=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),Uk=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),zk=t=>Vk.has(t),Le=t=>{let e=t+"";if(be.test(e))return e;let r=e.trim();return r==="none"||r==="0"||r==="initial"||r==="inherit"||r==="unset"?e:e.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(ht(o))return`var(${o})`;if(zk(o)||/^\d/.test(o)||o==="0")return o;let s=X(o);if($e(s))return s;let i=wt(o,"border");return i&&i.border?i.border:o}).join(" ")},nl=t=>be.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(ht(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=X(e);return $e(r)?r:e}).join(" "),ol=(t,e)=>vi(t,e),Pi=(t,e)=>be.test(t)?t:We(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(ht(n))return`var(${n})`;if(n==="inset"||n==="none")return n;let o=X(n);if($e(o)){let i=Ot(n,e);return w(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em")return n;let s=wt(n,"shadow");return s&&s.shadow?s.shadow:n}).join(" "):"")).join(", "),$i=(t,e)=>{let r=t.indexOf("(");if(r===-1)return t;let n=t.slice(0,r+1),o=t.slice(r+1,t.lastIndexOf(")")),s=")",a=We(o).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||Uk.has(f)||f==="transparent"||be.test(f))return f;let u=X(f);return $e(u)?u:f}).join(" ")));return n+a.join(", ")+s},sl=(t,e)=>{let r=C();return We(t).map(n=>{let o=n.trim();if(ht(o))return`var(${o})`;if(/^var\(/.test(o)||o.includes("url"))return o;if(r.gradient?.[o]){let s=Ot(o,e);if(S(s))return s;if(w(s)){for(let i in s)if(S(s[i]))return s[i]}return o}return o.includes("gradient")?$i(o,e):o.includes("/")||o.startsWith("http")||o.includes(".")&&!ne(o)?`url(${o})`:o}).join(", ")},il=t=>S(t)&&t.split(" ").map(e=>wt(e,"gap").gap).join(" "),jp=t=>{let e=t.split(" ");return e.length?e.map(r=>ht(r)?`var(${r})`:r.length<3||r.includes("ms")?Yt(r).timing||r:ae(r)?ae(r):r).join(" "):t},Ii=(t,e,r)=>{if(S(t))return t.split(",").map(n=>Yt(n).timing||n).join(",")},al=t=>{let e=t.split(",");if(e.length)return e.map(jp).join(",")};function gt(t,e,r={},n={}){let o=it.call(this,e||r[t]);if(o==null)return;let s;if(S(o)){if(/^(?:env|var)\(/.test(o.trim()))return{[t]:o};if(o.includes("(")){let c=Ke(o);s=c[0],o=c[1]}let i=r.scaleBoxSize,a=_i(t);!i&&a&&!n.ratio&&(o=wi(o))}return n.ratio?xe(r,t,o,s):wt(o,t,void 0,s)}var M=(t,e=null,r)=>gt(t,e,r,{ratio:!0}),Ye=(t,e,r,n="borderRadius")=>{if(S(t))return{[n]:t.split(" ").map(o=>{let s=ki(o);return s!==void 0?s:xe(e,r,o)[r]}).join(" ")}};O();var Wk=(t,e)=>{let r=C(),{cssVars:n}=r,o=e.startsWith("--")?e:`--${e}`;return n[o]=t,t},Ht=t=>t,cl={color:yr,gradient:qn,font:mi,fontFamily:Kn,fontfamily:Kn,theme:hi,icons:Ti,semanticIcons:Ht,semanticicons:Ht,svg:Gn,svgData:Ht,typography:Ht,shadow:xr,spacing:Ht,media:Ht,grid:Ht,class:Ht,timing:Ht,reset:Ht,unit:Ht,animation:Ht,vars:Wk,sizes:Ht,shape:Ht},Hk=(t,e,r,n)=>{or(t,r,e);let o={};for(let s of n)t[s]===e&&(t[s]=o);return t.verbose&&console.warn("[scratch] design-system family",r,"resolved to a host object; parked it and allocated a plain bucket"),o},Bp=(t,e,r)=>{let n=C(),o=ri(t),s=o.toLowerCase(),i=n[o]||n[s]||n[t],a=Be(i)?Hk(n,i,s,[o,s,t]):i,c=cl[o]||cl[s];if(c)try{let l=c(e,r);return a&&(a[r]=l),a}catch(l){n.verbose&&console.warn("Error setting",s,"value",e,r,l)}if(!c){let l=a||(n[s]={});return l[r]=e,l}n.verbose&&console.warn("Can not find",s,"method in scratch")},Vp=(t,e)=>{let r=C(),n=t.toLowerCase();return Be(e)?(or(r,n,e),r.verbose&&console.warn("[scratch] ignoring host object passed as the",n,"design-system family"),r[n]||r[t]):(Object.keys(e).sort((s,i)=>{let a=w(e[s])||T(e[s])?1:0,c=w(e[i])||T(e[i])?1:0;return a-c}).forEach(s=>{try{return Bp(n,e[s],s)}catch(i){r.verbose&&console.warn("Error setting",n,"value",e[s],s,i)}}),r[n]||r[t])},ll=(t,e)=>{let r=e||C();r.globalTheme=t;let o=mn(r)||(typeof document<"u"?document:null),s=o&&o.defaultView||(typeof window<"u"?window:null);if(o){let a=r.themeRoot||o.documentElement;if(t&&t!=="auto")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)");if(l(f),a.style.colorScheme="light dark",!r.__prefersListener){r.__prefersListener=l;try{f.addEventListener("change",l)}catch{f.addListener(l)}}}else 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},qk={},en=(t,e=qk)=>{let r=e.config||C(),{version:n,verbose:o,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:x,...b}=t;e.newConfig&&(r=Gc(e.newConfig)),je(b.document)&&(r.__domDocument=b.document,delete b.document),je(r.document)&&(r.__domDocument||(r.__domDocument=r.document),r.document={}),m!==void 0&&(r.files=m),x!==void 0&&(r.assets=x),o!==void 0&&(r.verbose=o),s!==void 0&&(r.useVariable=s),i!==void 0&&(r.useReset=i),c!==void 0&&(r.useFontImport=c),a!==void 0&&(r.useSvgSprite=a),l!==void 0&&(r.useIconSprite=l),d!==void 0&&(r.useDocumentTheme=d),f!==void 0&&(r.globalTheme=f),u!==void 0&&(r.themeRoot=u),t.useThemeSuffixedVars!==void 0&&(r.useThemeSuffixedVars=t.useThemeSuffixedVars),h!==void 0&&(r.useDefaultConfig=h),g!==void 0&&(r.semanticIcons=g),p!==void 0&&(r.hoverMedia=p),r.verbose&&console.log(r);let _=mn(r)||(typeof document<"u"?document:null),k=_&&_.defaultView||(typeof window<"u"?window:null),A=_&&(r.themeRoot||_.documentElement);if(A&&typeof A.setAttribute=="function")if(r.globalTheme&&r.globalTheme!=="auto")A.setAttribute("data-theme",r.globalTheme),r.resolvedTheme=r.globalTheme,r.globalTheme==="dark"||r.globalTheme==="light"?A.style.colorScheme=r.globalTheme:A.style.colorScheme="light dark";else if(k&&k.matchMedia){let V=H=>{let K=H.matches?"dark":"light";A.setAttribute("data-theme",K),r.resolvedTheme=K},_t=k.matchMedia("(prefers-color-scheme: dark)");if(V(_t),A.style.colorScheme="light dark",!r.__prefersListener){r.__prefersListener=V;try{_t.addEventListener("change",V)}catch{_t.addListener(V)}}}else A.setAttribute("data-theme","light"),r.resolvedTheme="light",A.style.colorScheme="light";r.__svgCache||(r.__svgCache={});let R=Object.keys(b).filter($=>!$.startsWith("__")),N=new Set(R);if(R.forEach($=>{let V=$.toLowerCase();V!==$&&N.has(V)&&Z(b[V],b[$])}),R.map($=>{let V=$.toLowerCase();if(!(V!==$&&N.has(V)))return Vp($,b[$])}),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{bi()}catch($){r.verbose&&console.warn("Error applying typography sequence",$)}if(b.spacing)try{Si()}catch($){r.verbose&&console.warn("Error applying spacing sequence",$)}if(b.timing)try{Ci()}catch($){r.verbose&&console.warn("Error applying timing sequence",$)}Ai();let P=Ri();return P&&(r.reset=P),r};var rn=new Map,eb=null,Wp=null,Kk=null;function Di(t){t.batchAtomicCss&&(Wp=t.batchAtomicCss),t.compoundCssClass&&(Kk=t.compoundCssClass)}var Gk=new Set,Jy=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function Hp(t){try{let e=C();e&&(e.__domDocument=t)}catch{}t&&Gk.add(t)}function ul(){try{let t=C();if(t){if(Jy(t.__domDocument))return t.__domDocument;if(Jy(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var Yk={display:"d",position:"pos",padding:"p",paddingTop:"pt",paddingRight:"pr",paddingBottom:"pb",paddingLeft:"pl",margin:"m",marginTop:"mt",marginRight:"mr",marginBottom:"mb",marginLeft:"ml",width:"w",height:"h",minWidth:"mnw",minHeight:"mnh",maxWidth:"mxw",maxHeight:"mxh",top:"t",right:"r",bottom:"b",left:"l",flex:"fx",flexDirection:"fxd",flexWrap:"fxw",flexGrow:"fxg",flexShrink:"fxs",flexBasis:"fxb",justifyContent:"jc",alignItems:"ai",alignSelf:"as",alignContent:"ac",gap:"g",rowGap:"rg",columnGap:"cg",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",gridColumn:"gc",gridRow:"gr",overflow:"of",overflowX:"ofx",overflowY:"ofy",fontSize:"fs",fontWeight:"fw",fontFamily:"ff",fontStyle:"fst",lineHeight:"lh",letterSpacing:"ls",textAlign:"ta",textDecoration:"td",textTransform:"tt",color:"c",background:"bg",backgroundColor:"bgc",backgroundImage:"bgi",border:"bd",borderRadius:"br",borderColor:"bdc",borderWidth:"bdw",borderStyle:"bds",boxShadow:"bxsh",opacity:"op",zIndex:"z",cursor:"cur",transition:"tr",transform:"tf",animation:"an",visibility:"vis",whiteSpace:"ws",wordBreak:"wb",objectFit:"obj",pointerEvents:"pe",userSelect:"us",boxSizing:"bxz",outline:"ol",listStyle:"lis",textOverflow:"txo",verticalAlign:"va",float:"fl",clear:"cl",content:"cnt",backdropFilter:"bdf",filter:"flt",resize:"rsz",appearance:"apr",fill:"fil",stroke:"stk"};function nn(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function fl(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 Xk(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():fl(e)}var Jk={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select"};function Xn(t,e){let r=Jk[t];return r?`${t}:${e};${r}:${e};`:`${t}:${e};`}var Zk="@media (hover: hover)",Qk=/(?:^|[^\\]):hover(?![\w-])/;function qp(){try{let t=C();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function _e(t,e,r){return r===!1||!Qk.test(e)||r===void 0&&!qp()?t:`${Zk}{${t}}`}function Zy(t,e,r){let n=(r?r+"":"")+t+":"+e,o=rn.get(n),s=o?null:nn(t);if(!o){let c=Yk[t]||fl(t),l=Xk(e);o=r?`_${r}_${c}-${l}`:`_${c}-${l}`,rn.set(n,o)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return o;let i=s||nn(t),a=`.${o}{${Xn(i,e)}}`;return ce(a),o}var Qy=new WeakMap;function ce(t,e){let r=rb(e);if(!r)return;let n=Qy.get(r);if(n||(n=new Set,Qy.set(r,n)),!n.has(t)){n.add(t);try{r.insertRule(t,r.cssRules.length)}catch{}}}var tb=new WeakMap;function rb(t){let e=t||ul();if(!e||!e.head)return null;let r=tb.get(e);if(r&&r.ownerNode&&r.ownerNode.parentNode===e.head)return r;let n=e.head.querySelector("style[data-smbls]");n||(n=e.createElement("style"),n.setAttribute("data-smbls",""),e.head.appendChild(n));let o=n.sheet;return tb.set(e,o),eb=o,o}var tv=8;function le(t,e,r){if(!t||typeof t!="object")return"";let n=null,o=0,s=[],i=[];for(let c in t){let l=t[c];l==null||l===!1||l===""||(typeof l=="object"?i.push([c,l]):Wp?(n||(n=[]),n.push(c,String(l)),o++):s.push(Zy(c,String(l),r)))}if(n&&o>=tv){let c=n.join("\0"),l=Wp(c),f=l.indexOf("\0"),u=l.substring(0,f),d=l.substring(f+1);if(d){let h=d.split(`
|
|
40
|
-
`);for(let g=0;g<h.length;g++)h[g]&&ce(h[g])}s.push(u)}else if(n)for(let c=0;c<n.length;c+=2)s.push(Zy(n[c],n[c+1],r));let a=[];for(let c=0;c<i.length;c++)a.push(nv(i[c][0],i[c][1],r));return s.concat(a).join(" ").trim()}var zp=new Map,ev=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function rv(t){return typeof t!="string"||!t||t.startsWith("@media")||t.startsWith("@supports")?!1:t.split(",").every(e=>ev.test(e.trim()))}function nv(t,e,r){let n=JSON.stringify(e),o=t.indexOf(":hover")!==-1||n.indexOf(":hover")!==-1,s=o&&qp(),i=(r?r+"":"")+t+n+(o&&!s?"rawhover":""),a=rn.get(i);if(a){let x=zp.get(a);if(x)for(let b=0;b<x.length;b++)ce(x[b]);return a}a=r?`_${r}_c${fl(i)}`:`_c${fl(i)}`;let c=`.${a}`,l=rv(t)?`.${a}.${a}`:c,f="",u=[],d=x=>typeof x=="string"&&(x.indexOf("{")!==-1||x.indexOf("}")!==-1),h=(x,b)=>{let y="";for(let _ in b){let k=b[_];if(k!=null)if(typeof k=="object")h([...x,_],k);else{if(d(k))continue;y+=Xn(nn(_),k)}}y&&(x.length===0?f+=y:u.push({chain:x,body:y}))};h([],e);let g=x=>{let b=x.length===1?l:c;if(!x.length)return b;let y=x[0].split(",").map(_=>_.trim()).map(_=>_.includes("&")?_.replace(/&/g,b):_.startsWith(":")?`${b}${_}`:`${b} ${_}`);for(let _=1;_<x.length;_++){let k=x[_].split(",").map(R=>R.trim()),A=[];for(let R of y)for(let N of k)N.includes("&")?A.push(N.replace(/&/g,R)):N.startsWith(":")?A.push(R+N):A.push(R+" "+N);y=A}return y.join(", ")},p=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(f){let x=`${t}{${c}{${f}}}`;p.push(x),ce(x)}for(let x of u){let b=g(x.chain),y=_e(`${t}{${b}{${x.body}}}`,b,s);p.push(y),ce(y)}return zp.set(a,p),rn.set(i,a),a}let m=g([t]);if(f){let x=_e(`${m}{${f}}`,m,s);p.push(x),ce(x)}for(let x of u){let b=g([t,...x.chain]),y=_e(`${b}{${x.body}}`,b,s);p.push(y),ce(y)}return zp.set(a,p),rn.set(i,a),a}function xt(t){if(rb(),typeof t=="string"){ce(t);return}let e=qp(),r=Object.keys(t),n=o=>{let s=o.match(/max-width:\s*(\d+)/);return s?parseInt(s[1]):0};r.sort((o,s)=>{let i=o.startsWith("@media"),a=s.startsWith("@media");return!i&&!a?0:i?a?n(s)-n(o):1:-1});for(let o of r){let s=t[o];if(o.startsWith("@media")||o.startsWith("@supports"))for(let i in s){let a=s[i];if(typeof a=="object"&&a!==null){let c="";for(let l in a){let f=l.startsWith("--")?l:nn(l);c+=Xn(f,a[l])}ce(_e(`${o}{${i}{${c}}}`,i,e))}else{let c=i.startsWith("--")?i:nn(i);ce(`${o}{${Xn(c,a)}}`)}}else{let i="",a=!1;for(let c in s){let l=s[c];if(typeof l=="object"&&l!==null)a=!0;else{let f=c.startsWith("--")?c:nn(c);i+=Xn(f,l)}}if(i&&ce(_e(`${o}{${i}}`,o,e)),a){let c=[],l=[];for(let f in s)typeof s[f]=="object"&&s[f]!==null&&(f.startsWith("@media")||f.startsWith("@supports")?c.push(f):l.push(f));c.sort((f,u)=>{let d=h=>{let g=h.match(/max-width:\s*(\d+)/);return g?parseInt(g[1]):0};return d(u)-d(f)});for(let f of l)xt({[`${o} ${f}`]:s[f]});for(let f of c)xt({[f]:{[o]:s[f]}})}}}}function Jn(t,e){let r="";for(let n in e){let o="";for(let s in e[n])o+=Xn(nn(s),e[n][s]);r+=`${n}{${o}}`}return ce(`@keyframes ${t}{${r}}`),t}function nb(){rn.clear(),eb=null}function Kp(){return rn.size}O();var Dh={};I(Dh,{DELEGATED_EVENTS:()=>ro,LIFECYCLE_EVENTS:()=>wr,MIXINS:()=>dl,NON_BUBBLING_EVENTS:()=>pl,REGISTRY:()=>Lt,SVG_TAGS:()=>to,addDelegatedEvent:()=>Li,addMethods:()=>ao,applyExtends:()=>oo,cacheNode:()=>Sr,create:()=>Xt,createHTMLNode:()=>Qn,detectTag:()=>_r,dispose:()=>Ar,flushMounts:()=>zi,isSvgTag:()=>eo,isValidTag:()=>Zn,refreshContextProto:()=>yl,registerEvent:()=>no,remove:()=>io,removeDelegatedEvent:()=>Fi,update:()=>so});var Yp="http://www.w3.org/2000/svg",to=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"]),ov=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 Zn(t){return ov.has(t)||to.has(t)}function eo(t){return to.has(t)}function _r(t){let{tag:e,key:r}=t;if(typeof e=="function")try{e=e(t,t.state,t.context)}catch(s){e=void 0,typeof console<"u"&&console.error&&console.error(`[smbls] \`tag:\` factory threw on "${r||"<anon>"}" \u2014 falling back to key-based tag detection:`,s?.message||s)}if(e===!0&&(e=r),typeof e=="string"&&Zn(e))return e;if(!r||typeof r!="string")return"div";let n=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]),o=r.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),Zn(o)&&!n.has(o)?o:"div"}var ob={};function Qn(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(eo(t)){let n=e?.parent;if(t==="svg"||n?.node?.namespaceURI===Yp)return r.createElementNS(Yp,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Sr(t){let e=t.tag=_r(t),n=eo(e)&&(e==="svg"||t.parent?.node?.namespaceURI===Yp)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=ob[n];if(s||(s=ob[n]=Qn(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?Qn(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var Lt=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"]),dl={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},wr=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"]),pl=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"]),sb=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),ro=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 Xp=new WeakMap,sv={passive:!0},iv={passive:!0,capture:!0},Jp=(t,e)=>sb.has(t)?e?iv:sv:e||!1;function ab(t){let e=Xp.get(t);return e||(e={handlers:new Map,installed:new Set},Xp.set(t,e)),e}function av(t,e){let r=ab(e);if(r.installed.has(t))return;r.installed.add(t);let n=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave",o=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(o&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(c(s),s.cancelBubble)return}}i=i.parentNode}},Jp(t,n))}function Li(t,e,r,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let o=ab(n);av(t,n),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,r)}function Fi(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let n=Xp.get(r);if(!n)return;let o=n.handlers.get(t);o&&o.delete(e)}function ib(t){return ro.has(t)&&!wr.has(t)}function no(t,e,r){let{node:n,context:o}=e;if(!n)return;let s=o?.designSystem,i=c=>{s&&rt(s);try{let l=r.call(e,c,e,e.state,o);if(l&&typeof l.then=="function"){l.catch(f=>{e.error=f,console.error("[DOMQL] Async event error:",f)}).finally(()=>{s&&Q()});return}}catch(l){if(e.error=l,console.error("[DOMQL] Event error:",l),o?.strictMode)throw l}s&&Q()},a=pl.has(t);if(!a&&ib(t)){let c=o?.rootNode||n.ownerDocument?.documentElement;Li(t,n,i,c)}else n.addEventListener(t,i,Jp(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!a&&ib(t)){let c=o?.rootNode||n.ownerDocument?.documentElement;Fi(t,n,c)}else n.removeEventListener(t,i,Jp(t,!1))})}function cb(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 oo(t,e,r){let n=cb(e);if(!n.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<n.length;i++){let a=lb(n[i],s);a&&a!==e&&fb(t,a,r,new Set([e]))}}function lb(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(o=>o.trim()),n=e[r[0]]||e[`smbls.${r[0]}`];for(let o=1;o<r.length&&n;o++)n=n[r[o]];return n||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function fb(t,e,r,n=new Set){if(n.has(e))return;n.add(e);let o=cb(e);if(o.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<o.length;a++){let c=lb(o[a],i);c&&fb(t,c,r,n)}}for(let s in e){if(s==="extends"||s==="extend")continue;let i=e[s];t[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[s]={...i}:t[s]=i:typeof t[s]=="object"&&typeof i=="object"&&!Array.isArray(t[s])&&!Array.isArray(i)&&t[s]!==null&&i!==null?t[s]=ub(t[s],i):t[s]=i}}function ub(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=ub(o,s):r[n]=s}return r}Cn();O();var cv=["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"],hl={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"]},pb=["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"],vr=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()):hb(t),lv=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate"]),hb=t=>lv.has(t)?t.toLowerCase():null,fv=new Set(["draggable","contenteditable","spellcheck","autocorrect"]),Xe=t=>typeof t=="string"&&(fv.has(t)||t.startsWith("aria-")),Fe=(t,e)=>e!==!0&&e!==!1?e:Xe(t)?e?"true":"false":e===!0?"":e,Cr=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||vr(e)||hl.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(hl,t)?hl[t].includes(e):!1,th=t=>{if(!S(t))return!1;let e=t.toLowerCase();return pb.includes(e)},uv=(t,e,r)=>{let n={};for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(r&&o in r)continue;if(o==="aria"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])St(e[o][a])&&(n["aria-"+a]=e[o][a]);continue}if(o==="data"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])if(St(e[o][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());n["data-"+c]=e[o][a]}continue}let s=Cr(t,o),i=th(o);if(St(e[o])&&(s||i)){let a=vr(o)||o;n[a]=e[o]}}return n},dv=(t,e)=>{let r={};if(t.attr)for(let n in t.attr)r[n]=t.attr[n](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let n in t.aria){let o=t.aria[n];typeof o=="function"&&(r["aria-"+n]=o(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let n in t.data){let o=t.data[n];if(typeof o=="function"){let s=n.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());r["data-"+s]=o(e,e.state,e.context)}}return r},kr=(t,e)=>{let r=t.call("exec",e,t);if(r)return S(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},Zp=(t,e)=>{let r=(t.preSrc||"")+(kr(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:n}=t;if(!n.files&&!n.assets)return r;if(r.startsWith("/assets/")){let o=r.slice(8),s=n.assets&&(n.assets[r]||n.assets[o]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let o=r.slice(7),s=n.files&&(n.files[r]||n.files[o]);return s&&s.content?s.content.src:r}if(n.assets){let o=n.assets[r];if(o&&o.content)return o.content.src}if(n.files){let o=n.files[r];if(o&&o.content)return o.content.src}return r},Qp={src:t=>Zp(t,t.src),href:t=>kr(t,t.href),action:t=>kr(t,t.action),poster:t=>Zp(t,t.poster),data:t=>kr(t,t.data)},eh=t=>{let e=t.tag||"div",r={};for(let n in Qp)if(t[n]!==void 0&&Cr(e,n)){let o=Qp[n](t);o!==void 0&&(r[n]=o)}return r},db=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return E(r)?r.call(e,e):!!r},pv=(t,e,r)=>{if(t==="$"){let o=db(e,r);return o===void 0&&(o=!!r[e]),o}let n=r[e]===!0||r.state[e];if(!n){let o=db(e,r);o!==void 0&&(n=o)}return t==="."?!!n:!n},hv=new Set(["$",".","!"]),gv=(t,e,r)=>{let n={},o=(s,i,a,c)=>{let l=i;n[s]=f=>{if(pv(a,c,f))return E(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!hv.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])o("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());o("data-"+g,a[l][h],i,c)}continue}let f=Cr(e,l),u=th(l);if(!f&&!u)continue;let d=vr(l)||l;o(d,a[l],i,c)}}return n};function so(t={},e={}){let r=this,n=r.__ref;if(!n)return;if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof r.onBeforeUpdate=="function"&&rh(n))try{let s=r.onBeforeUpdate(r,r.state,r.context,e);if(s&&typeof s.then=="function")s.then(()=>Je(n,!1),i=>{Je(n,!0),r.context?.plugins?.length&&vt("error",r,{hook:"onBeforeUpdate",error:i})||console.error("[DOMQL] onBeforeUpdate error:",i)});else if(Je(n,!1),s===!1)return r}catch(s){throw Je(n,!0),s}let o=!t||Object.keys(t).length===0;if(Ne(()=>{if(t.state&&dt(r.state)&&r.state.$update(t.state),t.text!==void 0&&(r.text=t.text,!n.__exec.text&&r.node&&(r.tag==="string"?r.node.nodeValue=t.text??"":r.node.textContent=t.text??"")),t.html!==void 0&&(r.html=t.html,!n.__exec.html&&r.node&&(r.node.innerHTML=t.html)),t.style&&r.node?.style){if(!n.__exec.style)for(let 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&&!Xe(s)?r.node.removeAttribute(s):typeof i!="function"&&typeof i!="object"&&r.node.setAttribute(s,Fe(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(Lt.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&&Xt(i,r,s,e)}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 vt("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}function Ar(t){if(!t)return;let e=t.__ref;if(!e)return;try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(n){console.error("[smbls] onBeforeRemove error:",n)}if(e.__effects){for(let n=0;n<e.__effects.length;n++)e.__effects[n].dispose();e.__effects.length=0}if(e.__eventCleanup){for(let n=0;n<e.__eventCleanup.length;n++)e.__eventCleanup[n]();e.__eventCleanup.length=0}if(e.__children){for(let n=0;n<e.__children.length;n++){let o=e.__children[n],s=t[o];s&&s.__ref&&Ar(s)}e.__children.length=0}t.node?.parentNode?t.node.remove():t.tag==="fragment"&&e.__fragmentAnchor?.parentNode&&e.__fragmentAnchor.remove();let r=t.state?.$destroy||t.state?.destroy;if(typeof r=="function"&&t.state.__element===t&&r.call(t.state),t.parent?.__ref?.__children){let n=t.parent.__ref.__children.indexOf(t.key);n!==-1&&t.parent.__ref.__children.splice(n,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(n){console.error("[smbls] onRemove error:",n)}t.node=null,t.parent=null,t.__ref=null}function io(){Ar(this)}O();O();O();var mv=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],yv=["none","forwards","backwards","both"],bv=["normal","reverse","alternate","alternate-reverse"],xv=["running","paused"],_v=t=>/^[\d.]+m?s$/.test(t),Sv=0,gb=new Map,nh=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(w(t)){let o=JSON.stringify(t),s=gb.get(o);if(s)return s;let i=`smbls-anim-${Sv++}`,a=Jn(i,t);return gb.set(o,a),a}let n=r&&r[t];return w(n)?Jn(t,n):t},wv=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},n=t.split(/\s+/),o=null,s=[],i=null,a=null,c=null,l=null,f=null;for(let u of n)r&&r[u]?o=u:_v(u)?s.push(u):mv.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):bv.includes(u)?c=u:yv.includes(u)?l=u:xv.includes(u)?f=u:o||(o=u);return{name:o,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},oh={animation:(t,e)=>{if(S(t)&&t.includes(" ")){let r=wv(t,e);return{animationName:nh(r.name||t,e),animationDuration:r.durations[0]||Yt(e.animationDuration||"A").timing,animationDelay:r.durations[1]||Yt(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||ae(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||"both",animationIterationCount:r.iterationCount!=null?r.iterationCount:e.animationIterationCount||1,animationPlayState:r.playState||e.animationPlayState,animationDirection:r.direction||e.animationDirection}}return{animationName:nh(t,e),animationDuration:Yt(e.animationDuration||"A").timing,animationDelay:Yt(e.animationDelay||"0s").timing,animationTimingFunction:ae(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||"both",animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:nh(t,e)}),animationDuration:t=>({animationDuration:Yt(t).timing}),animationDelay:t=>({animationDelay:Yt(t).timing}),animationTimingFunction:t=>({animationTimingFunction:ae(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};O();var sh={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>M("height",t,e),width:(t,e)=>M("width",t,e),boxSizing:t=>At(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...gt("height",e),...gt("width",r||e)}},inlineSize:(t,e)=>M("inlineSize",t,e),blockSize:(t,e)=>M("blockSize",t,e),minWidth:(t,e)=>M("minWidth",t,e),maxWidth:(t,e)=>M("maxWidth",t,e),widthRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...gt("minWidth",e),...gt("maxWidth",r||e)}},minHeight:(t,e)=>M("minHeight",t,e),maxHeight:(t,e)=>M("maxHeight",t,e),heightRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...gt("minHeight",e),...gt("maxHeight",r||e)}},size:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...M("inlineSize",e),...M("blockSize",r||e)}},minBlockSize:(t,e)=>M("minBlockSize",t,e),minInlineSize:(t,e)=>M("minInlineSize",t,e),maxBlockSize:(t,e)=>M("maxBlockSize",t,e),maxInlineSize:(t,e)=>M("maxInlineSize",t,e),minSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...gt("minInlineSize",e),...gt("minBlockSize",r||e)}},maxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...gt("maxInlineSize",e),...gt("maxBlockSize",r||e)}},borderWidth:(t,e)=>M("borderWidth",t,e),borderTopWidth:(t,e)=>M("borderTopWidth",t,e),borderRightWidth:(t,e)=>M("borderRightWidth",t,e),borderBottomWidth:(t,e)=>M("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>M("borderLeftWidth",t,e),padding:(t,e)=>M("padding",t,e),scrollPadding:(t,e)=>M("scrollPadding",t,e),paddingInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...gt("paddingInlineStart",e),...gt("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...gt("paddingBlockStart",e),...gt("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>M("paddingBlockStart",t,e),paddingBottom:(t,e)=>M("paddingBlockEnd",t,e),paddingLeft:(t,e)=>M("paddingInlineStart",t,e),paddingRight:(t,e)=>M("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>M("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>M("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>M("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>M("paddingInlineEnd",t,e),margin:(t,e)=>M("margin",t,e),marginInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...gt("marginInlineStart",e),...gt("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!S(e.marginBlock))return;let[r,n]=e.marginBlock.split(" ");return{...gt("marginBlockStart",r),...gt("marginBlockEnd",n||r)}},marginTop:(t,e)=>M("marginBlockStart",t,e),marginBottom:(t,e)=>M("marginBlockEnd",t,e),marginLeft:(t,e)=>M("marginInlineStart",t,e),marginRight:(t,e)=>M("marginInlineEnd",t,e),marginInlineStart:(t,e)=>M("marginInlineStart",t,e),marginInlineEnd:(t,e)=>M("marginInlineEnd",t,e),marginBlockStart:(t,e)=>M("marginBlockStart",t,e),marginBlockEnd:(t,e)=>M("marginBlockEnd",t,e),gap:t=>({gap:il(t)}),columnGap:(t,e)=>xe(e,"columnGap",t),rowGap:(t,e)=>xe(e,"rowGap",t),flexWrap:t=>({display:"flex",flexWrap:t}),flexFlow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},flexAlign:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>Ye(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>Ye(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>Ye(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>Ye(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>Ye(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>Ye(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var ih={fontSize:t=>xi(t)||t,fontFamily:t=>({fontFamily:yi(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 ah={overflow:t=>({overflow:t}),cursor:(t,e,r,n)=>{if(!t)return;let o=n.assets&&n.assets[t];if(o&&o.content)t=`url(${o.content.src})`;else{let s=n.files&&n.files[t];s&&s.content&&(t=`url(${s.content.src})`)}return{cursor:t}},opacity:t=>t!=null?{opacity:String(t)}:void 0,visibility:t=>t!=null?{visibility:t}:void 0,pointerEvents:t=>t!=null?{pointerEvents:t}:void 0};var ch={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]}}};O();var ue=({context:t,state:e})=>{let r=e?.root?.globalTheme||t.designSystem?.globalTheme;return r==="auto"?null:r},fe=(t,e)=>{if(e==null||e==="")return;if(!w(e))return{[t]:e};let r={},n=!1;for(let o in e){let s=e[o];s==null||s===""||w(s)||(r[o]={[t]:s},n=!0)}return n?r:void 0},lh={theme:(t,e)=>{if(t)return e.themeModifier?ie(t,`@${e.themeModifier}`):ie(t)},color:(t,e)=>{let r=ue(e);if(t)return fe("color",Ot(t,r))},background:(t,e)=>{let r=ue(e);if(t)return S(t)&&t.includes("gradient")&&t.includes("(")?{background:$i(t,r)}:fe("background",Ot(t,r))},backgroundColor:(t,e)=>{let r=ue(e);if(t)return fe("backgroundColor",Ot(t,r))},backgroundImage:(t,e,r,n)=>{let o=ue(e);if(!t)return;let s=n.assets&&n.assets[t];if(s&&s.content)t=s.content.src;else{let i=n.files&&n.files[t];i&&i.content&&(t=i.content.src)}return fe("backgroundImage",sl(t,o))},textStroke:t=>({WebkitTextStroke:nl(t)}),outline:t=>({outline:Le(t)}),outlineOffset:(t,e)=>M("outlineOffset",t,e),border:t=>({border:Le(t)}),borderColor:(t,e)=>{let r=ue(e);if(t)return fe("borderColor",Ot(t,r))},borderTopColor:(t,e)=>{let r=ue(e);if(t)return fe("borderTopColor",Ot(t,r))},borderBottomColor:(t,e)=>{let r=ue(e);if(t)return fe("borderBottomColor",Ot(t,r))},borderLeftColor:(t,e)=>{let r=ue(e);if(t)return fe("borderLeftColor",Ot(t,r))},borderRightColor:(t,e)=>{let r=ue(e);if(t)return fe("borderRightColor",Ot(t,r))},borderLeft:t=>({borderLeft:Le(t)}),borderTop:t=>({borderTop:Le(t)}),borderRight:t=>({borderRight:Le(t)}),borderBottom:t=>({borderBottom:Le(t)}),shadow:(t,e)=>{let r=ue(e);if(t)return fe("boxShadow",ol(t,r))},boxShadow:(t,e)=>{if(!S(t))return;let[r,n]=t.split("!importan"),o=ue(e),s=n?" !important":"",i=Pi(r.trim(),o);return S(i)?{boxShadow:i+s}:fe("boxShadow",i)},textShadow:(t,{context:e})=>fe("textShadow",Pi(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:Le(t)})};var Mi={transition:t=>({transition:al(t)}),transitionDuration:t=>({transitionDuration:Ii(t)}),transitionDelay:t=>({transitionDelay:Ii(t)}),transitionTimingFunction:t=>({transitionTimingFunction:ae(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};O();var fh={flow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},wrap:(t,e)=>({display:"flex",flexWrap:t}),align:(t,e)=>{let[r,n]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:n}}};var uh={area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:t}),templateColumns:t=>({gridTemplateColumns:t}),autoColumns:t=>({gridAutoColumns:t}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:t}),templateRows:t=>({gridTemplateRows:t}),autoRows:t=>({gridAutoRows:t}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var mt={...oh,...sh,...ih,...ah,...ch,...lh,...Mi,...fh,...uh};var kt=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction","appearance","aspectRatio","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundRepeatX","backgroundRepeatY","backgroundSize","baselineShift","blockSize","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxDecorationBreak","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caretColor","clear","clip","clipPath","color","colorAdjust","colorInterpolation","colorInterpolationFilters","colorRendering","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","content","counterIncrement","counterReset","cursor","direction","display","emptyCells","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantNumeric","fontVariantPosition","fontWeight","fontVariationSettings","fontSynthesis","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","hyphens","imageOrientation","imageRendering","imeMode","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","initialLetter","isolation","justifyContent","justifyItems","justifySelf","left","letterSpacing","lineBreak","lineClamp","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","marginBlock","marginBlockEnd","marginBlockStart","marginInline","marginInlineEnd","marginInlineStart","mask","maskBorder","maskBorderImage","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","maxBlockSize","maxHeight","maxInlineSize","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","objectFit","objectPosition","objectViewBox","offset","offsetDistance","offsetPath","offsetRotate","opacity","order","orientation","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowClip","overflowScrolling","overflowWrap","overflowX","overflowY","overscrollBehavior","overscrollBehaviorX","overscrollBehaviorY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollPadding","scrollSnapAlign","scrollSnapType","scrollbarColor","scrollbarGutter","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","top","touchAction","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);O();var kv=/^-?[A-Z][0-9]?$/,vv=/^[a-z][0-9]?$/,mb=/var\(\s*(--[A-Za-z0-9-]+)/g,Cv=t=>{let e=new Set,r=new Set;if(!t||typeof t!="object")return{knownLetters:e,knownVars:r};for(let n in t){let o=t[n];if(!(!o||typeof o!="object")){if(o.sequence&&typeof o.sequence=="object")for(let s in o.sequence)e.add(s);if(o.vars&&typeof o.vars=="object")for(let s in o.vars)r.add(s)}}return{knownLetters:e,knownVars:r}},Av=(t,e)=>{if(!e.size)return[];let r=t.split(/[(),\s]+/).filter(Boolean),n=new Set;for(let o of r){if(!kv.test(o))continue;let s=o.charCodeAt(0)===45?o.slice(1):o;e.has(s)&&n.add(o)}return[...n]},Ev=(t,e)=>{if(!e.size)return[];let r=[];mb.lastIndex=0;let n;for(;n=mb.exec(t);){let o=n[1];if(e.has(o))continue;let s=o.lastIndexOf("-");if(s===-1)continue;let i=o.slice(s+1);if(!vv.test(i))continue;let a=o.slice(0,s+1)+i.toUpperCase();a!==o&&e.has(a)&&r.push({varName:o,corrected:a})}return r},gl=new Set,yb=(t,e,r)=>{if(!Vt()||!S(e)||!e)return;let n;try{n=C()}catch{return}let{knownLetters:o,knownVars:s}=Cv(n);if(!o.size&&!s.size)return;let i=Av(e,o),a=Ev(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}`;gl.has(f)||(gl.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}`;gl.has(u)||(gl.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}"`))}};O();var Tv=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,Ov=(t,e,r)=>{let{context:n}=r;if(!n.designSystem?.media)return;let o=t.slice(1),s=n.designSystem.media[o],i=Jt(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(Tv),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},bb=(t,e,r)=>({[t]:Jt(e,r)}),Ni=(t,e,r)=>{let n=`&${t}`,o=Jt(e,r);if(t.includes(",")&&o){let s={},i={};for(let a in o)typeof o[a]=="object"&&o[a]!==null?i[a]=o[a]:s[a]=o[a];if(Object.keys(i).length){let a=n.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[n]=s);for(let l in i){let f=a.map(u=>`${u} ${l}`).join(", ");c[f]=i[l]}return c}}return{[n]:o}},dh=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return E(r)?r.call(e,e):!!r},Rv=(t,e,r)=>{let n=t.slice(1),o=dh(n,r);if(o===void 0&&(o=!!r[n]),!!o)return Jt(e,r)},Pv=(t,e,r)=>({[t]:e}),$v=(t,e,r)=>{let n=t.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=dh(n,r);s!==void 0&&(o=s)}if(o)return Jt(e,r)},Iv=(t,e,r)=>{let n=t.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=dh(n,r);s!==void 0&&(o=s)}if(!o)return Jt(e,r)},ph=(t,e)=>Jt(t,e),hh={"@":Ov,":":Ni,"[":Ni,"*":Ni,"+":Ni,"~":Ni,"&":bb,">":bb,$:Rv,"-":Pv,".":$v,"!":Iv};var ml=ar(),xb=(t,e,r)=>{let n=e?.context?.designSystem;n&&rt(n);try{let o={},s={},i=(a,c)=>{if(r.unpack){o={...o,...c};return}o[a]=c};for(let a in t){let c=t[a];if(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)=>pt(d,f[h]),{});o.designSystemClass=u}}else if(a==="true"){let l=it(c,e);pt(o,ph(l,e))}else if(e.classlist[a]){let l=e.classlist[a],f=E(l)?l(e,e.state,e.context):l;f&&i(a,f),!ml&&w(o[a])&&(o[a].label=a)}else if(mt[a]){let l=it(c,e);T(l)&&(l=l.reduce((u,d)=>pt(u,d),{}));let f=mt[a](l,e,e.state,e.context);T(f)&&(f=f.reduce((u,d)=>pt(u,d),{})),f&&i(a,f),!ml&&w(o[a])&&(o[a].label=a)}else if(kt.has(a)){let l=it(c,e);typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),ml||yb(a,l,e),i(a,{[a]:l}),!ml&&w(o[a])&&(o[a].label=a)}else s[a]=c}return[o,s]}finally{n&&Q()}},_b=(t,e)=>{let r={};for(let n in t){let o=hh[n.slice(0,1)];if(o){let s=o(n,t[n],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]&&typeof r[i]=="object"&&typeof s[i]=="object"?Bt(r[i],s[i]):r[i]=s[i])}}return r},Jt=(t,e,r={unpack:!0})=>{let[n,o]=xb(t,e,r),s=_b(o,e),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return Jo(n,s);n._selectors=s}return n},Dv=(t,e)=>{let r={};if(t.class)for(let n in t.class)r[n]=t.class[n](e);return r};O();var Sb=t=>{if(w(t))return Jt(t,t)},Lv=(t,e)=>{let r=Sb(t);return typeof e=="function"?e(r):le(r)};O();function mh(t,e,r){let n=t?.context?.analyze;if(!n||!n.emit||e==="warn"&&!n.shouldCapture("warnings")||e==="error"&&!n.shouldCapture("errors"))return;let o=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");n.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:e==="error"?"error":"warning",level:e,hook:e==="error"?"el.error":"el.warn",element:{key:t.key!=null?String(t.key):null,name:t.__name||null,tag:t.tag||null},message:o||null,args:r})}var wb=new Set;function Fv(t,e,r){let n=String(e);if(wb.has(n))return;wb.add(n);let o=t?.__ref?.path,s=Array.isArray(o)&&o.length?o.join("."):t?.key!=null?String(t.key):"(unknown element)",i=r!=null?`resolves to a non-function (${typeof r}) \u2014 it cannot be called`:"is not registered in context.methods, context.functions, or context.utils, and is not an element method",a=`[smbls] el.call('${n}') at <${s}>: "${n}" ${i}. Returning undefined (unchanged behavior) \u2014 check the name for typos or register the function on the project. Warned once per name; repeat misses are silent.`;mh(t,"error",[a]),console.error(a)}function Mv(...t){return mh(this,"warn",t),Ls.apply(this,t)}function Nv(...t){return mh(this,"error",t),qr.apply(this,t)}var kb={update:so,remove:io,getDB:js,getQuery:Bs,getRootData:$s,getChildren:Es,getPath:Ts,nextElement:Fs,previousElement:Ms,verbose:Rn,warn:Mv,error:Nv,variables:Ns,spotByPath:As,set(t,e){let r=this.__ref;if(r){if(r.__setLocked){r.__setQueued={content:t,options:e};return}r.__setLocked=!0}try{if(this.removeContent(),t!=null){let n=this.context?.__create;n&&n(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(r){r.__setLocked=!1;let n=r.__setQueued;n&&(r.__setQueued=null,this.set(n.content,n.options))}}},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,n=this.key,o=this.parse();return this.remove(),e(o,r,n,t)},lookup(t){let e=this.parent;for(;e;){if(typeof t=="function"){if(t(e))return e}else if(typeof t=="string"){if(e.key===t)return e;if(e[t]&&e[t].__ref)return e[t]}e=e.parent}return null},lookdown(t){let e=this.__ref;if(!e?.__children)return null;for(let r of e.__children){let n=this[r];if(!n)continue;if(typeof t=="function"){if(t(n))return n}else if(typeof t=="string"&&n.key===t)return n;let o=n.lookdown?.(t);if(o)return o}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let n of r.__children){let o=this[n];o&&(typeof t=="function"?t(o)&&e.push(o):typeof t=="string"&&o.key===t&&e.push(o),o.lookdownAll?.(t,e))}return e},getRef(){return this.__ref},getRoot:Ps,getRootState:Rs,getRootContext:Is,getContext:Ds,parse(t){let e={},r=t?new Set(t):null,n=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!r?.has(o)){if(n&&n[o]!==void 0){e[o]=n[o];continue}typeof this[o]!="function"&&(e[o]=this[o])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let n of r.__children)this[n]?.parseDeep&&(e[n]=this[n].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let r of t)e[r]=this[r];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(let e in t){let r=t[e];if(r==null)continue;let n=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(n,o,"important")}},call(t,...e){let r=this.context,n=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof n=="function")return n.call(this,...e);Vt()&&Fv(this,t,n)},removeContent(){let t=this.__ref;if(!t?.__children)return;let e=this.content;if(e?.remove){e.remove(),delete this.content;let r=t.__children.indexOf("content");r!==-1&&t.__children.splice(r,1)}e?.node?.parentNode&&e.node.parentNode.removeChild(e.node)}},gh=new WeakMap;function jv(t){if(!t)return kb;let e=gh.get(t);if(e)return e;e=Object.create(kb);let r=t.methods;if(r)for(let n in r)e[n]=r[n];return gh.set(t,e),e}function ao(t){let e=jv(t.context);Object.setPrototypeOf(t,e)}function yl(t){if(!t)return!1;let e=gh.get(t);if(!e)return!1;let r=t.methods;if(!r)return!1;for(let n in r)e[n]=r[n];return!0}O();Cn();var Sh={};I(Sh,{STATE_METHODS:()=>vb,applyInitialState:()=>xl,applyStateMethods:()=>Zt,callStateMethod:()=>ji,createState:()=>bh,isTracking:()=>_h,useHostState:()=>xh});var vb=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"]),bl=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},Se=(t,e,r,{onlyIfAbsent:n}={})=>{bl(t,"$"+e,r),!(n&&Object.prototype.hasOwnProperty.call(t,e))&&bl(t,e,r)},ji=(t,e,...r)=>{if(!t)return;let n=t["$"+e];if(typeof n=="function")return n.apply(t,r);let o=t[e];if(typeof o=="function")return o.apply(t,r)},Zt=(t,e)=>{if(dt(e)){let o=e.__raw||e;Se(o,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),Se(o,"set",function(s,i={}){return e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,i),e},{onlyIfAbsent:!0}),Se(o,"setByPath",function(s,i,a={}){let c=s.split("."),l=e;for(let f=0;f<c.length-1;f++)l[c[f]]===void 0&&(l[c[f]]={}),l=l[c[f]];return l[c[c.length-1]]=i,e}),Se(o,"getByPath",function(s){let i=s.split("."),a=e;for(let c=0;c<i.length;c++){if(a==null)return;a=a[i[c]]}return a}),Se(o,"removeByPath",function(s,i={}){let a=s.split("."),c=e;for(let l=0;l<a.length-1;l++){if(c==null)return e;c=c[a[l]]}return c&&delete c[a[a.length-1]],e}),Se(o,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),Se(o,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),Se(o,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),Se(o,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&dt(a.parent);)a=a.parent;return ji(a,"update",s,i)}),Se(o,"parentUpdate",function(s,i={}){if(e.parent)return ji(e.parent,"update",s,i)}),Se(o,"quietReplace",function(s,i={}){return e.$replace(s,{quiet:!0,...i})}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=e,i=dt(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,dt(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o]},n={update(o){if(!o||typeof o!="object")return e;for(let s in o)e[s]=o[s];return e},apply(o){if(typeof o!="function")return e;let s=o(e);return s?e.$update(s):e},parse(){return{...e}},toggle(o){return e[o]=!e[o],e},set(o){if(!o||typeof o!="object")return e;r();for(let s in o)e[s]=o[s];return e},replace(o){return e.$set(o)},clean(){return r(),e}};for(let o in n)if(bl(e,"$"+o,n[o]),typeof e[o]!="function"){if(Object.prototype.hasOwnProperty.call(e,o)){Fr(o,"");continue}bl(e,o,n[o])}};var bh=function(t,e,r){return t.state=xl(t,e,r),t.state},xl=function(t,e,r){let{__ref:n}=t,o=t.state;if(o==null||o===!1){let s=e?.state||{};return Zt(t,s),s}if(typeof o=="string")return n&&(n.__state=o),n.__stateType="string",Bv(o,t,e);if(typeof o=="number"||typeof o=="boolean"){n&&(n.__state=o,n.__stateType=typeof o,n.__hasRootState=!0);let s=Gt({value:o});return s.__element=t,e?.state&&(s.parent=e.state),Zt(t,s),s}if(typeof o=="function"&&(o=o(t,e?.state)||{}),typeof o=="object"&&!dt(o)){n&&(n.__hasRootState=!0),o.isRootState&&n&&(n.__hasRootState=!0);let s=Gt({...o});if(s.__element=t,!Object.getOwnPropertyDescriptor(s,"root")){let i=e?.state?.root||e?.state||s;Object.defineProperty(s,"root",{get:()=>i,enumerable:!1,configurable:!0})}return e?.state&&(s.parent=e.state,e.state.__children&&(e.state.__children[t.key]=s)),Zt(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,r),s}return dt(o)?(o.__element=t,o):e?.state||{}};function yh(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function Bv(t,e,r){if(!r?.state)return{};if(t===".")return r.state;if(t.startsWith("../")){let o=t.slice(3),s=r.state?.parent;return o&&s?yh(s,o):s??r.state??{}}if(t.startsWith("~/")){let o=r.state;for(;o?.parent;)o=o.parent;let s=t.slice(2);return s?yh(o,s):o??{}}let n=yh(r.state,t);if(n&&typeof n=="object"&&!dt(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 xh=(t,e)=>{if(!t)return Ab;let r=Uv(t,e);return!r||!r.state?Ab:Wv(r.state)},_h=()=>Dr()!=null,Vv=128;function Uv(t,e){let r=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,n=t,o=null;for(let s=0;s<Vv&&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 zv={get(t,e){return t[e]}},Cb=new WeakMap,Wv=t=>{let e=Cb.get(t);return e||(e=new Proxy(t,zv),Cb.set(t,e)),e},Ab=new Proxy(Object.create(null),{get(){},has(){return!1}});var Hv=1,Vi=[],Ch=!1;function Eb(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function qv(){return typeof document<"u"&&document.visibilityState==="hidden"}var Kv=250;function $b(){if(!Ch){if(Ch=!0,typeof requestAnimationFrame!="function"){setTimeout(zi,0);return}qv()?setTimeout(zi,Kv):requestAnimationFrame(zi)}}var Gv=300,Yv=15e4;function zi(){if(Ch=!1,!Vi.length)return;let t=Vi.splice(0,Vi.length);for(let e=0;e<t.length;e++){let r=t[e];if(r.node){if(!r.node.isConnected){let n=r.__ref||(r.__ref={});n.__mountAttempts=(n.__mountAttempts||0)+1,n.__mountFirstAttemptAt==null&&(n.__mountFirstAttemptAt=Eb());let o=Eb()-n.__mountFirstAttemptAt;n.__mountAttempts<=Gv&&o<Yv?(Vi.push(r),$b()):console.warn("[DOMQL] onMounted dropped after",n.__mountAttempts,"attempts /",o,"ms \u2014 node never connected:",r.key||r.tag||r);continue}Ze("Mounted",r,r.__ref?.__mountOptions||{})}}}function Ib(t,e){typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,Vi.push(t),$b())}function Tb(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&vt("contentUpdate",t,e);let r=t.context?.designSystem;r&&rt(r);try{t.onContentUpdate(t,t.state,t.context,e)}catch(n){if(t.context?.plugins?.length&&vt("error",t,{hook:"onContentUpdate",error:n})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',n),t.context?.strictMode)throw n}finally{r&&Q()}}function lo(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function Xv(t){return t.charAt(2).toLowerCase()+t.slice(3)}function Jv(t){return t.toLowerCase()}function Ah(t){let e=t.charCodeAt(0);return e===58||e===64||e===38}function Ui(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Ui(o,s):r[n]=s}return r}function Xt(t,e,r,n={},o){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||`_${Hv++}`,s.parent=e||null,s.context=t.context||e?.context||n.context||{},s.context.__create||(s.context.__create=Xt);let i=s.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||s,path:e?.__ref?.path?[...e.__ref.path,s.key]:[s.key],origin:t};if(r&&!t.extends&&!t.extend){let p=r.indexOf("_");if(p>0){let m=r.substring(0,p),x=s.context?.components;x&&(x[m]||x["smbls."+m])?t={...t,extends:m}:x&&Vt()&&/^[A-Z]\w*_\d+$/.test(r)&&console.warn(`[smbls] auto-extend: key "${r}" looks like a multi-instance (${m}_N) but neither "${m}" nor "smbls.${m}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}oo(s,t,n);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],x=s[p],b=x&&m&&typeof x=="object"&&typeof m=="object"&&!Array.isArray(x)&&!Array.isArray(m)&&typeof x!="function"&&typeof m!="function";b&&p.charCodeAt(0)>=65&&p.charCodeAt(0)<=90?s[p]=Ui(x,m):b&&a.has(p)?s[p]={...x,...m}:b&&Ah(p)?s[p]=Ui(x,m):s[p]=m}function l(p){for(let m in p){let x=p[m],b=s[m],y=b&&x&&typeof b=="object"&&typeof x=="object"&&!Array.isArray(b)&&!Array.isArray(x)&&typeof b!="function"&&typeof x!="function";y&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?s[m]=Ui(b,x):y&&a.has(m)?s[m]={...b,...x}:y&&Ah(m)?s[m]=Ui(b,x):s[m]=x}}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=Do(p,h)}else h&&(s.scope=h);if(t.if!==void 0&&(s.if=t.if),ao(s),Zv(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 x=s.key||s.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${x} \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"&&Fb(s,i,s.if),s;s.tag||(s.tag=_r(s)),Ze("Init",s,n);let g=s.node=Sr(s);if(!g)return s;if(s.tag==="fragment"){let m=(s.context?.document||globalThis.document).createComment("");g.appendChild(m),i.__fragmentAnchor=m}Ze("AttachNode",s,n),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),Bb(s,n),Lb(s),Eh(s),Nb(s),dC(s);try{Vb(s,n)}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?`
|
|
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};`:""}
|
|
39
|
+
src: ${i};`},wr=(t,e,r,o)=>`@font-face {${Ei(t,e,r,o)}
|
|
40
|
+
}`,io=(t,e,r)=>Object.keys(e).map(n=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l}=e[n],f=Array.isArray(s)?s.map(u=>fe(u,r)||u):fe(s,r)||s;return Ei(t,f,i,{fontStyle:a,fontDisplay:c,fontStretch:l})}),ah=t=>Object.keys(t).map(r=>io(r,t[r].value)),vl=(t,e,r)=>{if(e&&e.isVariable){let s=fe(e.url,r)||e.url;return on(s)?nn(s):wr(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap"})}if(e[0])return io(t,e,r).map(kl);let n=Array.isArray(e.url)?e.url.map(s=>fe(s,r)||s):fe(e.url,r)||e.url;return wr(t,n,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch})},Ai=(t,e)=>Object.keys(t).map(o=>vl(o,t[o].value,e));R();R();R();R();var sn={};P(sn,{animation:()=>vh,breakpoints:()=>Sh,class:()=>Oh,color:()=>gh,devices:()=>kh,document:()=>f_,font:()=>lh,fontFace:()=>dh,fontFamily:()=>fh,fontFamilyTypes:()=>uh,gradient:()=>mh,grid:()=>Th,icons:()=>_h,media:()=>ph,reset:()=>u_,semanticIcons:()=>xh,sequence:()=>Qe,shadow:()=>bh,shape:()=>Ih,sizes:()=>Ph,spacing:()=>hh,svg:()=>Ch,svgData:()=>Eh,templates:()=>Ah,theme:()=>yh,timing:()=>wh,typography:()=>Ti,unit:()=>ch,vars:()=>Rh});var Qe={"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 ch={default:"em"};var AE={browserDefault:16,base:16,type:"font-size",ratio:Qe["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},Ti=AE;var lh={};var fh={},uh={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},dh={};var ph={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var TE={base:Ti.base,type:"spacing",ratio:Qe.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},hh=TE;var gh={},mh={};var yh={};var bh={};var _h={},xh={};var OE={default:150,base:150,type:"timing",ratio:Qe["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},wh=OE;var f_={};var Sh={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},kh={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 vh={};var Ch={},Eh={};var Ah={};var RE={},Th=RE;var Oh={};var u_={},Rh={},Ph={},Ih={};var Tl={},Ol={},Cl=sn,El={},Ri=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in Cl){let e=t.toLowerCase();El[e]=Cl[t];let r=Ri(e);r!==e&&(El[r]=Cl[t]),e!==t&&(El[t]=Cl[t])}var ao={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:Tl,cssMediaVars:Ol,CSS_VARS:Tl,CSS_MEDIA_VARS:Ol,_scratchConfig:!0,...El},an=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return mt(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let r=mt(e)?e:t.globalTheme,o=as(mt(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},d_=t=>t?an(t):null,cn=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return mt(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let r=mt(e)?e:t.resolvedTheme,o=as(mt(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},p_=t=>t?cn(t):null;an(ao);cn(ao);var Al=ut(ao),ue={active:"0",0:ao},h_=t=>(mt(t)&&(ue.active=t),ue[t||ue.active]),Oi=[],st=t=>{t&&t._scratchConfig&&Oi.push(t)},rt=()=>{Oi.pop()},E=t=>Oi.length?Oi[Oi.length-1]:ue[t||ue.active]||ao,Rl=t=>{if(S(t))return ue.active="1",ue[1]=nt(t,ut(Al)),an(ue[1]),cn(ue[1]),t},PE=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],IE=["useVariable","globalTheme","verbose"],DE=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],$E=t=>{for(let e of DE){let r;for(let o of e){let n=t[o];S(n)&&(r=r?nt(n,r):n)}if(r)for(let o of e)S(t[o])&&(t[o]=r)}},Pi=(t,e,{cleanBase:r=!1}={})=>{let o=r?null:E(),n=ut(!r&&o&&o._scratchConfig?o:Al);for(let i of PE)delete n[i];for(let i of IE)Object.prototype.hasOwnProperty.call(Al,i)?n[i]=Al[i]:delete n[i];let s=nt(e||{},n);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s._scratchConfig=!0,$E(s),an(s),cn(s),t&&(ue[t]=s),s};var Ue={"-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"},Dh=(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=g_.has(e.unit)?"rem":e.unit;e.vars[o]=s+c},tr=t=>{if(!t.includes("("))return t;let e=t.split("(")[0],r=t.slice(t.indexOf("(")+1,t.lastIndexOf(")"));return[e,r]},g_=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Ii=(t,e)=>{let{base:r,type:o,unit:n}=e,s=g_.has(n)?"rem":n,i=(Wr(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=Ue[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=Ue[t+1],u=Math.abs(t),d=Math.pow(m_,2*u),h=Ue[u];return h?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${h}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},Pl=(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}))`},Di=(t,e)=>{let o=(t*e-t)/1.618,n=t*e-o,s=t+o,i=(n+s)/2;return[n,i,s]},$i=(t,e)=>Di(t,e).map(r=>r/t),Li=(t,e)=>{let{key:r,base:o,value:n,ratio:s,variable:i,index:a}=t,l=~~(n*s)-~~n,f,[u,d,h]=Di(n,s);l>16?f=[u,d,h]:f=[u,h],f.forEach((g,p)=>{let m=~~(g/o*1e3)/1e3,_=i+(p+1),b=a+(p+1)/10,y=Pl(p+1,f,i,e),x={key:r+(p+1),variable:_,value:g,scaling:m,scalingVariable:y,index:b};Dh(x,e)})},m_=1.618,LE=(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(m_,2*o);return Math.max(n,s)},Kt=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=Ue[f],d=LE(f,r,o),h=~~(d/r*100)/100,g=c+u,p=Ii(f,t),m={key:u,variable:g,value:d,base:r,scaling:h,scalingVariable:p,ratio:o,index:f};Dh(m,t),s&&Li(m,t)}return t},$h=(t,e=0)=>{let{type:r,base:o,ratio:n,subSequence:s}=t,i=w(e)?e:Ue[e],a=w(e)?Object.entries(Ue).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=Ii(a,t),p={key:i,variable:h,value:l,base:o,scaling:f,scalingVariable:g,ratio:n,index:a};return Dh(p,c),s&&Li(p,c),c},Mi=(t="A",e)=>{let r=E(),{unit:o}=r;if(w(t)&&ht(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(cs(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+"-":""}${xi(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 _=y=>a.test(y)?`var(${d}${y}${m})`:y;if(p.includes("+")){let[y,x]=p.split("+"),k=`${_(y)} + ${_(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(p.includes("*")){let[y,x]=p.split("*"),k=`${_(y)} * ${_(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(p.includes("-")){let[y,x]=p.split("-"),k=`${_(y)} - ${_(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 b=n?n[p]:null;if(!b){if(console.warn("can't find",n,p),Ot())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+b.val+s:g+b.scaling+s},Il=(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:Mi(i,e)}).join("")},Ve=(t,e,r,o)=>{if(typeof t!="string")return E().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=tr(t);o=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=Il(t,r):t=Mi(t,r),{[e]:o?`${o}(${t})`:t}},Dl=(t,e)=>Ue[t-e],Fi=t=>{let{h1Matches:e,sequence:r}=t;return new Array(6).fill(null).map((o,n)=>{let s=Dl(e,n);return r[s]})};R();var Lh=(t,e)=>{let r=E(),{cssVars:o}=r;z(t.value)||(o[t.var]=t.value)},Ni=(t,e,r)=>{let o=E(),{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]=$i(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})`},y_=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),er=(t,e={})=>{let r=E(),{unit:o,timing:n,cssVars:s}=r,i=t.unit||o.default,a=y_.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||Ni(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"})`)}},Sr=(t,e,r={})=>{let o=E(),{unit:n,media:s,cssVars:i}=o,a=e.slice(1),c=t[e],l=c.unit||t.unit||n.default,f=y_.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}`]={}),Ni(p,c,r);let m=t.unit||n.default;if(f!==m&&d)for(let _ in d){let b=d[_],y=h[_]+f;p[b.variable+"_default"]=y,p[b.variable]=y}return}for(let p in d){let m=d[p],_=(Wr(f)?h[p]:d[p].val)+f;!g&&o.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]=_}};R();var __=Jr(),ln=t=>{let e=E(),r="";for(let o in t)e.__svgCache[o]||(e.__svgCache[o]=!0,r+=t[o]);return r},ME=t=>{let e=t&&(t.default||t);if(!w(e))return __&&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},{}):{}},FE=(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},b_=new Set,ji=(t,e)=>{let r=e&&e.default?e.default:e;if(!w(r))return __&&!b_.has(t)&&(b_.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=ME(e),{width:s,height:i}=n,a=n.viewBox||`0 0 ${s||24} ${i||24}`,f=FE(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=BE(f),f},NE="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",jE=new RegExp(`<(${NE})\\b([^>]*?)\\s*/>`,"g"),BE=t=>t.replace(jE,"<$1$2></$1>");var pn={};P(pn,{STANDARD_SCHEME_QUERIES:()=>$l,appendSVGSprite:()=>ea,appendSvgIconsSprite:()=>uo,applyDocument:()=>ta,applyHeadings:()=>Nl,applyReset:()=>ra,applySpacingSequence:()=>Ui,applyTimingSequence:()=>Qi,applyTypographySequence:()=>Xi,checkIfBoxSize:()=>Bi,getColor:()=>ot,getFontFamily:()=>Yi,getFontSizeByKey:()=>Ji,getMediaColor:()=>Rt,getMediaTheme:()=>pe,getSafeInk:()=>Ll,getSafeInkInfo:()=>Mh,getShadow:()=>Hi,getShapeByKey:()=>Zi,getSpacingBasedOnRatio:()=>Ee,getSpacingByKey:()=>xt,getTheme:()=>Wi,getTimingByKey:()=>te,getTimingFunction:()=>he,resolveBorderValue:()=>Qt,resolveColorRgb:()=>co,resolveShadowValue:()=>lo,runThroughMedia:()=>Fl,setAdaptiveSchemeVar:()=>Cr,setColor:()=>vr,setFont:()=>Gi,setFontFamily:()=>un,setGradient:()=>fn,setMediaTheme:()=>Ki,setSVG:()=>dn,setShadow:()=>Er,setSvgIcon:()=>fo,setTheme:()=>qi,splitSpacedValue:()=>Vi});R();var $l={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},de=new Set,UE=new Set(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"]),x_=new Set,VE=t=>{if(!t)return!1;let{color:e,gradient:r}=t;return!!(S(e)&&Object.keys(e).length||S(r)&&Object.keys(r).length)},S_=(t,e,r)=>{let o=w(e)?e.toLowerCase():"";if(!UE.has(o)||!VE(r))return t;if(!x_.has(o)){x_.add(o);let n=r&&r.name?` (design system \`${r.name}\`)`:"";console.warn(`[scratch] color \`${t}\` is a CSS named colour that is not in the palette${n}. 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.`)}},ot=(t,e,r)=>{let o=r||E();if(!w(t)){o.verbose&&console.warn(t,"- type for color is not valid");return}if(ht(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let n,s,i;if(O(t))[n,s,i]=t;else{let u=qt(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):t}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 S_(t,n,o);if(e)if(l[e]!==void 0)l=l[e];else if(O(l)){let u=e.charCodeAt(0)===64?e.slice(1):e;u==="dark"?l=l[1]!==void 0?l[1]:l[0]:(u!=="light"&&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(de.has(n))return l;de.add(n);try{return ot(l,null,r)}finally{de.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=Be(f,i),l[i]={rgb:f,var:`${l.var}-${i}`}),l[i]&&(f=l[i].rgb),s?`rgba(${f}, ${s})`:i?`rgba(${f}, 1)`:o.useVariable?`var(${l.var})`:`rgb(${f})`},w_=t=>{let e=le(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}},HE=(t,e)=>{if(!e)return t;let r=t.rgb;if(e.tone){let n=Be(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}},co=(t,e,r)=>{let o=e||E();if(!w(t))return null;let n=qt(t);if(n){if(n.passthrough){let d=le(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 w_(t);if(w(c)){let d;if(de.has(s))d=w_(c);else{de.add(s);try{d=co(c,o,r)}finally{de.delete(s)}}return d?HE(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=Be(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||E();if(e||(e=o.globalTheme==="auto"?null:o.globalTheme),!w(t)){o.verbose&&console.warn(t,"- type for color is not valid");return}if(ht(t))return`var(${t})`;let n,s,i;if(O(t))n=t[0];else{let u=qt(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 ot(t,`@${e}`,r);if(f){if(o.useVariable&&l.var)return s||i?ot(t,null,r):`var(${l.var})`;if(e)return ot(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=ot(t,g,r);if(m!==void 0&&(u[`[data-theme="${p}"] &`]=m,p==="light"||p==="dark")){let _=o.media&&o.media[p]||$l[p];if(!_)continue;let b="@media "+(_==="print"?`${_}`:`screen and ${_}`);u[b]={[`${h} &`]:m}}}return u}}else return S_(t,n,o)},Cr=(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}},vr=(t,e,r)=>{let o=E();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)&&ht(t)){let p=t.slice(2);if(t=ot(p),!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let m=p.split(" "),_=o.color[m[0]];if(_&&!_.value&&!_.rgb&&(w(_)||O(_)||S(_))&&!de.has(m[0])){de.add(m[0]);try{o.color[m[0]]=vr(_,m[0])}finally{de.delete(m[0])}_=o.color[m[0]]}if(_&&_.value){let b=_.rgb,y=m[1]!==void 0?m[1]:"1",x=m[2];x&&(b=Be(b,x)),t=`rgba(${b}, ${y})`}else{let b=m[2],y=m[1]!==void 0?m[1]:"1";if(b)try{let x=le(m[0]);x&&x.length>=3?t=`rgba(${Be(x.slice(0,3).join(", "),b)}, ${y})`:t=m[0]}catch{t=m[0]}else t=m[0]}}}if(O(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),S(t)){let p={};for(let m in t)m!=="var"&&(p[m]=vr(t[m],e,m.slice(0,1)==="@"?m.slice(1):m));return o.useVariable&&Cr(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=qt(i);if(p&&p.name&&!p.passthrough&&!p.cssVar){let m=o.color[p.name];if(m&&!m.value&&!m.rgb&&(w(m)||O(m)||S(m))&&!de.has(p.name)){de.add(p.name);try{o.color[p.name]=vr(m,p.name)}finally{de.delete(p.name)}}let _=o.color[p.name];if(_&&_.rgb){let b=_.rgb;p.tone&&(b=Be(b,p.tone));let y=p.alpha!==void 0?parseFloat(p.alpha):_.alpha!==void 0?_.alpha:1;i=`rgba(${b}, ${y})`}}}let a=le(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}},fn=(t,e,r)=>{let o=E();if(S(t)&&t.value!==void 0&&t.var!==void 0)return o.useVariable&&(o.cssVars[t.var]=t.value),t;if(w(t)&&ht(t)&&(t=ot(t.slice(2))),O(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]=fn(t[a],e,a.slice(0,1)==="@"?a.slice(1):a));return o.useVariable&&Cr(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 Ll=(t,e,r={},o)=>{let n=o||E(),{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=qt(t),g=h&&!h.passthrough&&!h.cssVar?h.name:null,p=(W,K)=>c?{value:W,...K}:W;if(g){let W=n.color[`${g}Safe`];if(W){let K=`${d}@${u}`,Z=W[K]!==void 0?W[K]:W[d];if(Z!==void 0){let To=Z&&Z.rgb!==void 0?n.useVariable&&Z.var?`var(${Z.var})`:Z.value:ot(Z,null,n);return p(To,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=ot(t,u?`@${u}`:null,n),_=co(t,n,u),b=co(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=no(b.rgb,b.alpha),x=no(_.rgb,_.alpha,y),k=rn(x,y);if(k>=f-.02)return p(m,{ratio:k,deviation:0,derived:!1,overridden:!1});let[C,T,$]=ki(_.rgb),[,M,D]=vi([C,T,$]),V=oo(y)>.5,H=V?C:1-C,G=W=>{let K=V?C-W:C+W,Z=Math.max(0,Math.min(1,K));return{rgb:Ci(Z,M,D),L:Z}},ft=W=>{let{rgb:K}=G(W),Z=no(K.map(To=>Math.round(To)),_.alpha,y);return rn(Z,y)},I=0,F=H,N=ft(F)>=f;if(N)for(let W=0;W<l;W++){let K=(I+F)/2;ft(K)>=f?F=K:I=K}else I=F;let{rgb:St,L:Dt}=G(F),xe=St.map(W=>Math.round(W)),J=ft(F),dt=_.alpha<1?`rgba(${xe.join(", ")}, ${_.alpha})`:`rgb(${xe.join(", ")})`,L=Math.abs(Dt-C)*100;return p(dt,{rgb:xe,ratio:J,startRatio:k,deviation:L,derived:!0,overridden:!1,reachable:N})},Mh=(t,e,r={},o)=>Ll(t,e,{...r,meta:!0},o);R();R();var zE=t=>{let r=E().spacing||{},o=parseFloat(t.spacingRatio),n={...r,ratio:Number.isFinite(o)?o:r.ratio,sequence:{},scales:{}};return Kt(n),n},WE=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;pt(r,{type:n,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),Kt(r),Sr(t,e)}},Bi=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),o=e.includes("border")||e.includes("outline");return r&&!o},Ui=()=>{let t=E(),{spacing:e}=t;Kt(e),er(e),WE(e)},qE=t=>{let e=E(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:Kt(t)},xt=(t,e="padding",r,o)=>{let n=qE(r);if(w(t)){if(!o&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!o&&t.includes("(")){let i=tr(t);o=i[0],t=i[1]}}let s=o?[t]:ro(t);if(O(s)){if(s.length>1){let i="";e==="borderWidth"&&(e="border",i="Width");let a={2:["Block","Inline"],3:["BlockStart","Inline","BlockEnd"],4:["BlockStart","InlineEnd","BlockEnd","InlineStart"]},c=(l,f)=>Ve(s[f],e+l+i,n,o);return a[s.length].map((l,f)=>c(l,f))}return Ve(t,e,n,o)}},Ee=(t,e,r,o)=>{let n=E(),{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=tr(i);o=a[0],i=a[1]}if(t.spacingRatio){let a=zE(t);return xt(i,e,a,o)}return xt(i,e,s,o)},Vi=t=>{let e=r=>{let o=["+","-","*","/"].includes(r),n=$o.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 lo=(t,e,r)=>!w(t)||Zt.test(t)?t:Ze(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=ot(n,e);if(Ce(s))return s;if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em"||n==="inset"||n==="none")return n;r&&r(n);let i=xt(n,"shadow");return i&&i.shadow?i.shadow:n}).join(" "))).join(", "),Er=(t,e,r,o)=>{let n=E();if(O(t)){let a={"@light":Er(t[0],e,"light"),"@dark":Er(t[1],e,"dark")};return n.useVariable&&Cr(a,"shadow",e,n),a}if(S(t)){let a={};for(let c in t)a[c]=Er(t[c],e,c.startsWith("@")?c.slice(1):c);return n.useVariable&&Cr(a,"shadow",e,n),a}w(t)&&!Zt.test(t)&&(t=lo(t));let i=`--${n.varPrefix?n.varPrefix+"-":""}shadow-${e}`+(r?`-${r}`:"");return n.useVariable&&(n.cssVars[i]=t),{var:i,value:t}},Hi=(t,e)=>{let r=E();if(e||(e=r.globalTheme==="auto"?null:r.globalTheme),!w(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(ht(t))return`var(${t})`;let[o]=O(t)?t:t.split(" "),s=r.shadow[o],i=S(s);if(!s)return r.verbose&&console.warn("Can't find color ",o),t;if(e){let a=s["@"+e]||s[e];if(a)return a.value!==void 0?a.value:a;r.verbose&&console.warn(t," - does not have ",e)}if(i&&s.value)return s.value;if(i){let a={};for(let c in s){if(c.charCodeAt(0)!==64)continue;let l=r.media[c.slice(1)];if(!l)continue;let f="@media "+(l==="print"?`${l}`:`screen and ${l}`),u=s[c],d=u&&(u.value!==void 0?u.value:u);d!==void 0&&(a[f]=d)}return a}return r.verbose&&console.warn("Can't find color",t),t};var KE=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),GE=t=>KE.has(t),Qt=(t,e,r)=>{let o=t+"";if(Zt.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(ht(s))return`var(${s})`;if(GE(s)||/^\d/.test(s)||s==="0")return s;let i=ot(s,e);if(Ce(i))return i;r&&r(s);let a=xt(s,"border");return a&&a.border?a.border:s}).join(" ")};R();var YE=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"]),k_=["color","Color","background","Background","fill","Fill","stroke","Stroke"],XE=t=>{for(let e=0;e<k_.length;e++)if(t.includes(k_[e]))return!0;return!1},JE={boxShadow:lo,textShadow:lo,border:Qt,borderTop:Qt,borderRight:Qt,borderBottom:Qt,borderLeft:Qt,outline:Qt,columnRule:Qt},ZE=t=>{if(!t)return!1;let e=qt(t);return!e||!e.name||e.passthrough||e.cssVar?!1:e.alpha!==void 0||e.tone!==void 0},v_=new Set,QE=(t,e,r,o,n,s)=>{if(!Ot())return;let i=`${t}::${e}::${r||""}::${o}`;v_.has(i)||(v_.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.`))},E_=(t,e,r,o)=>{let n=JE[e];if(!n)return ot(r,o);let s=null,i=n(r,o,a=>{!s&&ZE(a)&&(s=a)});return s&&QE(t,e,o,r,i,s),i},Ml=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?ot(t[a]):t[a]}),e},zi=t=>(t.value||(t.value=Ml(t)),t.value),Wi=(t,e)=>{let r=E();if(r.useVariable)return pe(t,e);let o=r.theme;if(w(t)){let[n,s]=t.split(" "),i=o[n];if(i){if(!s&&!e)return zi(i);t=[n,s||e]}}if(z(t)&&t[1]){let n=t[0],s=t[1],{helpers:i,media:a,state:c}=o[n];if(a&&a[s])return zi(a[s]);if(i&&i[s])return zi(i[s]);if(c&&c[s])return zi(c[s])}else if(S(t))return Ml(t)},tA=(t,e,r)=>{if(S(e))t.variants.inverse.value=Ml(e);else if(e===!0){let{color:o,background:n}=r;t.variants.inverse={value:{color:n,background:o}}}},eA=(t,e,r,o)=>{let n=Wi(r);o[`&:${e}`]=n,S(r)&&!r.value&&(r.value=n)},rA=(t,e)=>{let{state:r}=t;return r?(Object.keys(r).map(n=>{let s=r[n];return eA(t,n,s,e),t}),t):void 0},oA=(t,e,r,o)=>{let n=Wi(r);o[`@media (prefers-color-scheme: ${e})`]=n,S(r)&&!r.value&&(r.value=n)},nA=(t,e)=>{let{media:r}=t;return r?(Object.keys(r).map(n=>{let s=r[n];return(n==="dark"||n==="light")&&oA(t,n,s,e),n==="inverse"&&tA(t,s,e),t}),t):void 0},sA=(t,e)=>{let r=E(),{helpers:o}=t;return o?(Object.keys(o).map(s=>{let i=o[s];return w(i)?o[s]=r.theme[i]:zi(o[s]),t}),t):void 0},qi=(t,e)=>{let r=E();if(r.useVariable)return Ki(t,e);let{state:o,media:n,helpers:s}=t,i=Ml(t,e),c=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}`;return rA(t,i),nA(t,i),sA(t,i),{var:c,value:i,state:o,media:n,helpers:s}};var Fh=(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===":")&&XE(l))for(let u in t){if(c.has(u))continue;let d=t[u]?.[l];if(d===void 0)continue;let h=ot(d,`@${u}`);h!==void 0&&w(h)&&/^[a-z][a-zA-Z]+$/.test(h)&&!YE.has(h)&&c.add(u)}}for(let l of a){let f=l.slice(0,1),u=Object.values(t).some(d=>z(d?.[l]));if(f==="."&&u){let d=l.slice(1),h={};for(let g in t)z(t[g]?.[l])&&(h[g]=t[g][l]);i[l]=Fh(h,`${e}-${d}`,r)}else if(f===":"&&u){let d=l.replace(/^:+/,""),h={};for(let g in t)z(t[g]?.[l])&&(h[g]=t[g][l]);i[l]=Fh(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 _=t[m]?.[l];if(_===void 0)continue;let b=E_(e,l,_,`@${m}`);if(b===void 0)continue;(g&&m===g||!g&&(m==="light"||p===void 0))&&(p=b);let y=`[data-theme="${m}"]`;if(n[y]||(n[y]={}),n[y][h]=b,m==="dark"||m==="light"){let x=`@media (prefers-color-scheme: ${m})`;n[x]||(n[x]={}),n[x][h]=b}}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},Ki=(t,e,r,o)=>{let n=E(),{cssVars:s}=n,i={value:t},a=!r&&!o;if(z(t)){if(a&&n.useVariable){let c={};for(let l in t)l.startsWith("@")&&z(t[l])&&(c[l.slice(1)]=t[l]);if(Object.keys(c).length){let l=Fh(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]=Ki(f,e,c,o||u)}else if(!a){let u=E_(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)&&ht(t)){let l=n.theme[t.slice(2)];return pe(l,o)}return i},Nh=t=>{let e=E(),r={};for(let o in t){let n=o.slice(0,1);if(z(t[o])){if(n==="@")continue;n===":"?r[`&${o}`]=Nh(t[o]):n==="."&&(r[`&${o}`]=Nh(t[o]))}else r[o]=t[o]}return r},A_=(t,e)=>{let r=e.shift();return t[r]?A_(t[r],e):t},C_=(t,e)=>O(e)?A_(t,e):w(e)&&t[e]?t[e]:t;var pe=(t,e)=>{let r=E();if(w(t)&&ht(t)&&(t=pe(t.slice(2))),!t||!w(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[o,...n]=O(t)?t:t.split(" "),s=r.theme[o];return s&&n.length?s=C_(s,n):s&&e&&(s=C_(s,e)),Nh(s)};R();R();var Gi=(t,e)=>{let r=E(),o=`--font-${e}`;if(!t||O(t)&&!t[0])return;let n;if(t.isVariable){let s=fe(t.url,r.files)||t.url;on(s)?n=nn(s):n=wr(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap"})}else if(t[0])n=io(e,t,r.files);else{let s=Array.isArray(t.url)?t.url.map(i=>fe(i,r.files)||i):fe(t.url,r.files)||t.url;n=wr(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch})}return{var:o,value:t,fontFace:n}},Yi=(t,e)=>{let r=E(),{fontFamily:o}=r;return so(e||o,t)},un=(t,e)=>{let r=E(),{fontFamily:o,fontFamilyTypes:n}=r,{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!o.default)&&(o.default=e),S(s)&&(s=ro(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 Fl=t=>{let e=E(),{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;pt(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"]),_=i.unit||p,b=!i.unit&&m.has(p)?"rem":_,y=o[c],x="@media "+(y==="print"?`${y}`:`screen and ${y}`);if(r.templates[x]={fontSize:i.base/r.browserDefault+b},!a){pt(i,{sequence:{},scales:{},vars:{}}),Kt(i),Sr(t,n);continue}pt(i,{sequence:{},scales:{},templates:{},vars:{}}),Kt(i),Sr(t,n)}},Nl=t=>{let e=E();if(t.h1Matches){let r=t.unit,o=Fi(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}}}},Xi=()=>{let t=E(),{typography:e}=t;Kt(e),Nl(e),er(e),Fl(e)},Ji=t=>{let e=E(),{typography:r}=e;return Ve(t,"fontSize",r)};R();var Zi=t=>{if(!w(t))return;let r=E().shape;if(r)return r[t]!==void 0?r[t]:r[t.toLowerCase()]};R();var Qi=()=>{let t=E(),{timing:e}=t;Kt(e),er(e)},he=t=>{let e=E(),{timing:r}=e;return r[t]||r[_i(t)]||t},te=(t,e="timing")=>{let r=E(),{timing:o}=r;return Ve(t,e,o)};R();var ta=()=>{let t=E(),{fontFamily:e,theme:r,typography:o}=t,n=t.document;return Ge(n)?(ur(t,"document",n),n=t.document={}):n||(n=t.document={}),pt(n,{theme:r.document,fontFamily:so(e),fontSize:o.base,lineHeight:o.lineHeight})};R();var Bh={document:et},dn=(t,e)=>{let r=E();if(!t){r.verbose&&console.warn("setSVG: val is not defined",e);return}return r.useSvgSprite?ji(e,t):t},ea=(t,e=Bh)=>{let r=E(),o=Object.keys(t).length?{}:r.svg;for(let n in t)o[n]=t[n];O_(o,e)},fo=(t,e)=>{let r=E();return r.useIconSprite&&!r.semanticIcons?.[e]?dn(t,e):t},uo=(t,e=Bh)=>{let r=E(),o=Object.keys(t).length?{}:r.icons;for(let n in t)o[n]=t[n];O_(o,e)},jh=(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},iA=(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},T_=(t,e,r)=>{for(;e.firstChild;){let o=e.firstChild;r.appendChild(t.importNode(o,!0)),o.remove()}},O_=(t,e=Bh)=>{let r=E(),o=e.document||et;if(!o||!o.documentElement)return r.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),ln(t);let n=o.querySelector("#svgSprite"),s=ln(t),i=`<svg aria-hidden="true" width="0" height="0" style="position:absolute" id="svgSprite">${s}</svg>`,a=iA(o,s);if(n)if(a)T_(o,a,n);else if(o.body.insertAdjacentHTML)n.insertAdjacentHTML("beforeend",s);else{let c=jh(o,{isRoot:!1});c.innerHTML=s,n.append(...c.children)}else if(a){let c=jh(o);c&&c.nodeType&&(T_(o,a,c),o.body.prepend(c))}else if(o.body.insertAdjacentHTML)o.body.insertAdjacentHTML("afterbegin",i);else{let c=jh(o);c&&c.nodeType&&(c.innerHTML=s,o.body.prepend(c))}};R();var ra=(t={})=>{let e=E(),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?pe("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?pe("document"):{};if(n.html&&Ht(n.html,a),r.unit){let c=e.media||{};for(let l in r){if(l.charAt(0)!=="@")continue;let f=r[l];if(!f||f.unit===r.unit||!f.unit)continue;let u=f.unit,d=f.base||r.base,h=f.browserDefault||r.browserDefault,g=l.slice(1),p=c[g];if(!p)continue;let m="@media "+(p==="print"?p:"screen and "+p);n[m]||(n[m]={}),n[m].html||(n[m].html={}),n[m].html.fontSize=d/h+u}}return nt(pt(n,t),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",scrollBehavior:"smooth",...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}})};R();var aA=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),He=t=>Qt(t),jl=t=>Zt.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(ht(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=ot(e);return Ce(r)?r:e}).join(" "),Bl=(t,e)=>Hi(t,e),oa=(t,e)=>Zt.test(t)?t:Ze(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(ht(o))return`var(${o})`;if(o==="inset"||o==="none")return o;let n=ot(o);if(Ce(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=xt(o,"shadow");return s&&s.shadow?s.shadow:o}).join(" "):"")).join(", "),na=(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=Ze(n).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||aA.has(f)||f==="transparent"||Zt.test(f))return f;let u=ot(f);return Ce(u)?u:f}).join(" ")));return o+a.join(", ")+s},Ul=(t,e)=>{let r=E();return Ze(t).map(o=>{let n=o.trim();if(ht(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")?na(n,e):n.includes("/")||n.startsWith("http")||n.includes(".")&&!qt(n)?`url(${n})`:n}).join(", ")},Vl=t=>w(t)&&t.split(" ").map(e=>xt(e,"gap").gap).join(" "),Uh=t=>{let e=t.split(" ");return e.length?e.map(r=>ht(r)?`var(${r})`:r.length<3||r.includes("ms")?te(r).timing||r:he(r)?he(r):r).join(" "):t},sa=(t,e,r)=>{if(w(t))return t.split(",").map(o=>te(o).timing||o).join(",")},Hl=t=>{let e=t.split(",");if(e.length)return e.map(Uh).join(",")};function yt(t,e,r={},o={}){let n=ct.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=tr(n);s=c[0],n=c[1]}let i=r.scaleBoxSize,a=Bi(t);!i&&a&&!o.ratio&&(n=Vi(n))}return o.ratio?Ee(r,t,n,s):xt(n,t,void 0,s)}var B=(t,e=null,r)=>yt(t,e,r,{ratio:!0}),rr=(t,e,r,o="borderRadius")=>{if(w(t))return{[o]:t.split(" ").map(n=>{let s=Zi(n);return s!==void 0?s:Ee(e,r,n)[r]}).join(" ")}};R();var hn="__smblsThemeRootOwner",gn=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)},R_=(t,e,r)=>{if(!(!t||!e)){gn(t),t.__prefersListener=r,t.__prefersMq=e;try{e.addEventListener("change",r)}catch{e.addListener(r)}}},cA=(t,e)=>{let r=E(),{cssVars:o}=r,n=e.startsWith("--")?e:`--${e}`;return o[n]=t,t},Gt=t=>t,zl={color:vr,gradient:fn,font:Gi,fontFamily:un,fontfamily:un,theme:qi,icons:fo,semanticIcons:Gt,semanticicons:Gt,svg:dn,svgData:Gt,typography:Gt,shadow:Er,spacing:Gt,media:Gt,grid:Gt,class:Gt,timing:Gt,reset:Gt,unit:Gt,animation:Gt,vars:cA,sizes:Gt,shape:Gt},lA=(t,e,r,o)=>{ur(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},Vh=(t,e,r)=>{let o=E(),n=Ri(t),s=n.toLowerCase(),i=o[n]||o[s]||o[t],a=Ge(i)?lA(o,i,s,[n,s,t]):i,c=zl[n]||zl[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")},Hh=(t,e)=>{let r=E(),o=t.toLowerCase();return Ge(e)?(ur(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])||O(e[s])?1:0,c=S(e[i])||O(e[i])?1:0;return a-c}).forEach(s=>{try{return Vh(o,e[s],s)}catch(i){r.verbose&&console.warn("Error setting",o,"value",e[s],s,i)}}),r[o]||r[t])},Wl=(t,e)=>{let r=e||E();r.globalTheme=t;let n=Do(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[hn]=r,c)gn(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",R_(r,f,l)}else gn(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},fA={},po=(t,e=fA)=>{let r=e.config||E(),{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=Rl(e.newConfig)),Ke(b.document)&&(r.__domDocument=b.document,delete b.document),Ke(r.document)&&(r.__domDocument||(r.__domDocument=r.document),r.document={}),m!==void 0&&(r.files=m),_!==void 0&&(r.assets=_),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=Do(r)||(typeof document<"u"?document:null),k=x&&x.defaultView||(typeof window<"u"?window:null),C=x&&(r.themeRoot||x.documentElement);if(C&&typeof C.setAttribute=="function")if(r.globalTheme&&r.globalTheme!=="auto")gn(r),C.setAttribute("data-theme",r.globalTheme),r.resolvedTheme=r.globalTheme,C[hn]=r,r.globalTheme==="dark"||r.globalTheme==="light"?C.style.colorScheme=r.globalTheme:C.style.colorScheme="light dark";else if(C[hn]&&C[hn]!==r&&C.hasAttribute("data-theme"))gn(r),r.resolvedTheme=C.getAttribute("data-theme");else if(k&&k.matchMedia){let V=G=>{let ft=G.matches?"dark":"light";C.setAttribute("data-theme",ft),r.resolvedTheme=ft},H=k.matchMedia("(prefers-color-scheme: dark)");V(H),C.style.colorScheme="light dark",C[hn]=r,R_(r,H,V)}else gn(r),C.setAttribute("data-theme","light"),r.resolvedTheme="light",C.style.colorScheme="light",C[hn]=r;r.__svgCache||(r.__svgCache={});let T=Object.keys(b).filter(D=>!D.startsWith("__")),$=new Set(T);if(T.forEach(D=>{let V=D.toLowerCase();V!==D&&$.has(V)&&nt(b[V],b[D])}),T.map(D=>{let V=D.toLowerCase();if(!(V!==D&&$.has(V)))return Hh(D,b[D])}),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{Xi()}catch(D){r.verbose&&console.warn("Error applying typography sequence",D)}if(b.spacing)try{Ui()}catch(D){r.verbose&&console.warn("Error applying spacing sequence",D)}if(b.timing)try{Qi()}catch(D){r.verbose&&console.warn("Error applying timing sequence",D)}ta();let M=ra();return M&&(r.reset=M),r};var ho=new Map,N_=null,qh=null,uA=null;function ia(t){t.batchAtomicCss&&(qh=t.batchAtomicCss),t.compoundCssClass&&(uA=t.compoundCssClass)}var dA=new Set,I_=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function Kh(t){try{let e=E();e&&(e.__domDocument=t)}catch{}t&&dA.add(t)}function Xl(){try{let t=E();if(t){if(I_(t.__domDocument))return t.__domDocument;if(I_(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var Yt={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};function Jl(){return{...Yt}}function Gh(){for(let t in Yt)Yt[t]=0;Gl=!1}var Gl=!1,Kl=(t,e)=>`${t} ${e}${t===1?"":"s"}`;function pA(t){let e=Date.parse(t);if(!isFinite(e))return"";let r=Math.floor((Date.now()-e)/864e5);return r<1?" (today)":` (${Kl(r,"day")} ago)`}function hA(){try{let t=Zl();return t&&t.cssRules?t.cssRules.length:-1}catch{return-1}}function gA(t,e){if(Gl)return!1;Gl=!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 ${Kl(Yt.variable,"variable rule")} and ${Kl(Yt.atomic,"atomic rule")}, while the design system held ${Kl(e,"CSS variable")}.
|
|
41
|
+
The document will render UNSTYLED and nothing else will report an error.
|
|
42
|
+
This is what a STALE dist/ looks like: an obsolete emitter against a current design system.
|
|
43
|
+
package : ${n}
|
|
44
|
+
built : ${r}
|
|
45
|
+
source : ${o}
|
|
46
|
+
emitted : ${JSON.stringify(Yt)}
|
|
47
|
+
sheet : style[data-smbls] currently holds ${hA()} rule(s)
|
|
48
|
+
FIX : cd smbls && npm run check:stale # every package whose src is newer than its dist
|
|
49
|
+
then rebuild the listed packages and clear the app's .parcel-cache
|
|
50
|
+
Do NOT trust any browser measurement taken on this page until that reads clean.`),!0}function j_(){try{let t=E(),e=t&&(t.CSS_VARS||t.cssVars);return e?Object.keys(e).length:0}catch{return 0}}function D_(t){Gl||Yt.variable>0||Yt.atomic>0||B_(Math.max(t,j_()))}function Yh(t){let e=t&&(t.CSS_VARS||t.cssVars);return B_(e?Object.keys(e).length:j_())}function B_(t){let e=Jl();if(t===0)return{ok:!0,reason:"no-design-system",stats:e,varCount:t};if(!Zl())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 gA(r,t),{ok:!1,reason:r,stats:e,varCount:t}}var mA={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 go(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Yl(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 yA(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Yl(e)}var bA={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select"};function mn(t,e){let r=bA[t];return r?`${t}:${e};${r}:${e};`:`${t}:${e};`}var _A="@media (hover: hover)",xA=/(?:^|[^\\]):hover(?![\w-])/;function Xh(){try{let t=E();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function Ae(t,e,r){return r===!1||!xA.test(e)||r===void 0&&!Xh()?t:`${_A}{${t}}`}function $_(t,e,r){let o=(r?r+"":"")+t+":"+e,n=ho.get(o),s=n?null:go(t);if(!n){let c=mA[t]||Yl(t),l=yA(e);n=r?`_${r}_${c}-${l}`:`_${c}-${l}`,ho.set(o,n)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return n;let i=s||go(t),a=`.${n}{${mn(i,e)}}`;return ge(a,void 0,"atomic"),n}var L_=new WeakMap,M_=new WeakMap;function ge(t,e,r){let o=Zl(e);if(!o)return Yt.dropped++,"dropped";let n=L_.get(o);if(n||(n=new Set,L_.set(o,n)),n.has(t))return Yt.duplicate++,Yt[r||"global"]++,"duplicate";let s=M_.get(o);if(s&&s.has(t))return Yt.invalid++,"invalid";try{o.insertRule(t,o.cssRules.length)}catch{return s||(s=new Set,M_.set(o,s)),s.add(t),Yt.invalid++,"invalid"}return n.add(t),Yt[r||"global"]++,"inserted"}var F_=new WeakMap;function Zl(t){let e=t||Xl();if(!e||!e.head)return null;let r=F_.get(e);if(r&&r.ownerNode&&r.ownerNode.parentNode===e.head)return r;let o=e.head.querySelector("style[data-smbls]");o||(o=e.createElement("style"),o.setAttribute("data-smbls",""),e.head.appendChild(o));let n=o.sheet;return F_.set(e,n),N_=n,n}var wA=8;function me(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]):qh?(o||(o=[]),o.push(c,String(l)),n++):s.push($_(c,String(l),r)))}if(o&&n>=wA){let c=o.join("\0"),l=qh(c),f=l.indexOf("\0"),u=l.substring(0,f),d=l.substring(f+1);if(d){let h=d.split(`
|
|
51
|
+
`);for(let g=0;g<h.length;g++)h[g]&&ge(h[g],void 0,"atomic")}s.push(u)}else if(o)for(let c=0;c<o.length;c+=2)s.push($_(o[c],o[c+1],r));let a=[];for(let c=0;c<i.length;c++)a.push(vA(i[c][0],i[c][1],r));return s.concat(a).join(" ").trim()}var Wh=new Map,SA=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function kA(t){return typeof t!="string"||!t||t.startsWith("@media")||t.startsWith("@supports")?!1:t.split(",").every(e=>SA.test(e.trim()))}function vA(t,e,r){let o=JSON.stringify(e),n=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,s=n&&Xh(),i=(r?r+"":"")+t+o+(n&&!s?"rawhover":""),a=ho.get(i);if(a){let _=Wh.get(a);if(_)for(let b=0;b<_.length;b++)ge(_[b],void 0,"atomic");return a}a=r?`_${r}_c${Yl(i)}`:`_c${Yl(i)}`;let c=`.${a}`,l=kA(t)?`.${a}.${a}`:c,f="",u=[],d=_=>typeof _=="string"&&(_.indexOf("{")!==-1||_.indexOf("}")!==-1),h=(_,b)=>{let y="";for(let x in b){let k=b[x];if(k!=null)if(typeof k=="object")h([..._,x],k);else{if(d(k))continue;y+=mn(go(x),k)}}y&&(_.length===0?f+=y:u.push({chain:_,body:y}))};h([],e);let g=_=>{let b=_.length===1?l:c;if(!_.length)return b;let y=_[0].split(",").map(x=>x.trim()).map(x=>x.includes("&")?x.replace(/&/g,b):x.startsWith(":")?`${b}${x}`:`${b} ${x}`);for(let x=1;x<_.length;x++){let k=_[x].split(",").map(T=>T.trim()),C=[];for(let T of y)for(let $ of k)$.includes("&")?C.push($.replace(/&/g,T)):$.startsWith(":")?C.push(T+$):C.push(T+" "+$);y=C}return y.join(", ")},p=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(f){let _=`${t}{${c}{${f}}}`;p.push(_),ge(_,void 0,"atomic")}for(let _ of u){let b=g(_.chain),y=Ae(`${t}{${b}{${_.body}}}`,b,s);p.push(y),ge(y,void 0,"atomic")}return Wh.set(a,p),ho.set(i,a),a}let m=g([t]);if(f){let _=Ae(`${m}{${f}}`,m,s);p.push(_),ge(_,void 0,"atomic")}for(let _ of u){let b=g([t,..._.chain]),y=Ae(`${b}{${_.body}}`,b,s);p.push(y),ge(y,void 0,"atomic")}return Wh.set(a,p),ho.set(i,a),a}function wt(t){if(t==null||typeof t!="string"&&typeof t!="object")return;if(Zl(),typeof t=="string"){let s=t.indexOf("--")!==-1;ge(t,void 0,s?"variable":"global"),s&&D_(1);return}let e=Xh(),r=0,o=Object.keys(t),n=s=>{let i=s.match(/max-width:\s*(\d+)/);return i?parseInt(i[1]):0};o.sort((s,i)=>{let a=s.startsWith("@media"),c=i.startsWith("@media");return!a&&!c?0:a?c?n(i)-n(s):1:-1});for(let s of o){let i=t[s];if(s.startsWith("@media")||s.startsWith("@supports"))for(let a in i){let c=i[a];if(typeof c=="object"&&c!==null){let l="",f=0;for(let u in c){let d=u.charCodeAt(0)===45&&u.charCodeAt(1)===45;d&&f++;let h=d?u:go(u);l+=mn(h,c[u])}r+=f,ge(Ae(`${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:go(a);ge(`${s}{${mn(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:go(f);a+=mn(h,u)}}if(r+=l,a&&ge(Ae(`${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)wt({[`${s} ${d}`]:i[d]});for(let d of f)wt({[d]:{[s]:i[d]}})}}}r>0&&D_(r)}function yn(t,e){let r="";for(let o in e){let n="";for(let s in e[o])n+=mn(go(s),e[o][s]);r+=`${o}{${n}}`}return ge(`@keyframes ${t}{${r}}`,void 0,"keyframes"),t}function U_(){ho.clear(),N_=null}function Jh(){return ho.size}R();var Vg={};P(Vg,{DELEGATED_EVENTS:()=>Sn,LIFECYCLE_EVENTS:()=>Or,MIXINS:()=>Ql,NON_BUBBLING_EVENTS:()=>tf,REGISTRY:()=>Ft,SVG_TAGS:()=>xn,addDelegatedEvent:()=>aa,addMethods:()=>Tn,applyExtends:()=>vn,cacheNode:()=>Tr,create:()=>ee,createHTMLNode:()=>_n,detectTag:()=>Ar,dispose:()=>Dr,flushMounts:()=>ga,globalEventKeyInfo:()=>ef,isSvgTag:()=>wn,isValidTag:()=>bn,refreshContextProto:()=>cf,registerEvent:()=>kn,registerGlobalEvent:()=>rf,remove:()=>An,removeDelegatedEvent:()=>ca,update:()=>Cn});var Qh="http://www.w3.org/2000/svg",xn=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"]),CA=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 bn(t){return CA.has(t)||xn.has(t)}function wn(t){return xn.has(t)}function Ar(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"&&bn(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]),bn(n)&&!o.has(n)?n:"div"}var V_={};function _n(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(wn(t)){let o=e?.parent;if(t==="svg"||o?.node?.namespaceURI===Qh)return r.createElementNS(Qh,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Tr(t){let e=t.tag=Ar(t),o=wn(e)&&(e==="svg"||t.parent?.node?.namespaceURI===Qh)?"svg:"+e:e,n=t?.context?.document||globalThis.document,s=V_[o];if(s||(s=V_[o]=_n(e,t)),!s)return null;let i=n&&s.ownerDocument!==n?_n(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var Ft=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"]),Ql={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},Or=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"]),tg=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),Sn=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 rg=new WeakMap,EA={passive:!0},AA={passive:!0,capture:!0},og=(t,e)=>tg.has(t)?e?AA:EA:e||!1;function z_(t){let e=rg.get(t);return e||(e={handlers:new Map,installed:new Set},rg.set(t,e)),e}function TA(t,e){let r=z_(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}},og(t,o))}function aa(t,e,r,o){o||(o=e.ownerDocument?.documentElement||e.getRootNode());let n=z_(o);TA(t,o),n.handlers.has(t)||n.handlers.set(t,new WeakMap),n.handlers.get(t).set(e,r)}function ca(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let o=rg.get(r);if(!o)return;let n=o.handlers.get(t);n&&n.delete(e)}function H_(t){return Sn.has(t)&&!Or.has(t)}function W_(t,e){let{context:r}=t,o=r?.designSystem;return n=>{o&&st(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&&rt()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),r?.strictMode)throw s}o&&rt()}}function kn(t,e,r){let{node:o,context:n}=e;if(!o)return;let s=W_(e,r),i=tf.has(t);if(!i&&H_(t)){let a=n?.rootNode||o.ownerDocument?.documentElement;aa(t,o,s,a)}else o.addEventListener(t,s,og(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!i&&H_(t)){let a=n?.rootNode||o.ownerDocument?.documentElement;ca(t,o,a)}else o.removeEventListener(t,s,og(t,!1))})}var eg=[["onDocument","document"],["onWindow","window"]];function ef(t){if(typeof t!="string")return null;for(let e=0;e<eg.length;e++){let r=eg[e][0];if(t.length<=r.length||!t.startsWith(r))continue;let o=t.charCodeAt(r.length);if(!(o<65||o>90))return{target:eg[e][1],eventName:t.slice(r.length).toLowerCase()}}return null}var OA=/^[A-Za-z_$][\w$]*$/;function RA(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"&&OA.test(o)){let a=o;o=function(l){return t.call(a,l)}}return typeof o!="function"?null:(s===void 0&&(s=tg.has(r)),{handler:o,capture:n,passive:s,once:i})}function PA(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 IA(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 rf(t,e,r){let o=e.__ref;if(!o)return;let n=RA(e,r,t.eventName);if(!n)return;let s=PA(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=W_(e,n.handler),c=f=>{IA(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 q_(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 vn(t,e,r){let o=q_(e);if(!o.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<o.length;i++){let a=K_(o[i],s);a&&a!==e&&G_(t,a,r,new Set([e]))}}function K_(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 G_(t,e,r,o=new Set){if(o.has(e))return;o.add(e);let n=q_(e);if(n.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<n.length;a++){let c=K_(n[a],i);c&&G_(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]=Y_(t[s],i):t[s]=i}}function Y_(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]=Y_(n,s):r[o]=s}return r}Vo();R();var DA=["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"]},J_=["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"],Pr=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()):Z_(t),$A=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate"]),Z_=t=>$A.has(t)?t.toLowerCase():null,LA=new Set(["draggable","contenteditable","spellcheck","autocorrect"]),or=t=>typeof t=="string"&&(LA.has(t)||t.startsWith("aria-")),ze=(t,e)=>e!==!0&&e!==!1?e:or(t)?e?"true":"false":e===!0?"":e,Ir=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Pr(e)||of.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(of,t)?of[t].includes(e):!1,ig=t=>{if(!w(t))return!1;let e=t.toLowerCase();return J_.includes(e)},MA=(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])mt(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(mt(e[n][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());o["data-"+c]=e[n][a]}continue}let s=Ir(t,n),i=ig(n);if(mt(e[n])&&(s||i)){let a=Pr(n)||n;o[a]=e[n]}}return o},FA=(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},Rr=(t,e)=>{let r=t.call("exec",e,t);if(r)return w(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},ng=(t,e)=>{let r=(t.preSrc||"")+(Rr(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},sg={src:t=>ng(t,t.src),href:t=>Rr(t,t.href),action:t=>Rr(t,t.action),poster:t=>ng(t,t.poster),data:t=>Rr(t,t.data)},ag=t=>{let e=t.tag||"div",r={};for(let o in sg)if(t[o]!==void 0&&Ir(e,o)){let n=sg[o](t);n!==void 0&&(r[o]=n)}return r},X_=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},NA=(t,e,r)=>{if(t==="$"){let n=X_(e,r);return n===void 0&&(n=!!r[e]),n}let o=r[e]===!0||r.state[e];if(!o){let n=X_(e,r);n!==void 0&&(o=n)}return t==="."?!!o:!o},jA=new Set(["$",".","!"]),BA=(t,e,r)=>{let o={},n=(s,i,a,c)=>{let l=i;o[s]=f=>{if(NA(a,c,f))return A(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!jA.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=Ir(e,l),u=ig(l);if(!f&&!u)continue;let d=Pr(l)||l;n(d,a[l],i,c)}}return o};function Cn(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"&&cg(o))try{let s=r.onBeforeUpdate(r,r.state,r.context,e);if(s&&typeof s.then=="function")s.then(()=>nr(o,!1),i=>{nr(o,!0),r.context?.plugins?.length&&Ct("error",r,{hook:"onBeforeUpdate",error:i})||console.error("[DOMQL] onBeforeUpdate error:",i)});else if(nr(o,!1),s===!1)return r}catch(s){throw nr(o,!0),s}let n=!t||Object.keys(t).length===0;if(ac(()=>{if(t.state&>(r.state)&&r.state.$update(t.state),t.text!==void 0&&(r.text=t.text,!o.__exec.text&&r.node&&En(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&&!or(s)?r.node.removeAttribute(s):typeof i!="function"&&typeof i!="object"&&r.node.setAttribute(s,ze(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(Ft.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&&ee(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 Ct("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}function Dr(t){if(!t)return;let e=t.__ref;if(!e)return;try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(o){console.error("[smbls] onBeforeRemove error:",o)}if(e.__effects){for(let o=0;o<e.__effects.length;o++)e.__effects[o].dispose();e.__effects.length=0}if(e.__eventCleanup){for(let o=0;o<e.__eventCleanup.length;o++)e.__eventCleanup[o]();e.__eventCleanup.length=0}if(e.__children){let o=e.__children.slice();e.__children.length=0;for(let n=0;n<o.length;n++){let s=t[o[n]];s&&s.__ref&&Dr(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 An(){Dr(this)}R();R();R();var UA=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],VA=["none","forwards","backwards","both"],HA=["normal","reverse","alternate","alternate-reverse"],zA=["running","paused"],WA=t=>/^[\d.]+m?s$/.test(t),qA=/^(?: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*\))$/,KA=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=>qA.test(o.replace(/\s+/g,"")))},Q_=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),GA={transform:KA,translate:Q_,rotate:t=>Q_(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},YA=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},XA=t=>{if(!S(t))return null;let e=null,r=-1;for(let o in t){let n=YA(o);n==null||!S(t[o])||n>=r&&(r=n,e=t[o])}return e},JA=t=>{let e=XA(t);if(!e)return!1;let r=Object.keys(e);if(!r.length)return!1;for(let o of r){let n=GA[o];if(!n)return!1;let s=e[o];if(s==null||typeof s=="object"||typeof s=="function"||!n(s))return!1}return!0},ZA=(t,e)=>{if(S(t))return t;let{animation:r}=e.context&&e.context.designSystem||{},o=r&&r[t];return S(o)?o:null},QA=["reverse","alternate","alternate-reverse"],tx=(t,e,r)=>{let o=r||e.animationDirection;return o&&QA.includes(String(o))?"both":JA(ZA(t,e))?"backwards":"both"},tT=0,ex=new Map,lg=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(S(t)){let n=JSON.stringify(t),s=ex.get(n);if(s)return s;let i=`smbls-anim-${tT++}`,a=yn(i,t);return ex.set(n,a),a}let o=r&&r[t];return S(o)?yn(t,o):t},eT=(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:WA(u)?s.push(u):UA.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):HA.includes(u)?c=u:VA.includes(u)?l=u:zA.includes(u)?f=u:n||(n=u);return{name:n,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},fg={animation:(t,e)=>{if(w(t)&&t.includes(" ")){let r=eT(t,e);return{animationName:lg(r.name||t,e),animationDuration:r.durations[0]||te(e.animationDuration||"A").timing,animationDelay:r.durations[1]||te(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||he(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||tx(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:lg(t,e),animationDuration:te(e.animationDuration||"A").timing,animationDelay:te(e.animationDelay||"0s").timing,animationTimingFunction:he(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||tx(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:lg(t,e)}),animationDuration:t=>({animationDuration:te(t).timing}),animationDelay:t=>({animationDelay:te(t).timing}),animationTimingFunction:t=>({animationTimingFunction:he(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};R();var ug={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>B("height",t,e),width:(t,e)=>B("width",t,e),boxSizing:t=>Et(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...yt("height",e),...yt("width",r||e)}},inlineSize:(t,e)=>B("inlineSize",t,e),blockSize:(t,e)=>B("blockSize",t,e),minWidth:(t,e)=>B("minWidth",t,e),maxWidth:(t,e)=>B("maxWidth",t,e),widthRange:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...yt("minWidth",e),...yt("maxWidth",r||e)}},minHeight:(t,e)=>B("minHeight",t,e),maxHeight:(t,e)=>B("maxHeight",t,e),heightRange:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...yt("minHeight",e),...yt("maxHeight",r||e)}},size:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...B("inlineSize",e),...B("blockSize",r||e)}},minBlockSize:(t,e)=>B("minBlockSize",t,e),minInlineSize:(t,e)=>B("minInlineSize",t,e),maxBlockSize:(t,e)=>B("maxBlockSize",t,e),maxInlineSize:(t,e)=>B("maxInlineSize",t,e),minSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...yt("minInlineSize",e),...yt("minBlockSize",r||e)}},maxSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...yt("maxInlineSize",e),...yt("maxBlockSize",r||e)}},borderWidth:(t,e)=>B("borderWidth",t,e),borderTopWidth:(t,e)=>B("borderTopWidth",t,e),borderRightWidth:(t,e)=>B("borderRightWidth",t,e),borderBottomWidth:(t,e)=>B("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>B("borderLeftWidth",t,e),padding:(t,e)=>B("padding",t,e),scrollPadding:(t,e)=>B("scrollPadding",t,e),paddingInline:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...yt("paddingInlineStart",e),...yt("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...yt("paddingBlockStart",e),...yt("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>B("paddingBlockStart",t,e),paddingBottom:(t,e)=>B("paddingBlockEnd",t,e),paddingLeft:(t,e)=>B("paddingInlineStart",t,e),paddingRight:(t,e)=>B("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>B("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>B("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>B("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>B("paddingInlineEnd",t,e),margin:(t,e)=>B("margin",t,e),marginInline:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...yt("marginInlineStart",e),...yt("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!w(e.marginBlock))return;let[r,o]=e.marginBlock.split(" ");return{...yt("marginBlockStart",r),...yt("marginBlockEnd",o||r)}},marginTop:(t,e)=>B("marginBlockStart",t,e),marginBottom:(t,e)=>B("marginBlockEnd",t,e),marginLeft:(t,e)=>B("marginInlineStart",t,e),marginRight:(t,e)=>B("marginInlineEnd",t,e),marginInlineStart:(t,e)=>B("marginInlineStart",t,e),marginInlineEnd:(t,e)=>B("marginInlineEnd",t,e),marginBlockStart:(t,e)=>B("marginBlockStart",t,e),marginBlockEnd:(t,e)=>B("marginBlockEnd",t,e),gap:t=>({gap:Vl(t)}),columnGap:(t,e)=>Ee(e,"columnGap",t),rowGap:(t,e)=>Ee(e,"rowGap",t),flexWrap:t=>({display:"flex",flexWrap:t}),flexFlow:(t,e)=>{let r=e.reverse;if(!w(t))return;let[o,n]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(o="row"),(t.startsWith("y")||t==="column")&&(o="column"),{display:"flex",flexFlow:(o||"")+(!o.includes("-reverse")&&r?"-reverse":"")+" "+(n||"")}},flexAlign:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>rr(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>rr(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>rr(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>rr(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>rr(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>rr(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var dg={fontSize:t=>Ji(t)||t,fontFamily:t=>({fontFamily:Yi(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 pg={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 hg={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>xt(r,"k").k).join(" ")}},left:t=>xt(t,"left"),top:t=>xt(t,"top"),right:t=>xt(t,"right"),bottom:t=>xt(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>xt(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=>xt(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};R();var nf=0,gg=()=>{nf++},mg=()=>{nf>0&&nf--},ye=({context:t,state:e})=>{let r=t?.designSystem,o=e?.root?.globalTheme||r?.globalTheme;return o&&o!=="auto"?o:nf>0?null:r&&r.resolvedTheme||null},re=(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=re(t,s);i&&(r[n]=i,o=!0);continue}r[n]={[t]:s},o=!0}}return o?r:void 0},yg={theme:(t,e)=>{if(t)return e.themeModifier?pe(t,`@${e.themeModifier}`):pe(t)},color:(t,e)=>{let r=ye(e);if(t)return re("color",Rt(t,r))},background:(t,e)=>{let r=ye(e);if(t)return w(t)&&t.includes("gradient")&&t.includes("(")?{background:na(t,r)}:re("background",Rt(t,r))},backgroundColor:(t,e)=>{let r=ye(e);if(t)return re("backgroundColor",Rt(t,r))},backgroundImage:(t,e,r,o)=>{let n=ye(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 re("backgroundImage",Ul(t,n))},textStroke:t=>({WebkitTextStroke:jl(t)}),outline:t=>({outline:He(t)}),outlineOffset:(t,e)=>B("outlineOffset",t,e),border:t=>({border:He(t)}),borderColor:(t,e)=>{let r=ye(e);if(t)return re("borderColor",Rt(t,r))},borderTopColor:(t,e)=>{let r=ye(e);if(t)return re("borderTopColor",Rt(t,r))},borderBottomColor:(t,e)=>{let r=ye(e);if(t)return re("borderBottomColor",Rt(t,r))},borderLeftColor:(t,e)=>{let r=ye(e);if(t)return re("borderLeftColor",Rt(t,r))},borderRightColor:(t,e)=>{let r=ye(e);if(t)return re("borderRightColor",Rt(t,r))},borderLeft:t=>({borderLeft:He(t)}),borderTop:t=>({borderTop:He(t)}),borderRight:t=>({borderRight:He(t)}),borderBottom:t=>({borderBottom:He(t)}),shadow:(t,e)=>{let r=ye(e);if(t)return re("boxShadow",Bl(t,r))},boxShadow:(t,e)=>{if(!w(t))return;let[r,o]=t.split("!importan"),n=ye(e),s=o?" !important":"",i=oa(r.trim(),n);return w(i)?{boxShadow:i+s}:re("boxShadow",i)},textShadow:(t,{context:e})=>re("textShadow",oa(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:He(t)})};var la={transition:t=>({transition:Hl(t)}),transitionDuration:t=>({transitionDuration:sa(t)}),transitionDelay:t=>({transitionDelay:sa(t)}),transitionTimingFunction:t=>({transitionTimingFunction:he(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};R();var bg={flow:(t,e)=>{let r=e.reverse;if(!w(t))return;let[o,n]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(o="row"),(t.startsWith("y")||t==="column")&&(o="column"),{display:"flex",flexFlow:(o||"")+(!o.includes("-reverse")&&r?"-reverse":"")+" "+(n||"")}},wrap:(t,e)=>({display:"flex",flexWrap:t}),align:(t,e)=>{let[r,o]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:o}}};var _g={area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:t}),templateColumns:t=>({gridTemplateColumns:t}),autoColumns:t=>({gridAutoColumns:t}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:t}),templateRows:t=>({gridTemplateRows:t}),autoRows:t=>({gridAutoRows:t}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var bt={...fg,...ug,...dg,...pg,...hg,...yg,...la,...bg,..._g};var kt=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction","appearance","aspectRatio","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundRepeatX","backgroundRepeatY","backgroundSize","baselineShift","blockSize","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxDecorationBreak","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caretColor","clear","clip","clipPath","color","colorAdjust","colorInterpolation","colorInterpolationFilters","colorRendering","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","content","counterIncrement","counterReset","cursor","direction","display","emptyCells","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantNumeric","fontVariantPosition","fontWeight","fontVariationSettings","fontSynthesis","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","hyphens","imageOrientation","imageRendering","imeMode","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","initialLetter","isolation","justifyContent","justifyItems","justifySelf","left","letterSpacing","lineBreak","lineClamp","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","marginBlock","marginBlockEnd","marginBlockStart","marginInline","marginInlineEnd","marginInlineStart","mask","maskBorder","maskBorderImage","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","maxBlockSize","maxHeight","maxInlineSize","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","objectFit","objectPosition","objectViewBox","offset","offsetDistance","offsetPath","offsetRotate","opacity","order","orientation","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowClip","overflowScrolling","overflowWrap","overflowX","overflowY","overscrollBehavior","overscrollBehaviorX","overscrollBehaviorY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollPadding","scrollSnapAlign","scrollSnapType","scrollbarColor","scrollbarGutter","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","top","touchAction","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);R();var rT=/^-?[A-Z][0-9]?$/,oT=/^[a-z][0-9]?$/,rx=/var\(\s*(--[A-Za-z0-9-]+)/g,nT=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}},sT=(t,e)=>{if(!e.size)return[];let r=t.split(/[(),\s]+/).filter(Boolean),o=new Set;for(let n of r){if(!rT.test(n))continue;let s=n.charCodeAt(0)===45?n.slice(1):n;e.has(s)&&o.add(n)}return[...o]},iT=(t,e)=>{if(!e.size)return[];let r=[];rx.lastIndex=0;let o;for(;o=rx.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(!oT.test(i))continue;let a=n.slice(0,s+1)+i.toUpperCase();a!==n&&e.has(a)&&r.push({varName:n,corrected:a})}return r},sf=new Set,ox=(t,e,r)=>{if(!Ot()||!w(e)||!e)return;let o;try{o=E()}catch{return}let{knownLetters:n,knownVars:s}=nT(o);if(!n.size&&!s.size)return;let i=sT(e,n),a=iT(e,s);if(!i.length&&!a.length)return;let c=r?.__ref?.path?r.__ref.path.join("."):r?.key||"?";for(let l of i){let f=`${c}::${t}::bare::${l}::${e}`;sf.has(f)||(sf.add(f),console.warn(`[smbls/css-in-props] "${t}" on <${c}> looks like it contains an un-wrapped design-system token ("${l}") \u2014 "${t}" has no registered resolver, so its value is forwarded to the browser untouched. A bare letter token there is invalid CSS, so the browser drops the ENTIRE "${t}" declaration (not just this argument). Wrap it in var(--<family>-${l.replace("-","")}) (or calc(-1 * var(--<family>-${l.replace("-","")})) for a negative). Value: "${e}"`))}for(let{varName:l,corrected:f}of a){let u=`${c}::${t}::case::${l}::${e}`;sf.has(u)||(sf.add(u),console.warn(`[smbls/css-in-props] "${t}" on <${c}> references ${l}, which the active design system never emits. CSS custom-property names are case-sensitive \u2014 the real variable is ${f}, so this reference silently never resolves. Value: "${e}"`))}};R();var aT=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,cT=(t,e,r)=>{let{context:o}=r;if(!o.designSystem?.media)return;let n=t.slice(1),s=o.designSystem.media[n],i=oe(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(aT),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},nx=(t,e,r)=>({[t]:oe(e,r)}),fa=(t,e,r)=>{let o=`&${t}`,n=oe(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}},xg=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},lT=(t,e,r)=>{let o=t.slice(1),n=xg(o,r);if(n===void 0&&(n=!!r[o]),!!n)return oe(e,r)},fT=(t,e,r)=>({[t]:e}),uT=(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=xg(o,r);s!==void 0&&(n=s)}if(n)return oe(e,r)},dT=(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=xg(o,r);s!==void 0&&(n=s)}if(!n)return oe(e,r)},wg=(t,e)=>oe(t,e),Sg={"@":cT,":":fa,"[":fa,"*":fa,"+":fa,"~":fa,"&":nx,">":nx,$:lT,"-":fT,".":uT,"!":dT};var af=hr(),sx=(t,e,r)=>{let o=e?.context?.designSystem;o&&st(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(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)=>pt(d,f[h]),{});n.designSystemClass=u}}else if(a==="true"){let l=ct(c,e);pt(n,wg(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),!af&&S(n[a])&&(n[a].label=a)}else if(bt[a]){let l=ct(c,e);O(l)&&(l=l.reduce((u,d)=>pt(u,d),{}));let f=bt[a](l,e,e.state,e.context);O(f)&&(f=f.reduce((u,d)=>pt(u,d),{})),f&&i(a,f),!af&&S(n[a])&&(n[a].label=a)}else if(kt.has(a)){let l=ct(c,e);typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),af||ox(a,l,e),i(a,{[a]:l}),!af&&S(n[a])&&(n[a].label=a)}else s[a]=c}return[n,s]}finally{o&&rt()}},ix=(t,e)=>{let r={};for(let o in t){let n=Sg[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"?Ht(r[i],s[i]):r[i]=s[i])}}return r},oe=(t,e,r={unpack:!0})=>{let[o,n]=sx(t,e,r),s=ix(n,e),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return vs(o,s);o._selectors=s}return o},pT=(t,e)=>{let r={};if(t.class)for(let o in t.class)r[o]=t.class[o](e);return r};R();var ax=t=>{if(S(t))return oe(t,t)},hT=(t,e)=>{let r=ax(t);return typeof e=="function"?e(r):me(r)};R();function vg(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 cx=new Set;function gT(t,e,r){let o=String(e);if(cx.has(o))return;cx.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.`;vg(t,"error",[a]),console.error(a)}function mT(...t){return vg(this,"warn",t),ci.apply(this,t)}function yT(...t){return vg(this,"error",t),to.apply(this,t)}var lx={update:Cn,remove:An,getDB:di,getQuery:pi,getRootData:si,getChildren:ti,getPath:ei,nextElement:li,previousElement:fi,verbose:Ko,warn:mT,error:yT,variables:ui,spotByPath:Qs,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:ni,getRootState:oi,getRootContext:ii,getContext:ai,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);Ot()&&gT(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)}},kg=new WeakMap;function bT(t){if(!t)return lx;let e=kg.get(t);if(e)return e;e=Object.create(lx);let r=t.methods;if(r)for(let o in r)e[o]=r[o];return kg.set(t,e),e}function Tn(t){let e=bT(t.context);Object.setPrototypeOf(t,e)}function cf(t){if(!t)return!1;let e=kg.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}R();Vo();var Og={};P(Og,{STATE_METHODS:()=>fx,applyInitialState:()=>ff,applyStateMethods:()=>ne,callStateMethod:()=>ua,createState:()=>Eg,isTracking:()=>Tg,useHostState:()=>Ag});var fx=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"]),lf=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},Te=(t,e,r,{onlyIfAbsent:o}={})=>{lf(t,"$"+e,r),!(o&&Object.prototype.hasOwnProperty.call(t,e))&&lf(t,e,r)},ua=(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)},ne=(t,e)=>{if(gt(e)){let n=e.__raw||e;Te(n,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),Te(n,"set",function(s,i={}){return e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,i),e},{onlyIfAbsent:!0}),Te(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}),Te(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}),Te(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}),Te(n,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),Te(n,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),Te(n,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),Te(n,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&>(a.parent);)a=a.parent;return ua(a,"update",s,i)}),Te(n,"parentUpdate",function(s,i={}){if(e.parent)return ua(e.parent,"update",s,i)}),Te(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=gt(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,gt(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(lf(e,"$"+n,o[n]),typeof e[n]!="function"){if(Object.prototype.hasOwnProperty.call(e,n)){fc(n,"");continue}lf(e,n,o[n])}};var Eg=function(t,e,r){return t.state=ff(t,e,r),t.state},ff=function(t,e,r){let{__ref:o}=t,n=t.state;if(n==null||n===!1){let s=e?.state||{};return ne(t,s),s}if(typeof n=="string")return o&&(o.__state=n),o.__stateType="string",_T(n,t,e);if(typeof n=="number"||typeof n=="boolean"){o&&(o.__state=n,o.__stateType=typeof n,o.__hasRootState=!0);let s=qe({value:n});return s.__element=t,e?.state&&(s.parent=e.state),ne(t,s),s}if(typeof n=="function"&&(n=n(t,e?.state)||{}),typeof n=="object"&&!gt(n)){o&&(o.__hasRootState=!0),n.isRootState&&o&&(o.__hasRootState=!0);let s=qe({...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)),ne(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,r),s}return gt(n)?(n.__element=t,n):e?.state||{}};function Cg(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 _T(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?Cg(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?Cg(n,s):n??{}}let o=Cg(r.state,t);if(o&&typeof o=="object"&&!gt(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 Ag=(t,e)=>{if(!t)return dx;let r=wT(t,e);return!r||!r.state?dx:kT(r.state)},Tg=()=>cc()!=null,xT=128;function wT(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<xT&&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 ST={get(t,e){return t[e]}},ux=new WeakMap,kT=t=>{let e=ux.get(t);return e||(e=new Proxy(t,ST),ux.set(t,e)),e},dx=new Proxy(Object.create(null),{get(){},has(){return!1}});var vT=1,pa=[],Dg=!1;function px(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function CT(){return typeof document<"u"&&document.visibilityState==="hidden"}var ET=250;function xx(){if(!Dg){if(Dg=!0,typeof requestAnimationFrame!="function"){setTimeout(ga,0);return}CT()?setTimeout(ga,ET):requestAnimationFrame(ga)}}var AT=300,TT=15e4;function ga(){if(Dg=!1,!pa.length)return;let t=pa.splice(0,pa.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=px());let n=px()-o.__mountFirstAttemptAt;o.__mountAttempts<=AT&&n<TT?(pa.push(r),xx()):console.warn("[DOMQL] onMounted dropped after",o.__mountAttempts,"attempts /",n,"ms \u2014 node never connected:",r.key||r.tag||r);continue}sr("Mounted",r,r.__ref?.__mountOptions||{})}}}function wx(t,e){typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,pa.push(t),xx())}function hx(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&Ct("contentUpdate",t,e);let r=t.context?.designSystem;r&&st(r);try{t.onContentUpdate(t,t.state,t.context,e)}catch(o){if(t.context?.plugins?.length&&Ct("error",t,{hook:"onContentUpdate",error:o})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',o),t.context?.strictMode)throw o}finally{r&&rt()}}function Rn(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function OT(t){return t.charAt(2).toLowerCase()+t.slice(3)}function RT(t){return t.toLowerCase()}function $g(t){let e=t.charCodeAt(0);return e===58||e===64||e===38}function ha(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]=ha(n,s):r[o]=s}return r}function ee(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||`_${vT++}`,s.parent=e||null,s.context=t.context||e?.context||o.context||{},s.context.__create||(s.context.__create=ee);let i=s.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||s,path:e?.__ref?.path?[...e.__ref.path,s.key]:[s.key],origin:t};if(r&&!t.extends&&!t.extend){let p=r.indexOf("_");if(p>0){let m=r.substring(0,p),_=s.context?.components;_&&(_[m]||_["smbls."+m])?t={...t,extends:m}:_&&Ot()&&/^[A-Z]\w*_\d+$/.test(r)&&console.warn(`[smbls] auto-extend: key "${r}" looks like a multi-instance (${m}_N) but neither "${m}" nor "smbls.${m}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}vn(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],_=s[p],b=_&&m&&typeof _=="object"&&typeof m=="object"&&!Array.isArray(_)&&!Array.isArray(m)&&typeof _!="function"&&typeof m!="function";b&&p.charCodeAt(0)>=65&&p.charCodeAt(0)<=90?s[p]=ha(_,m):b&&a.has(p)?s[p]={..._,...m}:b&&$g(p)?s[p]=ha(_,m):s[p]=m}function l(p){for(let m in p){let _=p[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]=ha(b,_):y&&a.has(m)?s[m]={...b,..._}:y&&$g(m)?s[m]=ha(b,_):s[m]=_}}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=lc(p,h)}else h&&(s.scope=h);if(t.if!==void 0&&(s.if=t.if),Tn(s),PT(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 _=s.key||s.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${_} \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"&&vx(s,i,s.if),s;s.tag||(s.tag=Ar(s)),sr("Init",s,o);let g=s.node=Tr(s);if(!g)return s;if(s.tag==="fragment"){let m=(s.context?.document||globalThis.document).createComment("");g.appendChild(m),i.__fragmentAnchor=m}sr("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),Tx(s,o),kx(s),Lg(s),Ex(s),KT(s);try{Ox(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?`
|
|
41
52
|
`+p.stack.split(`
|
|
42
53
|
`).slice(0,6).join(`
|
|
43
|
-
`):"")}}if(Rh(s,!0),Ub(s,e,o),typeof s.html=="function"&&s.node&&!s.node.innerHTML){let p=s.context?.designSystem;p&&rt(p);try{let m=s.html(s,s.state,s.context);m!=null&&typeof m!="function"&&(s.node.innerHTML=m)}catch{}finally{p&&Q()}}if(Ze("Create",s,n),Ze("Complete",s,n),Ze("Render",s,n),Ze("RenderRouter",s,n),Ib(s,n),typeof s.onFrame=="function"){let p=s.onFrame,m=s.context?.designSystem,x=()=>{if(s.node){if(s.node.isConnected){m&&rt(m);try{p(s,s.state,s.context)}catch(b){console.error("[DOMQL] onFrame error:",b)}finally{m&&Q()}}requestAnimationFrame(x)}};requestAnimationFrame(x)}return s}function Zv(t,e,r){let n=!e,o=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=n&&o&&t.context?.state,i=r.state!==void 0&&!s?r.state:t.state&&!dt(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,Zt(t,t.state);else if(t.context?.state){let a=t.context.state,c={...a},l=t.context?.polyglot;if(l?.translations){let f=a.lang||l.defaultLang||"en",u=l.translations[f];if(u&&typeof u=="object")for(let h in u)c[h]===void 0&&(c[h]=u[h]);let d=new Set(l.languages||[]);for(let h in l.translations)!d.has(h)&&c[h]===void 0&&(c[h]=l.translations[h])}t.state=dt(c)?c:Gt(c),t.state.__element=t,t.state.root=t.state,Zt(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),Zt(t,t.state);return}if(typeof i=="string"){if(t.state=Db(i,e),t.state&&typeof t.state=="object"&&!dt(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}Zt(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=dt(a)?a:Gt(a||{})}else dt(i)?t.state=i:t.state=Gt({...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,Zt(t,t.state)}function wh(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function Db(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let o=t.slice(3);return o?wh(e.state,o):e.state??{}}if(t.startsWith("~/")){let o=e.state?.root||e.state,s=t.slice(2);return s?wh(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=wh(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let n=e.context?.polyglot;if(n?.translations){let o=e.state?.root?.lang||n.defaultLang||"en",s=n.translations[o];if(s?.[t]!==void 0)return s[t];if(n.translations[t]!==void 0)return n.translations[t]}return{}}var Qv=new Set(["s","state","ctx","context"]);function tC(t){try{let r=Function.prototype.toString.call(t).match(/^[^(]*\(([^)]*)\)/);return r?r[1].split(",").map(n=>n.trim().split("=")[0].trim()).filter(Boolean):[]}catch{return[]}}function eC(t){if(typeof t!="function"||t.length!==2)return!1;let e=tC(t);if(e.length<2)return!1;let r=e[1].replace(/[{}[\]]/g,"").trim();return r.length>0&&!Qv.has(r)}function rC(t){let e=t.__ref,r=t.tag||"div",n=t.context?.designSystem,o=[],s=Object.keys(t);for(let i=0;i<s.length;i++){let a=s[i];if(typeof t[a]!="function"||Lt.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||lo(a)||mt[a]||kt&&kt.has(a)||Cr(r,a)||(Vt()&&eC(t[a])&&console.warn(`[smbls] custom prop "${a}"${t.key?` on key "${t.key}"`:""} is a function \u2014 it will be auto-invoked on read and its RETURN VALUE stored, not preserved as a callable reference. If you meant to stash a callback, use el.call('${a}', \u2026) instead of reading el.${a}(\u2026) directly (see RULES.md Rule 8).`),o.push({prop:a,fn:t[a]}))}for(let i=0;i<o.length;i++){let{prop:a,fn:c}=o[i];e.__exec[a]=c,Object.defineProperty(t,a,{get(){n&&rt(n);try{return c(t,t.state,t.context)}catch{return}finally{n&&Q()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function nC(t,e){if(!(!Array.isArray(e)||e.length===0))for(let r=0;r<e.length;r++){let n=e[r];try{typeof n=="function"?n(t,t.state,t.context):typeof n=="string"&&t.state?.[n]}catch{}}}function qt(t,e,r){return!Array.isArray(e)||e.length===0?r:function(...n){return nC(t,e),r.apply(this,n)}}function Bi(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function Lb(t,e){let r=t.__ref,n=!!(e&&e.skipIfEffect);if(rC(t),typeof t.text=="function"){let s=t.text,i=qt(t,t.textDeps,s),a=et(()=>{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=Nr.call(t,c,t.state)),t.tag==="string"?t.node.nodeValue=c:t.node.textContent=c)}catch{}},{depth:r.path.length,label:()=>r.path.join(".")});r.__effects.push(a),r.__exec.text=s}else if(typeof t.text=="string"&&t.text.includes("{{")){let s=t.text,i=et(()=>{if(r.contentManaged)return;let a=Nr.call(t,s,t.state);a!=null&&(t.text=a),t.node&&(t.tag==="string"?t.node.nodeValue=a??"":t.node.textContent=a??"")},{depth:r.path.length,label:()=>r.path.join(".")});r.__effects.push(i),r.__exec.text=s}for(let s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&typeof t[s]=="function"&&!Lt.has(s)&&!lo(s)&&!r.__exec[s]){if(mt[s]){let i=t[s],a=qt(t,t[s+"Deps"],i),c=s,l,f=et(()=>{let u=t.context?.designSystem;u&&rt(u);try{let d=a(t,t.state,t.context),h=mt[c](d,t,t.state,t.context);if(h&&t.node){let g=Th(h);(g===null||g!==l)&&(l=g,co(t.node,h))}else t.node&&(c==="show"||c==="hide")&&(l=void 0,t.node.style.display="")}finally{u&&Q()}},{depth:r.path.length,label:()=>r.path.join(".")});r.__effects.push(f),r.__exec[s]=i}else if(kt&&kt.has(s)){let i=t[s],a=qt(t,t[s+"Deps"],i),c=s,l,f=et(()=>{let u=t.context?.designSystem;u&&rt(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,co(t.node,{[c]:d}))}else l=void 0,t.node.style[c]=""}finally{u&&Q()}},{depth:r.path.length,label:()=>r.path.join(".")});r.__effects.push(f),r.__exec[s]=i}}if(typeof t.html=="function"){let s=t.html,i=qt(t,t.htmlDeps,s),a=et(()=>{let c=t.context?.designSystem;c&&rt(c);try{let l=i(t,t.state,t.context);t.node&&l!=null&&typeof l!="function"&&(t.node.innerHTML=l)}finally{c&&Q()}},{depth:r.path.length,label:()=>r.path.join(".")});r.__effects.push(a),r.__exec.html=s}if(typeof t.value=="function"){let s=t.value,i=qt(t,t.valueDeps,s),a=et(()=>{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:()=>r.path.join(".")});r.__effects.push(a),r.__exec.value=s}if(typeof t.style=="function"){let s=t.style,i=qt(t,t.styleDeps,s),a,c=et(()=>{let l=i(t,t.state,t.context),f=Th(l);(f===null||f!==a)&&(a=f,co(t.node,l))},{depth:r.path.length,label:()=>r.path.join(".")});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=qt(t,Bi(t.styleDeps,s),i),c,l=et(()=>{try{let f=a(t,t.state,t.context);if(t.node){let u=s+":"+String(f);u!==c&&(c=u,co(t.node,{[s]:f}))}}catch{}},{depth:r.path.length,label:()=>r.path.join(".")});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=qt(t,Bi(t.attrDeps,s),t.attr[s]),a=s,c=et(()=>{try{let l=i(t,t.state,t.context);t.node?.setAttribute&&(l==null||l===!1&&!Xe(a)?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,Fe(a,l)))}catch{}},{depth:r.path.length,label:()=>r.path.join(".")});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=qt(t,Bi(t.ariaDeps,s),t.aria[s]),a="aria-"+s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=et(()=>{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,Fe(a,l))}catch{}},{depth:r.path.length,label:()=>r.path.join(".")});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=qt(t,Bi(t.dataDeps,s),t.data[s]),c="data-"+s.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),l=et(()=>{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:()=>r.path.join(".")});r.__effects.push(l)}let o=t.classlist&&typeof t.classlist=="object"&&!Array.isArray(t.classlist)?t.classlist:t.class&&typeof t.class=="object"&&!Array.isArray(t.class)?t.class:null;if(o)for(let s in o){if(typeof o[s]!="function")continue;let i=qt(t,Bi(t.classDeps,s),o[s]),a=et(()=>{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:()=>r.path.join(".")});r.__effects.push(a)}!n&&typeof t.if=="function"&&Fb(t,r,t.if);for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||Lt.has(s)||typeof t[s]!="function")continue;let i=s.charCodeAt(0);if(i>=65&&i<=90||lo(s))continue;let a=t[s];r.__exec[s]=a;let c=t.tag||"div";if(Cr(c,s)&&!mt[s]&&!(kt&&kt.has(s))){let l=vr(s)||s,f=qt(t,t[s+"Deps"],a),u=et(()=>{try{let d=f(t,t.state,t.context);t.node?.setAttribute&&(d==null||d===!1&&!Xe(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,Fe(l,d))))}catch{}},{depth:r.path.length,label:()=>r.path.join(".")});r.__effects.push(u)}}if(iC(t),lC(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let s=t.onStateUpdate,i=t.stateDeps,a=!1,c=[],l=et(()=>{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&&rt(h);try{s(t,t.state,t.context,{prev:d,next:f})}catch(g){if(t.context?.plugins?.length&&vt("error",t,{hook:"onStateUpdate",error:g})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',g),t.context?.strictMode)throw g}finally{h&&Q()}},{depth:r.path.length,label:()=>r.path.join(".")});r.__effects.push(l)}cC(t)}function Ob(t){let e=t.parent,r=e?.node;if(!r||!t.node){Ub(t,t.parent);return}let n=null,o=Object.keys(e),s=o.indexOf(t.key);for(let i=s+1;i<o.length;i++){let a=e[o[i]];if(a?.node?.parentNode===r){n=a.node;break}}n?r.insertBefore(t.node,n):r.appendChild(t.node)}function Fb(t,e,r){let n=qt(t,t.ifDeps,r),o=et(()=>{let s;try{s=n(t,t.state,t.context)}catch(a){if(s=!1,e.__ifError=a,typeof console<"u"&&console.warn){let c=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${c} \u2014 treating as false:`,a?.message||a)}return}let i=e.__if;if(e.__if=!!s,i&&!e.__if&&t.node)t.node.remove();else if(!i&&e.__if)if(e.__ifInitialized)t.node||(t.node=Sr(t)),t.node&&(t.node.ref=t),Ob(t),Eh(t);else{if(e.__ifInitialized=!0,t.tag||(t.tag=_r(t)),Ze("Init",t,{}),t.node||(t.node=Sr(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}Ze("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),Bb(t,{}),Lb(t,{skipIfEffect:!0}),Eh(t),Nb(t),Vb(t,{}),Ob(t),Ib(t,{})}},{depth:e.path.length,label:()=>e.path.join(".")});e.__effects.push(o)}function Eh(t){let{node:e}=t;if(e){if(typeof t.text=="string"&&!t.text.includes("{{")?t.tag==="string"?e.nodeValue=t.text:e.textContent=t.text:typeof t.text=="number"&&(e.textContent=t.text),uC(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"&&co(e,t.style),t.attr&&typeof t.attr=="object")for(let r in t.attr){let n=t.attr[r];typeof n=="function"||typeof n=="object"||n!=null&&(n===!1&&!Xe(r)||e.setAttribute&&e.setAttribute(r,Fe(r,n)))}if(t.data&&typeof t.data=="object")for(let r in t.data){let n=t.data[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||e.dataset&&(e.dataset[r]=n===!0?"":n)}if(t.classlist||t.class){let r=t.classlist||t.class;if(typeof r=="string")r.split(" ").forEach(n=>n&&e.classList.add(n));else if(typeof r=="object")for(let n in r){let o=typeof r[n]=="function"?r[n](t,t.state,t.context):r[n];o&&e.classList.add(typeof o=="string"?o:n)}}}}function Th(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function co(t,e){if(!t||!e||!t.style)return;let r=null;for(let n in e){let o=e[n];if(o!=null){if(n.charAt(0)==="&"&&typeof o=="object"){r||(r={}),r[n]=o;continue}try{let s=String(o),i=n.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),a=s.trim(),c=/\s*!important\s*$/.test(a),l=a.replace(/\s*!important\s*$/,"");t.style.setProperty(i,l,c?"important":"")}catch{}}}r&&sC(t,r)}var oC=0;function sC(t,e){let r=`_ds${oC++}`;t.classList.add(r);let n=t.ownerDocument,o=n.querySelector("style[data-smbls-scoped]");o||(o=n.createElement("style"),o.setAttribute("data-smbls-scoped",""),n.head.appendChild(o));let s="";for(let i in e){let a="."+r,c=i.replace(/&/g,a).split(",").map(f=>{let u=f.trim();return u.includes(a)?u:a+u}).join(", "),l=e[i];if(typeof l=="object"){let f="",u="";for(let d in l){let 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,x=>"-"+x.toLowerCase())}: ${h[m]};`;u+=_e(`${g} { ${p} }`,g)+`
|
|
44
|
-
`}else f+=`${d.replace(/[A-Z]/g,g=>"-"+g.toLowerCase())}: ${h};`}f&&(s+=
|
|
45
|
-
`),u&&(s+=u)}}s&&(o.textContent+=s)}function iC(t){let e=t.subscribeTo;if(typeof e=="function")try{e=e(t,t.state,t.context)}catch{e=null}if(!Array.isArray(e)||e.length===0)return;let r=t.__ref;for(let n=0;n<e.length;n++){let o=e[n];if(typeof o!="string"||o.length===0)continue;let s=o.split("."),i=s[0],a=s.slice(1),c={value:!1},l=et(()=>{let f=t.state&&(dt(t.state)?t.state.root:null);if(!f||!dt(f))return;let u=f;u=u[i];for(let h=0;h<a.length&&!(u==null||typeof u!="object");h++)if(dt(u))u=u[a[h]];else break;if(!c.value)return;let d=!1;if(typeof t.onBeforeUpdate=="function"){let h=t.context?.designSystem;h&&rt(h);try{if(rh(r)){let g=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});g&&typeof g.then=="function"?g.then(()=>Je(r,!1),p=>{Je(r,!0),t.context?.plugins?.length&&vt("error",t,{hook:"onBeforeUpdate",error:p})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",p)}):(Je(r,!1),g===!1&&(d=!0))}}catch(g){Je(r,!0),t.context?.plugins?.length&&vt("error",t,{hook:"onBeforeUpdate",error:g})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",g)}finally{h&&Q()}}if(!d&&t.node&&r.__effects)for(let h=0;h<r.__effects.length;h++){let g=r.__effects[h];g&&g!==l&&!g._disposed&&!g._isSubscribeToEffect&&typeof g._execute=="function"&&g._execute()}if(!d&&typeof t.onUpdate=="function"){let h=t.context?.designSystem;h&&rt(h);try{t.onUpdate(t,t.state,t.context)}catch(g){t.context?.plugins?.length&&vt("error",t,{hook:"onUpdate",error:g})||console.error("[DOMQL] subscribeTo onUpdate error:",g)}finally{h&&Q()}}},{depth:r.path.length,label:()=>r.path.join(".")});c.value=!0,l._isSubscribeToEffect=!0,r.__effects.push(l)}}function $h(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 Rb=new Set;function aC(t,e){let r=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",n=r+"::"+t;Rb.has(n)||(Rb.add(n),console.warn(`[smbls/css] "${t}" at ${r} is a CHILD-COMPONENT key nested inside a pseudo/selector block (":hover", "@dark", etc.) \u2014 that is never a valid CSS selector fragment. The rule is DROPPED (not shipped as a dead/never-matching selector). To reveal a child on a parent state, target the child's OWN class from the parent selector instead, e.g. move the declaration onto the child element itself, or use a sibling-selector combinator in a top-level style block.`))}function fo(t,e,r){let n={},o=new Set,s=(i,a,c)=>{let l=c?new Set(Object.keys(n)):null;if(mt[i]){let f=mt[i](a,e,e.state,e.context);if(f){let u=Array.isArray(f)?f:[f];for(let d of u)d&&Object.assign(n,d)}}else n[i]=a;if(c)for(let f in n)l.has(f)||o.add(f)};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=t[i];if(typeof a=="function"&&(a=a(e,e.state,e.context)),a==null||typeof a=="function")continue;if(typeof a=="object"&&!Array.isArray(a)){if(i==="style"){for(let u in a){let d=a[u];if(typeof d=="function"&&(d=d(e,e.state,e.context)),d==null||typeof d=="function")continue;let h=typeof e[u]=="function"&&(mt[u]||kt&&kt.has(u));s(u,d,h)}continue}if($h(i,e)){let u=fo(a,e,!1);Object.keys(u).length&&(n[`[data-theme="${i.slice(1)}"] &`]=u);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(i)){Vt()&&aC(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=fo(a,e,!1);Object.keys(f).length&&(n[l]=f);continue}let c=typeof e[i]=="function"&&(mt[i]||kt&&kt.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 Ih(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)&&Ih(t[r],e+1))return!0}return!1}function Mb(t,e,r){if(!e||typeof e!="object"||Array.isArray(e))return null;if($h(t,r)){let s=fo(e,r,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let n=t;if(t.charAt(0)==="@"&&!t.startsWith("@media")&&!t.startsWith("@keyframes")){let s=r.context?.designSystem?.media?.[t.slice(1)];s&&(n=`@media ${s}`)}let o=fo(e,r,!1);return Object.keys(o).length?{cssProp:n,block:o}:null}function cC(t){let e=t.__ref;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||!Ah(r))continue;let n=t[r];if(!n||typeof n!="object"||Array.isArray(n)||!Ih(n))continue;let o=null,s,i=et(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&rt(a);let c,l=!1;try{let f=Mb(r,n,t),u=f?Th(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=le({[f.cssProp]:f.block},null,t.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&Q()}if(!(l||!t.node.classList)){if(o)for(let f of o)t.node.classList.remove(f);if(c&&c.length)for(let f of c)t.node.classList.add(f);o=c}},{depth:e.path.length,label:()=>e.path.join(".")});e.__effects.push(i)}}function lC(t){let e=t.__ref;e.__conditionalRunners=[];let r=new Map;for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;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 u=s.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${n}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${o}\` is read as one prop name. Nest the selector inside instead: \`${o}${u}: { '${s.slice(u.length)}': {...} }\`.`)}continue}let i=t[n];if(!i||typeof i!="object")continue;let a=o==="!",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 x=t.context?.cases?.[s];if(x===void 0)return;try{u=typeof x=="function"?x.call(t,t):x}catch(b){u=!1,e.__conditionalError=b,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${n}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,b?.message||b)}}}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 \`${n}\` 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&&rt(g);try{if(h){let p={},m={},x=!1;for(let y in i){if(!Object.prototype.hasOwnProperty.call(i,y))continue;let _=i[y],k=y.charAt(0);if((k===":"||k==="@"||k==="&")&&_&&typeof _=="object"&&!Array.isArray(_)){if($h(y,t)){let R=fo(_,t,!1);Object.keys(R).length&&(m[`[data-theme="${y.slice(1)}"] &`]=R,x=!0)}else{let R=y;if(k==="@"&&!y.startsWith("@media")&&!y.startsWith("@keyframes")){let P=t.context?.designSystem?.media?.[y.slice(1)];P&&(R=`@media ${P}`)}let N=fo(_,t,!1);Object.keys(N).length&&(m[R]=N,x=!0)}continue}let A=typeof _=="function"?_(t,t.state,t.context):_;if(A!=null)if(mt[y]){let R=mt[y](A,t,t.state,t.context);if(R){let N=Array.isArray(R)?R:[R];for(let P of N)P&&Object.assign(p,P)}}else kt&&kt.has(y)&&(p[y]=A)}let b=Object.keys(p);if(b.length){co(t.node,p);for(let y of b)r.set(y,n);c.appliedKeys=b}else c.appliedKeys=null;if(x){let y=le(m,null,t.context?.cssPrefix),_=y?y.split(" ").filter(Boolean):[];if(_.length&&t.node.classList){for(let k of _)t.node.classList.add(k);c.appliedClasses=_}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)===n&&(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&&Q()}};e.__conditionalRunners.push(l);let f=et(l,{depth:e.path.length,label:()=>e.path.join(".")});e.__effects.push(f)}}var kh=new WeakSet;function fC(t){let e=t.ownerDocument;!e||kh.has(e)||(kh.add(e),queueMicrotask(()=>{kh.delete(e);let r=e.body||e.documentElement;r&&r.offsetWidth}))}var vh=new WeakSet,Pb=!1;function uC(t){let{node:e}=t;if(!e)return;if(Pb||(Pb=!0,le({display:"none"})),vh.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}vh.add(t);let r=t.context?.designSystem;r&&rt(r);try{let n={},o=!1;if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&mt.theme){let s=mt.theme(t.theme,t,t.state,t.context);if(s){if(Array.isArray(s))for(let i of s)i&&Object.assign(n,i);else Object.assign(n,s);o=!0}}for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||typeof t[s]=="function"||Lt.has(s)||s==="theme")continue;let i=s.charCodeAt(0);if(!(i>=65&&i<=90)&&!lo(s)){if(mt[s]){let a=t[s],c=mt[s](a,t,t.state,t.context);if(c){if(Array.isArray(c))for(let l of c)l&&Object.assign(n,l);else Object.assign(n,c);o=!0}}else if(kt&&kt.has(s)){let a=t[s];a!=null&&typeof a!="object"&&(n[s]=a,o=!0)}else if(s.charCodeAt(0)===45){let a=t[s];a!=null&&typeof a!="object"&&(n[s]=a,o=!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(Ih(a))continue;let c=Mb(s,a,t);c&&(n[c.cssProp]=c.block,o=!0)}}}}if(o){n.display&&String(n.display).includes("!important")&&(e.style.setProperty("display",String(n.display).replace(/\s*!important\s*$/,""),"important"),delete n.display);let s=le(n,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&&fC(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=n.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=t.display}}}finally{r&&Q(),vh.delete(t)}}function Nb(t){let{node:e}=t;if(!e||!e.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let s=t.aria[o];if(typeof s=="function"||typeof s=="object"||s==null)continue;let i="aria-"+o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());e.setAttribute(i,Fe(i,s))}let r=eh(t);for(let o in r){let s=r[o];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(o,s===!0?"":s)}let n=t.tag||"div";for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||typeof t[o]=="function"||Lt.has(o)||o==="on"||r[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!lo(o)&&!(mt[o]||kt&&kt.has(o))&&Cr(n,o)){let i=t[o];if(i==null||(typeof i=="string"&&i.includes("{{")&&(i=Nr(i,t,t.state,t.context),t[o]=i),i==null||typeof i=="function"||typeof i=="object")||i===!1&&!Xe(vr(o)||o))continue;let a=vr(o)||o;e.setAttribute(a,Fe(a,i))}}}function dC(t){if(!t.autoGrow)return;let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let r=t.autoGrow,n=r&&typeof r=="object"&&r.max?String(r.max):null;n&&(e.style.maxHeight=n);let o=()=>{e.style.height="auto",e.style.height=e.scrollHeight+"px"};o(),e.addEventListener("input",o),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{e.removeEventListener("input",o)}catch{}})}var jb=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function Bb(t,e){for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||!lo(r)||jb.has(r))continue;let n=t[r];if(typeof n=="string"&&/^[A-Za-z_$][\w$]*$/.test(n)){let s=n;n=function(a){return t.call(s,a)}}if(typeof n!="function")continue;let o=Xv(r);wr.has(o)||no(Jv(o),t,n)}pC(t)}function pC(t){let e=t.node;if(!e||!e.addEventListener)return;let r={},n=!1;for(let d of jb){let h=t[d];typeof h=="function"&&(r[d]=h,n=!0)}if(!n)return;let o=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,s=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600,i=0,a=0,c=0,l=!1,f=d=>{let 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 x=Math.abs(g),b=Math.abs(p);if(Math.max(x,b)<o)return;let y;if(x>b*1.2)y=g<0?"left":"right";else if(b>x*1.2)y=p<0?"up":"down";else return;let _="onSwipe"+y.charAt(0).toUpperCase()+y.slice(1),k=r[_],A=r.onSwipe;k&&k.call(t,d,t,t.state,t.context),A&&A.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 Wi(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Wi(o,s):r[n]=s}return r}function Oh(t,e,r){if(!e||!t.node)return;let n=t.childExtends;if(Array.isArray(e)){let o=t.tag==="fragment",s=t.context?.document||globalThis.document,i=o?null:s?.createDocumentFragment();if(!o&&!i)return;let a=t.childProps,c=t.childrenAs;for(let l=0;l<e.length;l++){let f=e[l],u=f;(typeof f=="string"||typeof f=="number")&&(f={text:f});let d=a;if(typeof a=="function")try{d=a(t,f)}catch{d=null}if(c==="state"){let p=u;(typeof u=="string"||typeof u=="number")&&(p={value:u,text:u}),f=d?{...d,state:p}:{state:p}}else d&&(f=Wi(d,f));if(n&&!f.ignoreChildExtends)if(f.extends){let p=Array.isArray(f.extends)?f.extends:[f.extends],m=Array.isArray(n)?n:[n];f={...f,extends:[...m,...p]}}else f={...f,extends:n};let h=f?.key||u&&typeof u=="object"&&u.key||`${l}`,g;try{g=Xt(f,t,h,r)}catch(p){if(typeof console<"u"&&console.error){let m=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${h}" failed to construct at ${m} (initial render, skipping this row):`,p?.message||p)}continue}!o&&g?.node&&i.appendChild(g.node)}return o||t.node.appendChild(i),!0}if(typeof e=="string"){let o=Db(e,t);if(Array.isArray(o))return Oh(t,o,r)}if(typeof e=="object")for(let o in e){if(Lt.has(o))continue;let s=e[o];if(!(s==null||s===!1)){if((typeof s=="string"||typeof s=="number")&&(s={text:s}),t.childProps&&(s=Wi(t.childProps,s)),n&&!s.ignoreChildExtends)if(s.extends){let i=Array.isArray(s.extends)?s.extends:[s.extends],a=Array.isArray(n)?n:[n];s={...s,extends:[...a,...i]}}else s={...s,extends:n};Xt(s,t,o,r)}}}function Rh(t,e){let r=t.node;if(!r||r.tagName!=="SELECT")return;let n=r.options;if(!n||!n.length)return;let o=t.__ref,s=o&&o.__exec&&o.__exec.value,i=typeof s=="function",a=t.value!=null&&typeof t.value!="function";if(i||a){let f;if(i)try{f=s(t,t.state,t.context)}catch{return}else f=t.value;let u=f==null?"":String(f);r.value!==u&&(r.value=u);return}let c=e||!(o&&o.__selectSynced);if(o&&(o.__selectSynced=!0),!c)return;let l=-1;for(let f=0;f<n.length;f++)n[f].defaultSelected&&(l=f);l>=0&&r.selectedIndex!==l&&(r.selectedIndex=l)}function Vb(t,e){let{children:r,content:n}=t,o=t.childExtends;if(typeof r=="function"){let a=r;try{r=a(t,t.state,t.context)}catch(d){if(r=void 0,typeof console<"u"&&console.error){let h=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${h} (initial run, treating as empty):`,d?.message||d)}}t.children=r;let c=t.__ref,l=!1,f=qt(t,t.childrenDeps,a),u=et(()=>{let d=l;l=!0;let h;try{h=f(t,t.state,t.context)}catch(k){if(typeof console<"u"&&console.error){let A=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${A}${d?"":" (initial tracking run)"}:`,k?.message||k)}return}if(!d||h===t.children)return;t.children=h;let g=typeof t.onContentUpdate=="function",p=g?[]:null,m=g?[]:null,x=g?[]:null;if(Array.isArray(h)&&t.childrenAs==="state"){let k=t.childProps,A=[],R=new Map;for(let L=0;L<h.length;L++){let W=h[L],j=k;if(typeof k=="function")try{j=k(t,W)}catch{j=null}let yt=j&&j.key||W&&W.key||`${L}`;A.push(yt),R.set(yt,{rawChild:W,childProps:j})}let N=new Set(A),P=c.__children.slice();for(let L of P)if(!N.has(L)){let W=t[L];W?.remove&&W.remove(),delete t[L],m&&m.push(L)}let $=t.childExtends,V=t.tag==="fragment",_t=t.context?.document||globalThis.document,H=V?null:_t?.createDocumentFragment(),K=new Set;for(let L of A){let W=R.get(L),j=W.rawChild,yt=t[L];if(yt&&yt.state){if(j&&typeof j=="object"){let D=yt.state,J=D.$replace||D.replace,ft=D.$update||D.update;if(typeof J=="function")J.call(D,j);else if(typeof ft=="function"){for(let ot in D)if(!(ot==="__element"||ot==="root"||ot==="parent"||ot==="update")&&!Object.prototype.hasOwnProperty.call(j,ot))try{D[ot]=void 0}catch{}ft.call(D,j)}else for(let ot in j)D[ot]=j[ot]}x&&x.push(L);continue}let ct=j;(typeof j=="string"||typeof j=="number")&&(ct={value:j,text:j});let lt=W.childProps,tt=lt?{...lt,state:ct}:{state:ct};if($&&!tt.ignoreChildExtends)if(tt.extends){let D=Array.isArray(tt.extends)?tt.extends:[tt.extends],J=Array.isArray($)?$:[$];tt={...tt,extends:[...J,...D]}}else tt={...tt,extends:$};let Ct;try{Ct=Xt(tt,t,L,e)}catch(D){if(typeof console<"u"&&console.error){let J=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${L}" failed to construct at ${J} (reconcile, skipping this row):`,D?.message||D)}K.add(L);continue}!V&&Ct?.node&&H&&H.appendChild(Ct.node),p&&p.push(L)}if(!V&&H&&H.childNodes.length&&t.node&&t.node.appendChild(H),!V&&t.node){let L=null;for(let W of A){let j=t[W]?.node;if(!j)continue;let yt=L?L.nextSibling:t.node.firstChild;j!==yt&&t.node.insertBefore(j,yt),L=j}}c.__children=K.size?A.filter(L=>!K.has(L)):A,g&&(p.length||m.length)&&Tb(t,{added:p,removed:m,kept:x}),Rh(t,!1);return}let _=g?[...c.__children]:null;for(let k of[...c.__children]){let A=t[k];A?.remove&&A.remove(),delete t[k]}c.__children=[],Oh(t,h,e),Rh(t,!1),g&&Tb(t,{added:[...c.__children],removed:_,kept:[]})},{depth:c.path.length,label:()=>c.path.join(".")});c.__effects.push(u)}let s=Oh(t,r,e);if(n!=null&&!(n&&n.__ref)){let a=n;if(typeof a=="string"||typeof a=="number"?a={text:a}:typeof a!="object"&&(a={}),t.childProps&&(a=Wi(t.childProps,a)),o&&!a.ignoreChildExtends)if(a.extends){let c=Array.isArray(a.extends)?a.extends:[a.extends],l=Array.isArray(o)?o:[o];a={...a,extends:[...l,...c]}}else a={...a,extends:o};Xt(a,t,"content",e)}if(r&&!s)return;let i=t.context?.components||{};{let a=Object.keys(t);for(let c=0;c<a.length;c++){let l=a[c];if(!l.endsWith("Extends")||typeof t[l]!="string")continue;let f=l.slice(0,-7);if(!f||f.charCodeAt(0)<65||f.charCodeAt(0)>90)continue;let u={extends:t[l]};delete t[l];for(let d=c+1;d<a.length;d++){let h=a[d],g=h.charCodeAt(0);if(g>=65&&g<=90||Lt.has(h)||typeof t[h]=="function"&&(h.startsWith("on")||h.startsWith(".")))break;let p=t[h];p!==void 0&&(u[h]=p,delete t[h])}t[f]&&typeof t[f]=="object"?t[f]={...u,...t[f]}:t[f]=u}}for(let a in t){if(!Object.prototype.hasOwnProperty.call(t,a)||Lt.has(a)||typeof t[a]!="object"||t[a]===null)continue;let c=a.charCodeAt(0);if(c<65||c>90)continue;let l=t[a];if(!l.__ref){if(!l.extends&&!l.extend){let f=i[a]||i[`smbls.${a}`];f&&(l={...l,extends:f})}if(t.childProps&&(l=Wi(t.childProps,l)),o&&!l.ignoreChildExtends)if(l.extends){let f=Array.isArray(l.extends)?l.extends:[l.extends],u=Array.isArray(o)?o:[o];l={...l,extends:[...u,...f]}}else l={...l,extends:o};Xt(l,t,a,e)}}}function Ub(t,e,r){let{node:n}=t;if(!n)return;n.ref=t;let o=e?.tag==="fragment"?e.__ref?.__fragmentAnchor:null;if(o){let i=o.parentNode;if(i){if(r?.position==="before"&&r.node)i.insertBefore(n,r.node);else if(r?.position==="after"&&r.node){let a=r.node.nextSibling;i.insertBefore(n,a||o)}else i.insertBefore(n,o);return}}let s=e?.node||(e?.nodeType?e:null);if(s)if(r?.position==="before"&&r.node)s.insertBefore(n,r.node);else if(r?.position==="after"&&r.node){let i=r.node.nextSibling;i?s.insertBefore(n,i):s.appendChild(n)}else s.appendChild(n)}var Ph=3;function rh(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=Ph?!1:(t.__inBeforeUpdate=!0,!0)}function Je(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===Ph&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${Ph}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function Ze(t,e,r){let n=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&vt(n,e,r);let o="on"+t,s=e[o];if(typeof s=="function"){let c=t==="Render"?"__inRender":t==="RenderRouter"?"__inRenderRouter":null;if(c){if(e.__ref[c])return!0;e.__ref[c]=!0}let l=e.context?.designSystem;l&&rt(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&&vt("error",e,{hook:o,error:h})||console.error(`[DOMQL] Lifecycle "${o}" error:`,h)}).finally(()=>{c&&d&&(d[c]=!1)}),f=!1,!0}if(u===!1)return!1}catch(u){if(e.context?.plugins?.length&&vt("error",e,{hook:o,error:u})||console.error(`[DOMQL] Lifecycle "${o}" error:`,u),e.context?.strictMode)throw u}finally{l&&Q(),f&&e.__ref&&(e.__ref[c]=!1)}}return!0}var zb={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"]},Wb={"gradient-blue-light":`linear-gradient(to right,
|
|
54
|
+
`):"")}}if(Ng(s,!0),Rx(s,e,n),typeof s.html=="function"&&s.node&&!s.node.innerHTML){let p=s.context?.designSystem;p&&st(p);try{let m=s.html(s,s.state,s.context);m!=null&&typeof m!="function"&&(s.node.innerHTML=m)}catch{}finally{p&&rt()}}if(sr("Create",s,o),sr("Complete",s,o),sr("Render",s,o),sr("RenderRouter",s,o),wx(s,o),typeof s.onFrame=="function"){let p=s.onFrame,m=s.context?.designSystem,_=()=>{if(s.node){if(s.node.isConnected){m&&st(m);try{p(s,s.state,s.context)}catch(b){console.error("[DOMQL] onFrame error:",b)}finally{m&&rt()}}requestAnimationFrame(_)}};requestAnimationFrame(_)}return s}function PT(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&&!gt(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,ne(t,t.state);else if(t.context?.state){let a=t.context.state,c={...a},l=t.context?.polyglot;if(l?.translations){let f=a.lang||l.defaultLang||"en",u=l.translations[f];if(u&&typeof u=="object")for(let h in u)c[h]===void 0&&(c[h]=u[h]);let d=new Set(l.languages||[]);for(let h in l.translations)!d.has(h)&&c[h]===void 0&&(c[h]=l.translations[h])}t.state=gt(c)?c:qe(c),t.state.__element=t,t.state.root=t.state,ne(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),ne(t,t.state);return}if(typeof i=="string"){if(t.state=Sx(i,e),t.state&&typeof t.state=="object"&&!gt(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}ne(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=gt(a)?a:qe(a||{})}else gt(i)?t.state=i:t.state=qe({...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,ne(t,t.state)}function Rg(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 Sx(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let n=t.slice(3);return n?Rg(e.state,n):e.state??{}}if(t.startsWith("~/")){let n=e.state?.root||e.state,s=t.slice(2);return s?Rg(n,s):n??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=Rg(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 IT=new Set(["s","state","ctx","context"]);function DT(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 $T(t){if(typeof t!="function"||t.length!==2)return!1;let e=DT(t);if(e.length<2)return!1;let r=e[1].replace(/[{}[\]]/g,"").trim();return r.length>0&&!IT.has(r)}function LT(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"||Ft.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||Rn(a)||bt[a]||kt&&kt.has(a)||Ir(r,a)||(Ot()&&$T(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&&st(o);try{return c(t,t.state,t.context)}catch{return}finally{o&&rt()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function MT(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 Nt(t,e,r){return!Array.isArray(e)||e.length===0?r:function(...o){return MT(t,e),r.apply(this,o)}}function da(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function vt(t,e){return()=>t.path.join(".")+"::"+e}function kx(t,e){let r=t.__ref,o=!!(e&&e.skipIfEffect);if(LT(t),typeof t.text=="function"){let s=t.text,i=Nt(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=qr.call(t,c,t.state)),En(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=qr.call(t,s,t.state);a!=null&&(t.text=a),t.node&&En(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"&&!Ft.has(s)&&!Rn(s)&&!r.__exec[s]){if(bt[s]){let i=t[s],a=Nt(t,t[s+"Deps"],i),c=s,l,f=Q(()=>{let u=t.context?.designSystem;u&&st(u);try{let d=a(t,t.state,t.context),h=bt[c](d,t,t.state,t.context),g=c==="show"||c==="hide";if(h&&t.node){let p=Mg(h),m=g&&t.node.style.display!=="none";(p===null||p!==l||m)&&(l=p,On(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&&rt()}},{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=Nt(t,t[s+"Deps"],i),c=s,l,f=Q(()=>{let u=t.context?.designSystem;u&&st(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,On(t.node,{[c]:d}))}else l=void 0,t.node.style[c]=""}finally{u&&rt()}},{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=Nt(t,t.htmlDeps,s),a=Q(()=>{let c=t.context?.designSystem;c&&st(c);try{let l=i(t,t.state,t.context);t.node&&l!=null&&typeof l!="function"&&(t.node.innerHTML=l)}finally{c&&rt()}},{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=Nt(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=Nt(t,t.styleDeps,s),a,c=Q(()=>{let l=i(t,t.state,t.context),f=Mg(l);(f===null||f!==a)&&(a=f,On(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=Nt(t,da(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,On(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=Nt(t,da(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&&!or(a)?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,ze(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=Nt(t,da(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,ze(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=Nt(t,da(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=Nt(t,da(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"&&vx(t,r,t.if);for(let s of Object.keys(t)){if(Ft.has(s)||typeof t[s]!="function")continue;let i=s.charCodeAt(0);if(i>=65&&i<=90||Rn(s))continue;let a=t[s];r.__exec[s]=a;let c=t.tag||"div";if(Ir(c,s)&&!bt[s]&&!(kt&&kt.has(s))){let l=Pr(s)||s,f=Nt(t,t[s+"Deps"],a),u=Q(()=>{try{let d=f(t,t.state,t.context);t.node?.setAttribute&&(d==null||d===!1&&!or(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,ze(l,d))))}catch{}},{depth:r.path.length,label:vt(r,s)});r.__effects.push(u)}}if(BT(t),HT(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&&st(h);try{s(t,t.state,t.context,{prev:d,next:f})}catch(g){if(t.context?.plugins?.length&&Ct("error",t,{hook:"onStateUpdate",error:g})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',g),t.context?.strictMode)throw g}finally{h&&rt()}},{depth:r.path.length,label:vt(r,"onStateUpdate")});r.__effects.push(l)}VT(t)}function gx(t){let e=t.parent,r=e?.node;if(!r||!t.node){Rx(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 vx(t,e,r){let o=Nt(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();else if(!i&&e.__if)if(e.__ifInitialized)t.node||(t.node=Tr(t)),t.node&&(t.node.ref=t),gx(t),Lg(t);else{if(e.__ifInitialized=!0,t.tag||(t.tag=Ar(t)),sr("Init",t,{}),t.node||(t.node=Tr(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}sr("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),Tx(t,{}),kx(t,{skipIfEffect:!0}),Lg(t),Ex(t),Ox(t,{}),gx(t),wx(t,{})}},{depth:e.path.length,label:vt(e,"if")});e.__effects.push(n)}function En(t,e){let r=t.node;if(!r)return;let o=e==null?"":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 Lg(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&En(t,t.text),WT(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"&&On(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&&!or(r)||e.setAttribute&&e.setAttribute(r,ze(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 Mg(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function On(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&&NT(t,r)}var FT=0;function NT(t,e){let r=`_ds${FT++}`;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,_=>"-"+_.toLowerCase())}: ${h[m]};`;u+=Ae(`${g} { ${p} }`,g)+`
|
|
55
|
+
`}else f+=`${d.replace(/[A-Z]/g,g=>"-"+g.toLowerCase())}: ${h};`}f&&(s+=Ae(`${c} { ${f} }`,c)+`
|
|
56
|
+
`),u&&(s+=u)}}s&&(n.textContent+=s)}var mx=new Set;function yx(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 jT(t,e,r){let o=yx(r);queueMicrotask(()=>{if(!t.__ref)return;let n;try{n=e(t,t.state,t.context)}catch{return}if(yx(n)===o)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";mx.has(s)||(mx.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 BT(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&&Ot()&&jT(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&&(gt(t.state)?t.state.root:null);if(!d||!gt(d))return;let h=d;h=h[c];for(let p=0;p<l.length&&!(h==null||typeof h!="object");p++)if(gt(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&&st(p);try{if(cg(n)){let m=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});m&&typeof m.then=="function"?m.then(()=>nr(n,!1),_=>{nr(n,!0),t.context?.plugins?.length&&Ct("error",t,{hook:"onBeforeUpdate",error:_})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",_)}):(nr(n,!1),m===!1&&(g=!0))}}catch(m){nr(n,!0),t.context?.plugins?.length&&Ct("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}finally{p&&rt()}}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&&st(p);try{t.onUpdate(t,t.state,t.context)}catch(m){t.context?.plugins?.length&&Ct("error",t,{hook:"onUpdate",error:m})||console.error("[DOMQL] subscribeTo onUpdate error:",m)}finally{p&&rt()}}},{depth:n.path.length,label:vt(n,"subscribeTo("+i+")")});f.value=!0,u._isSubscribeToEffect=!0,n.__effects.push(u)}}function Bg(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 bx=new Set;function UT(t,e){let r=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",o=r+"::"+t;bx.has(o)||(bx.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 Pn(t,e,r){let o={},n=new Set,s=(i,a,c)=>{let l=c?new Set(Object.keys(o)):null;if(bt[i]){let f=bt[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"&&(bt[u]||kt&&kt.has(u));s(u,d,h)}continue}if(Bg(i,e)){let u=Pn(a,e,!1);Object.keys(u).length&&(o[`[data-theme="${i.slice(1)}"] &`]=u);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(i)){Ot()&&UT(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=Pn(a,e,!1);Object.keys(f).length&&(o[l]=f);continue}let c=typeof e[i]=="function"&&(bt[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 Ug(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)&&Ug(t[r],e+1))return!0}return!1}function Cx(t,e,r){if(!e||typeof e!="object"||Array.isArray(e))return null;if(Bg(t,r)){let s=Pn(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=Pn(e,r,!1);return Object.keys(n).length?{cssProp:o,block:n}:null}function VT(t){let e=t.__ref;for(let r of Object.keys(t)){if(!$g(r))continue;let o=t[r];if(!o||typeof o!="object"||Array.isArray(o)||!Ug(o))continue;let n=null,s,i=Q(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&st(a);let c,l=!1;try{let f=Cx(r,o,t),u=f?Mg(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=me({[f.cssProp]:f.block},null,t.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&rt()}if(!(l||!t.node.classList)){if(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 HT(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 _=t.context?.cases?.[s];if(_===void 0)return;try{u=typeof _=="function"?_.call(t,t):_}catch(b){u=!1,e.__conditionalError=b,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,b?.message||b)}}}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&&st(g);try{if(h){let p={},m={},_=!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(Bg(y,t)){let T=Pn(x,t,!1);Object.keys(T).length&&(m[`[data-theme="${y.slice(1)}"] &`]=T,_=!0)}else{let T=y;if(k==="@"&&!y.startsWith("@media")&&!y.startsWith("@keyframes")){let M=t.context?.designSystem?.media?.[y.slice(1)];M&&(T=`@media ${M}`)}let $=Pn(x,t,!1);Object.keys($).length&&(m[T]=$,_=!0)}continue}let C=typeof x=="function"?x(t,t.state,t.context):x;if(C!=null)if(bt[y]){let T=bt[y](C,t,t.state,t.context);if(T){let $=Array.isArray(T)?T:[T];for(let M of $)M&&Object.assign(p,M)}}else kt&&kt.has(y)&&(p[y]=C)}let b=Object.keys(p);if(b.length){On(t.node,p);for(let y of b)r.set(y,o);c.appliedKeys=b}else c.appliedKeys=null;if(_){let y=me(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&&rt()}};e.__conditionalRunners.push(l);let f=Q(l,{depth:e.path.length,label:vt(e,"conditional("+o+")")});e.__effects.push(f)}}var Pg=new WeakSet;function zT(t){let e=t.ownerDocument;!e||Pg.has(e)||(Pg.add(e),queueMicrotask(()=>{Pg.delete(e);let r=e.body||e.documentElement;r&&r.offsetWidth}))}var Ig=new WeakSet,_x=!1;function WT(t){let{node:e}=t;if(!e)return;if(_x||(_x=!0,me({display:"none"})),Ig.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}Ig.add(t);let r=t.context?.designSystem;r&&st(r),gg();try{let o={},n=!1;if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&bt.theme){let s=bt.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"||Ft.has(s)||s==="theme")continue;let i=s.charCodeAt(0);if(!(i>=65&&i<=90)&&!Rn(s)){if(bt[s]){let a=t[s],c=bt[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(Ug(a))continue;let c=Cx(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=me(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&&zT(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{mg(),r&&rt(),Ig.delete(t)}}function Ex(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,ze(i,s))}let r=ag(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"||Ft.has(n)||n==="on"||r[n]!==void 0)continue;let s=n.charCodeAt(0);if(!(s>=65&&s<=90)&&!Rn(n)&&!(bt[n]||kt&&kt.has(n))&&Ir(o,n)){let i=t[n];if(i==null||(typeof i=="string"&&i.includes("{{")&&(i=qr(i,t,t.state,t.context),t[n]=i),i==null||typeof i=="function"||typeof i=="object")||i===!1&&!or(Pr(n)||n))continue;let a=Pr(n)||n;e.setAttribute(a,ze(a,i))}}}function qT(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 KT(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"?Nt(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}qT(t,a)},{depth:r.path.length,label:vt(r,"autoGrow")});r.__effects||(r.__effects=[]),r.__effects.push(s),n&&(r.__exec.autoGrow=o)}var Ax=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function Tx(t,e){for(let r of Object.keys(t)){if(!Rn(r)||Ax.has(r))continue;let o=ef(r);if(o){rf(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=OT(r);Or.has(s)||kn(RT(s),t,n)}GT(t)}function GT(t){let e=t.node;if(!e||!e.addEventListener)return;let r={},o=!1;for(let d of Ax){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 _=Math.abs(g),b=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],C=r.onSwipe;k&&k.call(t,d,t,t.state,t.context),C&&C.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 ma(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]=ma(n,s):r[o]=s}return r}function Fg(t,e,r){if(!e||!t.node)return;let o=t.childExtends;if(Array.isArray(e)){let n=t.tag==="fragment",s=t.context?.document||globalThis.document,i=n?null:s?.createDocumentFragment();if(!n&&!i)return;let a=t.childProps,c=t.childrenAs;for(let l=0;l<e.length;l++){let f=e[l],u=f;(typeof f=="string"||typeof f=="number")&&(f={text:f});let d=a;if(typeof a=="function")try{d=a(t,f)}catch{d=null}if(c==="state"){let p=u;(typeof u=="string"||typeof u=="number")&&(p={value:u,text:u}),f=d?{...d,state:p}:{state:p}}else d&&(f=ma(d,f));if(o&&!f.ignoreChildExtends)if(f.extends){let p=Array.isArray(f.extends)?f.extends:[f.extends],m=Array.isArray(o)?o:[o];f={...f,extends:[...m,...p]}}else f={...f,extends:o};let h=f?.key||u&&typeof u=="object"&&u.key||`${l}`,g;try{g=ee(f,t,h,r)}catch(p){if(typeof console<"u"&&console.error){let m=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${h}" failed to construct at ${m} (initial render, skipping this row):`,p?.message||p)}continue}!n&&g?.node&&i.appendChild(g.node)}return n||t.node.appendChild(i),!0}if(typeof e=="string"){let n=Sx(e,t);if(Array.isArray(n))return Fg(t,n,r)}if(typeof e=="object")for(let n in e){if(Ft.has(n))continue;let s=e[n];if(!(s==null||s===!1)){if((typeof s=="string"||typeof s=="number")&&(s={text:s}),t.childProps&&(s=ma(t.childProps,s)),o&&!s.ignoreChildExtends)if(s.extends){let i=Array.isArray(s.extends)?s.extends:[s.extends],a=Array.isArray(o)?o:[o];s={...s,extends:[...a,...i]}}else s={...s,extends:o};ee(s,t,n,r)}}}function Ng(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 Ox(t,e){let{children:r,content:o}=t,n=t.childExtends;if(typeof r=="function"){let a=r;try{r=a(t,t.state,t.context)}catch(d){if(r=void 0,typeof console<"u"&&console.error){let h=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${h} (initial run, treating as empty):`,d?.message||d)}}t.children=r;let c=t.__ref,l=!1,f=Nt(t,t.childrenDeps,a),u=Q(()=>{let d=l;l=!0;let h;try{h=f(t,t.state,t.context)}catch(k){if(typeof console<"u"&&console.error){let C=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${C}${d?"":" (initial tracking run)"}:`,k?.message||k)}return}if(!d||h===t.children)return;t.children=h;let g=typeof t.onContentUpdate=="function",p=g?[]:null,m=g?[]:null,_=g?[]:null;if(Array.isArray(h)&&t.childrenAs==="state"){let k=t.childProps,C=[],T=new Map;for(let I=0;I<h.length;I++){let F=h[I],N=k;if(typeof k=="function")try{N=k(t,F)}catch{N=null}let St=N&&N.key||F&&F.key||`${I}`;C.push(St),T.set(St,{rawChild:F,childProps:N})}let $=new Set(C),M=c.__children.slice();for(let I of M)if(!$.has(I)){let F=t[I];F?.remove&&F.remove(),delete t[I],m&&m.push(I)}let D=t.childExtends,V=t.tag==="fragment",H=t.context?.document||globalThis.document,G=V?null:H?.createDocumentFragment(),ft=new Set;for(let I of C){let F=T.get(I),N=F.rawChild,St=t[I];if(St&&St.state){if(N&&typeof N=="object"){let L=St.state,W=L.$replace||L.replace,K=L.$update||L.update;try{if(typeof W=="function")W.call(L,N);else if(typeof K=="function"){for(let Z in L)if(!(Z==="__element"||Z==="root"||Z==="parent"||Z==="update")&&!Object.prototype.hasOwnProperty.call(N,Z))try{L[Z]=void 0}catch{}K.call(L,N)}else for(let Z in N)L[Z]=N[Z]}catch(Z){if(typeof console<"u"&&console.error){let To=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${I}" failed to patch at ${To} (reconcile, keeping its previous data for this pass):`,Z?.message||Z)}}}_&&_.push(I);continue}let Dt=N;(typeof N=="string"||typeof N=="number")&&(Dt={value:N,text:N});let xe=F.childProps,J=xe?{...xe,state:Dt}:{state:Dt};if(D&&!J.ignoreChildExtends)if(J.extends){let L=Array.isArray(J.extends)?J.extends:[J.extends],W=Array.isArray(D)?D:[D];J={...J,extends:[...W,...L]}}else J={...J,extends:D};let dt;try{dt=ee(J,t,I,e)}catch(L){if(typeof console<"u"&&console.error){let W=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${I}" failed to construct at ${W} (reconcile, skipping this row):`,L?.message||L)}ft.add(I);continue}!V&&dt?.node&&G&&G.appendChild(dt.node),p&&p.push(I)}if(!V&&G&&G.childNodes.length&&t.node&&t.node.appendChild(G),!V&&t.node){let I=null;for(let F of C){let N=t[F]?.node;if(!N)continue;let St=I?I.nextSibling:t.node.firstChild;N!==St&&t.node.insertBefore(N,St),I=N}}c.__children=ft.size?C.filter(I=>!ft.has(I)):C,g&&(p.length||m.length)&&hx(t,{added:p,removed:m,kept:_}),Ng(t,!1);return}let x=g?[...c.__children]:null;for(let k of[...c.__children]){let C=t[k];C?.remove&&C.remove(),delete t[k]}c.__children=[],Fg(t,h,e),Ng(t,!1),g&&hx(t,{added:[...c.__children],removed:x,kept:[]})},{depth:c.path.length,label:vt(c,"children")});c.__effects.push(u)}let s=Fg(t,r,e);if(o!=null&&!(o&&o.__ref)){let a=o;if(typeof a=="string"||typeof a=="number"?a={text:a}:typeof a!="object"&&(a={}),t.childProps&&(a=ma(t.childProps,a)),n&&!a.ignoreChildExtends)if(a.extends){let c=Array.isArray(a.extends)?a.extends:[a.extends],l=Array.isArray(n)?n:[n];a={...a,extends:[...l,...c]}}else a={...a,extends:n};ee(a,t,"content",e)}if(r&&!s)return;let i=t.context?.components||{};{let a=Object.keys(t);for(let c=0;c<a.length;c++){let l=a[c];if(!l.endsWith("Extends")||typeof t[l]!="string")continue;let f=l.slice(0,-7);if(!f||f.charCodeAt(0)<65||f.charCodeAt(0)>90)continue;let u={extends:t[l]};delete t[l];for(let d=c+1;d<a.length;d++){let h=a[d],g=h.charCodeAt(0);if(g>=65&&g<=90||Ft.has(h)||typeof t[h]=="function"&&(h.startsWith("on")||h.startsWith(".")))break;let p=t[h];p!==void 0&&(u[h]=p,delete t[h])}t[f]&&typeof t[f]=="object"?t[f]={...u,...t[f]}:t[f]=u}}for(let a of Object.keys(t)){if(Ft.has(a)||typeof t[a]!="object"||t[a]===null)continue;let c=a.charCodeAt(0);if(c<65||c>90)continue;let l=t[a];if(!l.__ref){if(!l.extends&&!l.extend){let f=i[a]||i[`smbls.${a}`];f&&(l={...l,extends:f})}if(t.childProps&&(l=ma(t.childProps,l)),n&&!l.ignoreChildExtends)if(l.extends){let f=Array.isArray(l.extends)?l.extends:[l.extends],u=Array.isArray(n)?n:[n];l={...l,extends:[...u,...f]}}else l={...l,extends:n};ee(l,t,a,e)}}}function Rx(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 jg=3;function cg(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=jg?!1:(t.__inBeforeUpdate=!0,!0)}function nr(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===jg&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${jg}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function sr(t,e,r){let o=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&Ct(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&&st(l);let f=!!c;try{let u=s(e,e.state,e.context,r);if(u&&typeof u.then=="function"){let d=e.__ref;return u.catch(h=>{e.context?.plugins?.length&&Ct("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&&Ct("error",e,{hook:n,error:u})||console.error(`[DOMQL] Lifecycle "${n}" error:`,u),e.context?.strictMode)throw u}finally{l&&rt(),f&&e.__ref&&(e.__ref[c]=!1)}}return!0}var Px={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"]},Ix={"gradient-blue-light":`linear-gradient(to right,
|
|
46
57
|
rgba(4, 116, 242, 1),
|
|
47
58
|
rgba(0, 48, 103, 1)
|
|
48
59
|
)`,"gradient-blue-dark":`linear-gradient(to right,
|
|
@@ -68,16 +79,55 @@ FROM ${a}${l}`},J0=t=>{let e=[],r=(n,o)=>{for(let s in n){let i=o?`${o}/${s}`:s;
|
|
|
68
79
|
#1E54F0 36%,
|
|
69
80
|
#8B4CCA 69%,
|
|
70
81
|
#C66894 100%
|
|
71
|
-
)`};var hC={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"}}}},gC={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},mC={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"}}},Hb={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...hC,...gC,...mC,none:{color:"none",background:"none"},transparent:{color:"currentColor",background:"transparent"}};var qb={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var Kb={ratio:1.618,subSequence:!0};var Gb={SourceSans:[{url:""}]},Yb={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 Xb={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 Jb={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 Zb={base:150,ratio:1.333,unit:"ms",subSequence:!0};var Qb={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var Hi={version:"0.0.1",color:zb,gradient:Wb,theme:Hb,typography:qb,spacing:Kb,font:Gb,fontFamily:Yb,timing:Zb,icons:Xb,media:Jb,sizes:Qb,reset:{html:{},body:{}},animation:{fadeIn:{from:{opacity:0},to:{opacity:1}}},devices:{},class:{},svg:{},grid:{},shape:{}};var po={};I(po,{A:()=>h_,AssetPicture:()=>yx,Audio:()=>_x,Avatar:()=>O_,B:()=>jx,Block:()=>tx,Box:()=>kl,Br:()=>zx,Button:()=>y_,ButtonSet:()=>S_,COMPONENTS:()=>on,Caption:()=>Rx,Checkbox:()=>Qx,CheckboxHgroup:()=>t_,Circle:()=>hx,CircleButton:()=>x_,Clickable:()=>ux,Data:()=>Vx,Dialog:()=>k_,DialogFooter:()=>C_,DialogHeader:()=>v_,Dropdown:()=>P_,DropdownList:()=>$_,DropdownParent:()=>I_,DropdownParentFocus:()=>D_,DropdownSiblingFocus:()=>L_,FileIcon:()=>f_,Flex:()=>rx,Focusable:()=>dx,FocusableComponent:()=>px,Footnote:()=>Nx,Form:()=>cx,Grid:()=>ox,Gutter:()=>ix,H1:()=>kx,H2:()=>vx,H3:()=>Cx,H4:()=>Ax,H5:()=>Ex,H6:()=>Tx,Headline:()=>Fx,Hgroup:()=>Gx,HgroupButton:()=>Xx,HgroupRows:()=>Yx,Hoverable:()=>fx,Hr:()=>Ux,I:()=>Bx,Icon:()=>c_,IconButton:()=>w_,IconText:()=>l_,Iframe:()=>lx,Img:()=>ax,Inline:()=>ex,InlineFlex:()=>nx,InlineGrid:()=>sx,Input:()=>Jx,Italic:()=>Dx,KangorooButton:()=>__,Li:()=>Wx,Link:()=>lg,Notification:()=>F_,NumberInput:()=>Zx,Ol:()=>qx,P:()=>Ox,Picture:()=>mx,Radio:()=>e_,RadioHgroup:()=>r_,Range:()=>R_,RouteLink:()=>g_,RouterLink:()=>fg,SHAPES:()=>Sl,Select:()=>m_,Shape:()=>Bh,Span:()=>wx,SquareButton:()=>b_,Strong:()=>Px,Subhead:()=>Mx,Svg:()=>bx,Text:()=>Sx,Textarea:()=>s_,TextareaWithButton:()=>i_,Theme:()=>gx,Title:()=>Lx,Toggle:()=>n_,ToggleHgroup:()=>o_,Tooltip:()=>A_,TooltipHidden:()=>E_,TooltipParent:()=>T_,U:()=>$x,Ul:()=>Hx,Underline:()=>Ix,Video:()=>xx,depth:()=>wl,getSystemGlobalTheme:()=>qi});var Lh={};I(Lh,{Block:()=>tx,Flex:()=>rx,Grid:()=>ox,Gutter:()=>ix,Inline:()=>ex,InlineFlex:()=>nx,InlineGrid:()=>sx});var tx={display:"block"},ex={display:"inline"},rx={display:"flex"},nx={display:"inline-flex"},ox={display:"grid"},sx={display:"inline-grid"},ix={boxSize:"C1"};var Fh={};I(Fh,{Img:()=>ax});O();var ax={tag:"img",attr:{title:t=>t.title||t.alt,alt:t=>t.alt!=null?t.alt:t.title||"",src:t=>{let e=zt(t);return e&&e.src||t.src},srcset:t=>{let e=zt(t);return(e?Ks(e):"")||t.srcset}}};var Mh={};I(Mh,{Form:()=>cx});var cx={tag:"form"};var Nh={};I(Nh,{Iframe:()=>lx});var lx={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var jh={};I(jh,{Clickable:()=>ux,Focusable:()=>dx,FocusableComponent:()=>px,Hoverable:()=>fx});var yC={appearance:"none",cursor:"pointer",fontFamily:"inherit"},fx={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}}},ux={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}},dx={border:"none",outline:"solid 0 blue.3",":focus-visible":{opacity:1,outline:"solid X blue.3"},attr:{tabIndex:t=>t.tabIndex}},px={extends:"Focusable",tag:"button",fontSize:"A",type:"button",border:"none",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",fontFamily:"inherit",style:yC};var zh={};I(zh,{Picture:()=>mx});var Uh={};I(Uh,{Theme:()=>gx,getSystemGlobalTheme:()=>qi});var Vh={};I(Vh,{Circle:()=>hx,SHAPES:()=>Sl,Shape:()=>Bh,default:()=>bC,depth:()=>wl});O();var de=C(),wl={4:{boxShadow:`rgba(0,0,0,.10) 0 2${de.unit.default} 4${de.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${de.unit.default} 6${de.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${de.unit.default} 10${de.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${de.unit.default} 16${de.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${de.unit.default} 26${de.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${de.unit.default} 42${de.unit.default}`}},uo=t=>X(t.shapeDirectionColor)||X(t.borderColor)||X(t.backgroundColor)||X(t.background),_l=t=>{let e=Mi.transition(t.transition,t);return e&&e.transition},Sl={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:uo(t),transition:_l(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:uo(t),transition:_l(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:uo(t),transition:_l(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:_l(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${uo(t)} 25%, transparent 25%), linear-gradient(315deg, ${uo(t)} 25%, transparent 25%)`},"&:after":{background:uo(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)"}}}},Bh={deps:{exec:it,getSpacingBasedOnRatio:xe,getMediaColor:Ot},classlist:{shape:t=>t.deps.exec(Sl[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=Sl[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}}},hx={round:"100%"},bC=Bh;O();var qi=({context:t,state:e})=>{let r=e&&e.root,n=r&&r.globalTheme||t.designSystem&&t.designSystem.globalTheme;return n==="auto"?null:n},gx={deps:{depth:wl},classlist:{depth:t=>!At(t.depth)&&t.deps.depth[t.depth]}};var mx={deps:{getSystemGlobalTheme:qi},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:qi},tag:"source",attr:{media:t=>{let{key:e,context:r,deps:n}=t,{media:o}=r.designSystem,s=n.getSystemGlobalTheme(t),i=(t.media||e).slice(1);return i===s?"(min-width: 0px)":i==="dark"||i==="light"?"(max-width: 0px)":o[i]}}},Img:{width:"inherit",ignoreChildExtends:!0,height:"inherit",src:(t,e)=>t.parent?.src||e.src}};var Wh={};I(Wh,{AssetPicture:()=>yx});O();var yx={tag:"picture",children:t=>{let e=zt(t);if(e)return Gs(e,t.alt)}};var Hh={};I(Hh,{Svg:()=>bx});var bx={tag:"svg",attr:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},html:t=>{let{context:e}=t;if(t.semanticIcons)return;if(t.html&&typeof t.html!="function")return t.call("exec",t.html,t);let{designSystem:r,utils:n}=e,o=r&&r.svg,s=t.spriteId||r&&r.useSvgSprite,i=t.call("exec",t.src,t);if(!s&&i)return i;let a=d=>`<use xlink:href="#${d}" />`,c=t.spriteId;if(c)return a(c);if(o&&o[i])return a(i);let l=Symbol.for(i),f=o[l];if(f&&o[f])return a(f);if(!i)return a("");if(typeof i=="string"&&!i.includes("<"))return typeof console<"u"&&console.warn&&console.warn(`[Svg] Unknown sprite symbol "${i}" \u2014 not registered in design-system sprite. Set the icon name to one that exists in designSystem.icons / context.svg, or register the SVG body via utils.init({ svg: { '${i}': '<svg>...</svg>' } }).`),a("");let u=0;for(let d=0;d<i.length;d++)u=(u<<5)-u+i.charCodeAt(d)|0;return f=o[l]=`svg-${(u>>>0).toString(36)}`,n.init({svg:{[f]:i}},{document:e.document,emotion:e.emotion}),a(f)}};var qh={};I(qh,{Video:()=>xx});O();var xx={tag:"video",controls:!0,attr:{src:t=>{let e=zt(t);return e&&e.src||t.src}},children:t=>{let e=zt(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 Kh={};I(Kh,{Audio:()=>_x});O();var _x={tag:"audio",controls:!0,attr:{src:t=>{let e=zt(t);return e&&e.src||t.src}},children:t=>{let e=zt(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 Gh={};I(Gh,{B:()=>jx,Caption:()=>Rx,Data:()=>Vx,Footnote:()=>Nx,H1:()=>kx,H2:()=>vx,H3:()=>Cx,H4:()=>Ax,H5:()=>Ex,H6:()=>Tx,Headline:()=>Fx,I:()=>Bx,Italic:()=>Dx,P:()=>Ox,Span:()=>wx,Strong:()=>Px,Subhead:()=>Mx,Text:()=>Sx,Title:()=>Lx,U:()=>$x,Underline:()=>Ix});var Sx={},wx={tag:"span"},kx={tag:"h1"},vx={tag:"h2"},Cx={tag:"h3"},Ax={tag:"h4"},Ex={tag:"h5"},Tx={tag:"h6"},Ox={tag:"p"},Rx={tag:"caption"},Px={tag:"strong",fontWeight:"700"},$x={tag:"u"},Ix={tag:"u"},Dx={tag:"i"},Lx={},Fx={tag:"h6",fontSize:"B",fontWeight:500},Mx={tag:"span",fontSize:"Z1"},Nx={tag:"span",fontSize:"Z"},jx={tag:"b"},Bx={tag:"i"},Vx={tag:"data"};var Yh={};I(Yh,{Box:()=>kl,Br:()=>zx,Hr:()=>Ux,Li:()=>Wx,Ol:()=>qx,Ul:()=>Hx});var xC=t=>{if(!t.context)return;let{props:e,__ref:r}=t,n=Jt(e,t,{unpack:!1});r.__class=n},kl={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:xC},Ux={tag:"hr",margin:"C1 0"},zx={tag:"br"},Wx={tag:"li"},Hx={tag:"ul",childExtends:{extends:"Li"}},qx={tag:"ol",childExtends:{extends:"Li"}};var Xh={};I(Xh,{Hgroup:()=>Gx,HgroupButton:()=>Xx,HgroupRows:()=>Yx});var Kx=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},Gx={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:Kx,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:Kx,margin:"0",color:"paragraph"}},Yx={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},Xx={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var Jh={};I(Jh,{Input:()=>Jx});var Jx={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 Zh={};I(Zh,{NumberInput:()=>Zx});var Zx={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 Qh={};I(Qh,{Checkbox:()=>Qx,CheckboxHgroup:()=>t_});var Qx={extends:"Focusable",tag:"label",boxSize:"fit-content fit-content",cursor:"pointer",round:"Y",Input:{type:"checkbox",position:"absolute",opacity:"0",width:"1px",height:"1px",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",":checked + div":{theme:"primary"},":checked + div > svg":{transform:"none",opacity:"1"},":focus-visible + div":{outline:"solid X blue.3",outlineOffset:"Z"},attr:{checked:t=>t.call("exec",t.parent.checked)}},Flex:{align:"center center",fontSize:"B1",padding:"V",theme:"field",round:"X2",transition:"background A defaultBezier",Icon:{icon:"check",opacity:"0",transform:"scale(0.9) rotate(-15deg)",transition:"opacity B defaultBezier"}}},t_={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var tg={};I(tg,{Radio:()=>e_,RadioHgroup:()=>r_});var e_={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}},r_={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var eg={};I(eg,{Toggle:()=>n_,ToggleHgroup:()=>o_});var n_={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}},o_={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var rg={};I(rg,{Textarea:()=>s_,TextareaWithButton:()=>i_});var s_={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"}},i_={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 ng={};I(ng,{FileIcon:()=>f_,Icon:()=>c_,IconText:()=>l_});var a_=new Set,_C=(t,e)=>{if(!a_.has(t)&&(a_.add(t),typeof console<"u"&&console.warn)){let r=e&&e.__ref&&e.__ref.path,n=r&&r.length?` at <${r.join(".")}>`:"";console.warn(`[Icon] Unknown icon name "${t}"${n} \u2014 not registered in designSystem.icons, rendering the noIcon placeholder. Fix the name or register the icon in the design system.`)}},c_={extends:"Svg",width:"A",height:"A",display:"inline-block",style:{fill:"currentColor","*":{fill:"currentColor"}},onInit:(t,e,r)=>{let{parent:n}=t,{icons:o,useIconSprite:s,verbose:i}=r&&r.designSystem,{toCamelCase:a}=r&&r.utils,c=g=>{let p=g[".isActive"];if(p)return g.call("exec",p.name||p.icon)},l=(g,p,m)=>{let{semanticIcons:x}=m&&m.designSystem,{toCamelCase:b}=m&&m.utils,y=f(g,p),k=b(y).split(/([a-z])([A-Z])/g),A=k[1]?k[0]:y.split(".")[0].split(" ")[0],R=x&&x[A];if(R){let N=y.includes(".")?"sfsymbols."+y.split(".").slice(1).join("."):"sfsymbols";return y=R[N]||R[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,x=g.call("exec",g.name||g.icon||m,g);return g.call("isString",x)&&x.includes("{{")&&(x=g.call("replaceLiteralsWithObjectFields",x)),g.call("isString",x)?x:m},u=t.src,h=et(()=>{let g=f(t,e),p=g;if(g.includes(" ")){let $=g.split(" ");g=$[0]+$.slice(1).map(V=>V.charAt(0).toUpperCase()+V.slice(1)).join("")}let m=a(g),x=m.split(/([a-z])([A-Z])/g),b=l(t,e,r);if(b){Object.assign(t,b);return}let y;t.isActive&&(y=c(t));let _=n[".isActive"];n&&n.isActive&&_&&_.icon&&(y=t.call("exec",_.icon||_.Icon.name||_.Icon.icon,t)),t.call("isString",y)&&y.includes("{{")&&(y=t.call("replaceLiteralsWithObjectFields",y));let k;o[y]&&(k=y),o[m]?k=m:o[x[0]+x[1]]?k=x[0]+x[1]:o[x[0]]?k=x[0]:i&&t.warn("Can't find icon:",g,k);let A=o[k],R=n&&n.src||u;!A&&!R&&_C(p,t);let N=s&&k,P=A||R||o.noIcon;if(!(t.spriteId===N&&t.src===P&&t.node&&t.node.innerHTML)&&(t.spriteId=N,t.src=P,typeof t.html=="function"&&t.node)){let $=t.context&&t.context.designSystem;$&&rt($);try{let V=t.html(t,t.state,t.context);V!=null&&typeof V!="function"&&(t.node.innerHTML=V)}finally{$&&Q()}}},{depth:t.__ref&&t.__ref.path&&t.__ref.path.length||0});t.__ref&&(t.__ref.__effects||(t.__ref.__effects=[]),t.__ref.__effects.push(h))},attr:{viewBox:"0 0 24 24","aria-hidden":t=>t.ariaLabel||t.role==="img"?null:"true",focusable:"false"}},l_={display:"flex",align:"center center",lineHeight:1,".reversed":{flow:"row-reverse"},".vertical":{flow:"column"},Icon:{if:t=>{let{parent:e}=t;return t.call("exec",e.icon||t.name||t.sfSymbols||e.sfSymbols,t)},icon:t=>t.call("exec",t.parent.icon,t.parent)},text:t=>t.text},f_={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var ug={};I(ug,{A:()=>h_,Link:()=>lg,RouteLink:()=>g_,RouterLink:()=>fg});var Ki={};I(Ki,{default:()=>CC,getActiveRoute:()=>cg,lastLevel:()=>Cl,lastPathname:()=>vl,matchRoute:()=>sg,parseQuery:()=>ig,parseRoutePattern:()=>og,router:()=>Me,runGuards:()=>ag});O();var d_=/^:(.+)/,p_=/^\*$/,u_=new Map,og=t=>{let e=u_.get(t);if(e)return e;let r=t.replace(/^\//,"").split("/"),n=[],o=!1;for(let i=0;i<r.length;i++){let a=r[i].match(d_);a?n.push({index:i,name:a[1]}):p_.test(r[i])&&(o=!0)}let s={segments:r,params:n,hasWildcard:o,pattern:t};return u_.set(t,s),s},sg=(t,e,r=0)=>{let o=t.replace(/^\//,"").split("/").filter(Boolean).slice(r),s="/"+(o[0]||"");if(!e)return{key:null,content:null,params:{},routePath:s};let i=null,a=-1,c={};for(let l in e){if(l==="/*")continue;let f=og(l),u=SC(o,f);u>a&&(a=u,i=l,c=wC(o,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},SC=(t,e)=>{let{segments:r,hasWildcard:n}=e;if(!n&&r.length!==t.length&&r.length!==1&&r.length>t.length)return-1;let o=0,s=Math.min(r.length,t.length);for(let i=0;i<s;i++)if(r[i]===t[i])o+=3;else if(d_.test(r[i]))o+=1;else if(p_.test(r[i]))o+=.5;else return-1;return o},wC=(t,e)=>{let r={};for(let{index:n,name:o}of e.params)t[n]&&(r[o]=decodeURIComponent(t[n]));return r},ig=t=>{if(!t||t==="?")return{};let e={};return new URLSearchParams(t).forEach((n,o)=>{e[o]!==void 0?(Array.isArray(e[o])||(e[o]=[e[o]]),e[o].push(n)):e[o]=n}),e},ag=async(t,e)=>{if(!t||!t.length)return!0;for(let r of t){let n=await r(e);if(n===!1)return!1;if(typeof n=="string")return n}return!0},cg=(t=0,e)=>{e||(e=typeof v<"u"?v.location.pathname:"/");let n=e.split("/")[t+1];if(n)return`/${n}`},vl,Cl=0,kC=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,vC={level:Cl,pushState:!0,initialRender:!1,scrollToTop:!0,scrollToNode:!1,get scrollNode(){return typeof Y<"u"&&(Y.scrollingElement||Y.documentElement)||null},scrollBody:!1,useFragment:!1,updateState:!0,scrollToOffset:0,contentElementKey:"content",scrollToOptions:{behavior:"smooth"},useParamsMatching:!0},Me=async(t,e,r={},n={})=>{let o=e||void 0,s=o?.context?.window||v,i=o?.context?.document||Y,a={...vC,...o.context.routerOptions,...n};Cl=a.lastLevel;let c=o.__ref;(a.contentElementKey!=="content"&&a.contentElementKey!==c.contentElementKey||!c.contentElementKey)&&(c.contentElementKey=a.contentElementKey||"content");let l=c.contentElementKey||a.contentElementKey||"content",f=s.location.origin!=="null"?s.location.origin:"http://localhost";t=kC(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=ig(g),x=o.node,b=p&&p!==s.location.hash.slice(1),y=h!==vl;vl=h;let _,k,A,R;if(a.useParamsMatching){let P=sg(h,o.routes,a.level);_=P.key,k=P.routePath,A=P.content,R=P.params}else{_=cg(a.level,h),k=_;let P=o.routes;A=P?P[_||"/"]||P["/*"]:null,R={}}let N=a.scrollToNode?x:a.scrollNode;if(o.state?.root?.debugging){o.state.root.debugging=!1;return}if(!A){a.onNotFound?a.onNotFound({pathname:h,route:_,element:o}):a.silent||console.warn("[smbls/router] no content matched for path",h,"\u2014 available routes:",Object.keys(o.routes||{}));return}if(a.guards&&a.guards.length){let P={pathname:h,route:_,params:R,query:m,hash:p,element:o,state:r},$=await ag(a.guards,P);if($===!1)return;if(typeof $=="string")return Me($,e,r,{...n,guards:[]})}if(a.pushState)try{s.history.pushState(r,null,h+(g||"")+(p||""))}catch{}if(y||!b){let P={route:_,routePath:k,hash:p,debugging:!1};Object.keys(R).length&&(P.params=R),Object.keys(m).length&&(P.query=m),a.updateState&&o.state.update(P,{preventContentUpdate:!0}),l&&a.removeOldElement&&o[l].remove();let $=o.__ref?.origin?.content,V={};if($)for(let H in $){let K=$[H];H==="__ref"||H==="props"||H==="node"||H==="parent"||H==="key"||(typeof K=="string"||typeof K=="number"||typeof K=="boolean"||typeof K=="object"&&K!==null&&!K.node&&!K.__ref)&&(V[H]=K)}let _t={...V,...typeof A=="object"?A:{extends:A}};a.useFragment&&(_t.tag="fragment");try{if(typeof o?.set!="function")return;o.set(_t,{contentElementKey:l})}catch(H){console.error("[smbls/router] failed to render route content",h,H)}}if(a.scrollToTop&&N?.scrollTo&&N.scrollTo({...a.scrollToOptions||{},top:0,left:0}),a.scrollToNode&&A[l]?.node?.scrollTo&&A[l].node.scrollTo({...a.scrollToOptions||{},top:0,left:0}),p){let P=i.getElementById(p);if(P&&N?.scrollTo){let $=P.getBoundingClientRect().top+x.scrollTop-(a.scrollToOffset||0);N.scrollTo({...a.scrollToOptions||{},top:$,left:0})}}lr("routeChanged",o,a)},CC=Me;var AC=(t,e,r)=>{let{context:n}=e,{href:o,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",o,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=n,d=e.__ref.root,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 x of p){if(!m||!m[x]){m=null;break}m=m[x]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||Me)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}},lg={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:t=>kr(t,t.href)||kr(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:AC},h_={extends:"Link"},fg={onClick:(t,e,r)=>{let{context:n}=e,{href:o,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",o,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=n,d=e.__ref.root,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 x of p){if(!m||!m[x]){m=null;break}m=m[x]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||Me)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}}},g_={extends:[lg,fg]};var dg={};I(dg,{Select:()=>m_});var m_={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 pg={};I(pg,{Button:()=>y_,ButtonSet:()=>S_,CircleButton:()=>x_,IconButton:()=>w_,KangorooButton:()=>__,SquareButton:()=>b_});var y_={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)},b_={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"},x_={extends:"SquareButton",round:"C"},__={extends:"Button",childExtends:"IconText"},S_={tag:"nav",display:"flex",childExtends:"SquareButton"},w_={extends:["SquareButton","ClickableItem"],round:"Z"};var hg={};I(hg,{Dialog:()=>k_,DialogFooter:()=>C_,DialogHeader:()=>v_});var k_={display:"flex",tag:"dialog",flow:"column",border:"0",theme:"dialog",round:"Z2"},v_={extends:"Hgroup",minWidth:"100%",gap:"A",Title:{align:"center space-between",Text:{text:"Title"},SquareButton:{icon:"x",theme:"transparent"}},Paragraph:{color:"caption"}},C_={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 gg={};I(gg,{Tooltip:()=>A_,TooltipHidden:()=>E_,TooltipParent:()=>T_});O();var A_={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=>St(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)}},E_={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)}},T_={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:r}=t,n=e||r;if(!n)return;let o=n&&n[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":o||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var mg={};I(mg,{Avatar:()=>O_});var EC=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)},O_={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=EC(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 yg={};I(yg,{Range:()=>R_});var R_={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:Nn("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:Nn("#fff",.35)}},":focus":{"::-webkit-slider-thumb":{borderColor:"#3C6AC0"}}},"@light":{background:"gray9","::-webkit-slider-thumb":{background:"white",borderColor:"gray9"},":hover":{"::-webkit-slider-thumb":{borderColor:"gray7"}},":focus":{"::-webkit-slider-thumb":{borderColor:"blue"}}},deps:{returnPropertyValue:(t,e,r)=>{let n=t.call("exec",t[e],t);return(t.call("isFunction",n)?n(t,t.state):n!==void 0?n:r!==void 0?r:0)+""}},attr:{type:"range",value:(t,e)=>t.call("exec",e.value||t.value||t.defaultValue,t),min:(t,e)=>t.deps.returnPropertyValue(t,"min",0),max:(t,e)=>t.deps.returnPropertyValue(t,"max",100),step:(t,e)=>t.deps.returnPropertyValue(t,"step",1)}};var bg={};I(bg,{Dropdown:()=>P_,DropdownList:()=>$_,DropdownParent:()=>I_,DropdownParentFocus:()=>D_,DropdownSiblingFocus:()=>L_});var P_={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"},$_={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"}}},I_={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},D_={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()}}},L_={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 xg={};I(xg,{Notification:()=>F_});var F_={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 on=Object.assign({},Lh,Fh,Mh,Nh,jh,zh,Wh,Hh,Vh,qh,Kh,Uh,Gh,Yh,Xh,Jh,Zh,Qh,tg,eg,rg,ng,ug,dg,pg,hg,gg,mg,yg,bg,xg);function Al(t){if(t==null)return 0;if(typeof t!="object")return M_(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let n=0;n<t.length;n++)e=(e^Al(t[n]))*16777619;return e>>>0}let r=Object.keys(t).sort();for(let n=0;n<r.length;n++)e=(e^M_(r[n]))*16777619,e=(e^Al(t[r[n]]))*16777619;return e>>>0}function M_(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e}function El(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!=typeof e||typeof t!="object")return!1;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!El(t[o],e[o]))return!1;return!0}let r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(let o=0;o<r.length;o++){let s=r[o];if(!Object.prototype.hasOwnProperty.call(e,s)||!El(t[s],e[s]))return!1}return!0}function _g(t,e){if(e===void 0)return t;if(t===void 0)return e;if(e===null)return null;if(typeof e!="object"||Array.isArray(e))return e;if(typeof t!="object"||Array.isArray(t))return{...e};let r=!1,n={};for(let o in t)if(o in e){let s=_g(t[o],e[o]);n[o]=s,s!==t[o]&&(r=!0)}else n[o]=t[o];for(let o in e)o in t||(n[o]=e[o],r=!0);return r?n:t}function Sg(t,e,r){if(!e||typeof e!="object")return t;if(!t||typeof t!="object")return e;if(r||(r=new WeakSet),r.has(e))return t;r.add(e);for(let n in e){let o=e[n];o&&typeof o=="object"&&!Array.isArray(o)&&t[n]&&typeof t[n]=="object"&&!Array.isArray(t[n])?Sg(t[n],o,r):t[n]=o}return t}function Er(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 ho(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Gi(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Er(e)}function N_(t){return t.split(`
|
|
72
|
-
`).map(
|
|
73
|
-
`)}var
|
|
74
|
-
${c}`}var
|
|
75
|
-
`)}function
|
|
76
|
-
${a}`}var wg=null;function Ol(t){wg=t}var we={structuralHash:Al,deepEqual:El,mergeStructural:_g,overwriteDeep:Sg,shortHash:Er,toKebab:ho,sanitizeValue:Gi,batchShortHash:N_,atomicCssClass:B_,batchAtomicCss:U_,compoundCssClass:z_},W_=!1,Tl=null;function H_(t){return Tl||(Tl=import(t||"@symbo.ls/wasm/pkg").then(e=>(e.structuralHash&&(we.structuralHash=e.structuralHash),e.deepEqual&&(we.deepEqual=e.deepEqual),e.mergeStructural&&(we.mergeStructural=e.mergeStructural),e.overwriteDeep&&(we.overwriteDeep=e.overwriteDeep),e.shortHash&&(we.shortHash=e.shortHash),e.toKebab&&(we.toKebab=e.toKebab),e.sanitizeValue&&(we.sanitizeValue=e.sanitizeValue),e.batchShortHash&&(we.batchShortHash=e.batchShortHash),e.atomicCssClass&&(we.atomicCssClass=e.atomicCssClass),e.batchAtomicCss&&(we.batchAtomicCss=e.batchAtomicCss),e.compoundCssClass&&(we.compoundCssClass=e.compoundCssClass),W_=!0,wg&&e.batchAtomicCss&&wg({batchAtomicCss:e.batchAtomicCss,compoundCssClass:e.compoundCssClass}),!0)).catch(e=>(console.debug("[smbls] WASM not available, using JS fallbacks:",e.message),!1)),Tl)}function q_(){return W_}O();var Yi={};I(Yi,{CDN_PROVIDERS:()=>Pe,DOMQL_EVENTS:()=>Jf,DOMQ_PROPERTIES:()=>sr,ENV:()=>pu,HTML_TAGS:()=>An,METHODS:()=>Sn,METHODS_EXL:()=>Ko,NODE_ENV:()=>ge,OPTIONS:()=>ms,PACKAGE_MANAGER_TO_CDN:()=>pr,PARSED_DOMQ_PROPERTIES:()=>qo,PROPS_METHODS:()=>ir,STATE_METHODS:()=>Br,STATE_PROPERTIES:()=>Xf,SVG_TAGS:()=>Mm,TYPES:()=>jo,UNIVERSAL_RESERVED_KEYS:()=>kc,addCaching:()=>sc,addContext:()=>oc,addExtend:()=>Nu,addExtends:()=>Ut,addItemAfterEveryElement:()=>Mf,addProtoToArray:()=>Uo,addRef:()=>ec,applyCSS:()=>vg,applyDependentState:()=>nd,applyEvent:()=>uc,applyEventUpdate:()=>dc,applyExtends:()=>Bm,applyProps:()=>fs,arrayContainsOtherArray:()=>Rf,arraysEqual:()=>jf,arrayzeValue:()=>Gr,buildImgSrcset:()=>Ks,buildSourcesAndImg:()=>Gs,cache:()=>cd,call:()=>Cd,captureSnapshot:()=>Ed,checkForStateTypes:()=>Qu,checkIfInherits:()=>fc,checkIfStringIsInArray:()=>Uf,clone:()=>Qf,cloneAndMergeArrayExtend:()=>rs,cloneFunction:()=>wu,concatAddExtends:()=>Lu,copyJavaScriptToClipboard:()=>Kd,copyStringToClipboard:()=>qd,createBasedOnType:()=>tc,createElement:()=>Zu,createElementExtends:()=>Ua,createExtends:()=>os,createExtendsFromKeys:()=>En,createExtendsStack:()=>qa,createIfConditionFlag:()=>ku,createInheritedState:()=>td,createKey:()=>ts,createNestedObject:()=>iu,createNestedObjectByKeyPath:()=>rd,createObjectWithoutPrototype:()=>La,createParent:()=>rc,createPath:()=>nc,createProps:()=>us,createPropsStack:()=>Za,createRoot:()=>Ju,createScope:()=>sd,createSnapshotId:()=>Qo,customDecodeURIComponent:()=>Yf,customEncodeURIComponent:()=>Gf,cutArrayAfterValue:()=>Lf,cutArrayBeforeValue:()=>Df,debounce:()=>es,debounceOnContext:()=>xu,decodeNewlines:()=>Kf,deepClone:()=>ut,deepContains:()=>ou,deepDefaults:()=>Vs,deepDestringifyFunctions:()=>te,deepExtend:()=>Va,deepMerge:()=>Z,deepMergeExtends:()=>Te,deepStringifyFunctions:()=>Go,defineSetter:()=>kd,destringifyGlobalScope:()=>Xo,detectHeightOnInit:()=>$d,detectInfiniteLoop:()=>fu,document:()=>Y,encodeNewlines:()=>qf,error:()=>qr,excludeKeysFromObject:()=>du,exec:()=>it,extendCachedRegistry:()=>Fu,extendStackRegistry:()=>ss,extractArrayExtend:()=>as,fetchLibraryData:()=>Tc,fibonacciNumberByIndex:()=>Id,filterArrays:()=>Bf,filterArraysFast:()=>Vf,finalizeExtends:()=>Ka,findClosestNumber:()=>Ec,findClosestNumberInFactory:()=>zd,findInheritedState:()=>lc,findKeyPosition:()=>Wf,flattenExtend:()=>Tn,formatDate:()=>Pd,generateHash:()=>Na,generateHeadArrayTags:()=>Ac,generateKey:()=>Zo,generateMetaTags:()=>Vd,get:()=>_d,getActiveRoute:()=>cg,getCDNUrl:()=>ye,getCapitalCaseKeys:()=>Vu,getCdnProviderFromConfig:()=>Pn,getChildStateInKey:()=>cc,getChildren:()=>Es,getContext:()=>Ds,getCookie:()=>Tu,getDB:()=>js,getEmotionStylesheet:()=>Jd,getExtendsInElement:()=>ju,getExtendsStack:()=>ns,getExtendsStackRegistry:()=>Ba,getFrequencyInArray:()=>Pf,getHashedExtend:()=>is,getImportMapScript:()=>Rd,getInObjectByPath:()=>lu,getLocalStorage:()=>Ru,getNev:()=>yu,getPageMetadata:()=>Ud,getParentStateInKey:()=>ac,getPath:()=>Ts,getQuery:()=>Bs,getRef:()=>wd,getRoot:()=>Ps,getRootContext:()=>Is,getRootData:()=>$s,getRootState:()=>Rs,getRootStateInKey:()=>ic,getSpreadChildren:()=>Uu,global:()=>Ef,hasFunction:()=>Ee,hasHandlerPlugin:()=>kn,hasOwnProperty:()=>eu,hashContent:()=>Dn,inheritChildExtends:()=>Wa,inheritChildPropsExtends:()=>za,inheritParentProps:()=>ds,inheritRecursiveChildExtends:()=>Ha,init:()=>Qe,initProps:()=>Gu,is:()=>jt,isArray:()=>T,isBoolean:()=>Ra,isContextComponent:()=>zu,isCyclic:()=>uu,isDOMNode:()=>Nt,isDate:()=>$a,isDefined:()=>St,isDevelopment:()=>cr,isEmpty:()=>Ia,isEmptyObject:()=>ru,isEqualDeep:()=>Da,isFunction:()=>E,isHtmlElement:()=>Mo,isLocal:()=>mu,isLoudDevRuntime:()=>Vt,isMalformedDependency:()=>$n,isMethod:()=>Ad,isMobile:()=>Au,isNode:()=>Ve,isNot:()=>Of,isNotProduction:()=>zr,isNull:()=>Pa,isNumber:()=>Ae,isObject:()=>w,isObjectLike:()=>U,isPhoto:()=>Dd,isProduction:()=>ar,isStaging:()=>gu,isState:()=>ed,isString:()=>S,isStringFunction:()=>Su,isTest:()=>Ma,isTesting:()=>hu,isUndefined:()=>At,isUniversallyReservedKey:()=>Td,isUnresolvableDependency:()=>Kr,isValidHtmlTag:()=>$u,isWrappedLibrary:()=>zs,joinArrays:()=>bn,jointStacks:()=>Mu,keys:()=>Sc,lastLevel:()=>Cl,lastPathname:()=>vl,loadCssFile:()=>Nd,loadJavascript:()=>jd,loadJavascriptFile:()=>Ld,loadJavascriptFileEmbedSync:()=>Md,loadJavascriptFileSync:()=>Fd,loadRemoteCSS:()=>Bd,loadRemoteScript:()=>In,log:()=>vd,logGroupIf:()=>Cu,logIf:()=>vu,lookdown:()=>bd,lookdownAll:()=>xd,lookup:()=>yd,lowercaseFirstLetter:()=>jr,makeObjectWithoutPrototype:()=>nu,map:()=>Zf,mapStringsWithContextComponents:()=>cs,matchRoute:()=>sg,matchesComponentNaming:()=>Oe,memoize:()=>_u,merge:()=>pt,mergeSharedLibraries:()=>Ws,nextElement:()=>Fs,normalizeIgnoreList:()=>Us,normalizeLibraryKey:()=>Ln,objectToString:()=>Yo,objectizeStringProperty:()=>ls,overwrite:()=>Jo,overwriteDeep:()=>Bt,overwriteShallow:()=>Ur,overwriteState:()=>od,parse:()=>wc,parseDeep:()=>Cs,parseQuery:()=>ig,parseRoutePattern:()=>og,pickupElementFromProps:()=>Xa,pickupPropsFromElement:()=>Ya,previousElement:()=>Ms,propExists:()=>qu,propertizeElement:()=>Ja,propertizeUpdate:()=>Hu,reinit:()=>kg,remove:()=>dy,removeChars:()=>Gd,removeCookie:()=>Ou,removeDuplicateProps:()=>hs,removeDuplicatesInArray:()=>xn,removeFromArray:()=>$f,removeFromObject:()=>su,removeNestedKeyByPath:()=>au,removeValueFromArray:()=>Vo,removeValueFromArrayAll:()=>Ff,reorderArrayByValues:()=>Nf,replaceLiteralsWithObjectFields:()=>Nr,replaceOctalEscapeSequences:()=>Hf,resolveAsset:()=>zt,resolveHandler:()=>vn,resolveSharedLibraries:()=>Hd,returnValueAsText:()=>Qa,router:()=>Me,runGuards:()=>ag,runPluginHook:()=>vt,scratchSystem:()=>Yn,scratchUtils:()=>mr,self:()=>Tf,set:()=>en,setActiveRootState:()=>Os,setCookie:()=>Eu,setHashedExtend:()=>ja,setInObjectByPath:()=>cu,setLocalStorage:()=>Pu,setNodeStyles:()=>_c,setProps:()=>Sd,setPropsPrototype:()=>ps,sharedLibrary:()=>Wd,spotByPath:()=>As,srcsetFor:()=>Fn,stringIncludesAny:()=>Wo,stringToObject:()=>tu,stripVersionRangePrefix:()=>vc,swapItemsInArray:()=>If,syncProps:()=>gs,toCamelCase:()=>Hs,toDashCase:()=>qs,toDescriptionCase:()=>Xd,toTitleCase:()=>Yd,toggleFullscreen:()=>Od,triggerEventOn:()=>lr,triggerEventOnUpdate:()=>id,trimStringFromSymbols:()=>zf,unstackArrayOfObjects:()=>Bo,update:()=>Ku,updateProps:()=>Yu,variables:()=>Ns,verbose:()=>Rn,warn:()=>Ls,window:()=>v});O();O();var LC=C(),K_=(t=LC,e)=>{let r=w(e.localFile)?e.localFile:{},n=ut(r.designSystem||{});return Z(t,n)},FC={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},go=(t,e)=>{let r=!e||e===":root",n={};for(let o in t)if(o.startsWith("@media")){let s=r?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`;n[o]={[s]:t[o]}}else r?n[o]=t[o]:n[`${e}${o}, ${o} ${e}`]=t[o];return n},Qe=(t,e=FC)=>{let r=K_(t||{},e),n=e.scopeSelector||":root",o=e.globalTheme;if(typeof window<"u"&&window.location){let p=new URLSearchParams(window.location.search).get("globalTheme");p&&(o=p)}let s=en({verbose:e.verbose,useReset:e.useReset,useFontImport:e.useFontImport,useVariable:e.useVariable,useSvgSprite:e.useSvgSprite,useDocumentTheme:e.useDocumentTheme,useIconSprite:e.useIconSprite,useDefaultConfig:e.useDefaultConfig,globalTheme:o,themeRoot:e.themeRoot,files:e.files,assets:e.assets,...r},{newConfig:e.newConfig,config:e.config});s&&(s.scopeSelector=n);let i=Qs(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&&xt(i),c&&(xt({[n]:s.CSS_VARS}),s.CSS_MEDIA_VARS&&xt(go(s.CSS_MEDIA_VARS,n))),a&&xt(s.reset);let g=s.animation;if(g){let p={};for(let m in g)p[`@keyframes ${m}`]=g[m];xt(p)}return(u||f)&&Ei(s.svg,{document:e.document}),(h||d)&&Oi(s.icons,{document:e.document}),s},Rl={},kg=(t,e=Rl)=>{let r=K_(t||{},e),n=e.scopeSelector||":root",o=en({verbose:!1,...r});return e.preventInject||(xt({[n]:o.CSS_VARS}),o.CSS_MEDIA_VARS&&xt(go(o.CSS_MEDIA_VARS,n)),xt(o.reset)),o},vg=(t,e=Rl)=>{xt(t)},MC=(t,e=Rl)=>{let r=e.scopeSelector||":root";xt({[r]:t.CSS_VARS}),t.CSS_MEDIA_VARS&&xt(go(t.CSS_MEDIA_VARS,r))};var NC=(t,e=Rl)=>{};O();var G_=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,Cg={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},Xi=(t,e)=>{if(!e)return t;let r=Array.isArray(e)?e:e.split("."),n=t;for(let o of r){if(!n||!n[o])return null;n=n[o]}return n},Y_=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=Cg:e.router=pt(e.router||{},Cg);let r=e.router,n=async(s,i)=>{let a=s.context?.window||v;if(!a.location)return;let{pathname:c,search:l,hash:f}=a.location;c=G_(c);let u=c+l+f,d=s;if(r.customRouterElement){let h=Xi(s,r.customRouterElement);h&&(d=h,s.routes&&(d.routes=s.routes))}d.routes&&await Me(u,d,{},{initialRender:!0,pushState:!1})},o=!At(t.onRenderRouter);return r&&r.initRouter&&!o&&(t.onRenderRouter=n),jC(e,r),r},Ag=(t,e)=>{if(e.router===!1)return;let r=e.router||Cg;if(!r.popState)return;let n=e.utils&&e.utils.router?e.utils.router:Me,o=e.window||v,s=async i=>{let{pathname:a,search:c,hash:l}=o.location;a=G_(a);let f=a+c+l,u=t;if(r.customRouterElement){let d=Xi(t,r.customRouterElement);d&&(u=d,t.routes&&(u.routes=t.routes))}await u.call("router",f,u,{},{pushState:!1,scrollToTop:!1,level:0,event:i})};o.addEventListener("popstate",s),e.__teardowns=e.__teardowns||[],e.__teardowns.push(()=>o.removeEventListener("popstate",s))},jC=(t,e)=>{let{components:r}=t;if(e&&e.injectRouterInLinkComponent)return Z(r.Link||r["smbls.Link"],r.RouterLink||r["smbls.RouterLink"])};O();var Eg=v&&v.location?v.location.host.includes("dev."):cr(),X_=Eg?"http://localhost:8080/get":"https://api.symbols.app/get",BC={endpoint:X_},J_=async(t,e=BC)=>{let r=e.endpoint||X_,n=e.serviceRoute?T(e.serviceRoute)?e.serviceRoute.map(s=>s.toLowerCase()+"=true").join("&"):e.serviceRoute:"",o;try{return o=await globalThis.fetch(r+"/?"+n,{method:"GET",headers:{"Content-Type":"application/json","X-AppKey":t,"X-Metadata":e.metadata}}),await o.json()}catch(s){if(E(e.onError))return e.onError(s);console.error(s)}},VC=async(t,e)=>{let{editor:r}=e;if(r&&r.remote){let n=await J_(t,r),o=Eg||e.isDevelopment?te(n):te(n.releases[0]);r.serviceRoute?T(r.serviceRoute)?r.serviceRoute.forEach(s=>{Bt(e[s],o[s.toLowerCase()])}):Bt(e[r.serviceRoute],o):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{Bt(e[s],o[s.toLowerCase()])})}return e},UC=async(t,e,r)=>{let{editor:n}=e;if(n&&n.remote){let o=await J_(t,n),s=Eg||e.isDevelopment?te(o):te(o.releases[0]);r(s)}},Z_=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await VC(t,e)}catch(r){console.error(r)}},Q_=(t,e,r,n)=>{if(e&&r.editor)try{r.editor.async&&UC(e,r,n||(o=>{let s=o.designSystem;w(s)&&r.utils.init(s),w(o.state)&&t.state.set(o.state)}))}catch(o){console.error(o)}};var Ji=t=>{if(!t||t.__destroyed)return!1;let e=t.context;if(!e)return t.__destroyed=!0,!1;if(Array.isArray(e.__teardowns)){for(let r of e.__teardowns)try{r()}catch(n){console.error("[smbls] destroy teardown error:",n)}e.__teardowns.length=0}try{Ar(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 Rg={};I(Rg,{Helmet:()=>rS,applyMetadata:()=>mo,default:()=>GC,extractMetadata:()=>HC,generateHeadHtml:()=>KC,helmetPlugin:()=>Og,resolveMetadata:()=>Tr});O();var zC={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"}},WC=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}"]`},tS=t=>te({v:t}).v,eS=(t,e,r,n)=>{try{return it(t,e,r)}catch(o){console.warn(`[helmet] metadata factory for "${n}" threw; treating as unset:`,o&&o.message||o);return}},Tr=(t,e,r)=>{if(!t)return{};let n=t;S(n)&&Ee(n)&&(n=tS(n));let o=E(n)?eS(n,e,r,"metadata"):w(n)?{...n}:{};if(!w(o))return{};for(let s in o){let i=o[s];S(i)&&Ee(i)&&(i=tS(i)),E(i)?i=eS(i,e,r,s):S(i)&&Ee(i)&&(i=void 0),S(i)&&i.includes("{{")&&e?.call&&(i=e.call("replaceLiteralsWithObjectFields",i,r)),o[s]=i}return o},HC=(t,e="/",r,n)=>{let s=(t.pages||{})[e],i={};if(t.integrations?.seo&&(i={...t.integrations.seo}),t.app?.metadata){let c=Tr(t.app.metadata,r,n);i={...i,...c}}let a=new Set;if(s){let c=s.metadata||s.helmet||{},l=Tr(c,r,n);for(let f in l)a.add(f);i={...i,...l},!i.title&&s.state?.title&&(i.title=s.state.title,a.add("title")),!i.description&&s.state?.description&&(i.description=s.state.description,a.add("description"))}if(i.title||(i.title=t.name||"Symbols"),i.title&&(a.has("title")||!i["og:title"])&&(a.has("og:title")||(i["og:title"]=i.title)),i.description&&(a.has("description")||!i["og:description"])&&(a.has("og:description")||(i["og:description"]=i.description)),i.title&&!i["twitter:title"]&&(i["twitter:title"]=i.title),i.description&&!i["twitter:description"]&&(i["twitter:description"]=i.description),i["og:url"]||i.url){let c=(i["og:url"]||i.url||"").replace(/\/$/,"");if(c&&e&&e!=="/"){let l=e.startsWith("/")?e:"/"+e;i["og:url"]=c+l}}if(t.files)for(let c in i){let l=i[c];if(typeof l=="string"&&l.length>0&&!l.startsWith("/")&&!l.startsWith("http")){let f=t.files[l];f?.src&&(i[c]=f.src)}}return i},qC=(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},Zi=t=>{let e=5381,r=String(t);for(let n=0;n<r.length;n++)e=(e*33^r.charCodeAt(n))>>>0;return e.toString(36)},Tg=(t,e,r,n)=>{let o=t.head||t.querySelector("head");if(!o)return;let s=new Map;for(let a of o.querySelectorAll(`[${e}]`))s.set(a.getAttribute(e),a);let i=new Set;for(let a of r)i.add(a);for(let[a,c]of s)i.has(a)||c.remove();for(let a of r){if(s.has(a))continue;let c=n(a);c&&(c.setAttribute(e,a),o.appendChild(c))}},mo=(t,e)=>{if(!(!w(t)||!e)){for(let r in t){let n=t[r];if(n==null||r==="jsonLd"||r==="styles"||r==="scripts")continue;let o=zC[r];if(!o)continue;let s=WC(o),i=e.querySelector(s)||qC(o,e);i&&(r==="title"?i.textContent=n:o.valueAttr?i.setAttribute(o.valueAttr,n):i.setAttribute("content",n))}if(Array.isArray(t.jsonLd)){let n=t.jsonLd.filter(s=>s!=null).map(s=>S(s)?s:JSON.stringify(s)),o=n.map(Zi);Tg(e,"data-smbls-jsonld",o,s=>{let i=o.indexOf(s),a=e.createElement("script");return a.setAttribute("type","application/ld+json"),a.textContent=n[i],a})}if(Array.isArray(t.styles)){let r=t.styles.filter(o=>o!=null&&String(o).trim()),n=r.map(Zi);Tg(e,"data-smbls-style",n,o=>{let s=n.indexOf(o),i=e.createElement("style");return i.textContent=String(r[s]),i})}if(Array.isArray(t.scripts)){let r=t.scripts.filter(o=>o&&(S(o)?o.trim():o.src)),n=r.map(o=>S(o)?o:String(o.src));Tg(e,"data-smbls-script",n,o=>{let s=n.indexOf(o),i=r[s],a=e.createElement("script");return S(i)?a.setAttribute("src",i):(i.src&&a.setAttribute("src",i.src),i.type&&a.setAttribute("type",i.type),i.async&&(a.async=!0),i.defer&&(a.defer=!0),i.integrity&&a.setAttribute("integrity",i.integrity),i.crossorigin&&a.setAttribute("crossorigin",i.crossorigin),i.referrerpolicy&&a.setAttribute("referrerpolicy",i.referrerpolicy),i.nomodule&&(a.noModule=!0),i.body&&(a.textContent=String(i.body))),a})}}},nt=t=>{if(t==null)return"";let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return t.toString().replace(/[&<>"']/g,r=>e[r])},KC=t=>{let e=['<meta charset="UTF-8">'],r=new Set(["charset","jsonLd","styles","scripts"]),n=!1;for(let[o,s]of Object.entries(t)){if(!s&&s!==0&&s!==!1||r.has(o)||typeof s=="function")continue;if(o==="title"){e.push(`<title>${nt(s)}</title>`);continue}if(o==="viewport"){n||(e.push(`<meta name="viewport" content="${nt(s)}">`),n=!0);continue}if(o==="canonical"){e.push(`<link rel="canonical" href="${nt(s)}">`);continue}if(o==="icon"||o==="favicon"){let f=nt(s),u=f.endsWith(".svg")?' type="image/svg+xml"':f.endsWith(".png")?' type="image/png"':"";e.push(`<link rel="icon" href="${f}"${u}>`);continue}if(o==="favicons"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${nt(h)}"`).join(" ");e.push(`<link rel="icon" ${u}>`)}else typeof f=="string"&&e.push(`<link rel="icon" href="${nt(f)}">`)});continue}if(o==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${nt(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=>o.startsWith(f)),l=a.some(f=>o.startsWith(f));if(o.startsWith("http-equiv:")){let f=o.replace("http-equiv:","");e.push(`<meta http-equiv="${nt(f)}" content="${nt(s)}">`)}else if(o.startsWith("itemprop:")){let f=o.replace("itemprop:","");e.push(`<meta itemprop="${nt(f)}" content="${nt(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>e.push(`<meta property="${nt(o)}" content="${nt(f)}">`)):e.push(`<meta property="${nt(o)}" content="${nt(s)}">`):l?e.push(`<meta name="${nt(o)}" content="${nt(s)}">`):Array.isArray(s)?s.forEach(f=>e.push(`<meta name="${nt(o)}" content="${nt(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.push(`<meta name="${nt(o)}" content="${nt(s)}">`)}if(n||e.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),Array.isArray(t.jsonLd))for(let o of t.jsonLd){if(o==null)continue;let s=typeof o=="string"?o:JSON.stringify(o),i=String(s).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${Zi(s)}">${i}<\/script>`)}if(Array.isArray(t.styles))for(let o of t.styles){if(o==null||!String(o).trim())continue;let s=String(o).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${Zi(s)}">${s}</style>`)}if(Array.isArray(t.scripts))for(let o of t.scripts){if(!o)continue;let s=typeof o=="string",i=s?o:o.src;if(!i&&!(o&&o.body))continue;let a=[];i&&a.push(`src="${nt(i)}"`),s||(o.type&&a.push(`type="${nt(o.type)}"`),o.async&&a.push("async"),o.defer&&a.push("defer"),o.integrity&&a.push(`integrity="${nt(o.integrity)}"`),o.crossorigin&&a.push(`crossorigin="${nt(o.crossorigin)}"`),o.referrerpolicy&&a.push(`referrerpolicy="${nt(o.referrerpolicy)}"`),o.nomodule&&a.push("nomodule"));let c=` data-smbls-script="${nt(i||Zi(o.body||""))}"`;if(!s&&o.body){let l=String(o.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${a.join(" ")}${c}>${l}<\/script>`)}else e.push(`<script ${a.join(" ")}${c}><\/script>`)}return e.join(`
|
|
77
|
-
`)},rS={define:{metadata:(t,e,r)=>{let n=e.context?.document||typeof document<"u"&&document;if(!n)return;let o=et(()=>{let s=Tr(t,e,e.state);mo(s,n);let i=e.state?.root;w(i)&&(i.$helmet=s)});e.__ref?.__effects&&e.__ref.__effects.push(o)}}},Og={name:"helmet",create(t){if(!t.metadata)return;let e=t.context?.document||typeof document<"u"&&document;if(!e)return;let r=et(()=>{let n=t.metadata;if(!n)return;let o=Tr(n,t,t.state);mo(o,e)});t.__ref?.__effects&&t.__ref.__effects.push(r)},update(t){let e=t.metadata;if(!e)return;let r=t.context?.document||typeof document<"u"&&document;if(!r)return;let n=Tr(e,t,t.state);mo(n,r)}},GC=rS;ur();var nS=(t,e,r,n)=>{t&&vs(t,e,r,n)},oS=(t,e,r)=>{if(!t)return;let n=e.context?.document||typeof document<"u"&&document;if(!n)return;let o=Tr(t,e,r);mo(o,n)},sS=async(t,e)=>{if(!t)return;let r={tag:"fragment",...t},n=async()=>{await e.set(r,{preventDefineUpdate:"$router"})};return e.lazyLoad?window.requestAnimationFrame(n):await n(),r},yo={routes:t=>t,metadata:oS,fetch:nS,$router:sS},iS=(t={})=>{let e={routes:r=>r};return t.metadata!==!1&&(e.metadata=oS),t.fetch!==!1&&(e.fetch=nS),t.router!==!1&&(e.$router=sS),e};var Pg={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},Pl={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},$l={...Pg,router:Pl},YC={state:{},pages:{},components:{},router:Pl,define:yo},Or=YC;O();O();var aS=(t,e)=>U(t.extends)?t.extends:[];O();var fS=t=>{let e=typeof window<"u"?window:globalThis||{};e.document||(e.document={body:{}});let r=typeof document<"u"?document:e.document;t.document=t.document||r;let n=t.window;return n&&n!==e&&typeof n.URL!="function"?(typeof console<"u"&&console.warn&&!globalThis.__smblsRouterUrlWarned&&(globalThis.__smblsRouterUrlWarned=!0,console.warn("[smbls/router] context.window lacks URL, falling back to globalThis \u2014 passed-in window may be a stub (warned once; applies to every embed app this session)")),t.window=e):t.window=n||e,t.window},cS=(t="smbls")=>{let e={};for(let r in on)Object.prototype.hasOwnProperty.call(on,r)&&(Oe(r)?e[`smbls.${r}`]=on[r]:e[r]=on[r]);return e},uS=t=>t.components?{...cS(),...t.components}:cS(),dS=t=>({...Yi,...Ki,...mr,...t.utils,...t.snippets,...t.functions}),pS=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var XC=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,JC=(t,e,r=n=>import(n))=>{if(!(typeof globalThis>"u"))try{let n=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});if(n[t])return;Promise.resolve().then(()=>r(e)).then(o=>{o&&!n[t]&&(n[t]=o)}).catch(()=>{})}catch{}},lS={},hS=async({dependencies:t,dependenciesOnDemand:e,document:r,preventCaching:n=!1,cdnProvider:o,packageManager:s,symbolsConfig:i,registerDependency:a=JC})=>{if(o||(o=pr[s]||Pn(i)||"esmsh"),!t)return null;let c=!1;for(let d in t){c=!0;break}if(!c)return null;let l=cr()&&n?`?${Math.random()}`:"",f=async(d,h)=>{let g=ye(d,h,o)+l;try{await Promise.race([In(g,{document:r,type:"module"}),new Promise((p,m)=>setTimeout(()=>m(new Error(`Timeout loading ${d}`)),1e4))]),a(d,g)}catch(p){if(console.error(`Failed to load ${d} from ${o}:`,p),o!=="symbols")try{let m=ye(d,h,"symbols")+l;await Promise.race([In(m,{document:r,type:"module"}),new Promise((x,b)=>setTimeout(()=>b(new Error(`Timeout fallback ${d}`)),2e4))]),console.log(`Successfully loaded ${d} from fallback (symbols.ls)`),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])&&!lS[d]&&(lS[d]=!0,!Kr(d))){if($n(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}XC(d)||u.push(f(d,h))}}return u.length&&await Promise.allSettled(u),t},gS=async(t,e)=>{let r=e.window||window,n=e.cdnProvider||Pn(e.symbolsConfig)||"esmsh",o=async i=>async(a,c)=>{let f=(i.window||window).packages[a];return typeof f=="function"?f():f},s=async i=>async(a,c=n)=>{let{dependenciesOnDemand:l}=i,f=i.document||document,u=i.window||window;if(!u.packages[a]&&Kr(a))return await u.require(a,c);if(!u.packages[a]){let d=cr()?`?${Math.random()}`:"";if(l&&l[a]){let h=l[a],g=ye(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=ye(a,h,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let h=ye(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=ye(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=pt(r.packages,t):r.packages=t,r.require||(e.utils.require=await o(e),r.require=e.utils.require),r.requireOnDemand||(e.utils.requireOnDemand=await s(e),r.requireOnDemand=e.utils.requireOnDemand)},ZC=/\s+/g,mS=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,QC=(t,e)=>{let r="";for(let n in t){let o=t[n];typeof o=="boolean"&&o?r+=` ${n}`:typeof o=="string"?r+=` ${o}`:typeof o=="function"&&(r+=` ${mS(o,e)}`)}return r},tA=(t,e,r)=>{if(!t)return;let{key:n}=e;t===!0&&(t=e.classlist={key:n}),typeof t=="string"&&(t=e.classlist={default:t}),t!==null&&typeof t=="object"&&!Array.isArray(t)&&(t=QC(t,e));let o=t.replace(ZC," ").trim();if(r&&typeof r.setAttribute=="function")r.setAttribute("class",o);else if(r)try{r.className=o}catch{}return o},eA=()=>(t,e,r)=>{let n=mS(t,e);if(t){let{__ref:o}=e;o.__class.style=n}yS()(e.classlist,e,e.state,!0)},yS=()=>(t,e,r,n)=>{if(e.style&&!n)return;let{__ref:o}=e,{__class:s,__classNames:i}=o;if(!(t===null||typeof t!="object"||Array.isArray(t))){e.class&&(i.classProps=e.class),e.attr?.class&&(i.class=e.attr.class);for(let a in s){let c=s[a];if(!c){delete i[a];continue}let l;typeof c=="string"||typeof c=="number"?l=c:typeof c=="boolean"?l=e.key:l=le(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];e.node&&tA(i,e,e.node)}},rA=()=>({style:eA(),classlist:yS()}),nA=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],$g=new WeakSet,Ig=!1,oA=t=>!!t&&typeof t=="object",bS=(t,e)=>{let r=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,n=e.initOptions||{},o=e.registry||rA(),s=e.designSystem?Z(ut(e.designSystem),Hi):ut(Hi),i={};for(let p of nA)e[p]!==void 0&&(i[p]=e[p]);let a,c=oA(r),f=c&&$g.has(r)&&!e.skipDesignSystemInit,u=!f&&!Ig,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){rt(a);try{xt({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&xt(go(a.CSS_MEDIA_VARS,d))}finally{Q()}}}else if(u){let p=C();p&&(p.__domDocument=r),a=Qe(s,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...$l,...i,...n}),a&&a!==p&&(a.__domDocument=r),c&&$g.add(r),Ig=!0}else{let p=ni(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}rt(p);try{a=Qe(p,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...$l,...i,...n})}finally{Q()}c&&$g.add(r),Ig=!0}let h=a?.CONFIG||a,g=h?.font;if(g){rt(h);try{for(let p in g){let m=g[p];if(!m?.fontFace)continue;let x=Array.isArray(m.fontFace)?m.fontFace:[m.fontFace];for(let b of x)typeof b=="string"&&b.includes("font-family")&&xt(`@font-face { ${b} }`)}}finally{Q()}}return[a,o]},xS=(t,e)=>{let r={};e.state&&Z(r,e.state),t&&t.state&&Z(r,t.state);let n=e.polyglot;if(n?.translations){let o=null;try{typeof localStorage<"u"&&(o=localStorage.getItem(n.storageLangKey||"smbls_lang")||localStorage.getItem("lang"))}catch{}let s=o||r.lang||n.defaultLang||"en";o&&o!==r.lang&&(r.lang=o);let i=n.translations[s];if(i&&typeof i=="object")for(let c in i)r[c]=i[c];let a=new Set(n.languages||[]);for(let c in n.translations)!a.has(c)&&r[c]===void 0&&(r[c]=n.translations[c])}return r.isRootState=!0,ut(r)},_S=(t,e)=>{w(t.routes)&&w(e.pages)&&pt(t.routes,e.pages);let r=t.routes||e.pages||{};for(let n in r){if(n.charCodeAt(0)===47)continue;let o=n==="index"?"":n;r["/"+o]=r[n],delete r[n]}return r},SS=t=>{Ws(t,t.sharedLibraries)};var Dg={};I(Dg,{default:()=>aA,getActiveLang:()=>xo,getLanguages:()=>ta,getLocalStateLang:()=>sa,initPolyglot:()=>Dl,loadTranslations:()=>ra,polyglotPlugin:()=>_o,setLang:()=>na,translate:()=>ea,upsertTranslation:()=>oa});O();var kS="smbls_lang",sA="smbls_t_",iA="smbls_tv_",bo={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)}}},Qi={};function xo(){let t=this?.context,e=t?.polyglot;return(this?.state?.root||t?.state?.root)?.lang||e?.defaultLang||"en"}function ta(){let t=this?.context?.polyglot;return t?t.languages?t.languages:t.translations?Object.keys(t.translations):[]:[]}var Il=(t,e)=>{if(!t||!e)return;if(t[e]!==void 0)return t[e];if(e.indexOf(".")===-1)return;let r=e.split("."),n=t;for(let o=0;o<r.length;o++){if(n==null)return;n=n[r[o]]}return n},wS=(t,e,r)=>{let n=e.lastIndexOf(".");if(n===-1)return t[e+"_"+r];let o=Il(t,e.substring(0,n));if(o!=null)return o[e.substring(n+1)+"_"+r]};function ea(t,e){if(!t)return"";let r=this?.context,n=r?.polyglot,o=e||this.call("getActiveLang"),s=this?.state;if(s){let l=wS(s,t,o);if(l!==void 0)return l}if(n?.translations){let l=n.translations[o];if(l){let f=Il(l,t);if(f!==void 0)return f}}let a=(s?.root||r?.state?.root)?.translations;if(a){let l=a[o];if(l){let f=Il(l,t);if(f!==void 0)return f}}let c=n?.defaultLang||"en";if(s){let l=wS(s,t,c);if(l!==void 0)return l}if(n?.translations){let l=n.translations[c];if(l){let f=Il(l,t);if(f!==void 0)return f}}return t}async function ra(t){let e=this?.context,r=e?.polyglot,n=this?.state?.root||e?.state?.root;if(!r||!n)return;let o=r.storagePrefix||sA,s=r.storageVersionPrefix||(r.storagePrefix?r.storagePrefix.replace(/_$/,"v_"):iA);if(r.translations&&r.translations[t]&&!r.fetch||!r.fetch||r._fetchFailed?.[t])return;if(!n.translations?.[t]){let c=bo.get(o+t);if(c)try{let l=JSON.parse(c),f={translations:{...n.translations||{}}};f.translations[t]=l,n.update&&n.update(f)}catch(l){console.warn("[polyglot] Failed to apply language update:",l.message)}}let i=(r.storagePrefix||"smbls")+":"+t;if(Qi[i])return Qi[i];let a=this;return Qi[i]=(async()=>{try{let c=r.fetch,l=parseInt(bo.get(s+t),10)||0,f,u,d;if(E(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(w(c)){let g=a.getDB||(()=>e.fetch),p=E(g)?await g.call(a):e.fetch;if(!p)return;let m=c.rpc||c.from||"get_translations_if_changed",x={p_lang:t,p_cached_version:l,...c.params||{}},b=await p.rpc({from:m,params:x});if(b.error)throw r._fetchFailed||(r._fetchFailed={}),r._fetchFailed[t]=!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;bo.set(o+t,JSON.stringify(f)),u&&bo.set(s+t,String(u));let h={translations:{...n.translations||{}}};h.translations[t]=f,n.update&&n.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 Qi[i]}})(),Qi[i]}async function na(t){let e=this?.context,r=e?.polyglot,n=this?.state?.root||e?.state?.root;if(!n||this.call("getActiveLang")===t)return;let o=r?.storageLangKey||kS;bo.set(o,t),r?.fetch&&await this.call("loadTranslations",t),e?.state&&(e.state.lang=t);let s=r?.translations?.[t],i={lang:t};if(s&&typeof s=="object")for(let c in s){let l=s[c];(Array.isArray(l)||typeof l=="string"||typeof l=="number")&&(i[c]=l)}if(n.update&&n.update(i),s&&typeof s=="object")for(let c in s){let l=s[c];if(l&&typeof l=="object"&&!Array.isArray(l)&&n[c]&&typeof n[c]=="object"&&!Array.isArray(n[c]))for(let f in l)n[c][f]=l[f]}let a=this?.context?.document||globalThis.document;if(a&&s){let c=a.querySelectorAll("[data-key]");for(let l of c){let f=l.ref;if(!f)continue;let u=f.__ref?.__exec?.text;if(typeof u=="string"&&u.includes("{{"))try{let d=f.call("replaceLiteralsWithObjectFields",u,f.state);d!=null&&l.textContent!==d&&(l.textContent=d)}catch{}}}}async function oa(t,e,r){let n=this?.context,o=n?.polyglot,s=this?.state?.root||n?.state?.root;if(s?.translations?.[e]&&(s.translations[e][t]=r),o?.translations?.[e]&&(o.translations[e][t]=r),o?.fetch&&w(o.fetch)){let i=this.getDB||(()=>n.fetch),a=E(i)?await i.call(this):n.fetch;if(!a)return;let c=o.fetch.table||"translations",l=await a.upsert({from:c,data:{key:t,lang:e,text:r}});if(l?.error)throw l.error;return l.data}}async function Dl(){let t=this?.context,e=t?.polyglot;if(!e)return;let r=this?.state?.root||t?.state?.root;if(!r)return;let n=e.storageLangKey||kS,s=bo.get(n)||e.defaultLang||r.lang||"en";r.update&&r.lang!==s&&r.update({lang:s}),e.fetch&&!(e.translations&&e.translations[s])&&await this.call("loadTranslations",s)}function sa(t){try{let e=this?.context?.polyglot,n=(this?.state?.root||this?.context?.state?.root)?.lang||e?.defaultLang||"en",o=this?.state;if(!o)return"";let s=t.lastIndexOf(".");if(s===-1)return o[t+n]??"";let i=t.substring(0,s).split("."),a=o;for(let c=0;c<i.length;c++){if(a==null)return"";a=a[i[c]]}return a==null?"":a[t.substring(s+1)+n]??""}catch{return""}}var _o={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,Dl.call(t))}},aA=_o;var ia={polyglot:ea,getLocalStateLang:sa,getActiveLang:xo,getLang:xo,setLang:na,getLanguages:ta,loadTranslations:ra,upsertTranslation:oa};ur();var Fg={};I(Fg,{SYSTEM_METRICS:()=>aa,capsizeHandler:()=>Lg,capsizePlugin:()=>Fl,computeCapsize:()=>vS,default:()=>cA,resolveFontSizePx:()=>CS,resolveMetrics:()=>AS});var aa={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}},Ll=t=>parseFloat(t.toFixed(4)),vS=(t,e,r)=>{let{ascent:n,descent:o,lineGap:s,unitsPerEm:i,capHeight:a}=e,c=Math.abs(o),l=n+c+s,f=r!==void 0?r:l/i*t,u=f/t,d=l/i,h=(n-a+s/2)/i-(u-d)/2,g=(c+s/2)/i-(u-d)/2;return{fontSize:`${Ll(t/16)}rem`,lineHeight:`${Ll(f)}px`,capHeightTrim:`${Ll(-h)}em`,baselineTrim:`${Ll(-g)}em`}},CS=(t,e)=>{if(typeof t=="number")return t;let r=e?.designSystem;if(!r)return null;let{typography:n}=r;if(n?.sequence){let s=String(t).toUpperCase(),i=n.sequence[s];if(i)return i.decimal||i.val}let o=parseFloat(t);return isNaN(o)?null:typeof t=="string"&&t.endsWith("rem")?o*(r.typography?.browserDefault||16):o},AS=(t,e)=>{let n=e?.designSystem?.font_family||{};if(t){let s=n[t];if(s?.metrics)return s.metrics;let i=String(t).toLowerCase().replace(/['"]/g,"").trim();if(aa[i])return aa[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(aa[a])return aa[a]}}return null},Lg=(t,e,r,n)=>{if(!t)return;let o=CS(e.fontSize,n);if(!o)return;let s=AS(e.fontFamily,n);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=vS(o,s,i),f={};return e.lineHeight||(f.lineHeight=a),f["::before"]={content:'""',marginBottom:c,display:"table"},f["::after"]={content:'""',marginTop:l,display:"table"},f},Fl={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},cA=Fl;var zg={};I(zg,{PRESERVE_VALUE_KEYS:()=>Pt,SKIP_INLINE_KEYS:()=>Rr,abbrToProp:()=>Rt,decode:()=>PS,encode:()=>TS,expand:()=>an,isComponentKey:()=>ke,isSelectorKey:()=>ve,parse:()=>cn,parseFurther:()=>fn,propToAbbr:()=>pe,shorten:()=>ca,shorthandPlugin:()=>la,stringify:()=>sn,stringifyFurther:()=>ln});var pe={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"},Rt=Object.create(null);for(let t in pe)Rt[pe[t]]=t;var Mg=Object.create(null);for(let t in pe){let e=pe[t];if(Mg[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${Mg[e]}"`);Mg[e]=t}var Pt=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),Rr=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function ke(t){return/^[A-Z]/.test(t)}function ve(t){return/^[:@.!$>&]/.test(t)||t.startsWith("> ")}function TS(t){if(!t||typeof t!="object")return"";let e=[];for(let r in t){let n=t[r];if(typeof n=="function"||n!==null&&typeof n=="object"&&!Array.isArray(n)||n===void 0)continue;let o=pe[r]||r;if(n===!0)e.push(o);else if(n===!1)e.push("!"+o);else if(Array.isArray(n)){let s=n.map(i=>Ml(i));e.push(o+":"+s.join(","))}else e.push(o+":"+Ml(n))}return e.join(" ")}function Ml(t){return String(t).replace(/ /g,"_")}function ca(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?ca(r):r});let e={};for(let r in t){let n=t[r];if(ke(r)){e[r]=Ng(n);continue}if(ve(r)){e[r]=Ng(n);continue}let o=pe[r]||r;if(Pt.has(r)||Pt.has(o)){e[o]=n;continue}e[o]=Ng(n)}return e}function Ng(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?ca(e):e}):typeof t=="object"?ca(t):t}function sn(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?sn(n):n});let e={},r=[];for(let n in t){let o=t[n];if(ke(n)){e[n]=ES(o);continue}if(ve(n)){e[n]=ES(o);continue}let s=pe[n]||n;if(Pt.has(n)||Pt.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(Rr.has(n)||Rr.has(s)){e[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){e[s]=o.map(function(a){return a!==null&&typeof a=="object"?sn(a):a});continue}if(o.length<=1){e[s]=o;continue}r.push(s+":"+o.map(Ml).join(","));continue}if(typeof o=="object"){e[s]=sn(o);continue}o===!0?r.push(s):o===!1?r.push("!"+s):typeof o=="number"||typeof o=="string"&&(o.includes(",")||o.includes("_"))?e[s]=o:r.push(s+":"+Ml(o))}return r.length&&(e.in=r.join(" ")),e}function ES(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?sn(e):e}):typeof t=="object"?sn(t):t}function PS(t){if(!t||typeof t!="string")return{};let e={},r=$S(t);for(let n of r){if(n.startsWith("!")){let c=n.slice(1),l=Rt[c]||c;e[l]=!1;continue}let o=n.indexOf(":");if(o===-1){let c=Rt[n]||n;e[c]=!0;continue}let s=n.slice(0,o),i=n.slice(o+1),a=Rt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(OS);continue}e[a]=OS(i)}return e}function $S(t){return t.trim().split(/\s+/).filter(Boolean)}function OS(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function RS(t){return t.replace(/_/g," ")}function lA(t){if(!t||typeof t!="string")return{};let e={},r=$S(t);for(let n of r){if(n.startsWith("!")){let c=n.slice(1),l=Rt[c]||c;e[l]=!1;continue}let o=n.indexOf(":");if(o===-1){let c=Rt[n]||n;e[c]=!0;continue}let s=n.slice(0,o),i=n.slice(o+1),a=Rt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(RS);continue}e[a]=RS(i)}return e}function an(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?an(r):r});let e={};for(let r in t){let n=t[r];if(ke(r)){e[r]=jg(n);continue}let o=Rt[r]||r;if(ve(r)&&o===r){e[r]=jg(n);continue}if(Pt.has(o)||Pt.has(r)){e[o]=n;continue}e[o]=jg(n)}return e}function jg(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?an(e):e}):typeof t=="object"?an(t):t}function cn(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?cn(r):r});let e={};if(typeof t.in=="string"){let r=lA(t.in);for(let n in r)e[n]=r[n]}for(let r in t){if(r==="in")continue;let n=t[r];if(ke(r)){e[r]=Bg(n);continue}let o=Rt[r]||r;if(ve(r)&&o===r){e[r]=Bg(n);continue}if(Pt.has(o)||Pt.has(r)){e[o]=n;continue}e[o]=Bg(n)}return e}function Bg(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?cn(e):e}):typeof t=="object"?cn(t):t}function IS(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function fA(t){let e="",r=0;for(;r<t.length;){if(t[r]==="\\"&&r+1<t.length){let n=t[r+1];if(n===","||n==="_"||n==="\\"){e+=n,r+=2;continue}}t[r]==="_"?e+=" ":e+=t[r],r++}return e}function uA(t){let e=[],r="",n=0;for(;n<t.length;){if(t[n]==="\\"&&n+1<t.length){r+=t[n]+t[n+1],n+=2;continue}if(t[n]===","){e.push(r),r="",n++;continue}r+=t[n],n++}return e.push(r),e}function DS(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 ln(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?ln(n):n});let e={},r=[];for(let n in t){let o=t[n];if(ke(n)){let i=LS(o);e[n]=DS(i)?i.in:i;continue}if(ve(n)){let i=LS(o);e[n]=DS(i)?i.in:i;continue}let s=pe[n]||n;if(Pt.has(n)||Pt.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(Rr.has(n)||Rr.has(s)){e[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){e[s]=o.map(function(a){return a!==null&&typeof a=="object"?ln(a):a});continue}if(o.length<=1){e[s]=o;continue}r.push(s+":"+o.map(IS).join(","));continue}if(typeof o=="object"){e[s]=ln(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+":"+IS(o))}return r.length&&(e.in=r.join(" ")),e}function LS(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?ln(e):e}):typeof t=="object"?ln(t):t}function FS(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):fA(t)}function Vg(t){if(!t||typeof t!="string")return{};let e={},r=t.trim().split(/\s+/).filter(Boolean);for(let n of r){if(n.startsWith("!")){let l=n.slice(1),f=Rt[l]||l;e[f]=!1;continue}let o=n.indexOf(":");if(o===-1){let l=Rt[n]||n;e[l]=!0;continue}let s=n.slice(0,o),i=n.slice(o+1),a=Rt[s]||s,c=uA(i);if(c.length>1){e[a]=c.map(FS);continue}e[a]=FS(i)}return e}function fn(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?fn(r):r});let e={};if(typeof t.in=="string"){let r=Vg(t.in);for(let n in r)e[n]=r[n]}for(let r in t){if(r==="in")continue;let n=t[r];if(ke(r)){typeof n=="string"?e[r]=Vg(n):e[r]=Ug(n);continue}let o=Rt[r]||r;if(ve(r)&&o===r){typeof n=="string"?e[r]=Vg(n):e[r]=Ug(n);continue}if(Pt.has(o)||Pt.has(r)){e[o]=n;continue}e[o]=Ug(n)}return e}function Ug(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?fn(e):e}):typeof t=="object"?fn(t):t}var dA={shorten:an,stringify:cn,stringifyFurther:fn};function pA(t,e){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(n=>e(n));let r={};for(let n in t){let o=t[n];r[n]=o&&typeof o=="object"?e(o):o}return r}var hA=["components","pages","snippets"],la={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let n=dA[e===!0?"shorten":e];if(n){for(let o of hA)t[o]&&(t[o]=pA(t[o],n));t.app&&typeof t.app=="object"&&(t.app=n(t.app))}}};var em={};I(em,{LEVELS:()=>fa,analyzePlugin:()=>wo,attachBrowserListeners:()=>ql,attachNetworkListeners:()=>da,classifyEvent:()=>Xg,createAnalyzeState:()=>Kl,createBeaconSink:()=>Qg,createConsoleSink:()=>Jg,createDedupe:()=>Kg,createEnrich:()=>Hg,createMemorySink:()=>Zg,createPipeline:()=>Vl,createRedact:()=>Bl,createRemoteSink:()=>zl,createSample:()=>Gg,createSummarize:()=>qg,default:()=>wo,emitFetchEvent:()=>WS,makeEvent:()=>q,meetsLevel:()=>Nl,normalizeLevel:()=>ua,resolveSinks:()=>Hl,summarizeElement:()=>un});var gA=0,mA=()=>`${Date.now().toString(36)}-${(gA++).toString(36)}`,q=(t,e,r={})=>({id:mA(),ts:Date.now(),type:t,level:e,...r}),yA=t=>{let e=[],r=t,n=0;for(;r&&n<32;)r.key!=null&&e.unshift(String(r.key)),r=r.parent,n++;return e.join(" > ")},un=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:yA(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var So=t=>t?.context?.analyze,bA={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"}},xA=(t,{category:e,type:r,level:n})=>o=>{let s=So(o);!s||!s.shouldCapture(e)||s.emit(q(r,n,{hook:t,element:un(o)}))},MS=t=>(e,r)=>{let n=So(e);!n||!n.shouldCapture("state")||n.emit(q("state","debug",{hook:t,element:un(e),changedKeys:r?.changedKeys||null}))},wo={name:"analyze",error(t,e){let r=So(t);if(!r||r.config.enabled===!1||!r.shouldCapture("errors"))return;let n=e?.error||e?.err||(e instanceof Error?e:null);r.emit(q("error","error",{hook:e?.hook||"error",element:un(t),error:n,message:n?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=So(t);e&&(!e.shouldCapture("navigation")&&!e.shouldCapture("lifecycle")||e.emit(q("navigation","info",{hook:"renderRouter",route:t.context?.routerOptions?.currentRoute||null})))},beforeUpdate(t){let e=So(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=So(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(q("update","debug",{hook:"update",element:un(t),durationMs:r}))},beforeStateUpdate:MS("beforeStateUpdate"),stateUpdate:MS("stateUpdate")};for(let[t,e]of Object.entries(bA))wo[t]=xA(t,e);O();var fa={error:0,warn:1,info:2,debug:3,trace:4};var Nl=(t,e)=>{let r=fa[t],n=fa[e];return r==null||n==null?!0:r<=n},ua=t=>fa[t]!=null?t:"warn";O();var jl=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var _A=(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},SA=(t,e)=>{if(e!=="redact"){if(e==="hash"){let r=0,n=String(t);for(let o=0;o<n.length;o++)r=(r<<5)-r+n.charCodeAt(o)|0;return`#${(r>>>0).toString(36)}`}return"***"}},Wg=(t,e,r,n)=>{if(n>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>Wg(s,e,r,n+1));let o={};for(let s of Object.keys(t))if(_A(s,e)||jl.test(s)){let a=SA(t[s],r);a!==void 0&&(o[s]=a)}else o[s]=Wg(t[s],e,r,n+1);return o},Bl=(t=[],e="mask")=>{let r=Array.isArray(t)?t:[t];return n=>{if(!n)return n;let{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:h,...g}=n,p=Wg(g,r,e,0);return{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:h,...p}}};var Hg=t=>{let e=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,r=typeof navigator<"u"?navigator.userAgent:null,n=t.config.buildHash||null,o=t.config.appId||null;return s=>{if(!s)return s;let i=t.context?.routerOptions?.currentRoute||null,a=v,c=a&&a.innerWidth?{w:a.innerWidth,h:a.innerHeight}:null;return{...s,session:e,app:{id:o,build:n,route:i},meta:{ua:r,viewport:c}}}},qg=()=>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},Kg=(t=1e3,e=500)=>{let r=new Map;return n=>{if(!n)return n;let o=`${n.type}:${n.level}:${n.message||""}:${n.error?.message||""}`,s=r.get(o),i=n.ts||Date.now();if(s&&i-s<t)return null;if(r.set(o,i),r.size>e){let a=Math.ceil(e/10),c=0;for(let l of r.keys()){if(c++>=a)break;r.delete(l)}}return n}},Gg=t=>e=>{if(!e)return e;let r=t[e.type];return r==null||r>=1?e:Math.random()>r?null:e},NS={redact:t=>Bl(t.config.redact||[],t.config.maskStrategy),enrich:t=>Hg(t),summarize:()=>qg(),dedupe:t=>Kg(t.config.cache?.dedupeWindowMs||1e3),sample:t=>Gg(t.config.sample||{})},wA=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let r=NS[t];return r?r(e):null}return null},Vl=t=>{let e=t.config,r=Array.isArray(e.transformers)?e.transformers.slice():[],n=r.findIndex(s=>s==="redact");n>=0&&r.splice(n,1);let o=[];e.redact!==!1&&o.push(NS.redact(t));for(let s of r){let i=wA(s,t);i&&o.push(i)}return s=>{let i=s;for(let a of o){if(i==null)return null;let c=a(i);if(c==null)return null;if(Array.isArray(c)){let l=o.slice(o.indexOf(a)+1),f=[];for(let u of c){let d=u,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}};O();O();var Ul=typeof v<"u"&&typeof v.document<"u",kA=5e3,vA=50,CA=3,AA=1500,EA=1e3,Xg=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",TA=t=>{try{return JSON.stringify(t)}catch{return null}},OA=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},RA=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}},PA=()=>{if(!Ul)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}},$A=()=>{if(!Ul)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:RA(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:OA(),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:PA()}},zl=(t={})=>{let e=t.url,r=typeof t.transport=="function"?t.transport:null,n=typeof t.syncTransport=="function"?t.syncTransport:null;if(!e&&!r)return()=>{};let o=t.apiKey||null,s=t.appKey||t.appId||null,i=t.tenantKey||t.tenant||null,a=t.release||null,c=t.env||null,l=t.sdk||null,f=typeof t.getAuth=="function"?t.getAuth:null,u=typeof t.getContext=="function"?t.getContext:null,d=typeof t.classify=="function"?t.classify:Xg,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:kA,x=t.maxBatch||vA,b=t.maxRetries!=null?t.maxRetries:CA,y=t.backoffMs||AA,_=t.queueLimit||EA,k=t.sampleRate!=null?t.sampleRate:1,A=t.sessionId||(typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),R=[],N=[],P=null,$=null,V=()=>{P||!R.length||(P=setTimeout(L,m))},_t=ct=>{if($)return;let lt=y*Math.pow(2,Math.max(0,ct-1));$=setTimeout(()=>{if($=null,!N.length)return;let tt=N.shift();K(tt.envelope,tt.attempt)},lt)},H=(ct,lt=!1)=>{let tt=u?Yg(u):null,Ct={id:A,sentAt:Date.now()};lt&&(Ct.endedAt=Date.now());let D={v:1,session:Ct,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:$A(),user:tt?.user||null,traits:tt?.traits||null,tags:tt?.tags||null,events:ct};if((p?Yg(p)===!0:g)&&(D.app.debug=!0),h)try{return h(D)||null}catch{return D}return D},K=async(ct,lt=1)=>{if(ct)try{let tt=!0;if(r){let Ct=await r(ct);tt=Ct!==!1&&Ct?.ok!==!1}else tt=await IA(e,ct,{apiKey:o,getAuth:f});!tt&<<b&&(N.push({envelope:ct,attempt:lt+1}),_t(lt+1))}catch{lt<b&&(N.push({envelope:ct,attempt:lt+1}),_t(lt+1))}},L=(ct=!1,lt=!1)=>{if(P&&(clearTimeout(P),P=null),!R.length&&!lt)return;let tt=R;R=[];let Ct=H(tt,lt);if(Ct){if(ct&&Ul){if(typeof n=="function"&&Yg(()=>n(Ct)))return;if(navigator.sendBeacon&&e){let D=TA(Ct);if(D)try{navigator.sendBeacon(e,new v.Blob([D],{type:"application/json"}));return}catch{}}}K(Ct)}},W=!1,j=()=>{W||(W=!0,L(!0,!0))};Ul&&(v.addEventListener("pagehide",j,{passive:!0}),v.addEventListener("beforeunload",j,{passive:!0}),v.addEventListener("visibilitychange",()=>{v.document.visibilityState==="hidden"&&L(!0)},{passive:!0}));let yt=ct=>{if(!ct||k<1&&Math.random()>k)return;W&&(W=!1);let lt={...ct,log_type:d(ct)};R.push(lt),R.length>_&&(R=R.slice(-_)),R.length>=x?L():V()};return yt.flush=()=>L(!1),yt.endSession=j,yt.sessionId=A,yt},Yg=t=>{try{return t()}catch{return null}},IA=async(t,e,{apiKey:r,getAuth:n})=>{let o={"Content-Type":"application/json","X-Analyze-Beacon":"1"};if(r&&(o["X-Analyze-Key"]=r),n)try{let s=await n();s&&(o.Authorization=`Bearer ${s}`)}catch{}try{return(await fetch(t,{method:"POST",headers:o,body:JSON.stringify(e),keepalive:!0,credentials:"omit",mode:"cors"})).ok}catch{return!1}};var DA={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},LA="\x1B[0m",Wl=typeof v<"u"&&typeof v.document<"u",Jg=(t={})=>{let e=t.minLevel||null,r=console.error.bind(console),n=console.warn.bind(console),o=console.log.bind(console);return s=>{if(!s)return;let i=s.level==="error"?r:s.level==="warn"?n:o,a=`[analyze:${s.type}]`;if(Wl)i(a,s);else{let c=DA[s.level]||"";i(`${c}${a}${LA}`,s)}}},Zg=(t,e={})=>{let r=e.max||t.config.cache?.max||500,n=new Array(r),o=0,s=0,i=a=>{n[o]=a,o=(o+1)%r,s<r&&s++};return t.__memory={push:i,snapshot:()=>{let a=new Array(s),c=(o-s+r)%r;for(let l=0;l<s;l++)a[l]=n[(c+l)%r];return a},query:(a={})=>{let c=t.__memory.snapshot(),l=a.sinceMs?Date.now()-a.sinceMs:0;return c.filter(f=>!(!f||a.level&&f.level!==a.level||a.type&&f.type!==a.type||l&&f.ts<l))},clear:()=>{o=0,s=0}},i},Qg=(t={})=>{let e=t.url,r=t.batchMs!=null?t.batchMs:5e3,n=t.maxBatch||50;if(!e)return()=>{};let o=[],s=null,i=()=>{if(s&&(clearTimeout(s),s=null),!o.length)return;let c=JSON.stringify({events:o});o=[];let l=Wl?new v.Blob([c],{type:"application/json"}):c;if(Wl&&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(()=>{})};Wl&&(v.addEventListener("pagehide",i,{passive:!0}),v.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},jS={console:Jg,memory:Zg,beacon:Qg,remote:zl},BS=(t,e)=>e.getDebug!=null||e.debug!=null?e:{...e,getDebug:()=>t.config.debug===!0},Hl=t=>{let e=Array.isArray(t.config.sinks)?t.config.sinks:["console"],r=[];for(let n of e)if(typeof n=="function")r.push(n);else if(typeof n=="string"){let o=jS[n];if(!o)continue;r.push(n==="memory"?o(t,{}):o(n==="remote"?BS(t,{}):{}))}else if(n&&typeof n=="object"&&n.type){let o=jS[n.type];if(!o)continue;r.push(n.type==="memory"?o(t,n):o(n.type==="remote"?BS(t,n):n))}return r};O();var FA=typeof v<"u"&&typeof v.document<"u",MA=new Set(["password","hidden"]),VS=(t,e)=>{let r=0,n=null,o=null;return(...s)=>{let i=Date.now();i-r>=e?(r=i,t(...s)):(o=s,n||(n=setTimeout(()=>{r=Date.now(),n=null,o&&(t(...o),o=null)},e-(i-r))))}},tm="__analyzeKeyPath",ko=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[tm])return e[tm];let r=[],n=e,o=0,s=null;for(;n&&o<64;){if(n.getAttribute){let a=n.getAttribute("data-key");a&&(s==null&&(s=a),r.unshift(a))}n=n.parentNode,o++}let i;if(r.length)i={selector:null,key:s,path:r.join(" > "),tag:e.tagName?.toLowerCase()||null};else{let a=(e.tagName||"unknown").toLowerCase(),c=e.id?`#${e.id}`:"",l=e.className&&typeof e.className=="string"?"."+e.className.trim().split(/\s+/).slice(0,2).join("."):"";i={selector:`${a}${c}${l}`,key:null,path:null}}try{e[tm]=i}catch{}return i},NA=(t,e)=>{if(e==="mask")return"***";if(e!=="redact"){if(e==="hash"){let r=0,n=String(t||"");for(let o=0;o<n.length;o++)r=(r<<5)-r+n.charCodeAt(o)|0;return`#${(r>>>0).toString(36)}`}return"***"}},jA=t=>!!(!t||t.tagName==="INPUT"&&MA.has(t.type)||jl.test(t.name||"")||jl.test(t.id||"")||t.dataset?.analyze==="skip"),ql=t=>{if(!FA)return;let e=t.config.capture,r=t.config.throttle,n=t.__teardown,o=(s,i,a,c)=>{s.addEventListener(i,a,c),n.push(()=>s.removeEventListener(i,a,c))};if(e.errors&&(o(v,"error",s=>{t.emit(q("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(v,"unhandledrejection",s=>{let i=s.reason,a=i instanceof Error?i:null;t.emit(q("error","error",{hook:"unhandledrejection",message:a?.message||(typeof i=="string"?i:"Unhandled promise rejection"),error:a}))})),e.pointer){o(v,"click",i=>{t.emit(q("pointer","info",{hook:"click",target:ko(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:US(i)}))},{passive:!0,capture:!0}),o(v,"dblclick",i=>{t.emit(q("pointer","info",{hook:"dblclick",target:ko(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),o(v,"contextmenu",i=>{t.emit(q("pointer","info",{hook:"contextmenu",target:ko(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=VS(i=>{t.emit(q("pointer","trace",{hook:"pointermove",x:i.clientX,y:i.clientY}))},r.pointermove);o(v,"pointermove",s,{passive:!0})}if(e.keyboard&&o(v,"keydown",s=>{t.emit(q("keyboard","info",{hook:"keydown",code:s.code,key:s.key&&s.key.length===1?"\xB7":s.key,modifiers:US(s),target:ko(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=jA(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=NA(a.value,t.config.maskStrategy)),t.emit(q("forms","info",{hook:i.type,target:ko(i),field:{name:a.name||null,type:a.type||a.tagName.toLowerCase()},value:u}))};o(v,"input",s,{passive:!0,capture:!0}),o(v,"change",s,{passive:!0,capture:!0}),o(v,"submit",i=>{t.emit(q("forms","info",{hook:"submit",target:ko(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=VS(()=>{t.emit(q("scroll","trace",{hook:"scroll",x:v.scrollX,y:v.scrollY}))},r.scroll);o(v,"scroll",s,{passive:!0,capture:!0})}if(e.viewport){let s=es(()=>{t.emit(q("viewport","info",{hook:"resize",w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}))},r.resize);o(v,"resize",s,{passive:!0}),o(v,"orientationchange",()=>{t.emit(q("viewport","info",{hook:"orientationchange",orientation:typeof screen<"u"&&screen.orientation?screen.orientation.type:null}))},{passive:!0}),o(v.document,"visibilitychange",()=>{t.emit(q("viewport","info",{hook:"visibilitychange",hidden:v.document.hidden}))},{passive:!0}),t.emit(q("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(q("console",s==="error"?"error":s==="warn"?"warn":"debug",{hook:`console.${s}`,args:a.map(zS)}))}catch{}return i.apply(console,a)},n.push(()=>{console[s]=i})}if(e.performance&&typeof PerformanceObserver<"u")try{let s=new PerformanceObserver(a=>{for(let c of a.getEntries())t.emit(q("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{}},US=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),BA=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=zS(t.cause)),e},zS=t=>{if(t==null)return t;if(t instanceof Error)return BA(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};O();var VA=typeof v<"u"&&typeof v.document<"u",WS=(t,e)=>{let r=t?.analyze;if(!r||!r.shouldCapture("network"))return;let n=e.phase==="error"?"error":"info";r.emit(q("network",n,{hook:`fetch.${e.phase}`,source:"symbo-fetch",...e}))},da=t=>{if(VA&&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(n,o){if(o?.headers?.["X-Analyze-Beacon"]||!t.shouldCapture("network"))return e(n,o);let s=typeof n=="string"?n:n&&n.url||"",i=(o?.method||typeof n=="object"&&n?.method||"GET").toUpperCase(),a=typeof performance<"u"?performance.now():Date.now();return t.emit(q("network","info",{hook:"fetch.start",source:"window.fetch",url:s,method:i})),e(n,o).then(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;return t.emit(q("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(q("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,n=e.prototype.send;e.prototype.open=function(o,s){return this.__analyze={method:String(o).toUpperCase(),url:String(s)},r.apply(this,arguments)},e.prototype.send=function(o){let s=this.__analyze;if(!s||!t.shouldCapture("network"))return n.apply(this,arguments);let i=typeof performance<"u"?performance.now():Date.now();t.emit(q("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(q("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(q("network","error",{hook:"xhr.error",source:"xhr",url:s.url,method:s.method,status:this.status,durationMs:l}))};return this.addEventListener("loadend",a),this.addEventListener("error",c),n.apply(this,arguments)},t.__teardown.push(()=>{e.prototype.open=r,e.prototype.send=n})}}};var UA={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},zA={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},WA={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},HA={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},qA=t=>{let e={...UA,...t};return e.replay&&Object.assign(e,zA),e.telemetry&&Object.assign(e,WA),e.remote&&Object.assign(e,HA),Object.assign(e,t),e},KA=64,GA=()=>{if(typeof v>"u"||!v.location)return null;try{let e=new URLSearchParams(v.location.search).get("analyze");return e||null}catch{return null}},Kl=(t={})=>{let e=t===!0?{}:{...t};e.capture=qA(e.capture||{});let r=GA();(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=ua(e.level||"warn"),e.cache={max:500,dedupeWindowMs:1e3,...e.cache||{}},e.throttle={pointermove:80,mousemove:80,scroll:100,resize:200,...e.throttle||{}},e.maskFormValues==null&&(e.maskFormValues=!0),e.maskStrategy||(e.maskStrategy="mask"),Array.isArray(e.sinks)||(e.sinks=["console","memory"]),Array.isArray(e.transformers)||(e.transformers=["enrich","summarize"]);let n={config:e,context:null,__ready:!1,__paused:!1,__preBuffer:[],__teardown:[],__pipeline:null,__sinks:null,__memory:null,__initialSnapshot:null},o=()=>{n.__pipeline||(n.__pipeline=Vl(n),n.__sinks=Hl(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&&Nl(s.level,n.config.level)){if(!n.__ready){if(s.level!=="error"&&!n.config.captureDuringHydration)return;n.__preBuffer.length<KA&&n.__preBuffer.push(s);return}o(),HS(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)HS(n,a)}try{ql(n)}catch(a){console.error("[analyze] browser attach error:",a)}try{da(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=ua(s)},n.setCapture=(s,i)=>{if(n.config.capture[s]=!!i,s==="network"&&i&&n.__ready)try{da(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.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},HS=(t,e)=>{let r=t.__pipeline(e);if(r==null)return;let n=Array.isArray(r)?r:[r];for(let o of n){if(typeof t.config.onEvent=="function")try{t.config.onEvent(o)}catch{}for(let s of t.__sinks)try{s(o)}catch(i){console.error("[analyze] sink error:",i)}}};var Ce=Object.create(null);Ce.open="0";Ce.close="1";Ce.ping="2";Ce.pong="3";Ce.message="4";Ce.upgrade="5";Ce.noop="6";var pa=Object.create(null);Object.keys(Ce).forEach(t=>{pa[Ce[t]]=t});var ha={type:"error",data:"parser error"};var GS=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",YS=typeof ArrayBuffer=="function",XS=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,ga=({type:t,data:e},r,n)=>GS&&e instanceof Blob?r?n(e):qS(e,n):YS&&(e instanceof ArrayBuffer||XS(e))?r?n(e):qS(new Blob([e]),n):n(Ce[t]+(e||"")),qS=(t,e)=>{let r=new FileReader;return r.onload=function(){let n=r.result.split(",")[1];e("b"+(n||""))},r.readAsDataURL(t)};function KS(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var rm;function JS(t,e){if(GS&&t.data instanceof Blob)return t.data.arrayBuffer().then(KS).then(e);if(YS&&(t.data instanceof ArrayBuffer||XS(t.data)))return e(KS(t.data));ga(t,!1,r=>{rm||(rm=new TextEncoder),e(rm.encode(r))})}var ZS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ma=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<ZS.length;t++)ma[ZS.charCodeAt(t)]=t;var QS=t=>{let e=t.length*.75,r=t.length,n,o=0,s,i,a,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);let l=new ArrayBuffer(e),f=new Uint8Array(l);for(n=0;n<r;n+=4)s=ma[t.charCodeAt(n)],i=ma[t.charCodeAt(n+1)],a=ma[t.charCodeAt(n+2)],c=ma[t.charCodeAt(n+3)],f[o++]=s<<2|i>>4,f[o++]=(i&15)<<4|a>>2,f[o++]=(a&3)<<6|c&63;return l};var YA=typeof ArrayBuffer=="function",ya=(t,e)=>{if(typeof t!="string")return{type:"message",data:tw(t,e)};let r=t.charAt(0);return r==="b"?{type:"message",data:XA(t.substring(1),e)}:pa[r]?t.length>1?{type:pa[r],data:t.substring(1)}:{type:pa[r]}:ha},XA=(t,e)=>{if(YA){let r=QS(t);return tw(r,e)}else return{base64:!0,data:t}},tw=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer;var ew="",rw=(t,e)=>{let r=t.length,n=new Array(r),o=0;t.forEach((s,i)=>{ga(s,!1,a=>{n[i]=a,++o===r&&e(n.join(ew))})})},nw=(t,e)=>{let r=t.split(ew),n=[];for(let o=0;o<r.length;o++){let s=ya(r[o],e);if(n.push(s),s.type==="error")break}return n};function ow(){return new TransformStream({transform(t,e){JS(t,r=>{let n=r.length,o;if(n<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,n);else if(n<65536){o=new Uint8Array(3);let s=new DataView(o.buffer);s.setUint8(0,126),s.setUint16(1,n)}else{o=new Uint8Array(9);let s=new DataView(o.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(o[0]|=128),e.enqueue(o),e.enqueue(r)})}})}var nm;function Gl(t){return t.reduce((e,r)=>e+r.length,0)}function Yl(t,e){if(t[0].length===e)return t.shift();let r=new Uint8Array(e),n=0;for(let o=0;o<e;o++)r[o]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),r}function sw(t,e){nm||(nm=new TextDecoder);let r=[],n=0,o=-1,s=!1;return new TransformStream({transform(i,a){for(r.push(i);;){if(n===0){if(Gl(r)<1)break;let c=Yl(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(Gl(r)<2)break;let c=Yl(r,2);o=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),n=3}else if(n===2){if(Gl(r)<8)break;let c=Yl(r,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(ha);break}o=f*Math.pow(2,32)+l.getUint32(4),n=3}else{if(Gl(r)<o)break;let c=Yl(r,o);a.enqueue(ya(s?c:nm.decode(c),e)),n=0}if(o===0||o>t){a.enqueue(ha);break}}}})}var om=4;function at(t){if(t)return JA(t)}function JA(t){for(var e in at.prototype)t[e]=at.prototype[e];return t}at.prototype.on=at.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};at.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};at.prototype.off=at.prototype.removeListener=at.prototype.removeAllListeners=at.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var n,o=0;o<r.length;o++)if(n=r[o],n===e||n.fn===e){r.splice(o,1);break}return r.length===0&&delete this._callbacks["$"+t],this};at.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,o=r.length;n<o;++n)r[n].apply(this,e)}return this};at.prototype.emitReserved=at.prototype.emit;at.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};at.prototype.hasListeners=function(t){return!!this.listeners(t).length};var tr=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),Ft=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),iw="arraybuffer";function Xl(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}var ZA=Ft.setTimeout,QA=Ft.clearTimeout;function er(t,e){e.useNativeTimers?(t.setTimeoutFn=ZA.bind(Ft),t.clearTimeoutFn=QA.bind(Ft)):(t.setTimeoutFn=Ft.setTimeout.bind(Ft),t.clearTimeoutFn=Ft.clearTimeout.bind(Ft))}var tE=1.33;function aw(t){return typeof t=="string"?eE(t):Math.ceil((t.byteLength||t.size)*tE)}function eE(t){let e=0,r=0;for(let n=0,o=t.length;n<o;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}function Jl(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function cw(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function lw(t){let e={},r=t.split("&");for(let n=0,o=r.length;n<o;n++){let s=r[n].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}var Zl=class extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}},rr=class extends at{constructor(e){super(),this.writable=!1,er(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,r,n){return super.emitReserved("error",new Zl(e,r,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let r=ya(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=cw(e);return r.length?"?"+r:""}};var ba=class extends rr{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let r=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};nw(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,rw(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]=Jl()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}};var fw=!1;try{fw=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var uw=fw;function rE(){}var sm=class extends ba{constructor(e){if(super(e),typeof location<"u"){let r=location.protocol==="https:",n=location.port;n||(n=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,r){let n=this.request({method:"POST",data:e});n.on("success",r),n.on("error",(o,s)=>{this.onError("xhr post error",o,s)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=e}},Pr=class t extends at{constructor(e,r,n){super(),this.createRequest=e,er(this,n),this._opts=n,this._method=n.method||"GET",this._uri=r,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var e;let r=Xl(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;let n=this._xhr=this.createRequest(r);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&n.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var o;n.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=t.requestsCount++,t.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=rE,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()}};Pr.requestsCount=0;Pr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",dw);else if(typeof addEventListener=="function"){let t="onpagehide"in Ft?"pagehide":"unload";addEventListener(t,dw,!1)}}function dw(){for(let t in Pr.requests)Pr.requests.hasOwnProperty(t)&&Pr.requests[t].abort()}var nE=(function(){let t=pw({xdomain:!1});return t&&t.responseType!==null})(),$r=class extends sm{constructor(e){super(e);let r=e&&e.forceBase64;this.supportsBinary=nE&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Pr(pw,this.uri(),e)}};function pw(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||uw))return new XMLHttpRequest}catch{}if(!e)try{return new Ft[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var hw=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",am=class extends rr{get name(){return"websocket"}doOpen(){let e=this.uri(),r=this.opts.protocols,n=hw?{}:Xl(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,n)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let r=0;r<e.length;r++){let n=e[r],o=r===e.length-1;ga(n,this.supportsBinary,s=>{try{this.doWrite(n,s)}catch{}o&&tr(()=>{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]=Jl()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}},im=Ft.WebSocket||Ft.MozWebSocket,Ir=class extends am{createSocket(e,r,n){return hw?new im(e,r,n):r?new im(e,r):new im(e)}doWrite(e,r){this.ws.send(r)}};var vo=class extends rr{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=sw(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(r).getReader(),o=ow();o.readable.pipeTo(e.writable),this._writer=o.writable.getWriter();let s=()=>{n.read().then(({done:a,value:c})=>{a||(this.onPacket(c),s())}).catch(a=>{})};s();let i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let r=0;r<e.length;r++){let n=e[r],o=r===e.length-1;this._writer.write(n).then(()=>{o&&tr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var cm={websocket:Ir,webtransport:vo,polling:$r};var oE=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,sE=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Co(t){if(t.length>8e3)throw"URI too long";let e=t,r=t.indexOf("["),n=t.indexOf("]");r!=-1&&n!=-1&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let o=oE.exec(t||""),s={},i=14;for(;i--;)s[sE[i]]=o[i]||"";return r!=-1&&n!=-1&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=iE(s,s.path),s.queryKey=aE(s,s.query),s}function iE(t,e){let r=/\/{2,9}/g,n=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function aE(t,e){let r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,s){o&&(r[o]=s)}),r}var lm=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ql=[];lm&&addEventListener("offline",()=>{Ql.forEach(t=>t())},!1);var dn=class t extends at{constructor(e,r){if(super(),this.binaryType=iw,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(r=e,e=null),e){let n=Co(e);r.hostname=n.host,r.secure=n.protocol==="https"||n.protocol==="wss",r.port=n.port,n.query&&(r.query=n.query)}else r.host&&(r.hostname=Co(r.host).host);er(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=lw(this.opts.query)),lm&&(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"})},Ql.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let r=Object.assign({},this.opts.query);r.EIO=om,r.transport=e,this.id&&(r.sid=this.id);let n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let e=this.opts.rememberUpgrade&&t.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let r=this.createTransport(e);r.open(),this.setTransport(r)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",t.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let r=new Error("server error");r.code=e.data,this._onError(r);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let n=0;n<this.writeBuffer.length;n++){let o=this.writeBuffer[n].data;if(o&&(r+=aw(o)),n>0&&r>this._maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,tr(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,n){return this._sendPacket("message",e,r,n),this}send(e,r,n){return this._sendPacket("message",e,r,n),this}_sendPacket(e,r,n,o){if(typeof r=="function"&&(o=r,r=void 0),typeof n=="function"&&(o=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;let s={type:e,data:r,options:n};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),o&&this.once("flush",o),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(e){if(t.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),lm&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let n=Ql.indexOf(this._offlineEventListener);n!==-1&&Ql.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}};dn.protocol=om;var tf=class extends dn{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let r=this.createTransport(e),n=!1;dn.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;dn.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(f(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{let d=new Error("probe error");d.transport=r.name,this.emitReserved("upgradeError",d)}}))};function s(){n||(n=!0,f(),r.close(),r=null)}let i=u=>{let d=new Error("probe error: "+u);d.transport=r.name,s(),this.emitReserved("upgradeError",d)};function a(){i("transport closed")}function c(){i("socket closed")}function l(u){r&&u.name!==r.name&&s()}let f=()=>{r.removeListener("open",o),r.removeListener("error",i),r.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};r.once("open",o),r.once("error",i),r.once("close",a),this.once("close",c),this.once("upgrading",l),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let r=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&r.push(e[n]);return r}},Ao=class extends tf{constructor(e,r={}){let n=typeof e=="object",o=n?{...e}:{...r};(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(s=>cm[s]).filter(s=>!!s)),super(n?o:e,o)}};var cN=Ao.protocol;function gw(t,e="",r){let n=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),n=Co(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";let s=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+s+":"+n.port+e,n.href=n.protocol+"://"+s+(r&&r.port===n.port?"":":"+n.port),n}var gm={};I(gm,{Decoder:()=>pm,Encoder:()=>dm,PacketType:()=>B,isPacketValid:()=>TE,protocol:()=>Aw});var lE=typeof ArrayBuffer=="function",fE=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,mw=Object.prototype.toString,uE=typeof Blob=="function"||typeof Blob<"u"&&mw.call(Blob)==="[object BlobConstructor]",dE=typeof File=="function"||typeof File<"u"&&mw.call(File)==="[object FileConstructor]";function _a(t){return lE&&(t instanceof ArrayBuffer||fE(t))||uE&&t instanceof Blob||dE&&t instanceof File}function xa(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(xa(t[r]))return!0;return!1}if(_a(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return xa(t.toJSON(),!0);for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&xa(t[r]))return!0;return!1}function yw(t){let e=[],r=t.data,n=t;return n.data=ef(r,e),n.attachments=e.length,{packet:n,buffers:e}}function ef(t,e,r){if(!t)return t;if(_a(t)){let n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){let n=new Array(t.length);for(let o=0;o<t.length;o++)n[o]=ef(t[o],e);return n}else if(typeof t=="object"&&!(t instanceof Date)){if(t.toJSON&&typeof t.toJSON=="function"&&!r)return ef(t.toJSON(),e,!0);let n={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=ef(t[o],e));return n}return t}function bw(t,e){return t.data=fm(t.data,e),delete t.attachments,t}function fm(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]=fm(t[r],e);else if(typeof t=="object")for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=fm(t[r],e));return t}var vw=Qw(kw(),1),um=(0,vw.default)("socket.io-parser"),Cw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Aw=5,B;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(B||(B={}));var dm=class{constructor(e){this.replacer=e}encode(e){return um("encoding packet %j",e),(e.type===B.EVENT||e.type===B.ACK)&&xa(e)?this.encodeAsBinary({type:e.type===B.EVENT?B.BINARY_EVENT:B.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===B.BINARY_EVENT||e.type===B.BINARY_ACK)&&(r+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(r+=e.nsp+","),e.id!=null&&(r+=e.id),e.data!=null&&(r+=JSON.stringify(e.data,this.replacer)),um("encoded %j as %s",e,r),r}encodeAsBinary(e){let r=yw(e),n=this.encodeAsString(r.packet),o=r.buffers;return o.unshift(n),o}},pm=class t extends at{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);let n=r.type===B.BINARY_EVENT;n||r.type===B.BINARY_ACK?(r.type=n?B.EVENT:B.ACK,this.reconstructor=new hm(r)):super.emitReserved("decoded",r)}else if(_a(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0,n={type:Number(e.charAt(0))};if(B[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===B.BINARY_EVENT||n.type===B.BINARY_ACK){let s=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);let i=e.substring(s,r);if(i!=Number(i)||e.charAt(r)!=="-")throw new Error("Illegal attachments");let a=Number(i);if(!Ew(a)||a<1)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");n.attachments=a}if(e.charAt(r+1)==="/"){let s=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););n.nsp=e.substring(s,r)}else n.nsp="/";let o=e.charAt(r+1);if(o!==""&&Number(o)==o){let s=r+1;for(;++r;){let i=e.charAt(r);if(i==null||Number(i)!=i){--r;break}if(r===e.length)break}n.id=Number(e.substring(s,r+1))}if(e.charAt(++r)){let s=this.tryParse(e.substr(r));if(t.isPayloadValid(n.type,s))n.data=s;else throw new Error("invalid payload")}return um("decoded %s as %j",e,n),n}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case B.CONNECT:return of(r);case B.DISCONNECT:return r===void 0;case B.CONNECT_ERROR:return typeof r=="string"||of(r);case B.EVENT:case B.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&Cw.indexOf(r[0])===-1);case B.ACK:case B.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},hm=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=bw(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function CE(t){return typeof t=="string"}var Ew=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function AE(t){return t===void 0||Ew(t)}function of(t){return Object.prototype.toString.call(t)==="[object Object]"}function EE(t,e){switch(t){case B.CONNECT:return e===void 0||of(e);case B.DISCONNECT:return e===void 0;case B.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&Cw.indexOf(e[0])===-1);case B.ACK:return Array.isArray(e);case B.CONNECT_ERROR:return typeof e=="string"||of(e);default:return!1}}function TE(t){return CE(t.nsp)&&AE(t.id)&&EE(t.type,t.data)}function Qt(t,e,r){return t.on(e,r),function(){t.off(e,r)}}var OE=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Ro=class extends at{constructor(e,r,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=r,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[Qt(e,"open",this.onopen.bind(this)),Qt(e,"packet",this.onpacket.bind(this)),Qt(e,"error",this.onerror.bind(this)),Qt(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...r){var n,o,s;if(OE.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(r.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;let i={type:B.EVENT,data:r};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){let f=this.ids++,u=r.pop();this._registerAckCallback(f,u),i.id=f}let a=(o=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||o===void 0?void 0:o.writable,c=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,r){var n;let o=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(o===void 0){this.acks[e]=r;return}let s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);r.call(this,new Error("operation has timed out"))},o),i=(...a)=>{this.io.clearTimeoutFn(s),r.apply(this,a)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...r){return new Promise((n,o)=>{let s=(i,a)=>i?o(i):n(a);s.withError=!0,r.push(s),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());let n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((o,...s)=>(this._queue[0],o!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(o)):(this._queue.shift(),r&&r(null,...s)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:B.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(n=>String(n.id)===e)){let n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case B.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case B.EVENT:case B.BINARY_EVENT:this.onevent(e);break;case B.ACK:case B.BINARY_ACK:this.onack(e);break;case B.DISCONNECT:this.ondisconnect();break;case B.CONNECT_ERROR:this.destroy();let n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);break}}onevent(e){let r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let r=this._anyListeners.slice();for(let n of r)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let r=this,n=!1;return function(...o){n||(n=!0,r.packet({type:B.ACK,id:e,data:o}))}}onack(e){let r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:B.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let r=this._anyListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let r=this._anyOutgoingListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let r=this._anyOutgoingListeners.slice();for(let n of r)n.apply(this,e.data)}}};function hn(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}hn.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};hn.prototype.reset=function(){this.attempts=0};hn.prototype.setMin=function(t){this.ms=t};hn.prototype.setMax=function(t){this.max=t};hn.prototype.setJitter=function(t){this.jitter=t};var Po=class extends at{constructor(e,r){var n;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,er(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 hn({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;let o=r.parser||gm;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Ao(this.uri,this.opts);let r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;let o=Qt(r,"open",function(){n.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=Qt(r,"error",s);if(this._timeout!==!1){let a=this._timeout,c=this.setTimeoutFn(()=>{o(),s(new Error("timeout")),r.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(o),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(Qt(e,"ping",this.onping.bind(this)),Qt(e,"data",this.ondata.bind(this)),Qt(e,"error",this.onerror.bind(this)),Qt(e,"close",this.onclose.bind(this)),Qt(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){tr(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Ro(this,e,r),this.nsps[e]=n),n}_destroy(e){let r=Object.keys(this.nsps);for(let n of r)if(this.nsps[n].active)return;this._close()}_packet(e){let r=this.encoder.encode(e);for(let n=0;n<r.length;n++)this.engine.write(r[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,r){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let r=this.backoff.duration();this._reconnecting=!0;let n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var Sa={};function $o(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let r=gw(t,e.path||"/socket.io"),n=r.source,o=r.id,s=r.path,i=Sa[o]&&s in Sa[o].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new Po(n,e):(Sa[o]||(Sa[o]=new Po(n,e)),c=Sa[o]),r.query&&!e.query&&(e.query=r.queryKey),c.socket(r.path,e)}Object.assign($o,{Manager:Po,Socket:Ro,io:$o,connect:$o});O();var Tw=new Set(["__proto__","constructor","prototype"]),Ow=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(Tw.has(t[e]))return!1;return!0},RE=(t,e)=>{!t||!Ow(e)||e.reduce((r,n,o,s)=>{if(r&&n in r){if(o!==s.length-1)return r[n];delete r[n]}},t)},PE=(t,e,r,n=!1)=>{!t||!Ow(e)||e.reduce((o,s,i,a)=>{if(o){if(i!==a.length-1)return!o[s]&&n&&(o[s]={}),o[s];o[s]=r}},t)},mm=(t,e)=>{let r=new Set;if(!Array.isArray(e))return r;for(let[n,o,s]of e)if(!(!Array.isArray(o)||!o.length))switch(r.add(o[0]),n){case"delete":RE(t,o);break;case"update":case"set":PE(t,o,s,!0);break;default:break}return r},Rw=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},Pw=(t,e)=>{for(let r in e){if(Tw.has(r))continue;let n=e[r],o=t[r];if(n&&typeof n=="object"&&!Array.isArray(n)){if(!o||typeof o!="object"||Array.isArray(o)){r in t||(t[r]=JSON.parse(JSON.stringify(n)));continue}Pw(o,n)}else r in t||(t[r]=n)}},ym=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let o={designSystem:t.__rawDesignSystem};mm(o,e)}let r=JSON.parse(JSON.stringify(t.__rawDesignSystem)),n=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[];for(let o of n){let s=o&&o.designSystem;s&&typeof s=="object"&&Pw(r,s)}return r};O();var $w=(t,e,r)=>{let n=!1;return(o={})=>{let{data:s}=o,{schema:i}=o;s&&(s=t.call("deepDestringifyFunctions",s,Array.isArray(s)?[]:{}),Object.entries(s).forEach(([a,c])=>{if(r[a]&&typeof r[a]=="object")if(a==="designSystem"){if(Rw(r,c),n){let l=ym(r);l&&Qe(l)}}else Ur(r[a],c);else r[a]=c}),n=!0,i&&(r.schema=i))}},Iw=(t,e,r)=>(n={})=>{let{changes:o}=n;if(!o||!Array.isArray(o)||!o.length)return;o=t.call("deepDestringifyFunctions",o,Array.isArray(o)?[]:{});let s=o.filter(c=>Array.isArray(c)&&Array.isArray(c[1])&&c[1][0]==="designSystem"),i=s.length?o.filter(c=>!s.includes(c)):o,a=mm(r,i);if(s.length&&a.add("designSystem"),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})}if(a.has("designSystem")){let c=ym(r,s);Qe(c||r.designSystem)}};var $E={success:"green",error:"red",warning:"yellow"},Dw=(t,e,r)=>{if(t.symbols){if(!r.connected){r.notifications.connected={title:"Connected",message:"to the Symbols live server"},r.update({connected:!0});let n=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(n)},3e3)}}else if(r.connected){r.notifications.connected={title:"Disconnected",type:"error"},r.update({connected:!1});let n=setTimeout(()=>{delete r.notifications.connected,e.notifications.content.connected&&e.notifications.content.connected.update({animation:"fadeOutDown"}),r.update({connected:!0}),clearTimeout(n)},3e3)}},Lw={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:$E[t.type||"success"],icon:null,Flex:{Title:{text:"{{ title }}"},P:{text:"{{ title }}"}},onRender:(e,r,n)=>{r.update({animation:"fadeInUp"})},onClick:(e,r,n)=>{delete n.notifications[r.key],r.update({animation:"fadeOutDown"}),n.onClose&&n.onClose(e,r,n)}}),IconText:null,childrenAs:"state",children:({state:t})=>t.notifications}};var IE=!1,DE=()=>IE?"http://localhost:8080":"https://api.symbols.app",LE=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}},FE=async t=>{try{let e=t||DE(),r=await v.fetch(`${e}/service-token`,{method:"GET"}),n;try{let o=await r.clone().json();if(o&&typeof o.token=="string")return o.token.trim();n=await r.text()}catch{n=await r.text()}return(n||"").replace(/\s+/gu,"")||void 0}catch(e){console.error("[sync] Failed to fetch service-token",e)}},Nw=(t,e,r,n)=>{t.on("snapshot",$w(e,r,n)),t.on("ops",Iw(e,r,n)),t.on("clients",o=>{n.editor?.verbose&&Dw(o,e,r)}),t.on("disconnect",o=>{n.editor?.verbose&&console.info("[sync] disconnected",o)})},ME=async(t,e,r,n)=>{let o=await FE(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=$o(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)")}),Nw(a,t,e,r),a},NE=(t,e,r)=>{let n=$o({transports:["websocket","polling"],reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return n.on("connect",()=>{r.editor?.verbose!==!1&&console.info("[sync] connected (runner)")}),Nw(n,t,e,r),n.on("reload",()=>{typeof v<"u"&&v.location&&v.location.reload()}),n},jE=async(t,e,r)=>{let{mode:n,baseUrl:o}=LE(r);return n?n==="collab"?ME(t,e,r,o):n==="runner"?NE(t,e,r):null:null},BE={onInit:jE};var jw=t=>typeof t>"u",Fw=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),Mw=t=>t?.editor?.runtime==="runner",Bw=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},Vw={name:"sync",beforeCreate(t,e){let r=e&&e.editor;(r&&!jw(r.liveSync)?r.liveSync:Fw(e)||Mw(e))&&(Fw(e)&&!Mw(e)&&!e?.key||Bw(t,BE))}},Uw={name:"notifications",beforeCreate(t,e){if(!e)return;let r=jw(e.notifications)?null:e.notifications,n=e.editor&&e.editor.verbose===!0;(r===!0||r!==!1&&n)&&Bw(t,Lw)}};var _m={};I(_m,{Inspect:()=>sf,inspectPlugin:()=>xm});O();function zw(t){return S(t)?t:T(t)?t.find(e=>S(e)):""}function bm(t){if(!t)return;let e=t.__ref.__componentKey,r=t.extends&&zw(t.extends),n=t.parent&&t.parent.childExtends&&zw(t.parent.childExtends);return(e||r||n||"").split("_")[0].split(".")[0].split("+")[0]}function af(t){if(!t||!t.__ref)return;let{components:e,pages:r,editor:n}=t.context,o=bm(t);return n&&n.onInitInspect&&!n.onInitInspect(o,t,t.state)?af(t.parent):o&&(e[o]||r[o])?t:af(t.parent)}var VE=(t,e,r)=>{let n=r.window||window;n.onkeydown=o=>{o.altKey&&o.shiftKey&&t.state.update({debugging:!0,preventSelect:!0},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0})},n.onkeyup=o=>{t.state.preventSelect&&(!o.altKey||!o.shiftKey)&&(t.state.replace({debugging:!1,preventSelect:!1},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0}),t.Inspector.state.update({area:!1}))}},sf={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:VE,onMousemove:(t,e,r)=>{let n=t.target.ref,o=af(n),s=e.Inspector.state;if(!o||!r.debugging||!o.__ref)return s.update({area:!1});let i=bm(o),a=l=>{s.update({area:l,focusKey:i})},c=()=>{if(t.altKey&&t.shiftKey){let{x:l,y:f,width:u,height:d}=o.node.getBoundingClientRect(),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 n=t.target.ref,o=af(n);if(!o)return;let s=bm(o);if(!s)return;let i=n.context.editor;if(i&&i.onInspect)return i.onInspect(s,n,n.state,{allowRouterWhileInspect:!0});let a=JSON.stringify({componentKey:`${s}`});return n.context.socket?.emit&&n.context.socket.emit("route",a),t.preventDefault(),t.stopPropagation(),!1},Inspector:{state:{},transition:"all, defaultBezier, X",position:"fixed",hide:(t,e)=>!(e.area&&e.parent.debugging),style:{boxShadow:"0 0 10px #3686F733, 0 0 0 3px #3686F766, 0 0 100vmax 100vmax #000A",zIndex:"9999999",borderRadius:"10px",pointerEvents:"none"},Span:{position:"absolute",margin:"A2 0",fontSize:"Z",color:"text",zIndex:"99999999",transition:"all, defaultBezier, X",textDecoration:"underline",fontWeight:"500",top:"100%",style:{boxShadow:"0 25px 10px 35px black",textShadow:"0 0 10px black"},text:"{{ focusKey }}"},onInit:({context:t})=>{let{components:e}=t;if(w(e)){let{Content:r,...n}=e;for(let o in n)po[o]||(n[o].__ref||(n[o].__ref={}),n[o].__ref.__componentKey||(n[o].__ref.__componentKey=o))}},onBeforeUpdate:(t,e,r)=>{let{area:n}=r,o=r.area&&r.parent.debugging,s;if(!o)s="display: none !important";else if(n){let{x:i,y:a,width:c,height:l}=n;s=`
|
|
82
|
+
)`};var YT={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"}}}},XT={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},JT={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"}}},Dx={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...YT,...XT,...JT,none:{color:"none",background:"none"},transparent:{color:"currentColor",background:"transparent"}};var $x={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var Lx={ratio:1.618,subSequence:!0};var Mx={SourceSans:[{url:""}]},Fx={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 Nx={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 jx={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 Bx={base:150,ratio:1.333,unit:"ms",subSequence:!0};var Ux={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var ya={version:"0.0.1",color:Px,gradient:Ix,theme:Dx,typography:$x,spacing:Lx,font:Mx,fontFamily:Fx,timing:Bx,icons:Nx,media:jx,sizes:Ux,reset:{html:{},body:{}},animation:{fadeIn:{from:{opacity:0},to:{opacity:1}}},devices:{},class:{},svg:{},grid:{},shape:{}};var Dn={};P(Dn,{A:()=>nS,AssetPicture:()=>sw,Audio:()=>cw,Avatar:()=>_S,B:()=>Aw,Block:()=>Vx,Box:()=>gf,Br:()=>Pw,Button:()=>aS,ButtonSet:()=>uS,COMPONENTS:()=>mo,Caption:()=>bw,Checkbox:()=>Uw,CheckboxHgroup:()=>Vw,Circle:()=>rw,CircleButton:()=>lS,Clickable:()=>Qx,Data:()=>Ow,Dialog:()=>pS,DialogFooter:()=>gS,DialogHeader:()=>hS,Dropdown:()=>wS,DropdownList:()=>SS,DropdownParent:()=>kS,DropdownParentFocus:()=>vS,DropdownSiblingFocus:()=>CS,FileIcon:()=>tS,Flex:()=>zx,Focusable:()=>tw,FocusableComponent:()=>ew,Footnote:()=>Ew,Form:()=>Xx,Grid:()=>qx,Gutter:()=>Gx,H1:()=>uw,H2:()=>dw,H3:()=>pw,H4:()=>hw,H5:()=>gw,H6:()=>mw,Headline:()=>vw,Hgroup:()=>Mw,HgroupButton:()=>Nw,HgroupRows:()=>Fw,Hoverable:()=>Zx,Hr:()=>Rw,I:()=>Tw,Icon:()=>Zw,IconButton:()=>dS,IconText:()=>Qw,Iframe:()=>Jx,Img:()=>Yx,Inline:()=>Hx,InlineFlex:()=>Wx,InlineGrid:()=>Kx,Input:()=>jw,Italic:()=>Sw,KangorooButton:()=>fS,Li:()=>Iw,Link:()=>ym,Notification:()=>ES,NumberInput:()=>Bw,Ol:()=>$w,P:()=>yw,Picture:()=>nw,Radio:()=>Hw,RadioHgroup:()=>zw,Range:()=>xS,RouteLink:()=>sS,RouterLink:()=>bm,SHAPES:()=>pf,Select:()=>iS,Shape:()=>Gg,Span:()=>fw,SquareButton:()=>cS,Strong:()=>_w,Subhead:()=>Cw,Svg:()=>iw,Text:()=>lw,Textarea:()=>Kw,TextareaWithButton:()=>Gw,Theme:()=>ow,Title:()=>kw,Toggle:()=>Ww,ToggleHgroup:()=>qw,Tooltip:()=>mS,TooltipHidden:()=>yS,TooltipParent:()=>bS,U:()=>xw,Ul:()=>Dw,Underline:()=>ww,Video:()=>aw,depth:()=>hf,focusableRingEnabled:()=>uf,getSystemGlobalTheme:()=>ba});var Hg={};P(Hg,{Block:()=>Vx,Flex:()=>zx,Grid:()=>qx,Gutter:()=>Gx,Inline:()=>Hx,InlineFlex:()=>Wx,InlineGrid:()=>Kx});var Vx={display:"block"},Hx={display:"inline"},zx={display:"flex"},Wx={display:"inline-flex"},qx={display:"grid"},Kx={display:"inline-grid"},Gx={boxSize:"C1"};var zg={};P(zg,{Img:()=>Yx});R();var Yx={tag:"img",attr:{title:t=>t.title||t.alt,alt:t=>t.alt!=null?t.alt:t.title||"",src:t=>{let e=Wt(t);return e&&e.src||t.src},srcset:t=>{let e=Wt(t);return(e?wi(e):"")||t.srcset}}};var Wg={};P(Wg,{Form:()=>Xx});var Xx={tag:"form"};var qg={};P(qg,{Iframe:()=>Jx});var Jx={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var Kg={};P(Kg,{Clickable:()=>Qx,Focusable:()=>tw,FocusableComponent:()=>ew,Hoverable:()=>Zx,focusableRingEnabled:()=>uf});var ZT={appearance:"none",cursor:"pointer",fontFamily:"inherit"},Zx={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}}},Qx={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 tw={border:"none",outline:t=>uf(t)?"solid 0 blue.3":"none",":focus-visible":{opacity:1,outline:t=>uf(t)?"solid X blue.3":"none"},attr:{tabIndex:t=>t.tabIndex}},ew={extends:"Focusable",tag:"button",fontSize:"A",type:"button",border:"none",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",fontFamily:"inherit",style:ZT};var Jg={};P(Jg,{Picture:()=>nw});var Xg={};P(Xg,{Theme:()=>ow,getSystemGlobalTheme:()=>ba});var Yg={};P(Yg,{Circle:()=>rw,SHAPES:()=>pf,Shape:()=>Gg,default:()=>QT,depth:()=>hf});R();var be=E(),hf={4:{boxShadow:`rgba(0,0,0,.10) 0 2${be.unit.default} 4${be.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${be.unit.default} 6${be.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${be.unit.default} 10${be.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${be.unit.default} 16${be.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${be.unit.default} 26${be.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${be.unit.default} 42${be.unit.default}`}},In=t=>ot(t.shapeDirectionColor)||ot(t.borderColor)||ot(t.backgroundColor)||ot(t.background),df=t=>{let e=la.transition(t.transition,t);return e&&e.transition},pf={rectangle:{},circle:{borderRadius:"100%"},bubble:{},tv:{borderRadius:"1.15em/2.5em"},tooltip:t=>({position:t.position||"relative","&:before":{content:'""',display:"block",width:"0px",height:"0px",border:".35em solid",borderColor:In(t),transition:df(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:In(t),transition:df(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:In(t),transition:df(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:df(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${In(t)} 25%, transparent 25%), linear-gradient(315deg, ${In(t)} 25%, transparent 25%)`},"&:after":{background:In(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)"}}}},Gg={deps:{exec:ct,getSpacingBasedOnRatio:Ee,getMediaColor:Rt},classlist:{shape:t=>t.deps.exec(pf[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=pf[t.shape+"Direction"];return t.shape&&e?e[t.shapeDirection||"left"]:null},shapeDirectionColor:t=>{let e={borderColor:t.deps.getMediaColor(t.background||t.backgroundColor)};return t.shapeDirection?e:null}}},rw={round:"100%"},QT=Gg;R();var ba=({context:t,state:e})=>{let r=e&&e.root,o=r&&r.globalTheme||t.designSystem&&t.designSystem.globalTheme;return o==="auto"?null:o},ow={deps:{depth:hf},classlist:{depth:t=>!Et(t.depth)&&t.deps.depth[t.depth]}};var nw={deps:{getSystemGlobalTheme:ba},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:ba},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 Zg={};P(Zg,{AssetPicture:()=>sw});R();var sw={tag:"picture",children:t=>{let e=Wt(t);if(e)return Si(e,t.alt)}};var Qg={};P(Qg,{Svg:()=>iw});var iw={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 tm={};P(tm,{Video:()=>aw});R();var aw={tag:"video",controls:!0,attr:{src:t=>{let e=Wt(t);return e&&e.src||t.src}},children:t=>{let e=Wt(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 em={};P(em,{Audio:()=>cw});R();var cw={tag:"audio",controls:!0,attr:{src:t=>{let e=Wt(t);return e&&e.src||t.src}},children:t=>{let e=Wt(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 rm={};P(rm,{B:()=>Aw,Caption:()=>bw,Data:()=>Ow,Footnote:()=>Ew,H1:()=>uw,H2:()=>dw,H3:()=>pw,H4:()=>hw,H5:()=>gw,H6:()=>mw,Headline:()=>vw,I:()=>Tw,Italic:()=>Sw,P:()=>yw,Span:()=>fw,Strong:()=>_w,Subhead:()=>Cw,Text:()=>lw,Title:()=>kw,U:()=>xw,Underline:()=>ww});var lw={},fw={tag:"span"},uw={tag:"h1"},dw={tag:"h2"},pw={tag:"h3"},hw={tag:"h4"},gw={tag:"h5"},mw={tag:"h6"},yw={tag:"p"},bw={tag:"caption"},_w={tag:"strong",fontWeight:"700"},xw={tag:"u"},ww={tag:"u"},Sw={tag:"i"},kw={},vw={tag:"h6",fontSize:"B",fontWeight:500},Cw={tag:"span",fontSize:"Z1"},Ew={tag:"span",fontSize:"Z"},Aw={tag:"b"},Tw={tag:"i"},Ow={tag:"data"};var om={};P(om,{Box:()=>gf,Br:()=>Pw,Hr:()=>Rw,Li:()=>Iw,Ol:()=>$w,Ul:()=>Dw});var t1=t=>{if(!t.context)return;let{props:e,__ref:r}=t,o=oe(e,t,{unpack:!1});r.__class=o},gf={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:t1},Rw={tag:"hr",margin:"C1 0"},Pw={tag:"br"},Iw={tag:"li"},Dw={tag:"ul",childExtends:{extends:"Li"}},$w={tag:"ol",childExtends:{extends:"Li"}};var nm={};P(nm,{Hgroup:()=>Mw,HgroupButton:()=>Nw,HgroupRows:()=>Fw});var Lw=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},Mw={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:Lw,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:Lw,margin:"0",color:"paragraph"}},Fw={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},Nw={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var sm={};P(sm,{Input:()=>jw});var jw={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 im={};P(im,{NumberInput:()=>Bw});var Bw={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 am={};P(am,{Checkbox:()=>Uw,CheckboxHgroup:()=>Vw});var Uw={extends:"Focusable",tag:"label",boxSize:"fit-content fit-content",cursor:"pointer",round:"Y",Input:{type:"checkbox",position:"absolute",opacity:"0",width:"1px",height:"1px",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",":checked + div":{theme:"primary"},":checked + div > svg":{transform:"none",opacity:"1"},":focus-visible + div":{outline:"solid X blue.3",outlineOffset:"Z"},attr:{checked:t=>t.call("exec",t.parent.checked)}},Flex:{align:"center center",fontSize:"B1",padding:"V",theme:"field",round:"X2",transition:"background A defaultBezier",Icon:{icon:"check",opacity:"0",transform:"scale(0.9) rotate(-15deg)",transition:"opacity B defaultBezier"}}},Vw={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var cm={};P(cm,{Radio:()=>Hw,RadioHgroup:()=>zw});var Hw={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}},zw={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var lm={};P(lm,{Toggle:()=>Ww,ToggleHgroup:()=>qw});var Ww={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}},qw={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var fm={};P(fm,{Textarea:()=>Kw,TextareaWithButton:()=>Gw});var Kw={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"}},Gw={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 um={};P(um,{FileIcon:()=>tS,Icon:()=>Zw,IconText:()=>Qw});var Yw=new Set,Xw=(t,e)=>{if(!Yw.has(t)&&(Yw.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.`)}},Jw=new WeakMap,e1=t=>{let e=Jw.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},Jw.set(t,e)),e},r1=(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},o1=(t,e,r)=>{let o=r&&r.context&&r.context.document||(typeof document<"u"?document:null);st(t);try{let n=E();n&&!n.__svgCache&&(n.__svgCache={}),t.__svgCache||(t.__svgCache={});let s={};for(let i in e){let a=fo(e[i],i);a&&(t.icons[i]=a,s[i]=a)}return t.useIconSprite&&o&&Object.keys(s).length&&uo(s,{document:o}),Object.keys(s).length>0}finally{rt()}},n1=(t,e,r,o,n)=>{let s=t&&t.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=e1(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=r1(f,r);return u?o1(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},Zw={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:_}=m&&m.designSystem,{toCamelCase:b}=m&&m.utils,y=f(g,p),k=b(y).split(/([a-z])([A-Z])/g),C=k[1]?k[0]:y.split(".")[0].split(" ")[0],T=_&&_[C];if(T){let $=y.includes(".")?"sfsymbols."+y.split(".").slice(1).join("."):"sfsymbols";return y=T[$]||T[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,_=g.call("exec",g.name||g.icon||m,g);return g.call("isString",_)&&_.includes("{{")&&(_=g.call("replaceLiteralsWithObjectFields",_)),g.call("isString",_)?_: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(V=>V.charAt(0).toUpperCase()+V.slice(1)).join("")}let m=a(g),_=m.split(/([a-z])([A-Z])/g),b=l(t,e,r);if(b){Object.assign(t,b);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[_[0]+_[1]]?k=_[0]+_[1]:n[_[0]]?k=_[0]:i&&t.warn("Can't find icon:",g,k);let C=n[k],T=o&&o.src||u;!C&&!T&&(n1(r,p,m,t,V=>{if(!(d&&d._disposed)){if(!V)return Xw(p,t);h()}})||Xw(p,t));let $=s&&k,M=C||T||n.noIcon;if(!(t.spriteId===$&&t.src===M&&t.node&&t.node.innerHTML)&&(t.spriteId=$,t.src=M,typeof t.html=="function"&&t.node)){let D=t.context&&t.context.designSystem;D&&st(D);try{let V=t.html(t,t.state,t.context);V!=null&&typeof V!="function"&&(t.node.innerHTML=V)}finally{D&&rt()}}};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"}},Qw={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},tS={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var _m={};P(_m,{A:()=>nS,Link:()=>ym,RouteLink:()=>sS,RouterLink:()=>bm});var _a={};P(_a,{default:()=>l1,getActiveRoute:()=>mm,lastLevel:()=>yf,lastPathname:()=>mf,matchRoute:()=>pm,parseQuery:()=>hm,parseRoutePattern:()=>dm,router:()=>We,runGuards:()=>gm});R();var rS=/^:(.+)/,oS=/^\*$/,eS=new Map,dm=t=>{let e=eS.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(rS);a?o.push({index:i,name:a[1]}):oS.test(r[i])&&(n=!0)}let s={segments:r,params:o,hasWildcard:n,pattern:t};return eS.set(t,s),s},pm=(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=dm(l),u=s1(n,f);u>a&&(a=u,i=l,c=i1(n,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},s1=(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(rS.test(r[i]))n+=1;else if(oS.test(r[i]))n+=.5;else return-1;return n},i1=(t,e)=>{let r={};for(let{index:o,name:n}of e.params)t[o]&&(r[n]=decodeURIComponent(t[o]));return r},hm=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},gm=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},mm=(t=0,e)=>{e||(e=typeof v<"u"?v.location.pathname:"/");let o=e.split("/")[t+1];if(o)return`/${o}`},mf,yf=0,a1=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,c1={level:yf,pushState:!0,initialRender:!1,scrollToTop:!0,scrollToNode:!1,get scrollNode(){return typeof et<"u"&&(et.scrollingElement||et.documentElement)||null},scrollBody:!1,useFragment:!1,updateState:!0,scrollToOffset:0,contentElementKey:"content",scrollToOptions:{behavior:"smooth"},useParamsMatching:!0},We=async(t,e,r={},o={})=>{let n=e||void 0,s=n?.context?.window||v,i=n?.context?.document||et,a={...c1,...n.context.routerOptions,...o};yf=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=a1(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=hm(g),_=n.node,b=p&&p!==s.location.hash.slice(1),y=h!==mf;mf=h;let x=c.__routerRendered,k,C,T,$;if(a.useParamsMatching){let H=pm(h,n.routes,a.level);k=H.key,C=H.routePath,T=H.content,$=H.params}else{k=mm(a.level,h),C=k;let H=n.routes;T=H?H[k||"/"]||H["/*"]:null,$={}}let M=a.scrollToNode?_:a.scrollNode;if(n.state?.root?.debugging){n.state.root.debugging=!1;return}if(!T){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 H={pathname:h,route:k,params:$,query:m,hash:p,element:n,state:r},G=await gm(a.guards,H);if(G===!1)return;if(typeof G=="string")return We(G,e,r,{...o,guards:[]})}if(a.pushState)try{s.history.pushState(r,null,h+(g||"")+(p||""))}catch{}if(y||!b){let H={route:k,routePath:C,hash:p,debugging:!1};Object.keys($).length&&(H.params=$),Object.keys(m).length&&(H.query=m),a.updateState&&n.state.update(H,{preventContentUpdate:!0})}let D=!x||x.content!==T||x.route!==k;if(y||D||a.force===!0){l&&a.removeOldElement&&n[l].remove();let H=n.__ref?.origin?.content,G={};if(H)for(let I in H){let F=H[I];I==="__ref"||I==="props"||I==="node"||I==="parent"||I==="key"||(typeof F=="string"||typeof F=="number"||typeof F=="boolean"||typeof F=="object"&&F!==null&&!F.node&&!F.__ref)&&(G[I]=F)}let ft={...G,...typeof T=="object"?T:{extends:T}};a.useFragment&&(ft.tag="fragment");try{if(typeof n?.set!="function")return;n.set(ft,{contentElementKey:l}),c.__routerRendered={content:T,route:k}}catch(I){console.error("[smbls/router] failed to render route content",h,I)}}if(a.scrollToTop&&M?.scrollTo&&M.scrollTo({...a.scrollToOptions||{},top:0,left:0}),a.scrollToNode&&T[l]?.node?.scrollTo&&T[l].node.scrollTo({...a.scrollToOptions||{},top:0,left:0}),p){let H=i.getElementById(p);if(H&&M?.scrollTo){let G=H.getBoundingClientRect().top+_.scrollTop-(a.scrollToOffset||0);M.scrollTo({...a.scrollToOptions||{},top:G,left:0})}}mr("routeChanged",n,a)},l1=We;var f1=(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 _ of p){if(!m||!m[_]){m=null;break}m=m[_]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||We)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}},ym={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:t=>Rr(t,t.href)||Rr(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:f1},nS={extends:"Link"},bm={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 _ of p){if(!m||!m[_]){m=null;break}m=m[_]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||We)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}}},sS={extends:[ym,bm]};var xm={};P(xm,{Select:()=>iS});var iS={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 wm={};P(wm,{Button:()=>aS,ButtonSet:()=>uS,CircleButton:()=>lS,IconButton:()=>dS,KangorooButton:()=>fS,SquareButton:()=>cS});var aS={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)},cS={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"},lS={extends:"SquareButton",round:"C"},fS={extends:"Button",childExtends:"IconText"},uS={tag:"nav",display:"flex",childExtends:"SquareButton"},dS={extends:["SquareButton","ClickableItem"],round:"Z"};var Sm={};P(Sm,{Dialog:()=>pS,DialogFooter:()=>gS,DialogHeader:()=>hS});var pS={display:"flex",tag:"dialog",flow:"column",border:"0",theme:"dialog",round:"Z2"},hS={extends:"Hgroup",minWidth:"100%",gap:"A",Title:{align:"center space-between",Text:{text:"Title"},SquareButton:{icon:"x",theme:"transparent"}},Paragraph:{color:"caption"}},gS={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 km={};P(km,{Tooltip:()=>mS,TooltipHidden:()=>yS,TooltipParent:()=>bS});R();var mS={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=>mt(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)}},yS={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)}},bS={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 vm={};P(vm,{Avatar:()=>_S});var u1=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)},_S={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=u1(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 Cm={};P(Cm,{Range:()=>xS});var xS={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:en("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:en("#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 Em={};P(Em,{Dropdown:()=>wS,DropdownList:()=>SS,DropdownParent:()=>kS,DropdownParentFocus:()=>vS,DropdownSiblingFocus:()=>CS});var wS={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"},SS={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"}}},kS={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},vS={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()}}},CS={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 Am={};P(Am,{Notification:()=>ES});var ES={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 mo=Object.assign({},Hg,zg,Wg,qg,Kg,Jg,Zg,Qg,Yg,tm,em,Xg,rm,om,nm,sm,im,am,cm,lm,fm,um,_m,xm,wm,Sm,km,vm,Cm,Em,Am);function bf(t){if(t==null)return 0;if(typeof t!="object")return AS(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let o=0;o<t.length;o++)e=(e^bf(t[o]))*16777619;return e>>>0}let r=Object.keys(t).sort();for(let o=0;o<r.length;o++)e=(e^AS(r[o]))*16777619,e=(e^bf(t[r[o]]))*16777619;return e>>>0}function AS(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e}function _f(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(!_f(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)||!_f(t[s],e[s]))return!1}return!0}function Tm(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=Tm(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 Om(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])?Om(t[o],n,r):t[o]=n}return t}function $r(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 $n(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function xa(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():$r(e)}function TS(t){return t.split(`
|
|
83
|
+
`).map($r).join(`
|
|
84
|
+
`)}var OS={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 RS(t,e){let r=OS[t]||$r(t),o=xa(e),n=`_${r}-${o}`,s=$n(t),i=g1[s],a=i?`${s}: ${e};${i}: ${e}`:`${s}: ${e}`,c=`.${n}{${a}}`;return`${n}
|
|
85
|
+
${c}`}var g1={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select"},m1="@media (hover: hover)",y1=/(?:^|[^\\]):hover(?![\w-])/,PS=t=>typeof t=="string"&&(t.indexOf("{")!==-1||t.indexOf("}")!==-1);function IS(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||PS(i))continue;let a=OS[s]||$r(s),c=xa(i),l=`_${a}-${c}`,f=$n(s);r.push(l),o.push(`.${l}{${f}:${i}}`)}return r.join(" ")+"\0"+o.join(`
|
|
86
|
+
`)}function DS(t,e,r){let o=t+e,n=`_c${$r(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&&(PS(u)||(i+=`${$n(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&&y1.test(c)&&(a=`${m1}{${a}}`),`${n}
|
|
87
|
+
${a}`}var Rm=null;function wf(t){Rm=t}var Oe={structuralHash:bf,deepEqual:_f,mergeStructural:Tm,overwriteDeep:Om,shortHash:$r,toKebab:$n,sanitizeValue:xa,batchShortHash:TS,atomicCssClass:RS,batchAtomicCss:IS,compoundCssClass:DS},$S=!1,xf=null;function LS(t){return xf||(xf=import(t||"@symbo.ls/wasm/pkg").then(e=>(e.structuralHash&&(Oe.structuralHash=e.structuralHash),e.deepEqual&&(Oe.deepEqual=e.deepEqual),e.mergeStructural&&(Oe.mergeStructural=e.mergeStructural),e.overwriteDeep&&(Oe.overwriteDeep=e.overwriteDeep),e.shortHash&&(Oe.shortHash=e.shortHash),e.toKebab&&(Oe.toKebab=e.toKebab),e.sanitizeValue&&(Oe.sanitizeValue=e.sanitizeValue),e.batchShortHash&&(Oe.batchShortHash=e.batchShortHash),e.atomicCssClass&&(Oe.atomicCssClass=e.atomicCssClass),e.batchAtomicCss&&(Oe.batchAtomicCss=e.batchAtomicCss),e.compoundCssClass&&(Oe.compoundCssClass=e.compoundCssClass),$S=!0,Rm&&e.batchAtomicCss&&Rm({batchAtomicCss:e.batchAtomicCss,compoundCssClass:e.compoundCssClass}),!0)).catch(e=>(console.debug("[smbls] WASM not available, using JS fallbacks:",e.message),!1)),xf)}function MS(){return $S}R();var wa={};P(wa,{CDN_PROVIDERS:()=>ce,DOMQL_EVENTS:()=>Qu,DOMQ_PROPERTIES:()=>dr,ENV:()=>gd,HTML_TAGS:()=>Ho,METHODS:()=>No,METHODS_EXL:()=>xs,NODE_ENV:()=>Se,OPTIONS:()=>Hs,PACKAGE_MANAGER_TO_CDN:()=>xr,PARSED_DOMQ_PROPERTIES:()=>_s,PROPS_METHODS:()=>pr,STATE_METHODS:()=>Gr,STATE_PROPERTIES:()=>Zu,SVG_TAGS:()=>fb,TYPES:()=>ds,UNIVERSAL_RESERVED_KEYS:()=>nl,addCaching:()=>Bc,addContext:()=>jc,addExtend:()=>Bd,addExtends:()=>zt,addItemAfterEveryElement:()=>ju,addProtoToArray:()=>gs,addRef:()=>Mc,applyCSS:()=>Im,applyDependentState:()=>sp,applyEvent:()=>qc,applyEventUpdate:()=>Kc,applyExtends:()=>pb,applyProps:()=>Fs,arrayContainsOtherArray:()=>Iu,arraysEqual:()=>Uu,arrayzeValue:()=>ro,buildImgSrcset:()=>wi,buildSourcesAndImg:()=>Si,cache:()=>fp,call:()=>Ap,captureSnapshot:()=>Op,checkForStateTypes:()=>ep,checkIfInherits:()=>Wc,checkIfStringIsInArray:()=>zu,clone:()=>ed,cloneAndMergeArrayExtend:()=>Os,cloneFunction:()=>vd,concatAddExtends:()=>Fd,copyJavaScriptToClipboard:()=>Yp,copyStringToClipboard:()=>Gp,createBasedOnType:()=>Lc,createElement:()=>tp,createElementExtends:()=>kc,createExtends:()=>Ps,createExtendsFromKeys:()=>zo,createExtendsStack:()=>Ac,createIfConditionFlag:()=>Cd,createInheritedState:()=>rp,createKey:()=>As,createNestedObject:()=>cd,createNestedObjectByKeyPath:()=>np,createObjectWithoutPrototype:()=>mc,createParent:()=>Fc,createPath:()=>Nc,createProps:()=>Ns,createPropsStack:()=>Dc,createRoot:()=>Qd,createScope:()=>ap,createSnapshotId:()=>Es,customDecodeURIComponent:()=>Ju,customEncodeURIComponent:()=>Xu,cutArrayAfterValue:()=>Fu,cutArrayBeforeValue:()=>Mu,debounce:()=>Ts,debounceOnContext:()=>wd,decodeNewlines:()=>Yu,deepClone:()=>ut,deepContains:()=>id,deepDefaults:()=>gi,deepDestringifyFunctions:()=>ie,deepExtend:()=>Sc,deepMerge:()=>nt,deepMergeExtends:()=>Fe,deepStringifyFunctions:()=>ws,defineSetter:()=>Cp,destringifyGlobalScope:()=>ks,detectHeightOnInit:()=>$p,detectInfiniteLoop:()=>dd,document:()=>et,encodeNewlines:()=>Gu,error:()=>to,excludeKeysFromObject:()=>hd,exec:()=>ct,extendCachedRegistry:()=>Nd,extendStackRegistry:()=>Is,extractArrayExtend:()=>$s,fetchLibraryData:()=>ll,fibonacciNumberByIndex:()=>Lp,filterArrays:()=>Vu,filterArraysFast:()=>Hu,finalizeExtends:()=>Tc,findClosestNumber:()=>cl,findClosestNumberInFactory:()=>Wp,findInheritedState:()=>zc,findKeyPosition:()=>qu,flattenExtend:()=>Wo,formatDate:()=>Dp,generateHash:()=>_c,generateHeadArrayTags:()=>al,generateKey:()=>Cs,generateMetaTags:()=>Hp,get:()=>Sp,getActiveRoute:()=>mm,getCDNDirUrl:()=>sl,getCDNUrl:()=>ve,getCapitalCaseKeys:()=>Hd,getCdnProviderFromConfig:()=>Go,getChildStateInKey:()=>Hc,getChildren:()=>ti,getContext:()=>ai,getCookie:()=>Rd,getDB:()=>di,getEmotionStylesheet:()=>Qp,getExtendsInElement:()=>Ud,getExtendsStack:()=>Rs,getExtendsStackRegistry:()=>wc,getFrequencyInArray:()=>Du,getHashedExtend:()=>Ds,getImportMapScript:()=>Ip,getInObjectByPath:()=>ud,getLocalStorage:()=>Id,getNev:()=>_d,getPageMetadata:()=>zp,getParentStateInKey:()=>Vc,getPath:()=>ei,getQuery:()=>pi,getRef:()=>vp,getRoot:()=>ni,getRootContext:()=>ii,getRootData:()=>si,getRootState:()=>oi,getRootStateInKey:()=>Uc,getSpreadChildren:()=>zd,global:()=>Ou,hasFunction:()=>Me,hasHandlerPlugin:()=>Bo,hasOwnProperty:()=>od,hashContent:()=>Jo,inheritChildExtends:()=>Cc,inheritChildPropsExtends:()=>vc,inheritParentProps:()=>js,inheritRecursiveChildExtends:()=>Ec,init:()=>ir,initProps:()=>Xd,is:()=>Vt,isArray:()=>O,isBoolean:()=>uc,isContextComponent:()=>Wd,isCyclic:()=>pd,isDOMNode:()=>Ut,isDate:()=>pc,isDefined:()=>mt,isDevelopment:()=>gr,isEmpty:()=>hc,isEmptyObject:()=>nd,isEqualDeep:()=>gc,isFunction:()=>A,isHtmlElement:()=>fs,isLocal:()=>bd,isLoudDevRuntime:()=>Ot,isMalformedDependency:()=>Yo,isMethod:()=>Tp,isMobile:()=>Td,isNode:()=>Ye,isNot:()=>Pu,isNotProduction:()=>Jr,isNull:()=>dc,isNumber:()=>Le,isObject:()=>S,isObjectLike:()=>z,isPhoto:()=>Mp,isProduction:()=>hr,isStaging:()=>yd,isState:()=>op,isString:()=>w,isStringFunction:()=>kd,isTest:()=>bc,isTesting:()=>md,isUndefined:()=>Et,isUniversallyReservedKey:()=>Rp,isUnresolvableDependency:()=>eo,isValidHtmlTag:()=>$d,isWrappedLibrary:()=>yi,joinArrays:()=>Lo,jointStacks:()=>jd,keys:()=>rl,lastLevel:()=>yf,lastPathname:()=>mf,loadCssFile:()=>Bp,loadJavascript:()=>Up,loadJavascriptFile:()=>Fp,loadJavascriptFileEmbedSync:()=>jp,loadJavascriptFileSync:()=>Np,loadRemoteCSS:()=>Vp,loadRemoteScript:()=>Xo,log:()=>Ep,logGroupIf:()=>Ad,logIf:()=>Ed,lookdown:()=>xp,lookdownAll:()=>wp,lookup:()=>_p,lowercaseFirstLetter:()=>Kr,makeObjectWithoutPrototype:()=>sd,map:()=>td,mapStringsWithContextComponents:()=>Ls,matchRoute:()=>pm,matchesComponentNaming:()=>Ne,memoize:()=>Sd,merge:()=>pt,mergeSharedLibraries:()=>bi,nextElement:()=>li,normalizeIgnoreList:()=>mi,normalizeLibraryKey:()=>Zo,objectToString:()=>Ss,objectizeStringProperty:()=>Ms,overwrite:()=>vs,overwriteDeep:()=>Ht,overwriteShallow:()=>Xr,overwriteState:()=>ip,parse:()=>ol,parseDeep:()=>Zs,parseQuery:()=>hm,parseRoutePattern:()=>dm,pickupElementFromProps:()=>Pc,pickupPropsFromElement:()=>Rc,previousElement:()=>fi,propExists:()=>Gd,propertizeElement:()=>Ic,propertizeUpdate:()=>Kd,reinit:()=>Pm,remove:()=>jb,removeChars:()=>Xp,removeCookie:()=>Pd,removeDuplicateProps:()=>Us,removeDuplicatesInArray:()=>Mo,removeFromArray:()=>$u,removeFromObject:()=>ad,removeNestedKeyByPath:()=>ld,removeValueFromArray:()=>hs,removeValueFromArrayAll:()=>Nu,reorderArrayByValues:()=>Bu,replaceLiteralsWithObjectFields:()=>qr,replaceOctalEscapeSequences:()=>Ku,resolveAsset:()=>Wt,resolveHandler:()=>Uo,resolveSharedLibraries:()=>Kp,returnValueAsText:()=>$c,router:()=>We,runGuards:()=>gm,runPluginHook:()=>Ct,scratchSystem:()=>pn,scratchUtils:()=>kr,self:()=>Ru,set:()=>po,setActiveRootState:()=>ri,setCookie:()=>Od,setHashedExtend:()=>xc,setInObjectByPath:()=>fd,setLocalStorage:()=>Dd,setNodeStyles:()=>el,setProps:()=>kp,setPropsPrototype:()=>Bs,sharedLibrary:()=>qp,spotByPath:()=>Qs,srcsetFor:()=>Qo,stringIncludesAny:()=>ys,stringToObject:()=>rd,stripVersionRangePrefix:()=>hi,swapItemsInArray:()=>Lu,syncProps:()=>Vs,toCamelCase:()=>_i,toDashCase:()=>xi,toDescriptionCase:()=>Zp,toTitleCase:()=>Jp,toggleFullscreen:()=>Pp,triggerEventOn:()=>mr,triggerEventOnUpdate:()=>cp,trimStringFromSymbols:()=>Wu,unstackArrayOfObjects:()=>ps,update:()=>Yd,updateProps:()=>Jd,variables:()=>ui,verbose:()=>Ko,warn:()=>ci,window:()=>v});R();R();var _1=E(),FS=(t=_1,e)=>{let r=S(e.localFile)?e.localFile:{},o=ut(r.designSystem||{});return nt(t,o)},x1={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},Ln=(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},ir=(t,e=x1)=>{let r=FS(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=po({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=Ai(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&&wt(i),c&&(wt({[o]:s.CSS_VARS}),s.CSS_MEDIA_VARS&&wt(Ln(s.CSS_MEDIA_VARS,o))),a&&wt(s.reset);let g=s.animation;if(g){let p={};for(let m in g)p[`@keyframes ${m}`]=g[m];wt(p)}return(u||f)&&ea(s.svg,{document:e.document}),(h||d)&&uo(s.icons,{document:e.document}),s},Sf={},Pm=(t,e=Sf)=>{let r=FS(t||{},e),o=e.scopeSelector||":root",n=po({verbose:!1,...r});return e.preventInject||(wt({[o]:n.CSS_VARS}),n.CSS_MEDIA_VARS&&wt(Ln(n.CSS_MEDIA_VARS,o)),wt(n.reset)),n},Im=(t,e=Sf)=>{wt(t)},w1=(t,e=Sf)=>{let r=e.scopeSelector||":root";wt({[r]:t.CSS_VARS}),t.CSS_MEDIA_VARS&&wt(Ln(t.CSS_MEDIA_VARS,r))};var S1=(t,e=Sf)=>{};R();var NS=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,k1=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},Dm={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},Sa=(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},jS=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=Dm:e.router=pt(e.router||{},Dm);let r=e.router,o=async(s,i)=>{let a=s.context?.window||v,c=k1(r);if(!c){if(!a.location)return;let{pathname:f,search:u,hash:d}=a.location;f=NS(f),c=f+u+d}let l=s;if(r.customRouterElement){let f=Sa(s,r.customRouterElement);f&&(l=f,s.routes&&(l.routes=s.routes))}l.routes&&await We(c,l,{},{initialRender:!0,pushState:!1})},n=!Et(t.onRenderRouter);return r&&r.initRouter&&!n&&(t.onRenderRouter=o),v1(e,r),r},$m=(t,e)=>{if(e.router===!1)return;let r=e.router||Dm;if(!r.popState)return;let o=e.utils&&e.utils.router?e.utils.router:We,n=e.window||v,s=async i=>{let{pathname:a,search:c,hash:l}=n.location;a=NS(a);let f=a+c+l,u=t;if(r.customRouterElement){let d=Sa(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))},v1=(t,e)=>{let{components:r}=t;if(e&&e.injectRouterInLinkComponent)return nt(r.Link||r["smbls.Link"],r.RouterLink||r["smbls.RouterLink"])};R();var Lm=v&&v.location?v.location.host.includes("dev."):gr(),BS=Lm?"http://localhost:8080/get":"https://api.symbols.app/get",C1={endpoint:BS},US=async(t,e=C1)=>{let r=e.endpoint||BS,o=e.serviceRoute?O(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)}},E1=async(t,e)=>{let{editor:r}=e;if(r&&r.remote){let o=await US(t,r),n=Lm||e.isDevelopment?ie(o):ie(o.releases[0]);r.serviceRoute?O(r.serviceRoute)?r.serviceRoute.forEach(s=>{Ht(e[s],n[s.toLowerCase()])}):Ht(e[r.serviceRoute],n):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{Ht(e[s],n[s.toLowerCase()])})}return e},A1=async(t,e,r)=>{let{editor:o}=e;if(o&&o.remote){let n=await US(t,o),s=Lm||e.isDevelopment?ie(n):ie(n.releases[0]);r(s)}},VS=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await E1(t,e)}catch(r){console.error(r)}},HS=(t,e,r,o)=>{if(e&&r.editor)try{r.editor.async&&A1(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 ka=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{Dr(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 Nm={};P(Nm,{Helmet:()=>qS,applyMetadata:()=>Mn,default:()=>D1,extractMetadata:()=>R1,generateHeadHtml:()=>I1,helmetPlugin:()=>Fm,resolveMetadata:()=>Lr});R();var T1={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"}},O1=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}"]`},zS=t=>ie({v:t}).v,WS=(t,e,r,o)=>{try{return ct(t,e,r)}catch(n){console.warn(`[helmet] metadata factory for "${o}" threw; treating as unset:`,n&&n.message||n);return}},Lr=(t,e,r)=>{if(!t)return{};let o=t;w(o)&&Me(o)&&(o=zS(o));let n=A(o)?WS(o,e,r,"metadata"):S(o)?{...o}:{};if(!S(n))return{};for(let s in n){let i=n[s];w(i)&&Me(i)&&(i=zS(i)),A(i)?i=WS(i,e,r,s):w(i)&&Me(i)&&(i=void 0),w(i)&&i.includes("{{")&&e?.call&&(i=e.call("replaceLiteralsWithObjectFields",i,r)),n[s]=i}return n},R1=(t,e="/",r,o)=>{let s=(t.pages||{})[e],i={};if(t.integrations?.seo&&(i={...t.integrations.seo}),t.app?.metadata){let c=Lr(t.app.metadata,r,o);i={...i,...c}}let a=new Set;if(s){let c=s.metadata||s.helmet||{},l=Lr(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},P1=(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},va=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)},Mm=(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))}},Mn=(t,e)=>{if(!(!S(t)||!e)){for(let r in t){let o=t[r];if(o==null||r==="jsonLd"||r==="styles"||r==="scripts")continue;let n=T1[r];if(!n)continue;let s=O1(n),i=e.querySelector(s)||P1(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(va);Mm(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(va);Mm(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));Mm(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})}}},it=t=>{if(t==null)return"";let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return t.toString().replace(/[&<>"']/g,r=>e[r])},I1=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>${it(s)}</title>`);continue}if(n==="viewport"){o||(e.push(`<meta name="viewport" content="${it(s)}">`),o=!0);continue}if(n==="canonical"){e.push(`<link rel="canonical" href="${it(s)}">`);continue}if(n==="icon"||n==="favicon"){let f=it(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}="${it(h)}"`).join(" ");e.push(`<link rel="icon" ${u}>`)}else typeof f=="string"&&e.push(`<link rel="icon" href="${it(f)}">`)});continue}if(n==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${it(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="${it(f)}" content="${it(s)}">`)}else if(n.startsWith("itemprop:")){let f=n.replace("itemprop:","");e.push(`<meta itemprop="${it(f)}" content="${it(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>e.push(`<meta property="${it(n)}" content="${it(f)}">`)):e.push(`<meta property="${it(n)}" content="${it(s)}">`):l?e.push(`<meta name="${it(n)}" content="${it(s)}">`):Array.isArray(s)?s.forEach(f=>e.push(`<meta name="${it(n)}" content="${it(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.push(`<meta name="${it(n)}" content="${it(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="${va(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="${va(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="${it(i)}"`),s||(n.type&&a.push(`type="${it(n.type)}"`),n.async&&a.push("async"),n.defer&&a.push("defer"),n.integrity&&a.push(`integrity="${it(n.integrity)}"`),n.crossorigin&&a.push(`crossorigin="${it(n.crossorigin)}"`),n.referrerpolicy&&a.push(`referrerpolicy="${it(n.referrerpolicy)}"`),n.nomodule&&a.push("nomodule"));let c=` data-smbls-script="${it(i||va(n.body||""))}"`;if(!s&&n.body){let l=String(n.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${a.join(" ")}${c}>${l}<\/script>`)}else e.push(`<script ${a.join(" ")}${c}><\/script>`)}return e.join(`
|
|
88
|
+
`)},qS={define:{metadata:(t,e,r)=>{let o=e.context?.document||typeof document<"u"&&document;if(!o)return;let n=Q(()=>{let s=Lr(t,e,e.state);Mn(s,o);let i=e.state?.root;S(i)&&(i.$helmet=s)});e.__ref?.__effects&&e.__ref.__effects.push(n)}}},Fm={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=Lr(o,t,t.state);Mn(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=Lr(e,t,t.state);Mn(o,r)}},D1=qS;br();var KS=(t,e,r,o)=>{t&&Js(t,e,r,o)},GS=(t,e,r)=>{if(!t)return;let o=e.context?.document||typeof document<"u"&&document;if(!o)return;let n=Lr(t,e,r);Mn(n,o)},YS=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},Fn={routes:t=>t,metadata:GS,fetch:KS,$router:YS},XS=(t={})=>{let e={routes:r=>r};return t.metadata!==!1&&(e.metadata=GS),t.fetch!==!1&&(e.fetch=KS),t.router!==!1&&(e.$router=YS),e};var jm={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},kf={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},vf={...jm,router:kf},$1={state:{},pages:{},components:{},router:kf,define:Fn},Mr=$1;R();R();var JS=(t,e)=>z(t.extends)?t.extends:[];R();var Bm={};P(Bm,{default:()=>F1,getActiveLang:()=>jn,getLanguages:()=>Ea,getLocalStateLang:()=>Pa,initPolyglot:()=>Ef,loadTranslations:()=>Ta,polyglotPlugin:()=>Bn,setLang:()=>Oa,translate:()=>Aa,upsertTranslation:()=>Ra});R();var QS="smbls_lang",L1="smbls_t_",M1="smbls_tv_",Nn={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)}}},Ca={};function jn(){let t=this?.context,e=t?.polyglot;return(this?.state?.root||t?.state?.root)?.lang||e?.defaultLang||"en"}function Ea(){let t=this?.context?.polyglot;return t?t.languages?t.languages:t.translations?Object.keys(t.translations):[]:[]}var Cf=(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},ZS=(t,e,r)=>{let o=e.lastIndexOf(".");if(o===-1)return t[e+"_"+r];let n=Cf(t,e.substring(0,o));if(n!=null)return n[e.substring(o+1)+"_"+r]};function Aa(t,e){if(!t)return"";let r=this?.context,o=r?.polyglot,n=e||this.call("getActiveLang"),s=this?.state;if(s){let l=ZS(s,t,n);if(l!==void 0)return l}if(o?.translations){let l=o.translations[n];if(l){let f=Cf(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=Cf(l,t);if(f!==void 0)return f}}let c=o?.defaultLang||"en";if(s){let l=ZS(s,t,c);if(l!==void 0)return l}if(o?.translations){let l=o.translations[c];if(l){let f=Cf(l,t);if(f!==void 0)return f}}return t}async function Ta(t){let e=this?.context,r=e?.polyglot,o=this?.state?.root||e?.state?.root;if(!r||!o)return;let n=r.storagePrefix||L1,s=r.storageVersionPrefix||(r.storagePrefix?r.storagePrefix.replace(/_$/,"v_"):M1);if(r.translations&&r.translations[t]&&!r.fetch||!r.fetch||r._fetchFailed?.[t])return;if(!o.translations?.[t]){let c=Nn.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(Ca[i])return Ca[i];let a=this;return Ca[i]=(async()=>{try{let c=r.fetch,l=parseInt(Nn.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",_={p_lang:t,p_cached_version:l,...c.params||{}},b=await p.rpc({from:m,params:_});if(b.error)throw r._fetchFailed||(r._fetchFailed={}),r._fetchFailed[t]=!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;Nn.set(n+t,JSON.stringify(f)),u&&Nn.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 Ca[i]}})(),Ca[i]}async function Oa(t){let e=this?.context,r=e?.polyglot,o=this?.state?.root||e?.state?.root;if(!o||this.call("getActiveLang")===t)return;let n=r?.storageLangKey||QS;Nn.set(n,t),r?.fetch&&await this.call("loadTranslations",t),e?.state&&(e.state.lang=t);let s=r?.translations?.[t],i={lang:t};if(s&&typeof s=="object")for(let c in s){let l=s[c];(Array.isArray(l)||typeof l=="string"||typeof l=="number")&&(i[c]=l)}if(o.update&&o.update(i),s&&typeof s=="object")for(let c in s){let l=s[c];if(l&&typeof l=="object"&&!Array.isArray(l)&&o[c]&&typeof o[c]=="object"&&!Array.isArray(o[c]))for(let f in l)o[c][f]=l[f]}let a=this?.context?.document||globalThis.document;if(a&&s){let c=a.querySelectorAll("[data-key]");for(let l of c){let f=l.ref;if(!f)continue;let u=f.__ref?.__exec?.text;if(typeof u=="string"&&u.includes("{{"))try{let d=f.call("replaceLiteralsWithObjectFields",u,f.state);d!=null&&l.textContent!==d&&(l.textContent=d)}catch{}}}}async function Ra(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 Ef(){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||QS,s=Nn.get(o)||e.defaultLang||r.lang||"en";r.update&&r.lang!==s&&r.update({lang:s}),e.fetch&&!(e.translations&&e.translations[s])&&await this.call("loadTranslations",s)}function Pa(t){try{let e=this?.context?.polyglot,o=(this?.state?.root||this?.context?.state?.root)?.lang||e?.defaultLang||"en",n=this?.state;if(!n)return"";let s=t.lastIndexOf(".");if(s===-1)return n[t+o]??"";let i=t.substring(0,s).split("."),a=n;for(let c=0;c<i.length;c++){if(a==null)return"";a=a[i[c]]}return a==null?"":a[t.substring(s+1)+o]??""}catch{return""}}var Bn={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,Ef.call(t))}},F1=Bn;br();var Vm={};P(Vm,{SYSTEM_METRICS:()=>Ia,capsizeHandler:()=>Um,capsizePlugin:()=>Tf,computeCapsize:()=>t0,default:()=>N1,resolveFontSizePx:()=>e0,resolveMetrics:()=>r0});var Ia={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}},Af=t=>parseFloat(t.toFixed(4)),t0=(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:`${Af(t/16)}rem`,lineHeight:`${Af(f)}px`,capHeightTrim:`${Af(-h)}em`,baselineTrim:`${Af(-g)}em`}},e0=(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},r0=(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(Ia[i])return Ia[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(Ia[a])return Ia[a]}}return null},Um=(t,e,r,o)=>{if(!t)return;let n=e0(e.fontSize,o);if(!n)return;let s=r0(e.fontFamily,o);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=t0(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},Tf={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},N1=Tf;var Ym={};P(Ym,{PRESERVE_VALUE_KEYS:()=>It,SKIP_INLINE_KEYS:()=>Fr,abbrToProp:()=>Pt,decode:()=>a0,encode:()=>n0,expand:()=>bo,isComponentKey:()=>Re,isSelectorKey:()=>Pe,parse:()=>_o,parseFurther:()=>wo,propToAbbr:()=>_e,shorten:()=>Da,shorthandPlugin:()=>$a,stringify:()=>yo,stringifyFurther:()=>xo});var _e={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"},Pt=Object.create(null);for(let t in _e)Pt[_e[t]]=t;var Hm=Object.create(null);for(let t in _e){let e=_e[t];if(Hm[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${Hm[e]}"`);Hm[e]=t}var It=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),Fr=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function Re(t){return/^[A-Z]/.test(t)}function Pe(t){return/^[:@.!$>&]/.test(t)||t.startsWith("> ")}function n0(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=_e[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=>Of(i));e.push(n+":"+s.join(","))}else e.push(n+":"+Of(o))}return e.join(" ")}function Of(t){return String(t).replace(/ /g,"_")}function Da(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Da(r):r});let e={};for(let r in t){let o=t[r];if(Re(r)){e[r]=zm(o);continue}if(Pe(r)){e[r]=zm(o);continue}let n=_e[r]||r;if(It.has(r)||It.has(n)){e[n]=o;continue}e[n]=zm(o)}return e}function zm(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Da(e):e}):typeof t=="object"?Da(t):t}function yo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(o){return o!==null&&typeof o=="object"?yo(o):o});let e={},r=[];for(let o in t){let n=t[o];if(Re(o)){e[o]=o0(n);continue}if(Pe(o)){e[o]=o0(n);continue}let s=_e[o]||o;if(It.has(o)||It.has(s)){e[s]=n;continue}if(typeof n=="function"){e[s]=n;continue}if(n==null){e[s]=n;continue}if(Fr.has(o)||Fr.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"?yo(a):a});continue}if(n.length<=1){e[s]=n;continue}r.push(s+":"+n.map(Of).join(","));continue}if(typeof n=="object"){e[s]=yo(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+":"+Of(n))}return r.length&&(e.in=r.join(" ")),e}function o0(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?yo(e):e}):typeof t=="object"?yo(t):t}function a0(t){if(!t||typeof t!="string")return{};let e={},r=c0(t);for(let o of r){if(o.startsWith("!")){let c=o.slice(1),l=Pt[c]||c;e[l]=!1;continue}let n=o.indexOf(":");if(n===-1){let c=Pt[o]||o;e[c]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Pt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(s0);continue}e[a]=s0(i)}return e}function c0(t){return t.trim().split(/\s+/).filter(Boolean)}function s0(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function i0(t){return t.replace(/_/g," ")}function j1(t){if(!t||typeof t!="string")return{};let e={},r=c0(t);for(let o of r){if(o.startsWith("!")){let c=o.slice(1),l=Pt[c]||c;e[l]=!1;continue}let n=o.indexOf(":");if(n===-1){let c=Pt[o]||o;e[c]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Pt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(i0);continue}e[a]=i0(i)}return e}function bo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?bo(r):r});let e={};for(let r in t){let o=t[r];if(Re(r)){e[r]=Wm(o);continue}let n=Pt[r]||r;if(Pe(r)&&n===r){e[r]=Wm(o);continue}if(It.has(n)||It.has(r)){e[n]=o;continue}e[n]=Wm(o)}return e}function Wm(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?bo(e):e}):typeof t=="object"?bo(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=j1(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(Re(r)){e[r]=qm(o);continue}let n=Pt[r]||r;if(Pe(r)&&n===r){e[r]=qm(o);continue}if(It.has(n)||It.has(r)){e[n]=o;continue}e[n]=qm(o)}return e}function qm(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 l0(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function B1(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 U1(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 f0(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 xo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(o){return o!==null&&typeof o=="object"?xo(o):o});let e={},r=[];for(let o in t){let n=t[o];if(Re(o)){let i=u0(n);e[o]=f0(i)?i.in:i;continue}if(Pe(o)){let i=u0(n);e[o]=f0(i)?i.in:i;continue}let s=_e[o]||o;if(It.has(o)||It.has(s)){e[s]=n;continue}if(typeof n=="function"){e[s]=n;continue}if(n==null){e[s]=n;continue}if(Fr.has(o)||Fr.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"?xo(a):a});continue}if(n.length<=1){e[s]=n;continue}r.push(s+":"+n.map(l0).join(","));continue}if(typeof n=="object"){e[s]=xo(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+":"+l0(n))}return r.length&&(e.in=r.join(" ")),e}function u0(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?xo(e):e}):typeof t=="object"?xo(t):t}function d0(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):B1(t)}function Km(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=Pt[l]||l;e[f]=!1;continue}let n=o.indexOf(":");if(n===-1){let l=Pt[o]||o;e[l]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Pt[s]||s,c=U1(i);if(c.length>1){e[a]=c.map(d0);continue}e[a]=d0(i)}return e}function wo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?wo(r):r});let e={};if(typeof t.in=="string"){let r=Km(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(Re(r)){typeof o=="string"?e[r]=Km(o):e[r]=Gm(o);continue}let n=Pt[r]||r;if(Pe(r)&&n===r){typeof o=="string"?e[r]=Km(o):e[r]=Gm(o);continue}if(It.has(n)||It.has(r)){e[n]=o;continue}e[n]=Gm(o)}return e}function Gm(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?wo(e):e}):typeof t=="object"?wo(t):t}var V1={shorten:bo,stringify:_o,stringifyFurther:wo};function H1(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 z1=["components","pages","snippets"],$a={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let o=V1[e===!0?"shorten":e];if(o){for(let n of z1)t[n]&&(t[n]=H1(t[n],o));t.app&&typeof t.app=="object"&&(t.app=o(t.app))}}};var ay={};P(ay,{LEVELS:()=>La,analyzePlugin:()=>Vn,attachBrowserListeners:()=>Nf,attachNetworkListeners:()=>Fa,classifyEvent:()=>ry,createAnalyzeState:()=>jf,createBeaconSink:()=>sy,createConsoleSink:()=>oy,createDedupe:()=>Qm,createEnrich:()=>Jm,createMemorySink:()=>ny,createPipeline:()=>Df,createRedact:()=>If,createRemoteSink:()=>Lf,createSample:()=>ty,createSummarize:()=>Zm,default:()=>Vn,emitFetchEvent:()=>x0,makeEvent:()=>Y,meetsLevel:()=>Rf,normalizeLevel:()=>Ma,resolveSinks:()=>Ff,summarizeElement:()=>So});var W1=0,q1=()=>`${Date.now().toString(36)}-${(W1++).toString(36)}`,Y=(t,e,r={})=>({id:q1(),ts:Date.now(),type:t,level:e,...r}),K1=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(" > ")},So=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:K1(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var Un=t=>t?.context?.analyze,G1={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"}},Y1=(t,{category:e,type:r,level:o})=>n=>{let s=Un(n);!s||!s.shouldCapture(e)||s.emit(Y(r,o,{hook:t,element:So(n)}))},p0=t=>(e,r)=>{let o=Un(e);!o||!o.shouldCapture("state")||o.emit(Y("state","debug",{hook:t,element:So(e),changedKeys:r?.changedKeys||null}))},Vn={name:"analyze",error(t,e){let r=Un(t);if(!r||r.config.enabled===!1||!r.shouldCapture("errors"))return;let o=e?.error||e?.err||(e instanceof Error?e:null);r.emit(Y("error","error",{hook:e?.hook||"error",element:So(t),error:o,message:o?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=Un(t);e&&(!e.shouldCapture("navigation")&&!e.shouldCapture("lifecycle")||e.emit(Y("navigation","info",{hook:"renderRouter",route:t.context?.routerOptions?.currentRoute||null})))},beforeUpdate(t){let e=Un(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=Un(t);if(!e||!e.shouldCapture("updates"))return;let r=null;t.__ref?.__analyzeUpdateStart!=null&&(r=(typeof performance<"u"?performance.now():Date.now())-t.__ref.__analyzeUpdateStart,t.__ref.__analyzeUpdateStart=null),e.emit(Y("update","debug",{hook:"update",element:So(t),durationMs:r}))},beforeStateUpdate:p0("beforeStateUpdate"),stateUpdate:p0("stateUpdate")};for(let[t,e]of Object.entries(G1))Vn[t]=Y1(t,e);R();var La={error:0,warn:1,info:2,debug:3,trace:4};var Rf=(t,e)=>{let r=La[t],o=La[e];return r==null||o==null?!0:r<=o},Ma=t=>La[t]!=null?t:"warn";R();var Pf=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var X1=(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},J1=(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"***"}},Xm=(t,e,r,o)=>{if(o>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>Xm(s,e,r,o+1));let n={};for(let s of Object.keys(t))if(X1(s,e)||Pf.test(s)){let a=J1(t[s],r);a!==void 0&&(n[s]=a)}else n[s]=Xm(t[s],e,r,o+1);return n},If=(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=Xm(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 Jm=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}}}},Zm=()=>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},Qm=(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}},ty=t=>e=>{if(!e)return e;let r=t[e.type];return r==null||r>=1?e:Math.random()>r?null:e},h0={redact:t=>If(t.config.redact||[],t.config.maskStrategy),enrich:t=>Jm(t),summarize:()=>Zm(),dedupe:t=>Qm(t.config.cache?.dedupeWindowMs||1e3),sample:t=>ty(t.config.sample||{})},Z1=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let r=h0[t];return r?r(e):null}return null},Df=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(h0.redact(t));for(let s of r){let i=Z1(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 $f=typeof v<"u"&&typeof v.document<"u",Q1=5e3,tO=50,eO=3,rO=1500,oO=1e3,ry=t=>t?t.level==="error"||t.type==="error"?"bug":t.type==="network"?"network":t.type==="console"?t.level==="error"||t.level==="warn"?"bug":"log":t.level==="warn"?"bug":t.level==="info"?"log":"verbose":"verbose",nO=t=>{try{return JSON.stringify(t)}catch{return null}},sO=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},iO=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}},aO=()=>{if(!$f)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}},cO=()=>{if(!$f)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:iO(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:sO(),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:aO()}},Lf=(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:ry,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:Q1,_=t.maxBatch||tO,b=t.maxRetries!=null?t.maxRetries:eO,y=t.backoffMs||rO,x=t.queueLimit||oO,k=t.sampleRate!=null?t.sampleRate:1,C=()=>typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,T=t.sessionId||C(),$=[],M=[],D=null,V=null,H=()=>{D||!$.length||(D=setTimeout(F,m))},G=J=>{if(V)return;let dt=y*Math.pow(2,Math.max(0,J-1));V=setTimeout(()=>{if(V=null,!M.length)return;let L=M.shift();I(L.envelope,L.attempt)},dt)},ft=(J,dt=!1)=>{let L=u?ey(u):null,W={id:T,sentAt:Date.now()};dt&&(W.endedAt=Date.now());let K={v:1,session:W,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:cO(),user:L?.user||null,traits:L?.traits||null,tags:L?.tags||null,events:J};if((p?ey(p)===!0:g)&&(K.app.debug=!0),h)try{return h(K)||null}catch{return K}return K},I=async(J,dt=1)=>{if(J)try{let L=!0;if(r){let W=await r(J);L=W!==!1&&W?.ok!==!1}else L=await lO(e,J,{apiKey:n,getAuth:f});!L&&dt<b&&(M.push({envelope:J,attempt:dt+1}),G(dt+1))}catch{dt<b&&(M.push({envelope:J,attempt:dt+1}),G(dt+1))}},F=(J=!1,dt=!1)=>{if(D&&(clearTimeout(D),D=null),!$.length&&!dt)return;let L=$;$=[];let W=ft(L,dt);if(W){if(J&&$f){if(typeof o=="function"&&ey(()=>o(W)))return;if(navigator.sendBeacon&&e){let K=nO(W);if(K)try{navigator.sendBeacon(e,new v.Blob([K],{type:"application/json"}));return}catch{}}}I(W)}},N=!1,St=()=>{N||(N=!0,F(!0,!0))};$f&&(v.addEventListener("pagehide",St,{passive:!0}),v.addEventListener("beforeunload",St,{passive:!0}),v.addEventListener("visibilitychange",()=>{v.document.visibilityState==="hidden"&&F(!0)},{passive:!0}));let Dt=J=>{if(!J||k<1&&Math.random()>k)return;N&&(N=!1);let dt={...J,log_type:d(J)};$.push(dt),$.length>x&&($=$.slice(-x)),$.length>=_?F():H()},xe=J=>(F(!1,!0),T=J||C(),N=!1,Dt.sessionId=T,T);return Dt.flush=()=>F(!1),Dt.endSession=St,Dt.startNewSession=xe,Dt.sessionId=T,Dt},ey=t=>{try{return t()}catch{return null}},lO=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 fO={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},uO="\x1B[0m",Mf=typeof v<"u"&&typeof v.document<"u",oy=(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(Mf)i(a,s);else{let c=fO[s.level]||"";i(`${c}${a}${uO}`,s)}}},ny=(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},sy=(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=Mf?new v.Blob([c],{type:"application/json"}):c;if(Mf&&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(()=>{})};Mf&&(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},g0={console:oy,memory:ny,beacon:sy,remote:Lf},m0=(t,e)=>e.getDebug!=null||e.debug!=null?e:{...e,getDebug:()=>t.config.debug===!0},Ff=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=g0[o];if(!n)continue;r.push(o==="memory"?n(t,{}):n(o==="remote"?m0(t,{}):{}))}else if(o&&typeof o=="object"&&o.type){let n=g0[o.type];if(!n)continue;r.push(o.type==="memory"?n(t,o):n(o.type==="remote"?m0(t,o):o))}return r};R();var dO=typeof v<"u"&&typeof v.document<"u",pO=new Set(["password","hidden"]),y0=(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))))}},iy="__analyzeKeyPath",Hn=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[iy])return e[iy];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[iy]=i}catch{}return i},hO=(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"***"}},gO=t=>!!(!t||t.tagName==="INPUT"&&pO.has(t.type)||Pf.test(t.name||"")||Pf.test(t.id||"")||t.dataset?.analyze==="skip"),Nf=t=>{if(!dO)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(Y("error","error",{hook:"window.onerror",message:s.message||null,error:s.error||null,source:s.filename||null,line:s.lineno||null,col:s.colno||null}))}),n(v,"unhandledrejection",s=>{let i=s.reason,a=i instanceof Error?i:null;t.emit(Y("error","error",{hook:"unhandledrejection",message:a?.message||(typeof i=="string"?i:"Unhandled promise rejection"),error:a}))})),e.pointer){n(v,"click",i=>{t.emit(Y("pointer","info",{hook:"click",target:Hn(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:b0(i)}))},{passive:!0,capture:!0}),n(v,"dblclick",i=>{t.emit(Y("pointer","info",{hook:"dblclick",target:Hn(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),n(v,"contextmenu",i=>{t.emit(Y("pointer","info",{hook:"contextmenu",target:Hn(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=y0(i=>{t.emit(Y("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(Y("keyboard","info",{hook:"keydown",code:s.code,key:s.key&&s.key.length===1?"\xB7":s.key,modifiers:b0(s),target:Hn(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=gO(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=hO(a.value,t.config.maskStrategy)),t.emit(Y("forms","info",{hook:i.type,target:Hn(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(Y("forms","info",{hook:"submit",target:Hn(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=y0(()=>{t.emit(Y("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=Ts(()=>{t.emit(Y("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(Y("viewport","info",{hook:"orientationchange",orientation:typeof screen<"u"&&screen.orientation?screen.orientation.type:null}))},{passive:!0}),n(v.document,"visibilitychange",()=>{t.emit(Y("viewport","info",{hook:"visibilitychange",hidden:v.document.hidden}))},{passive:!0}),t.emit(Y("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(Y("console",s==="error"?"error":s==="warn"?"warn":"debug",{hook:`console.${s}`,args:a.map(_0)}))}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(Y("performance","info",{hook:c.entryType,name:c.name,startTime:c.startTime,duration:c.duration,value:c.value!=null?c.value:null}))}),i=["largest-contentful-paint","layout-shift","longtask","paint","first-input","event"];for(let a of i)try{s.observe({type:a,buffered:!0})}catch{}o.push(()=>s.disconnect())}catch{}},b0=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),mO=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=_0(t.cause)),e},_0=t=>{if(t==null)return t;if(t instanceof Error)return mO(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};R();var yO=typeof v<"u"&&typeof v.document<"u",x0=(t,e)=>{let r=t?.analyze;if(!r||!r.shouldCapture("network"))return;let o=e.phase==="error"?"error":"info";r.emit(Y("network",o,{hook:`fetch.${e.phase}`,source:"symbo-fetch",...e}))},Fa=t=>{if(yO&&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(Y("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(Y("network",c.ok?"info":"warn",{hook:"fetch.success",source:"window.fetch",url:s,method:i,status:c.status,ok:c.ok,durationMs:l})),c}).catch(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;throw t.emit(Y("network","error",{hook:"fetch.error",source:"window.fetch",url:s,method:i,error:c,durationMs:l})),c})};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(Y("network","info",{hook:"xhr.start",source:"xhr",url:s.url,method:s.method}));let a=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i,f=this.status>=200&&this.status<400;t.emit(Y("network",f?"info":"warn",{hook:"xhr.success",source:"xhr",url:s.url,method:s.method,status:this.status,ok:f,durationMs:l}))},c=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i;t.emit(Y("network","error",{hook:"xhr.error",source:"xhr",url:s.url,method:s.method,status:this.status,durationMs:l}))};return this.addEventListener("loadend",a),this.addEventListener("error",c),o.apply(this,arguments)},t.__teardown.push(()=>{e.prototype.open=r,e.prototype.send=o})}}};var bO={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},_O={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},xO={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},wO={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},SO=t=>{let e={...bO,...t};return e.replay&&Object.assign(e,_O),e.telemetry&&Object.assign(e,xO),e.remote&&Object.assign(e,wO),Object.assign(e,t),e},kO=64,vO=()=>{if(typeof v>"u"||!v.location)return null;try{let e=new URLSearchParams(v.location.search).get("analyze");return e||null}catch{return null}},jf=(t={})=>{let e=t===!0?{}:{...t};e.capture=SO(e.capture||{});let r=vO();(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=Ma(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=Df(o),o.__sinks=Ff(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&&Rf(s.level,o.config.level)){if(!o.__ready){if(s.level!=="error"&&!o.config.captureDuringHydration)return;o.__preBuffer.length<kO&&o.__preBuffer.push(s);return}n(),w0(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)w0(o,a)}try{Nf(o)}catch(a){console.error("[analyze] browser attach error:",a)}try{Fa(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=Ma(s)},o.setCapture=(s,i)=>{if(o.config.capture[s]=!!i,s==="network"&&i&&o.__ready)try{Fa(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},w0=(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 fy={};P(fy,{Inspect:()=>Bf,inspectPlugin:()=>ly});R();function S0(t){return w(t)?t:O(t)?t.find(e=>w(e)):""}function cy(t){if(!t)return;let e=t.__ref.__componentKey,r=t.extends&&S0(t.extends),o=t.parent&&t.parent.childExtends&&S0(t.parent.childExtends);return(e||r||o||"").split("_")[0].split(".")[0].split("+")[0]}function Uf(t){if(!t||!t.__ref)return;let{components:e,pages:r,editor:o}=t.context,n=cy(t);return o&&o.onInitInspect&&!o.onInitInspect(n,t,t.state)?Uf(t.parent):n&&(e[n]||r[n])?t:Uf(t.parent)}var CO=(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}))}},Bf={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:CO,onMousemove:(t,e,r)=>{let o=t.target.ref,n=Uf(o),s=e.Inspector.state;if(!n||!r.debugging||!n.__ref)return s.update({area:!1});let i=cy(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=Uf(o);if(!n)return;let s=cy(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)Dn[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=`
|
|
78
89
|
display: block !important;
|
|
79
90
|
top: ${a-6}px;
|
|
80
91
|
left: ${i-6}px;
|
|
81
92
|
width: ${c+12}px;
|
|
82
93
|
height: ${l+12}px;
|
|
83
|
-
`}return e.node.style=s,e.Span.node.innerText=r.focusKey,!1}}},
|
|
94
|
+
`}return e.node.style=s,e.Span.node.innerText=r.focusKey,!1}}},ly={name:"inspect",beforeCreate(t,e){Array.isArray(t.extends)?t.extends.push(Bf):t.extends?t.extends=[t.extends,Bf]:t.extends=[Bf]}};var dy={};P(dy,{apiUrl:()=>uy,channelByApiUrl:()=>OO,channelNames:()=>AO,channels:()=>Xt,currentChannel:()=>Nr,defaultChannel:()=>FO,deployTarget:()=>$O,isKnownChannel:()=>MO,mermaidUrl:()=>DO,normalizeOwnerSegment:()=>NO,normalizeProjectKey:()=>BO,normalizeProjectSlug:()=>jO,parseSymboLsHost:()=>UO,previewProjectUrl:()=>IO,previewUrl:()=>E0,resolveChannel:()=>ko,screenshotCdnHost:()=>A0,screenshotCdnUrl:()=>LO,setChannel:()=>TO,shellUrl:()=>PO,socketUrl:()=>RO});var Xt={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 AO=Object.keys(Xt.channels),ar=t=>!!(t&&Xt.channels[t]),ko=t=>ar(t)?Xt.channels[t]:Xt.channels[Xt.defaultChannel],TO=t=>{typeof globalThis>"u"||(globalThis.__SYMBOLS_CHANNEL__=ar(t)?t:null,zn=void 0)},zn,Na=t=>typeof process<"u"&&process.env&&process.env[t]||null,Nr=()=>{if(zn!==void 0)return zn;let t=typeof globalThis<"u"?globalThis.__SYMBOLS_CHANNEL__:null,e=Na("SYMBOLS_CHANNEL"),r=Na("NODE_ENV");return zn=ar(t)&&t||ar(e)&&e||ar(r)&&r||Xt.defaultChannel,zn===Xt.defaultChannel&&!ar(t)&&!ar(e)&&!ar(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 "${Xt.defaultChannel}". Outbound URLs (shellUrl/apiUrl) will target production; set SYMBOLS_CHANNEL (preferred), NODE_ENV, or globalThis.__SYMBOLS_CHANNEL__ to a known channel.`),zn},k0=["production","staging","upcoming","next","test","development","local","demo","demo-dev"],v0=t=>{let e=k0.indexOf(t);return e===-1?k0.length:e},OO=t=>{if(!t)return null;let e=Object.keys(Xt.channels).filter(r=>Xt.channels[r].api===t);return e.length===0?null:e.length===1?e[0]:e.sort((r,o)=>v0(r)-v0(o))[0]},uy=(t=Nr())=>Na("SYMBOLS_API_URL")||ko(t).api,RO=(t=Nr())=>Na("SYMBOLS_SOCKET_URL")||ko(t).socket,PO=(t=Nr())=>ko(t).shell||null,E0=(t=Nr())=>ko(t).preview||null,IO=({owner:t,key:e,env:r="production"}={},o=Nr())=>{let n=E0(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)}`},DO=({owner:t,key:e,env:r="production"}={},o=Nr())=>{let n=ko(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}`},$O=(t=Nr())=>ko(t).deploy||{},A0=()=>Na("SYMBOLS_SCREENSHOT_CDN")||Xt.screenshotCdn,LO=({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://${A0()}/${encodeURIComponent(t)}/${encodeURIComponent(e)}/${i}.webp${c}`},MO=ar,FO=Xt.defaultChannel,NO=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"",jO=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"",BO=(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},C0={at:"production",prod:"production",production:"production",dev:"development",development:"development",next:"next",upcoming:"upcoming",test:"test",staging:"staging"},UO=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=C0[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?C0[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 gy={};P(gy,{BUILD_DOMQL_SYSTEM_PROMPT:()=>B0,DEFAULT_MAX_TOKENS:()=>Gf,DEFAULT_MODEL:()=>jr,DEFAULT_PROVIDER:()=>qf,DEFAULT_TEMPERATURE:()=>Kf,MODEL_TIER_ALIASES:()=>hy,PROVIDER_MODELS:()=>O0,SIMONE_BASE_URL:()=>ja,SIMONE_CHAT_PATH:()=>Vf,SIMONE_CODE_PATH:()=>Hf,SIMONE_CODE_SYMBOLS_PATH:()=>zf,SIMONE_HEALTH_PATH:()=>Wf,SIMONE_TOOLS_PATH:()=>T0,WORKSPACE_SYSTEM_PROMPT:()=>j0,buildMessages:()=>$0,chat:()=>Ba,health:()=>D0,parseSimoneResponse:()=>F0,resolveModel:()=>U0,streamChat:()=>Ba,streamCode:()=>P0,streamCodeSymbols:()=>I0,toLegacyEnvelope:()=>N0});var ja="https://symbols-service-production.up.railway.app",Vf="/api/chat",Hf="/api/code",zf="/api/code-symbols",Wf="/api/health",T0="/api/tools",qf="openai-compatible",jr="claude-sonnet-4-6",Kf=.7,Gf=4096,O0={"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 R0(t,e){return t?t.replace(/\/$/,"")+e:e}function VO(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 Ba(t,e={},r){let{baseUrl:o=ja,path:n=Vf,provider:s=qf,model:i=jr,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(R0(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 C=await g.text();try{let T=JSON.parse(C);x=T.error||T.detail||x}catch{x=C||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 C=y.indexOf(`
|
|
95
|
+
`);for(;C!==-1;){let T=y.slice(0,C).trim();if(y=y.slice(C+1),T){let $=VO(T);if($?.done)return{text:_.join(""),errors:b};let M=$?.chunk;M?.delta&&(_.push(M.delta),r&&r(M.delta)),M?.error&&b.push(M.error)}C=y.indexOf(`
|
|
96
|
+
`)}}return{text:_.join(""),errors:b}}finally{p.cancel().catch(()=>{})}}function P0(t,e={},r){return Ba(t,{...e,path:Hf},r)}function I0(t,e={},r){return Ba(t,{...e,path:zf},r)}async function D0(t={}){let{baseUrl:e=ja,signal:r,headers:o}=t,n=await fetch(R0(e,Wf),{method:"GET",headers:o,signal:r});if(!n.ok)throw new Error(`simone health: HTTP ${n.status}`);return n.json()}function $0({system:t,history:e=[],user:r,context:o}){let n=[];t&&n.push({role:"system",content:t});for(let s of e)!s||!s.role||typeof s.content!="string"||!s.content||n.push({role:s.role,content:s.content});if(r){let s=r;if(o!=null){let i=typeof o=="string"?o:JSON.stringify(o,null,2);s=`${s}
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
Context:
|
|
100
|
+
\`\`\`json
|
|
101
|
+
${i}
|
|
102
|
+
\`\`\``}n.push({role:"user",content:s})}return n}var M0=/```(?<lang>[a-zA-Z0-9_+-]*)\n(?<code>[\s\S]*?)```/g,HO=new Set(["component","components","page","pages","function","method","state","theme","color","font","icon"]);function zO(t){let e=[];for(let r of t.matchAll(M0))e.push({lang:(r.groups?.lang||"").toLowerCase(),code:r.groups?.code??""});return e}function WO(t){return t.replace(M0,"").trim()}function py(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 L0(t){return!!t&&typeof t=="object"&&typeof t.type=="string"&&HO.has(t.type)}function F0(t){let e=(typeof t=="string"?t:"").trim();if(!e)return{kind:"text",text:"",message:""};let r=zO(e),o=r.filter(i=>/^(js|javascript|ts|typescript|jsx|tsx)$/.test(i.lang)),n=r.filter(i=>i.lang==="json"),s=WO(e);for(let i of n){let a=py(i.code);if(L0(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=py("["+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=py(e);if(L0(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 N0(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 j0=["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(" "),B0=["You are a DOMQL v3.14 code generator for the Symbols workspace.","Output EXECUTABLE DOMQL v3.14 for the requested page(s)/component(s) \u2014 never a description, never a plan, never an explanation.","Author data-first object schemas: child elements are UPPERCASE keys; styling lives in flat element props (NO attr/props/on wrappers); use design-system tokens (color/typography/spacing keys), never raw px/rem/hex/rgba; `extends` and `childExtends` are quoted strings; event handlers are flat (onClick, onInit) \u2014 never on:{} or props:{} wrappers.","OUTPUT FORMAT \u2014 pick ONE:","- SINGLE page/component: emit exactly one ```js fenced code block whose body is a single DOMQL object literal (an expression \u2014 start with `{`, no `export`, no variable assignment, no surrounding prose).",'- MULTIPLE pages/components: emit exactly one ```json fenced code block whose body is an object of the shape { "pages": { "PageKey": "<DOMQL object-literal source string>" }, "components": { "CompKey": "<DOMQL object-literal source string>" } }. Include only the sections you produce; each value is the DOMQL source for that key.',"Keys are PascalCase. Default to a single page unless the request clearly needs several distinct pages/components.","Emit ONLY the single fenced block. No text before or after it."].join(`
|
|
103
|
+
`),hy={Starter:jr,Free:jr,Pro:"claude-opus-4-6"};function U0(t){return t?hy[t]||t:jr}var V0={"@symbo.ls/signal":Au,"@symbo.ls/scratch":zh,"@symbo.ls/element":Vg,"@symbo.ls/css":Zh,"@symbo.ls/utils":fl,"@symbo.ls/state":Og,"@symbo.ls/router":_a,"@symbo.ls/polyglot":Bm,"@symbo.ls/helmet":Nm,"@symbo.ls/fetch":Qr,"@symbo.ls/capsize":Vm,"@symbo.ls/shorthand":Ym,"@symbo.ls/analyze":ay,"@symbo.ls/inspect":fy,"@symbo.ls/channels":dy,"@symbo-ls/simone-server":gy},H0=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:{}),o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in V0)o[n]||(o[n]=V0[n]);if(e)for(let n in e)o[n]||(o[n]=e[n]);return o},z0=["@symbo.ls/sdk"],W0=(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},q0=(t,e)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r||!Array.isArray(t))return null;let o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n of t){let s=n&&n.library?n.library:n;if(!s||typeof s!="object"||s.__isStub)continue;let i=s.key||s.name||s.__libraryKey;if(typeof i!="string"||!i)continue;let a=i.includes("/")?i.slice(i.indexOf("/")+1):i;for(let c of[`@symbo-ls/${a}`,`@symbo.ls/${a}`])o[c]||(o[c]=s)}return o};R();var Y0=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},K0=(t="smbls")=>{let e={};for(let r in mo)Object.prototype.hasOwnProperty.call(mo,r)&&(Ne(r)?e[`smbls.${r}`]=mo[r]:e[r]=mo[r]);return e},X0=t=>t.components?{...K0(),...t.components}:K0(),J0=t=>({...wa,..._a,...kr,...t.utils,...t.snippets,...t.functions}),Z0=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var qO=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,KO=3e3,GO=(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),KO);n.then(c=>{clearTimeout(a),i(c)})})}catch{return Promise.resolve(null)}},G0={},Q0=async({dependencies:t,dependenciesOnDemand:e,document:r,preventCaching:o=!1,cdnProvider:n,packageManager:s,symbolsConfig:i,registerDependency:a=GO})=>{if(n||(n=xr[s]||Go(i)||"esmsh"),!t)return null;let c=!1;for(let d in t){c=!0;break}if(!c)return null;let l=gr()&&o?`?${Math.random()}`:"",f=async(d,h)=>{let g=ve(d,h,n)+l;try{await Promise.race([Xo(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=ve(d,h,"symbols")+l;await Promise.race([Xo(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 t){let h=t[d];if(!(e&&e[d])&&!G0[d]&&(G0[d]=!0,!eo(d))){if(Yo(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}qO(d)||u.push(f(d,h))}}return u.length&&await Promise.allSettled(u),t},tk=async(t,e)=>{let r=e.window||window,o=e.cdnProvider||Go(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]&&eo(a))return await u.require(a,c);if(!u.packages[a]){let d=gr()?`?${Math.random()}`:"";if(l&&l[a]){let h=l[a],g=ve(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=ve(a,h,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let h=ve(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=ve(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=pt(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)},YO=/\s+/g,ek=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,XO=(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+=` ${ek(n,e)}`)}return r},JO=(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=XO(t,e));let n=t.replace(YO," ").trim();if(r&&typeof r.setAttribute=="function")r.setAttribute("class",n);else if(r)try{r.className=n}catch{}return n},ZO=()=>(t,e,r)=>{let o=ek(t,e);if(t){let{__ref:n}=e;n.__class.style=o}rk()(e.classlist,e,e.state,!0)},rk=()=>(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=me(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];e.node&&JO(i,e,e.node)}},QO=()=>({style:ZO(),classlist:rk()}),tR=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],my=new WeakSet,yy=!1,eR=t=>!!t&&typeof t=="object",ok=(t,e)=>{let r=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,o=e.initOptions||{},n=e.registry||QO(),s=e.designSystem?nt(ut(e.designSystem),ya):ut(ya),i={};for(let p of tR)e[p]!==void 0&&(i[p]=e[p]);let a,c=eR(r),f=c&&my.has(r)&&!e.skipDesignSystemInit,u=!f&&!yy,d=f?`[data-smbls-app="${t}"]`:":root";if(e.scopeSelector=d,e.skipDesignSystemInit){if(a=E(t)||E(),a&&(a.__domDocument=r),a?.CSS_VARS){st(a);try{wt({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&wt(Ln(a.CSS_MEDIA_VARS,d))}finally{rt()}}}else if(u){let p=E();p&&(p.__domDocument=r),a=ir(s,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...vf,...i,...o}),a&&a!==p&&(a.__domDocument=r),c&&my.add(r),yy=!0}else{let p=Pi(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}st(p);try{a=ir(p,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...vf,...i,...o})}finally{rt()}c&&my.add(r),yy=!0}let h=a?.CONFIG||a,g=h?.font;if(g){st(h);try{for(let p in g){let m=g[p];if(!m?.fontFace)continue;let _=Array.isArray(m.fontFace)?m.fontFace:[m.fontFace];for(let b of _)typeof b=="string"&&b.includes("font-family")&&wt(`@font-face { ${b} }`)}}finally{rt()}}return[a,n]},nk=(t,e)=>{let r={};e.state&&nt(r,e.state),t&&t.state&&nt(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=o.translations[s];if(i&&typeof i=="object")for(let c in i)r[c]=i[c];let a=new Set(o.languages||[]);for(let c in o.translations)!a.has(c)&&r[c]===void 0&&(r[c]=o.translations[c])}return r.isRootState=!0,ut(r)},sk=(t,e)=>{S(t.routes)&&S(e.pages)&&pt(t.routes,e.pages);let r=t.routes||e.pages||{};for(let o in r){if(o.charCodeAt(0)===47)continue;let n=o==="index"?"":o;r["/"+n]=r[o],delete r[o]}return r},ik=t=>{bi(t,t.sharedLibraries)};var Ua={polyglot:Aa,getLocalStateLang:Pa,getActiveLang:jn,getLang:jn,setLang:Oa,getLanguages:Ea,loadTranslations:Ta,upsertTranslation:Ra};br();var Ie=Object.create(null);Ie.open="0";Ie.close="1";Ie.ping="2";Ie.pong="3";Ie.message="4";Ie.upgrade="5";Ie.noop="6";var Va=Object.create(null);Object.keys(Ie).forEach(t=>{Va[Ie[t]]=t});var Ha={type:"error",data:"parser error"};var lk=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",fk=typeof ArrayBuffer=="function",uk=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,za=({type:t,data:e},r,o)=>lk&&e instanceof Blob?r?o(e):ak(e,o):fk&&(e instanceof ArrayBuffer||uk(e))?r?o(e):ak(new Blob([e]),o):o(Ie[t]+(e||"")),ak=(t,e)=>{let r=new FileReader;return r.onload=function(){let o=r.result.split(",")[1];e("b"+(o||""))},r.readAsDataURL(t)};function ck(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var by;function dk(t,e){if(lk&&t.data instanceof Blob)return t.data.arrayBuffer().then(ck).then(e);if(fk&&(t.data instanceof ArrayBuffer||uk(t.data)))return e(ck(t.data));za(t,!1,r=>{by||(by=new TextEncoder),e(by.encode(r))})}var pk="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wa=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<pk.length;t++)Wa[pk.charCodeAt(t)]=t;var hk=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=Wa[t.charCodeAt(o)],i=Wa[t.charCodeAt(o+1)],a=Wa[t.charCodeAt(o+2)],c=Wa[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 rR=typeof ArrayBuffer=="function",qa=(t,e)=>{if(typeof t!="string")return{type:"message",data:gk(t,e)};let r=t.charAt(0);return r==="b"?{type:"message",data:oR(t.substring(1),e)}:Va[r]?t.length>1?{type:Va[r],data:t.substring(1)}:{type:Va[r]}:Ha},oR=(t,e)=>{if(rR){let r=hk(t);return gk(r,e)}else return{base64:!0,data:t}},gk=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer;var mk="",yk=(t,e)=>{let r=t.length,o=new Array(r),n=0;t.forEach((s,i)=>{za(s,!1,a=>{o[i]=a,++n===r&&e(o.join(mk))})})},bk=(t,e)=>{let r=t.split(mk),o=[];for(let n=0;n<r.length;n++){let s=qa(r[n],e);if(o.push(s),s.type==="error")break}return o};function _k(){return new TransformStream({transform(t,e){dk(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 _y;function Yf(t){return t.reduce((e,r)=>e+r.length,0)}function Xf(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 xk(t,e){_y||(_y=new TextDecoder);let r=[],o=0,n=-1,s=!1;return new TransformStream({transform(i,a){for(r.push(i);;){if(o===0){if(Yf(r)<1)break;let c=Xf(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(Yf(r)<2)break;let c=Xf(r,2);n=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),o=3}else if(o===2){if(Yf(r)<8)break;let c=Xf(r,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(Ha);break}n=f*Math.pow(2,32)+l.getUint32(4),o=3}else{if(Yf(r)<n)break;let c=Xf(r,n);a.enqueue(qa(s?c:_y.decode(c),e)),o=0}if(n===0||n>t){a.enqueue(Ha);break}}}})}var xy=4;function lt(t){if(t)return nR(t)}function nR(t){for(var e in lt.prototype)t[e]=lt.prototype[e];return t}lt.prototype.on=lt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};lt.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};lt.prototype.off=lt.prototype.removeListener=lt.prototype.removeAllListeners=lt.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};lt.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};lt.prototype.emitReserved=lt.prototype.emit;lt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};lt.prototype.hasListeners=function(t){return!!this.listeners(t).length};var cr=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),jt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),wk="arraybuffer";function Jf(t,...e){return e.reduce((r,o)=>(t.hasOwnProperty(o)&&(r[o]=t[o]),r),{})}var sR=jt.setTimeout,iR=jt.clearTimeout;function lr(t,e){e.useNativeTimers?(t.setTimeoutFn=sR.bind(jt),t.clearTimeoutFn=iR.bind(jt)):(t.setTimeoutFn=jt.setTimeout.bind(jt),t.clearTimeoutFn=jt.clearTimeout.bind(jt))}var aR=1.33;function Sk(t){return typeof t=="string"?cR(t):Math.ceil((t.byteLength||t.size)*aR)}function cR(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 Zf(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function kk(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function vk(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 Qf=class extends Error{constructor(e,r,o){super(e),this.description=r,this.context=o,this.type="TransportError"}},fr=class extends lt{constructor(e){super(),this.writable=!1,lr(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 Qf(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=qa(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=kk(e);return r.length?"?"+r:""}};var Ka=class extends fr{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)};bk(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,yk(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]=Zf()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}};var Ck=!1;try{Ck=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var Ek=Ck;function lR(){}var wy=class extends Ka{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}},Br=class t extends lt{constructor(e,r,o){super(),this.createRequest=e,lr(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=Jf(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=lR,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()}};Br.requestsCount=0;Br.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Ak);else if(typeof addEventListener=="function"){let t="onpagehide"in jt?"pagehide":"unload";addEventListener(t,Ak,!1)}}function Ak(){for(let t in Br.requests)Br.requests.hasOwnProperty(t)&&Br.requests[t].abort()}var fR=(function(){let t=Tk({xdomain:!1});return t&&t.responseType!==null})(),Ur=class extends wy{constructor(e){super(e);let r=e&&e.forceBase64;this.supportsBinary=fR&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Br(Tk,this.uri(),e)}};function Tk(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Ek))return new XMLHttpRequest}catch{}if(!e)try{return new jt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var Ok=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",ky=class extends fr{get name(){return"websocket"}doOpen(){let e=this.uri(),r=this.opts.protocols,o=Ok?{}:Jf(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;za(o,this.supportsBinary,s=>{try{this.doWrite(o,s)}catch{}n&&cr(()=>{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]=Zf()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}},Sy=jt.WebSocket||jt.MozWebSocket,Vr=class extends ky{createSocket(e,r,o){return Ok?new Sy(e,r,o):r?new Sy(e,r):new Sy(e)}doWrite(e,r){this.ws.send(r)}};var Wn=class extends fr{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=xk(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=e.readable.pipeThrough(r).getReader(),n=_k();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&&cr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var vy={websocket:Vr,webtransport:Wn,polling:Ur};var uR=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,dR=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function qn(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=uR.exec(t||""),s={},i=14;for(;i--;)s[dR[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=pR(s,s.path),s.queryKey=hR(s,s.query),s}function pR(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 hR(t,e){let r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,n,s){n&&(r[n]=s)}),r}var Cy=typeof addEventListener=="function"&&typeof removeEventListener=="function",tu=[];Cy&&addEventListener("offline",()=>{tu.forEach(t=>t())},!1);var vo=class t extends lt{constructor(e,r){if(super(),this.binaryType=wk,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=qn(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=qn(r.host).host);lr(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=vk(this.opts.query)),Cy&&(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"})},tu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let r=Object.assign({},this.opts.query);r.EIO=xy,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+=Sk(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,cr(()=>{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(),Cy&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let o=tu.indexOf(this._offlineEventListener);o!==-1&&tu.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}};vo.protocol=xy;var eu=class extends vo{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;vo.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;vo.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}},Kn=class extends eu{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=>vy[n]).filter(n=>!!n)),super(e,o)}};var aU=Kn.protocol;function Rk(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=qn(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 Iy={};P(Iy,{Decoder:()=>Ry,Encoder:()=>Oy,PacketType:()=>U,isPacketValid:()=>LR,protocol:()=>Uk});var mR=typeof ArrayBuffer=="function",yR=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Pk=Object.prototype.toString,bR=typeof Blob=="function"||typeof Blob<"u"&&Pk.call(Blob)==="[object BlobConstructor]",_R=typeof File=="function"||typeof File<"u"&&Pk.call(File)==="[object FileConstructor]";function Ya(t){return mR&&(t instanceof ArrayBuffer||yR(t))||bR&&t instanceof Blob||_R&&t instanceof File}function Ga(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,o=t.length;r<o;r++)if(Ga(t[r]))return!0;return!1}if(Ya(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Ga(t.toJSON(),!0);for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&Ga(t[r]))return!0;return!1}function Ik(t){let e=[],r=t.data,o=t;return o.data=Ey(r,e),o.attachments=e.length,{packet:o,buffers:e}}function Ey(t,e){if(!t)return t;if(Ya(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]=Ey(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]=Ey(t[o],e));return r}return t}function Dk(t,e){return t.data=Ay(t.data,e),delete t.attachments,t}function Ay(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]=Ay(t[r],e);else if(typeof t=="object")for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=Ay(t[r],e));return t}var jk=rC(Nk(),1),Ty=(0,jk.default)("socket.io-parser"),Bk=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Uk=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 Oy=class{constructor(e){this.replacer=e}encode(e){return Ty("encoding packet %j",e),(e.type===U.EVENT||e.type===U.ACK)&&Ga(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)),Ty("encoded %j as %s",e,r),r}encodeAsBinary(e){let r=Ik(e),o=this.encodeAsString(r.packet),n=r.buffers;return n.unshift(o),n}},Ry=class t extends lt{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 Py(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(Ya(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(!Vk(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 Ty("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 nu(r);case U.DISCONNECT:return r===void 0;case U.CONNECT_ERROR:return typeof r=="string"||nu(r);case U.EVENT:case U.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&Bk.indexOf(r[0])===-1);case U.ACK:case U.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},Py=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=Dk(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function IR(t){return typeof t=="string"}var Vk=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function DR(t){return t===void 0||Vk(t)}function nu(t){return Object.prototype.toString.call(t)==="[object Object]"}function $R(t,e){switch(t){case U.CONNECT:return e===void 0||nu(e);case U.DISCONNECT:return e===void 0;case U.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&Bk.indexOf(e[0])===-1);case U.ACK:return Array.isArray(e);case U.CONNECT_ERROR:return typeof e=="string"||nu(e);default:return!1}}function LR(t){return IR(t.nsp)&&DR(t.id)&&$R(t.type,t.data)}function se(t,e,r){return t.on(e,r),function(){t.off(e,r)}}var MR=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Jn=class extends lt{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=[se(e,"open",this.onopen.bind(this)),se(e,"packet",this.onpacket.bind(this)),se(e,"error",this.onerror.bind(this)),se(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(MR.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 Eo(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}Eo.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};Eo.prototype.reset=function(){this.attempts=0};Eo.prototype.setMin=function(t){this.ms=t};Eo.prototype.setMax=function(t){this.max=t};Eo.prototype.setJitter=function(t){this.jitter=t};var Zn=class extends lt{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,lr(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 Eo({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||Iy;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 Kn(this.uri,this.opts);let r=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;let n=se(r,"open",function(){o.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=se(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(se(e,"ping",this.onping.bind(this)),se(e,"data",this.ondata.bind(this)),se(e,"error",this.onerror.bind(this)),se(e,"close",this.onclose.bind(this)),se(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){cr(()=>{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 Jn(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 Xa={};function Qn(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let r=Rk(t,e.path||"/socket.io"),o=r.source,n=r.id,s=r.path,i=Xa[n]&&s in Xa[n].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new Zn(o,e):(Xa[n]||(Xa[n]=new Zn(o,e)),c=Xa[n]),r.query&&!e.query&&(e.query=r.queryKey),c.socket(r.path,e)}Object.assign(Qn,{Manager:Zn,Socket:Jn,io:Qn,connect:Qn});R();var Hk=new Set(["__proto__","constructor","prototype"]),zk=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(Hk.has(t[e]))return!1;return!0},FR=(t,e)=>{!t||!zk(e)||e.reduce((r,o,n,s)=>{if(r&&o in r){if(n!==s.length-1)return r[o];delete r[o]}},t)},NR=(t,e,r,o=!1)=>{!t||!zk(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)},Dy=(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":FR(t,n);break;case"update":case"set":NR(t,n,s,!0);break;default:break}return r},Wk=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},qk=(t,e)=>{for(let r in e){if(Hk.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}qk(n,o)}else r in t||(t[r]=o)}},$y=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let n={designSystem:t.__rawDesignSystem};Dy(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"&&qk(r,s)}return r};R();var Kk=(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(Wk(r,c),o){let l=$y(r);l&&ir(l)}}else Xr(r[a],c);else r[a]=c}),o=!0,i&&(r.schema=i))}},Gk=(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=Dy(r,i);if(s.length&&a.add("designSystem"),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})}if(a.has("designSystem")){let c=$y(r,s);ir(c||r.designSystem)}};var jR={success:"green",error:"red",warning:"yellow"},Yk=(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)}},Xk={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:jR[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 BR=!1,UR=()=>BR?"http://localhost:8080":"https://api.symbols.app",VR=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}},HR=async t=>{try{let e=t||UR(),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)}},Qk=(t,e,r,o)=>{t.on("snapshot",Kk(e,r,o)),t.on("ops",Gk(e,r,o)),t.on("clients",n=>{o.editor?.verbose&&Yk(n,e,r)}),t.on("disconnect",n=>{o.editor?.verbose&&console.info("[sync] disconnected",n)})},zR=async(t,e,r,o)=>{let n=await HR(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=Qn(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)")}),Qk(a,t,e,r),a},WR=(t,e,r)=>{let o=Qn({transports:["websocket","polling"],reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return o.on("connect",()=>{r.editor?.verbose!==!1&&console.info("[sync] connected (runner)")}),Qk(o,t,e,r),o.on("reload",()=>{typeof v<"u"&&v.location&&v.location.reload()}),o},qR=async(t,e,r)=>{let{mode:o,baseUrl:n}=VR(r);return o?o==="collab"?zR(t,e,r,n):o==="runner"?WR(t,e,r):null:null},KR={onInit:qR};var tv=t=>typeof t>"u",Jk=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),Zk=t=>t?.editor?.runtime==="runner",ev=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},rv={name:"sync",beforeCreate(t,e){let r=e&&e.editor;(r&&!tv(r.liveSync)?r.liveSync:Jk(e)||Zk(e))&&(Jk(e)&&!Zk(e)&&!e?.key||ev(t,KR))}},ov={name:"notifications",beforeCreate(t,e){if(!e)return;let r=tv(e.notifications)?null:e.notifications,o=e.editor&&e.editor.verbose===!0;(r===!0||r!==!1&&o)&&ev(t,Xk)}};function X(t){let e=t;for(;e;){if(e.layer!==void 0)return e.layer;e=e.parent}return null}function ts(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 nv(){return X(this)}var GR=(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"))},sv=(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 iv(t){let e=ts(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)GR(e,i);for(let i of n)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function av(t={}){let e=ts(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 sv(e,s),e.state.update({stack:[...n,o]}),r}function cv(){let t=ts(this);!t||!t.state?.stack?.length||t.state.update({stack:[]})}function lv(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"confirm"})}function fv(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"alert"})}function uv(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"prompt"})}var Hr={openModal:av,closeModal:iv,closeAllModals:cv,confirmDialog:lv,alertDialog:fv,promptDialog:uv,getLayer:nv};var YR=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),dv=t=>{if(!t?.querySelectorAll)return[];let e=t.querySelectorAll(YR),r=[];for(let o=0;o<e.length;o++){let n=e[o];(n.offsetParent!==null||n===document.activeElement)&&r.push(n)}return r},pv=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},hv={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 Hr)a in r.functions||(r.functions[a]=Hr[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=pv(t);if(!l)return;let f=dv(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=pv(t);if(!o)return;let n=dv(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 gv={tag:"div",position:"fixed",inset:"0",alignItems:"center",justifyContent:"center",padding:"A",background:"black.45",backdropFilter:"blur(4px)",transitionProperty:"opacity",transitionDuration:"200ms",transitionTimingFunction:"ease",zIndex:(t,e)=>`${2e3+(t.__slotIndex||0)*10}`,display:(t,e)=>t.layer?"flex":"none",opacity:(t,e)=>t.layer?"1":"0",visibility:(t,e)=>t.layer?"visible":"hidden",pointerEvents:(t,e)=>t.layer?"auto":"none",ModalWindow:{attr:{role:"dialog","aria-modal":"true",tabindex:"-1","aria-labelledby":t=>{let e=X(t)?.id;return e?"modal-title-"+e:null}},width:t=>X(t)?.width||"H",maxWidth:t=>X(t)?.maxWidth||"90vw",maxHeight:t=>X(t)?.maxHeight||null,onClick:t=>t.stopPropagation(),onMousedown:t=>t.stopPropagation(),ModalHeader:{display:"none"},overflow:"visible",ConfirmTemplate:{hide:t=>X(t)?.template!=="confirm"},AlertTemplate:{hide:t=>X(t)?.template!=="alert"},PromptTemplate:{hide:t=>X(t)?.template!=="prompt"},CustomTemplate:{hide:t=>X(t)?.template!=="custom"}}};var es=(t,e,r)=>X(t)?.[e]||r,XR=t=>{let e=X(t)?.icon;return e===null||e===!1},mv={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>es(t,"title","Are you sure?"),attr:{id:t=>{let e=X(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>es(t,"message","This action cannot be undone."),color:"dim"}},Icons:{hide:t=>XR(t),Indicator:{extends:"Icon",opacity:".7",icon:t=>es(t,"icon","warning")}}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"Button",theme:"ghost",text:t=>es(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let o=X(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=>es(t,"confirmTheme","primary"),text:t=>es(t,"confirmText","Confirm"),onClick:(t,e,r)=>{let o=X(e);if(o?.onConfirm)try{o.onConfirm()}catch(n){console.warn("[windows] confirm.onConfirm threw:",n)}e.call("closeModal",o?.id)}}}};var su=(t,e,r)=>X(t)?.[e]||r,yv={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>su(t,"title","Notice"),attr:{id:t=>{let e=X(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>su(t,"message",""),color:"dim"}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:t=>su(t,"icon","info")}}},ModalFooter:{flow:"x",align:"center end",OkBtn:{extends:"Button",theme:"primary",text:t=>su(t,"okText","OK"),onClick:(t,e,r)=>{let o=X(e);if(o?.onOk)try{o.onOk()}catch(n){console.warn("[windows] alert.onOk threw:",n)}e.call("closeModal",o?.id)}}}};var Ja=(t,e,r)=>X(t)?.[e]||r,bv={tag:"div",flow:"y",gap:"B",scope:{value:""},onRender:(t,e)=>{let r=X(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let o=t.InputRow&&t.InputRow.node;o&&(o.value=t.scope.value)},onUpdate:(t,e)=>{let r=X(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let o=t.InputRow&&t.InputRow.node;o&&(o.value=t.scope.value)},ModalHeader:{Hgroup:{H:{text:t=>Ja(t,"title","Enter a value"),attr:{id:t=>{let e=X(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>Ja(t,"message",""),color:"dim"}}},InputRow:{extends:"Input",autofocus:!0,placeholder:t=>Ja(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=X(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=>Ja(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let o=X(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=>Ja(t,"confirmText","OK"),onClick:(t,e,r)=>{let o=X(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 _v={tag:"div",flow:"y",gap:"B",Title:{tag:"h2",text:t=>X(t)?.title||"",hide:t=>!X(t)?.title,position:"absolute",width:"1px",height:"1px",margin:"-1px",padding:"0",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0",attr:{id:t=>{let e=X(t)?.id;return e?"modal-title-"+e:null}}},Slot:{tag:"div",onInit:t=>{let e=Q(()=>{let r=X(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 Hr)i in s.functions||(s.functions[i]=Hr[i])}}catch(s){console.warn("[windows] custom.content set failed:",s)}}});t.__ref&&t.__ref.__effects.push(e)}}};var xv={ModalRoot:hv,ModalLayer:gv,ConfirmTemplate:mv,AlertTemplate:yv,PromptTemplate:bv,CustomTemplate:_v};var wv=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),JR=(t,e,r,o)=>{let n=wv(t,r,o),s=i=>n[i]>=e.height+8;return s("bottom")?"bottom":s("top")?"top":n.bottom>=n.top?"bottom":"top"},ZR=(t,e,r,o,n)=>{let s=wv(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},iu=(t,e,r)=>Math.max(e,Math.min(r,t)),rs=(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=iu((o-s.width)/2,8,Math.max(8,o-s.width-8)),h=iu((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=JR(t,s,o,n),a="start";else{let d=r.split("-");i=d[0],a=d[1]||"start",i=ZR(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=iu(c,8,f),l=iu(l,8,u),{left:c,top:l,side:i,align:a}},au=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 Ao={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:"70vh",theme:"modal"},QR=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}},Ly=t=>t?.getRoot?.()?.DropdownRoot||null,tP=0,eP=()=>`dropdown_${++tP}_${Date.now().toString(36)}`;function Sv(t={}){let e=Ly(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||QR(r);if(!o)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let n=t.id||eP(),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||Ao.placement,trigger:t.trigger||Ao.trigger,offset:t.offset??Ao.offset,minWidth:t.minWidth||Ao.minWidth,maxWidth:t.maxWidth||Ao.maxWidth,maxHeight:t.maxHeight||Ao.maxHeight,theme:t.theme||Ao.theme,background:t.background||null,round:t.round||null,onOpen:t.onOpen,onClose:t.onClose,triggerEl:s},a=e.state?.layer;if(a?.onClose)try{a.onClose(a)}catch(c){console.warn("[dropdown] prev onClose threw:",c)}if(e.state.update({layer:i}),typeof i.onOpen=="function")try{i.onOpen(i)}catch(c){console.warn("[dropdown] onOpen threw:",c)}return n}function kv(t){let e=Ly(this);if(!e)return;let r=e.state?.layer;r&&e.state.update({layer:{...r,inert:!!t}})}function Za(t){let e=Ly(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 rP=`
|
|
104
|
+
@keyframes smbls-dropdown-fade-in {
|
|
105
|
+
from { opacity: 0; transform: var(--smbls-dropdown-from, translateY(-6px)) scale(0.98); }
|
|
106
|
+
to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
|
|
107
|
+
}
|
|
108
|
+
[data-smbls-dropdown="panel"][data-smbls-open="true"] {
|
|
109
|
+
animation: smbls-dropdown-fade-in 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
|
|
110
|
+
transform-origin: top center;
|
|
111
|
+
}
|
|
112
|
+
[data-smbls-dropdown="panel"][data-smbls-surface] {
|
|
113
|
+
background: var(--smbls-dropdown-surface) !important;
|
|
114
|
+
}
|
|
115
|
+
[data-smbls-dropdown="panel"] {
|
|
116
|
+
/* The panel is a pure positioning shell \u2014 menu BODIES own their card
|
|
117
|
+
chrome (padding/round/border via e.g. CanvasCreateMenuBody), so the
|
|
118
|
+
panel itself stays chromeless. !important for the same reason as the
|
|
119
|
+
surface rule above: the theme prop re-emits border longhands inline
|
|
120
|
+
on every re-render and would beat any declarative zero
|
|
121
|
+
(2026-06-10 per Nika "remove Panel border and padding"). */
|
|
122
|
+
border-width: 0 !important;
|
|
123
|
+
padding: 0 !important;
|
|
124
|
+
}
|
|
125
|
+
`,oP=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let t=document.createElement("style");t.id="smbls-dropdown-css",t.textContent=rP,document.head.appendChild(t)},vv=(t,e)=>{if(!t.node)return;let r=e?.background;if(!r){t.node.removeAttribute("data-smbls-surface");return}let o=/^[a-z][\w.+-]*$/i.test(r)?`var(--color-${r})`:r;t.node.style.setProperty("--smbls-dropdown-surface",o),t.node.setAttribute("data-smbls-surface","")},nP=t=>{t.node&&(t.node.style.animation="none",t.node.offsetWidth,t.node.style.animation="smbls-dropdown-fade-in 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both")},Cv={tag:"div",attr:{"data-smbls-dropdown-root":"true"},position:"fixed",inset:"0",zIndex:"1500",pointerEvents:"none",state:{layer:null},onInit:t=>{if(oP(),typeof window>"u")return;let e=o=>{o.key==="Escape"&&t.state?.layer&&(o.preventDefault(),Za.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}Za.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 rs(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 rs(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":au(rs(e.anchor,r,e.placement).side)}},minWidth:t=>t.parent?.layer?.minWidth||"180px",maxWidth:t=>t.parent?.layer?.maxWidth||"90vw",maxHeight:t=>t.parent?.layer?.maxHeight||"70vh",overflow:"auto",overscrollBehavior:"contain",padding:"0",round:t=>t.parent?.layer?.round||"Z",theme:t=>t.parent?.layer?.theme||"modal",border:"none",borderWidth:"0",shadow:"overlay",pointerEvents:t=>{let e=t.parent?.layer;return e?e.inert?"none":"auto":"none"},opacity:t=>t.parent?.layer?"0.999":"0",onClick:t=>t.stopPropagation(),onInit:t=>{let e=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)}vv(t,r),nP(t),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{if(!t.node)return;vv(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=rs(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",au(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=rs(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",au(s.side))}}}};var My=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)},Ev={position:"relative",onClick:(t,e)=>{(e.dropdownTrigger||"click")==="click"&&(t.preventDefault(),t.stopPropagation(),My(e))},onFocus:(t,e)=>{e.dropdownTrigger==="focus"&&My(e)},onMouseenter:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&clearTimeout(e._hoverTimer),e._hoverTimer=setTimeout(()=>My(e),120))},onMouseleave:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&(clearTimeout(e._hoverTimer),e._hoverTimer=null),e._closeTimer=setTimeout(()=>e.call("closeDropdown"),250))}};var Av={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"},Tv={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"}}},Ov={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},Rv={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()}}},Pv={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 Iv={DropdownRoot:Cv,DropdownTrigger:Ev,Dropdown:Av,DropdownList:Tv,DropdownParent:Ov,DropdownParentFocus:Rv,DropdownSiblingFocus:Pv};var Dv={openDropdown:Sv,closeDropdown:Za,setDropdownInert:kv};var sP=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),iP=(t,e,r,o,n)=>{let s=sP(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},$v=(t,e,r)=>Math.max(e,Math.min(r,t)),cu=(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=iP(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=$v(i,6,o-e.width-6),a=$v(a,6,n-e.height-6),{left:i,top:a,side:s}},Lv=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 aP=`
|
|
126
|
+
@keyframes smbls-tooltip-fade-in {
|
|
127
|
+
from { opacity: 0; transform: var(--smbls-tooltip-from, translateY(-4px)); }
|
|
128
|
+
to { opacity: 1; transform: translate3d(0, 0, 0); }
|
|
129
|
+
}
|
|
130
|
+
[data-smbls-tooltip="panel"][data-smbls-open="true"] {
|
|
131
|
+
animation: smbls-tooltip-fade-in 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
|
|
132
|
+
}
|
|
133
|
+
`,cP=()=>{if(typeof document>"u"||document.getElementById("smbls-tooltip-css"))return;let t=document.createElement("style");t.id="smbls-tooltip-css",t.textContent=aP,document.head.appendChild(t)},Mv={tag:"div",attr:{"data-smbls-tooltip-root":"true"},position:"fixed",inset:"0",zIndex:"2500",pointerEvents:"none",state:{tip:null},onInit:()=>{cP()},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 cu(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 cu(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":Lv(cu(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 lP=t=>{t.tooltipText&&t.call("openTooltip",{anchorEl:t,text:t.tooltipText,placement:t.tooltipPlacement||"bottom",theme:t.tooltipTheme,id:t.tooltipId||t.key})},Fv=t=>{t._tooltipHideTimer&&(clearTimeout(t._tooltipHideTimer),t._tooltipHideTimer=null),!t._tooltipShowTimer&&(t._tooltipShowTimer=setTimeout(()=>{t._tooltipShowTimer=null,lP(t)},t.tooltipDelay??250))},Nv=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))},jv={onMouseenter:(t,e)=>Fv(e),onMouseleave:(t,e)=>Nv(e),onFocus:(t,e)=>Fv(e),onBlur:(t,e)=>Nv(e)};R();var Bv={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=>mt(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)}},Uv={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)}},Vv={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 Hv={TooltipRoot:Mv,TooltipTrigger:jv,Tooltip:Bv,TooltipHidden:Uv,TooltipParent:Vv};var zv={placement:"bottom",theme:"tooltip .quaternary",delay:250,hideDelay:100},fP=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}},Wv=t=>t?.getRoot?.()?.TooltipRoot||null,uP=0,dP=()=>`tooltip_${++uP}_${Date.now().toString(36)}`;function qv(t={}){let e=Wv(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||fP(r);if(!o)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let n=t.id||dP(),s={id:n,text:t.text||"",anchor:o,placement:t.placement||zv.placement,theme:t.theme||zv.theme};return e.state.update({tip:s}),n}function Kv(t){let e=Wv(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 Gv={openTooltip:qv,closeTooltip:Kv};var Yv=t=>!!(t&&typeof t=="object"&&t.__isStub===!0),pP=(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(!Yv(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)},hP=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||Fn,e.cssPropsRegistry=bt,e.window=Y0(e),e.sharedLibraries&&e.sharedLibraries.length){if(e.sharedLibraries.some(g=>typeof g=="string"||Yv(g))){e.sharedLibraries=pP(e.sharedLibraries,e.symbolsConfig);let{resolveSharedLibraries:g}=await Promise.resolve().then(()=>(R(),fl));e.sharedLibraries=await g(e.sharedLibraries,{apiBaseUrl:uy()})}q0(e.sharedLibraries),ik(e)}let[s,i]=ok(n,e);e.designSystem=s,e.registry=i,e.cases||(e.cases={}),e.shorthand&&$a.prepareContext(e);let a=nk(t,e);if(e.state=a,ri(a),e.pages=sk(t,e),e.components=X0(e),e.utils=J0(e),xr[e.packageManager]&&(e.dependencies=await Q0(e)),e.methods=Z0(e),e.routerOptions=jS(t,e),e.defaultExtends=[gf],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=ks(e.globalScope));let c=(h,g)=>{let p=g?h[g]:h;if(!S(p))return;let m=ie(p);try{Object.assign(p,m)}catch(_){if(g)h[g]=m;else throw _}};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(Bn);for(let h in Ua)typeof e.functions[h]!="function"&&(e.functions[h]=Ua[h])}if(f("helmet")||e.plugins.push(Fm),e.fetch&&!f("fetch")&&e.plugins.push(yp),e.designSystem?.typography?.useCapsize!==!1&&!f("capsize")&&(e.plugins.push(Tf),e.cssPropsRegistry.useCapsize=Um),e.shorthand&&!f("shorthand")&&e.plugins.push($a),e.analyze&&!f("analyze")){let h=e.analyze===!0?{}:e.analyze;e.analyze=jf(h),e.plugins.push(Vn)}e.sync!==!1&&!f("sync")&&e.plugins.push(rv),e.inspect&&!f("inspect")&&e.plugins.push(ly),(e.notifications===!0||e.editor&&e.editor.verbose===!0)&&e.notifications!==!1&&!f("notifications")&&e.plugins.push(ov);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",xv,Hr),d("dropdown",Iv,Dv),d("tooltip",Hv,Gv),e},Fy=async(t,e)=>{S(e)||(e={}),Ye(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 hP(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=JS(t,e),e.router!==!1&&(t.routes=e.pages),t.state=e.state,t.context=e,t.data=t.data||{},e.skipDesignSystemInit||await tk({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 gP(ee,t,i,e,r,n);let a=ee(t,i,e.key,{verbose:e.verbose,context:e,...e.domqlOptions});return typeof window<"u"&&!e.document&&(window.__smblsApp=a),a},gP=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 mP(n),c},mP=t=>{t&&(delete t.__BRENDER__,delete t.__BR_REGISTRY__)};var Ny=(t,e)=>nt(t,S(e)?e:{}),yP=t=>{if(typeof document>"u")return;let e=t.themeRoot||t.document&&t.document.documentElement||document.documentElement;if(!e||typeof e.setAttribute!="function")return;let r=t.globalTheme||"auto";try{if(typeof window<"u"&&window.location){let s=new URLSearchParams(window.location.search).get("globalTheme");s&&(r=s)}}catch{}let o=t.themeStorageKey;if(r==="auto"&&o&&typeof localStorage<"u")try{let s=localStorage.getItem(o);s&&(r=s)}catch{}let n=r==="auto"?(()=>{try{return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}})():r;e.setAttribute("data-theme",n),t.globalTheme=r,t.themeRoot=e},bP=()=>{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}},Xv=t=>{let e=bP();e&&(t.editor||(t.editor={}),t.editor.runtime||(t.editor.runtime=e),e==="runner"&&typeof t.editor.livesync>"u"&&(t.editor.livesync=!0))},jy=(t,e=Mr,r)=>{let o={...Mr,...Ny(e,r)};return Xv(o),yP(o),Fy(t,o).then(s=>{if($m(s,o),s.destroy=()=>ka(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Sa(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})},_P=(t,e=Mr,r)=>{let o=jy(t,e,r),n={...Mr,...Ny(e,r)},s=n.key;return HS(o,s,{utils:wa,...n}),o},xP=async(t,e=Mr,r)=>{let o={...Mr,...Ny(e,r)};Xv(o);let n=e.key;await VS(n,o);let s=await Fy(t,o);return $m(s,o),s.destroy=()=>ka(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Sa(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},wP=(t={},e=Mr,r)=>jy({deps:{isUndefined:Et},...t},nt({domqlOptions:{onlyResolveExtends:!0}},e),r);wf(ia);H0(void 0,{smbls:By});
|