smbls 3.14.786 → 3.14.787

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/smbls.cjs CHANGED
@@ -1,59 +1,59 @@
1
- "use strict";var 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+=`[
1
+ "use strict";var eC=Object.create;var tc=Object.defineProperty;var rC=Object.getOwnPropertyDescriptor;var oC=Object.getOwnPropertyNames;var nC=Object.getPrototypeOf,sC=Object.prototype.hasOwnProperty;var j=(t,e)=>()=>(t&&(e=t(t=0)),e);var Iu=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),P=(t,e)=>{for(var r in e)tc(t,r,{get:e[r],enumerable:!0})},yb=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of oC(e))!sC.call(t,n)&&n!==r&&tc(t,n,{get:()=>e[n],enumerable:!(o=rC(e,n))||o.enumerable});return t};var iC=(t,e,r)=>(r=t!=null?eC(nC(t)):{},yb(e||!t||!t.__esModule?tc(r,"default",{value:t,enumerable:!0}):r,t)),aC=t=>yb(tc({},"__esModule",{value:!0}),t);var Ju,Zu,v,et,us=j(()=>{"use strict";Ju=globalThis,Zu=globalThis,v=globalThis,et=v.document});var Ye,ds,Ut,ps=j(()=>{"use strict";us();Ye=t=>(typeof Node=="object"?t instanceof v.Node:t&&typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.nodeName=="string")||!1,ds=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,dc,pc,O,hc,z,mt,Et,hs,Vt,Qu,At=j(()=>{"use strict";ps();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",dc=t=>t===!0||t===!1,pc=t=>t===null,O=t=>Array.isArray(t),hc=t=>t instanceof Date,z=t=>t===null?!1:typeof t=="object",mt=t=>t!==void 0,Et=t=>t===void 0,hs={boolean:dc,array:O,object:S,string:w,date:hc,number:Le,null:pc,function:A,objectLike:z,node:Ye,htmlElement:ds,defined:mt},Vt=t=>(...e)=>e.some(r=>hs[r](t)),Qu=t=>(...e)=>!e.some(r=>hs[r](t))});var td,ed,rd,od,Fo,gs,nd,sd,ms,id,ad,cd,ld,fd,ud,dd,No,ys,jo=j(()=>{"use strict";Xe();At();td=(t,e)=>e.every(r=>t.includes(r)),ed=(t,e)=>{let r=0;for(let o=0;o<t.length;o++)t[o]===e&&r++;return r},rd=(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},od=(t,e,r)=>{e<0||r<0||e>=t.length||r>=t.length||([t[e],t[r]]=[t[r],t[e]])},Fo=(...t)=>[].concat(...t),gs=(t,e=[])=>t.reduce((r,o)=>nt(r,ut(o,{exclude:e}),e),{}),nd=(t,e)=>{let r=t.indexOf(e);return r!==-1?t.slice(0,r):t},sd=(t,e)=>{if(!O(t))return;let r=t.indexOf(e);return r!==-1?t.slice(r+1):t},ms=(t,e)=>{let r=t.indexOf(e);if(r>-1){let o=[...t];return o.splice(r,1),o}return t},id=(t,e)=>t.filter(r=>r!==e),ad=(t,e)=>{let r=[];for(let o=0;o<t.length;o++)r.push(t[o]),o<t.length-1&&r.push(e);return r},cd=(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},ld=(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},fd=(t,e)=>t.filter(r=>!e.includes(r)),ud=(t,e)=>{let r=new Set(e);return t.filter(o=>!r.has(o))},dd=(t,e)=>{if(!t)return 0;let r=0;for(let o=0;o<e.length;o++)t.includes(e[o])&&r++;return r},No=t=>O(t)?[...new Set(t)]:t,ys=(t,e)=>{for(let r in e)Object.defineProperty(t,r,{value:e[r],enumerable:!1,configurable:!0,writable:!0})}});function Gr(t,e,r={}){let{bracketsLength:o=2}=r,n=o===3?"{{{":"{{";if(!t.includes(n))return t;let s=vC[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=bs(g,d);return String(p??"")}else{let h=bs(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=bs(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=bs(x,d);if(k!=null&&typeof k!="object")return String(k)}}}let _=bs(g.translations,d);if(_!=null&&typeof _!="object")return String(_)}return""}})}var _s,pd,vC,bs,Yr,hd,CC,gd,md,yd,EC,bd,_d,xs=j(()=>{"use strict";_s=(t,e)=>{for(let r of e)if(t.includes(r))return!0;return!1},pd=(t,e)=>{let r=new RegExp(`[${e.join("\\")}]`,"g");return t.replace(r,"")},vC={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},bs=(t,e)=>e.split(".").reduce((r,o)=>r?.[o],t);Yr=t=>`${t.charAt(0).toLowerCase()}${t.slice(1)}`,hd=(t,e)=>{let r=t.split(`
2
+ `),o=-1,n=-1,s=-1,i=-1,a=new RegExp(`\\b${e}\\b\\s*:\\s*`),c=0,l=!1;for(let f=0;f<r.length;f++)if(a.test(r[f])&&!l){if(l=!0,o=f+1,s=r[f].indexOf(e)+1,r[f].includes("{}")){n=o,i=r[f].indexOf("{}")+3;break}let u=r[f].slice(s+e.length);if(u.includes("{")||u.includes("["))c=1;else{n=f+1,i=r[f].length+1;break}}else if(l&&(c+=(r[f].match(/{/g)||[]).length,c+=(r[f].match(/\[/g)||[]).length,c-=(r[f].match(/}/g)||[]).length,c-=(r[f].match(/]/g)||[]).length,c===0)){n=f+1,i=r[f].lastIndexOf("}")!==-1?r[f].lastIndexOf("}")+2:r[f].length+1;break}return{startColumn:s,endColumn:i,startLineNumber:o,endLineNumber:n}},CC=/\\([0-7]{1,3})/g,gd=t=>t.replace(CC,(e,r)=>String.fromCharCode(parseInt(r,8))),md=t=>t.replace(/\n/g,"/////n").replace(/`/g,"/////tilde").replace(/\$/g,"/////dlrsgn"),yd=t=>t.replace(/\/\/\/\/\/n/g,`
3
+ `).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),EC=/[^a-zA-Z0-9\s]/g,bd=t=>t.replace(EC,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),_d=t=>t.replace(/%[0-9A-Fa-f]{2}/g,e=>String.fromCharCode(parseInt(e.slice(1),16)))});var hr,ws,xd,Xr,gr,Bo,Ss,wd,Uo=j(()=>{"use strict";hr=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"]),ws=new Set(["attr","style","text","html","content","data","class","state","scope","children","props","if","key","tag","query","on","context"]),xd=["ref","parent","__element","__depends","__ref","__children","root"],Xr=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"]),gr=new Set(["update","__element"]),Bo=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"]),Ss=new Set(["node","context","extends","__element","__ref",...Bo,...Xr,...gr]),wd=new Set(["init","beforeClassAssign","render","renderRouter","attachNode","stateInit","stateCreated","beforeStateUpdate","stateUpdate","beforeUpdate","done","create","complete","frame","update","fetchError","fetchComplete"])});var Rb,Jr,ct,Sd,pt,nt,Db,kd,ut,ks,AC,vs,TC,OC,RC,Me,PC,IC,Pb,ie,DC,$C,$b,Lb,Ib,Cs,vd,Cd,gc,Ed,Ad,Es,Zr,Ht,mc,LC,Td,Od,yc,Rd,Pd,Id,Dd,$d,Ld,Md,Xe=j(()=>{"use strict";us();At();jo();xs();ps();Uo();Rb="production",Jr=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},Sd=(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)&&(Jr(n)||(o?r.has(n):r.includes(n))||t[n]===void 0&&(t[n]=e[n]));return t},nt=(t,e,r=Ss)=>Db(t,e,r,null),Db=(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)||Jr(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),Db(i,a,r,c),c.length-=2}else i===void 0&&(t[s]=a)}return t},kd=(t,e=[])=>{let r=e instanceof Set,o={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(Jr(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)||Jr(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]=gs(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},ks=(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]={},ks(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]={},ks(i,n[s])):A(i)?n[s]=i.toString():n[s]=i}}else e[r]=o}return e},AC=new Set(["&","*","-",":","%","{","}",">","<","@",".","/","!"," "]),vs=(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(AC.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
5
  `;for(let l of i)l instanceof RegExp?n+=`${o} ${String(l)},
6
- `:z(l)&&l!==null?n+=`${o} ${Ss(l,e+2)},
6
+ `:z(l)&&l!==null?n+=`${o} ${vs(l,e+2)},
7
7
  `:w(l)?n+=`${o} '${l}',
8
8
  `:n+=`${o} ${l},
9
- `;n+=`${o} ]`}else z(i)?n+=Ss(i,e+1):w(i)?n+=ys(i,[`
9
+ `;n+=`${o} ]`}else z(i)?n+=vs(i,e+1):w(i)?n+=_s(i,[`
10
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
+ `}return n+=`${o}}`,n},TC=[/^\(\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]*\}$/],OC=/^["[{]/,RC=/^(export|import)\s/,Me=t=>{if(!t)return!1;let e=t.trim().replace(/\n\s*/g," ").trim();if(e===""||e==="{}"||e==="[]"||RC.test(e)||!TC.some(s=>s.test(e)))return!1;let o=e.charCodeAt(0),n=e.includes("=>");return!(o===123&&!n||o===91||OC.test(e)&&!n)},PC=t=>(0,eval)(t),IC=(t,e)=>{let r=/^(\s*(?:async\s+)?function\s*[\w$]*\s*\([^)]*\)\s*)\{/.exec(t);if(!r)return null;let o=r[0].length,n=[],s=o,i=1,a=null,c=t.length,l=new RegExp("^(?:const|let|var)\\s+"+e+"\\b");for(;s<c&&i>0;){let u=t[s];if(u==="/"&&t[s+1]==="/"){let d=t.indexOf(`
12
12
  `,s);s=d===-1?c:d;continue}if(u==="/"&&t[s+1]==="*"){let d=t.indexOf("*/",s+2);s=d===-1?c:d+2;continue}if(u==='"'||u==="'"||u==="`"){let d=u;for(s++;s<c;){if(t[s]==="\\"){s+=2;continue}if(t[s]===d){s++;break}if(d==="`"&&t[s]==="$"&&t[s+1]==="{"){s+=2;let h=1;for(;s<c&&h>0;)t[s]==="{"?h++:t[s]==="}"&&h--,s++;continue}s++}continue}if(u==="{"){i++,s++;continue}if(u==="}"){i--,s++;continue}if(i===1&&l.test(t.slice(s))){let d=s,h=0,g=s;for(;g<c;){let p=t[g];if(p==='"'||p==="'"||p==="`"){let m=p;for(g++;g<c;){if(t[g]==="\\"){g+=2;continue}if(t[g]===m){g++;break}g++}continue}if(p==="("||p==="["||p==="{"){h++,g++;continue}if(p===")"||p==="]"||p==="}"){if(h===0)break;h--,g++;continue}if(h===0&&(p===";"||p===`
13
- `)){g++;break}g++}n.push([d,g]),s=g;continue}s++}if(!n.length)return null;let f=t;for(let u=n.length-1;u>=0;u--)f=f.slice(0,n[u][0])+f.slice(n[u][1]);return f},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(`
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},Pb=(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=IC(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:PC}})=>{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]=Pb(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)?Pb(f,`array index ${l} (prop "${i}")`,r):f);else if(S(f)){let u=Ib(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=Ib(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},DC="Set",$C="Map",$b="RegExp",Lb=t=>{if(!t||typeof t!="object")return t;if(t.__type===DC&&Array.isArray(t.values))return new Set(t.values);if(t.__type===$C&&Array.isArray(t.entries))return new Map(t.entries);if(t.__type===$b&&w(t.source))try{return new RegExp(t.source,w(t.flags)?t.flags:"")}catch{return t}return t},Ib=t=>{if(!t||typeof t!="object"||t.__type!==$b)return null;let e=Lb(t);return e instanceof RegExp?e:null},Cs=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]=Lb(a)}if(r.length===0)return e;let o=i=>/^[A-Za-z_$][\w$]*$/.test(i),n=r.filter(([i])=>o(i)),s=Object.keys(e).filter(o).map(i=>`var ${i} = __gs__[${JSON.stringify(i)}];`).join(`
15
15
  `);try{let i=n.map(([l,f])=>`var ${l} = (${f});`).join(`
16
16
  `),a="{ "+n.map(([l])=>`${JSON.stringify(l)}: ${l}`).join(", ")+" }",c=v.eval(`(function(__gs__) { ${s}
17
17
  ${i}
18
18
  return ${a}; })`)(e);Object.assign(e,c)}catch{for(let[a,c]of n)try{let l=Object.keys(e).filter(o).map(f=>`var ${f} = __gs__[${JSON.stringify(f)}];`).join(`
19
19
  `);e[a]=v.eval(`(function(__gs__) { ${l}
20
- return (${c}); })`)(e)}catch{try{e[a]=v.eval(`(${c})`)}catch{e[a]=c}}}for(let[i,a]of r)if(!o(i))try{e[i]=v.eval(`(${a})`)}catch{e[i]=a}return e},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)}
20
+ return (${c}); })`)(e)}catch{try{e[a]=v.eval(`(${c})`)}catch{e[a]=c}}}for(let[i,a]of r)if(!o(i))try{e[i]=v.eval(`(${a})`)}catch{e[i]=a}return e},vd=(t,e={verbose:!0})=>{try{return t?v.eval("("+t+")"):{}}catch(r){e.verbose&&console.warn(r)}},Cd=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),gc=t=>{for(let e in t)return!1;return!0},Ed=t=>S(t)&&gc(t),Ad=()=>Object.create(null),Es=(t,e,r={})=>{let o=r.exclude||[],n=r.preventUnderscore;for(let s in e)o.includes(s)||!n&&Jr(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},Zr=(t,e,r=[])=>{let o=r instanceof Set;for(let n in e)Jr(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&&Jr(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},mc=(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)||!mc(t[i],e[i],r))return!1}return!0},LC=new Set(["node","__ref"]),Td=(t,e,r=LC)=>{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)},Od=(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},yc=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]=yc(t[r]));return e},Rd=(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},Pd=(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]},Id=(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},Dd=(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},$d=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(Rb==="test"||Rb==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",r),!0},Ld=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)},Md=(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 As,Ts,Os,bc=j(()=>{"use strict";Xe();As=(function(){let t=0;function e(){return t++,t}return e})(),Ts=As,Os=(t,e,r)=>(ct(r,t)||r||t.key||As()).toString()});var Se,Fd,mr,_c,Nd,jd,Bd,yr,Ud,Qr,Ot,Vd=j(()=>{"use strict";Se="production",Fd=Se,mr=(t=Se)=>t==="production",_c=(t=Se)=>t==="testing"||t==="test",Nd=_c,jd=(t=Se)=>t==="staging",Bd=(t=Se)=>t==="local",yr=(t=Se)=>t==="development"||t==="dev"||t==="local",Ud=(t,e=Se)=>e[t],Qr=(t=Se)=>!mr(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 Rs(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 qd(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 Hd,zd,MC,Wd,Vo,Ho,Ct,zo=j(()=>{"use strict";Hd=(t,e,r=300)=>{let o;return(...n)=>{clearTimeout(o),o=setTimeout(()=>{e.apply(t,n)},r)}},zd=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}}},MC=/^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/,Wd=t=>MC.test(t),Vo=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let r of e)if(r.resolveHandler)return!0;return!1},Ho=(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 Kd,Mb=j(()=>{"use strict";At();Xe();Kd=(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 Gd,Yd,Fb=j(()=>{"use strict";Gd=(t,...e)=>{t&&e.map(r=>console.log(r))},Yd=(t,e,...r)=>{t&&(console.group(e),r.map(o=>console.log(o)),console.groupEnd(e))}});function tp(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 ep(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 Xd,Jd,Zd,Qd,Nb=j(()=>{"use strict";At();us();Xd=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),Jd=(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=/`},Zd=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""},Qd=t=>{Et(et)||Et(et.cookie)||(et.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var Wo,jb,rp,op=j(()=>{"use strict";Wo={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"])},jb=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"]),rp=t=>Wo.body.has(t)});var np,Bb,qo,Ds,zt,sp,xc,$s,ip,Ls,wc,Sc,Ms,kc,Ko,FC,Fe,Ub,Ps,Fs,ap,Is,cp,lp,vc,Cc,Ec,Ac,Tc,Oc,Vb,Rc=j(()=>{"use strict";jo();fp();Xe();At();np="production",Bb=t=>t.sourcemap!==!1&&np!=="production",qo=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]},Ds=(t,e,r)=>{let o=[],n=qo(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},sp=(t,e)=>{if(!t)return e;let{extends:r}=e,o=O(r)?r:[r],n=O(t)?t:[t];return{...e,extends:Fo(n,o)}},xc=()=>Math.random().toString(36).substring(2),$s={},ip={},Ls=t=>$s[t.__hash],wc=(t,e)=>{let r=xc();return w(t)||(t.__hash=r),r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&($s[r]=e),e},Sc=(t,e)=>t.__hash?e.concat(Ls(t)):wc(t,e),Ms=(t,e,r,o=new Set,n,s)=>{for(let i of t)O(i)?Ms(i,e,r,o,n,s):Ko(i,e,r,o,n,void 0,s);return e},kc=(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&&Ko(a,e,r,o,n,s,i),e},Ko=(t,e,r,o=new Set,n,s,i)=>{if(!t||o.has(t))return e;if(O(t))return Ms(t,e,r,o,n,i);let a=s;return w(t)?(a=t,t=Fs(t,r)):i&&S(t)&&i.has(t)&&(a=i.get(t)),o.add(t),t?.extends?kc(t,e,r,o,n,a,i):t&&(e.push(t),n&&n.push(a)),e},FC=new Set(["parent","node","__ref","__proto__","extends","childExtends","childExtendsRecursive"]),Fe=(t,e,r,o,n)=>{e=ut(e);for(let s in e){if(FC.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]||{},Ub(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},Ub=(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]||{},Ub(t[n],s,r,o)):t[n]=r}}},Ps=(t,e,r)=>t.reduce((o,n,s)=>{let i=ut(n),a=r?r[s]:void 0;return Fe(o,i,e,a)},{}),Fs=(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&&(np==="test"||np==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},ap=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),Is=(t,e,r,o)=>{if(!t)return[];if(t.__hash)return Ls(t)||[];let s=Ko(t,[],e,new Set,r,void 0,o);return r?s:Sc(t,s)},cp=(t,e)=>{if(!t)return e;let r=O(t)?t:[t];return Fo(r,e)},lp=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},vc=(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 Cc(t,e,r),Ec(t,e,r),Ac(t,e,r),t.component&&zt(ct(t.component,t),t),n.defaultExtends&&zt(n.defaultExtends,t),No(o.__extends)},Cc=(t,e,r={})=>{let{__ref:o}=t;return r.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&zt(e.childProps.extends,t),o.__extends},Ec=(t,e,r={})=>{let{__ref:o}=t,n=r.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!n&&s&&zt(s,t),o.__extends},Ac=(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},Tc=(t,e,r={})=>{let{__ref:o}=t,n=t.context||e.context,s=t.variant,i=Bb(r),a=i?[...o.__extends]:null,c=No(o.__extends.map((l,f)=>Fs(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=Is(c,n,f,l);o.__extendsStack=u,o.__extendsNames=f}else{let l=Is(c,n);o.__extendsStack=l}return o.__extendsStack},Oc=(t,e,r={})=>{let{__ref:o}=t,{__extendsStack:n}=o;if(Bb(r)){let s={},i=o.__extendsNames||[],a=Ps(n,s,i),c={};Fe(t,a,c,void 0,s),o.__sourcemap=c}else{let s=Ps(n);Fe(t,s)}return t},Vb=(t,e,r={})=>(vc(t,e,r),Tc(t,e,r),Oc(t,e,r),t)});function up(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function dp(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function pp(t,e,r){let{context:o}=e||{},[n]=qo(r),s=r||n;return o?.components?.[s]||o?.pages?.[s]}var Ne,fp=j(()=>{"use strict";Rc();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=Yr(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 zb=j(()=>{"use strict";xs();At()});function Pc(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&&Vo(this.context))){let g=Yr(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(qb.has(u)){t.props[o]=n,delete t[o],r.push(o);continue}let d=hp.test(o)||Wb.test(o)||jC(n),h=hr.has(o);!d&&!h&&(o in t.props||(t.props[o]=n),delete t[o],r.push(o))}return t}function Ic(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&&Vo(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(qb.has(a))continue;let c=this.define?.[o],l=this.context?.define?.[o],f=S(c)||A(c),u=S(l)||A(l),d=hp.test(o)||Wb.test(o),h=hr.has(o);(d||h||f||u)&&(t[o]===void 0||n===null)&&(t[o]=n,t.props&&delete t.props[o])}return t}function Dc(t=this){let e=[];return Pc.call(this,t,{cachedKeys:e}),Ic.call(this,t,{cachedKeys:e}),t}function gp(t={}){return t.on||(t.on={}),t.props||(t.props={}),Dc.call(this,t)}function yp(t,e){this.__element.update({props:t},e)}function Vs(t){let e={update:yp.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var hp,Wb,qb,NC,jC,Bs,Ns,mp,Us,Hs,zs,$c,js,bp,_p,xp=j(()=>{"use strict";Uo();zb();Xe();At();xs();zo();hp=/^[A-Z]/,Wb=/^\d+$/,qb=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),NC=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),jC=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if(NC.has(e)||hp.test(e))return!0;return!1},Bs=(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),{})};Ns=t=>Vt(t)("string","number")?{inheritedString:t}:t,mp=(t,e)=>!t||!e.length?!1:e.includes(t),Us=(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=Ns(i);o.unshift(c)}if(s){let c=Ns(s);o.unshift(c)}return o};Hs=t=>{let e=new Set;return t.filter(r=>!r||gr.has(r)||e.has(r)?!1:(e.add(r),!0))},zs=(t,e,r)=>(e.props=t.reduce((o,n)=>{if(gr.has(n))return o;for(;A(n);)n=ct(n,e);return nt(o,ut(n,{exclude:gr}))},{}),Vs(e),e.props),$c=(t,e)=>{let{props:r,__ref:o}=t,n=o.__propsStack||[];if(e?.props&&(n=[...Us(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=Hs(n),o.__propsStack},js=(t,e)=>{let{__ref:r}=t,o=$c(t,e);o.length?zs(o,t):(r.__propsStack=[],t.props={})},bp=function(t,e,r){let{__ref:o}=t;if(o.__if)js(t,e);else try{js(t,e)}catch(n){t.context?.designSystem?.verbose&&console.warn("initProps error at",o.path?.join("."),n),t.props={},o.__propsStack=[]}return Vs(t),t},_p=(t,e,r)=>{let{__ref:o}=e,s=[...o.__propsStack||[]],i=Us(e,r);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),o.__propsStack=Hs(s),o.__propsStack.length&&zs(o.__propsStack,e),e}});var Kb,Lc,Mc,Fc,Nc,wp,jc,Bc,Uc,Sp,Gb=j(()=>{"use strict";Rc();bc();ps();xp();op();At();Kb="production",Lc=(t,e,r)=>{let o=e.childExtends&&e.childExtends.tag,n=e.childProps&&e.childProps.tag,s=Wo.body.has(r)&&r;return{text:t,tag:o||n||s||"string"}},Mc=(t,e,r)=>{if(t===void 0)return(Kb==="test"||Kb==="development")&&console.warn(r,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:Vt(t)("string","number")?Lc(t,e,r):A(t)?{props:t}:t},Fc=(t,e)=>{let r={};return r.origin=t,r.parent=e,r},Nc=(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},wp=(t,e)=>{let{__ref:r}=t,{__ref:o}=e,n=e&&e.key===":root";r?.root||(r.root=n?t:o?.root)},jc=(t,e,r)=>{let{__ref:o}=e;return o||(o=e.ref={}),o.path||(o.path=[]),o.path.concat(r)},Bc=(t,e,r,o,n)=>(o.context&&!n.context&&!t.context&&(n.context=o.context),o.context||e.context||n.context||t.context),Uc=(t,e,r)=>{let o=Fc(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=Ds(t,e,r),o.path=jc(t,e,r),o},Sp=(t,e,r,o,n)=>{let i=t?.__hash?{extends:[t]}:Mc(t,e,r);if(!i)return;let a=Nc(i,e,r,o,n),c=Os(i,a,r);Uc(i,a,c);let l=Bs(i,a,c),f=Bc(i,a,c,o,n),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var kp,Vc,Hc,zc,Wc,vp,qc,Cp,Ep,Ap,Tp,Yb=j(()=>{"use strict";jo();Uo();Xe();At();kp=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},Vc=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},Hc=(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},zc=(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]},Wc=(t,e,r={})=>{let n=t.__ref.__state;if(!qc(t))return;let s=Vc(n,e.state),i=e.state;if(s)i=s,n=n.replaceAll("~/","");else{let a=Hc(n,e.state);a&&(i=a,n=n.replaceAll("../",""))}if(i)return zc(n,i,r)},vp=(t,e)=>{let r=t.__ref,o=Wc(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",{})},qc=t=>{let{__ref:e}=t,r=e?.__state;return!!(r&&Vt(r)("number","string","boolean"))},Cp=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},Ep=(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},Ap=(t,e)=>{let{__element:r}=e,o=r?.state;if(!o)return;let n=ut(o,Xr),s={[t.key]:n},i=S(o.__depends)?{...o.__depends,...s}:s;return Array.isArray(o)?ys(o,{...Object.getPrototypeOf(o),__depends:i}):Object.setPrototypeOf(o,{...Object.getPrototypeOf(o),__depends:i}),n},Tp=(t,e,r={})=>{let{overwrite:o}=r;if(!o)return;let n=o==="shallow";if(o==="merge"){nt(t,e,Xr);return}(n?Zr:Ht)(t,e,Xr)}});var BC,Op,Xb=j(()=>{"use strict";BC=(t,e)=>{let r=e;for(;r;){if(r===t)return!0;r=Object.getPrototypeOf(r)}return!1},Op=(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&&!BC(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var Jb,Kc,br,Gc,Rp,Pp=j(()=>{"use strict";At();zo();Jb=(t,e)=>{let r="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[r]},Kc=(t,e,r,o,n)=>{if(t=Ho(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}},br=(t,e,r)=>{if(!e)throw new Error("Element is required");Ct(t,e,r);let o=Jb(t,e);if(o){let{state:n,context:s}=e;return Kc(o,e,n,s,r)}},Gc=(t,e,r,o,n,s)=>{if(t=Ho(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}},Rp=(t,e,r,o)=>{Ct(t,r,e,o);let n=Jb(t,r);if(n){let{state:s,context:i}=r;return Gc(n,e,r,s,i,o)}}});var Ip,Ws,Dp=j(()=>{"use strict";Ip={},Ws={}});var Qb={};P(Qb,{restAdapter:()=>Zb,setup:()=>VC});var UC,Je,VC,Zb,t_=j(()=>{"use strict";UC=(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}},VC=async({url:t,headers:e,auth:r,fetchOptions:o})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return Zb(t,e,r,o)},Zb=(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(UC(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 r_={};P(r_,{localAdapter:()=>e_,setup:()=>zC});var Yc,HC,zC,e_,o_=j(()=>{"use strict";Yc=(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},HC=(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}},zC=async({data:t,...e})=>e_(t,e),e_=(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=>Yc(p,u));return HC(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(Yc(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=>Yc(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--)Yc(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 eo={};P(eo,{createAdapter:()=>XC,default:()=>iE,executeFetch:()=>Qs,fetchPlugin:()=>jp,initAdapterAuth:()=>tl,parseDuration:()=>Gs,queryClient:()=>sE,registerAdapter:()=>YC,resolveDb:()=>a_});var WC,qC,Xc,Ks,Jc,Mp,KC,GC,YC,XC,a_,Gs,Mt,c_,qs,JC,Zs,Ys,Xs,Zc,Fp,Qc,ZC,n_,$p,l_,f_,Go,s_,QC,i_,tE,el,u_,d_,tl,Np,ae,ke,Js,to,je,_r,eE,rE,oE,Lp,nE,Qs,sE,jp,iE,xr=j(()=>{"use strict";R();WC=["select","rpc","insert","update","upsert","delete","subscribe"],qC={rest:()=>Promise.resolve().then(()=>(t_(),Qb)),local:()=>Promise.resolve().then(()=>(o_(),r_))},Xc=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),Ks=(()=>{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})(),Jc=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),Mp=(()=>{if(typeof globalThis<"u"&&globalThis[Jc])return globalThis[Jc];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Jc,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Jc]}catch{}return t})(),KC=5e3,GC=t=>new Promise(e=>{if(Ks[t])return e(Ks[t]);let r=Mp[t]||=[],o=!1,n=()=>{o||(o=!0,e(Ks[t]||null))};r.push(n),setTimeout(n,KC)}),YC=(t,e)=>{Ks[t]=e;let r=Mp[t];if(r&&r.length){Mp[t]=[];for(let o of r)o()}},XC=t=>{let e={};for(let r of WC)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},a_=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=Ks[o]||qC[o];if(!n&&(n=await GC(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)},Gs=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,c_=new Map,qs=new Map,JC=(t,e,r)=>{if(t.cache?.key)return t.cache.key;let o=tE(t.params),n=r?`${r}:`:"",s=`${t.from}:${t.method}:${n}${JSON.stringify(o||"")}`;return e?`${s}:${e}`:s},Zs=t=>Mt.get(t)||null,Ys=(t,e,r)=>{let o=Mt.get(t),n={data:e,error:r,time:Date.now(),stale:!1};Mt.set(t,n);let s=c_.get(t);if(s)for(let i of s)A(i)&&i(n);return n},Xs=t=>{if(t){let e=Mt.get(t);e&&(e.stale=!0);return}for(let[,e]of Mt)e.stale=!0},Zc=t=>{if(t){Mt.delete(t);return}Mt.clear()},Fp=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:Gs(t),gcTime:3e5}:{staleTime:Gs(t.stale||t.staleTime)||6e4,gcTime:Gs(t.gc||t.gcTime||t.expire)||3e5,key:t.key},Qc=null,ZC=()=>{Qc||(Qc=setInterval(()=>{let t=Date.now();for(let[e,r]of Mt){let o=c_.get(e);!(o&&o.size>0)&&t-r.time>(r.gcTime||3e5)&&Mt.delete(e)}},3e4),Qc.unref&&Qc.unref())};ZC();n_=3,$p=t=>Math.min(1e3*2**t,3e4),l_=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:n_,delay:$p}:typeof e=="number"?{count:e,delay:$p}:{count:e.count??n_,delay:A(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:$p}},f_=async(t,e)=>{let{count:r,delay:o}=e,n;for(let s=0;s<=r;s++)try{let i=await t();if(i?.error){if(n=i.error,s<r){let a=A(o)?o(s,n):o;await new Promise(c=>setTimeout(c,a));continue}return i}return i}catch(i){if(n=i,s<r){let a=A(o)?o(s,i):o;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:n}},Go={focus:new Set,online:new Set},s_=!1,QC=()=>{if(s_||typeof window>"u")return;s_=!0;let t=()=>{for(let r of Go.focus)r()},e=()=>{for(let r of Go.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},i_=(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},tE=t=>(!t||A(t),t),el=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},u_=(t,e)=>{let o=(t?.state?.root||e?.state?.root)?.__fetchScope;return o?String(o):void 0},d_=(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},tl=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)})},Np=async(t,e)=>{if(A(t.select))return t.auth!==!1&&await tl(t,e),t;if(t.__resolved)return t.auth!==!1&&await tl(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=a_(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 tl(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)},Js=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},to=(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)},_r=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 Np(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=d_(f,e,r),N=Fp(u),St=l_(t),Dt=el(e,r),xe=u_(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;Ys(L,at,null)}if((c==="select"||c==="rpc")&&L&&N){let at=Zs(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)),to(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&&to(e,tt,m)}}if(L&&qs.has(L)&&!o.force){let at=qs.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)),to(e,_t,m),ae(e,"onFetchComplete",_t),ke(t,e,"onFetchComplete",_t)}}catch{}return}let W=!Zs(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 mb=f_(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=el(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=Js(e);else if(O(p)){let $t=Js(e);q={};for(let Pu of p)q[Pu]=$t[Pu]}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=Js(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,Pu,EP)=>{to(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&&qs.set(L,mb);try{let at=await mb;if(at?.subscribed)return;let{data:tt,error:_t}=at||{};if(_t){L&&Ys(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=Ys(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)&&to(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&&qs.delete(L)}},eE=(t,e,r)=>{let o=t.on,n=e.__ref;n.__fetchListeners||(n.__fetchListeners=[]);let s=t.__runner||_r;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))},rE=(t,e,r)=>{let o=e.__ref;o.__fetchCleanups||(o.__fetchCleanups=[]),QC();let n=t.refetchInterval;if(n){let s=typeof n=="number"?n:Gs(n);if(s>0){let i=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&_r(t,e,r,{force:!0})},s);o.__fetchCleanups.push(()=>clearInterval(i))}}if(t.refetchOnWindowFocus!==!1){let s=()=>{let i=el(e,r),a=u_(e,r),c=JC(t,i,a),l=Zs(c),f=Fp(t.cache);(!l||l.stale||Date.now()-l.time>(f?.staleTime||0))&&_r(t,e,r,{force:!0})};Go.focus.add(s),o.__fetchCleanups.push(()=>Go.focus.delete(s))}if(t.refetchOnReconnect!==!1){let s=()=>_r(t,e,r,{force:!0});Go.online.add(s),o.__fetchCleanups.push(()=>Go.online.delete(s))}},oE=(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&&to(t,i,n),s},Lp=(t,e)=>{let r=t.__ref,o=r.__optimisticSnapshot;o!==void 0&&(to(t,o,e.as),delete r.__optimisticSnapshot)},nE=async(t,e,r)=>{let o=r?.fetch;if(!o)return;let n=await Np(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=Js(e);else if(O(c)){let M=Js(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?oE(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&&Lp(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=d_(t.params,e,r));let V=el(e,r);V&&(D.headers={...D.headers,"Accept-Language":V});let H=l_(t),G=await f_(()=>M(D),H),{data:ft,error:I}=G||{};if(I){C!==void 0&&Lp(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+":")&&Xs(St);else Xs(N)}}catch(M){C!==void 0&&Lp(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}},Qs=(t,e,r,o)=>{if(!t||!o?.fetch)return;let s=ct(t,e);if(!s)return;let i=O(s)?s.map(c=>i_(ct(c,e),e)).filter(Boolean):[i_(s,e)].filter(Boolean);for(let c of i){let l=c.method==="insert"||c.method==="update"||c.method==="upsert"||c.method==="delete",f=l?nE:_r;c.on==="create"?f(c,e,o):Promise.resolve().then(()=>{eE({...c,__runner:f},e,o)}),!l&&c.on==="create"&&(c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&rE(c,e,o)}let a=e.__ref;a.refetch=c=>{for(let l of i)_r(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};_r(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};_r(f,e,o,{direction:"previous",force:!0})}},sE={invalidateQueries:t=>{if(!t){Xs();return}if(w(t))for(let[e]of Mt)(e.startsWith(t)||e.includes(t))&&Xs(e);else if(O(t)){let e=t.join(":");for(let[r]of Mt)r.includes(e)&&Xs(r)}},removeQueries:t=>{if(!t){Zc();return}if(w(t))for(let[e]of Mt)(e.startsWith(t)||e.includes(t))&&Zc(e)},getQueryData:t=>Zs(t)?.data??void 0,setQueryData:(t,e)=>{let r=Zs(t),o=A(e)?e(r?.data):e;Ys(t,o,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let o=await Np(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=Ys(n,i.data,null);a.gcTime=Fp(t.cache)?.gcTime||3e5}return i},getCache:()=>Mt,clear:()=>Zc(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of Mt)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||Zc(r))}},jp={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||qs.clear(),Qs(e,t,t.state,t.context))}},iE=Qs});function ei(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 Up(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 Vp(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 Hp(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 rl(t={}){let e=this;if(e.node?.style){for(let r in t){let o=t[r],n=e[r];if(S(o)&&n)rl.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 h_(t){let e=this;if(br("beforeRemove",e,t)===!1)return e;A(e.node.remove)?e.node.remove():mr()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=ms(e.parent.__ref.__children,e.key)),br("remove",e,t)}function zp(t){return this[t]}function Wp(t,e){let r=this;if(t)return r.update(t,e),r}function qp(t){return t?this.__ref&&this.__ref[t]:this.__ref}function ri(){return this.getRef("__children").map(e=>this[e])}function oi(){return this.getRef().path}function si(t){let e=null,r=o=>o.__element&&o.root?.isRootState;if(!this)e=p_();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=p_()),t?e?.[t]:e}function ii(t){let e=this.getRootState()?.__element;return e&&Object.keys(e).length>0&&t?e[t]:e}function ai(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function ci(t){let e=this.getRoot()?.context;return t?e[t]:e}function li(t){let e=this.context;return t?e[t]:e}function ol(){let t=this,e=[];for(let r in t)!Object.prototype.hasOwnProperty.call(t,r)||hr.has(r)&&!ws.has(r)||e.push(r);return e}function nl(t=[]){let e=this,r={},o=ol.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 ti(t=[],e=new WeakSet){let r=this;if(e.has(r))return;e.add(r);let o=nl.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)?ti.call(a,t,e):a):z(i)&&(o[s]=ti.call(i,t,e))}return o}function Yo(...t){if(wr!=="test"&&wr!=="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 Gp(...t){(wr==="test"||wr==="development")&&console.log(...t)}function fi(...t){(wr==="test"||wr==="development")&&console.warn(...t)}function ro(...t){if(wr==="test"||wr==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&Yo.call(this),new Error(...t)}}function ui(){let t=this,{key:e,parent:r}=t,{__children:o}=r.__ref,n=o.indexOf(e),s=o[n+1];return r[s]}function di(t){let e=t||this,{key:r,parent:o}=e,{__children:n}=o.__ref;if(!n)return;let s=n.indexOf(r);return o[n[s-1]]}function pi(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 Yp(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=>{ro.call(this,s)}),n}catch(n){if(ro.call(this,n),r?.strictMode)throw n}}async function hi(){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(()=>(xr(),eo));await n(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:n}=await Promise.resolve().then(()=>(xr(),eo));await n(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let r=Promise.resolve().then(()=>(xr(),eo)).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(()=>(xr(),eo));await n(o,t.context)}return o}function gi(t){let e=this,r=t||Ws.useStateQuery||e.context?.useStateQuery;if(!r)return null;let o={};if(Bp(e,o),r===!0)return o;let n=pE[r];return n?n(o):o}function Xp(t,e){return!!(Bo.has(t)||e?.context?.methods?.[t])}var wr,g_,ni,p_,Kp,Bp,aE,m_,cE,lE,fE,uE,dE,pE,y_=j(()=>{"use strict";Pp();Uo();At();Xe();Vd();jo();Dp();wr="production";g_=null,ni=t=>{g_=t||null},p_=()=>g_||null;Kp=(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"&&aE(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)},aE=(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])}},m_=(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
+ ${m_(i,e+1)}
23
23
  ${r}}`).join(`
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?`
24
+ `):""},cE=t=>`{
25
+ ${m_(t,1)}
26
+ }`,lE=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},fE=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("&")},uE=(t,e)=>{let r=[],o=[],n=new Set,s=(f,u,d)=>{n.add(u),d&&o.push(`LEFT JOIN ${u} ON ${u}.${d}_id = ${d}.id`);for(let h in f)f[h]===!0?r.push(`${u}.${h}`):s(f[h],h,u)},i=Object.keys(t);i.length===1&&t[i[0]]!==!0?s(t[i[0]],i[0],null):s(t,"_root",null);let a=[...n][0]||"_root",c=r.length?r.join(", "):"*",l=o.length?`
27
27
  `+o.join(`
28
28
  `):"";return`SELECT ${c}
29
- FROM ${a}${l}`},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
+ FROM ${a}${l}`},dE=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},pE={graphql:cE,"json-api":lE,odata:fE,sql:uE,paths:dE}});var hE,Jp,b_=j(()=>{"use strict";bc();hE={snapshotId:Ts},Jp=(t,e)=>{let r=t.__ref,{currentSnapshot:o,calleeElement:n}=e;if(!n||n===t){let a=hE.snapshotId();return r.__currentSnapshot=a,[a,t]}let i=n.__ref.__currentSnapshot;return o<i?[i,n,!0]:[i,n]}});var sl,Zp,__=j(()=>{sl=new Set(["__proto__","constructor","prototype","_id","__v","id","createdAt","updatedAt","schema"]),Zp=t=>typeof t=="string"&&sl.has(t)});async function Qp(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 x_=j(()=>{"use strict"});var ce,Sr,Xo,mi,ve,il,gE,oo,mE,Jo,th,w_=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`}},Sr={"esm.sh":"esmsh",unpkg:"unpkg",skypack:"skypack",jsdelivr:"jsdelivr","pkg.symbo.ls":"symbols"},Xo=(t={})=>{let{packageManager:e}=t;return Sr[e]||null},mi=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,mi(e)),il=(t,e="latest",r="esmsh")=>{let o=ce[r]||ce.esmsh,n=mi(e);return`${o.url}/${t}${n!=="latest"?`@${n}`:""}/`},gE=/^node:|^@symbo-ls\//,oo=t=>typeof t=="string"&&gE.test(t),mE=/[<>…]/,Jo=t=>typeof t=="string"&&mE.test(t),th=(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(oo(f)||Jo(f))continue;let u=s[f]||o[f]||"latest";i[f]=ve(f,u,e),f.endsWith("/")||(i[f+"/"]=il(f,u,e))}if(!Object.keys(i).length)return"";let a='<script type="importmap">',c="<\/script>",l=`{
30
30
  "imports": ${JSON.stringify(i,null,2)}
31
- }`;return`${a}${l}${c}`}});var 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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};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(`,
31
+ }`;return`${a}${l}${c}`}});var eh,S_=j(()=>{"use strict";eh=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 rh,k_=j(()=>{"use strict";rh=(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 oh,v_=j(()=>{"use strict";oh=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 nh,C_=j(()=>{"use strict";nh=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function Zo(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 fh(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 sh,ih,ah,ch,lh,E_=j(()=>{"use strict";sh=(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)}}),ih=(t,e=document,r="text/javascript")=>new Promise((o,n)=>{let s=e.createElement("script");s.type=r,s.src=t;let i=e.createElement("div");i.style.cssText="position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(255,255,255,0.8);z-index:9999;",e.body.appendChild(i),s.onload=()=>{console.log(`Successfully loaded: ${t}`),e.body.removeChild(i),o()},s.onerror=()=>{e.body.removeChild(i),n(new Error(`Failed to load: ${t}`))},e.body.appendChild(s)}),ah=(t,e=document,r,o="text/javascript")=>{let n=new window.XMLHttpRequest;if(n.open("GET",t,!1),n.send(),n.status===200){let s=e.createElement("script");s.type=o,s.text=n.responseText,e.body.appendChild(s),typeof r=="function"&&r()}else throw new Error(`Failed to load the script ${t}`)},ch=(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)}}),lh=(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 xE(t,e){if(!e||typeof e!="object")return t;let r=n=>{if(!_E(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 al(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 wE(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]??al(a,p)??d;if(g==="getLocalStateLang")return al(c,p+s)??d;let m=al(c,p);return m!==void 0?m:a[p]??al(a,p)??d}));return l}function A_(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 dh(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=A_(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=A_(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=wE(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=xE(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,yE,Qo,bE,cl,uh,_E,T_=j(()=>{"use strict";At();Tt=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,r=>e[r])},yE=t=>Object.entries(t||{}).filter(([e,r])=>r!==void 0).map(([e,r])=>`${e}="${Tt(r)}"`).join(" "),Qo=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)},bE=new Set(["jsonLd","styles","scripts"]),cl=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="${Qo(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="${Qo(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||Qo(r.body||""))}"`;if(!o&&r.body){let a=String(r.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${s.join(" ")}${i}>${a}<\/script>`)}else e.push(`<script ${s.join(" ")}${i}><\/script>`)}return e},uh=(t,e)=>{e||(t={...t,robots:"noindex"});let r=Object.entries(t).reduce((o,[n,s])=>{if(!s&&s!==0&&s!==!1||bE.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=yE(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(...cl(t)),r.join(`
32
+ `)},_E=t=>typeof t=="string"&&t.length>0&&!t.startsWith("/")&&!t.startsWith("http")});var ll,ph,O_=j(()=>{"use strict";At();ll=(t,e)=>(O(e)?e:Object.values(e)).reduce((r,o)=>Math.abs(o-t)<Math.abs(r-t)?o:r),ph=(t,e)=>(t=parseFloat(t),S(e)&&(e=Object.values(e)),ll(t,e))});function tn(t){let e=String(t||"").trim();if(!e)return{owner:R_,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=R_);let n=o?`${r}/${o}`:"";return{owner:r,key:o,full:n}}async function fl(t,e={}){if((e.provider||"kv")==="api")return I_(t,e);let o=await OE(t,e);return o||I_(t,e)}async function OE(t,e={}){let r=e.kvBaseUrl||SE,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 I_(t,e={}){let r=e.apiBaseUrl||kE,{key:o}=tn(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}=tn(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 D_(t,e={}){if(S(t))return t;if(w(t)){let{full:r}=tn(t);if(!r)return null;try{let o=await fl(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 gh(t,e={}){return!t||!t.length?[]:(await Promise.all(t.map(async o=>{if(_i(o)){let n=await D_(AE(o),e);return n?{library:n,ignoreList:o.ignoreList}:null}return D_(o,e)}))).filter(Boolean)}var R_,SE,kE,yi,$_,vE,CE,P_,EE,bi,hh,_i,AE,TE,xi,L_=j(()=>{"use strict";At();R_="system",SE="https://smbls-kv.nika-980.workers.dev",kE="https://api.symbols.app";yi=(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])&&yi(t[n],e[n],r,s):t[n]=e[n])}},$_=(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]=$_(t[i],e,a))}return s},vE=new Set,CE=new Set(["components","pages","functions","snippets","methods"]),P_=(t,e)=>e===""&&CE.has(t),EE=t=>t.replace(/\.js$/iu,""),bi=t=>{let e=new Set;if(!Array.isArray(t))return e;for(let r of t){if(!w(r))continue;let o=r.split("/").map(n=>EE(n.trim())).filter(Boolean).join("/");o&&e.add(o)}return e},hh=(t,e={})=>({library:t,ignoreList:Array.isArray(e.ignoreList)?e.ignoreList:[]}),_i=t=>S(t)&&Array.isArray(t.ignoreList)&&("library"in t||"key"in t||"name"in t),AE=t=>t.library!==void 0?t.library:t.key??t.name,TE=(t,e,r)=>{let o=bi(e.sharedLibIgnore);e.sharePages===!1&&o.add("pages");let n=o.size?new Set([...r,...o]):r;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&!(s==="sharePages"||s==="sharedLibIgnore")&&!n.has(s))if(S(e[s])&&S(t[s]))if(s==="designSystem")yi(t[s],e[s],n,s);else for(let i in e[s])n.has(`${s}/${i}`)||(i in t[s]?P_(s,t[s][i])&&!P_(s,e[s][i])&&(t[s][i]=e[s][i]):t[s][i]=e[s][i]);else s in t||(t[s]=$_(e[s],n,s))},xi=(t,e)=>{if(!(!e||!e.length))for(let r=0;r<e.length;r++){let o=e[r],n=vE;_i(o)&&(n=bi(o.ignoreList),o=o.library),S(o)&&TE(t,o,n)}}});var mh,yh,bh,wi,_h,Si,xh,no,M_=j(()=>{"use strict";At();mh=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},yh=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)}},bh=t=>t.replace(/[^a-zA-Z0-9_]/g,""),wi=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,"")),_h=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),Si=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),xh=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},no=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 wh,F_=j(()=>{"use strict";wh=()=>{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,en,ki,vi,N_=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},en=(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(", ")},ki=t=>{if(!t||!Array.isArray(t.variants))return"";let e=t.variants.filter(r=>r.format===t.type);return en(e,{keepOneX:!1})},vi=(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:en(c,{keepOneX:!0})}});let n=r.get(t.type)||[],s=en(n,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...o,{tag:"img",attr:i}]}});var ul={};P(ul,{CDN_PROVIDERS:()=>ce,DOMQL_EVENTS:()=>wd,DOMQ_PROPERTIES:()=>hr,ENV:()=>Fd,HTML_TAGS:()=>Wo,METHODS:()=>Bo,METHODS_EXL:()=>Ss,NODE_ENV:()=>Se,OPTIONS:()=>Ws,PACKAGE_MANAGER_TO_CDN:()=>Sr,PARSED_DOMQ_PROPERTIES:()=>ws,PROPS_METHODS:()=>gr,STATE_METHODS:()=>Xr,STATE_PROPERTIES:()=>xd,SVG_TAGS:()=>jb,TYPES:()=>hs,UNIVERSAL_RESERVED_KEYS:()=>sl,addCaching:()=>Uc,addContext:()=>Bc,addExtend:()=>cp,addExtends:()=>zt,addItemAfterEveryElement:()=>ad,addProtoToArray:()=>ys,addRef:()=>Fc,applyDependentState:()=>Ap,applyEvent:()=>Kc,applyEventUpdate:()=>Gc,applyExtends:()=>Vb,applyProps:()=>js,arrayContainsOtherArray:()=>td,arraysEqual:()=>ld,arrayzeValue:()=>no,buildImgSrcset:()=>ki,buildSourcesAndImg:()=>vi,cache:()=>Ip,call:()=>Yp,captureSnapshot:()=>Jp,checkForStateTypes:()=>kp,checkIfInherits:()=>qc,checkIfStringIsInArray:()=>dd,clone:()=>kd,cloneAndMergeArrayExtend:()=>Ps,cloneFunction:()=>qd,concatAddExtends:()=>sp,copyJavaScriptToClipboard:()=>yh,copyStringToClipboard:()=>mh,createBasedOnType:()=>Mc,createElement:()=>Sp,createElementExtends:()=>vc,createExtends:()=>Ds,createExtendsFromKeys:()=>qo,createExtendsStack:()=>Tc,createIfConditionFlag:()=>Kd,createInheritedState:()=>vp,createKey:()=>Os,createNestedObject:()=>Rd,createNestedObjectByKeyPath:()=>Ep,createObjectWithoutPrototype:()=>yc,createParent:()=>Nc,createPath:()=>jc,createProps:()=>Bs,createPropsStack:()=>$c,createRoot:()=>wp,createScope:()=>Op,createSnapshotId:()=>Ts,customDecodeURIComponent:()=>_d,customEncodeURIComponent:()=>bd,cutArrayAfterValue:()=>sd,cutArrayBeforeValue:()=>nd,debounce:()=>Rs,debounceOnContext:()=>Hd,decodeNewlines:()=>yd,deepClone:()=>ut,deepContains:()=>Td,deepDefaults:()=>yi,deepDestringifyFunctions:()=>ie,deepExtend:()=>kc,deepMerge:()=>nt,deepMergeExtends:()=>Fe,deepStringifyFunctions:()=>ks,defineSetter:()=>Kp,destringifyGlobalScope:()=>Cs,detectHeightOnInit:()=>rh,detectInfiniteLoop:()=>$d,document:()=>et,encodeNewlines:()=>md,error:()=>ro,excludeKeysFromObject:()=>Md,exec:()=>ct,extendCachedRegistry:()=>ip,extendStackRegistry:()=>$s,extractArrayExtend:()=>Ms,fetchLibraryData:()=>fl,fibonacciNumberByIndex:()=>oh,filterArrays:()=>fd,filterArraysFast:()=>ud,finalizeExtends:()=>Oc,findClosestNumber:()=>ll,findClosestNumberInFactory:()=>ph,findInheritedState:()=>Wc,findKeyPosition:()=>hd,flattenExtend:()=>Ko,formatDate:()=>eh,generateHash:()=>xc,generateHeadArrayTags:()=>cl,generateKey:()=>As,generateMetaTags:()=>uh,get:()=>zp,getCDNDirUrl:()=>il,getCDNUrl:()=>ve,getCapitalCaseKeys:()=>up,getCdnProviderFromConfig:()=>Xo,getChildStateInKey:()=>zc,getChildren:()=>ri,getContext:()=>li,getCookie:()=>Zd,getDB:()=>hi,getEmotionStylesheet:()=>wh,getExtendsInElement:()=>lp,getExtendsStack:()=>Is,getExtendsStackRegistry:()=>Sc,getFrequencyInArray:()=>ed,getHashedExtend:()=>Ls,getImportMapScript:()=>th,getInObjectByPath:()=>Dd,getLocalStorage:()=>tp,getNev:()=>Ud,getPageMetadata:()=>dh,getParentStateInKey:()=>Hc,getPath:()=>oi,getQuery:()=>gi,getRef:()=>qp,getRoot:()=>ii,getRootContext:()=>ci,getRootData:()=>ai,getRootState:()=>si,getRootStateInKey:()=>Vc,getSpreadChildren:()=>dp,global:()=>Ju,hasFunction:()=>Me,hasHandlerPlugin:()=>Vo,hasOwnProperty:()=>Cd,hashContent:()=>Qo,inheritChildExtends:()=>Ec,inheritChildPropsExtends:()=>Cc,inheritParentProps:()=>Us,inheritRecursiveChildExtends:()=>Ac,initProps:()=>bp,is:()=>Vt,isArray:()=>O,isBoolean:()=>dc,isContextComponent:()=>pp,isCyclic:()=>Ld,isDOMNode:()=>Ut,isDate:()=>hc,isDefined:()=>mt,isDevelopment:()=>yr,isEmpty:()=>gc,isEmptyObject:()=>Ed,isEqualDeep:()=>mc,isFunction:()=>A,isHtmlElement:()=>ds,isLocal:()=>Bd,isLoudDevRuntime:()=>Ot,isMalformedDependency:()=>Jo,isMethod:()=>Xp,isMobile:()=>Xd,isNode:()=>Ye,isNot:()=>Qu,isNotProduction:()=>Qr,isNull:()=>pc,isNumber:()=>Le,isObject:()=>S,isObjectLike:()=>z,isPhoto:()=>nh,isProduction:()=>mr,isStaging:()=>jd,isState:()=>Cp,isString:()=>w,isStringFunction:()=>Wd,isTest:()=>_c,isTesting:()=>Nd,isUndefined:()=>Et,isUniversallyReservedKey:()=>Zp,isUnresolvableDependency:()=>oo,isValidHtmlTag:()=>rp,isWrappedLibrary:()=>_i,joinArrays:()=>Fo,jointStacks:()=>ap,keys:()=>ol,loadCssFile:()=>ch,loadJavascript:()=>lh,loadJavascriptFile:()=>sh,loadJavascriptFileEmbedSync:()=>ah,loadJavascriptFileSync:()=>ih,loadRemoteCSS:()=>fh,loadRemoteScript:()=>Zo,log:()=>Gp,logGroupIf:()=>Yd,logIf:()=>Gd,lookdown:()=>Vp,lookdownAll:()=>Hp,lookup:()=>Up,lowercaseFirstLetter:()=>Yr,makeObjectWithoutPrototype:()=>Ad,map:()=>Sd,mapStringsWithContextComponents:()=>Fs,matchesComponentNaming:()=>Ne,memoize:()=>zd,merge:()=>pt,mergeSharedLibraries:()=>xi,nextElement:()=>ui,normalizeIgnoreList:()=>bi,normalizeLibraryKey:()=>tn,objectToString:()=>vs,objectizeStringProperty:()=>Ns,overwrite:()=>Es,overwriteDeep:()=>Ht,overwriteShallow:()=>Zr,overwriteState:()=>Tp,parse:()=>nl,parseDeep:()=>ti,pickupElementFromProps:()=>Ic,pickupPropsFromElement:()=>Pc,previousElement:()=>di,propExists:()=>mp,propertizeElement:()=>Dc,propertizeUpdate:()=>gp,remove:()=>h_,removeChars:()=>bh,removeCookie:()=>Qd,removeDuplicateProps:()=>Hs,removeDuplicatesInArray:()=>No,removeFromArray:()=>rd,removeFromObject:()=>Od,removeNestedKeyByPath:()=>Pd,removeValueFromArray:()=>ms,removeValueFromArrayAll:()=>id,reorderArrayByValues:()=>cd,replaceLiteralsWithObjectFields:()=>Gr,replaceOctalEscapeSequences:()=>gd,resolveAsset:()=>Wt,resolveHandler:()=>Ho,resolveSharedLibraries:()=>gh,returnValueAsText:()=>Lc,runPluginHook:()=>Ct,self:()=>Zu,setActiveRootState:()=>ni,setCookie:()=>Jd,setHashedExtend:()=>wc,setInObjectByPath:()=>Id,setLocalStorage:()=>ep,setNodeStyles:()=>rl,setProps:()=>Wp,setPropsPrototype:()=>Vs,sharedLibrary:()=>hh,spotByPath:()=>ei,srcsetFor:()=>en,stringIncludesAny:()=>_s,stringToObject:()=>vd,stripVersionRangePrefix:()=>mi,swapItemsInArray:()=>od,syncProps:()=>zs,toCamelCase:()=>wi,toDashCase:()=>Si,toDescriptionCase:()=>xh,toTitleCase:()=>_h,toggleFullscreen:()=>Qp,triggerEventOn:()=>br,triggerEventOnUpdate:()=>Rp,trimStringFromSymbols:()=>pd,unstackArrayOfObjects:()=>gs,update:()=>yp,updateProps:()=>_p,variables:()=>pi,verbose:()=>Yo,warn:()=>fi,window:()=>v});var R=j(()=>{"use strict";bc();Vd();At();Xe();zo();jo();ps();Mb();Fb();xs();us();Nb();op();fp();xp();Rc();Gb();Yb();Uo();Xb();y_();Dp();b_();Pp();__();x_();w_();S_();k_();v_();C_();E_();T_();O_();L_();M_();F_();N_()});var fv=Iu((RU,lv)=>{var Xn=1e3,Jn=Xn*60,Zn=Jn*60,Ao=Zn*24,vR=Ao*7,CR=Ao*365.25;lv.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return ER(t);if(r==="number"&&isFinite(t))return e.long?TR(t):AR(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function ER(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*CR;case"weeks":case"week":case"w":return r*vR;case"days":case"day":case"d":return r*Ao;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Zn;case"minutes":case"minute":case"mins":case"min":case"m":return r*Jn;case"seconds":case"second":case"secs":case"sec":case"s":return r*Xn;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function AR(t){var e=Math.abs(t);return e>=Ao?Math.round(t/Ao)+"d":e>=Zn?Math.round(t/Zn)+"h":e>=Jn?Math.round(t/Jn)+"m":e>=Xn?Math.round(t/Xn)+"s":t+"ms"}function TR(t){var e=Math.abs(t);return e>=Ao?ou(t,e,Ao,"day"):e>=Zn?ou(t,e,Zn,"hour"):e>=Jn?ou(t,e,Jn,"minute"):e>=Xn?ou(t,e,Xn,"second"):t+" ms"}function ou(t,e,r,o){var n=e>=r*1.5;return Math.round(t/r)+" "+o+(n?"s":"")}});var dv=Iu((PU,uv)=>{function OR(t){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=n,r.enabled=a,r.humanize=fv(),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}uv.exports=OR});var pv=Iu((Jt,nu)=>{Jt.formatArgs=PR;Jt.save=IR;Jt.load=DR;Jt.useColors=RR;Jt.storage=$R();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 RR(){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 PR(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+nu.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 IR(t){try{t?Jt.storage.setItem("debug",t):Jt.storage.removeItem("debug")}catch{}}function DR(){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 $R(){try{return localStorage}catch{}}nu.exports=dv()(Jt);var{formatters:LR}=nu.exports;LR.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var gb={};P(gb,{ANIMATION_PROPS:()=>Ig,ARIA_ROLES:()=>FA,ATTR_TRANSFORMS:()=>Ag,BLOCK_PROPS:()=>Dg,CDN_PROVIDERS:()=>ce,CONFIG:()=>lo,CSS_NAMED_COLOR_HEX:()=>dl,CSS_NATIVE_COLOR_REGEX:()=>Zt,CSS_PROPS_REGISTRY:()=>bt,CSS_UNITS:()=>Mo,DEFAULT_CONFIG:()=>_a,DEFAULT_CSS_PROPERTIES_LIST:()=>kt,DELEGATED_EVENTS:()=>vn,DESIGN_SYSTEM_OPTIONS:()=>ay,DOMQL_EVENTS:()=>wd,DOMQ_PROPERTIES:()=>hr,DOM_EVENTS:()=>Ex,ENV:()=>Fd,FACTORY:()=>ue,FLEX_PROPS:()=>Bg,FONT_PROPS:()=>$g,GRID_PROPS:()=>Ug,HOST_REGISTERED_PACKAGES:()=>_k,HTML_ATTRIBUTES:()=>nf,HTML_TAGS:()=>Wo,LIFECYCLE_EVENTS:()=>Pr,METHODS:()=>Bo,METHODS_EXL:()=>Ss,MISC_PROPS:()=>Lg,MIXINS:()=>tf,NODE_ENV:()=>Se,OPTIONS:()=>Ws,PACKAGE_MANAGER_TO_CDN:()=>Sr,PARSED_DOMQ_PROPERTIES:()=>ws,POSITION_PROPS:()=>Mg,PROPS_METHODS:()=>gr,REGISTRY:()=>Ft,RESERVED_STORE_METHODS:()=>Ab,ROUTER_OPTIONS:()=>vf,SIGNAL_ENGINE_KEY:()=>$o,SIGNAL_INSTANCES_KEY:()=>Io,STANDARD_SCHEME_QUERIES:()=>Ll,STATE_PROPERTIES:()=>xd,STORE_METHOD_NAMES:()=>Eb,SVG_TAGS:()=>Sn,THEME_PROPS:()=>jg,TIMING_PROPS:()=>ua,TYPES:()=>hs,UNIVERSAL_RESERVED_KEYS:()=>sl,VALUE_TRANSFORMERS:()=>Wl,VERSION:()=>Ob,__resetSignalEngine:()=>Gu,__resetSignalInstances:()=>Ku,__resetStateShadowWarnings:()=>Tb,activateConfig:()=>H_,addCaching:()=>Uc,addContext:()=>Bc,addDelegatedEvent:()=>la,addExtend:()=>cp,addExtends:()=>zt,addItemAfterEveryElement:()=>ad,addMethods:()=>Rn,addProtoToArray:()=>ys,addRef:()=>Fc,animation:()=>qh,appendSVGSprite:()=>oa,appendSvgIconsSprite:()=>ho,applyAttrTransforms:()=>Og,applyCSS:()=>ty,applyDependentState:()=>Ap,applyDocument:()=>ra,applyEvent:()=>Kc,applyEventUpdate:()=>Gc,applyExtends:()=>En,applyHeadings:()=>jl,applyInitialState:()=>uf,applyMediaSequenceVars:()=>vr,applyProps:()=>js,applyReset:()=>na,applySequenceGlobalVars:()=>Bi,applySequenceVars:()=>er,applySpacingSequence:()=>Hi,applyStateMethods:()=>ne,applyTimingSequence:()=>ea,applyTrueProps:()=>Hg,applyTypographySequence:()=>Zi,arrayContainsOtherArray:()=>td,arraysEqual:()=>ld,arrayzeValue:()=>no,assertEmitIntegrity:()=>yg,batch:()=>cc,breakpoints:()=>zh,buildImgSrcset:()=>ki,buildSourcesAndImg:()=>vi,buildThemeVarStyles:()=>Fn,cache:()=>Ip,cacheNode:()=>Rr,call:()=>Yp,callStateMethod:()=>pa,camelToAttr:()=>Dr,camelToLowerAttr:()=>Ax,captureSnapshot:()=>Jp,changeGlobalTheme:()=>ql,changeLightness:()=>Ah,checkAttributeByTagName:()=>$r,checkEventFunctions:()=>Tg,checkForStateTypes:()=>kp,checkIfBoxSize:()=>Vi,checkIfInherits:()=>qc,checkIfStringIsInArray:()=>dd,class:()=>Jh,clone:()=>kd,cloneAndMergeArrayExtend:()=>Ps,cloneFunction:()=>qd,color:()=>Fh,colorStringToRgbaArray:()=>le,components:()=>Ln,compositeOverBackdrop:()=>io,concatAddExtends:()=>sp,contrastRatio:()=>nn,convertSvgToSymbol:()=>Ui,copyJavaScriptToClipboard:()=>yh,copyStringToClipboard:()=>mh,create:()=>hb,createAsync:()=>kP,createBasedOnType:()=>Mc,createComputed:()=>kb,createConfig:()=>Di,createDefine:()=>C0,createEffect:()=>Q,createElement:()=>Sp,createElementExtends:()=>vc,createExtends:()=>Ds,createExtendsFromKeys:()=>qo,createExtendsStack:()=>Tc,createHTMLNode:()=>wn,createIfConditionFlag:()=>Kd,createInheritedState:()=>vp,createKey:()=>Os,createNestedObject:()=>Rd,createNestedObjectByKeyPath:()=>Ep,createObjectWithoutPrototype:()=>yc,createParent:()=>Nc,createPath:()=>jc,createProps:()=>Bs,createPropsStack:()=>$c,createRoot:()=>wp,createScope:()=>Op,createScopeStore:()=>fc,createSignal:()=>ls,createSkeleton:()=>CP,createSnapshotId:()=>Ts,createState:()=>Gg,createStore:()=>qe,createSync:()=>vP,css:()=>me,cssMediaVars:()=>Rl,cssVars:()=>Ol,customDecodeURIComponent:()=>_d,customEncodeURIComponent:()=>bd,cutArrayAfterValue:()=>sd,cutArrayBeforeValue:()=>nd,debounce:()=>Rs,debounceOnContext:()=>Hd,decodeNewlines:()=>yd,deepClone:()=>ut,deepContains:()=>Td,deepDefaults:()=>yi,deepDestringifyFunctions:()=>ie,deepExtend:()=>kc,deepMerge:()=>nt,deepMergeExtends:()=>Fe,deepStringifyFunctions:()=>ks,defaultDefine:()=>jn,defineResolvedThemeSignal:()=>fn,defineSetter:()=>Kp,defineThemeSignal:()=>ln,destringifyGlobalScope:()=>Cs,destroy:()=>Ca,detectHeightOnInit:()=>rh,detectInfiniteLoop:()=>$d,detectTag:()=>Or,devices:()=>Wh,dispose:()=>Lr,encodeNewlines:()=>md,error:()=>ro,excludeKeysFromObject:()=>Md,exec:()=>ct,executeAttr:()=>UA,exetuteClassPerComponent:()=>yT,extendCachedRegistry:()=>ip,extendStackRegistry:()=>$s,extractArrayExtend:()=>Ms,extractConditionalAttrs:()=>zA,fetchLibraryData:()=>fl,fibonacciNumberByIndex:()=>oh,filterArrays:()=>fd,filterArraysFast:()=>ud,filterAttributesByTagName:()=>BA,finalizeExtends:()=>Oc,findClosestNumber:()=>ll,findClosestNumberInFactory:()=>ph,findHeadingLetter:()=>$l,findHeadings:()=>ji,findInheritedState:()=>Wc,findKeyPosition:()=>hd,flattenExtend:()=>Ko,font:()=>Ph,fontFace:()=>$h,fontFamily:()=>Ih,fontFamilyTypes:()=>Dh,formatDate:()=>eh,generateHash:()=>xc,generateHeadArrayTags:()=>cl,generateKey:()=>As,generateMetaTags:()=>uh,generateSequence:()=>Kt,generateSequencePosition:()=>rg,generateSprite:()=>un,generateSubSequence:()=>Fi,get:()=>zp,getActiveConfig:()=>E,getActiveDocument:()=>Jl,getActiveLang:()=>Un,getCDNDirUrl:()=>il,getCDNUrl:()=>ve,getCacheSize:()=>_g,getCapitalCaseKeys:()=>up,getCdnProviderFromConfig:()=>Xo,getChildStateInKey:()=>zc,getChildren:()=>ri,getColor:()=>ot,getColorShade:()=>yl,getContext:()=>li,getCookie:()=>Zd,getDB:()=>hi,getDefaultOrFirstKey:()=>ao,getEmitStats:()=>Zl,getEmotionStylesheet:()=>wh,getExtendsInElement:()=>lp,getExtendsStack:()=>Is,getExtendsStackRegistry:()=>Sc,getFnPrefixAndValue:()=>tr,getFontFace:()=>Oh,getFontFaceEach:()=>co,getFontFaceEachString:()=>Cl,getFontFaceString:()=>Oi,getFontFamily:()=>Ji,getFontFormat:()=>kl,getFontSizeByKey:()=>Qi,getFrequencyInArray:()=>ed,getHashedExtend:()=>Ls,getImportMapScript:()=>th,getInObjectByPath:()=>Dd,getLanguages:()=>Ta,getLocalStateLang:()=>Da,getLocalStorage:()=>tp,getMediaColor:()=>Rt,getMediaTheme:()=>pe,getNev:()=>Ud,getObserver:()=>lc,getPageMetadata:()=>dh,getParentStateInKey:()=>Hc,getPath:()=>oi,getQuery:()=>gi,getRef:()=>qp,getResolvedThemeSignal:()=>V_,getRgbTone:()=>Be,getRoot:()=>ii,getRootContext:()=>ci,getRootData:()=>ai,getRootState:()=>si,getRootStateInKey:()=>Vc,getSafeInk:()=>Ml,getSafeInkInfo:()=>ng,getSequenceValue:()=>Ni,getSequenceValueBySymbols:()=>Dl,getSequenceValuePropertyPair:()=>Ve,getShadow:()=>Wi,getShapeByKey:()=>ta,getSignals:()=>Cb,getSpacingBasedOnRatio:()=>Ee,getSpacingByKey:()=>xt,getSpreadChildren:()=>dp,getSubratio:()=>Mi,getSubratioDifference:()=>Li,getSystemGlobalTheme:()=>ye,getTheme:()=>Ki,getThemeSignal:()=>U_,getTimingByKey:()=>te,getTimingFunction:()=>he,global:()=>Ju,gradient:()=>Nh,grid:()=>Xh,hasFunction:()=>Me,hasHandlerPlugin:()=>Vo,hasOwnProperty:()=>Cd,hashContent:()=>Qo,hexToRgb:()=>kh,hexToRgbArray:()=>pl,hexToRgba:()=>Ch,hslToRgb:()=>ml,icons:()=>Uh,inheritChildExtends:()=>Ec,inheritChildPropsExtends:()=>Cc,inheritParentProps:()=>Us,inheritRecursiveChildExtends:()=>Ac,init:()=>ir,initPolyglot:()=>Af,initProps:()=>bp,injectGlobal:()=>wt,is:()=>Vt,isArray:()=>O,isBoolean:()=>dc,isCSSVar:()=>ht,isContextComponent:()=>pp,isCyclic:()=>Ld,isDOMNode:()=>Ut,isDate:()=>hc,isDefined:()=>mt,isDevelopment:()=>yr,isDomDocument:()=>Ke,isEmpty:()=>gc,isEmptyObject:()=>Ed,isEnumeratedTrueFalseAttr:()=>or,isEqualDeep:()=>mc,isFunction:()=>A,isGoogleFontsUrl:()=>sn,isHostObject:()=>Ge,isHtmlElement:()=>ds,isLocal:()=>Bd,isLoudDevRuntime:()=>Ot,isMalformedDependency:()=>Jo,isMethod:()=>Xp,isMobile:()=>Xd,isNode:()=>Ye,isNot:()=>Qu,isNotProduction:()=>Qr,isNull:()=>pc,isNumber:()=>Le,isObject:()=>S,isObjectLike:()=>z,isPhoto:()=>nh,isProduction:()=>mr,isRawUnitValue:()=>fs,isResolvedColor:()=>Ce,isScalingUnit:()=>Kr,isStaging:()=>jd,isState:()=>Cp,isStore:()=>gt,isString:()=>w,isStringFunction:()=>Wd,isSvgTag:()=>kn,isTest:()=>_c,isTesting:()=>Nd,isTracking:()=>Xg,isUndefined:()=>Et,isUniversallyReservedKey:()=>Zp,isUnresolvableDependency:()=>oo,isValidHtmlTag:()=>rp,isValidTag:()=>xn,isWasmLoaded:()=>u0,isWrappedLibrary:()=>_i,isWritableFamilyBucket:()=>Xu,joinArrays:()=>Fo,jointStacks:()=>ap,keyframes:()=>_n,keys:()=>ol,linearChannelToSrgb:()=>xl,loadCssFile:()=>ch,loadJavascript:()=>lh,loadJavascriptFile:()=>sh,loadJavascriptFileEmbedSync:()=>ah,loadJavascriptFileSync:()=>ih,loadRemoteCSS:()=>fh,loadRemoteScript:()=>Zo,loadTranslations:()=>Ra,loadWasm:()=>f0,log:()=>Gp,logGroupIf:()=>Yd,logIf:()=>Gd,lookdown:()=>Vp,lookdownAll:()=>Hp,lookup:()=>Up,lowercaseFirstLetter:()=>Yr,makeObjectWithoutPrototype:()=>Ad,map:()=>Sd,mapStringsWithContextComponents:()=>Fs,matchesComponentNaming:()=>Ne,media:()=>Lh,memoize:()=>zd,merge:()=>pt,mergeSharedLibraries:()=>xi,mixTwoColors:()=>Sh,mixTwoRgb:()=>Eh,mixTwoRgba:()=>bl,nextElement:()=>ui,normalizeIgnoreList:()=>bi,normalizeLibraryKey:()=>tn,numToLetterMap:()=>Ue,objectToString:()=>vs,objectizeStringProperty:()=>Ns,oklabToLinearSrgb:()=>wl,oklabToOklch:()=>Ei,oklchToGamutSafeSrgb:()=>Ai,oklchToOklab:()=>Sl,opacify:()=>on,overwrite:()=>Es,overwriteDeep:()=>Ht,overwriteShallow:()=>Zr,overwriteState:()=>Tp,parkHostObject:()=>pr,parse:()=>nl,parseColorToken:()=>qt,parseDeep:()=>ti,pickupElementFromProps:()=>Ic,pickupPropsFromElement:()=>Pc,polyglotFunctions:()=>Ha,polyglotPlugin:()=>Vn,popConfig:()=>rt,popStaticCssPass:()=>Ng,previousElement:()=>di,propExists:()=>mp,propertizeElement:()=>Dc,propertizeUpdate:()=>gp,pushConfig:()=>st,pushStaticCssPass:()=>Fg,refreshContextProto:()=>lf,registerEvent:()=>Cn,registerHostPackages:()=>xk,registerSignalInstance:()=>Do,reinit:()=>Qm,relativeLuminance:()=>so,remove:()=>On,removeChars:()=>bh,removeCookie:()=>Qd,removeDelegatedEvent:()=>fa,removeDuplicateProps:()=>Hs,removeDuplicatesInArray:()=>No,removeFromArray:()=>rd,removeFromObject:()=>Od,removeNestedKeyByPath:()=>Pd,removeValueFromArray:()=>ms,removeValueFromArrayAll:()=>id,reorderArrayByValues:()=>cd,replaceLiteralsWithObjectFields:()=>Gr,replaceOctalEscapeSequences:()=>gd,resetEmitStats:()=>mg,resolveAsset:()=>Wt,resolveBorderValue:()=>Qt,resolveColorRgb:()=>fo,resolveColorsInGradient:()=>ia,resolveConfigDocument:()=>Lo,resolveFileSource:()=>Eg,resolveFileUrl:()=>fe,resolveHandler:()=>Ho,resolvePropValue:()=>Ir,resolveShadowValue:()=>uo,resolveSharedLibraries:()=>gh,returnSubThemeOrDefault:()=>Th,returnValueAsText:()=>Lc,rgbArrayToHex:()=>hl,rgbToHSL:()=>gl,rgbToHex:()=>vh,runPluginHook:()=>Ct,runThroughMedia:()=>Nl,scratchDefaultConfig:()=>cn,scratchSystem:()=>gn,scratchUtils:()=>Cr,self:()=>Zu,semanticIcons:()=>Vh,sequence:()=>Qe,serializeAttrValue:()=>ze,set:()=>go,setActiveConfig:()=>Pl,setActiveDocument:()=>gg,setActiveRootState:()=>ni,setAdaptiveSchemeVar:()=>Ar,setClass:()=>E1,setClassname:()=>bT,setColor:()=>Er,setCookie:()=>Jd,setCssEngineHook:()=>Sf,setCustomFont:()=>Ti,setCustomFontMedia:()=>kr,setEach:()=>ug,setFont:()=>Xi,setFontFamily:()=>pn,setFontImport:()=>an,setGradient:()=>dn,setHashedExtend:()=>wc,setInCustomFontMedia:()=>vl,setInObjectByPath:()=>Id,setLang:()=>Pa,setLocalStorage:()=>ep,setMediaTheme:()=>Yi,setNodeStyles:()=>rl,setObserver:()=>vb,setProps:()=>Wp,setPropsPrototype:()=>Vs,setSVG:()=>hn,setScalingVar:()=>$i,setShadow:()=>Tr,setSubScalingVar:()=>Il,setSvgIcon:()=>po,setTheme:()=>Gi,setValue:()=>fg,setVariables:()=>og,setWasmEngine:()=>ca,shadow:()=>Bh,shape:()=>tg,sharedLibrary:()=>hh,sizes:()=>Qh,spacing:()=>Mh,splitSpacedValue:()=>zi,splitTopLevelCommas:()=>Ze,splitTransition:()=>zl,spotByPath:()=>ei,srcsetFor:()=>en,srgbChannelToLinear:()=>_l,srgbToOklab:()=>Ci,stringIncludesAny:()=>_s,stringToObject:()=>vd,stripVersionRangePrefix:()=>mi,svg:()=>Kh,svgData:()=>Gh,swapItemsInArray:()=>od,syncProps:()=>zs,templates:()=>Yh,theme:()=>jh,timing:()=>Hh,toCamel:()=>Ii,toCamelCase:()=>wi,toDashCase:()=>Si,toDescriptionCase:()=>xh,toLinearChannel:()=>rn,toTitleCase:()=>_h,toggleFullscreen:()=>Qp,transformBackgroundImage:()=>Vl,transformBorder:()=>He,transformBorderRadius:()=>rr,transformBoxShadow:()=>sa,transformClassname:()=>Mx,transformDuration:()=>aa,transformShadow:()=>Ul,transformSize:()=>yt,transformSizeRatio:()=>B,transformTextStroke:()=>Bl,transformTransition:()=>lg,transformersByPrefix:()=>zg,transfromGap:()=>Hl,translate:()=>Oa,triggerEventOn:()=>br,triggerEventOnUpdate:()=>Rp,trimStringFromSymbols:()=>pd,typography:()=>Ri,unit:()=>Rh,unstackArrayOfObjects:()=>gs,update:()=>An,updateProps:()=>_p,updateVars:()=>C1,upsertTranslation:()=>Ia,useCssInProps:()=>oe,useHostState:()=>Yg,usePropsAsCSS:()=>$x,useSelectorsAsCSS:()=>Lx,variables:()=>pi,vars:()=>Zh,verbose:()=>Yo,warn:()=>fi,warnStateKeyShadowsMethod:()=>uc,window:()=>v,wrapHoverRule:()=>Ae});module.exports=aC(gb);var Yu={};P(Yu,{RESERVED_STORE_METHODS:()=>Ab,SIGNAL_ENGINE_KEY:()=>$o,SIGNAL_INSTANCES_KEY:()=>Io,STORE_METHOD_NAMES:()=>Eb,VERSION:()=>Ob,__resetSignalEngine:()=>Gu,__resetSignalInstances:()=>Ku,__resetStateShadowWarnings:()=>Tb,batch:()=>cc,createComputed:()=>kb,createEffect:()=>Q,createScopeStore:()=>fc,createSignal:()=>ls,createStore:()=>qe,getObserver:()=>lc,getSignals:()=>Cb,isStore:()=>gt,registerSignalInstance:()=>Do,setObserver:()=>vb,warnStateKeyShadowsMethod:()=>uc});var ju={};P(ju,{WRITE_JOURNAL:()=>ss,batch:()=>as,createComputed:()=>lC,createEffect:()=>fC,createSignal:()=>De,getObserver:()=>Fu,journalWrite:()=>is,setObserver:()=>cC});var Bt=null,ec=0,rc=[],Fu=()=>Bt,cC=t=>{Bt=t},oc=0,Du=[];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,mC(e))}function n(){return t}let s={get:r,set:o,peek:n,_subscribers:e,_type:"signal"};return s}function lC(t){let e,r=!0,o=new Set,n={_sources:new Set,_type:"computed",_subscribers:o,_execute(){Mu(n);let s=Bt;Bt=n;try{e=t(),r=!1}finally{Bt=s}},_notify(){r=!0,o.size>0&&wb(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,$u=!1,ss=[];function is(t){ss.push(t),ss.length>32&&ss.shift()}function fC(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;Mu(o);let n=Bt;Bt=o;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{Bt=n}},_notify(){o._disposed||(ec>0?rc.push(o):oc>0?Du.push(o):Nu(o))},dispose(){o._disposed=!0,Mu(o)}};return o._execute(),o}function as(t){ec++;try{t()}finally{ec--,ec===0&&gC()}}var Lu=!1,bb=1e3,uC=8,dC=256,pC=4;function _b(){return typeof performance<"u"?performance.now():Date.now()}function Nu(t){we.add(t),!Lu&&($u||($u=!0,queueMicrotask(xb)))}var Po=[];function hC(){if(we.size===1){let[e]=we;return we.clear(),e._disposed?0:(e._execute(),1)}Po.length=0;for(let e of we)Po.push(e);we.clear(),Po.sort((e,r)=>e._depth-r._depth);let t=0;for(let e=0;e<Po.length;e++){let r=Po[e];r._disposed||(r._execute(),t++)}return Po.length=0,t}function xb(t=0,e=0){if($u=!1,we.size===0)return;Lu=!0;let r=_b(),o=!1;try{for(;we.size>0;){if(++t>bb){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 ss)i.set(c,(i.get(c)||0)+1);let a=[...i.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", ");console.error("[smbls] reactive effect cascade exceeded",bb,"passes in a single flush \u2014 breaking to avoid hanging the thread.","This usually means an effect (or an onUpdate/subscribeTo handler","it calls into) unconditionally writes back a signal it depends on.","Still queued at break (the loop participants):",s||"<queue empty>","\u2014 last notifying store writes:",a||"<none recorded>"),we.clear();break}if(e+=hC(),we.size>0&&(e>=dC||t>=pC)&&_b()-r>uC){o=!0,setTimeout(()=>xb(t,e),0);break}}}finally{o||(Lu=!1)}}function gC(){for(let t=0;t<rc.length;t++)Nu(rc[t]);rc.length=0}function wb(t){oc++;try{for(let e of t)e._notify()}finally{if(oc--,oc===0&&Du.length>0){let e=Du.splice(0);for(let r=0;r<e.length;r++)Nu(e[r])}}}function mC(t){wb(t)}function Mu(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var qu={};P(qu,{RESERVED_STORE_METHODS:()=>cs,STORE_METHOD_NAMES:()=>Wu,__resetStateShadowWarnings:()=>yC,createScopeStore:()=>wC,createStore:()=>nc,getSignals:()=>xC,isStore:()=>_C,warnStateKeyShadowsMethod:()=>zu});var $e=Symbol("store"),sc=Symbol("signals"),Wu=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],cs=new Set(Wu),Hu=new Set,Bu=(t,e)=>t?t+"."+e:String(e);function zu(t,e){let r=(e||"")+"::"+t;if(Hu.has(r))return;Hu.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: ${Wu.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(n)}function yC(){Hu.clear()}var Uu=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||!ic(t),bC=12,ic=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function ac(t,e,r){if(t===e)return!0;if(r>bC)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(!ac(t[o],e[o],r+1))return!1;return!0}if(ic(t)&&ic(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)||!ac(t[s],e[s],r+1))return!1;return!0}return!1}function nc(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}cs.has(b)&&zu(b,o);let y=t[b];r<i&&y&&typeof y=="object"&&!Uu(y)?(s[b]=y,n[b]=De(nc(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===sc)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(cs.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"&&Fu()!=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;cs.has(y)&&zu(y,o);let k=Bu(o,y);if(Object.prototype.hasOwnProperty.call(n,y))if(x&&typeof x=="object"&&!Uu(x)){if(x===b[y])return!0;let C=n[y].peek(),T=C&&C[$e]?C.$parse():C;if(ac(x,T,0))return!0;b[y]=x,is(k),n[y].set(nc(x,e,r+1,k))}else{if(Array.isArray(x)&&x!==b[y]&&Array.isArray(n[y].peek())&&ac(x,n[y].peek(),0))return!0;n[y].peek()!==x&&is(k),b[y]=x,n[y].set(x)}else b[y]=x,x&&typeof x=="object"&&!Uu(x)?n[y]=De(nc(x,e,r+1,k)):n[y]=De(x);return!0},has(b,y){return typeof y=="string"&&y.charCodeAt(0)===36&&cs.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&&is(Bu(o,y)),n[y].set(void 0),delete n[y]),delete b[y],!0}});function c(b,y){as(()=>{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 as(()=>{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 as(()=>{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(ic(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 _C(t){return t&&t[$e]===!0}function xC(t){return t[sc]}function wC(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[sc];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[$e]?a[Vu]:null}return null};return new Proxy(o,{get(i,a){return a===$e?!0:a===sc?r:a===Vu?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[Vu]: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 Vu=Symbol("scope.parent");var qr="3.14.779";var Io="__SMBLS_SIGNAL_INSTANCES__",Do=(t,e,r)=>{let o=e||(typeof globalThis<"u"?globalThis:null);if(!o)return null;let n=o[Io]||(o[Io]={versions:[],engines:0,reported:!1});return typeof n.engines!="number"&&(n.engines=n.versions.length),n.versions.push(t||qr),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},Ku=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[Io]};var $o="__SMBLS_SIGNAL_ENGINE__",Sb=(t,e,r)=>{let o=e||qr,n=r||(typeof globalThis<"u"?globalThis:null);if(!n)return t;let s=n[$o];return s&&s.engine&&s.version===o?(Do(o,n,!0),s.engine):(s||(n[$o]={version:o,engine:t}),Do(o,n,!1),t)},Gu=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[$o]};var Lt=Sb({...ju,...qu,VERSION:qr},qr),ls=Lt.createSignal,kb=Lt.createComputed,Q=Lt.createEffect,cc=Lt.batch,lc=Lt.getObserver,vb=Lt.setObserver,qe=Lt.createStore,fc=Lt.createScopeStore,gt=Lt.isStore,Cb=Lt.getSignals,Eb=Lt.STORE_METHOD_NAMES,Ab=Lt.RESERVED_STORE_METHODS,uc=Lt.warnStateKeyShadowsMethod,Tb=Lt.__resetStateShadowWarnings,Ob=Lt.VERSION;var xg={};P(xg,{assertEmitIntegrity:()=>yg,css:()=>me,getActiveDocument:()=>Jl,getCacheSize:()=>_g,getEmitStats:()=>Zl,injectGlobal:()=>wt,keyframes:()=>_n,reset:()=>mx,resetEmitStats:()=>mg,setActiveDocument:()=>gg,setWasmEngine:()=>ca,wrapHoverRule:()=>Ae});var dg={};P(dg,{CONFIG:()=>lo,CSS_NAMED_COLOR_HEX:()=>dl,CSS_NATIVE_COLOR_REGEX:()=>Zt,CSS_UNITS:()=>Mo,FACTORY:()=>ue,STANDARD_SCHEME_QUERIES:()=>Ll,VALUE_TRANSFORMERS:()=>Wl,activateConfig:()=>H_,animation:()=>qh,appendSVGSprite:()=>oa,appendSvgIconsSprite:()=>ho,applyDocument:()=>ra,applyHeadings:()=>jl,applyMediaSequenceVars:()=>vr,applyReset:()=>na,applySequenceGlobalVars:()=>Bi,applySequenceVars:()=>er,applySpacingSequence:()=>Hi,applyTimingSequence:()=>ea,applyTypographySequence:()=>Zi,breakpoints:()=>zh,changeGlobalTheme:()=>ql,changeLightness:()=>Ah,checkIfBoxSize:()=>Vi,class:()=>Jh,color:()=>Fh,colorStringToRgbaArray:()=>le,compositeOverBackdrop:()=>io,contrastRatio:()=>nn,convertSvgToSymbol:()=>Ui,createConfig:()=>Di,cssMediaVars:()=>Rl,cssVars:()=>Ol,defineResolvedThemeSignal:()=>fn,defineThemeSignal:()=>ln,devices:()=>Wh,document:()=>j_,findHeadingLetter:()=>$l,findHeadings:()=>ji,font:()=>Ph,fontFace:()=>$h,fontFamily:()=>Ih,fontFamilyTypes:()=>Dh,generateSequence:()=>Kt,generateSequencePosition:()=>rg,generateSprite:()=>un,generateSubSequence:()=>Fi,getActiveConfig:()=>E,getColor:()=>ot,getColorShade:()=>yl,getDefaultOrFirstKey:()=>ao,getFnPrefixAndValue:()=>tr,getFontFace:()=>Oh,getFontFaceEach:()=>co,getFontFaceEachString:()=>Cl,getFontFaceString:()=>Oi,getFontFamily:()=>Ji,getFontFormat:()=>kl,getFontSizeByKey:()=>Qi,getMediaColor:()=>Rt,getMediaTheme:()=>pe,getResolvedThemeSignal:()=>V_,getRgbTone:()=>Be,getSafeInk:()=>Ml,getSafeInkInfo:()=>ng,getSequenceValue:()=>Ni,getSequenceValueBySymbols:()=>Dl,getSequenceValuePropertyPair:()=>Ve,getShadow:()=>Wi,getShapeByKey:()=>ta,getSpacingBasedOnRatio:()=>Ee,getSpacingByKey:()=>xt,getSubratio:()=>Mi,getSubratioDifference:()=>Li,getTheme:()=>Ki,getThemeSignal:()=>U_,getTimingByKey:()=>te,getTimingFunction:()=>he,gradient:()=>Nh,grid:()=>Xh,hexToRgb:()=>kh,hexToRgbArray:()=>pl,hexToRgba:()=>Ch,hslToRgb:()=>ml,icons:()=>Uh,isCSSVar:()=>ht,isDomDocument:()=>Ke,isGoogleFontsUrl:()=>sn,isHostObject:()=>Ge,isRawUnitValue:()=>fs,isResolvedColor:()=>Ce,isScalingUnit:()=>Kr,isWritableFamilyBucket:()=>Xu,linearChannelToSrgb:()=>xl,media:()=>Lh,mixTwoColors:()=>Sh,mixTwoRgb:()=>Eh,mixTwoRgba:()=>bl,numToLetterMap:()=>Ue,oklabToLinearSrgb:()=>wl,oklabToOklch:()=>Ei,oklchToGamutSafeSrgb:()=>Ai,oklchToOklab:()=>Sl,opacify:()=>on,parkHostObject:()=>pr,parseColorToken:()=>qt,popConfig:()=>rt,pushConfig:()=>st,relativeLuminance:()=>so,reset:()=>B_,resolveBorderValue:()=>Qt,resolveColorRgb:()=>fo,resolveColorsInGradient:()=>ia,resolveConfigDocument:()=>Lo,resolveFileUrl:()=>fe,resolveShadowValue:()=>uo,returnSubThemeOrDefault:()=>Th,rgbArrayToHex:()=>hl,rgbToHSL:()=>gl,rgbToHex:()=>vh,runThroughMedia:()=>Nl,scratchDefaultConfig:()=>cn,scratchSystem:()=>gn,scratchUtils:()=>Cr,semanticIcons:()=>Vh,sequence:()=>Qe,set:()=>go,setActiveConfig:()=>Pl,setAdaptiveSchemeVar:()=>Ar,setColor:()=>Er,setCustomFont:()=>Ti,setCustomFontMedia:()=>kr,setEach:()=>ug,setFont:()=>Xi,setFontFamily:()=>pn,setFontImport:()=>an,setGradient:()=>dn,setInCustomFontMedia:()=>vl,setMediaTheme:()=>Yi,setSVG:()=>hn,setScalingVar:()=>$i,setShadow:()=>Tr,setSubScalingVar:()=>Il,setSvgIcon:()=>po,setTheme:()=>Gi,setValue:()=>fg,setVariables:()=>og,shadow:()=>Bh,shape:()=>tg,sizes:()=>Qh,spacing:()=>Mh,splitSpacedValue:()=>zi,splitTopLevelCommas:()=>Ze,splitTransition:()=>zl,srgbChannelToLinear:()=>_l,srgbToOklab:()=>Ci,svg:()=>Kh,svgData:()=>Gh,templates:()=>Yh,theme:()=>jh,timing:()=>Hh,toCamel:()=>Ii,toLinearChannel:()=>rn,transformBackgroundImage:()=>Vl,transformBorder:()=>He,transformBorderRadius:()=>rr,transformBoxShadow:()=>sa,transformDuration:()=>aa,transformShadow:()=>Ul,transformSize:()=>yt,transformSizeRatio:()=>B,transformTextStroke:()=>Bl,transformTransition:()=>lg,transfromGap:()=>Hl,typography:()=>Ri,unit:()=>Rh,vars:()=>Zh});var Cr={};P(Cr,{CSS_NAMED_COLOR_HEX:()=>dl,CSS_NATIVE_COLOR_REGEX:()=>Zt,CSS_UNITS:()=>Mo,applyMediaSequenceVars:()=>vr,applySequenceGlobalVars:()=>Bi,applySequenceVars:()=>er,changeLightness:()=>Ah,colorStringToRgbaArray:()=>le,compositeOverBackdrop:()=>io,contrastRatio:()=>nn,convertSvgToSymbol:()=>Ui,findHeadingLetter:()=>$l,findHeadings:()=>ji,generateSequence:()=>Kt,generateSequencePosition:()=>rg,generateSprite:()=>un,generateSubSequence:()=>Fi,getColorShade:()=>yl,getDefaultOrFirstKey:()=>ao,getFnPrefixAndValue:()=>tr,getFontFace:()=>Oh,getFontFaceEach:()=>co,getFontFaceEachString:()=>Cl,getFontFaceString:()=>Oi,getFontFormat:()=>kl,getRgbTone:()=>Be,getSequenceValue:()=>Ni,getSequenceValueBySymbols:()=>Dl,getSequenceValuePropertyPair:()=>Ve,getSubratio:()=>Mi,getSubratioDifference:()=>Li,hexToRgb:()=>kh,hexToRgbArray:()=>pl,hexToRgba:()=>Ch,hslToRgb:()=>ml,isCSSVar:()=>ht,isDomDocument:()=>Ke,isGoogleFontsUrl:()=>sn,isHostObject:()=>Ge,isRawUnitValue:()=>fs,isResolvedColor:()=>Ce,isScalingUnit:()=>Kr,isWritableFamilyBucket:()=>Xu,linearChannelToSrgb:()=>xl,mixTwoColors:()=>Sh,mixTwoRgb:()=>Eh,mixTwoRgba:()=>bl,numToLetterMap:()=>Ue,oklabToLinearSrgb:()=>wl,oklabToOklch:()=>Ei,oklchToGamutSafeSrgb:()=>Ai,oklchToOklab:()=>Sl,opacify:()=>on,parkHostObject:()=>pr,parseColorToken:()=>qt,relativeLuminance:()=>so,resolveConfigDocument:()=>Lo,resolveFileUrl:()=>fe,returnSubThemeOrDefault:()=>Th,rgbArrayToHex:()=>hl,rgbToHSL:()=>gl,rgbToHex:()=>vh,setCustomFont:()=>Ti,setCustomFontMedia:()=>kr,setFontImport:()=>an,setInCustomFontMedia:()=>vl,setScalingVar:()=>$i,setSubScalingVar:()=>Il,setVariables:()=>og,splitTopLevelCommas:()=>Ze,srgbChannelToLinear:()=>_l,srgbToOklab:()=>Ci,toLinearChannel:()=>rn});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)},Xu=t=>t!==null&&typeof t=="object"&&!Ge(t),pr=(t,e,r)=>{if(!t)return;if(Ke(r)){t.__domDocument||(t.__domDocument=r);return}let o=`__host_${e}`;t[o]||(t[o]=r)},Lo=t=>t?Ke(t.__domDocument)?t.__domDocument:Ke(t.document)?t.document:null:null;var Kr=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",Mo=["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"],SC=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),kC=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${Mo.filter(t=>t!=="auto").map(SC).join("|")})$`),fs=t=>kC.test(String(t).trim());R();var dl={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=dl[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]},Sh=(t,e,r=.5)=>(t=le(t),e=le(e),bl(t,e,r)),kh=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${r},${o},${n})`},pl=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[r,o,n]},vh=(t,e,r)=>"#"+(1<<24|t<<16|e<<8|r).toString(16).slice(1),hl=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1),Ch=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${r},${o},${n},${e})`},Eh=(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})`},Ah=(t,e)=>{let[r,o,n]=e,s=Math.max(0,Math.min(100,n+parseFloat(t)));return[r,o,s]},gl=(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]},ml=(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)],yl=(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)},bl=(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})`},on=(t,e)=>{let r=le(t);if(!r){Qr()&&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)/,RE=/^([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(RE);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},rn=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),so=t=>.2126*rn(t[0])+.7152*rn(t[1])+.0722*rn(t[2]),nn=(t,e)=>{let r=so(t)+.05,o=so(e)+.05;return r>o?r/o:o/r},_l=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),xl=t=>(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*255,Ci=([t,e,r])=>{let[o,n,s]=[t,e,r].map(_l),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]},wl=([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]},Ei=([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]},Sl=([t,e,r])=>{let o=r*Math.PI/180;return[t,e*Math.cos(o),e*Math.sin(o)]},Ai=(t,e,r,o=24)=>{let n=a=>wl(Sl([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=>xl(Math.max(0,Math.min(1,a))))},io=(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=hl(t),o=e.slice(0,1);if(o==="-"||o==="+"){let n=yl(r,parseFloat(e));return pl(n).join(", ")}else{let[n,s,i]=t,[a,c]=gl(n/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return ml(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var Th=(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},ao=(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},kl=t=>{if(typeof t!="string"||!t)return null;let e=t.split(/[#?]/)[0].split(".").pop().trim();return["woff2","woff","ttf","otf","eot"].includes(e)?e:null},sn=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),an=t=>`@import url('${t}');`,vl=t=>`@font-face { ${t} }`,Ti=(t,e,r,o={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=kl(a),l=c?` format('${c}')`:"";return`url('${a}')${l}`}).join(`,
33
33
  `);return`
34
34
  font-family: '${t}';
35
35
  font-style: ${o.fontStyle||"normal"};${r?`
36
36
  font-weight: ${r};`:""}${o.fontStretch?`
37
37
  font-stretch: ${o.fontStretch};`:""}${o.fontDisplay?`
38
38
  font-display: ${o.fontDisplay};`:""}
39
- src: ${i};`},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")}.
39
+ src: ${i};`},kr=(t,e,r,o)=>`@font-face {${Ti(t,e,r,o)}
40
+ }`,co=(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 Ti(t,f,i,{fontStyle:a,fontDisplay:c,fontStretch:l})}),Oh=t=>Object.keys(t).map(r=>co(r,t[r].value)),Cl=(t,e,r)=>{if(e&&e.isVariable){let s=fe(e.url,r)||e.url;return sn(s)?an(s):kr(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap"})}if(e[0])return co(t,e,r).map(vl);let n=Array.isArray(e.url)?e.url.map(s=>fe(s,r)||s):fe(e.url,r)||e.url;return kr(t,n,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch})},Oi=(t,e)=>Object.keys(t).map(o=>Cl(o,t[o].value,e));R();R();R();R();var cn={};P(cn,{animation:()=>qh,breakpoints:()=>zh,class:()=>Jh,color:()=>Fh,devices:()=>Wh,document:()=>j_,font:()=>Ph,fontFace:()=>$h,fontFamily:()=>Ih,fontFamilyTypes:()=>Dh,gradient:()=>Nh,grid:()=>Xh,icons:()=>Uh,media:()=>Lh,reset:()=>B_,semanticIcons:()=>Vh,sequence:()=>Qe,shadow:()=>Bh,shape:()=>tg,sizes:()=>Qh,spacing:()=>Mh,svg:()=>Kh,svgData:()=>Gh,templates:()=>Yh,theme:()=>jh,timing:()=>Hh,typography:()=>Ri,unit:()=>Rh,vars:()=>Zh});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 Rh={default:"em"};var PE={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:{}},Ri=PE;var Ph={};var Ih={},Dh={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},$h={};var Lh={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var IE={base:Ri.base,type:"spacing",ratio:Qe.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},Mh=IE;var Fh={},Nh={};var jh={};var Bh={};var Uh={},Vh={};var DE={default:150,base:150,type:"timing",ratio:Qe["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},Hh=DE;var j_={};var zh={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},Wh={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 qh={};var Kh={},Gh={};var Yh={};var $E={},Xh=$E;var Jh={};var B_={},Zh={},Qh={},tg={};var Ol={},Rl={},El=cn,Al={},Ii=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in El){let e=t.toLowerCase();Al[e]=El[t];let r=Ii(e);r!==e&&(Al[r]=El[t]),e!==t&&(Al[t]=El[t])}var lo={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:Ol,cssMediaVars:Rl,CSS_VARS:Ol,CSS_MEDIA_VARS:Rl,_scratchConfig:!0,...Al},ln=(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=ls(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},U_=t=>t?ln(t):null,fn=(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=ls(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},V_=t=>t?fn(t):null;ln(lo);fn(lo);var Tl=ut(lo),ue={active:"0",0:lo},H_=t=>(mt(t)&&(ue.active=t),ue[t||ue.active]),Pi=[],st=t=>{t&&t._scratchConfig&&Pi.push(t)},rt=()=>{Pi.pop()},E=t=>Pi.length?Pi[Pi.length-1]:ue[t||ue.active]||lo,Pl=t=>{if(S(t))return ue.active="1",ue[1]=nt(t,ut(Tl)),ln(ue[1]),fn(ue[1]),t},LE=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],ME=["useVariable","globalTheme","verbose"],FE=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],NE=t=>{for(let e of FE){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)}},Di=(t,e,{cleanBase:r=!1}={})=>{let o=r?null:E(),n=ut(!r&&o&&o._scratchConfig?o:Tl);for(let i of LE)delete n[i];for(let i of ME)Object.prototype.hasOwnProperty.call(Tl,i)?n[i]=Tl[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,NE(s),ln(s),fn(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"},eg=(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=z_.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]},z_=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),$i=(t,e)=>{let{base:r,type:o,unit:n}=e,s=z_.has(n)?"rem":n,i=(Kr(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(W_,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}))`}},Il=(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}))`},Li=(t,e)=>{let o=(t*e-t)/1.618,n=t*e-o,s=t+o,i=(n+s)/2;return[n,i,s]},Mi=(t,e)=>Li(t,e).map(r=>r/t),Fi=(t,e)=>{let{key:r,base:o,value:n,ratio:s,variable:i,index:a}=t,l=~~(n*s)-~~n,f,[u,d,h]=Li(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=Il(p+1,f,i,e),x={key:r+(p+1),variable:_,value:g,scaling:m,scalingVariable:y,index:b};eg(x,e)})},W_=1.618,jE=(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(W_,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=jE(f,r,o),h=~~(d/r*100)/100,g=c+u,p=$i(f,t),m={key:u,variable:g,value:d,base:r,scaling:h,scalingVariable:p,ratio:o,index:f};eg(m,t),s&&Fi(m,t)}return t},rg=(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=$i(a,t),p={key:i,variable:h,value:l,base:o,scaling:f,scalingVariable:g,ratio:n,index:a};return eg(p,c),s&&Fi(p,c),c},Ni=(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(fs(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+"-":""}${Si(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},Dl=(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:Ni(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=Dl(t,r):t=Ni(t,r),{[e]:o?`${o}(${t})`:t}},$l=(t,e)=>Ue[t-e],ji=t=>{let{h1Matches:e,sequence:r}=t;return new Array(6).fill(null).map((o,n)=>{let s=$l(e,n);return r[s]})};R();var og=(t,e)=>{let r=E(),{cssVars:o}=r;z(t.value)||(o[t.var]=t.value)},Bi=(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]=Mi(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})`},q_=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=q_.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||Bi(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"})`)}},vr=(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=q_.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}`]={}),Bi(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],_=(Kr(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 G_=Qr(),un=t=>{let e=E(),r="";for(let o in t)e.__svgCache[o]||(e.__svgCache[o]=!0,r+=t[o]);return r},BE=t=>{let e=t&&(t.default||t);if(!w(e))return G_&&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},{}):{}},UE=(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},K_=new Set,Ui=(t,e)=>{let r=e&&e.default?e.default:e;if(!w(r))return G_&&!K_.has(t)&&(K_.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=BE(e),{width:s,height:i}=n,a=n.viewBox||`0 0 ${s||24} ${i||24}`,f=UE(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=zE(f),f},VE="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",HE=new RegExp(`<(${VE})\\b([^>]*?)\\s*/>`,"g"),zE=t=>t.replace(HE,"<$1$2></$1>");var gn={};P(gn,{STANDARD_SCHEME_QUERIES:()=>Ll,appendSVGSprite:()=>oa,appendSvgIconsSprite:()=>ho,applyDocument:()=>ra,applyHeadings:()=>jl,applyReset:()=>na,applySpacingSequence:()=>Hi,applyTimingSequence:()=>ea,applyTypographySequence:()=>Zi,checkIfBoxSize:()=>Vi,getColor:()=>ot,getFontFamily:()=>Ji,getFontSizeByKey:()=>Qi,getMediaColor:()=>Rt,getMediaTheme:()=>pe,getSafeInk:()=>Ml,getSafeInkInfo:()=>ng,getShadow:()=>Wi,getShapeByKey:()=>ta,getSpacingBasedOnRatio:()=>Ee,getSpacingByKey:()=>xt,getTheme:()=>Ki,getTimingByKey:()=>te,getTimingFunction:()=>he,resolveBorderValue:()=>Qt,resolveColorRgb:()=>fo,resolveShadowValue:()=>uo,runThroughMedia:()=>Nl,setAdaptiveSchemeVar:()=>Ar,setColor:()=>Er,setFont:()=>Xi,setFontFamily:()=>pn,setGradient:()=>dn,setMediaTheme:()=>Yi,setSVG:()=>hn,setShadow:()=>Tr,setSvgIcon:()=>po,setTheme:()=>Gi,splitSpacedValue:()=>zi});R();var Ll={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},de=new Set,WE=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"]),Y_=new Set,qE=t=>{if(!t)return!1;let{color:e,gradient:r}=t;return!!(S(e)&&Object.keys(e).length||S(r)&&Object.keys(r).length)},J_=(t,e,r)=>{let o=w(e)?e.toLowerCase():"";if(!WE.has(o)||!qE(r))return t;if(!Y_.has(o)){Y_.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 J_(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})`},X_=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}},KE=(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}},fo=(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 X_(t);if(w(c)){let d;if(de.has(s))d=X_(c);else{de.add(s);try{d=fo(c,o,r)}finally{de.delete(s)}}return d?KE(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]||Ll[p];if(!_)continue;let b="@media "+(_==="print"?`${_}`:`screen and ${_}`);u[b]={[`${h} &`]:m}}}return u}}else return J_(t,n,o)},Ar=(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}},Er=(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]]=Er(_,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]=Er(t[m],e,m.slice(0,1)==="@"?m.slice(1):m));return o.useVariable&&Ar(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]=Er(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}},dn=(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]=dn(t[a],e,a.slice(0,1)==="@"?a.slice(1):a));return o.useVariable&&Ar(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 Ml=(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 Ro=Z&&Z.rgb!==void 0?n.useVariable&&Z.var?`var(${Z.var})`:Z.value:ot(Z,null,n);return p(Ro,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=ot(t,u?`@${u}`:null,n),_=fo(t,n,u),b=fo(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=io(b.rgb,b.alpha),x=io(_.rgb,_.alpha,y),k=nn(x,y);if(k>=f-.02)return p(m,{ratio:k,deviation:0,derived:!1,overridden:!1});let[C,T,$]=Ci(_.rgb),[,M,D]=Ei([C,T,$]),V=so(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:Ai(Z,M,D),L:Z}},ft=W=>{let{rgb:K}=G(W),Z=io(K.map(Ro=>Math.round(Ro)),_.alpha,y);return nn(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})},ng=(t,e,r={},o)=>Ml(t,e,{...r,meta:!0},o);R();R();var GE=t=>{let r=E().spacing||{},o=parseFloat(t.spacingRatio),n={...r,ratio:Number.isFinite(o)?o:r.ratio,sequence:{},scales:{}};return Kt(n),n},YE=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),vr(t,e)}},Vi=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),o=e.includes("border")||e.includes("outline");return r&&!o},Hi=()=>{let t=E(),{spacing:e}=t;Kt(e),er(e),YE(e)},XE=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=XE(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]:no(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=GE(t);return xt(i,e,a,o)}return xt(i,e,s,o)},zi=t=>{let e=r=>{let o=["+","-","*","/"].includes(r),n=Mo.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 uo=(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(", "),Tr=(t,e,r,o)=>{let n=E();if(O(t)){let a={"@light":Tr(t[0],e,"light"),"@dark":Tr(t[1],e,"dark")};return n.useVariable&&Ar(a,"shadow",e,n),a}if(S(t)){let a={};for(let c in t)a[c]=Tr(t[c],e,c.startsWith("@")?c.slice(1):c);return n.useVariable&&Ar(a,"shadow",e,n),a}w(t)&&!Zt.test(t)&&(t=uo(t));let i=`--${n.varPrefix?n.varPrefix+"-":""}shadow-${e}`+(r?`-${r}`:"");return n.useVariable&&(n.cssVars[i]=t),{var:i,value:t}},Wi=(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 JE=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),ZE=t=>JE.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(ZE(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 QE=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"]),Z_=["color","Color","background","Background","fill","Fill","stroke","Stroke"],tA=t=>{for(let e=0;e<Z_.length;e++)if(t.includes(Z_[e]))return!0;return!1},eA={boxShadow:uo,textShadow:uo,border:Qt,borderTop:Qt,borderRight:Qt,borderBottom:Qt,borderLeft:Qt,outline:Qt,columnRule:Qt},rA=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},Q_=new Set,oA=(t,e,r,o,n,s)=>{if(!Ot())return;let i=`${t}::${e}::${r||""}::${o}`;Q_.has(i)||(Q_.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.`))},ex=(t,e,r,o)=>{let n=eA[e];if(!n)return ot(r,o);let s=null,i=n(r,o,a=>{!s&&rA(a)&&(s=a)});return s&&oA(t,e,o,r,i,s),i},Fl=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},qi=t=>(t.value||(t.value=Fl(t)),t.value),Ki=(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 qi(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 qi(a[s]);if(i&&i[s])return qi(i[s]);if(c&&c[s])return qi(c[s])}else if(S(t))return Fl(t)},nA=(t,e,r)=>{if(S(e))t.variants.inverse.value=Fl(e);else if(e===!0){let{color:o,background:n}=r;t.variants.inverse={value:{color:n,background:o}}}},sA=(t,e,r,o)=>{let n=Ki(r);o[`&:${e}`]=n,S(r)&&!r.value&&(r.value=n)},iA=(t,e)=>{let{state:r}=t;return r?(Object.keys(r).map(n=>{let s=r[n];return sA(t,n,s,e),t}),t):void 0},aA=(t,e,r,o)=>{let n=Ki(r);o[`@media (prefers-color-scheme: ${e})`]=n,S(r)&&!r.value&&(r.value=n)},cA=(t,e)=>{let{media:r}=t;return r?(Object.keys(r).map(n=>{let s=r[n];return(n==="dark"||n==="light")&&aA(t,n,s,e),n==="inverse"&&nA(t,s,e),t}),t):void 0},lA=(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]:qi(o[s]),t}),t):void 0},Gi=(t,e)=>{let r=E();if(r.useVariable)return Yi(t,e);let{state:o,media:n,helpers:s}=t,i=Fl(t,e),c=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}`;return iA(t,i),cA(t,i),lA(t,i),{var:c,value:i,state:o,media:n,helpers:s}};var sg=(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===":")&&tA(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)&&!QE.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]=sg(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]=sg(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=ex(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},Yi=(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=sg(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]=Yi(f,e,c,o||u)}else if(!a){let u=ex(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},ig=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}`]=ig(t[o]):n==="."&&(r[`&${o}`]=ig(t[o]))}else r[o]=t[o]}return r},rx=(t,e)=>{let r=e.shift();return t[r]?rx(t[r],e):t},tx=(t,e)=>O(e)?rx(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=tx(s,n):s&&e&&(s=tx(s,e)),ig(s)};R();R();var Xi=(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;sn(s)?n=an(s):n=kr(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap"})}else if(t[0])n=co(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=kr(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch})}return{var:o,value:t,fontFace:n}},Ji=(t,e)=>{let r=E(),{fontFamily:o}=r;return ao(e||o,t)},pn=(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=no(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 Nl=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),vr(t,n);continue}pt(i,{sequence:{},scales:{},templates:{},vars:{}}),Kt(i),vr(t,n)}},jl=t=>{let e=E();if(t.h1Matches){let r=t.unit,o=ji(t),{templates:n}=t;for(let s in o){let i=`h${parseInt(s)+1}`,a=n[i];n[i]={fontSize:e.useVariable?`var(${o[s]?.variable})`:`${o[s]?.scaling}${r}`,margin:a?a.margin:0,lineHeight:a?a.lineHeight:t.lineHeight,letterSpacing:a?a.letterSpacing:t.letterSpacing,fontWeight:a?a.fontWeight:900-s*100}}}},Zi=()=>{let t=E(),{typography:e}=t;Kt(e),jl(e),er(e),Nl(e)},Qi=t=>{let e=E(),{typography:r}=e;return Ve(t,"fontSize",r)};R();var ta=t=>{if(!w(t))return;let r=E().shape;if(r)return r[t]!==void 0?r[t]:r[t.toLowerCase()]};R();var ea=()=>{let t=E(),{timing:e}=t;Kt(e),er(e)},he=t=>{let e=E(),{timing:r}=e;return r[t]||r[wi(t)]||t},te=(t,e="timing")=>{let r=E(),{timing:o}=r;return Ve(t,e,o)};R();var ra=()=>{let t=E(),{fontFamily:e,theme:r,typography:o}=t,n=t.document;return Ge(n)?(pr(t,"document",n),n=t.document={}):n||(n=t.document={}),pt(n,{theme:r.document,fontFamily:ao(e),fontSize:o.base,lineHeight:o.lineHeight})};R();var cg={document:et},hn=(t,e)=>{let r=E();if(!t){r.verbose&&console.warn("setSVG: val is not defined",e);return}return r.useSvgSprite?Ui(e,t):t},oa=(t,e=cg)=>{let r=E(),o=Object.keys(t).length?{}:r.svg;for(let n in t)o[n]=t[n];nx(o,e)},po=(t,e)=>{let r=E();return r.useIconSprite&&!r.semanticIcons?.[e]?hn(t,e):t},ho=(t,e=cg)=>{let r=E(),o=Object.keys(t).length?{}:r.icons;for(let n in t)o[n]=t[n];nx(o,e)},ag=(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},fA=(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},ox=(t,e,r)=>{for(;e.firstChild;){let o=e.firstChild;r.appendChild(t.importNode(o,!0)),o.remove()}},nx=(t,e=cg)=>{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"),un(t);let n=o.querySelector("#svgSprite"),s=un(t),i=`<svg aria-hidden="true" width="0" height="0" style="position:absolute" id="svgSprite">${s}</svg>`,a=fA(o,s);if(n)if(a)ox(o,a,n);else if(o.body.insertAdjacentHTML)n.insertAdjacentHTML("beforeend",s);else{let c=ag(o,{isRoot:!1});c.innerHTML=s,n.append(...c.children)}else if(a){let c=ag(o);c&&c.nodeType&&(ox(o,a,c),o.body.prepend(c))}else if(o.body.insertAdjacentHTML)o.body.insertAdjacentHTML("afterbegin",i);else{let c=ag(o);c&&c.nodeType&&(c.innerHTML=s,o.body.prepend(c))}};R();var na=(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 uA=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),He=t=>Qt(t),Bl=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(" "),Ul=(t,e)=>Wi(t,e),sa=(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(", "),ia=(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"||uA.has(f)||f==="transparent"||Zt.test(f))return f;let u=ot(f);return Ce(u)?u:f}).join(" ")));return o+a.join(", ")+s},Vl=(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")?ia(n,e):n.includes("/")||n.startsWith("http")||n.includes(".")&&!qt(n)?`url(${n})`:n}).join(", ")},Hl=t=>w(t)&&t.split(" ").map(e=>xt(e,"gap").gap).join(" "),lg=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},aa=(t,e,r)=>{if(w(t))return t.split(",").map(o=>te(o).timing||o).join(",")},zl=t=>{let e=t.split(",");if(e.length)return e.map(lg).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=Vi(t);!i&&a&&!o.ratio&&(n=zi(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=ta(n);return s!==void 0?s:Ee(e,r,n)[r]}).join(" ")}};R();var mn="__smblsThemeRootOwner",yn=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)},sx=(t,e,r)=>{if(!(!t||!e)){yn(t),t.__prefersListener=r,t.__prefersMq=e;try{e.addEventListener("change",r)}catch{e.addListener(r)}}},dA=(t,e)=>{let r=E(),{cssVars:o}=r,n=e.startsWith("--")?e:`--${e}`;return o[n]=t,t},Gt=t=>t,Wl={color:Er,gradient:dn,font:Xi,fontFamily:pn,fontfamily:pn,theme:Gi,icons:po,semanticIcons:Gt,semanticicons:Gt,svg:hn,svgData:Gt,typography:Gt,shadow:Tr,spacing:Gt,media:Gt,grid:Gt,class:Gt,timing:Gt,reset:Gt,unit:Gt,animation:Gt,vars:dA,sizes:Gt,shape:Gt},pA=(t,e,r,o)=>{pr(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},fg=(t,e,r)=>{let o=E(),n=Ii(t),s=n.toLowerCase(),i=o[n]||o[s]||o[t],a=Ge(i)?pA(o,i,s,[n,s,t]):i,c=Wl[n]||Wl[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")},ug=(t,e)=>{let r=E(),o=t.toLowerCase();return Ge(e)?(pr(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 fg(o,e[s],s)}catch(i){r.verbose&&console.warn("Error setting",o,"value",e[s],s,i)}}),r[o]||r[t])},ql=(t,e)=>{let r=e||E();r.globalTheme=t;let n=Lo(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[mn]=r,c)yn(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",sx(r,f,l)}else yn(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},hA={},go=(t,e=hA)=>{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=Pl(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=Lo(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")yn(r),C.setAttribute("data-theme",r.globalTheme),r.resolvedTheme=r.globalTheme,C[mn]=r,r.globalTheme==="dark"||r.globalTheme==="light"?C.style.colorScheme=r.globalTheme:C.style.colorScheme="light dark";else if(C[mn]&&C[mn]!==r&&C.hasAttribute("data-theme"))yn(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[mn]=r,sx(r,H,V)}else yn(r),C.setAttribute("data-theme","light"),r.resolvedTheme="light",C.style.colorScheme="light",C[mn]=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 ug(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{Zi()}catch(D){r.verbose&&console.warn("Error applying typography sequence",D)}if(b.spacing)try{Hi()}catch(D){r.verbose&&console.warn("Error applying spacing sequence",D)}if(b.timing)try{ea()}catch(D){r.verbose&&console.warn("Error applying timing sequence",D)}ra();let M=na();return M&&(r.reset=M),r};var mo=new Map,px=null,hg=null,gA=null;function ca(t){t.batchAtomicCss&&(hg=t.batchAtomicCss),t.compoundCssClass&&(gA=t.compoundCssClass)}var mA=new Set,ax=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function gg(t){try{let e=E();e&&(e.__domDocument=t)}catch{}t&&mA.add(t)}function Jl(){try{let t=E();if(t){if(ax(t.__domDocument))return t.__domDocument;if(ax(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 Zl(){return{...Yt}}function mg(){for(let t in Yt)Yt[t]=0;Yl=!1}var Yl=!1,Gl=(t,e)=>`${t} ${e}${t===1?"":"s"}`;function yA(t){let e=Date.parse(t);if(!isFinite(e))return"";let r=Math.floor((Date.now()-e)/864e5);return r<1?" (today)":` (${Gl(r,"day")} ago)`}function bA(){try{let t=Ql();return t&&t.cssRules?t.cssRules.length:-1}catch{return-1}}function _A(t,e){if(Yl)return!1;Yl=!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 ${Gl(Yt.variable,"variable rule")} and ${Gl(Yt.atomic,"atomic rule")}, while the design system held ${Gl(e,"CSS variable")}.
41
41
  The document will render UNSTYLED and nothing else will report an error.
42
42
  This is what a STALE dist/ looks like: an obsolete emitter against a current design system.
43
43
  package : ${n}
44
44
  built : ${r}
45
45
  source : ${o}
46
46
  emitted : ${JSON.stringify(Yt)}
47
- sheet : style[data-smbls] currently holds ${hA()} rule(s)
47
+ sheet : style[data-smbls] currently holds ${bA()} rule(s)
48
48
  FIX : cd smbls && npm run check:stale # every package whose src is newer than its dist
49
49
  then rebuild the listed packages and clear the app's .parcel-cache
50
- Do NOT trust any browser measurement taken on this page until that reads clean.`),!0}function 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&&gt(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&&gt(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?`
50
+ Do NOT trust any browser measurement taken on this page until that reads clean.`),!0}function hx(){try{let t=E(),e=t&&(t.CSS_VARS||t.cssVars);return e?Object.keys(e).length:0}catch{return 0}}function cx(t){Yl||Yt.variable>0||Yt.atomic>0||gx(Math.max(t,hx()))}function yg(t){let e=t&&(t.CSS_VARS||t.cssVars);return gx(e?Object.keys(e).length:hx())}function gx(t){let e=Zl();if(t===0)return{ok:!0,reason:"no-design-system",stats:e,varCount:t};if(!Ql())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 _A(r,t),{ok:!1,reason:r,stats:e,varCount:t}}var xA={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 yo(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Xl(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 wA(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Xl(e)}var SA={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select"};function bn(t,e){let r=SA[t];return r?`${t}:${e};${r}:${e};`:`${t}:${e};`}var kA="@media (hover: hover)",vA=/(?:^|[^\\]):hover(?![\w-])/;function bg(){try{let t=E();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function Ae(t,e,r){return r===!1||!vA.test(e)||r===void 0&&!bg()?t:`${kA}{${t}}`}function lx(t,e,r){let o=(r?r+"":"")+t+":"+e,n=mo.get(o),s=n?null:yo(t);if(!n){let c=xA[t]||Xl(t),l=wA(e);n=r?`_${r}_${c}-${l}`:`_${c}-${l}`,mo.set(o,n)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return n;let i=s||yo(t),a=`.${n}{${bn(i,e)}}`;return ge(a,void 0,"atomic"),n}var fx=new WeakMap,ux=new WeakMap;function ge(t,e,r){let o=Ql(e);if(!o)return Yt.dropped++,"dropped";let n=fx.get(o);if(n||(n=new Set,fx.set(o,n)),n.has(t))return Yt.duplicate++,Yt[r||"global"]++,"duplicate";let s=ux.get(o);if(s&&s.has(t))return Yt.invalid++,"invalid";try{o.insertRule(t,o.cssRules.length)}catch{return s||(s=new Set,ux.set(o,s)),s.add(t),Yt.invalid++,"invalid"}return n.add(t),Yt[r||"global"]++,"inserted"}var dx=new WeakMap;function Ql(t){let e=t||Jl();if(!e||!e.head)return null;let r=dx.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 dx.set(e,n),px=n,n}var CA=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]):hg?(o||(o=[]),o.push(c,String(l)),n++):s.push(lx(c,String(l),r)))}if(o&&n>=CA){let c=o.join("\0"),l=hg(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(lx(o[c],o[c+1],r));let a=[];for(let c=0;c<i.length;c++)a.push(TA(i[c][0],i[c][1],r));return s.concat(a).join(" ").trim()}var pg=new Map,EA=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function AA(t){return typeof t!="string"||!t||t.startsWith("@media")||t.startsWith("@supports")?!1:t.split(",").every(e=>EA.test(e.trim()))}function TA(t,e,r){let o=JSON.stringify(e),n=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,s=n&&bg(),i=(r?r+"":"")+t+o+(n&&!s?"rawhover":""),a=mo.get(i);if(a){let _=pg.get(a);if(_)for(let b=0;b<_.length;b++)ge(_[b],void 0,"atomic");return a}a=r?`_${r}_c${Xl(i)}`:`_c${Xl(i)}`;let c=`.${a}`,l=AA(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+=bn(yo(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 pg.set(a,p),mo.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 pg.set(a,p),mo.set(i,a),a}function wt(t){if(t==null||typeof t!="string"&&typeof t!="object")return;if(Ql(),typeof t=="string"){let s=t.indexOf("--")!==-1;ge(t,void 0,s?"variable":"global"),s&&cx(1);return}let e=bg(),r=0,o=Object.keys(t),n=s=>{let i=s.match(/max-width:\s*(\d+)/);return i?parseInt(i[1]):0};o.sort((s,i)=>{let a=s.startsWith("@media"),c=i.startsWith("@media");return!a&&!c?0:a?c?n(i)-n(s):1:-1});for(let s of o){let i=t[s];if(s.startsWith("@media")||s.startsWith("@supports"))for(let a in i){let c=i[a];if(typeof c=="object"&&c!==null){let l="",f=0;for(let u in c){let d=u.charCodeAt(0)===45&&u.charCodeAt(1)===45;d&&f++;let h=d?u:yo(u);l+=bn(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:yo(a);ge(`${s}{${bn(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:yo(f);a+=bn(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&&cx(r)}function _n(t,e){let r="";for(let o in e){let n="";for(let s in e[o])n+=bn(yo(s),e[o][s]);r+=`${o}{${n}}`}return ge(`@keyframes ${t}{${r}}`,void 0,"keyframes"),t}function mx(){mo.clear(),px=null}function _g(){return mo.size}R();var fm={};P(fm,{DELEGATED_EVENTS:()=>vn,LIFECYCLE_EVENTS:()=>Pr,MIXINS:()=>tf,NON_BUBBLING_EVENTS:()=>ef,REGISTRY:()=>Ft,SVG_TAGS:()=>Sn,addDelegatedEvent:()=>la,addMethods:()=>Rn,applyExtends:()=>En,cacheNode:()=>Rr,create:()=>ee,createHTMLNode:()=>wn,detectTag:()=>Or,dispose:()=>Lr,flushMounts:()=>ya,globalEventKeyInfo:()=>rf,isSvgTag:()=>kn,isValidTag:()=>xn,refreshContextProto:()=>lf,registerEvent:()=>Cn,registerGlobalEvent:()=>of,remove:()=>On,removeDelegatedEvent:()=>fa,update:()=>An});var wg="http://www.w3.org/2000/svg",Sn=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"]),OA=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 xn(t){return OA.has(t)||Sn.has(t)}function kn(t){return Sn.has(t)}function Or(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"&&xn(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]),xn(n)&&!o.has(n)?n:"div"}var yx={};function wn(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(kn(t)){let o=e?.parent;if(t==="svg"||o?.node?.namespaceURI===wg)return r.createElementNS(wg,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Rr(t){let e=t.tag=Or(t),o=kn(e)&&(e==="svg"||t.parent?.node?.namespaceURI===wg)?"svg:"+e:e,n=t?.context?.document||globalThis.document,s=yx[o];if(s||(s=yx[o]=wn(e,t)),!s)return null;let i=n&&s.ownerDocument!==n?wn(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"]),tf={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},Pr=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","mounted","contentUpdate","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","beforeRemove","remove"]),ef=new Set(["load","error","abort","scroll","canplay","canplaythrough","ended","pause","play","playing","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","durationchange","loadeddata","loadedmetadata","progress","emptied","resize"]),Sg=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),vn=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 vg=new WeakMap,RA={passive:!0},PA={passive:!0,capture:!0},Cg=(t,e)=>Sg.has(t)?e?PA:RA:e||!1;function _x(t){let e=vg.get(t);return e||(e={handlers:new Map,installed:new Set},vg.set(t,e)),e}function IA(t,e){let r=_x(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}},Cg(t,o))}function la(t,e,r,o){o||(o=e.ownerDocument?.documentElement||e.getRootNode());let n=_x(o);IA(t,o),n.handlers.has(t)||n.handlers.set(t,new WeakMap),n.handlers.get(t).set(e,r)}function fa(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let o=vg.get(r);if(!o)return;let n=o.handlers.get(t);n&&n.delete(e)}function bx(t){return vn.has(t)&&!Pr.has(t)}function xx(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 Cn(t,e,r){let{node:o,context:n}=e;if(!o)return;let s=xx(e,r),i=ef.has(t);if(!i&&bx(t)){let a=n?.rootNode||o.ownerDocument?.documentElement;la(t,o,s,a)}else o.addEventListener(t,s,Cg(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!i&&bx(t)){let a=n?.rootNode||o.ownerDocument?.documentElement;fa(t,o,a)}else o.removeEventListener(t,s,Cg(t,!1))})}var kg=[["onDocument","document"],["onWindow","window"]];function rf(t){if(typeof t!="string")return null;for(let e=0;e<kg.length;e++){let r=kg[e][0];if(t.length<=r.length||!t.startsWith(r))continue;let o=t.charCodeAt(r.length);if(!(o<65||o>90))return{target:kg[e][1],eventName:t.slice(r.length).toLowerCase()}}return null}var DA=/^[A-Za-z_$][\w$]*$/;function $A(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"&&DA.test(o)){let a=o;o=function(l){return t.call(a,l)}}return typeof o!="function"?null:(s===void 0&&(s=Sg.has(r)),{handler:o,capture:n,passive:s,once:i})}function LA(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 MA(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 of(t,e,r){let o=e.__ref;if(!o)return;let n=$A(e,r,t.eventName);if(!n)return;let s=LA(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=xx(e,n.handler),c=f=>{MA(e)&&a(f)},l={capture:n.capture,passive:n.passive,once:n.once};s.addEventListener(t.eventName,c,l),o.__globalEvents.set(i,{target:s,eventName:t.eventName,listener:c,options:l}),o.__eventCleanup||(o.__eventCleanup=[]),o.__eventCleanup.push(()=>{s.removeEventListener(t.eventName,c,l),o.__globalEvents&&o.__globalEvents.delete(i)})}function wx(t){let e=[];return t.extends&&(Array.isArray(t.extends)?e.push(...t.extends):e.push(t.extends)),t.extend&&(Array.isArray(t.extend)?e.push(...t.extend):e.push(t.extend)),e}function En(t,e,r){let o=wx(e);if(!o.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<o.length;i++){let a=Sx(o[i],s);a&&a!==e&&kx(t,a,r,new Set([e]))}}function Sx(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(n=>n.trim()),o=e[r[0]]||e[`smbls.${r[0]}`];for(let n=1;n<r.length&&o;n++)o=o[r[n]];return o||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function kx(t,e,r,o=new Set){if(o.has(e))return;o.add(e);let n=wx(e);if(n.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<n.length;a++){let c=Sx(n[a],i);c&&kx(t,c,r,o)}}for(let s in e){if(s==="extends"||s==="extend")continue;let i=e[s];t[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[s]={...i}:t[s]=i:typeof t[s]=="object"&&typeof i=="object"&&!Array.isArray(t[s])&&!Array.isArray(i)&&t[s]!==null&&i!==null?t[s]=vx(t[s],i):t[s]=i}}function vx(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]=vx(n,s):r[o]=s}return r}zo();R();var FA=["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"],nf={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"]},Ex=["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"],Dr=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()):Ax(t),NA=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate"]),Ax=t=>NA.has(t)?t.toLowerCase():null,jA=new Set(["draggable","contenteditable","spellcheck","autocorrect"]),or=t=>typeof t=="string"&&(jA.has(t)||t.startsWith("aria-")),ze=(t,e)=>e!==!0&&e!==!1?e:or(t)?e?"true":"false":e===!0?"":e,$r=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Dr(e)||nf.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(nf,t)?nf[t].includes(e):!1,Tg=t=>{if(!w(t))return!1;let e=t.toLowerCase();return Ex.includes(e)},BA=(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=$r(t,n),i=Tg(n);if(mt(e[n])&&(s||i)){let a=Dr(n)||n;o[a]=e[n]}}return o},UA=(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},Ir=(t,e)=>{let r=t.call("exec",e,t);if(r)return w(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},Eg=(t,e)=>{let r=(t.preSrc||"")+(Ir(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},Ag={src:t=>Eg(t,t.src),href:t=>Ir(t,t.href),action:t=>Ir(t,t.action),poster:t=>Eg(t,t.poster),data:t=>Ir(t,t.data)},Og=t=>{let e=t.tag||"div",r={};for(let o in Ag)if(t[o]!==void 0&&$r(e,o)){let n=Ag[o](t);n!==void 0&&(r[o]=n)}return r},Cx=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},VA=(t,e,r)=>{if(t==="$"){let n=Cx(e,r);return n===void 0&&(n=!!r[e]),n}let o=r[e]===!0||r.state[e];if(!o){let n=Cx(e,r);n!==void 0&&(o=n)}return t==="."?!!o:!o},HA=new Set(["$",".","!"]),zA=(t,e,r)=>{let o={},n=(s,i,a,c)=>{let l=i;o[s]=f=>{if(VA(a,c,f))return A(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!HA.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=$r(e,l),u=Tg(l);if(!f&&!u)continue;let d=Dr(l)||l;n(d,a[l],i,c)}}return o};function An(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"&&Rg(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(cc(()=>{if(t.state&&gt(r.state)&&r.state.$update(t.state),t.text!==void 0&&(r.text=t.text,!o.__exec.text&&r.node&&Tn(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 Lr(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&&Lr(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 On(){Lr(this)}R();R();R();var WA=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],qA=["none","forwards","backwards","both"],KA=["normal","reverse","alternate","alternate-reverse"],GA=["running","paused"],YA=t=>/^[\d.]+m?s$/.test(t),XA=/^(?: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*\))$/,JA=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=>XA.test(o.replace(/\s+/g,"")))},Tx=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),ZA={transform:JA,translate:Tx,rotate:t=>Tx(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},QA=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},tT=t=>{if(!S(t))return null;let e=null,r=-1;for(let o in t){let n=QA(o);n==null||!S(t[o])||n>=r&&(r=n,e=t[o])}return e},eT=t=>{let e=tT(t);if(!e)return!1;let r=Object.keys(e);if(!r.length)return!1;for(let o of r){let n=ZA[o];if(!n)return!1;let s=e[o];if(s==null||typeof s=="object"||typeof s=="function"||!n(s))return!1}return!0},rT=(t,e)=>{if(S(t))return t;let{animation:r}=e.context&&e.context.designSystem||{},o=r&&r[t];return S(o)?o:null},oT=["reverse","alternate","alternate-reverse"],Ox=(t,e,r)=>{let o=r||e.animationDirection;return o&&oT.includes(String(o))?"both":eT(rT(t,e))?"backwards":"both"},nT=0,Rx=new Map,Pg=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(S(t)){let n=JSON.stringify(t),s=Rx.get(n);if(s)return s;let i=`smbls-anim-${nT++}`,a=_n(i,t);return Rx.set(n,a),a}let o=r&&r[t];return S(o)?_n(t,o):t},sT=(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:YA(u)?s.push(u):WA.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):KA.includes(u)?c=u:qA.includes(u)?l=u:GA.includes(u)?f=u:n||(n=u);return{name:n,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},Ig={animation:(t,e)=>{if(w(t)&&t.includes(" ")){let r=sT(t,e);return{animationName:Pg(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||Ox(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:Pg(t,e),animationDuration:te(e.animationDuration||"A").timing,animationDelay:te(e.animationDelay||"0s").timing,animationTimingFunction:he(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||Ox(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:Pg(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 Dg={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:Hl(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 $g={fontSize:t=>Qi(t)||t,fontFamily:t=>({fontFamily:Ji(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 Lg={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 Mg={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 sf=0,Fg=()=>{sf++},Ng=()=>{sf>0&&sf--},ye=({context:t,state:e})=>{let r=t?.designSystem,o=e?.root?.globalTheme||r?.globalTheme;return o&&o!=="auto"?o:sf>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},jg={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:ia(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",Vl(t,n))},textStroke:t=>({WebkitTextStroke:Bl(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",Ul(t,r))},boxShadow:(t,e)=>{if(!w(t))return;let[r,o]=t.split("!importan"),n=ye(e),s=o?" !important":"",i=sa(r.trim(),n);return w(i)?{boxShadow:i+s}:re("boxShadow",i)},textShadow:(t,{context:e})=>re("textShadow",sa(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:He(t)})};var ua={transition:t=>({transition:zl(t)}),transitionDuration:t=>({transitionDuration:aa(t)}),transitionDelay:t=>({transitionDelay:aa(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 Ug={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={...Ig,...Dg,...$g,...Lg,...Mg,...jg,...ua,...Bg,...Ug};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 iT=/^-?[A-Z][0-9]?$/,aT=/^[a-z][0-9]?$/,Px=/var\(\s*(--[A-Za-z0-9-]+)/g,cT=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}},lT=(t,e)=>{if(!e.size)return[];let r=t.split(/[(),\s]+/).filter(Boolean),o=new Set;for(let n of r){if(!iT.test(n))continue;let s=n.charCodeAt(0)===45?n.slice(1):n;e.has(s)&&o.add(n)}return[...o]},fT=(t,e)=>{if(!e.size)return[];let r=[];Px.lastIndex=0;let o;for(;o=Px.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(!aT.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},af=new Set,Ix=(t,e,r)=>{if(!Ot()||!w(e)||!e)return;let o;try{o=E()}catch{return}let{knownLetters:n,knownVars:s}=cT(o);if(!n.size&&!s.size)return;let i=lT(e,n),a=fT(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}`;af.has(f)||(af.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}`;af.has(u)||(af.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 uT=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,dT=(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(uT),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},Dx=(t,e,r)=>({[t]:oe(e,r)}),da=(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}},Vg=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},pT=(t,e,r)=>{let o=t.slice(1),n=Vg(o,r);if(n===void 0&&(n=!!r[o]),!!n)return oe(e,r)},hT=(t,e,r)=>({[t]:e}),gT=(t,e,r)=>{let o=t.slice(1),n=r[o]===!0||r.state?.[o];if(!n)if(typeof r[o]=="function")try{n=r[o](r,r.state,r.context)}catch{}else{let s=Vg(o,r);s!==void 0&&(n=s)}if(n)return oe(e,r)},mT=(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=Vg(o,r);s!==void 0&&(n=s)}if(!n)return oe(e,r)},Hg=(t,e)=>oe(t,e),zg={"@":dT,":":da,"[":da,"*":da,"+":da,"~":da,"&":Dx,">":Dx,$:pT,"-":hT,".":gT,"!":mT};var cf=mr(),$x=(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,Hg(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),!cf&&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),!cf&&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})`),cf||Ix(a,l,e),i(a,{[a]:l}),!cf&&S(n[a])&&(n[a].label=a)}else s[a]=c}return[n,s]}finally{o&&rt()}},Lx=(t,e)=>{let r={};for(let o in t){let n=zg[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]=$x(t,e,r),s=Lx(n,e),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return Es(o,s);o._selectors=s}return o},yT=(t,e)=>{let r={};if(t.class)for(let o in t.class)r[o]=t.class[o](e);return r};R();var Mx=t=>{if(S(t))return oe(t,t)},bT=(t,e)=>{let r=Mx(t);return typeof e=="function"?e(r):me(r)};R();function qg(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 Fx=new Set;function _T(t,e,r){let o=String(e);if(Fx.has(o))return;Fx.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.`;qg(t,"error",[a]),console.error(a)}function xT(...t){return qg(this,"warn",t),fi.apply(this,t)}function wT(...t){return qg(this,"error",t),ro.apply(this,t)}var Nx={update:An,remove:On,getDB:hi,getQuery:gi,getRootData:ai,getChildren:ri,getPath:oi,nextElement:ui,previousElement:di,verbose:Yo,warn:xT,error:wT,variables:pi,spotByPath:ei,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:ii,getRootState:si,getRootContext:ci,getContext:li,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()&&_T(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)}},Wg=new WeakMap;function ST(t){if(!t)return Nx;let e=Wg.get(t);if(e)return e;e=Object.create(Nx);let r=t.methods;if(r)for(let o in r)e[o]=r[o];return Wg.set(t,e),e}function Rn(t){let e=ST(t.context);Object.setPrototypeOf(t,e)}function lf(t){if(!t)return!1;let e=Wg.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();zo();var Jg={};P(Jg,{STATE_METHODS:()=>jx,applyInitialState:()=>uf,applyStateMethods:()=>ne,callStateMethod:()=>pa,createState:()=>Gg,isTracking:()=>Xg,useHostState:()=>Yg});var jx=new Set(["update","parse","clean","destroy","create","add","toggle","remove","set","replace","setByPath","setPathCollection","removeByPath","removePathCollection","getByPath","reset","apply","applyReplace","applyFunction","quietUpdate","quietReplace","rootUpdate","parentUpdate","keys","values","__element","__children","parent","root"]),ff=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},Te=(t,e,r,{onlyIfAbsent:o}={})=>{ff(t,"$"+e,r),!(o&&Object.prototype.hasOwnProperty.call(t,e))&&ff(t,e,r)},pa=(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&&gt(a.parent);)a=a.parent;return pa(a,"update",s,i)}),Te(n,"parentUpdate",function(s,i={}){if(e.parent)return pa(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(ff(e,"$"+n,o[n]),typeof e[n]!="function"){if(Object.prototype.hasOwnProperty.call(e,n)){uc(n,"");continue}ff(e,n,o[n])}};var Gg=function(t,e,r){return t.state=uf(t,e,r),t.state},uf=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",kT(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 Kg(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 kT(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?Kg(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?Kg(n,s):n??{}}let o=Kg(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 Yg=(t,e)=>{if(!t)return Ux;let r=CT(t,e);return!r||!r.state?Ux:AT(r.state)},Xg=()=>lc()!=null,vT=128;function CT(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<vT&&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 ET={get(t,e){return t[e]}},Bx=new WeakMap,AT=t=>{let e=Bx.get(t);return e||(e=new Proxy(t,ET),Bx.set(t,e)),e},Ux=new Proxy(Object.create(null),{get(){},has(){return!1}});var TT=1,ga=[],em=!1;function Vx(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function OT(){return typeof document<"u"&&document.visibilityState==="hidden"}var RT=250;function Yx(){if(!em){if(em=!0,typeof requestAnimationFrame!="function"){setTimeout(ya,0);return}OT()?setTimeout(ya,RT):requestAnimationFrame(ya)}}var PT=300,IT=15e4;function ya(){if(em=!1,!ga.length)return;let t=ga.splice(0,ga.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=Vx());let n=Vx()-o.__mountFirstAttemptAt;o.__mountAttempts<=PT&&n<IT?(ga.push(r),Yx()):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 Xx(t,e){typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,ga.push(t),Yx())}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 In(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function DT(t){return t.charAt(2).toLowerCase()+t.slice(3)}function $T(t){return t.toLowerCase()}function rm(t){let e=t.charCodeAt(0);return e===58||e===64||e===38}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 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||`_${TT++}`,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.`)}}En(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]=ma(_,m):b&&a.has(p)?s[p]={..._,...m}:b&&rm(p)?s[p]=ma(_,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]=ma(b,_):y&&a.has(m)?s[m]={...b,..._}:y&&rm(m)?s[m]=ma(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=fc(p,h)}else h&&(s.scope=h);if(t.if!==void 0&&(s.if=t.if),Rn(s),LT(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"&&Qx(s,i,s.if),s;s.tag||(s.tag=Or(s)),sr("Init",s,o);let g=s.node=Rr(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),ow(s,o),Zx(s),om(s),ew(s),JT(s);try{nw(s,o)}catch(p){if(typeof console<"u"&&console.error){let m=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${m}:`,p?.message||p,p?.stack?`
52
52
  `+p.stack.split(`
53
53
  `).slice(0,6).join(`
54
- `):"")}}if(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)+`
54
+ `):"")}}if(im(s,!0),sw(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),Xx(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 LT(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=Jx(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 Zg(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 Jx(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let n=t.slice(3);return n?Zg(e.state,n):e.state??{}}if(t.startsWith("~/")){let n=e.state?.root||e.state,s=t.slice(2);return s?Zg(n,s):n??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=Zg(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 MT=new Set(["s","state","ctx","context"]);function FT(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 NT(t){if(typeof t!="function"||t.length!==2)return!1;let e=FT(t);if(e.length<2)return!1;let r=e[1].replace(/[{}[\]]/g,"").trim();return r.length>0&&!MT.has(r)}function jT(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||In(a)||bt[a]||kt&&kt.has(a)||$r(r,a)||(Ot()&&NT(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 BT(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 BT(t,e),r.apply(this,o)}}function ha(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function vt(t,e){return()=>t.path.join(".")+"::"+e}function Zx(t,e){let r=t.__ref,o=!!(e&&e.skipIfEffect);if(jT(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=Gr.call(t,c,t.state)),Tn(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=Gr.call(t,s,t.state);a!=null&&(t.text=a),t.node&&Tn(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)&&!In(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=nm(h),m=g&&t.node.style.display!=="none";(p===null||p!==l||m)&&(l=p,Pn(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,Pn(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=nm(l);(f===null||f!==a)&&(a=f,Pn(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,ha(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,Pn(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,ha(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,ha(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,ha(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,ha(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"&&Qx(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||In(s))continue;let a=t[s];r.__exec[s]=a;let c=t.tag||"div";if($r(c,s)&&!bt[s]&&!(kt&&kt.has(s))){let l=Dr(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(zT(t),KT(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)}qT(t)}function zx(t){let e=t.parent,r=e?.node;if(!r||!t.node){sw(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 Qx(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=Rr(t)),t.node&&(t.node.ref=t),zx(t),om(t);else{if(e.__ifInitialized=!0,t.tag||(t.tag=Or(t)),sr("Init",t,{}),t.node||(t.node=Rr(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),ow(t,{}),Zx(t,{skipIfEffect:!0}),om(t),ew(t),nw(t,{}),zx(t),Xx(t,{})}},{depth:e.path.length,label:vt(e,"if")});e.__effects.push(n)}function Tn(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 om(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&Tn(t,t.text),YT(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"&&Pn(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 nm(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function Pn(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&&VT(t,r)}var UT=0;function VT(t,e){let r=`_ds${UT++}`;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
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,
56
+ `),u&&(s+=u)}}s&&(n.textContent+=s)}var Wx=new Set;function qx(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 HT(t,e,r){let o=qx(r);queueMicrotask(()=>{if(!t.__ref)return;let n;try{n=e(t,t.state,t.context)}catch{return}if(qx(n)===o)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";Wx.has(s)||(Wx.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 zT(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()&&HT(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(Rg(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 cm(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 Kx=new Set;function WT(t,e){let r=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",o=r+"::"+t;Kx.has(o)||(Kx.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 Dn(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(cm(i,e)){let u=Dn(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()&&WT(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=Dn(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 lm(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)&&lm(t[r],e+1))return!0}return!1}function tw(t,e,r){if(!e||typeof e!="object"||Array.isArray(e))return null;if(cm(t,r)){let s=Dn(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=Dn(e,r,!1);return Object.keys(n).length?{cssProp:o,block:n}:null}function qT(t){let e=t.__ref;for(let r of Object.keys(t)){if(!rm(r))continue;let o=t[r];if(!o||typeof o!="object"||Array.isArray(o)||!lm(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=tw(r,o,t),u=f?nm(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 KT(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(cm(y,t)){let T=Dn(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 $=Dn(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){Pn(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 Qg=new WeakSet;function GT(t){let e=t.ownerDocument;!e||Qg.has(e)||(Qg.add(e),queueMicrotask(()=>{Qg.delete(e);let r=e.body||e.documentElement;r&&r.offsetWidth}))}var tm=new WeakSet,Gx=!1;function YT(t){let{node:e}=t;if(!e)return;if(Gx||(Gx=!0,me({display:"none"})),tm.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}tm.add(t);let r=t.context?.designSystem;r&&st(r),Fg();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)&&!In(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(lm(a))continue;let c=tw(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&&GT(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{Ng(),r&&rt(),tm.delete(t)}}function ew(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=Og(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)&&!In(n)&&!(bt[n]||kt&&kt.has(n))&&$r(o,n)){let i=t[n];if(i==null||(typeof i=="string"&&i.includes("{{")&&(i=Gr(i,t,t.state,t.context),t[n]=i),i==null||typeof i=="function"||typeof i=="object")||i===!1&&!or(Dr(n)||n))continue;let a=Dr(n)||n;e.setAttribute(a,ze(a,i))}}}function XT(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 JT(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}XT(t,a)},{depth:r.path.length,label:vt(r,"autoGrow")});r.__effects||(r.__effects=[]),r.__effects.push(s),n&&(r.__exec.autoGrow=o)}var rw=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function ow(t,e){for(let r of Object.keys(t)){if(!In(r)||rw.has(r))continue;let o=rf(r);if(o){of(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=DT(r);Pr.has(s)||Cn($T(s),t,n)}ZT(t)}function ZT(t){let e=t.node;if(!e||!e.addEventListener)return;let r={},o=!1;for(let d of rw){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 ba(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]=ba(n,s):r[o]=s}return r}function sm(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=ba(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=Jx(e,t);if(Array.isArray(n))return sm(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=ba(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 im(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 nw(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 Ro=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${I}" failed to patch at ${Ro} (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:_}),im(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=[],sm(t,h,e),im(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=sm(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=ba(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=ba(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 sw(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 am=3;function Rg(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=am?!1:(t.__inBeforeUpdate=!0,!0)}function nr(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===am&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${am}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 iw={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"]},aw={"gradient-blue-light":`linear-gradient(to right,
57
57
  rgba(4, 116, 242, 1),
58
58
  rgba(0, 48, 103, 1)
59
59
  )`,"gradient-blue-dark":`linear-gradient(to right,
@@ -79,28 +79,28 @@ FROM ${a}${l}`},cE=t=>{let e=[],r=(o,n)=>{for(let s in o){let i=n?`${n}/${s}`:s;
79
79
  #1E54F0 36%,
80
80
  #8B4CCA 69%,
81
81
  #C66894 100%
82
- )`};var 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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};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=`
82
+ )`};var QT={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"}}}},t1={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},e1={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"}}},cw={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...QT,...t1,...e1,none:{color:"none",background:"none"},transparent:{color:"currentColor",background:"transparent"}};var lw={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var fw={ratio:1.618,subSequence:!0};var uw={SourceSans:[{url:""}]},dw={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 pw={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 hw={tv:"(min-width: 2780px)",screenL:"(max-width: 1920px)","screenL<":"(min-width: 1920px)",screenM:"(max-width: 1680px)","screenM<":"(min-width: 1680px)",screenS:"(max-width: 1440px)","screenS<":"(min-width: 1440px)",tabletL:"(max-width: 1366px)","tabletL<":"(min-width: 1366px)",tabletM:"(max-width: 1280px)","tabletM<":"(min-width: 1280px)",tabletS:"(max-width: 1024px)","tabletS<":"(min-width: 1024px)",mobileL:"(max-width: 768px)","mobileL<":"(min-width: 768px)",mobileM:"(max-width: 560px)","mobileM<":"(min-width: 560px)",mobileS:"(max-width: 480px)","mobileS<":"(min-width: 480px)",mobileXS:"(max-width: 375px)","mobileXS<":"(min-width: 375px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var gw={base:150,ratio:1.333,unit:"ms",subSequence:!0};var mw={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var _a={version:"0.0.1",color:iw,gradient:aw,theme:cw,typography:lw,spacing:fw,font:uw,fontFamily:dw,timing:gw,icons:pw,media:hw,sizes:mw,reset:{html:{},body:{}},animation:{fadeIn:{from:{opacity:0},to:{opacity:1}}},devices:{},class:{},svg:{},grid:{},shape:{}};var Ln={};P(Ln,{A:()=>DS,AssetPicture:()=>$w,Audio:()=>Fw,Avatar:()=>GS,B:()=>rS,Block:()=>yw,Box:()=>mf,Br:()=>iS,Button:()=>MS,ButtonSet:()=>BS,COMPONENTS:()=>bo,Caption:()=>Kw,Checkbox:()=>mS,CheckboxHgroup:()=>yS,Circle:()=>Pw,CircleButton:()=>NS,Clickable:()=>Tw,Data:()=>nS,Dialog:()=>VS,DialogFooter:()=>zS,DialogHeader:()=>HS,Dropdown:()=>XS,DropdownList:()=>JS,DropdownParent:()=>ZS,DropdownParentFocus:()=>QS,DropdownSiblingFocus:()=>t0,FileIcon:()=>OS,Flex:()=>_w,Focusable:()=>Ow,FocusableComponent:()=>Rw,Footnote:()=>eS,Form:()=>Cw,Grid:()=>ww,Gutter:()=>kw,H1:()=>Bw,H2:()=>Uw,H3:()=>Vw,H4:()=>Hw,H5:()=>zw,H6:()=>Ww,Headline:()=>Qw,Hgroup:()=>uS,HgroupButton:()=>pS,HgroupRows:()=>dS,Hoverable:()=>Aw,Hr:()=>sS,I:()=>oS,Icon:()=>AS,IconButton:()=>US,IconText:()=>TS,Iframe:()=>Ew,Img:()=>vw,Inline:()=>bw,InlineFlex:()=>xw,InlineGrid:()=>Sw,Input:()=>hS,Italic:()=>Jw,KangorooButton:()=>jS,Li:()=>aS,Link:()=>jm,Notification:()=>e0,NumberInput:()=>gS,Ol:()=>lS,P:()=>qw,Picture:()=>Dw,Radio:()=>bS,RadioHgroup:()=>_S,Range:()=>YS,RouteLink:()=>$S,RouterLink:()=>Bm,SHAPES:()=>hf,Select:()=>LS,Shape:()=>mm,Span:()=>jw,SquareButton:()=>FS,Strong:()=>Gw,Subhead:()=>tS,Svg:()=>Lw,Text:()=>Nw,Textarea:()=>SS,TextareaWithButton:()=>kS,Theme:()=>Iw,Title:()=>Zw,Toggle:()=>xS,ToggleHgroup:()=>wS,Tooltip:()=>WS,TooltipHidden:()=>qS,TooltipParent:()=>KS,U:()=>Yw,Ul:()=>cS,Underline:()=>Xw,Video:()=>Mw,depth:()=>gf,focusableRingEnabled:()=>df,getSystemGlobalTheme:()=>xa});var um={};P(um,{Block:()=>yw,Flex:()=>_w,Grid:()=>ww,Gutter:()=>kw,Inline:()=>bw,InlineFlex:()=>xw,InlineGrid:()=>Sw});var yw={display:"block"},bw={display:"inline"},_w={display:"flex"},xw={display:"inline-flex"},ww={display:"grid"},Sw={display:"inline-grid"},kw={boxSize:"C1"};var dm={};P(dm,{Img:()=>vw});R();var vw={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?ki(e):"")||t.srcset}}};var pm={};P(pm,{Form:()=>Cw});var Cw={tag:"form"};var hm={};P(hm,{Iframe:()=>Ew});var Ew={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var gm={};P(gm,{Clickable:()=>Tw,Focusable:()=>Ow,FocusableComponent:()=>Rw,Hoverable:()=>Aw,focusableRingEnabled:()=>df});var r1={appearance:"none",cursor:"pointer",fontFamily:"inherit"},Aw={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}}},Tw={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}};function df(t){let e=t.context&&t.context.designSystem;return!e||e.focusableRing!==!1}var Ow={border:"none",outline:t=>df(t)?"solid 0 blue.3":"none",":focus-visible":{opacity:1,outline:t=>df(t)?"solid X blue.3":"none"},attr:{tabIndex:t=>t.tabIndex}},Rw={extends:"Focusable",tag:"button",fontSize:"A",type:"button",border:"none",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",fontFamily:"inherit",style:r1};var _m={};P(_m,{Picture:()=>Dw});var bm={};P(bm,{Theme:()=>Iw,getSystemGlobalTheme:()=>xa});var ym={};P(ym,{Circle:()=>Pw,SHAPES:()=>hf,Shape:()=>mm,default:()=>o1,depth:()=>gf});R();var be=E(),gf={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}`}},$n=t=>ot(t.shapeDirectionColor)||ot(t.borderColor)||ot(t.backgroundColor)||ot(t.background),pf=t=>{let e=ua.transition(t.transition,t);return e&&e.transition},hf={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:$n(t),transition:pf(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:$n(t),transition:pf(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:$n(t),transition:pf(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:pf(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${$n(t)} 25%, transparent 25%), linear-gradient(315deg, ${$n(t)} 25%, transparent 25%)`},"&:after":{background:$n(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)"}}}},mm={deps:{exec:ct,getSpacingBasedOnRatio:Ee,getMediaColor:Rt},classlist:{shape:t=>t.deps.exec(hf[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=hf[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}}},Pw={round:"100%"},o1=mm;R();var xa=({context:t,state:e})=>{let r=e&&e.root,o=r&&r.globalTheme||t.designSystem&&t.designSystem.globalTheme;return o==="auto"?null:o},Iw={deps:{depth:gf},classlist:{depth:t=>!Et(t.depth)&&t.deps.depth[t.depth]}};var Dw={deps:{getSystemGlobalTheme:xa},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:xa},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 xm={};P(xm,{AssetPicture:()=>$w});R();var $w={tag:"picture",children:t=>{let e=Wt(t);if(e)return vi(e,t.alt)}};var wm={};P(wm,{Svg:()=>Lw});var Lw={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 Sm={};P(Sm,{Video:()=>Mw});R();var Mw={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 km={};P(km,{Audio:()=>Fw});R();var Fw={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 vm={};P(vm,{B:()=>rS,Caption:()=>Kw,Data:()=>nS,Footnote:()=>eS,H1:()=>Bw,H2:()=>Uw,H3:()=>Vw,H4:()=>Hw,H5:()=>zw,H6:()=>Ww,Headline:()=>Qw,I:()=>oS,Italic:()=>Jw,P:()=>qw,Span:()=>jw,Strong:()=>Gw,Subhead:()=>tS,Text:()=>Nw,Title:()=>Zw,U:()=>Yw,Underline:()=>Xw});var Nw={},jw={tag:"span"},Bw={tag:"h1"},Uw={tag:"h2"},Vw={tag:"h3"},Hw={tag:"h4"},zw={tag:"h5"},Ww={tag:"h6"},qw={tag:"p"},Kw={tag:"caption"},Gw={tag:"strong",fontWeight:"700"},Yw={tag:"u"},Xw={tag:"u"},Jw={tag:"i"},Zw={},Qw={tag:"h6",fontSize:"B",fontWeight:500},tS={tag:"span",fontSize:"Z1"},eS={tag:"span",fontSize:"Z"},rS={tag:"b"},oS={tag:"i"},nS={tag:"data"};var Cm={};P(Cm,{Box:()=>mf,Br:()=>iS,Hr:()=>sS,Li:()=>aS,Ol:()=>lS,Ul:()=>cS});var n1=t=>{if(!t.context)return;let{props:e,__ref:r}=t,o=oe(e,t,{unpack:!1});r.__class=o},mf={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:n1},sS={tag:"hr",margin:"C1 0"},iS={tag:"br"},aS={tag:"li"},cS={tag:"ul",childExtends:{extends:"Li"}},lS={tag:"ol",childExtends:{extends:"Li"}};var Em={};P(Em,{Hgroup:()=>uS,HgroupButton:()=>pS,HgroupRows:()=>dS});var fS=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},uS={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:fS,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:fS,margin:"0",color:"paragraph"}},dS={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},pS={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var Am={};P(Am,{Input:()=>hS});var hS={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 Tm={};P(Tm,{NumberInput:()=>gS});var gS={extends:["Flex","Input"],type:"number",boxSize:"C+X",align:"center center",textAlign:"center",round:"Y1",theme:"transparent",border:"solid gray3",borderWidth:"1px",placeholder:"0",fontWeight:"400","::-webkit-inner-spin-button":{appearance:"none"},attr:{step:t=>t.step,min:t=>t.min,max:t=>t.max}};var Om={};P(Om,{Checkbox:()=>mS,CheckboxHgroup:()=>yS});var mS={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"}}},yS={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var Rm={};P(Rm,{Radio:()=>bS,RadioHgroup:()=>_S});var bS={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}},_S={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var Pm={};P(Pm,{Toggle:()=>xS,ToggleHgroup:()=>wS});var xS={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}},wS={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var Im={};P(Im,{Textarea:()=>SS,TextareaWithButton:()=>kS});var SS={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"}},kS={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 Dm={};P(Dm,{FileIcon:()=>OS,Icon:()=>AS,IconText:()=>TS});var vS=new Set,CS=(t,e)=>{if(!vS.has(t)&&(vS.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.`)}},ES=new WeakMap,s1=t=>{let e=ES.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},ES.set(t,e)),e},i1=(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},a1=(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=po(e[i],i);a&&(t.icons[i]=a,s[i]=a)}return t.useIconSprite&&o&&Object.keys(s).length&&ho(s,{document:o}),Object.keys(s).length>0}finally{rt()}},c1=(t,e,r,o,n)=>{let s=t&&t.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=s1(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=i1(f,r);return u?a1(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},AS={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&&(c1(r,p,m,t,V=>{if(!(d&&d._disposed)){if(!V)return CS(p,t);h()}})||CS(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"}},TS={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},OS={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var Um={};P(Um,{A:()=>DS,Link:()=>jm,RouteLink:()=>$S,RouterLink:()=>Bm});var wa={};P(wa,{default:()=>p1,getActiveRoute:()=>Nm,lastLevel:()=>bf,lastPathname:()=>yf,matchRoute:()=>Lm,parseQuery:()=>Mm,parseRoutePattern:()=>$m,router:()=>We,runGuards:()=>Fm});R();var PS=/^:(.+)/,IS=/^\*$/,RS=new Map,$m=t=>{let e=RS.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(PS);a?o.push({index:i,name:a[1]}):IS.test(r[i])&&(n=!0)}let s={segments:r,params:o,hasWildcard:n,pattern:t};return RS.set(t,s),s},Lm=(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=$m(l),u=l1(n,f);u>a&&(a=u,i=l,c=f1(n,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},l1=(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(PS.test(r[i]))n+=1;else if(IS.test(r[i]))n+=.5;else return-1;return n},f1=(t,e)=>{let r={};for(let{index:o,name:n}of e.params)t[o]&&(r[n]=decodeURIComponent(t[o]));return r},Mm=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},Fm=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},Nm=(t=0,e)=>{e||(e=typeof v<"u"?v.location.pathname:"/");let o=e.split("/")[t+1];if(o)return`/${o}`},yf,bf=0,u1=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,d1={level:bf,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={...d1,...n.context.routerOptions,...o};bf=a.lastLevel;let c=n.__ref;(a.contentElementKey!=="content"&&a.contentElementKey!==c.contentElementKey||!c.contentElementKey)&&(c.contentElementKey=a.contentElementKey||"content");let l=c.contentElementKey||a.contentElementKey||"content",f=s.location.origin!=="null"?s.location.origin:"http://localhost";t=u1(t);let u=typeof s.URL=="function"?s.URL:typeof globalThis<"u"&&globalThis.URL||URL,d=new u(f+t),{pathname:h,search:g,hash:p}=d,m=Mm(g),_=n.node,b=p&&p!==s.location.hash.slice(1),y=h!==yf;yf=h;let x=c.__routerRendered,k,C,T,$;if(a.useParamsMatching){let H=Lm(h,n.routes,a.level);k=H.key,C=H.routePath,T=H.content,$=H.params}else{k=Nm(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 Fm(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})}}br("routeChanged",n,a)},p1=We;var h1=(t,e,r)=>{let{context:o}=e,{href:n,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",n,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=o,d=e.__ref.root,h=a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")||a.startsWith("sketch:")||a.startsWith("whatsapp:")||a.startsWith("sms:")||a.startsWith("skype:")||a.startsWith("viber:")||a.startsWith("callto:")||a.startsWith("facetime:")||a.startsWith("facetime-audio:")||a.startsWith("geo:")||a.startsWith("maps:");if(a&&!h){t.preventDefault();try{let g=d;if(u&&u.customRouterElement){let p=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let _ 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)}}},jm={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:t=>Ir(t,t.href)||Ir(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:h1},DS={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)}}}},$S={extends:[jm,Bm]};var Vm={};P(Vm,{Select:()=>LS});var LS={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 Hm={};P(Hm,{Button:()=>MS,ButtonSet:()=>BS,CircleButton:()=>NS,IconButton:()=>US,KangorooButton:()=>jS,SquareButton:()=>FS});var MS={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)},FS={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"},NS={extends:"SquareButton",round:"C"},jS={extends:"Button",childExtends:"IconText"},BS={tag:"nav",display:"flex",childExtends:"SquareButton"},US={extends:["SquareButton","ClickableItem"],round:"Z"};var zm={};P(zm,{Dialog:()=>VS,DialogFooter:()=>zS,DialogHeader:()=>HS});var VS={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"}},zS={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 Wm={};P(Wm,{Tooltip:()=>WS,TooltipHidden:()=>qS,TooltipParent:()=>KS});R();var WS={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)}},qS={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)}},KS={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 qm={};P(qm,{Avatar:()=>GS});var g1=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)},GS={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=g1(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 Km={};P(Km,{Range:()=>YS});var YS={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:on("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:on("#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 Gm={};P(Gm,{Dropdown:()=>XS,DropdownList:()=>JS,DropdownParent:()=>ZS,DropdownParentFocus:()=>QS,DropdownSiblingFocus:()=>t0});var XS={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"},JS={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"}}},ZS={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},QS={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()}}},t0={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 Ym={};P(Ym,{Notification:()=>e0});var e0={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 bo=Object.assign({},um,dm,pm,hm,gm,_m,xm,wm,ym,Sm,km,bm,vm,Cm,Em,Am,Tm,Om,Rm,Pm,Im,Dm,Um,Vm,Hm,zm,Wm,qm,Km,Gm,Ym);function _f(t){if(t==null)return 0;if(typeof t!="object")return r0(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let o=0;o<t.length;o++)e=(e^_f(t[o]))*16777619;return e>>>0}let r=Object.keys(t).sort();for(let o=0;o<r.length;o++)e=(e^r0(r[o]))*16777619,e=(e^_f(t[r[o]]))*16777619;return e>>>0}function r0(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e}function xf(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(!xf(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)||!xf(t[s],e[s]))return!1}return!0}function Xm(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=Xm(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 Jm(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])?Jm(t[o],n,r):t[o]=n}return t}function Mr(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 Mn(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Sa(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Mr(e)}function o0(t){return t.split(`
83
+ `).map(Mr).join(`
84
+ `)}var n0={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 s0(t,e){let r=n0[t]||Mr(t),o=Sa(e),n=`_${r}-${o}`,s=Mn(t),i=_1[s],a=i?`${s}: ${e};${i}: ${e}`:`${s}: ${e}`,c=`.${n}{${a}}`;return`${n}
85
+ ${c}`}var _1={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select"},x1="@media (hover: hover)",w1=/(?:^|[^\\]):hover(?![\w-])/,i0=t=>typeof t=="string"&&(t.indexOf("{")!==-1||t.indexOf("}")!==-1);function a0(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||i0(i))continue;let a=n0[s]||Mr(s),c=Sa(i),l=`_${a}-${c}`,f=Mn(s);r.push(l),o.push(`.${l}{${f}:${i}}`)}return r.join(" ")+"\0"+o.join(`
86
+ `)}function c0(t,e,r){let o=t+e,n=`_c${Mr(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&&(i0(u)||(i+=`${Mn(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&&w1.test(c)&&(a=`${x1}{${a}}`),`${n}
87
+ ${a}`}var Zm=null;function Sf(t){Zm=t}var Oe={structuralHash:_f,deepEqual:xf,mergeStructural:Xm,overwriteDeep:Jm,shortHash:Mr,toKebab:Mn,sanitizeValue:Sa,batchShortHash:o0,atomicCssClass:s0,batchAtomicCss:a0,compoundCssClass:c0},l0=!1,wf=null;function f0(t){return wf||(wf=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),l0=!0,Zm&&e.batchAtomicCss&&Zm({batchAtomicCss:e.batchAtomicCss,compoundCssClass:e.compoundCssClass}),!0)).catch(e=>(console.debug("[smbls] WASM not available, using JS fallbacks:",e.message),!1)),wf)}function u0(){return l0}R();var ka={};P(ka,{CDN_PROVIDERS:()=>ce,DOMQL_EVENTS:()=>wd,DOMQ_PROPERTIES:()=>hr,ENV:()=>Fd,HTML_TAGS:()=>Wo,METHODS:()=>Bo,METHODS_EXL:()=>Ss,NODE_ENV:()=>Se,OPTIONS:()=>Ws,PACKAGE_MANAGER_TO_CDN:()=>Sr,PARSED_DOMQ_PROPERTIES:()=>ws,PROPS_METHODS:()=>gr,STATE_METHODS:()=>Xr,STATE_PROPERTIES:()=>xd,SVG_TAGS:()=>jb,TYPES:()=>hs,UNIVERSAL_RESERVED_KEYS:()=>sl,addCaching:()=>Uc,addContext:()=>Bc,addExtend:()=>cp,addExtends:()=>zt,addItemAfterEveryElement:()=>ad,addProtoToArray:()=>ys,addRef:()=>Fc,applyCSS:()=>ty,applyDependentState:()=>Ap,applyEvent:()=>Kc,applyEventUpdate:()=>Gc,applyExtends:()=>Vb,applyProps:()=>js,arrayContainsOtherArray:()=>td,arraysEqual:()=>ld,arrayzeValue:()=>no,buildImgSrcset:()=>ki,buildSourcesAndImg:()=>vi,cache:()=>Ip,call:()=>Yp,captureSnapshot:()=>Jp,checkForStateTypes:()=>kp,checkIfInherits:()=>qc,checkIfStringIsInArray:()=>dd,clone:()=>kd,cloneAndMergeArrayExtend:()=>Ps,cloneFunction:()=>qd,concatAddExtends:()=>sp,copyJavaScriptToClipboard:()=>yh,copyStringToClipboard:()=>mh,createBasedOnType:()=>Mc,createElement:()=>Sp,createElementExtends:()=>vc,createExtends:()=>Ds,createExtendsFromKeys:()=>qo,createExtendsStack:()=>Tc,createIfConditionFlag:()=>Kd,createInheritedState:()=>vp,createKey:()=>Os,createNestedObject:()=>Rd,createNestedObjectByKeyPath:()=>Ep,createObjectWithoutPrototype:()=>yc,createParent:()=>Nc,createPath:()=>jc,createProps:()=>Bs,createPropsStack:()=>$c,createRoot:()=>wp,createScope:()=>Op,createSnapshotId:()=>Ts,customDecodeURIComponent:()=>_d,customEncodeURIComponent:()=>bd,cutArrayAfterValue:()=>sd,cutArrayBeforeValue:()=>nd,debounce:()=>Rs,debounceOnContext:()=>Hd,decodeNewlines:()=>yd,deepClone:()=>ut,deepContains:()=>Td,deepDefaults:()=>yi,deepDestringifyFunctions:()=>ie,deepExtend:()=>kc,deepMerge:()=>nt,deepMergeExtends:()=>Fe,deepStringifyFunctions:()=>ks,defineSetter:()=>Kp,destringifyGlobalScope:()=>Cs,detectHeightOnInit:()=>rh,detectInfiniteLoop:()=>$d,document:()=>et,encodeNewlines:()=>md,error:()=>ro,excludeKeysFromObject:()=>Md,exec:()=>ct,extendCachedRegistry:()=>ip,extendStackRegistry:()=>$s,extractArrayExtend:()=>Ms,fetchLibraryData:()=>fl,fibonacciNumberByIndex:()=>oh,filterArrays:()=>fd,filterArraysFast:()=>ud,finalizeExtends:()=>Oc,findClosestNumber:()=>ll,findClosestNumberInFactory:()=>ph,findInheritedState:()=>Wc,findKeyPosition:()=>hd,flattenExtend:()=>Ko,formatDate:()=>eh,generateHash:()=>xc,generateHeadArrayTags:()=>cl,generateKey:()=>As,generateMetaTags:()=>uh,get:()=>zp,getActiveRoute:()=>Nm,getCDNDirUrl:()=>il,getCDNUrl:()=>ve,getCapitalCaseKeys:()=>up,getCdnProviderFromConfig:()=>Xo,getChildStateInKey:()=>zc,getChildren:()=>ri,getContext:()=>li,getCookie:()=>Zd,getDB:()=>hi,getEmotionStylesheet:()=>wh,getExtendsInElement:()=>lp,getExtendsStack:()=>Is,getExtendsStackRegistry:()=>Sc,getFrequencyInArray:()=>ed,getHashedExtend:()=>Ls,getImportMapScript:()=>th,getInObjectByPath:()=>Dd,getLocalStorage:()=>tp,getNev:()=>Ud,getPageMetadata:()=>dh,getParentStateInKey:()=>Hc,getPath:()=>oi,getQuery:()=>gi,getRef:()=>qp,getRoot:()=>ii,getRootContext:()=>ci,getRootData:()=>ai,getRootState:()=>si,getRootStateInKey:()=>Vc,getSpreadChildren:()=>dp,global:()=>Ju,hasFunction:()=>Me,hasHandlerPlugin:()=>Vo,hasOwnProperty:()=>Cd,hashContent:()=>Qo,inheritChildExtends:()=>Ec,inheritChildPropsExtends:()=>Cc,inheritParentProps:()=>Us,inheritRecursiveChildExtends:()=>Ac,init:()=>ir,initProps:()=>bp,is:()=>Vt,isArray:()=>O,isBoolean:()=>dc,isContextComponent:()=>pp,isCyclic:()=>Ld,isDOMNode:()=>Ut,isDate:()=>hc,isDefined:()=>mt,isDevelopment:()=>yr,isEmpty:()=>gc,isEmptyObject:()=>Ed,isEqualDeep:()=>mc,isFunction:()=>A,isHtmlElement:()=>ds,isLocal:()=>Bd,isLoudDevRuntime:()=>Ot,isMalformedDependency:()=>Jo,isMethod:()=>Xp,isMobile:()=>Xd,isNode:()=>Ye,isNot:()=>Qu,isNotProduction:()=>Qr,isNull:()=>pc,isNumber:()=>Le,isObject:()=>S,isObjectLike:()=>z,isPhoto:()=>nh,isProduction:()=>mr,isStaging:()=>jd,isState:()=>Cp,isString:()=>w,isStringFunction:()=>Wd,isTest:()=>_c,isTesting:()=>Nd,isUndefined:()=>Et,isUniversallyReservedKey:()=>Zp,isUnresolvableDependency:()=>oo,isValidHtmlTag:()=>rp,isWrappedLibrary:()=>_i,joinArrays:()=>Fo,jointStacks:()=>ap,keys:()=>ol,lastLevel:()=>bf,lastPathname:()=>yf,loadCssFile:()=>ch,loadJavascript:()=>lh,loadJavascriptFile:()=>sh,loadJavascriptFileEmbedSync:()=>ah,loadJavascriptFileSync:()=>ih,loadRemoteCSS:()=>fh,loadRemoteScript:()=>Zo,log:()=>Gp,logGroupIf:()=>Yd,logIf:()=>Gd,lookdown:()=>Vp,lookdownAll:()=>Hp,lookup:()=>Up,lowercaseFirstLetter:()=>Yr,makeObjectWithoutPrototype:()=>Ad,map:()=>Sd,mapStringsWithContextComponents:()=>Fs,matchRoute:()=>Lm,matchesComponentNaming:()=>Ne,memoize:()=>zd,merge:()=>pt,mergeSharedLibraries:()=>xi,nextElement:()=>ui,normalizeIgnoreList:()=>bi,normalizeLibraryKey:()=>tn,objectToString:()=>vs,objectizeStringProperty:()=>Ns,overwrite:()=>Es,overwriteDeep:()=>Ht,overwriteShallow:()=>Zr,overwriteState:()=>Tp,parse:()=>nl,parseDeep:()=>ti,parseQuery:()=>Mm,parseRoutePattern:()=>$m,pickupElementFromProps:()=>Ic,pickupPropsFromElement:()=>Pc,previousElement:()=>di,propExists:()=>mp,propertizeElement:()=>Dc,propertizeUpdate:()=>gp,reinit:()=>Qm,remove:()=>h_,removeChars:()=>bh,removeCookie:()=>Qd,removeDuplicateProps:()=>Hs,removeDuplicatesInArray:()=>No,removeFromArray:()=>rd,removeFromObject:()=>Od,removeNestedKeyByPath:()=>Pd,removeValueFromArray:()=>ms,removeValueFromArrayAll:()=>id,reorderArrayByValues:()=>cd,replaceLiteralsWithObjectFields:()=>Gr,replaceOctalEscapeSequences:()=>gd,resolveAsset:()=>Wt,resolveHandler:()=>Ho,resolveSharedLibraries:()=>gh,returnValueAsText:()=>Lc,router:()=>We,runGuards:()=>Fm,runPluginHook:()=>Ct,scratchSystem:()=>gn,scratchUtils:()=>Cr,self:()=>Zu,set:()=>go,setActiveRootState:()=>ni,setCookie:()=>Jd,setHashedExtend:()=>wc,setInObjectByPath:()=>Id,setLocalStorage:()=>ep,setNodeStyles:()=>rl,setProps:()=>Wp,setPropsPrototype:()=>Vs,sharedLibrary:()=>hh,spotByPath:()=>ei,srcsetFor:()=>en,stringIncludesAny:()=>_s,stringToObject:()=>vd,stripVersionRangePrefix:()=>mi,swapItemsInArray:()=>od,syncProps:()=>zs,toCamelCase:()=>wi,toDashCase:()=>Si,toDescriptionCase:()=>xh,toTitleCase:()=>_h,toggleFullscreen:()=>Qp,triggerEventOn:()=>br,triggerEventOnUpdate:()=>Rp,trimStringFromSymbols:()=>pd,unstackArrayOfObjects:()=>gs,update:()=>yp,updateProps:()=>_p,variables:()=>pi,verbose:()=>Yo,warn:()=>fi,window:()=>v});R();R();var k1=E(),d0=(t=k1,e)=>{let r=S(e.localFile)?e.localFile:{},o=ut(r.designSystem||{});return nt(t,o)},v1={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},Fn=(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=v1)=>{let r=d0(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=go({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=Oi(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(Fn(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)&&oa(s.svg,{document:e.document}),(h||d)&&ho(s.icons,{document:e.document}),s},kf={},Qm=(t,e=kf)=>{let r=d0(t||{},e),o=e.scopeSelector||":root",n=go({verbose:!1,...r});return e.preventInject||(wt({[o]:n.CSS_VARS}),n.CSS_MEDIA_VARS&&wt(Fn(n.CSS_MEDIA_VARS,o)),wt(n.reset)),n},ty=(t,e=kf)=>{wt(t)},C1=(t,e=kf)=>{let r=e.scopeSelector||":root";wt({[r]:t.CSS_VARS}),t.CSS_MEDIA_VARS&&wt(Fn(t.CSS_MEDIA_VARS,r))};var E1=(t,e=kf)=>{};R();var p0=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,A1=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},ey={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},va=(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},h0=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=ey:e.router=pt(e.router||{},ey);let r=e.router,o=async(s,i)=>{let a=s.context?.window||v,c=A1(r);if(!c){if(!a.location)return;let{pathname:f,search:u,hash:d}=a.location;f=p0(f),c=f+u+d}let l=s;if(r.customRouterElement){let f=va(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),T1(e,r),r},ry=(t,e)=>{if(e.router===!1)return;let r=e.router||ey;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=p0(a);let f=a+c+l,u=t;if(r.customRouterElement){let d=va(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))},T1=(t,e)=>{let{components:r}=t;if(e&&e.injectRouterInLinkComponent)return nt(r.Link||r["smbls.Link"],r.RouterLink||r["smbls.RouterLink"])};R();var oy=v&&v.location?v.location.host.includes("dev."):yr(),g0=oy?"http://localhost:8080/get":"https://api.symbols.app/get",O1={endpoint:g0},m0=async(t,e=O1)=>{let r=e.endpoint||g0,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)}},R1=async(t,e)=>{let{editor:r}=e;if(r&&r.remote){let o=await m0(t,r),n=oy||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},P1=async(t,e,r)=>{let{editor:o}=e;if(o&&o.remote){let n=await m0(t,o),s=oy||e.isDevelopment?ie(n):ie(n.releases[0]);r(s)}},y0=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await R1(t,e)}catch(r){console.error(r)}},b0=(t,e,r,o)=>{if(e&&r.editor)try{r.editor.async&&P1(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 Ca=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{Lr(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 iy={};P(iy,{Helmet:()=>w0,applyMetadata:()=>Nn,default:()=>F1,extractMetadata:()=>$1,generateHeadHtml:()=>M1,helmetPlugin:()=>sy,resolveMetadata:()=>Fr});R();var I1={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"}},D1=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}"]`},_0=t=>ie({v:t}).v,x0=(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}},Fr=(t,e,r)=>{if(!t)return{};let o=t;w(o)&&Me(o)&&(o=_0(o));let n=A(o)?x0(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=_0(i)),A(i)?i=x0(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},$1=(t,e="/",r,o)=>{let s=(t.pages||{})[e],i={};if(t.integrations?.seo&&(i={...t.integrations.seo}),t.app?.metadata){let c=Fr(t.app.metadata,r,o);i={...i,...c}}let a=new Set;if(s){let c=s.metadata||s.helmet||{},l=Fr(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},L1=(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},Ea=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)},ny=(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))}},Nn=(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=I1[r];if(!n)continue;let s=D1(n),i=e.querySelector(s)||L1(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(Ea);ny(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(Ea);ny(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));ny(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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,r=>e[r])},M1=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="${Ea(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="${Ea(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||Ea(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
+ `)},w0={define:{metadata:(t,e,r)=>{let o=e.context?.document||typeof document<"u"&&document;if(!o)return;let n=Q(()=>{let s=Fr(t,e,e.state);Nn(s,o);let i=e.state?.root;S(i)&&(i.$helmet=s)});e.__ref?.__effects&&e.__ref.__effects.push(n)}}},sy={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=Fr(o,t,t.state);Nn(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=Fr(e,t,t.state);Nn(o,r)}},F1=w0;xr();var S0=(t,e,r,o)=>{t&&Qs(t,e,r,o)},k0=(t,e,r)=>{if(!t)return;let o=e.context?.document||typeof document<"u"&&document;if(!o)return;let n=Fr(t,e,r);Nn(n,o)},v0=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},jn={routes:t=>t,metadata:k0,fetch:S0,$router:v0},C0=(t={})=>{let e={routes:r=>r};return t.metadata!==!1&&(e.metadata=k0),t.fetch!==!1&&(e.fetch=S0),t.router!==!1&&(e.$router=v0),e};var ay={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},vf={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},Cf={...ay,router:vf},N1={state:{},pages:{},components:{},router:vf,define:jn},Nr=N1;R();R();var E0=(t,e)=>z(t.extends)?t.extends:[];R();var cy={};P(cy,{default:()=>U1,getActiveLang:()=>Un,getLanguages:()=>Ta,getLocalStateLang:()=>Da,initPolyglot:()=>Af,loadTranslations:()=>Ra,polyglotPlugin:()=>Vn,setLang:()=>Pa,translate:()=>Oa,upsertTranslation:()=>Ia});R();var T0="smbls_lang",j1="smbls_t_",B1="smbls_tv_",Bn={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)}}},Aa={};function Un(){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 Ef=(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},A0=(t,e,r)=>{let o=e.lastIndexOf(".");if(o===-1)return t[e+"_"+r];let n=Ef(t,e.substring(0,o));if(n!=null)return n[e.substring(o+1)+"_"+r]};function Oa(t,e){if(!t)return"";let r=this?.context,o=r?.polyglot,n=e||this.call("getActiveLang"),s=this?.state;if(s){let l=A0(s,t,n);if(l!==void 0)return l}if(o?.translations){let l=o.translations[n];if(l){let f=Ef(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=Ef(l,t);if(f!==void 0)return f}}let c=o?.defaultLang||"en";if(s){let l=A0(s,t,c);if(l!==void 0)return l}if(o?.translations){let l=o.translations[c];if(l){let f=Ef(l,t);if(f!==void 0)return f}}return t}async function Ra(t){let e=this?.context,r=e?.polyglot,o=this?.state?.root||e?.state?.root;if(!r||!o)return;let n=r.storagePrefix||j1,s=r.storageVersionPrefix||(r.storagePrefix?r.storagePrefix.replace(/_$/,"v_"):B1);if(r.translations&&r.translations[t]&&!r.fetch||!r.fetch||r._fetchFailed?.[t])return;if(!o.translations?.[t]){let c=Bn.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(Aa[i])return Aa[i];let a=this;return Aa[i]=(async()=>{try{let c=r.fetch,l=parseInt(Bn.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;Bn.set(n+t,JSON.stringify(f)),u&&Bn.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 Aa[i]}})(),Aa[i]}async function Pa(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||T0;Bn.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 Ia(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 Af(){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||T0,s=Bn.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 Da(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 Vn={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,Af.call(t))}},U1=Vn;xr();var fy={};P(fy,{SYSTEM_METRICS:()=>$a,capsizeHandler:()=>ly,capsizePlugin:()=>Of,computeCapsize:()=>O0,default:()=>V1,resolveFontSizePx:()=>R0,resolveMetrics:()=>P0});var $a={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}},Tf=t=>parseFloat(t.toFixed(4)),O0=(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:`${Tf(t/16)}rem`,lineHeight:`${Tf(f)}px`,capHeightTrim:`${Tf(-h)}em`,baselineTrim:`${Tf(-g)}em`}},R0=(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},P0=(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($a[i])return $a[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($a[a])return $a[a]}}return null},ly=(t,e,r,o)=>{if(!t)return;let n=R0(e.fontSize,o);if(!n)return;let s=P0(e.fontFamily,o);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=O0(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},Of={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},V1=Of;var yy={};P(yy,{PRESERVE_VALUE_KEYS:()=>It,SKIP_INLINE_KEYS:()=>jr,abbrToProp:()=>Pt,decode:()=>M0,encode:()=>D0,expand:()=>xo,isComponentKey:()=>Re,isSelectorKey:()=>Pe,parse:()=>wo,parseFurther:()=>ko,propToAbbr:()=>_e,shorten:()=>La,shorthandPlugin:()=>Ma,stringify:()=>_o,stringifyFurther:()=>So});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 uy=Object.create(null);for(let t in _e){let e=_e[t];if(uy[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${uy[e]}"`);uy[e]=t}var It=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),jr=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 D0(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=>Rf(i));e.push(n+":"+s.join(","))}else e.push(n+":"+Rf(o))}return e.join(" ")}function Rf(t){return String(t).replace(/ /g,"_")}function La(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?La(r):r});let e={};for(let r in t){let o=t[r];if(Re(r)){e[r]=dy(o);continue}if(Pe(r)){e[r]=dy(o);continue}let n=_e[r]||r;if(It.has(r)||It.has(n)){e[n]=o;continue}e[n]=dy(o)}return e}function dy(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?La(e):e}):typeof t=="object"?La(t):t}function _o(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(o){return o!==null&&typeof o=="object"?_o(o):o});let e={},r=[];for(let o in t){let n=t[o];if(Re(o)){e[o]=I0(n);continue}if(Pe(o)){e[o]=I0(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(jr.has(o)||jr.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"?_o(a):a});continue}if(n.length<=1){e[s]=n;continue}r.push(s+":"+n.map(Rf).join(","));continue}if(typeof n=="object"){e[s]=_o(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+":"+Rf(n))}return r.length&&(e.in=r.join(" ")),e}function I0(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 M0(t){if(!t||typeof t!="string")return{};let e={},r=F0(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($0);continue}e[a]=$0(i)}return e}function F0(t){return t.trim().split(/\s+/).filter(Boolean)}function $0(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function L0(t){return t.replace(/_/g," ")}function H1(t){if(!t||typeof t!="string")return{};let e={},r=F0(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(L0);continue}e[a]=L0(i)}return e}function xo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?xo(r):r});let e={};for(let r in t){let o=t[r];if(Re(r)){e[r]=py(o);continue}let n=Pt[r]||r;if(Pe(r)&&n===r){e[r]=py(o);continue}if(It.has(n)||It.has(r)){e[n]=o;continue}e[n]=py(o)}return e}function py(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?xo(e):e}):typeof t=="object"?xo(t):t}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=H1(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]=hy(o);continue}let n=Pt[r]||r;if(Pe(r)&&n===r){e[r]=hy(o);continue}if(It.has(n)||It.has(r)){e[n]=o;continue}e[n]=hy(o)}return e}function hy(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}function N0(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function z1(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 W1(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 j0(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 So(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(o){return o!==null&&typeof o=="object"?So(o):o});let e={},r=[];for(let o in t){let n=t[o];if(Re(o)){let i=B0(n);e[o]=j0(i)?i.in:i;continue}if(Pe(o)){let i=B0(n);e[o]=j0(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(jr.has(o)||jr.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"?So(a):a});continue}if(n.length<=1){e[s]=n;continue}r.push(s+":"+n.map(N0).join(","));continue}if(typeof n=="object"){e[s]=So(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+":"+N0(n))}return r.length&&(e.in=r.join(" ")),e}function B0(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?So(e):e}):typeof t=="object"?So(t):t}function U0(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):z1(t)}function gy(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=W1(i);if(c.length>1){e[a]=c.map(U0);continue}e[a]=U0(i)}return e}function ko(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?ko(r):r});let e={};if(typeof t.in=="string"){let r=gy(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]=gy(o):e[r]=my(o);continue}let n=Pt[r]||r;if(Pe(r)&&n===r){typeof o=="string"?e[r]=gy(o):e[r]=my(o);continue}if(It.has(n)||It.has(r)){e[n]=o;continue}e[n]=my(o)}return e}function my(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?ko(e):e}):typeof t=="object"?ko(t):t}var q1={shorten:xo,stringify:wo,stringifyFurther:ko};function K1(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 G1=["components","pages","snippets"],Ma={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let o=q1[e===!0?"shorten":e];if(o){for(let n of G1)t[n]&&(t[n]=K1(t[n],o));t.app&&typeof t.app=="object"&&(t.app=o(t.app))}}};var Oy={};P(Oy,{LEVELS:()=>Fa,analyzePlugin:()=>zn,attachBrowserListeners:()=>jf,attachNetworkListeners:()=>ja,classifyEvent:()=>vy,createAnalyzeState:()=>Bf,createBeaconSink:()=>Ay,createConsoleSink:()=>Cy,createDedupe:()=>wy,createEnrich:()=>_y,createMemorySink:()=>Ey,createPipeline:()=>$f,createRedact:()=>Df,createRemoteSink:()=>Mf,createSample:()=>Sy,createSummarize:()=>xy,default:()=>zn,emitFetchEvent:()=>Y0,makeEvent:()=>Y,meetsLevel:()=>Pf,normalizeLevel:()=>Na,resolveSinks:()=>Nf,summarizeElement:()=>vo});var Y1=0,X1=()=>`${Date.now().toString(36)}-${(Y1++).toString(36)}`,Y=(t,e,r={})=>({id:X1(),ts:Date.now(),type:t,level:e,...r}),J1=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(" > ")},vo=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:J1(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var Hn=t=>t?.context?.analyze,Z1={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"}},Q1=(t,{category:e,type:r,level:o})=>n=>{let s=Hn(n);!s||!s.shouldCapture(e)||s.emit(Y(r,o,{hook:t,element:vo(n)}))},V0=t=>(e,r)=>{let o=Hn(e);!o||!o.shouldCapture("state")||o.emit(Y("state","debug",{hook:t,element:vo(e),changedKeys:r?.changedKeys||null}))},zn={name:"analyze",error(t,e){let r=Hn(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:vo(t),error:o,message:o?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=Hn(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=Hn(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=Hn(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:vo(t),durationMs:r}))},beforeStateUpdate:V0("beforeStateUpdate"),stateUpdate:V0("stateUpdate")};for(let[t,e]of Object.entries(Z1))zn[t]=Q1(t,e);R();var Fa={error:0,warn:1,info:2,debug:3,trace:4};var Pf=(t,e)=>{let r=Fa[t],o=Fa[e];return r==null||o==null?!0:r<=o},Na=t=>Fa[t]!=null?t:"warn";R();var If=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var tO=(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},eO=(t,e)=>{if(e!=="redact"){if(e==="hash"){let r=0,o=String(t);for(let n=0;n<o.length;n++)r=(r<<5)-r+o.charCodeAt(n)|0;return`#${(r>>>0).toString(36)}`}return"***"}},by=(t,e,r,o)=>{if(o>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>by(s,e,r,o+1));let n={};for(let s of Object.keys(t))if(tO(s,e)||If.test(s)){let a=eO(t[s],r);a!==void 0&&(n[s]=a)}else n[s]=by(t[s],e,r,o+1);return n},Df=(t=[],e="mask")=>{let r=Array.isArray(t)?t:[t];return o=>{if(!o)return o;let{id:n,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:h,...g}=o,p=by(g,r,e,0);return{id:n,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:h,...p}}};var _y=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}}}},xy=()=>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},wy=(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}},Sy=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=>Df(t.config.redact||[],t.config.maskStrategy),enrich:t=>_y(t),summarize:()=>xy(),dedupe:t=>wy(t.config.cache?.dedupeWindowMs||1e3),sample:t=>Sy(t.config.sample||{})},rO=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let r=H0[t];return r?r(e):null}return null},$f=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=rO(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 Lf=typeof v<"u"&&typeof v.document<"u",oO=5e3,nO=50,sO=3,iO=1500,aO=1e3,vy=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",cO=t=>{try{return JSON.stringify(t)}catch{return null}},lO=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},fO=t=>{if(!t)return null;let e=String(t),r;return(r=e.match(/Edg\/([\d.]+)/))?{name:"Edge",version:r[1]}:(r=e.match(/OPR\/([\d.]+)/))?{name:"Opera",version:r[1]}:(r=e.match(/Firefox\/([\d.]+)/))?{name:"Firefox",version:r[1]}:/Chrome\/([\d.]+)/.test(e)&&/Safari\//.test(e)?(r=e.match(/Chrome\/([\d.]+)/),{name:"Chrome",version:r[1]}):(r=e.match(/Version\/([\d.]+).*Safari/))?{name:"Safari",version:r[1]}:{name:null,version:null}},uO=()=>{if(!Lf)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}},dO=()=>{if(!Lf)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:fO(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:lO(),viewport:v.innerWidth?{w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}:null,screen:r?{w:r.width||null,h:r.height||null,availW:r.availWidth||null,availH:r.availHeight||null,colorDepth:r.colorDepth||null,orientation:r.orientation?.type||null}:null,theme:uO()}},Mf=(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:vy,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:oO,_=t.maxBatch||nO,b=t.maxRetries!=null?t.maxRetries:sO,y=t.backoffMs||iO,x=t.queueLimit||aO,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?ky(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:dO(),user:L?.user||null,traits:L?.traits||null,tags:L?.tags||null,events:J};if((p?ky(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 pO(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&&Lf){if(typeof o=="function"&&ky(()=>o(W)))return;if(navigator.sendBeacon&&e){let K=cO(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))};Lf&&(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},ky=t=>{try{return t()}catch{return null}},pO=async(t,e,{apiKey:r,getAuth:o})=>{let n={"Content-Type":"application/json","X-Analyze-Beacon":"1"};if(r&&(n["X-Analyze-Key"]=r),o)try{let s=await o();s&&(n.Authorization=`Bearer ${s}`)}catch{}try{return(await fetch(t,{method:"POST",headers:n,body:JSON.stringify(e),keepalive:!0,credentials:"omit",mode:"cors"})).ok}catch{return!1}};var hO={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},gO="\x1B[0m",Ff=typeof v<"u"&&typeof v.document<"u",Cy=(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(Ff)i(a,s);else{let c=hO[s.level]||"";i(`${c}${a}${gO}`,s)}}},Ey=(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},Ay=(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=Ff?new v.Blob([c],{type:"application/json"}):c;if(Ff&&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(()=>{})};Ff&&(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},z0={console:Cy,memory:Ey,beacon:Ay,remote:Mf},W0=(t,e)=>e.getDebug!=null||e.debug!=null?e:{...e,getDebug:()=>t.config.debug===!0},Nf=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=z0[o];if(!n)continue;r.push(o==="memory"?n(t,{}):n(o==="remote"?W0(t,{}):{}))}else if(o&&typeof o=="object"&&o.type){let n=z0[o.type];if(!n)continue;r.push(o.type==="memory"?n(t,o):n(o.type==="remote"?W0(t,o):o))}return r};R();var mO=typeof v<"u"&&typeof v.document<"u",yO=new Set(["password","hidden"]),q0=(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))))}},Ty="__analyzeKeyPath",Wn=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[Ty])return e[Ty];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[Ty]=i}catch{}return i},bO=(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"***"}},_O=t=>!!(!t||t.tagName==="INPUT"&&yO.has(t.type)||If.test(t.name||"")||If.test(t.id||"")||t.dataset?.analyze==="skip"),jf=t=>{if(!mO)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:Wn(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:K0(i)}))},{passive:!0,capture:!0}),n(v,"dblclick",i=>{t.emit(Y("pointer","info",{hook:"dblclick",target:Wn(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),n(v,"contextmenu",i=>{t.emit(Y("pointer","info",{hook:"contextmenu",target:Wn(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=q0(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:K0(s),target:Wn(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=_O(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=bO(a.value,t.config.maskStrategy)),t.emit(Y("forms","info",{hook:i.type,target:Wn(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:Wn(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=q0(()=>{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=Rs(()=>{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(G0)}))}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{}},K0=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),xO=t=>{let e={name:t.name||"Error",message:typeof t.message=="string"?t.message:String(t),stack:typeof t.stack=="string"?t.stack:null};return t.cause!==void 0&&(e.cause=G0(t.cause)),e},G0=t=>{if(t==null)return t;if(t instanceof Error)return xO(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};R();var wO=typeof v<"u"&&typeof v.document<"u",Y0=(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}))},ja=t=>{if(wO&&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 SO={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},kO={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},vO={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},CO={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},EO=t=>{let e={...SO,...t};return e.replay&&Object.assign(e,kO),e.telemetry&&Object.assign(e,vO),e.remote&&Object.assign(e,CO),Object.assign(e,t),e},AO=64,TO=()=>{if(typeof v>"u"||!v.location)return null;try{let e=new URLSearchParams(v.location.search).get("analyze");return e||null}catch{return null}},Bf=(t={})=>{let e=t===!0?{}:{...t};e.capture=EO(e.capture||{});let r=TO();(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=Na(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=$f(o),o.__sinks=Nf(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&&Pf(s.level,o.config.level)){if(!o.__ready){if(s.level!=="error"&&!o.config.captureDuringHydration)return;o.__preBuffer.length<AO&&o.__preBuffer.push(s);return}n(),X0(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)X0(o,a)}try{jf(o)}catch(a){console.error("[analyze] browser attach error:",a)}try{ja(o)}catch(a){console.error("[analyze] network attach error:",a)}for(let a of o.__onActivate||[])try{a(o)}catch(c){console.error("[analyze] onActivate error:",c)}},o.pause=()=>{o.__paused=!0},o.resume=()=>{o.__paused=!1},o.setLevel=s=>{o.config.level=Na(s)},o.setCapture=(s,i)=>{if(o.config.capture[s]=!!i,s==="network"&&i&&o.__ready)try{ja(o)}catch(a){console.error("[analyze] network attach error:",a)}},o.query=s=>o.__memory?o.__memory.query(s):[],o.snapshot=()=>o.__memory?o.__memory.snapshot():[],o.emitNetwork=s=>{if(!o.shouldCapture("network"))return;let i=s?.phase,a=i==="error"?"error":i==="success"&&s.ok===!1?"warn":"info";o.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:"network",level:a,hook:`fetch.${i||"unknown"}`,...s})},o.flush=()=>{if(o.__sinks)for(let s of o.__sinks)typeof s.flush=="function"&&s.flush()},o.startNewSession=s=>{let i=s||(typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),a=Array.isArray(o.config.sinks)?o.config.sinks:[];for(let c of a)c&&typeof c=="object"&&c.type==="remote"&&(c.sessionId=i);if(o.__sinks)for(let c of o.__sinks)typeof c.startNewSession=="function"&&c.startNewSession(i);return i},o.replay=()=>({initialSnapshot:o.__initialSnapshot,events:o.snapshot()}),o.destroy=()=>{for(let s of o.__teardown)try{s()}catch{}o.__teardown=[],o.__ready=!1,o.__paused=!0},o.__onActivate=[],o.onActivate=s=>{o.__onActivate.push(s)},o},X0=(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 Iy={};P(Iy,{Inspect:()=>Uf,inspectPlugin:()=>Py});R();function J0(t){return w(t)?t:O(t)?t.find(e=>w(e)):""}function Ry(t){if(!t)return;let e=t.__ref.__componentKey,r=t.extends&&J0(t.extends),o=t.parent&&t.parent.childExtends&&J0(t.parent.childExtends);return(e||r||o||"").split("_")[0].split(".")[0].split("+")[0]}function Vf(t){if(!t||!t.__ref)return;let{components:e,pages:r,editor:o}=t.context,n=Ry(t);return o&&o.onInitInspect&&!o.onInitInspect(n,t,t.state)?Vf(t.parent):n&&(e[n]||r[n])?t:Vf(t.parent)}var OO=(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}))}},Uf={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:OO,onMousemove:(t,e,r)=>{let o=t.target.ref,n=Vf(o),s=e.Inspector.state;if(!n||!r.debugging||!n.__ref)return s.update({area:!1});let i=Ry(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=Vf(o);if(!n)return;let s=Ry(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)Ln[n]||(o[n].__ref||(o[n].__ref={}),o[n].__ref.__componentKey||(o[n].__ref.__componentKey=n))}},onBeforeUpdate:(t,e,r)=>{let{area:o}=r,n=r.area&&r.parent.debugging,s;if(!n)s="display: none !important";else if(o){let{x:i,y:a,width:c,height:l}=o;s=`
89
89
  display: block !important;
90
90
  top: ${a-6}px;
91
91
  left: ${i-6}px;
92
92
  width: ${c+12}px;
93
93
  height: ${l+12}px;
94
- `}return e.node.style=s,e.Span.node.innerText=r.focusKey,!1}}},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}
94
+ `}return e.node.style=s,e.Span.node.innerText=r.focusKey,!1}}},Py={name:"inspect",beforeCreate(t,e){Array.isArray(t.extends)?t.extends.push(Uf):t.extends?t.extends=[t.extends,Uf]:t.extends=[Uf]}};var $y={};P($y,{apiUrl:()=>Dy,channelByApiUrl:()=>DO,channelNames:()=>PO,channels:()=>Xt,currentChannel:()=>Br,defaultChannel:()=>UO,deployTarget:()=>NO,isKnownChannel:()=>BO,mermaidUrl:()=>FO,normalizeOwnerSegment:()=>VO,normalizeProjectKey:()=>zO,normalizeProjectSlug:()=>HO,parseSymboLsHost:()=>WO,previewProjectUrl:()=>MO,previewUrl:()=>ek,resolveChannel:()=>Co,screenshotCdnHost:()=>rk,screenshotCdnUrl:()=>jO,setChannel:()=>IO,shellUrl:()=>LO,socketUrl:()=>$O});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 PO=Object.keys(Xt.channels),ar=t=>!!(t&&Xt.channels[t]),Co=t=>ar(t)?Xt.channels[t]:Xt.channels[Xt.defaultChannel],IO=t=>{typeof globalThis>"u"||(globalThis.__SYMBOLS_CHANNEL__=ar(t)?t:null,qn=void 0)},qn,Ba=t=>typeof process<"u"&&process.env&&process.env[t]||null,Br=()=>{if(qn!==void 0)return qn;let t=typeof globalThis<"u"?globalThis.__SYMBOLS_CHANNEL__:null,e=Ba("SYMBOLS_CHANNEL"),r=Ba("NODE_ENV");return qn=ar(t)&&t||ar(e)&&e||ar(r)&&r||Xt.defaultChannel,qn===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.`),qn},Z0=["production","staging","upcoming","next","test","development","local","demo","demo-dev"],Q0=t=>{let e=Z0.indexOf(t);return e===-1?Z0.length:e},DO=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)=>Q0(r)-Q0(o))[0]},Dy=(t=Br())=>Ba("SYMBOLS_API_URL")||Co(t).api,$O=(t=Br())=>Ba("SYMBOLS_SOCKET_URL")||Co(t).socket,LO=(t=Br())=>Co(t).shell||null,ek=(t=Br())=>Co(t).preview||null,MO=({owner:t,key:e,env:r="production"}={},o=Br())=>{let n=ek(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)}`},FO=({owner:t,key:e,env:r="production"}={},o=Br())=>{let n=Co(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}`},NO=(t=Br())=>Co(t).deploy||{},rk=()=>Ba("SYMBOLS_SCREENSHOT_CDN")||Xt.screenshotCdn,jO=({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://${rk()}/${encodeURIComponent(t)}/${encodeURIComponent(e)}/${i}.webp${c}`},BO=ar,UO=Xt.defaultChannel,VO=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"",HO=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"",zO=(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},tk={at:"production",prod:"production",production:"production",dev:"development",development:"development",next:"next",upcoming:"upcoming",test:"test",staging:"staging"},WO=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=tk[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?tk[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 Fy={};P(Fy,{BUILD_DOMQL_SYSTEM_PROMPT:()=>gk,DEFAULT_MAX_TOKENS:()=>Yf,DEFAULT_MODEL:()=>Ur,DEFAULT_PROVIDER:()=>Kf,DEFAULT_TEMPERATURE:()=>Gf,MODEL_TIER_ALIASES:()=>My,PROVIDER_MODELS:()=>nk,SIMONE_BASE_URL:()=>Ua,SIMONE_CHAT_PATH:()=>Hf,SIMONE_CODE_PATH:()=>zf,SIMONE_CODE_SYMBOLS_PATH:()=>Wf,SIMONE_HEALTH_PATH:()=>qf,SIMONE_TOOLS_PATH:()=>ok,WORKSPACE_SYSTEM_PROMPT:()=>hk,buildMessages:()=>lk,chat:()=>Va,health:()=>ck,parseSimoneResponse:()=>dk,resolveModel:()=>mk,streamChat:()=>Va,streamCode:()=>ik,streamCodeSymbols:()=>ak,toLegacyEnvelope:()=>pk});var Ua="https://symbols-service-production.up.railway.app",Hf="/api/chat",zf="/api/code",Wf="/api/code-symbols",qf="/api/health",ok="/api/tools",Kf="openai-compatible",Ur="claude-sonnet-4-6",Gf=.7,Yf=4096,nk={"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 sk(t,e){return t?t.replace(/\/$/,"")+e:e}function qO(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 Va(t,e={},r){let{baseUrl:o=Ua,path:n=Hf,provider:s=Kf,model:i=Ur,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(sk(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 $=qO(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 ik(t,e={},r){return Va(t,{...e,path:zf},r)}function ak(t,e={},r){return Va(t,{...e,path:Wf},r)}async function ck(t={}){let{baseUrl:e=Ua,signal:r,headers:o}=t,n=await fetch(sk(e,qf),{method:"GET",headers:o,signal:r});if(!n.ok)throw new Error(`simone health: HTTP ${n.status}`);return n.json()}function lk({system:t,history:e=[],user:r,context:o}){let n=[];t&&n.push({role:"system",content:t});for(let s of e)!s||!s.role||typeof s.content!="string"||!s.content||n.push({role:s.role,content:s.content});if(r){let s=r;if(o!=null){let i=typeof o=="string"?o:JSON.stringify(o,null,2);s=`${s}
97
97
 
98
98
  ---
99
99
  Context:
100
100
  \`\`\`json
101
101
  ${i}
102
- \`\`\``}n.push({role:"user",content:s})}return n}var 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=`
102
+ \`\`\``}n.push({role:"user",content:s})}return n}var uk=/```(?<lang>[a-zA-Z0-9_+-]*)\n(?<code>[\s\S]*?)```/g,KO=new Set(["component","components","page","pages","function","method","state","theme","color","font","icon"]);function GO(t){let e=[];for(let r of t.matchAll(uk))e.push({lang:(r.groups?.lang||"").toLowerCase(),code:r.groups?.code??""});return e}function YO(t){return t.replace(uk,"").trim()}function Ly(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 fk(t){return!!t&&typeof t=="object"&&typeof t.type=="string"&&KO.has(t.type)}function dk(t){let e=(typeof t=="string"?t:"").trim();if(!e)return{kind:"text",text:"",message:""};let r=GO(e),o=r.filter(i=>/^(js|javascript|ts|typescript|jsx|tsx)$/.test(i.lang)),n=r.filter(i=>i.lang==="json"),s=YO(e);for(let i of n){let a=Ly(i.code);if(fk(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=Ly("["+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=Ly(e);if(fk(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 pk(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 hk=["You are Simone, the Symbols.app assistant.","You help users build DOMQL v3 components, pages, and design-system entries.",'When the user asks for a component or page, return a single ```json fenced block whose body is one asset object with shape { type, key, title, description, value }. type is one of "component", "page", "function", "state", "color", "font", "icon", "theme".',"For multiple assets, return one ```js fenced block with comma-separated asset objects.","For general questions, reply with prose only."].join(" "),gk=["You are a DOMQL v3.14 code generator for the Symbols workspace.","Output EXECUTABLE DOMQL v3.14 for the requested page(s)/component(s) \u2014 never a description, never a plan, never an explanation.","Author data-first object schemas: child elements are UPPERCASE keys; styling lives in flat element props (NO attr/props/on wrappers); use design-system tokens (color/typography/spacing keys), never raw px/rem/hex/rgba; `extends` and `childExtends` are quoted strings; event handlers are flat (onClick, onInit) \u2014 never on:{} or props:{} wrappers.","OUTPUT FORMAT \u2014 pick ONE:","- SINGLE page/component: emit exactly one ```js fenced code block whose body is a single DOMQL object literal (an expression \u2014 start with `{`, no `export`, no variable assignment, no surrounding prose).",'- MULTIPLE pages/components: emit exactly one ```json fenced code block whose body is an object of the shape { "pages": { "PageKey": "<DOMQL object-literal source string>" }, "components": { "CompKey": "<DOMQL object-literal source string>" } }. Include only the sections you produce; each value is the DOMQL source for that key.',"Keys are PascalCase. Default to a single page unless the request clearly needs several distinct pages/components.","Emit ONLY the single fenced block. No text before or after it."].join(`
103
+ `),My={Starter:Ur,Free:Ur,Pro:"claude-opus-4-6"};function mk(t){return t?My[t]||t:Ur}var yk={"@symbo.ls/signal":Yu,"@symbo.ls/scratch":dg,"@symbo.ls/element":fm,"@symbo.ls/css":xg,"@symbo.ls/utils":ul,"@symbo.ls/state":Jg,"@symbo.ls/router":wa,"@symbo.ls/polyglot":cy,"@symbo.ls/helmet":iy,"@symbo.ls/fetch":eo,"@symbo.ls/capsize":fy,"@symbo.ls/shorthand":yy,"@symbo.ls/analyze":Oy,"@symbo.ls/inspect":Iy,"@symbo.ls/channels":$y,"@symbo-ls/simone-server":Fy},bk=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:{}),o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in yk)o[n]||(o[n]=yk[n]);if(e)for(let n in e)o[n]||(o[n]=e[n]);return o},_k=["@symbo.ls/sdk"],xk=(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},wk=(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 vk=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},Sk=(t="smbls")=>{let e={};for(let r in bo)Object.prototype.hasOwnProperty.call(bo,r)&&(Ne(r)?e[`smbls.${r}`]=bo[r]:e[r]=bo[r]);return e},Ck=t=>t.components?{...Sk(),...t.components}:Sk(),Ek=t=>({...ka,...wa,...Cr,...t.utils,...t.snippets,...t.functions}),Ak=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var XO=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,JO=3e3,ZO=(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),JO);n.then(c=>{clearTimeout(a),i(c)})})}catch{return Promise.resolve(null)}},kk={},Tk=async({dependencies:t,dependenciesOnDemand:e,document:r,preventCaching:o=!1,cdnProvider:n,packageManager:s,symbolsConfig:i,registerDependency:a=ZO})=>{if(n||(n=Sr[s]||Xo(i)||"esmsh"),!t)return null;let c=!1;for(let d in t){c=!0;break}if(!c)return null;let l=yr()&&o?`?${Math.random()}`:"",f=async(d,h)=>{let g=ve(d,h,n)+l;try{await Promise.race([Zo(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([Zo(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])&&!kk[d]&&(kk[d]=!0,!oo(d))){if(Jo(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}XO(d)||u.push(f(d,h))}}return u.length&&await Promise.allSettled(u),t},Ok=async(t,e)=>{let r=e.window||window,o=e.cdnProvider||Xo(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]&&oo(a))return await u.require(a,c);if(!u.packages[a]){let d=yr()?`?${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)},QO=/\s+/g,Rk=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,tR=(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+=` ${Rk(n,e)}`)}return r},eR=(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=tR(t,e));let n=t.replace(QO," ").trim();if(r&&typeof r.setAttribute=="function")r.setAttribute("class",n);else if(r)try{r.className=n}catch{}return n},rR=()=>(t,e,r)=>{let o=Rk(t,e);if(t){let{__ref:n}=e;n.__class.style=o}Pk()(e.classlist,e,e.state,!0)},Pk=()=>(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&&eR(i,e,e.node)}},oR=()=>({style:rR(),classlist:Pk()}),nR=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],Ny=new WeakSet,jy=!1,sR=t=>!!t&&typeof t=="object",Ik=(t,e)=>{let r=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,o=e.initOptions||{},n=e.registry||oR(),s=e.designSystem?nt(ut(e.designSystem),_a):ut(_a),i={};for(let p of nR)e[p]!==void 0&&(i[p]=e[p]);let a,c=sR(r),f=c&&Ny.has(r)&&!e.skipDesignSystemInit,u=!f&&!jy,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(Fn(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,...Cf,...i,...o}),a&&a!==p&&(a.__domDocument=r),c&&Ny.add(r),jy=!0}else{let p=Di(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,...Cf,...i,...o})}finally{rt()}c&&Ny.add(r),jy=!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]},Dk=(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)},$k=(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},Lk=t=>{xi(t,t.sharedLibraries)};var Ha={polyglot:Oa,getLocalStateLang:Da,getActiveLang:Un,getLang:Un,setLang:Pa,getLanguages:Ta,loadTranslations:Ra,upsertTranslation:Ia};xr();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 za=Object.create(null);Object.keys(Ie).forEach(t=>{za[Ie[t]]=t});var Wa={type:"error",data:"parser error"};var Nk=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",jk=typeof ArrayBuffer=="function",Bk=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,qa=({type:t,data:e},r,o)=>Nk&&e instanceof Blob?r?o(e):Mk(e,o):jk&&(e instanceof ArrayBuffer||Bk(e))?r?o(e):Mk(new Blob([e]),o):o(Ie[t]+(e||"")),Mk=(t,e)=>{let r=new FileReader;return r.onload=function(){let o=r.result.split(",")[1];e("b"+(o||""))},r.readAsDataURL(t)};function Fk(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var By;function Uk(t,e){if(Nk&&t.data instanceof Blob)return t.data.arrayBuffer().then(Fk).then(e);if(jk&&(t.data instanceof ArrayBuffer||Bk(t.data)))return e(Fk(t.data));qa(t,!1,r=>{By||(By=new TextEncoder),e(By.encode(r))})}var Vk="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ka=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Vk.length;t++)Ka[Vk.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=Ka[t.charCodeAt(o)],i=Ka[t.charCodeAt(o+1)],a=Ka[t.charCodeAt(o+2)],c=Ka[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 iR=typeof ArrayBuffer=="function",Ga=(t,e)=>{if(typeof t!="string")return{type:"message",data:zk(t,e)};let r=t.charAt(0);return r==="b"?{type:"message",data:aR(t.substring(1),e)}:za[r]?t.length>1?{type:za[r],data:t.substring(1)}:{type:za[r]}:Wa},aR=(t,e)=>{if(iR){let r=Hk(t);return zk(r,e)}else return{base64:!0,data:t}},zk=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer;var Wk="",qk=(t,e)=>{let r=t.length,o=new Array(r),n=0;t.forEach((s,i)=>{qa(s,!1,a=>{o[i]=a,++n===r&&e(o.join(Wk))})})},Kk=(t,e)=>{let r=t.split(Wk),o=[];for(let n=0;n<r.length;n++){let s=Ga(r[n],e);if(o.push(s),s.type==="error")break}return o};function Gk(){return new TransformStream({transform(t,e){Uk(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 Uy;function Xf(t){return t.reduce((e,r)=>e+r.length,0)}function Jf(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 Yk(t,e){Uy||(Uy=new TextDecoder);let r=[],o=0,n=-1,s=!1;return new TransformStream({transform(i,a){for(r.push(i);;){if(o===0){if(Xf(r)<1)break;let c=Jf(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(Xf(r)<2)break;let c=Jf(r,2);n=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),o=3}else if(o===2){if(Xf(r)<8)break;let c=Jf(r,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(Wa);break}n=f*Math.pow(2,32)+l.getUint32(4),o=3}else{if(Xf(r)<n)break;let c=Jf(r,n);a.enqueue(Ga(s?c:Uy.decode(c),e)),o=0}if(n===0||n>t){a.enqueue(Wa);break}}}})}var Vy=4;function lt(t){if(t)return cR(t)}function cR(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")(),Xk="arraybuffer";function Zf(t,...e){return e.reduce((r,o)=>(t.hasOwnProperty(o)&&(r[o]=t[o]),r),{})}var lR=jt.setTimeout,fR=jt.clearTimeout;function lr(t,e){e.useNativeTimers?(t.setTimeoutFn=lR.bind(jt),t.clearTimeoutFn=fR.bind(jt)):(t.setTimeoutFn=jt.setTimeout.bind(jt),t.clearTimeoutFn=jt.clearTimeout.bind(jt))}var uR=1.33;function Jk(t){return typeof t=="string"?dR(t):Math.ceil((t.byteLength||t.size)*uR)}function dR(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 Qf(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Zk(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function Qk(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 tu=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 tu(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=Ga(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=Zk(e);return r.length?"?"+r:""}};var Ya=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)};Kk(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,qk(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]=Qf()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}};var tv=!1;try{tv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var ev=tv;function pR(){}var Hy=class extends Ya{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}},Vr=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=Zf(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=pR,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()}};Vr.requestsCount=0;Vr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",rv);else if(typeof addEventListener=="function"){let t="onpagehide"in jt?"pagehide":"unload";addEventListener(t,rv,!1)}}function rv(){for(let t in Vr.requests)Vr.requests.hasOwnProperty(t)&&Vr.requests[t].abort()}var hR=(function(){let t=ov({xdomain:!1});return t&&t.responseType!==null})(),Hr=class extends Hy{constructor(e){super(e);let r=e&&e.forceBase64;this.supportsBinary=hR&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Vr(ov,this.uri(),e)}};function ov(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||ev))return new XMLHttpRequest}catch{}if(!e)try{return new jt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var nv=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",Wy=class extends fr{get name(){return"websocket"}doOpen(){let e=this.uri(),r=this.opts.protocols,o=nv?{}:Zf(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;qa(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]=Qf()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}},zy=jt.WebSocket||jt.MozWebSocket,zr=class extends Wy{createSocket(e,r,o){return nv?new zy(e,r,o):r?new zy(e,r):new zy(e)}doWrite(e,r){this.ws.send(r)}};var Kn=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=Yk(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=e.readable.pipeThrough(r).getReader(),n=Gk();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 qy={websocket:zr,webtransport:Kn,polling:Hr};var gR=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,mR=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Gn(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=gR.exec(t||""),s={},i=14;for(;i--;)s[mR[i]]=n[i]||"";return r!=-1&&o!=-1&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=yR(s,s.path),s.queryKey=bR(s,s.query),s}function yR(t,e){let r=/\/{2,9}/g,o=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&o.splice(0,1),e.slice(-1)=="/"&&o.splice(o.length-1,1),o}function bR(t,e){let r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,n,s){n&&(r[n]=s)}),r}var Ky=typeof addEventListener=="function"&&typeof removeEventListener=="function",eu=[];Ky&&addEventListener("offline",()=>{eu.forEach(t=>t())},!1);var Eo=class t extends lt{constructor(e,r){if(super(),this.binaryType=Xk,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=Gn(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=Gn(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=Qk(this.opts.query)),Ky&&(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"})},eu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let r=Object.assign({},this.opts.query);r.EIO=Vy,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+=Jk(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(),Ky&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let o=eu.indexOf(this._offlineEventListener);o!==-1&&eu.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}};Eo.protocol=Vy;var ru=class extends Eo{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;Eo.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;Eo.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}},Yn=class extends ru{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=>qy[n]).filter(n=>!!n)),super(e,o)}};var uU=Yn.protocol;function sv(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=Gn(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 tb={};P(tb,{Decoder:()=>Zy,Encoder:()=>Jy,PacketType:()=>U,isPacketValid:()=>jR,protocol:()=>mv});var xR=typeof ArrayBuffer=="function",wR=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,iv=Object.prototype.toString,SR=typeof Blob=="function"||typeof Blob<"u"&&iv.call(Blob)==="[object BlobConstructor]",kR=typeof File=="function"||typeof File<"u"&&iv.call(File)==="[object FileConstructor]";function Ja(t){return xR&&(t instanceof ArrayBuffer||wR(t))||SR&&t instanceof Blob||kR&&t instanceof File}function Xa(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,o=t.length;r<o;r++)if(Xa(t[r]))return!0;return!1}if(Ja(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 av(t){let e=[],r=t.data,o=t;return o.data=Gy(r,e),o.attachments=e.length,{packet:o,buffers:e}}function Gy(t,e){if(!t)return t;if(Ja(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]=Gy(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]=Gy(t[o],e));return r}return t}function cv(t,e){return t.data=Yy(t.data,e),delete t.attachments,t}function Yy(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]=Yy(t[r],e);else if(typeof t=="object")for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=Yy(t[r],e));return t}var hv=iC(pv(),1),Xy=(0,hv.default)("socket.io-parser"),gv=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],mv=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 Jy=class{constructor(e){this.replacer=e}encode(e){return Xy("encoding packet %j",e),(e.type===U.EVENT||e.type===U.ACK)&&Xa(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)),Xy("encoded %j as %s",e,r),r}encodeAsBinary(e){let r=av(e),o=this.encodeAsString(r.packet),n=r.buffers;return n.unshift(o),n}},Zy=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 Qy(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(Ja(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(!yv(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 Xy("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 su(r);case U.DISCONNECT:return r===void 0;case U.CONNECT_ERROR:return typeof r=="string"||su(r);case U.EVENT:case U.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&gv.indexOf(r[0])===-1);case U.ACK:case U.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},Qy=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=cv(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function MR(t){return typeof t=="string"}var yv=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function FR(t){return t===void 0||yv(t)}function su(t){return Object.prototype.toString.call(t)==="[object Object]"}function NR(t,e){switch(t){case U.CONNECT:return e===void 0||su(e);case U.DISCONNECT:return e===void 0;case U.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&gv.indexOf(e[0])===-1);case U.ACK:return Array.isArray(e);case U.CONNECT_ERROR:return typeof e=="string"||su(e);default:return!1}}function jR(t){return MR(t.nsp)&&FR(t.id)&&NR(t.type,t.data)}function se(t,e,r){return t.on(e,r),function(){t.off(e,r)}}var BR=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Qn=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(BR.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 To(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}To.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};To.prototype.reset=function(){this.attempts=0};To.prototype.setMin=function(t){this.ms=t};To.prototype.setMax=function(t){this.max=t};To.prototype.setJitter=function(t){this.jitter=t};var ts=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 To({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||tb;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 Yn(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 Qn(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 Za={};function es(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let r=sv(t,e.path||"/socket.io"),o=r.source,n=r.id,s=r.path,i=Za[n]&&s in Za[n].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new ts(o,e):(Za[n]||(Za[n]=new ts(o,e)),c=Za[n]),r.query&&!e.query&&(e.query=r.queryKey),c.socket(r.path,e)}Object.assign(es,{Manager:ts,Socket:Qn,io:es,connect:es});R();var bv=new Set(["__proto__","constructor","prototype"]),_v=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(bv.has(t[e]))return!1;return!0},UR=(t,e)=>{!t||!_v(e)||e.reduce((r,o,n,s)=>{if(r&&o in r){if(n!==s.length-1)return r[o];delete r[o]}},t)},VR=(t,e,r,o=!1)=>{!t||!_v(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)},eb=(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":UR(t,n);break;case"update":case"set":VR(t,n,s,!0);break;default:break}return r},xv=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},wv=(t,e)=>{for(let r in e){if(bv.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}wv(n,o)}else r in t||(t[r]=o)}},rb=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let n={designSystem:t.__rawDesignSystem};eb(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"&&wv(r,s)}return r};R();var Sv=(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(xv(r,c),o){let l=rb(r);l&&ir(l)}}else Zr(r[a],c);else r[a]=c}),o=!0,i&&(r.schema=i))}},kv=(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=eb(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=rb(r,s);ir(c||r.designSystem)}};var HR={success:"green",error:"red",warning:"yellow"},vv=(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)}},Cv={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:HR[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 zR=!1,WR=()=>zR?"http://localhost:8080":"https://api.symbols.app",qR=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}},KR=async t=>{try{let e=t||WR(),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)}},Tv=(t,e,r,o)=>{t.on("snapshot",Sv(e,r,o)),t.on("ops",kv(e,r,o)),t.on("clients",n=>{o.editor?.verbose&&vv(n,e,r)}),t.on("disconnect",n=>{o.editor?.verbose&&console.info("[sync] disconnected",n)})},GR=async(t,e,r,o)=>{let n=await KR(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=es(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)")}),Tv(a,t,e,r),a},YR=(t,e,r)=>{let o=es({transports:["websocket","polling"],reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return o.on("connect",()=>{r.editor?.verbose!==!1&&console.info("[sync] connected (runner)")}),Tv(o,t,e,r),o.on("reload",()=>{typeof v<"u"&&v.location&&v.location.reload()}),o},XR=async(t,e,r)=>{let{mode:o,baseUrl:n}=qR(r);return o?o==="collab"?GR(t,e,r,n):o==="runner"?YR(t,e,r):null:null},JR={onInit:XR};var Ov=t=>typeof t>"u",Ev=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),Av=t=>t?.editor?.runtime==="runner",Rv=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},Pv={name:"sync",beforeCreate(t,e){let r=e&&e.editor;(r&&!Ov(r.liveSync)?r.liveSync:Ev(e)||Av(e))&&(Ev(e)&&!Av(e)&&!e?.key||Rv(t,JR))}},Iv={name:"notifications",beforeCreate(t,e){if(!e)return;let r=Ov(e.notifications)?null:e.notifications,o=e.editor&&e.editor.verbose===!0;(r===!0||r!==!1&&o)&&Rv(t,Cv)}};var sb={};P(sb,{AlertTemplate:()=>yu,ConfirmTemplate:()=>gu,CustomTemplate:()=>_u,ModalLayer:()=>hu,ModalRoot:()=>pu,PromptTemplate:()=>bu,windowsComponents:()=>nb});var ob={};P(ob,{alertDialog:()=>uu,closeAllModals:()=>lu,closeModal:()=>au,confirmDialog:()=>fu,getLayer:()=>iu,openModal:()=>cu,promptDialog:()=>du,windowsFunctions:()=>ur});function X(t){let e=t;for(;e;){if(e.layer!==void 0)return e.layer;e=e.parent}return null}function rs(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 iu(){return X(this)}var ZR=(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"))},Dv=(t,e)=>{let r=t&&t["ModalLayer_"+e],o=r?.node||r?.__ref?.node;!o||typeof o.style?.removeProperty!="function"||(o.style.removeProperty("display"),o.style.removeProperty("opacity"),o.style.removeProperty("visibility"),o.style.removeProperty("pointer-events"))};function au(t){let e=rs(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)ZR(e,i);for(let i of n)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function cu(t={}){let e=rs(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 Dv(e,s),e.state.update({stack:[...n,o]}),r}function lu(){let t=rs(this);!t||!t.state?.stack?.length||t.state.update({stack:[]})}function fu(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"confirm"})}function uu(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"alert"})}function du(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"prompt"})}var ur={openModal:cu,closeModal:au,closeAllModals:lu,confirmDialog:fu,alertDialog:uu,promptDialog:du,getLayer:iu};var QR=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),$v=t=>{if(!t?.querySelectorAll)return[];let e=t.querySelectorAll(QR),r=[];for(let o=0;o<e.length;o++){let n=e[o];(n.offsetParent!==null||n===document.activeElement)&&r.push(n)}return r},Lv=t=>{let e=t.state?.stack||[];if(!e.length)return null;let r=t["ModalLayer_"+(e.length-1)];return r?.node||r?.__ref?.node||null},pu={tag:"div",position:"fixed",inset:"0",zIndex:"2000",pointerEvents:"none",state:{stack:[]},subscribeTo:["stack"],ModalLayer_0:{__slotIndex:0,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[0]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_1:{__slotIndex:1,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[1]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_2:{__slotIndex:2,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[2]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_3:{__slotIndex:3,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[3]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_4:{__slotIndex:4,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[4]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},onInit:(t,e)=>{if(typeof window>"u")return;globalThis.__SMBLS_WINDOWS_MODAL_ROOT__=t;let r=t.context;if(r){r.functions||(r.functions={});for(let a in ur)a in r.functions||(r.functions[a]=ur[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=Lv(t);if(!l)return;let f=$v(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=Lv(t);if(!o)return;let n=$v(o)[0]||o.querySelector&&o.querySelector('[role="dialog"]')||o;try{n.focus&&n.focus()}catch{}});else{let o=null;for(let n=r;n>e;n--)t.__modalOpeners[n]&&(o=o||t.__modalOpeners[n]),t.__modalOpeners[n]=null;if(o&&typeof o.focus=="function"&&o.isConnected!==!1)try{o.focus()}catch{}}},onDestroy:t=>{typeof window>"u"||(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__===t&&(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__=null),t.__escHandler&&(window.removeEventListener("keydown",t.__escHandler),delete t.__escHandler),t.__clickDelegate&&(document.removeEventListener("click",t.__clickDelegate,!0),delete t.__clickDelegate))}};var hu={tag:"div",position:"fixed",inset:"0",alignItems:"center",justifyContent:"center",padding:"A",background:"black.45",backdropFilter:"blur(4px)",transitionProperty:"opacity",transitionDuration:"200ms",transitionTimingFunction:"ease",zIndex:(t,e)=>`${2e3+(t.__slotIndex||0)*10}`,display:(t,e)=>t.layer?"flex":"none",opacity:(t,e)=>t.layer?"1":"0",visibility:(t,e)=>t.layer?"visible":"hidden",pointerEvents:(t,e)=>t.layer?"auto":"none",ModalWindow:{attr:{role:"dialog","aria-modal":"true",tabindex:"-1","aria-labelledby":t=>{let e=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 os=(t,e,r)=>X(t)?.[e]||r,tP=t=>{let e=X(t)?.icon;return e===null||e===!1},gu={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>os(t,"title","Are you sure?"),attr:{id:t=>{let e=X(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>os(t,"message","This action cannot be undone."),color:"dim"}},Icons:{hide:t=>tP(t),Indicator:{extends:"Icon",opacity:".7",icon:t=>os(t,"icon","warning")}}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"Button",theme:"ghost",text:t=>os(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=>os(t,"confirmTheme","primary"),text:t=>os(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 mu=(t,e,r)=>X(t)?.[e]||r,yu={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>mu(t,"title","Notice"),attr:{id:t=>{let e=X(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>mu(t,"message",""),color:"dim"}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:t=>mu(t,"icon","info")}}},ModalFooter:{flow:"x",align:"center end",OkBtn:{extends:"Button",theme:"primary",text:t=>mu(t,"okText","OK"),onClick:(t,e,r)=>{let o=X(e);if(o?.onOk)try{o.onOk()}catch(n){console.warn("[windows] alert.onOk threw:",n)}e.call("closeModal",o?.id)}}}};var Qa=(t,e,r)=>X(t)?.[e]||r,bu={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=>Qa(t,"title","Enter a value"),attr:{id:t=>{let e=X(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>Qa(t,"message",""),color:"dim"}}},InputRow:{extends:"Input",autofocus:!0,placeholder:t=>Qa(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=>Qa(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=>Qa(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 _u={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 ur)i in s.functions||(s.functions[i]=ur[i])}}catch(s){console.warn("[windows] custom.content set failed:",s)}}});t.__ref&&t.__ref.__effects.push(e)}}};var nb={ModalRoot:pu,ModalLayer:hu,ConfirmTemplate:gu,AlertTemplate:yu,PromptTemplate:bu,CustomTemplate:_u};var lb={};P(lb,{Dropdown:()=>Cu,DropdownList:()=>Eu,DropdownParent:()=>Au,DropdownParentFocus:()=>Tu,DropdownRoot:()=>ku,DropdownSiblingFocus:()=>Ou,DropdownTrigger:()=>vu,dropdownComponents:()=>cb});var Mv=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),eP=(t,e,r,o)=>{let n=Mv(t,r,o),s=i=>n[i]>=e.height+8;return s("bottom")?"bottom":s("top")?"top":n.bottom>=n.top?"bottom":"top"},rP=(t,e,r,o,n)=>{let s=Mv(e,o,n),i=t==="top"||t==="bottom"?r.height+8:r.width+8;if(s[t]>=i)return t;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[t];return a&&s[a]>=i?a:t},xu=(t,e,r)=>Math.max(e,Math.min(r,t)),Wr=(t,e,r="auto")=>{if(!t)return{left:0,top:0,side:"bottom",align:"start"};let o=typeof window<"u"?window.innerWidth:1024,n=typeof window<"u"?window.innerHeight:768,s={width:Math.max(120,e?.width||0),height:Math.max(40,e?.height||0)};if(r==="center"){let d=xu((o-s.width)/2,8,Math.max(8,o-s.width-8)),h=xu((n-s.height)/2,8,Math.max(8,n-s.height-8));return{left:d,top:h,side:"center",align:"center"}}let i,a;if(r==="auto")i=eP(t,s,o,n),a="start";else{let d=r.split("-");i=d[0],a=d[1]||"start",i=rP(i,t,s,o,n)}let c,l;i==="bottom"||i==="top"?(a==="start"?c=t.left:a==="end"?c=t.right-s.width:c=t.left+(t.width-s.width)/2,l=i==="bottom"?t.bottom+8:t.top-s.height-8):(a==="start"?l=t.top:a==="end"?l=t.bottom-s.height:l=t.top+(t.height-s.height)/2,c=i==="right"?t.right+8:t.left-s.width-8);let f=Math.max(8,o-s.width-8),u=Math.max(8,n-s.height-8);return c=xu(c,8,f),l=xu(l,8,u),{left:c,top:l,side:i,align:a}},ns=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 dr={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:"70vh",theme:"modal"},oP=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}},ib=t=>t?.getRoot?.()?.DropdownRoot||null,nP=0,sP=()=>`dropdown_${++nP}_${Date.now().toString(36)}`;function wu(t={}){let e=ib(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||oP(r);if(!o)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let n=t.id||sP(),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||dr.placement,trigger:t.trigger||dr.trigger,offset:t.offset??dr.offset,minWidth:t.minWidth||dr.minWidth,maxWidth:t.maxWidth||dr.maxWidth,maxHeight:t.maxHeight||dr.maxHeight,theme:t.theme||dr.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 Su(t){let e=ib(this);if(!e)return;let r=e.state?.layer;r&&e.state.update({layer:{...r,inert:!!t}})}function Oo(t){let e=ib(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 iP=`
104
104
  @keyframes smbls-dropdown-fade-in {
105
105
  from { opacity: 0; transform: var(--smbls-dropdown-from, translateY(-6px)) scale(0.98); }
106
106
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
@@ -122,7 +122,7 @@ ${i}
122
122
  border-width: 0 !important;
123
123
  padding: 0 !important;
124
124
  }
125
- `,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=`
125
+ `,aP=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let t=document.createElement("style");t.id="smbls-dropdown-css",t.textContent=iP,document.head.appendChild(t)},Fv=(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","")},cP=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")},ku={tag:"div",attr:{"data-smbls-dropdown-root":"true"},position:"fixed",inset:"0",zIndex:"1500",pointerEvents:"none",state:{layer:null},onInit:t=>{if(aP(),typeof window>"u")return;let e=o=>{o.key==="Escape"&&t.state?.layer&&(o.preventDefault(),Oo.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}Oo.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 Wr(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 Wr(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":ns(Wr(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)}Fv(t,r),cP(t),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{if(!t.node)return;Fv(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=Wr(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",ns(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=Wr(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",ns(s.side))}}}};var ab=t=>{let e=t?.getRoot?.()?.DropdownRoot?.state?.layer;if(e&&t.dropdownId&&e.id===t.dropdownId){t.call("closeDropdown");return}let r={anchorEl:t,trigger:t.dropdownTrigger||"click",placement:t.dropdownPlacement||"auto",content:t.dropdownContent||null,minWidth:t.dropdownMinWidth,maxWidth:t.dropdownMaxWidth,maxHeight:t.dropdownMaxHeight,theme:t.dropdownTheme,offset:t.dropdownOffset,id:t.dropdownId,onOpen:t.onDropdownOpen,onClose:t.onDropdownClose};for(let o in r)r[o]===void 0&&delete r[o];t.call("openDropdown",r)},vu={position:"relative",onClick:(t,e)=>{(e.dropdownTrigger||"click")==="click"&&(t.preventDefault(),t.stopPropagation(),ab(e))},onFocus:(t,e)=>{e.dropdownTrigger==="focus"&&ab(e)},onMouseenter:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&clearTimeout(e._hoverTimer),e._hoverTimer=setTimeout(()=>ab(e),120))},onMouseleave:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&(clearTimeout(e._hoverTimer),e._hoverTimer=null),e._closeTimer=setTimeout(()=>e.call("closeDropdown"),250))}};var Cu={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"},Eu={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"}}},Au={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},Tu={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()}}},Ou={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 cb={DropdownRoot:ku,DropdownTrigger:vu,Dropdown:Cu,DropdownList:Eu,DropdownParent:Au,DropdownParentFocus:Tu,DropdownSiblingFocus:Ou};var ub={};P(ub,{DROPDOWN_DEFAULTS:()=>dr,closeDropdown:()=>Oo,computePosition:()=>Wr,dropdownFunctions:()=>fb,fadeInTransform:()=>ns,openDropdown:()=>wu,setDropdownInert:()=>Su});var fb={openDropdown:wu,closeDropdown:Oo,setDropdownInert:Su};var lP=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),fP=(t,e,r,o,n)=>{let s=lP(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},Nv=(t,e,r)=>Math.max(e,Math.min(r,t)),Ru=(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=fP(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=Nv(i,6,o-e.width-6),a=Nv(a,6,n-e.height-6),{left:i,top:a,side:s}},jv=t=>{switch(t){case"bottom":return"translateY(-4px)";case"top":return"translateY(4px)";case"left":return"translateX(4px)";case"right":return"translateX(-4px)";default:return"translateY(-4px)"}};var uP=`
126
126
  @keyframes smbls-tooltip-fade-in {
127
127
  from { opacity: 0; transform: var(--smbls-tooltip-from, translateY(-4px)); }
128
128
  to { opacity: 1; transform: translate3d(0, 0, 0); }
@@ -130,4 +130,4 @@ ${i}
130
130
  [data-smbls-tooltip="panel"][data-smbls-open="true"] {
131
131
  animation: smbls-tooltip-fade-in 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
132
132
  }
133
- `,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});
133
+ `,dP=()=>{if(typeof document>"u"||document.getElementById("smbls-tooltip-css"))return;let t=document.createElement("style");t.id="smbls-tooltip-css",t.textContent=uP,document.head.appendChild(t)},Bv={tag:"div",attr:{"data-smbls-tooltip-root":"true"},position:"fixed",inset:"0",zIndex:"2500",pointerEvents:"none",state:{tip:null},onInit:()=>{dP()},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 Ru(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 Ru(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":jv(Ru(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 pP=t=>{t.tooltipText&&t.call("openTooltip",{anchorEl:t,text:t.tooltipText,placement:t.tooltipPlacement||"bottom",theme:t.tooltipTheme,id:t.tooltipId||t.key})},Uv=t=>{t._tooltipHideTimer&&(clearTimeout(t._tooltipHideTimer),t._tooltipHideTimer=null),!t._tooltipShowTimer&&(t._tooltipShowTimer=setTimeout(()=>{t._tooltipShowTimer=null,pP(t)},t.tooltipDelay??250))},Vv=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))},Hv={onMouseenter:(t,e)=>Uv(e),onMouseleave:(t,e)=>Vv(e),onFocus:(t,e)=>Uv(e),onBlur:(t,e)=>Vv(e)};R();var zv={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)}},Wv={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)}},qv={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 Kv={TooltipRoot:Bv,TooltipTrigger:Hv,Tooltip:zv,TooltipHidden:Wv,TooltipParent:qv};var Gv={placement:"bottom",theme:"tooltip .quaternary",delay:250,hideDelay:100},hP=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}},Yv=t=>t?.getRoot?.()?.TooltipRoot||null,gP=0,mP=()=>`tooltip_${++gP}_${Date.now().toString(36)}`;function Xv(t={}){let e=Yv(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||hP(r);if(!o)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let n=t.id||mP(),s={id:n,text:t.text||"",anchor:o,placement:t.placement||Gv.placement,theme:t.theme||Gv.theme};return e.state.update({tip:s}),n}function Jv(t){let e=Yv(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 Zv={openTooltip:Xv,closeTooltip:Jv};var Qv=t=>!!(t&&typeof t=="object"&&t.__isStub===!0),yP=(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(!Qv(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)},bP=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||jn,e.cssPropsRegistry=bt,e.window=vk(e),e.sharedLibraries&&e.sharedLibraries.length){if(e.sharedLibraries.some(g=>typeof g=="string"||Qv(g))){e.sharedLibraries=yP(e.sharedLibraries,e.symbolsConfig);let{resolveSharedLibraries:g}=await Promise.resolve().then(()=>(R(),ul));e.sharedLibraries=await g(e.sharedLibraries,{apiBaseUrl:Dy()})}wk(e.sharedLibraries),Lk(e)}let[s,i]=Ik(n,e);e.designSystem=s,e.registry=i,e.cases||(e.cases={}),e.shorthand&&Ma.prepareContext(e);let a=Dk(t,e);if(e.state=a,ni(a),e.pages=$k(t,e),e.components=Ck(e),e.utils=Ek(e),Sr[e.packageManager]&&(e.dependencies=await Tk(e)),e.methods=Ak(e),e.routerOptions=h0(t,e),e.defaultExtends=[mf],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=Cs(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(Vn);for(let h in Ha)typeof e.functions[h]!="function"&&(e.functions[h]=Ha[h])}if(f("helmet")||e.plugins.push(sy),e.fetch&&!f("fetch")&&e.plugins.push(jp),e.designSystem?.typography?.useCapsize!==!1&&!f("capsize")&&(e.plugins.push(Of),e.cssPropsRegistry.useCapsize=ly),e.shorthand&&!f("shorthand")&&e.plugins.push(Ma),e.analyze&&!f("analyze")){let h=e.analyze===!0?{}:e.analyze;e.analyze=Bf(h),e.plugins.push(zn)}e.sync!==!1&&!f("sync")&&e.plugins.push(Pv),e.inspect&&!f("inspect")&&e.plugins.push(Py),(e.notifications===!0||e.editor&&e.editor.verbose===!0)&&e.notifications!==!1&&!f("notifications")&&e.plugins.push(Iv);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",nb,ur),d("dropdown",cb,fb),d("tooltip",Kv,Zv),e},db=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 bP(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=E0(t,e),e.router!==!1&&(t.routes=e.pages),t.state=e.state,t.context=e,t.data=t.data||{},e.skipDesignSystemInit||await Ok({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 _P(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},_P=async(t,e,r,o,n,s)=>{let i=r.ownerDocument||document;s&&s.forEach(l=>{l.parentNode&&l.remove()});let a=[];for(let l of r.childNodes){if(l.nodeType===1){let f=l.tagName.toLowerCase();if(f==="script"||f==="link"||f==="style"||f==="svg"&&l.id)continue}a.push(l)}a.forEach(l=>l.remove()),i.querySelectorAll("[data-br]").forEach(l=>l.removeAttribute("data-br"));let c=t(e,r,o.key,{verbose:o.verbose,context:o,...o.domqlOptions});return xP(n),c},xP=t=>{t&&(delete t.__BRENDER__,delete t.__BR_REGISTRY__)};var pb=(t,e)=>nt(t,S(e)?e:{}),wP=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},SP=()=>{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}},tC=t=>{let e=SP();e&&(t.editor||(t.editor={}),t.editor.runtime||(t.editor.runtime=e),e==="runner"&&typeof t.editor.livesync>"u"&&(t.editor.livesync=!0))},hb=(t,e=Nr,r)=>{let o={...Nr,...pb(e,r)};return tC(o),wP(o),db(t,o).then(s=>{if(ry(s,o),s.destroy=()=>Ca(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=va(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})},kP=(t,e=Nr,r)=>{let o=hb(t,e,r),n={...Nr,...pb(e,r)},s=n.key;return b0(o,s,{utils:ka,...n}),o},vP=async(t,e=Nr,r)=>{let o={...Nr,...pb(e,r)};tC(o);let n=e.key;await y0(n,o);let s=await db(t,o);return ry(s,o),s.destroy=()=>Ca(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=va(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},CP=(t={},e=Nr,r)=>hb({deps:{isUndefined:Et},...t},nt({domqlOptions:{onlyResolveExtends:!0}},e),r);Sf(ca);bk(void 0,{smbls:gb,"@symbo.ls/windows":{...sb,...ob},"@symbo.ls/dropdown":{...lb,...ub}});