smbls 3.14.788 → 3.14.790

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 mC=Object.create;var ic=Object.defineProperty;var yC=Object.getOwnPropertyDescriptor;var bC=Object.getOwnPropertyNames;var _C=Object.getPrototypeOf,xC=Object.prototype.hasOwnProperty;var F=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(o){throw r=[o],o}};var Vu=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},P=(t,e)=>{for(var r in e)ic(t,r,{get:e[r],enumerable:!0})},Cb=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of bC(e))!xC.call(t,n)&&n!==r&&ic(t,n,{get:()=>e[n],enumerable:!(o=yC(e,n))||o.enumerable});return t};var wC=(t,e,r)=>(r=t!=null?mC(_C(t)):{},Cb(e||!t||!t.__esModule?ic(r,"default",{value:t,enumerable:!0}):r,t)),SC=t=>Cb(ic({},"__esModule",{value:!0}),t);var ad,cd,v,Q,ms=F(()=>{"use strict";ad=globalThis,cd=globalThis,v=globalThis,Q=v.document});var Je,ys,Ht,bs=F(()=>{"use strict";ms();Je=t=>(typeof Node=="object"?t instanceof v.Node:t&&typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.nodeName=="string")||!1,ys=t=>(typeof HTMLElement=="object"?t instanceof v.HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string")||!1,Ht=t=>typeof v<"u"&&(v.Node&&t instanceof v.Node||v.Window&&t instanceof v.Window||t===v||Q!==void 0&&t===Q)});var S,w,Me,A,bc,_c,O,xc,H,bt,Tt,_s,zt,ld,Ot=F(()=>{"use strict";bs();S=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,w=t=>typeof t=="string",Me=t=>typeof t=="number",A=t=>typeof t=="function",bc=t=>t===!0||t===!1,_c=t=>t===null,O=t=>Array.isArray(t),xc=t=>t instanceof Date,H=t=>t===null?!1:typeof t=="object",bt=t=>t!==void 0,Tt=t=>t===void 0,_s={boolean:bc,array:O,object:S,string:w,date:xc,number:Me,null:_c,function:A,objectLike:H,node:Je,htmlElement:ys,defined:bt},zt=t=>(...e)=>e.some(r=>_s[r](t)),ld=t=>(...e)=>!e.some(r=>_s[r](t))});var fd,ud,dd,pd,jo,xs,hd,gd,ws,md,yd,bd,_d,xd,wd,Sd,Bo,Ss,Uo=F(()=>{"use strict";Ze();Ot();fd=(t,e)=>e.every(r=>t.includes(r)),ud=(t,e)=>{let r=0;for(let o=0;o<t.length;o++)t[o]===e&&r++;return r},dd=(t,e)=>{if(w(e)&&(e=parseInt(e)),Me(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},pd=(t,e,r)=>{e<0||r<0||e>=t.length||r>=t.length||([t[e],t[r]]=[t[r],t[e]])},jo=(...t)=>[].concat(...t),xs=(t,e=[])=>t.reduce((r,o)=>st(r,dt(o,{exclude:e}),e),{}),hd=(t,e)=>{let r=t.indexOf(e);return r!==-1?t.slice(0,r):t},gd=(t,e)=>{if(!O(t))return;let r=t.indexOf(e);return r!==-1?t.slice(r+1):t},ws=(t,e)=>{let r=t.indexOf(e);if(r>-1){let o=[...t];return o.splice(r,1),o}return t},md=(t,e)=>t.filter(r=>r!==e),yd=(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},bd=(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},_d=(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},xd=(t,e)=>t.filter(r=>!e.includes(r)),wd=(t,e)=>{let r=new Set(e);return t.filter(o=>!r.has(o))},Sd=(t,e)=>{if(!t)return 0;let r=0;for(let o=0;o<e.length;o++)t.includes(e[o])&&r++;return r},Bo=t=>O(t)?[...new Set(t)]:t,Ss=(t,e)=>{for(let r in e)Object.defineProperty(t,r,{value:e[r],enumerable:!1,configurable:!0,writable:!0})}});function Jr(t,e,r={}){let{bracketsLength:o=2}=r,n=o===3?"{{{":"{{";if(!t.includes(n))return t;let s=jC[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=ks(g,d);return String(p??"")}else{let h=ks(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 _=ks(m,d);if(_!=null&&typeof _!="object")return String(_);for(let y in m){let x=m[y];if(x&&typeof x=="object"&&!Array.isArray(x)){let k=ks(x,d);if(k!=null&&typeof k!="object")return String(k)}}}let b=ks(g.translations,d);if(b!=null&&typeof b!="object")return String(b)}return""}})}var vs,kd,jC,ks,Zr,vd,BC,Cd,Ed,Ad,UC,Td,Od,Cs=F(()=>{"use strict";vs=(t,e)=>{for(let r of e)if(t.includes(r))return!0;return!1},kd=(t,e)=>{let r=new RegExp(`[${e.join("\\")}]`,"g");return t.replace(r,"")},jC={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},ks=(t,e)=>e.split(".").reduce((r,o)=>r?.[o],t);Zr=t=>`${t.charAt(0).toLowerCase()}${t.slice(1)}`,vd=(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}},BC=/\\([0-7]{1,3})/g,Cd=t=>t.replace(BC,(e,r)=>String.fromCharCode(parseInt(r,8))),Ed=t=>t.replace(/\n/g,"/////n").replace(/`/g,"/////tilde").replace(/\$/g,"/////dlrsgn"),Ad=t=>t.replace(/\/\/\/\/\/n/g,`
3
- `).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),UC=/[^a-zA-Z0-9\s]/g,Td=t=>t.replace(UC,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),Od=t=>t.replace(/%[0-9A-Fa-f]{2}/g,e=>String.fromCharCode(parseInt(e.slice(1),16)))});var mr,Es,Rd,Qr,yr,Vo,As,Pd,Ho=F(()=>{"use strict";mr=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"]),Es=new Set(["attr","style","text","html","content","data","class","state","scope","children","props","if","key","tag","query","on","context"]),Rd=["ref","parent","__element","__depends","__ref","__children","root"],Qr=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"]),yr=new Set(["update","__element"]),Vo=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"]),As=new Set(["node","context","extends","__element","__ref",...Vo,...Qr,...yr]),Pd=new Set(["init","beforeClassAssign","render","renderRouter","attachNode","stateInit","stateCreated","beforeStateUpdate","stateUpdate","beforeUpdate","done","create","complete","frame","update","fetchError","fetchComplete"])});var Nb,to,ft,Id,gt,st,Ub,Dd,dt,Ts,VC,Os,HC,zC,WC,Fe,qC,KC,jb,ce,GC,YC,Vb,Hb,Bb,Rs,$d,Ld,wc,Md,Fd,Ps,eo,Wt,Sc,XC,Nd,jd,kc,Bd,Ud,Vd,Hd,zd,Wd,qd,Ze=F(()=>{"use strict";ms();Ot();Uo();Cs();bs();Ho();Nb="production",to=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,ft=(t,e,r,o)=>{if(A(t))return e?typeof t.call!="function"?t:t.call(e,e,r||e.state,o||e.context):void 0;if(t!=null&&e?.context?.plugins&&(O(t)||S(t)&&!Ht(t))){let n=e.context.plugins;for(let s of n)if(s.resolveHandler){let i=s.resolveHandler(t,e);if(typeof i=="function")return ft(i,e,r,o)}}return t},Id=(t,e,r)=>{for(let o in e)t[o]=ft(e[o],r)},gt=(t,e,r=[])=>{let o=r instanceof Set;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(to(n)||(o?r.has(n):r.includes(n))||t[n]===void 0&&(t[n]=e[n]));return t},st=(t,e,r=As)=>Ub(t,e,r,null),Ub=(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)||to(s)||s==="constructor"||s==="prototype"||(n?r.has(s):r.includes(s)))continue;let i=t[s],a=e[s];if(H(i)&&H(a)){let c=o||[];c.push(t,e),Ub(i,a,r,c),c.length-=2}else i===void 0&&(t[s]=a)}return t},Dd=(t,e=[])=>{let r=e instanceof Set,o={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(to(n)||(r?e.has(n):e.includes(n))||(o[n]=t[n]));return o},dt=(t,e={})=>{let{exclude:r=[],cleanUndefined:o=!1,cleanNull:n=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!H(t)||Ht(t))return t;if(s.has(t))return s.get(t);let a=r instanceof Set?r:r.length>3?new Set(r):null,c=u=>a?a.has(u):r.includes(u),l=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)||to(h)||h==="__proto__"||c(h))continue;let g=u[h];if(!(o&&g===void 0)&&!(n&&g===null)){if(Ht(g)){d[h]=g;continue}if(i&&h==="extends"&&O(g)){d[h]=xs(g,r);continue}if(A(g)){d[h]=g;continue}if(H(g))if(s.has(g))d[h]=s.get(g);else{let p=O(g)?[]:{};s.set(g,p),d[h]=p,f.push([g,p])}else d[h]=g}}}return l},Ts=(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]={},Ts(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]={},Ts(i,n[s])):A(i)?n[s]=i.toString():n[s]=i}}else e[r]=o}return e},VC=new Set(["&","*","-",":","%","{","}",">","<","@",".","/","!"," "]),Os=(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(VC.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 kC=Object.create;var cc=Object.defineProperty;var vC=Object.getOwnPropertyDescriptor;var CC=Object.getOwnPropertyNames;var EC=Object.getPrototypeOf,AC=Object.prototype.hasOwnProperty;var F=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(o){throw r=[o],o}};var zu=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},P=(t,e)=>{for(var r in e)cc(t,r,{get:e[r],enumerable:!0})},Ob=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of CC(e))!AC.call(t,n)&&n!==r&&cc(t,n,{get:()=>e[n],enumerable:!(o=vC(e,n))||o.enumerable});return t};var TC=(t,e,r)=>(r=t!=null?kC(EC(t)):{},Ob(e||!t||!t.__esModule?cc(r,"default",{value:t,enumerable:!0}):r,t)),OC=t=>Ob(cc({},"__esModule",{value:!0}),t);var ld,fd,v,Q,bs=F(()=>{"use strict";ld=globalThis,fd=globalThis,v=globalThis,Q=v.document});var Ze,_s,zt,xs=F(()=>{"use strict";bs();Ze=t=>(typeof Node=="object"?t instanceof v.Node:t&&typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.nodeName=="string")||!1,_s=t=>(typeof HTMLElement=="object"?t instanceof v.HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string")||!1,zt=t=>typeof v<"u"&&(v.Node&&t instanceof v.Node||v.Window&&t instanceof v.Window||t===v||Q!==void 0&&t===Q)});var S,w,Fe,A,xc,wc,O,Sc,H,bt,Tt,ws,Wt,ud,Ot=F(()=>{"use strict";xs();S=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,w=t=>typeof t=="string",Fe=t=>typeof t=="number",A=t=>typeof t=="function",xc=t=>t===!0||t===!1,wc=t=>t===null,O=t=>Array.isArray(t),Sc=t=>t instanceof Date,H=t=>t===null?!1:typeof t=="object",bt=t=>t!==void 0,Tt=t=>t===void 0,ws={boolean:xc,array:O,object:S,string:w,date:Sc,number:Fe,null:wc,function:A,objectLike:H,node:Ze,htmlElement:_s,defined:bt},Wt=t=>(...e)=>e.some(r=>ws[r](t)),ud=t=>(...e)=>!e.some(r=>ws[r](t))});var dd,pd,hd,gd,Bo,Ss,md,yd,ks,bd,_d,xd,wd,Sd,kd,vd,Uo,vs,Vo=F(()=>{"use strict";Qe();Ot();dd=(t,e)=>e.every(r=>t.includes(r)),pd=(t,e)=>{let r=0;for(let o=0;o<t.length;o++)t[o]===e&&r++;return r},hd=(t,e)=>{if(w(e)&&(e=parseInt(e)),Fe(e)){if(e<0||e>=t.length||isNaN(e))throw new Error("Invalid index");t.splice(e,1)}else throw new Error("Invalid index");return t},gd=(t,e,r)=>{e<0||r<0||e>=t.length||r>=t.length||([t[e],t[r]]=[t[r],t[e]])},Bo=(...t)=>[].concat(...t),Ss=(t,e=[])=>t.reduce((r,o)=>st(r,ft(o,{exclude:e}),e),{}),md=(t,e)=>{let r=t.indexOf(e);return r!==-1?t.slice(0,r):t},yd=(t,e)=>{if(!O(t))return;let r=t.indexOf(e);return r!==-1?t.slice(r+1):t},ks=(t,e)=>{let r=t.indexOf(e);if(r>-1){let o=[...t];return o.splice(r,1),o}return t},bd=(t,e)=>t.filter(r=>r!==e),_d=(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},xd=(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},wd=(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},Sd=(t,e)=>t.filter(r=>!e.includes(r)),kd=(t,e)=>{let r=new Set(e);return t.filter(o=>!r.has(o))},vd=(t,e)=>{if(!t)return 0;let r=0;for(let o=0;o<e.length;o++)t.includes(e[o])&&r++;return r},Uo=t=>O(t)?[...new Set(t)]:t,vs=(t,e)=>{for(let r in e)Object.defineProperty(t,r,{value:e[r],enumerable:!1,configurable:!0,writable:!0})}});function Zr(t,e,r={}){let{bracketsLength:o=2}=r,n=o===3?"{{{":"{{";if(!t.includes(n))return t;let s=qC[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=Cs(g,d);return p!=null&&typeof p=="object"?"":String(p??"")}else{let h=Cs(i,d);if(h!=null&&typeof h!="object")return String(h);let g=a?.context?.polyglot;if(g?.translations){let p=i?.root?.lang||i?.lang||a?.context?.state?.lang||g.defaultLang||"en",m=g.translations[p];if(m){let _=Cs(m,d);if(_!=null&&typeof _!="object")return String(_);for(let y in m){let x=m[y];if(x&&typeof x=="object"&&!Array.isArray(x)){let k=Cs(x,d);if(k!=null&&typeof k!="object")return String(k)}}}let b=Cs(g.translations,d);if(b!=null&&typeof b!="object")return String(b)}return""}})}var Es,Cd,qC,Cs,Qr,Ed,KC,Ad,Td,Od,GC,Rd,Pd,As=F(()=>{"use strict";Es=(t,e)=>{for(let r of e)if(t.includes(r))return!0;return!1},Cd=(t,e)=>{let r=new RegExp(`[${e.join("\\")}]`,"g");return t.replace(r,"")},qC={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},Cs=(t,e)=>e.split(".").reduce((r,o)=>r?.[o],t);Qr=t=>`${t.charAt(0).toLowerCase()}${t.slice(1)}`,Ed=(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}},KC=/\\([0-7]{1,3})/g,Ad=t=>t.replace(KC,(e,r)=>String.fromCharCode(parseInt(r,8))),Td=t=>t.replace(/\n/g,"/////n").replace(/`/g,"/////tilde").replace(/\$/g,"/////dlrsgn"),Od=t=>t.replace(/\/\/\/\/\/n/g,`
3
+ `).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),GC=/[^a-zA-Z0-9\s]/g,Rd=t=>t.replace(GC,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),Pd=t=>t.replace(/%[0-9A-Fa-f]{2}/g,e=>String.fromCharCode(parseInt(e.slice(1),16)))});var yr,Ts,Id,to,br,Ho,Os,Dd,zo=F(()=>{"use strict";yr=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"]),Ts=new Set(["attr","style","text","html","content","data","class","state","scope","children","props","if","key","tag","query","on","context"]),Id=["ref","parent","__element","__depends","__ref","__children","root"],to=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"]),br=new Set(["update","__element"]),Ho=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"]),Os=new Set(["node","context","extends","__element","__ref",...Ho,...to,...br]),Dd=new Set(["init","beforeClassAssign","render","renderRouter","attachNode","stateInit","stateCreated","beforeStateUpdate","stateUpdate","beforeUpdate","done","create","complete","frame","update","fetchError","fetchComplete"])});var Vb,eo,ut,$d,gt,st,Wb,Ld,ft,Rs,YC,Ps,XC,JC,ZC,Ne,QC,tE,Hb,le,eE,rE,qb,Kb,zb,Is,Md,Fd,kc,Nd,jd,Ds,ro,qt,vc,oE,Bd,Ud,Cc,Vd,Hd,zd,Wd,qd,Kd,Gd,Qe=F(()=>{"use strict";bs();Ot();Vo();As();xs();zo();Vb="production",eo=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,ut=(t,e,r,o)=>{if(A(t))return e?typeof t.call!="function"?t:t.call(e,e,r||e.state,o||e.context):void 0;if(t!=null&&e?.context?.plugins&&(O(t)||S(t)&&!zt(t))){let n=e.context.plugins;for(let s of n)if(s.resolveHandler){let i=s.resolveHandler(t,e);if(typeof i=="function")return ut(i,e,r,o)}}return t},$d=(t,e,r)=>{for(let o in e)t[o]=ut(e[o],r)},gt=(t,e,r=[])=>{let o=r instanceof Set;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(eo(n)||(o?r.has(n):r.includes(n))||t[n]===void 0&&(t[n]=e[n]));return t},st=(t,e,r=Os)=>Wb(t,e,r,null),Wb=(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)||eo(s)||s==="constructor"||s==="prototype"||(n?r.has(s):r.includes(s)))continue;let i=t[s],a=e[s];if(H(i)&&H(a)){let c=o||[];c.push(t,e),Wb(i,a,r,c),c.length-=2}else i===void 0&&(t[s]=a)}return t},Ld=(t,e=[])=>{let r=e instanceof Set,o={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(eo(n)||(r?e.has(n):e.includes(n))||(o[n]=t[n]));return o},ft=(t,e={})=>{let{exclude:r=[],cleanUndefined:o=!1,cleanNull:n=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!H(t)||zt(t))return t;if(s.has(t))return s.get(t);let a=r instanceof Set?r:r.length>3?new Set(r):null,c=u=>a?a.has(u):r.includes(u),l=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)||eo(h)||h==="__proto__"||c(h))continue;let g=u[h];if(!(o&&g===void 0)&&!(n&&g===null)){if(zt(g)){d[h]=g;continue}if(i&&h==="extends"&&O(g)){d[h]=Ss(g,r);continue}if(A(g)){d[h]=g;continue}if(H(g))if(s.has(g))d[h]=s.get(g);else{let p=O(g)?[]:{};s.set(g,p),d[h]=p,f.push([g,p])}else d[h]=g}}}return l},Rs=(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]={},Rs(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]={},Rs(i,n[s])):A(i)?n[s]=i.toString():n[s]=i}}else e[r]=o}return e},YC=new Set(["&","*","-",":","%","{","}",">","<","@",".","/","!"," "]),Ps=(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(YC.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
- `:H(l)&&l!==null?n+=`${o} ${Os(l,e+2)},
6
+ `:H(l)&&l!==null?n+=`${o} ${Ps(l,e+2)},
7
7
  `:w(l)?n+=`${o} '${l}',
8
8
  `:n+=`${o} ${l},
9
- `;n+=`${o} ]`}else H(i)?n+=Os(i,e+1):w(i)?n+=vs(i,[`
9
+ `;n+=`${o} ]`}else H(i)?n+=Ps(i,e+1):w(i)?n+=Es(i,[`
10
10
  `,"'"])?`\`${i}\``:`'${i}'`:n+=i;n+=`,
11
- `}return n+=`${o}}`,n},HC=[/^\(\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]*\}$/],zC=/^["[{]/,WC=/^(export|import)\s/,Fe=t=>{if(!t)return!1;let e=t.trim().replace(/\n\s*/g," ").trim();if(e===""||e==="{}"||e==="[]"||WC.test(e)||!HC.some(s=>s.test(e)))return!1;let o=e.charCodeAt(0),n=e.includes("=>");return!(o===123&&!n||o===91||zC.test(e)&&!n)},qC=t=>(0,eval)(t),KC=(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},XC=[/^\(\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]*\}$/],JC=/^["[{]/,ZC=/^(export|import)\s/,Ne=t=>{if(!t)return!1;let e=t.trim().replace(/\n\s*/g," ").trim();if(e===""||e==="{}"||e==="[]"||ZC.test(e)||!XC.some(s=>s.test(e)))return!1;let o=e.charCodeAt(0),n=e.includes("=>");return!(o===123&&!n||o===91||JC.test(e)&&!n)},QC=t=>(0,eval)(t),tE=(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},jb=(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=KC(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)}},ce=(t,e={},r={window:{eval:qC}})=>{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))Fe(a)?s[i]=jb(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(Fe(f)?jb(f,`array index ${l} (prop "${i}")`,r):f);else if(S(f)){let u=Bb(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=Bb(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},GC="Set",YC="Map",Vb="RegExp",Hb=t=>{if(!t||typeof t!="object")return t;if(t.__type===GC&&Array.isArray(t.values))return new Set(t.values);if(t.__type===YC&&Array.isArray(t.entries))return new Map(t.entries);if(t.__type===Vb&&w(t.source))try{return new RegExp(t.source,w(t.flags)?t.flags:"")}catch{return t}return t},Bb=t=>{if(!t||typeof t!="object"||t.__type!==Vb)return null;let e=Hb(t);return e instanceof RegExp?e:null},Rs=t=>{if(!t||typeof t!="object")return t;let e={},r=[];for(let i of Object.keys(t)){let a=t[i];w(a)&&Fe(a)?r.push([i,a]):e[i]=Hb(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},Hb=(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=tE(l,f);if(!d||d===l)break;l=d;try{c=r.window.eval("("+l+")");break}catch(h){let g=/Identifier '([^']+)' has already been declared/.exec(h&&h.message||String(h));if(!g||g[1]!==f)break}}}if(!c&&/Unexpected (token '\{'|identifier)/.test(s))try{let l=r.window.eval("({"+t+"})");if(l&&typeof l=="object"){let f=Object.keys(l);f.length===1&&typeof l[f[0]]=="function"&&(c=l[f[0]])}}catch{}return c||(typeof console<"u"&&console.warn&&console.warn(`[smbls] deepDestringifyFunctions: eval failed on ${e} \u2014 value will be left as a string. Reason: `+s+`.
14
+ First 200 chars of source: `+String(t).slice(0,200)),t)}},le=(t,e={},r={window:{eval:QC}})=>{if(!t||typeof t!="object")return e;let o=[[t,e]];for(;o.length;){let[n,s]=o.pop();for(let i in n){if(!Object.prototype.hasOwnProperty.call(n,i))continue;let a=n[i];if(w(a))Ne(a)?s[i]=Hb(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(Ne(f)?Hb(f,`array index ${l} (prop "${i}")`,r):f);else if(S(f)){let u=zb(f);if(u)c.push(u);else{let d={};c.push(d),o.push([f,d])}}else c.push(f)}}else if(S(a)){let c=zb(a);if(c){s[i]=c;continue}let l=s[i]&&typeof s[i]=="object"&&!O(s[i])?s[i]:s[i]={};o.push([a,l])}else s[i]=a}}return e},eE="Set",rE="Map",qb="RegExp",Kb=t=>{if(!t||typeof t!="object")return t;if(t.__type===eE&&Array.isArray(t.values))return new Set(t.values);if(t.__type===rE&&Array.isArray(t.entries))return new Map(t.entries);if(t.__type===qb&&w(t.source))try{return new RegExp(t.source,w(t.flags)?t.flags:"")}catch{return t}return t},zb=t=>{if(!t||typeof t!="object"||t.__type!==qb)return null;let e=Kb(t);return e instanceof RegExp?e:null},Is=t=>{if(!t||typeof t!="object")return t;let e={},r=[];for(let i of Object.keys(t)){let a=t[i];w(a)&&Ne(a)?r.push([i,a]):e[i]=Kb(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},$d=(t,e={verbose:!0})=>{try{return t?v.eval("("+t+")"):{}}catch(r){e.verbose&&console.warn(r)}},Ld=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),wc=t=>{for(let e in t)return!1;return!0},Md=t=>S(t)&&wc(t),Fd=()=>Object.create(null),Ps=(t,e,r={})=>{let o=r.exclude||[],n=r.preventUnderscore;for(let s in e)o.includes(s)||!n&&to(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},eo=(t,e,r=[])=>{let o=r instanceof Set;for(let n in e)to(n)||n==="constructor"||n==="prototype"||(o?r.has(n):r.includes(n))||(t[n]=e[n]);return t},Wt=(t,e,r={},o=new WeakMap)=>{if(!H(t)||!H(e)||Ht(t)||Ht(e))return e;if(o.has(t))return o.get(t);o.set(t,t);let n=r.exclude,s=n?n instanceof Set?n:new Set(n):null,i=!r.preventForce;for(let a in e){if(!Object.prototype.hasOwnProperty.call(e,a)||s&&s.has(a)||i&&to(a)||a==="constructor"||a==="prototype")continue;let c=t[a],l=e[a];Ht(l)?t[a]=l:H(c)&&H(l)?t[a]=Wt(c,l,r,o):l!==void 0&&(t[a]=l)}return t},Sc=(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)||!Sc(t[i],e[i],r))return!1}return!0},XC=new Set(["node","__ref"]),Nd=(t,e,r=XC)=>{if(t===e)return!0;if(!H(t)||!H(e)||Ht(t)||Ht(e))return t===e;let o=r instanceof Set?r:new Set(r),n=new WeakSet;function s(i,a){if(n.has(a))return!0;n.add(a);for(let c in a){if(!Object.prototype.hasOwnProperty.call(a,c)||o.has(c))continue;if(!Object.prototype.hasOwnProperty.call(i,c))return!1;let l=a[c],f=i[c];if(Ht(l)||Ht(f)){if(l!==f)return!1}else if(H(l)&&H(f)){if(!s(f,l))return!1}else if(l!==f)return!1}return!0}return s(t,e)},jd=(t,e)=>{if(e==null)return t;if(zt(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},kc=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]=kc(t[r]));return e},Bd=(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},Ud=(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]},Vd=(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},Hd=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let o=0;o<e.length;o++){if(r==null)return;r=r[e[o]]}return r},zd=t=>{let r=[],o=0;for(let n=0;n<t.length;n++)if(r.length<2)r.push(t[n]);else if(t[n]===r[n%2]?o++:(r=[t[n-1],t[n]],o=1),o>=20)return(Nb==="test"||Nb==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",r),!0},Wd=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)},qd=(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 Is,Ds,$s,vc=F(()=>{"use strict";Ze();Is=(function(){let t=0;function e(){return t++,t}return e})(),Ds=Is,$s=(t,e,r)=>(ft(r,t)||r||t.key||Is()).toString()});var ke,Kd,br,Cc,Gd,Yd,Xd,_r,Jd,ro,Pt,Zd=F(()=>{"use strict";ke="production",Kd=ke,br=(t=ke)=>t==="production",Cc=(t=ke)=>t==="testing"||t==="test",Gd=Cc,Yd=(t=ke)=>t==="staging",Xd=(t=ke)=>t==="local",_r=(t=ke)=>t==="development"||t==="dev"||t==="local",Jd=(t,e=ke)=>e[t],ro=(t=ke)=>!br(t),Pt=t=>{let e=t&&"env"in t?t.env:typeof process<"u"&&process.env?"production":void 0;if(e&&e!=="production")return!0;let r=t&&"hostname"in t?t.hostname:typeof location<"u"?location.hostname:void 0;return typeof r=="string"&&r?r==="localhost"||r==="127.0.0.1"||r.endsWith(".localhost"):!1}});function Ls(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 rp(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 Qd,tp,JC,ep,zo,Wo,At,qo=F(()=>{"use strict";Qd=(t,e,r=300)=>{let o;return(...n)=>{clearTimeout(o),o=setTimeout(()=>{e.apply(t,n)},r)}},tp=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}}},JC=/^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/,ep=t=>JC.test(t),zo=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let r of e)if(r.resolveHandler)return!0;return!1},Wo=(t,e)=>{if(typeof t=="function")return t;let r=e?.context?.plugins;if(!r)return t;for(let o of r)if(o.resolveHandler){let n=o.resolveHandler(t,e);if(typeof n=="function")return n}return t},At=(t,e,...r)=>{let o=e?.context?.plugins;if(!o)return!1;let n=!1;for(let s of o)typeof s[t]=="function"&&(s[t](e,...r),n=!0);return n}});var op,zb=F(()=>{"use strict";Ot();Ze();op=(t,e)=>{let{__ref:r}=t,o=t.if;if(A(o)){let n;try{n=o(t,t.state,t.context)}catch(s){typeof console<"u"&&console.warn("[DOMQL] if condition error:",s),delete r.__if;return}n?r.__if=!0:delete r.__if}else o!=null&&typeof o=="object"?ft(o,t)?r.__if=!0:delete r.__if:r.__if=!0}});var np,sp,Wb=F(()=>{"use strict";np=(t,...e)=>{t&&e.map(r=>console.log(r))},sp=(t,e,...r)=>{t&&(console.group(e),r.map(o=>console.log(o)),console.groupEnd(e))}});function fp(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 up(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 ip,ap,cp,lp,qb=F(()=>{"use strict";Ot();ms();ip=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),ap=(t,e,r=365)=>{if(Tt(Q)||Tt(Q.cookie))return;let o=new Date;o.setTime(o.getTime()+r*24*60*60*1e3);let n=`expires=${o.toUTCString()}`;Q.cookie=`${t}=${e};${n};path=/`},cp=t=>{if(Tt(Q)||Tt(Q.cookie))return;let e=`${t}=`,o=decodeURIComponent(Q.cookie).split(";");for(let n=0;n<o.length;n++){let s=o[n];for(;s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return""},lp=t=>{Tt(Q)||Tt(Q.cookie)||(Q.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var Ko,Kb,dp,pp=F(()=>{"use strict";Ko={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"])},Kb=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"]),dp=t=>Ko.body.has(t)});var hp,Gb,Go,Ns,qt,gp,Ec,js,mp,Bs,Ac,Tc,Us,Oc,Yo,ZC,Ne,Yb,Ms,Vs,yp,Fs,bp,_p,Rc,Pc,Ic,Dc,$c,Lc,Xb,Mc=F(()=>{"use strict";Uo();xp();Ze();Ot();hp="production",Gb=t=>t.sourcemap!==!1&&hp!=="production",Go=t=>{if(t.includes("+"))return t.split("+").filter(je);if(t.includes("_")){let[e]=t.split("_");return[e]}if(t.includes(".")&&!je(t.split(".")[1])){let[e]=t.split(".");return[e]}return[t]},Ns=(t,e,r)=>{let o=[],n=Go(r);n&&(o=[...n]);let s=t.extends;return s&&(o=O(s)?[...o,...s]:[...o,s]),o},qt=(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},gp=(t,e)=>{if(!t)return e;let{extends:r}=e,o=O(r)?r:[r],n=O(t)?t:[t];return{...e,extends:jo(n,o)}},Ec=()=>Math.random().toString(36).substring(2),js={},mp={},Bs=t=>js[t.__hash],Ac=(t,e)=>{let r=Ec();return w(t)||(t.__hash=r),r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(js[r]=e),e},Tc=(t,e)=>t.__hash?e.concat(Bs(t)):Ac(t,e),Us=(t,e,r,o=new Set,n,s)=>{for(let i of t)O(i)?Us(i,e,r,o,n,s):Yo(i,e,r,o,n,void 0,s);return e},Oc=(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&&Yo(a,e,r,o,n,s,i),e},Yo=(t,e,r,o=new Set,n,s,i)=>{if(!t||o.has(t))return e;if(O(t))return Us(t,e,r,o,n,i);let a=s;return w(t)?(a=t,t=Vs(t,r)):i&&S(t)&&i.has(t)&&(a=i.get(t)),o.add(t),t?.extends?Oc(t,e,r,o,n,a,i):t&&(e.push(t),n&&n.push(a)),e},ZC=new Set(["parent","node","__ref","__proto__","extends","childExtends","childExtendsRecursive"]),Ne=(t,e,r,o,n)=>{e=dt(e);for(let s in e){if(ZC.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]||{},Yb(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];je(s)?t[s]=Ne(i,a,c,o,l):Ne(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=Ne({},i);t[s]=Ne(c,a)}}}}return t},Yb=(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]||{},Yb(t[n],s,r,o)):t[n]=r}}},Ms=(t,e,r)=>t.reduce((o,n,s)=>{let i=dt(n),a=r?r[s]:void 0;return Ne(o,i,e,a)},{}),Vs=(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&&(hp==="test"||hp==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},yp=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),Fs=(t,e,r,o)=>{if(!t)return[];if(t.__hash)return Bs(t)||[];let s=Yo(t,[],e,new Set,r,void 0,o);return r?s:Tc(t,s)},bp=(t,e)=>{if(!t)return e;let r=O(t)?t:[t];return jo(r,e)},_p=t=>{let e=[];function r(o){for(let n in o)Object.prototype.hasOwnProperty.call(o,n)&&(je(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},Rc=(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]?qt([c,...a],t):qt(t.extends,t)}else qt(t.extends,t)}else if(typeof t.extends=="string"&&s&&n?.components){let i=`${t.extends}.${s}`;n.components[i]?qt(i,t):qt(t.extends,t)}else qt(t.extends,t);return Pc(t,e,r),Ic(t,e,r),Dc(t,e,r),t.component&&qt(ft(t.component,t),t),n.defaultExtends&&qt(n.defaultExtends,t),Bo(o.__extends)},Pc=(t,e,r={})=>{let{__ref:o}=t;return r.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&qt(e.childProps.extends,t),o.__extends},Ic=(t,e,r={})=>{let{__ref:o}=t,n=r.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!n&&s&&qt(s,t),o.__extends},Dc=(t,e,r={})=>{let{__ref:o}=t,n=e.childExtendsRecursive,s=r.ignoreChildExtendsRecursive||t.ignoreChildExtendsRecursive,i=t.key==="__text";return n&&!i&&!s&&qt(n,t),o.__extends},$c=(t,e,r={})=>{let{__ref:o}=t,n=t.context||e.context,s=t.variant,i=Gb(r),a=i?[...o.__extends]:null,c=Bo(o.__extends.map((l,f)=>Vs(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=Fs(c,n,f,l);o.__extendsStack=u,o.__extendsNames=f}else{let l=Fs(c,n);o.__extendsStack=l}return o.__extendsStack},Lc=(t,e,r={})=>{let{__ref:o}=t,{__extendsStack:n}=o;if(Gb(r)){let s={},i=o.__extendsNames||[],a=Ms(n,s,i),c={};Ne(t,a,c,void 0,s),o.__sourcemap=c}else{let s=Ms(n);Ne(t,s)}return t},Xb=(t,e,r={})=>(Rc(t,e,r),$c(t,e,r),Lc(t,e,r),t)});function wp(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function Sp(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function kp(t,e,r){let{context:o}=e||{},[n]=Go(r),s=r||n;return o?.components?.[s]||o?.pages?.[s]}var je,xp=F(()=>{"use strict";Mc();Ot();je=t=>{if(!w(t)||!t.length)return!1;let e=t.charCodeAt(0);return e>=65&&e<=90}});function Jb(t,e){let{props:r,on:o}=e,n=Zr(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=F(()=>{"use strict";Cs();Ot()});function Fc(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&&zo(this.context))){let g=Zr(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(t_.has(u)){t.props[o]=n,delete t[o],r.push(o);continue}let d=vp.test(o)||Qb.test(o)||tE(n),h=mr.has(o);!d&&!h&&(o in t.props||(t.props[o]=n),delete t[o],r.push(o))}return t}function Nc(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&&zo(this.context);if(s&&i){Jb(o,t),delete t.props[o];continue}if(r.includes(o)||o==="childProps")continue;let a=o.charAt(0);if(t_.has(a))continue;let c=this.define?.[o],l=this.context?.define?.[o],f=S(c)||A(c),u=S(l)||A(l),d=vp.test(o)||Qb.test(o),h=mr.has(o);(d||h||f||u)&&(t[o]===void 0||n===null)&&(t[o]=n,t.props&&delete t.props[o])}return t}function jc(t=this){let e=[];return Fc.call(this,t,{cachedKeys:e}),Nc.call(this,t,{cachedKeys:e}),t}function Cp(t={}){return t.on||(t.on={}),t.props||(t.props={}),jc.call(this,t)}function Ap(t,e){this.__element.update({props:t},e)}function Ks(t){let e={update:Ap.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var vp,Qb,t_,QC,tE,Ws,Hs,Ep,qs,Gs,Ys,Bc,zs,Tp,Op,Rp=F(()=>{"use strict";Ho();Zb();Ze();Ot();Cs();qo();vp=/^[A-Z]/,Qb=/^\d+$/,t_=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),QC=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),tE=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if(QC.has(e)||vp.test(e))return!0;return!1},Ws=(t,e,r)=>{let{props:o,__ref:n}=t;if(n.__propsStack=[],o)n.__initialProps=o;else return{};return H(o)?{...o}:(n.__propsStack.push(o),{})};Hs=t=>zt(t)("string","number")?{inheritedString:t}:t,Ep=(t,e)=>!t||!e.length?!1:e.includes(t),qs=(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=Hs(i);o.unshift(c)}if(s){let c=Hs(s);o.unshift(c)}return o};Gs=t=>{let e=new Set;return t.filter(r=>!r||yr.has(r)||e.has(r)?!1:(e.add(r),!0))},Ys=(t,e,r)=>(e.props=t.reduce((o,n)=>{if(yr.has(n))return o;for(;A(n);)n=ft(n,e);return st(o,dt(n,{exclude:yr}))},{}),Ks(e),e.props),Bc=(t,e)=>{let{props:r,__ref:o}=t,n=o.__propsStack||[];if(e?.props&&(n=[...qs(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=Gs(n),o.__propsStack},zs=(t,e)=>{let{__ref:r}=t,o=Bc(t,e);o.length?Ys(o,t):(r.__propsStack=[],t.props={})},Tp=function(t,e,r){let{__ref:o}=t;if(o.__if)zs(t,e);else try{zs(t,e)}catch(n){t.context?.designSystem?.verbose&&console.warn("initProps error at",o.path?.join("."),n),t.props={},o.__propsStack=[]}return Ks(t),t},Op=(t,e,r)=>{let{__ref:o}=e,s=[...o.__propsStack||[]],i=qs(e,r);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),o.__propsStack=Gs(s),o.__propsStack.length&&Ys(o.__propsStack,e),e}});var e_,Uc,Vc,Hc,zc,Pp,Wc,qc,Kc,Ip,r_=F(()=>{"use strict";Mc();vc();bs();Rp();pp();Ot();e_="production",Uc=(t,e,r)=>{let o=e.childExtends&&e.childExtends.tag,n=e.childProps&&e.childProps.tag,s=Ko.body.has(r)&&r;return{text:t,tag:o||n||s||"string"}},Vc=(t,e,r)=>{if(t===void 0)return(e_==="test"||e_==="development")&&console.warn(r,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:zt(t)("string","number")?Uc(t,e,r):A(t)?{props:t}:t},Hc=(t,e)=>{let r={};return r.origin=t,r.parent=e,r},zc=(t,e,r,o,n)=>{if(!e)return n;if(Je(e)){let s={key:":root",node:e};return n[`${r}_parent`]=s,s}return e},Pp=(t,e)=>{let{__ref:r}=t,{__ref:o}=e,n=e&&e.key===":root";r?.root||(r.root=n?t:o?.root)},Wc=(t,e,r)=>{let{__ref:o}=e;return o||(o=e.ref={}),o.path||(o.path=[]),o.path.concat(r)},qc=(t,e,r,o,n)=>(o.context&&!n.context&&!t.context&&(n.context=o.context),o.context||e.context||n.context||t.context),Kc=(t,e,r)=>{let o=Hc(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=Ns(t,e,r),o.path=Wc(t,e,r),o},Ip=(t,e,r,o,n)=>{let i=t?.__hash?{extends:[t]}:Vc(t,e,r);if(!i)return;let a=zc(i,e,r,o,n),c=$s(i,a,r);Kc(i,a,c);let l=Ws(i,a,c),f=qc(i,a,c,o,n),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var Dp,Gc,Yc,Xc,Jc,$p,Zc,Lp,Mp,Fp,Np,o_=F(()=>{"use strict";Uo();Ho();Ze();Ot();Dp=t=>{let{state:e,props:r,__ref:o}=t,n=r?.state||e;return zt(n)("string","number")?(o.__state=n,{value:n}):n===!0?(o.__state=t.key,{}):n?(o.__hasRootState=!0,n):!1},Gc=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},Yc=(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},Xc=(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]},Jc=(t,e,r={})=>{let n=t.__ref.__state;if(!Zc(t))return;let s=Gc(n,e.state),i=e.state;if(s)i=s,n=n.replaceAll("~/","");else{let a=Yc(n,e.state);a&&(i=a,n=n.replaceAll("../",""))}if(i)return Xc(n,i,r)},$p=(t,e)=>{let r=t.__ref,o=Jc(t,e);if(o===void 0)return t.state;if(zt(o)("object","array"))return dt(o);if(zt(o)("string","number","boolean"))return r.__stateType=typeof o,{value:o};console.warn(r.__state,"is not present. Replacing with",{})},Zc=t=>{let{__ref:e}=t,r=e?.__state;return!!(r&&zt(r)("number","string","boolean"))},Lp=function(t){return H(t)?!!(t.update&&t.parse&&t.clean&&t.create&&t.parent&&t.destroy&&t.rootUpdate&&t.parentUpdate&&t.keys&&t.values&&t.toggle&&t.replace&&t.quietUpdate&&t.quietReplace&&t.add&&t.apply&&t.applyReplace&&t.setByPath&&t.setPathCollection&&t.removeByPath&&t.removePathCollection&&t.getByPath&&t.applyFunction&&t.__element&&t.__children):!1},Mp=(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},Fp=(t,e)=>{let{__element:r}=e,o=r?.state;if(!o)return;let n=dt(o,Qr),s={[t.key]:n},i=S(o.__depends)?{...o.__depends,...s}:s;return Array.isArray(o)?Ss(o,{...Object.getPrototypeOf(o),__depends:i}):Object.setPrototypeOf(o,{...Object.getPrototypeOf(o),__depends:i}),n},Np=(t,e,r={})=>{let{overwrite:o}=r;if(!o)return;let n=o==="shallow";if(o==="merge"){st(t,e,Qr);return}(n?eo:Wt)(t,e,Qr)}});var eE,jp,n_=F(()=>{"use strict";eE=(t,e)=>{let r=e;for(;r;){if(r===t)return!0;r=Object.getPrototypeOf(r)}return!1},jp=(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&&!eE(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var s_,Qc,xr,tl,Bp,Up=F(()=>{"use strict";Ot();qo();s_=(t,e)=>{let r="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[r]},Qc=(t,e,r,o,n)=>{if(t=Wo(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}},xr=(t,e,r)=>{if(!e)throw new Error("Element is required");At(t,e,r);let o=s_(t,e);if(o){let{state:n,context:s}=e;return Qc(o,e,n,s,r)}},tl=(t,e,r,o,n,s)=>{if(t=Wo(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}},Bp=(t,e,r,o)=>{At(t,r,e,o);let n=s_(t,r);if(n){let{state:s,context:i}=r;return tl(n,e,r,s,i,o)}}});var Vp,Xs,Hp=F(()=>{"use strict";Vp={},Xs={}});var a_={};P(a_,{restAdapter:()=>i_,setup:()=>oE});var rE,Qe,oE,i_,c_=F(()=>{"use strict";rE=(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()},Qe=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}},oE=async({url:t,headers:e,auth:r,fetchOptions:o})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return i_(t,e,r,o)},i_=(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 Qe(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 Qe(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 Qe(c(r.signOutUrl,r.baseUrl),a({method:"POST",headers:s()})),n=null,{error:null}),select:({from:f,params:u,select:d,limit:h,offset:g,order:p,single:m,headers:b,baseUrl:_})=>{let y={...u};return d&&(y.select=d),h&&(y.limit=h),g&&(y.offset=g),m&&(y.single=!0),p&&(typeof p=="string"?y.order=p:Array.isArray(p)?y.order=p.map(x=>`${x.by}:${x.asc===!1?"desc":"asc"}`).join(","):p.by&&(y.order=`${p.by}:${p.asc===!1?"desc":"asc"}`)),Qe(rE(_||t,f||"",y),a({headers:s(b)}))},rpc:({from:f,params:u,headers:d,baseUrl:h})=>Qe(c(`rpc/${f}`,h),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),insert:({from:f,data:u,headers:d,baseUrl:h})=>Qe(c(f,h),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),update:({from:f,data:u,params:d,method:h,headers:g,baseUrl:p})=>{let m=d?.id||u?.id,b=m?`${f}/${m}`:f;return Qe(c(b,p),a({method:h||"PATCH",headers:i(g),body:JSON.stringify(u)}))},upsert:({from:f,data:u,params:d,method:h,headers:g,baseUrl:p})=>{let m=d?.id||u?.id,b=m?`${f}/${m}`:f;return Qe(c(b,p),a({method:h||"PUT",headers:i(g),body:JSON.stringify(u)}))},delete:({from:f,params:u,headers:d,baseUrl:h})=>{let g=u?.id,p=g?`${f}/${g}`:f;return Qe(c(p,h),a({method:"DELETE",headers:s(d)}))}}}});var f_={};P(f_,{localAdapter:()=>l_,setup:()=>sE});var el,nE,sE,l_,u_=F(()=>{"use strict";el=(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},nE=(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}},sE=async({data:t,...e})=>l_(t,e),l_=(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=>el(p,u));return nE(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(el(h[p],d)){let m={...h[p]};Object.assign(h[p],u),g.push(h[p]),c(f,"UPDATE",h[p],m)}return a(f),{data:g,error:null}},upsert:async({from:f,data:u,params:d})=>{let h=i(f),g=Array.isArray(u)?u:[u],p=[];for(let m of g){let b=d||(m.id!==void 0?{id:m.id}:null),_=b?h.findIndex(y=>el(y,b)):-1;if(_>-1){let y={...h[_]};Object.assign(h[_],m),p.push(h[_]),c(f,"UPDATE",h[_],y)}else{let y={id:m.id||++l,...m};h.push(y),p.push(y),c(f,"INSERT",y,null)}}return a(f),{data:Array.isArray(u)?p:p[0],error:null}},delete:async({from:f,params:u})=>{let d=i(f),h=[];for(let g=d.length-1;g>=0;g--)el(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 no={};P(no,{createAdapter:()=>uE,default:()=>wE,executeFetch:()=>ni,fetchPlugin:()=>Yp,initAdapterAuth:()=>il,parseDuration:()=>Qs,queryClient:()=>xE,registerAdapter:()=>fE,resolveDb:()=>g_});var iE,aE,rl,Zs,ol,qp,cE,lE,fE,uE,g_,Qs,Ft,m_,Js,dE,oi,ti,ei,nl,Kp,sl,pE,d_,zp,y_,b_,Xo,p_,hE,h_,gE,al,__,x_,il,Gp,le,ve,ri,oo,Be,wr,mE,yE,bE,Wp,_E,ni,xE,Yp,wE,Sr=F(()=>{"use strict";R();iE=["select","rpc","insert","update","upsert","delete","subscribe"],aE={rest:()=>Promise.resolve().then(()=>(c_(),a_)),local:()=>Promise.resolve().then(()=>(u_(),f_))},rl=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),Zs=(()=>{if(typeof globalThis<"u"&&globalThis[rl])return globalThis[rl];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,rl,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[rl]}catch{}return t})(),ol=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),qp=(()=>{if(typeof globalThis<"u"&&globalThis[ol])return globalThis[ol];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,ol,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[ol]}catch{}return t})(),cE=5e3,lE=t=>new Promise(e=>{if(Zs[t])return e(Zs[t]);let r=qp[t]||=[],o=!1,n=()=>{o||(o=!0,e(Zs[t]||null))};r.push(n),setTimeout(n,cE)}),fE=(t,e)=>{Zs[t]=e;let r=qp[t];if(r&&r.length){qp[t]=[];for(let o of r)o()}},uE=t=>{let e={};for(let r of iE)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},g_=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...r}=t,o=typeof e=="string"?e:typeof t=="string"?t:null;if(!o)return null;let n=Zs[o]||aE[o];if(!n&&(n=await lE(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},Ft=new Map,m_=new Map,Js=new Map,dE=(t,e,r)=>{if(t.cache?.key)return t.cache.key;let o=gE(t.params),n=r?`${r}:`:"",s=`${t.from}:${t.method}:${n}${JSON.stringify(o||"")}`;return e?`${s}:${e}`:s},oi=t=>Ft.get(t)||null,ti=(t,e,r)=>{let o=Ft.get(t),n={data:e,error:r,time:Date.now(),stale:!1};Ft.set(t,n);let s=m_.get(t);if(s)for(let i of s)A(i)&&i(n);return n},ei=t=>{if(t){let e=Ft.get(t);e&&(e.stale=!0);return}for(let[,e]of Ft)e.stale=!0},nl=t=>{if(t){Ft.delete(t);return}Ft.clear()},Kp=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},sl=null,pE=()=>{sl||(sl=setInterval(()=>{let t=Date.now();for(let[e,r]of Ft){let o=m_.get(e);!(o&&o.size>0)&&t-r.time>(r.gcTime||3e5)&&Ft.delete(e)}},3e4),sl.unref&&sl.unref())};pE();d_=3,zp=t=>Math.min(1e3*2**t,3e4),y_=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:d_,delay:zp}:typeof e=="number"?{count:e,delay:zp}:{count:e.count??d_,delay:A(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:zp}},b_=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}},Xo={focus:new Set,online:new Set},p_=!1,hE=()=>{if(p_||typeof window>"u")return;p_=!0;let t=()=>{for(let r of Xo.focus)r()},e=()=>{for(let r of Xo.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},h_=(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},gE=t=>(!t||A(t),t),al=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},__=(t,e)=>{let o=(t?.state?.root||e?.state?.root)?.__fetchScope;return o?String(o):void 0},x_=(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},il=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)})},Gp=async(t,e)=>{if(A(t.select))return t.auth!==!1&&await il(t,e),t;if(t.__resolved)return t.auth!==!1&&await il(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=g_(t);let r=await t.__resolving;return delete t.__resolving,r?(r.auth=t.auth,r.url=t.url,r.key=t.key,t.__resolved=r,e.fetch=r,t.auth!==!1&&await il(r,e),r):null},le=(t,e,...r)=>{let o=A(t[e])?t[e]:null;o&&o.call(t,...r,t,t.state,t.context)},ve=(t,e,r,...o)=>{let n=t&&A(t[r])?t[r]:null;n&&n.call(e,...o,e,e.state,e.context)},ri=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},oo=(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})}},Be=(t,e)=>{let r=t?.__ref;r&&(r.__fetchStatus=e,r.__fetching=e.isFetching,r.__fetchError=e.error)},wr=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 Gp(n,r);if(!s||!e.__ref)return;let i=e.__ref,{from:a,method:c,query:l,params:f,cache:u,transform:d,single:h,auth:g,fields:p,as:m,limit:b,offset:_,order:y,headers:x,baseUrl:k,page:E,cursor:T,getNextPageParam:$,getPreviousPageParam:D,infinite:I,placeholderData:z,initialData:V,select:rt,keepPreviousData:at}=t,G=w(rt)?rt:void 0;if(l&&A(e.getQuery)){let nt=e.getQuery(s.name||"paths");nt&&(G=nt.select||nt.length&&nt.join(",")||G)}let K=x_(f,e,r),lt=Kp(u),Ut=y_(t),W=al(e,r),wt=__(e,r),L=W?`:${W}`:"",ot=wt?`${wt}:`:"",U=lt?u?.key||`${a}:${c}:${ot}${JSON.stringify(K||"")}${I?":infinite":""}${E?":p"+JSON.stringify(E):""}${L}`:null;if(!i.__fetchInitialized&&U&&(i.__fetchInitialized=!0,V!==void 0)){let nt=A(V)?V():V;ti(U,nt,null)}if((c==="select"||c==="rpc")&&U&&lt){let nt=oi(U);if(nt&&!nt.error){let M=Date.now()-nt.time,ht=nt.stale||M>(lt.staleTime||0),q=nt.data;if(A(rt)&&(q=rt(q,e,e.state)),d&&(q=d(q,e,e.state)),oo(e,q,m),!ht){Be(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(z!==void 0){let M=A(z)?z(e,e.state):z;M!==void 0&&oo(e,M,m)}}if(U&&Js.has(U)&&!o.force){let nt=Js.get(U);try{let M=await Promise.race([nt,new Promise((ht,q)=>setTimeout(()=>q("DEDUP_TIMEOUT"),15e3))]);if(M?.data!==void 0){let ht=M.data;A(rt)&&(ht=rt(ht,e,e.state)),d&&(ht=d(ht,e,e.state)),oo(e,ht,m),le(e,"onFetchComplete",ht),ve(t,e,"onFetchComplete",ht)}}catch{}return}let Y=!oi(U)?.data;Be(e,{isFetching:!0,isLoading:Y,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),le(e,"onFetchStart"),ve(t,e,"onFetchStart");let j=r?.analyze?.emitNetwork,pt=j?typeof performance<"u"?performance.now():Date.now():0;j&&j({phase:"start",mode:"query",from:a,method:c,cacheKey:U,lang:W});let Ke=b_(async()=>{if(g!==!1&&s.auth!==!1&&s.getSession){let q=await s.getSession();if(g===!0&&!q){let Lt={message:"Not authenticated"};return Be(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:Lt,status:"error",fetchStatus:"idle"}),le(e,"onFetchError",Lt),ve(t,e,"onFetchError",Lt),{data:null,error:Lt}}}let nt=s[c];if(!A(nt))return{data:null,error:{message:`Method "${c}" not found on adapter`}};let M={from:a,select:G,params:K,single:h,limit:b,offset:_,order:y,headers:x,baseUrl:k},ht=al(e,r);if(ht&&(M.headers={...M.headers,"Accept-Language":ht}),E!==void 0){if(S(E))E.offset!==void 0&&(M.offset=E.offset),E.limit!==void 0&&(M.limit=E.limit),E.cursor!==void 0&&(M.params={...M.params,cursor:E.cursor});else if(typeof E=="number"){let q=t.pageSize||b||20;M.offset=(E-1)*q,M.limit=q}}if(T!==void 0&&(M.params={...M.params,cursor:T}),c==="insert"||c==="update"||c==="upsert"){let q;if(p===!0||t.on==="submit")q=ri(e);else if(O(p)){let Lt=ri(e);q={};for(let Uu of p)q[Uu]=Lt[Uu]}else e.state?.parse?q=e.state.parse():S(e.state)&&(q={...e.state});d&&(q=d(q,e,e.state)),M.data=q}if(c==="rpc"){let q=K;if(t.on==="submit"){let Lt=ri(e);q=t.transformParams?t.transformParams(Lt,e,e.state):Lt}M.params=q}if(c==="subscribe"){let q=s.subscribe({from:a,params:K,on:t.subscribeOn},(Lt,Uu,UP)=>{oo(e,Lt,m),le(e,"onFetchComplete",Lt),ve(t,e,"onFetchComplete",Lt)});return i.__unsubscribe=q,{data:null,error:null,subscribed:!0}}return nt(M)},Ut);U&&Js.set(U,Ke);try{let nt=await Ke;if(nt?.subscribed)return;let{data:M,error:ht}=nt||{};if(ht){U&&ti(U,null,ht),Be(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:ht,status:"error",fetchStatus:"idle"}),le(e,"onFetchError",ht),ve(t,e,"onFetchError",ht),j&&j({phase:"error",mode:"query",from:a,method:c,cacheKey:U,error:ht.message||ht,durationMs:(typeof performance<"u"?performance.now():Date.now())-pt});return}if(M!==void 0){if((c==="select"||c==="rpc")&&U){let Lt=ti(U,M,null);Lt.gcTime=lt?.gcTime||3e5}let q=M;I&&O(M)&&(i.__pages||(i.__pages=[]),o.direction==="previous"?i.__pages.unshift(M):i.__pages.push(M),q=i.__pages.flat(),$&&(i.__nextPageParam=$(M,i.__pages),i.__hasNextPage=i.__nextPageParam!=null),D&&(i.__prevPageParam=D(M,i.__pages),i.__hasPreviousPage=i.__prevPageParam!=null)),A(rt)&&(q=rt(q,e,e.state)),d&&(q=d(q,e,e.state)),(!at||q!==void 0)&&oo(e,q,m),Be(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),le(e,"onFetchComplete",q),ve(t,e,"onFetchComplete",q),j&&j({phase:"success",mode:"query",ok:!0,from:a,method:c,cacheKey:U,durationMs:(typeof performance<"u"?performance.now():Date.now())-pt})}}catch(nt){Be(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:nt,status:"error",fetchStatus:"idle"}),le(e,"onFetchError",nt),ve(t,e,"onFetchError",nt),j&&j({phase:"error",mode:"query",from:a,method:c,cacheKey:U,error:nt.message||String(nt),durationMs:(typeof performance<"u"?performance.now():Date.now())-pt})}finally{U&&Js.delete(U)}},mE=(t,e,r)=>{let o=t.on,n=e.__ref;n.__fetchListeners||(n.__fetchListeners=[]);let s=t.__runner||wr;if(o==="submit"){let i=c=>{c.preventDefault(),s(t,e,r)},a=e.node;a&&(a.addEventListener("submit",i),n.__fetchListeners.push(()=>a.removeEventListener("submit",i)))}else if(o==="click"){let i=()=>s(t,e,r),a=e.node;a&&(a.addEventListener("click",i),n.__fetchListeners.push(()=>a.removeEventListener("click",i)))}else o==="stateChange"&&(n.__fetchOnStateChange=()=>s(t,e,r))},yE=(t,e,r)=>{let o=e.__ref;o.__fetchCleanups||(o.__fetchCleanups=[]),hE();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")&&wr(t,e,r,{force:!0})},s);o.__fetchCleanups.push(()=>clearInterval(i))}}if(t.refetchOnWindowFocus!==!1){let s=()=>{let i=al(e,r),a=__(e,r),c=dE(t,i,a),l=oi(c),f=Kp(t.cache);(!l||l.stale||Date.now()-l.time>(f?.staleTime||0))&&wr(t,e,r,{force:!0})};Xo.focus.add(s),o.__fetchCleanups.push(()=>Xo.focus.delete(s))}if(t.refetchOnReconnect!==!1){let s=()=>wr(t,e,r,{force:!0});Xo.online.add(s),o.__fetchCleanups.push(()=>Xo.online.delete(s))}},bE=(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&&oo(t,i,n),s},Wp=(t,e)=>{let r=t.__ref,o=r.__optimisticSnapshot;o!==void 0&&(oo(t,o,e.as),delete r.__optimisticSnapshot)},_E=async(t,e,r)=>{let o=r?.fetch;if(!o)return;let n=await Gp(o,r);if(!n)return;let s=e.__ref,{method:i,from:a,fields:c,transform:l,as:f,on:u,auth:d,headers:h,baseUrl:g,invalidates:p,optimistic:m,onMutate:b,onSuccess:_,onError:y,onSettled:x}=t,k;if(c===!0||u==="submit")k=ri(e);else if(O(c)){let D=ri(e);k={};for(let I of c)k[I]=D[I]}else e.state?.parse?k=e.state.parse():S(e.state)&&(k={...e.state});l&&(k=l(k,e,e.state)),A(b)&&b(k,e,e.state);let E=m?bE(e,t,k):null;s.__fetching=!0,Be(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),le(e,"onFetchStart"),ve(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 K=await n.getSession();if(d===!0&&!K){E!==void 0&&Wp(e,t);let lt={message:"Not authenticated"};le(e,"onFetchError",lt),ve(t,e,"onFetchError",lt);return}}let D=n[i];if(!A(D))return;let I={from:a,data:k,headers:h,baseUrl:g};t.params&&(I.params=x_(t.params,e,r));let z=al(e,r);z&&(I.headers={...I.headers,"Accept-Language":z});let V=y_(t),rt=await b_(()=>D(I),V),{data:at,error:G}=rt||{};if(G){E!==void 0&&Wp(e,t),Be(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:G,status:"error",fetchStatus:"idle"}),le(e,"onFetchError",G),A(y)&&y(G,k,e),A(x)&&x(null,G,k,e),T&&T({phase:"error",mode:"mutation",from:a,method:i,error:G.message||String(G),durationMs:(typeof performance<"u"?performance.now():Date.now())-$});return}if(delete s.__optimisticSnapshot,at!==void 0){let K=f?{[f]:at}:at;e.state?.update&&e.state.update(K,{preventFetch:!0})}if(Be(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),le(e,"onFetchComplete",at),ve(t,e,"onFetchComplete",at),A(_)&&_(at,k,e),A(x)&&x(at,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 K=O(p)?p:[p];for(let lt of K)if(lt===!0||lt==="*")for(let[Ut]of Ft)Ut.startsWith(a+":")&&ei(Ut);else ei(lt)}}catch(D){E!==void 0&&Wp(e,t),Be(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:D,status:"error",fetchStatus:"idle"}),le(e,"onFetchError",D),ve(t,e,"onFetchError",D),A(y)&&y(D,k,e),A(x)&&x(null,D,k,e),T&&T({phase:"error",mode:"mutation",from:a,method:i,error:D.message||String(D),durationMs:(typeof performance<"u"?performance.now():Date.now())-$})}finally{s.__fetching=!1}},ni=(t,e,r,o)=>{if(!t||!o?.fetch)return;let s=ft(t,e);if(!s)return;let i=O(s)?s.map(c=>h_(ft(c,e),e)).filter(Boolean):[h_(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?_E:wr;c.on==="create"?f(c,e,o):Promise.resolve().then(()=>{mE({...c,__runner:f},e,o)}),!l&&c.on==="create"&&(c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&yE(c,e,o)}let a=e.__ref;a.refetch=c=>{for(let l of i)wr(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};wr(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};wr(f,e,o,{direction:"previous",force:!0})}},xE={invalidateQueries:t=>{if(!t){ei();return}if(w(t))for(let[e]of Ft)(e.startsWith(t)||e.includes(t))&&ei(e);else if(O(t)){let e=t.join(":");for(let[r]of Ft)r.includes(e)&&ei(r)}},removeQueries:t=>{if(!t){nl();return}if(w(t))for(let[e]of Ft)(e.startsWith(t)||e.includes(t))&&nl(e)},getQueryData:t=>oi(t)?.data??void 0,setQueryData:(t,e)=>{let r=oi(t),o=A(e)?e(r?.data):e;ti(t,o,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let o=await Gp(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=ti(n,i.data,null);a.gcTime=Kp(t.cache)?.gcTime||3e5}return i},getCache:()=>Ft,clear:()=>nl(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of Ft)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||nl(r))}},Yp={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||Js.clear(),ni(e,t,t.state,t.context))}},wE=ni});function ii(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 Jp(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 Zp(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 Qp(t,e=[]){let r=this,{__ref:o}=r,n=o?.__children;if(n){for(let s=0;s<n.length;s++){let i=n[s],a=r[i];if(i===t)e.push(a);else if(A(t)){let c=t(a,a.state,a.context);a.state&&c&&e.push(a)}a?.lookdownAll?.(t,e)}return e.length?e:void 0}}function cl(t={}){let e=this;if(e.node?.style){for(let r in t){let o=t[r],n=e[r];if(S(o)&&n)cl.call(n,o);else if(o!=null){let s=r.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),i=String(o).replace(/\s*!important\s*$/,"");e.node.style.setProperty(s,i,"important")}}return e}}function S_(t){let e=this;if(xr("beforeRemove",e,t)===!1)return e;A(e.node.remove)?e.node.remove():br()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=ws(e.parent.__ref.__children,e.key)),xr("remove",e,t)}function th(t){return this[t]}function eh(t,e){let r=this;if(t)return r.update(t,e),r}function rh(t){return t?this.__ref&&this.__ref[t]:this.__ref}function ai(){return this.getRef("__children").map(e=>this[e])}function ci(){return this.getRef().path}function fi(t){let e=null,r=o=>o.__element&&o.root?.isRootState;if(!this)e=w_();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=w_()),t?e?.[t]:e}function ui(t){let e=this.getRootState()?.__element;return e&&Object.keys(e).length>0&&t?e[t]:e}function di(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function pi(t){let e=this.getRoot()?.context;return t?e[t]:e}function hi(t){let e=this.context;return t?e[t]:e}function ll(){let t=this,e=[];for(let r in t)!Object.prototype.hasOwnProperty.call(t,r)||mr.has(r)&&!Es.has(r)||e.push(r);return e}function fl(t=[]){let e=this,r={},o=ll.call(e),n=o.includes("children"),s=t.length?new Set(t):null;for(let i=0;i<o.length;i++){let a=o[i];if(s&&s.has(a)||!Object.prototype.hasOwnProperty.call(e,a)||n&&a==="content")continue;let c=e[a];if(a==="state"){if(e.__ref&&!e.__ref.__hasRootState)continue;let l=A(c&&c.parse)?c.parse():c;r[a]=A(l)?l:JSON.parse(JSON.stringify(l||{}))}else if(a==="scope"){if(e.__ref&&!e.__ref.__hasRootScope)continue;r[a]=JSON.parse(JSON.stringify(c||{}))}else if(a==="props"){let{__element:l,update:f,...u}=e[a];r[a]=u}else bt(c)&&Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=c)}return r}function si(t=[],e=new WeakSet){let r=this;if(e.has(r))return;e.add(r);let o=fl.call(r,t),n=t.length?new Set(t):null;for(let s in o){if(n&&n.has(s)||!Object.prototype.hasOwnProperty.call(r,s))continue;let i=o[s];Array.isArray(i)?o[s]=i.map(a=>H(a)?si.call(a,t,e):a):H(i)&&(o[s]=si.call(i,t,e))}return o}function Jo(...t){if(kr!=="test"&&kr!=="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 nh(...t){(kr==="test"||kr==="development")&&console.log(...t)}function gi(...t){(kr==="test"||kr==="development")&&console.warn(...t)}function so(...t){if(kr==="test"||kr==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&Jo.call(this),new Error(...t)}}function mi(){let t=this,{key:e,parent:r}=t,{__children:o}=r.__ref,n=o.indexOf(e),s=o[n+1];return r[s]}function yi(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 bi(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,dt(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 sh(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=>{so.call(this,s)}),n}catch(n){if(so.call(this,n),r?.strictMode)throw n}}async function _i(){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(()=>(Sr(),no));await n(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:n}=await Promise.resolve().then(()=>(Sr(),no));await n(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let r=Promise.resolve().then(()=>(Sr(),no)).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(()=>(Sr(),no));await n(o,t.context)}return o}function xi(t){let e=this,r=t||Xs.useStateQuery||e.context?.useStateQuery;if(!r)return null;let o={};if(Xp(e,o),r===!0)return o;let n=TE[r];return n?n(o):o}function ih(t,e){return!!(Vo.has(t)||e?.context?.methods?.[t])}var kr,k_,li,w_,oh,Xp,SE,v_,kE,vE,CE,EE,AE,TE,C_=F(()=>{"use strict";Up();Ho();Ot();Ze();Zd();Uo();Hp();kr="production";k_=null,li=t=>{k_=t||null},w_=()=>k_||null;oh=(t,e,r,o)=>Object.defineProperty(t,e,{get:r,set:o});Xp=(t,e)=>{let r=t.__ref;if(!r)return;let o=r.__state;o&&typeof o=="string"&&SE(e,o);let n=r.__children;if(n)for(let a=0;a<n.length;a++){let c=t[n[a]];c&&c.__ref&&Xp(c,e)}let s=r.contentElementKey||"content",i=t[s];i&&i.__ref&&Xp(i,e)},SE=(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])}},v_=(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
- ${v_(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},Md=(t,e={verbose:!0})=>{try{return t?v.eval("("+t+")"):{}}catch(r){e.verbose&&console.warn(r)}},Fd=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),kc=t=>{for(let e in t)return!1;return!0},Nd=t=>S(t)&&kc(t),jd=()=>Object.create(null),Ds=(t,e,r={})=>{let o=r.exclude||[],n=r.preventUnderscore;for(let s in e)o.includes(s)||!n&&eo(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},ro=(t,e,r=[])=>{let o=r instanceof Set;for(let n in e)eo(n)||n==="constructor"||n==="prototype"||(o?r.has(n):r.includes(n))||(t[n]=e[n]);return t},qt=(t,e,r={},o=new WeakMap)=>{if(!H(t)||!H(e)||zt(t)||zt(e))return e;if(o.has(t))return o.get(t);o.set(t,t);let n=r.exclude,s=n?n instanceof Set?n:new Set(n):null,i=!r.preventForce;for(let a in e){if(!Object.prototype.hasOwnProperty.call(e,a)||s&&s.has(a)||i&&eo(a)||a==="constructor"||a==="prototype")continue;let c=t[a],l=e[a];zt(l)?t[a]=l:H(c)&&H(l)?t[a]=qt(c,l,r,o):l!==void 0&&(t[a]=l)}return t},vc=(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)||!vc(t[i],e[i],r))return!1}return!0},oE=new Set(["node","__ref"]),Bd=(t,e,r=oE)=>{if(t===e)return!0;if(!H(t)||!H(e)||zt(t)||zt(e))return t===e;let o=r instanceof Set?r:new Set(r),n=new WeakSet;function s(i,a){if(n.has(a))return!0;n.add(a);for(let c in a){if(!Object.prototype.hasOwnProperty.call(a,c)||o.has(c))continue;if(!Object.prototype.hasOwnProperty.call(i,c))return!1;let l=a[c],f=i[c];if(zt(l)||zt(f)){if(l!==f)return!1}else if(H(l)&&H(f)){if(!s(f,l))return!1}else if(l!==f)return!1}return!0}return s(t,e)},Ud=(t,e)=>{if(e==null)return t;if(Wt(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},Cc=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]=Cc(t[r]));return e},Vd=(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},Hd=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let n=0;n<e.length-1;n++){if(r[e[n]]===void 0)return;r=r[e[n]]}let o=e[e.length-1];r&&Object.prototype.hasOwnProperty.call(r,o)&&delete r[o]},zd=(t,e,r)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let o=t;for(let n=0;n<e.length-1;n++)(!o[e[n]]||typeof o[e[n]]!="object")&&(o[e[n]]={}),o=o[e[n]];return o[e[e.length-1]]=r,t},Wd=(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},qd=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(Vb==="test"||Vb==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",r),!0},Kd=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)},Gd=(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 $s,Ls,Ms,Ec=F(()=>{"use strict";Qe();$s=(function(){let t=0;function e(){return t++,t}return e})(),Ls=$s,Ms=(t,e,r)=>(ut(r,t)||r||t.key||$s()).toString()});var ve,Yd,_r,Ac,Xd,Jd,Zd,xr,Qd,oo,Pt,tp=F(()=>{"use strict";ve="production",Yd=ve,_r=(t=ve)=>t==="production",Ac=(t=ve)=>t==="testing"||t==="test",Xd=Ac,Jd=(t=ve)=>t==="staging",Zd=(t=ve)=>t==="local",xr=(t=ve)=>t==="development"||t==="dev"||t==="local",Qd=(t,e=ve)=>e[t],oo=(t=ve)=>!_r(t),Pt=t=>{let e=t&&"env"in t?t.env:typeof process<"u"&&process.env?"production":void 0;if(e&&e!=="production")return!0;let r=t&&"hostname"in t?t.hostname:typeof location<"u"?location.hostname:void 0;return typeof r=="string"&&r?r==="localhost"||r==="127.0.0.1"||r.endsWith(".localhost"):!1}});function Fs(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 np(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 ep,rp,nE,op,Wo,qo,At,Ko=F(()=>{"use strict";ep=(t,e,r=300)=>{let o;return(...n)=>{clearTimeout(o),o=setTimeout(()=>{e.apply(t,n)},r)}},rp=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}}},nE=/^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/,op=t=>nE.test(t),Wo=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let r of e)if(r.resolveHandler)return!0;return!1},qo=(t,e)=>{if(typeof t=="function")return t;let r=e?.context?.plugins;if(!r)return t;for(let o of r)if(o.resolveHandler){let n=o.resolveHandler(t,e);if(typeof n=="function")return n}return t},At=(t,e,...r)=>{let o=e?.context?.plugins;if(!o)return!1;let n=!1;for(let s of o)typeof s[t]=="function"&&(s[t](e,...r),n=!0);return n}});var sp,Gb=F(()=>{"use strict";Ot();Qe();sp=(t,e)=>{let{__ref:r}=t,o=t.if;if(A(o)){let n;try{n=o(t,t.state,t.context)}catch(s){typeof console<"u"&&console.warn("[DOMQL] if condition error:",s),delete r.__if;return}n?r.__if=!0:delete r.__if}else o!=null&&typeof o=="object"?ut(o,t)?r.__if=!0:delete r.__if:r.__if=!0}});var ip,ap,Yb=F(()=>{"use strict";ip=(t,...e)=>{t&&e.map(r=>console.log(r))},ap=(t,e,...r)=>{t&&(console.group(e),r.map(o=>console.log(o)),console.groupEnd(e))}});function dp(t){let e;try{if(!window.localStorage)return;e=window.localStorage.getItem(t)}catch{return}if(e!==null)try{return JSON.parse(e)}catch{return}}function pp(t,e){if(e!=null)try{if(!window.localStorage)return;let r=typeof e=="object"?JSON.stringify(e):e;window.localStorage.setItem(t,r)}catch{}}var cp,lp,fp,up,Xb=F(()=>{"use strict";Ot();bs();cp=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),lp=(t,e,r=365)=>{if(Tt(Q)||Tt(Q.cookie))return;let o=new Date;o.setTime(o.getTime()+r*24*60*60*1e3);let n=`expires=${o.toUTCString()}`;Q.cookie=`${t}=${e};${n};path=/`},fp=t=>{if(Tt(Q)||Tt(Q.cookie))return;let e=`${t}=`,o=decodeURIComponent(Q.cookie).split(";");for(let n=0;n<o.length;n++){let s=o[n];for(;s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return""},up=t=>{Tt(Q)||Tt(Q.cookie)||(Q.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var Go,Jb,hp,gp=F(()=>{"use strict";Go={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"]),hp=t=>Go.body.has(t)});var mp,Zb,Yo,Bs,Kt,yp,Tc,Us,bp,Vs,Oc,Rc,Hs,Pc,Xo,sE,je,Qb,Ns,zs,_p,js,xp,wp,Ic,Dc,$c,Lc,Mc,Fc,t_,Nc=F(()=>{"use strict";Vo();Sp();Qe();Ot();mp="production",Zb=t=>t.sourcemap!==!1&&mp!=="production",Yo=t=>{if(t.includes("+"))return t.split("+").filter(Be);if(t.includes("_")){let[e]=t.split("_");return[e]}if(t.includes(".")&&!Be(t.split(".")[1])){let[e]=t.split(".");return[e]}return[t]},Bs=(t,e,r)=>{let o=[],n=Yo(r);n&&(o=[...n]);let s=t.extends;return s&&(o=O(s)?[...o,...s]:[...o,s]),o},Kt=(t,e)=>{let{__ref:r}=e,{__extends:o}=r;if(!t)return o;let n=e.variant,s=e.context;if(n&&s?.components&&!Array.isArray(t)&&typeof t=="string"){let i=`${t}.${n}`;s.components[i]&&(t=i)}return o.includes(t)||(o=Array.isArray(t)?[...o,...t]:[...o,t],r.__extends=o),o},yp=(t,e)=>{if(!t)return e;let{extends:r}=e,o=O(r)?r:[r],n=O(t)?t:[t];return{...e,extends:Bo(n,o)}},Tc=()=>Math.random().toString(36).substring(2),Us={},bp={},Vs=t=>Us[t.__hash],Oc=(t,e)=>{let r=Tc();return w(t)||(t.__hash=r),r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(Us[r]=e),e},Rc=(t,e)=>t.__hash?e.concat(Vs(t)):Oc(t,e),Hs=(t,e,r,o=new Set,n,s)=>{for(let i of t)O(i)?Hs(i,e,r,o,n,s):Xo(i,e,r,o,n,void 0,s);return e},Pc=(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&&Xo(a,e,r,o,n,s,i),e},Xo=(t,e,r,o=new Set,n,s,i)=>{if(!t||o.has(t))return e;if(O(t))return Hs(t,e,r,o,n,i);let a=s;return w(t)?(a=t,t=zs(t,r)):i&&S(t)&&i.has(t)&&(a=i.get(t)),o.add(t),t?.extends?Pc(t,e,r,o,n,a,i):t&&(e.push(t),n&&n.push(a)),e},sE=new Set(["parent","node","__ref","__proto__","extends","childExtends","childExtendsRecursive"]),je=(t,e,r,o,n)=>{e=ft(e);for(let s in e){if(sE.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]||{},Qb(r[s],a,o)):r[s]=o:r&&n?.[s]&&(r[s]=n[s]);else if(S(i)&&S(a)){let c=r?r[s]=r[s]||{}:void 0,l=n?.[s];Be(s)?t[s]=je(i,a,c,o,l):je(i,a,c,o,l)}if(s==="extends"||s==="childExtends"||s==="childExtendsRecursive"){if(O(i)&&O(a))t[s]=i.concat(a);else if(O(i)&&S(a)){let c=je({},i);t[s]=je(c,a)}}}}return t},Qb=(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]||{},Qb(t[n],s,r,o)):t[n]=r}}},Ns=(t,e,r)=>t.reduce((o,n,s)=>{let i=ft(n),a=r?r[s]:void 0;return je(o,i,e,a)},{}),zs=(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&&(mp==="test"||mp==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},_p=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),js=(t,e,r,o)=>{if(!t)return[];if(t.__hash)return Vs(t)||[];let s=Xo(t,[],e,new Set,r,void 0,o);return r?s:Rc(t,s)},xp=(t,e)=>{if(!t)return e;let r=O(t)?t:[t];return Bo(r,e)},wp=t=>{let e=[];function r(o){for(let n in o)Object.prototype.hasOwnProperty.call(o,n)&&(Be(n)&&e.push(n),n==="extends"&&(typeof o[n]=="string"?e.push(o[n]):Array.isArray(o[n])&&(e=e.concat(o[n]))),typeof o[n]=="object"&&o[n]!==null&&r(o[n]))}return r(t),e},Ic=(t,e,r={})=>{let{__ref:o}=t,n=t.context||e.context,s=t.variant;if(t.extends)if(Array.isArray(t.extends)&&t.extends.length>0){let[i,...a]=t.extends;if(typeof i=="string"&&s&&n?.components){let c=`${i}.${s}`;n.components[c]?Kt([c,...a],t):Kt(t.extends,t)}else Kt(t.extends,t)}else if(typeof t.extends=="string"&&s&&n?.components){let i=`${t.extends}.${s}`;n.components[i]?Kt(i,t):Kt(t.extends,t)}else Kt(t.extends,t);return Dc(t,e,r),$c(t,e,r),Lc(t,e,r),t.component&&Kt(ut(t.component,t),t),n.defaultExtends&&Kt(n.defaultExtends,t),Uo(o.__extends)},Dc=(t,e,r={})=>{let{__ref:o}=t;return r.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&Kt(e.childProps.extends,t),o.__extends},$c=(t,e,r={})=>{let{__ref:o}=t,n=r.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!n&&s&&Kt(s,t),o.__extends},Lc=(t,e,r={})=>{let{__ref:o}=t,n=e.childExtendsRecursive,s=r.ignoreChildExtendsRecursive||t.ignoreChildExtendsRecursive,i=t.key==="__text";return n&&!i&&!s&&Kt(n,t),o.__extends},Mc=(t,e,r={})=>{let{__ref:o}=t,n=t.context||e.context,s=t.variant,i=Zb(r),a=i?[...o.__extends]:null,c=Uo(o.__extends.map((l,f)=>zs(l,n,r,f===0&&s)));if(i){let l=new WeakMap;for(let d=0;d<c.length;d++){let h=c[d],g=a[d];h&&S(h)&&w(g)&&l.set(h,g)}let f=[],u=js(c,n,f,l);o.__extendsStack=u,o.__extendsNames=f}else{let l=js(c,n);o.__extendsStack=l}return o.__extendsStack},Fc=(t,e,r={})=>{let{__ref:o}=t,{__extendsStack:n}=o;if(Zb(r)){let s={},i=o.__extendsNames||[],a=Ns(n,s,i),c={};je(t,a,c,void 0,s),o.__sourcemap=c}else{let s=Ns(n);je(t,s)}return t},t_=(t,e,r={})=>(Ic(t,e,r),Mc(t,e,r),Fc(t,e,r),t)});function kp(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function vp(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function Cp(t,e,r){let{context:o}=e||{},[n]=Yo(r),s=r||n;return o?.components?.[s]||o?.pages?.[s]}var Be,Sp=F(()=>{"use strict";Nc();Ot();Be=t=>{if(!w(t)||!t.length)return!1;let e=t.charCodeAt(0);return e>=65&&e<=90}});function e_(t,e){let{props:r,on:o}=e,n=Qr(t.split("on")[1]),s=o[n],i=r[t];A(s)?o[n]=(...a)=>{if(s(...a)!==!1&&A(i))return i(...a)}:o[n]=i}var r_=F(()=>{"use strict";As();Ot()});function jc(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&&Wo(this.context))){let g=Qr(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(n_.has(u)){t.props[o]=n,delete t[o],r.push(o);continue}let d=Ep.test(o)||o_.test(o)||aE(n),h=yr.has(o);!d&&!h&&(o in t.props||(t.props[o]=n),delete t[o],r.push(o))}return t}function Bc(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&&Wo(this.context);if(s&&i){e_(o,t),delete t.props[o];continue}if(r.includes(o)||o==="childProps")continue;let a=o.charAt(0);if(n_.has(a))continue;let c=this.define?.[o],l=this.context?.define?.[o],f=S(c)||A(c),u=S(l)||A(l),d=Ep.test(o)||o_.test(o),h=yr.has(o);(d||h||f||u)&&(t[o]===void 0||n===null)&&(t[o]=n,t.props&&delete t.props[o])}return t}function Uc(t=this){let e=[];return jc.call(this,t,{cachedKeys:e}),Bc.call(this,t,{cachedKeys:e}),t}function Ap(t={}){return t.on||(t.on={}),t.props||(t.props={}),Uc.call(this,t)}function Op(t,e){this.__element.update({props:t},e)}function Ys(t){let e={update:Op.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var Ep,o_,n_,iE,aE,Ks,Ws,Tp,Gs,Xs,Js,Vc,qs,Rp,Pp,Ip=F(()=>{"use strict";zo();r_();Qe();Ot();As();Ko();Ep=/^[A-Z]/,o_=/^\d+$/,n_=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),iE=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),aE=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if(iE.has(e)||Ep.test(e))return!0;return!1},Ks=(t,e,r)=>{let{props:o,__ref:n}=t;if(n.__propsStack=[],o)n.__initialProps=o;else return{};return H(o)?{...o}:(n.__propsStack.push(o),{})};Ws=t=>Wt(t)("string","number")?{inheritedString:t}:t,Tp=(t,e)=>!t||!e.length?!1:e.includes(t),Gs=(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=Ws(i);o.unshift(c)}if(s){let c=Ws(s);o.unshift(c)}return o};Xs=t=>{let e=new Set;return t.filter(r=>!r||br.has(r)||e.has(r)?!1:(e.add(r),!0))},Js=(t,e,r)=>(e.props=t.reduce((o,n)=>{if(br.has(n))return o;for(;A(n);)n=ut(n,e);return st(o,ft(n,{exclude:br}))},{}),Ys(e),e.props),Vc=(t,e)=>{let{props:r,__ref:o}=t,n=o.__propsStack||[];if(e?.props&&(n=[...Gs(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=Xs(n),o.__propsStack},qs=(t,e)=>{let{__ref:r}=t,o=Vc(t,e);o.length?Js(o,t):(r.__propsStack=[],t.props={})},Rp=function(t,e,r){let{__ref:o}=t;if(o.__if)qs(t,e);else try{qs(t,e)}catch(n){t.context?.designSystem?.verbose&&console.warn("initProps error at",o.path?.join("."),n),t.props={},o.__propsStack=[]}return Ys(t),t},Pp=(t,e,r)=>{let{__ref:o}=e,s=[...o.__propsStack||[]],i=Gs(e,r);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),o.__propsStack=Xs(s),o.__propsStack.length&&Js(o.__propsStack,e),e}});var s_,Hc,zc,Wc,qc,Dp,Kc,Gc,Yc,$p,i_=F(()=>{"use strict";Nc();Ec();xs();Ip();gp();Ot();s_="production",Hc=(t,e,r)=>{let o=e.childExtends&&e.childExtends.tag,n=e.childProps&&e.childProps.tag,s=Go.body.has(r)&&r;return{text:t,tag:o||n||s||"string"}},zc=(t,e,r)=>{if(t===void 0)return(s_==="test"||s_==="development")&&console.warn(r,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:Wt(t)("string","number")?Hc(t,e,r):A(t)?{props:t}:t},Wc=(t,e)=>{let r={};return r.origin=t,r.parent=e,r},qc=(t,e,r,o,n)=>{if(!e)return n;if(Ze(e)){let s={key:":root",node:e};return n[`${r}_parent`]=s,s}return e},Dp=(t,e)=>{let{__ref:r}=t,{__ref:o}=e,n=e&&e.key===":root";r?.root||(r.root=n?t:o?.root)},Kc=(t,e,r)=>{let{__ref:o}=e;return o||(o=e.ref={}),o.path||(o.path=[]),o.path.concat(r)},Gc=(t,e,r,o,n)=>(o.context&&!n.context&&!t.context&&(n.context=o.context),o.context||e.context||n.context||t.context),Yc=(t,e,r)=>{let o=Wc(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=Bs(t,e,r),o.path=Kc(t,e,r),o},$p=(t,e,r,o,n)=>{let i=t?.__hash?{extends:[t]}:zc(t,e,r);if(!i)return;let a=qc(i,e,r,o,n),c=Ms(i,a,r);Yc(i,a,c);let l=Ks(i,a,c),f=Gc(i,a,c,o,n),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var Lp,Xc,Jc,Zc,Qc,Mp,tl,Fp,Np,jp,Bp,a_=F(()=>{"use strict";Vo();zo();Qe();Ot();Lp=t=>{let{state:e,props:r,__ref:o}=t,n=r?.state||e;return Wt(n)("string","number")?(o.__state=n,{value:n}):n===!0?(o.__state=t.key,{}):n?(o.__hasRootState=!0,n):!1},Xc=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},Jc=(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]},Qc=(t,e,r={})=>{let n=t.__ref.__state;if(!tl(t))return;let s=Xc(n,e.state),i=e.state;if(s)i=s,n=n.replaceAll("~/","");else{let a=Jc(n,e.state);a&&(i=a,n=n.replaceAll("../",""))}if(i)return Zc(n,i,r)},Mp=(t,e)=>{let r=t.__ref,o=Qc(t,e);if(o===void 0)return t.state;if(Wt(o)("object","array"))return ft(o);if(Wt(o)("string","number","boolean"))return r.__stateType=typeof o,{value:o};console.warn(r.__state,"is not present. Replacing with",{})},tl=t=>{let{__ref:e}=t,r=e?.__state;return!!(r&&Wt(r)("number","string","boolean"))},Fp=function(t){return H(t)?!!(t.update&&t.parse&&t.clean&&t.create&&t.parent&&t.destroy&&t.rootUpdate&&t.parentUpdate&&t.keys&&t.values&&t.toggle&&t.replace&&t.quietUpdate&&t.quietReplace&&t.add&&t.apply&&t.applyReplace&&t.setByPath&&t.setPathCollection&&t.removeByPath&&t.removePathCollection&&t.getByPath&&t.applyFunction&&t.__element&&t.__children):!1},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},jp=(t,e)=>{let{__element:r}=e,o=r?.state;if(!o)return;let n=ft(o,to),s={[t.key]:n},i=S(o.__depends)?{...o.__depends,...s}:s;return Array.isArray(o)?vs(o,{...Object.getPrototypeOf(o),__depends:i}):Object.setPrototypeOf(o,{...Object.getPrototypeOf(o),__depends:i}),n},Bp=(t,e,r={})=>{let{overwrite:o}=r;if(!o)return;let n=o==="shallow";if(o==="merge"){st(t,e,to);return}(n?ro:qt)(t,e,to)}});var cE,Up,c_=F(()=>{"use strict";cE=(t,e)=>{let r=e;for(;r;){if(r===t)return!0;r=Object.getPrototypeOf(r)}return!1},Up=(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&&!cE(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var l_,el,wr,rl,Vp,Hp=F(()=>{"use strict";Ot();Ko();l_=(t,e)=>{let r="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[r]},el=(t,e,r,o,n)=>{if(t=qo(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}},wr=(t,e,r)=>{if(!e)throw new Error("Element is required");At(t,e,r);let o=l_(t,e);if(o){let{state:n,context:s}=e;return el(o,e,n,s,r)}},rl=(t,e,r,o,n,s)=>{if(t=qo(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}},Vp=(t,e,r,o)=>{At(t,r,e,o);let n=l_(t,r);if(n){let{state:s,context:i}=r;return rl(n,e,r,s,i,o)}}});var zp,Zs,Wp=F(()=>{"use strict";zp={},Zs={}});var u_={};P(u_,{restAdapter:()=>f_,setup:()=>fE});var lE,tr,fE,f_,d_=F(()=>{"use strict";lE=(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()},tr=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}},fE=async({url:t,headers:e,auth:r,fetchOptions:o})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return f_(t,e,r,o)},f_=(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 tr(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 tr(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 tr(c(r.signOutUrl,r.baseUrl),a({method:"POST",headers:s()})),n=null,{error:null}),select:({from:f,params:u,select:d,limit:h,offset:g,order:p,single:m,headers:b,baseUrl:_})=>{let y={...u};return d&&(y.select=d),h&&(y.limit=h),g&&(y.offset=g),m&&(y.single=!0),p&&(typeof p=="string"?y.order=p:Array.isArray(p)?y.order=p.map(x=>`${x.by}:${x.asc===!1?"desc":"asc"}`).join(","):p.by&&(y.order=`${p.by}:${p.asc===!1?"desc":"asc"}`)),tr(lE(_||t,f||"",y),a({headers:s(b)}))},rpc:({from:f,params:u,headers:d,baseUrl:h})=>tr(c(`rpc/${f}`,h),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),insert:({from:f,data:u,headers:d,baseUrl:h})=>tr(c(f,h),a({method:"POST",headers:i(d),body:JSON.stringify(u)})),update:({from:f,data:u,params:d,method:h,headers:g,baseUrl:p})=>{let m=d?.id||u?.id,b=m?`${f}/${m}`:f;return tr(c(b,p),a({method:h||"PATCH",headers:i(g),body:JSON.stringify(u)}))},upsert:({from:f,data:u,params:d,method:h,headers:g,baseUrl:p})=>{let m=d?.id||u?.id,b=m?`${f}/${m}`:f;return tr(c(b,p),a({method:h||"PUT",headers:i(g),body:JSON.stringify(u)}))},delete:({from:f,params:u,headers:d,baseUrl:h})=>{let g=u?.id,p=g?`${f}/${g}`:f;return tr(c(p,h),a({method:"DELETE",headers:s(d)}))}}}});var h_={};P(h_,{localAdapter:()=>p_,setup:()=>dE});var ol,uE,dE,p_,g_=F(()=>{"use strict";ol=(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},uE=(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}},dE=async({data:t,...e})=>p_(t,e),p_=(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=>ol(p,u));return uE(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(ol(h[p],d)){let m={...h[p]};Object.assign(h[p],u),g.push(h[p]),c(f,"UPDATE",h[p],m)}return a(f),{data:g,error:null}},upsert:async({from:f,data:u,params:d})=>{let h=i(f),g=Array.isArray(u)?u:[u],p=[];for(let m of g){let b=d||(m.id!==void 0?{id:m.id}:null),_=b?h.findIndex(y=>ol(y,b)):-1;if(_>-1){let y={...h[_]};Object.assign(h[_],m),p.push(h[_]),c(f,"UPDATE",h[_],y)}else{let y={id:m.id||++l,...m};h.push(y),p.push(y),c(f,"INSERT",y,null)}}return a(f),{data:Array.isArray(u)?p:p[0],error:null}},delete:async({from:f,params:u})=>{let d=i(f),h=[];for(let g=d.length-1;g>=0;g--)ol(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 so={};P(so,{createAdapter:()=>bE,default:()=>TE,executeFetch:()=>ii,fetchPlugin:()=>Jp,initAdapterAuth:()=>cl,parseDuration:()=>ei,queryClient:()=>AE,registerAdapter:()=>yE,resolveDb:()=>__});var pE,hE,nl,ti,sl,Gp,gE,mE,yE,bE,__,ei,Ft,x_,Qs,_E,si,ri,oi,il,Yp,al,xE,m_,qp,w_,S_,Jo,y_,wE,b_,SE,ll,k_,v_,cl,Xp,fe,Ce,ni,no,Ue,Sr,kE,vE,CE,Kp,EE,ii,AE,Jp,TE,kr=F(()=>{"use strict";R();pE=["select","rpc","insert","update","upsert","delete","subscribe"],hE={rest:()=>Promise.resolve().then(()=>(d_(),u_)),local:()=>Promise.resolve().then(()=>(g_(),h_))},nl=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),ti=(()=>{if(typeof globalThis<"u"&&globalThis[nl])return globalThis[nl];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,nl,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[nl]}catch{}return t})(),sl=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),Gp=(()=>{if(typeof globalThis<"u"&&globalThis[sl])return globalThis[sl];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,sl,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[sl]}catch{}return t})(),gE=5e3,mE=t=>new Promise(e=>{if(ti[t])return e(ti[t]);let r=Gp[t]||=[],o=!1,n=()=>{o||(o=!0,e(ti[t]||null))};r.push(n),setTimeout(n,gE)}),yE=(t,e)=>{ti[t]=e;let r=Gp[t];if(r&&r.length){Gp[t]=[];for(let o of r)o()}},bE=t=>{let e={};for(let r of pE)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},__=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...r}=t,o=typeof e=="string"?e:typeof t=="string"?t:null;if(!o)return null;let n=ti[o]||hE[o];if(!n&&(n=await mE(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)},ei=t=>{if(!t)return 0;if(typeof t=="number")return t;let e=t.match(/^(\d+)(ms|s|m|h)$/);if(!e)return 0;let r=parseInt(e[1]),o=e[2];return o==="ms"?r:o==="s"?r*1e3:o==="m"?r*6e4:o==="h"?r*36e5:0},Ft=new Map,x_=new Map,Qs=new Map,_E=(t,e,r)=>{if(t.cache?.key)return t.cache.key;let o=SE(t.params),n=r?`${r}:`:"",s=`${t.from}:${t.method}:${n}${JSON.stringify(o||"")}`;return e?`${s}:${e}`:s},si=t=>Ft.get(t)||null,ri=(t,e,r)=>{let o=Ft.get(t),n={data:e,error:r,time:Date.now(),stale:!1};Ft.set(t,n);let s=x_.get(t);if(s)for(let i of s)A(i)&&i(n);return n},oi=t=>{if(t){let e=Ft.get(t);e&&(e.stale=!0);return}for(let[,e]of Ft)e.stale=!0},il=t=>{if(t){Ft.delete(t);return}Ft.clear()},Yp=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:ei(t),gcTime:3e5}:{staleTime:ei(t.stale||t.staleTime)||6e4,gcTime:ei(t.gc||t.gcTime||t.expire)||3e5,key:t.key},al=null,xE=()=>{al||(al=setInterval(()=>{let t=Date.now();for(let[e,r]of Ft){let o=x_.get(e);!(o&&o.size>0)&&t-r.time>(r.gcTime||3e5)&&Ft.delete(e)}},3e4),al.unref&&al.unref())};xE();m_=3,qp=t=>Math.min(1e3*2**t,3e4),w_=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:m_,delay:qp}:typeof e=="number"?{count:e,delay:qp}:{count:e.count??m_,delay:A(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:qp}},S_=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}},Jo={focus:new Set,online:new Set},y_=!1,wE=()=>{if(y_||typeof window>"u")return;y_=!0;let t=()=>{for(let r of Jo.focus)r()},e=()=>{for(let r of Jo.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},b_=(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},SE=t=>(!t||A(t),t),ll=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},k_=(t,e)=>{let o=(t?.state?.root||e?.state?.root)?.__fetchScope;return o?String(o):void 0},v_=(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},cl=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)})},Xp=async(t,e)=>{if(A(t.select))return t.auth!==!1&&await cl(t,e),t;if(t.__resolved)return t.auth!==!1&&await cl(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=__(t);let r=await t.__resolving;return delete t.__resolving,r?(r.auth=t.auth,r.url=t.url,r.key=t.key,t.__resolved=r,e.fetch=r,t.auth!==!1&&await cl(r,e),r):null},fe=(t,e,...r)=>{let o=A(t[e])?t[e]:null;o&&o.call(t,...r,t,t.state,t.context)},Ce=(t,e,r,...o)=>{let n=t&&A(t[r])?t[r]:null;n&&n.call(e,...o,e,e.state,e.context)},ni=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},no=(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})}},Ue=(t,e)=>{let r=t?.__ref;r&&(r.__fetchStatus=e,r.__fetching=e.isFetching,r.__fetchError=e.error)},Sr=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 Xp(n,r);if(!s||!e.__ref)return;let i=e.__ref,{from:a,method:c,query:l,params:f,cache:u,transform:d,single:h,auth:g,fields:p,as:m,limit:b,offset:_,order:y,headers:x,baseUrl:k,page:E,cursor:T,getNextPageParam:$,getPreviousPageParam:D,infinite:I,placeholderData:z,initialData:V,select:rt,keepPreviousData:at}=t,G=w(rt)?rt:void 0;if(l&&A(e.getQuery)){let nt=e.getQuery(s.name||"paths");nt&&(G=nt.select||nt.length&&nt.join(",")||G)}let K=v_(f,e,r),lt=Yp(u),Vt=w_(t),W=ll(e,r),wt=k_(e,r),L=W?`:${W}`:"",ot=wt?`${wt}:`:"",U=lt?u?.key||`${a}:${c}:${ot}${JSON.stringify(K||"")}${I?":infinite":""}${E?":p"+JSON.stringify(E):""}${L}`:null;if(!i.__fetchInitialized&&U&&(i.__fetchInitialized=!0,V!==void 0)){let nt=A(V)?V():V;ri(U,nt,null)}if((c==="select"||c==="rpc")&&U&&lt){let nt=si(U);if(nt&&!nt.error){let M=Date.now()-nt.time,ht=nt.stale||M>(lt.staleTime||0),q=nt.data;if(A(rt)&&(q=rt(q,e,e.state)),d&&(q=d(q,e,e.state)),no(e,q,m),!ht){Ue(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(z!==void 0){let M=A(z)?z(e,e.state):z;M!==void 0&&no(e,M,m)}}if(U&&Qs.has(U)&&!o.force){let nt=Qs.get(U);try{let M=await Promise.race([nt,new Promise((ht,q)=>setTimeout(()=>q("DEDUP_TIMEOUT"),15e3))]);if(M?.data!==void 0){let ht=M.data;A(rt)&&(ht=rt(ht,e,e.state)),d&&(ht=d(ht,e,e.state)),no(e,ht,m),fe(e,"onFetchComplete",ht),Ce(t,e,"onFetchComplete",ht)}}catch{}return}let Y=!si(U)?.data;Ue(e,{isFetching:!0,isLoading:Y,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),fe(e,"onFetchStart"),Ce(t,e,"onFetchStart");let j=r?.analyze?.emitNetwork,pt=j?typeof performance<"u"?performance.now():Date.now():0;j&&j({phase:"start",mode:"query",from:a,method:c,cacheKey:U,lang:W});let Ge=S_(async()=>{if(g!==!1&&s.auth!==!1&&s.getSession){let q=await s.getSession();if(g===!0&&!q){let Lt={message:"Not authenticated"};return Ue(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:Lt,status:"error",fetchStatus:"idle"}),fe(e,"onFetchError",Lt),Ce(t,e,"onFetchError",Lt),{data:null,error:Lt}}}let nt=s[c];if(!A(nt))return{data:null,error:{message:`Method "${c}" not found on adapter`}};let M={from:a,select:G,params:K,single:h,limit:b,offset:_,order:y,headers:x,baseUrl:k},ht=ll(e,r);if(ht&&(M.headers={...M.headers,"Accept-Language":ht}),E!==void 0){if(S(E))E.offset!==void 0&&(M.offset=E.offset),E.limit!==void 0&&(M.limit=E.limit),E.cursor!==void 0&&(M.params={...M.params,cursor:E.cursor});else if(typeof E=="number"){let q=t.pageSize||b||20;M.offset=(E-1)*q,M.limit=q}}if(T!==void 0&&(M.params={...M.params,cursor:T}),c==="insert"||c==="update"||c==="upsert"){let q;if(p===!0||t.on==="submit")q=ni(e);else if(O(p)){let Lt=ni(e);q={};for(let Hu of p)q[Hu]=Lt[Hu]}else e.state?.parse?q=e.state.parse():S(e.state)&&(q={...e.state});d&&(q=d(q,e,e.state)),M.data=q}if(c==="rpc"){let q=K;if(t.on==="submit"){let Lt=ni(e);q=t.transformParams?t.transformParams(Lt,e,e.state):Lt}M.params=q}if(c==="subscribe"){let q=s.subscribe({from:a,params:K,on:t.subscribeOn},(Lt,Hu,KP)=>{no(e,Lt,m),fe(e,"onFetchComplete",Lt),Ce(t,e,"onFetchComplete",Lt)});return i.__unsubscribe=q,{data:null,error:null,subscribed:!0}}return nt(M)},Vt);U&&Qs.set(U,Ge);try{let nt=await Ge;if(nt?.subscribed)return;let{data:M,error:ht}=nt||{};if(ht){U&&ri(U,null,ht),Ue(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:ht,status:"error",fetchStatus:"idle"}),fe(e,"onFetchError",ht),Ce(t,e,"onFetchError",ht),j&&j({phase:"error",mode:"query",from:a,method:c,cacheKey:U,error:ht.message||ht,durationMs:(typeof performance<"u"?performance.now():Date.now())-pt});return}if(M!==void 0){if((c==="select"||c==="rpc")&&U){let Lt=ri(U,M,null);Lt.gcTime=lt?.gcTime||3e5}let q=M;I&&O(M)&&(i.__pages||(i.__pages=[]),o.direction==="previous"?i.__pages.unshift(M):i.__pages.push(M),q=i.__pages.flat(),$&&(i.__nextPageParam=$(M,i.__pages),i.__hasNextPage=i.__nextPageParam!=null),D&&(i.__prevPageParam=D(M,i.__pages),i.__hasPreviousPage=i.__prevPageParam!=null)),A(rt)&&(q=rt(q,e,e.state)),d&&(q=d(q,e,e.state)),(!at||q!==void 0)&&no(e,q,m),Ue(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),fe(e,"onFetchComplete",q),Ce(t,e,"onFetchComplete",q),j&&j({phase:"success",mode:"query",ok:!0,from:a,method:c,cacheKey:U,durationMs:(typeof performance<"u"?performance.now():Date.now())-pt})}}catch(nt){Ue(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:nt,status:"error",fetchStatus:"idle"}),fe(e,"onFetchError",nt),Ce(t,e,"onFetchError",nt),j&&j({phase:"error",mode:"query",from:a,method:c,cacheKey:U,error:nt.message||String(nt),durationMs:(typeof performance<"u"?performance.now():Date.now())-pt})}finally{U&&Qs.delete(U)}},kE=(t,e,r)=>{let o=t.on,n=e.__ref;n.__fetchListeners||(n.__fetchListeners=[]);let s=t.__runner||Sr;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))},vE=(t,e,r)=>{let o=e.__ref;o.__fetchCleanups||(o.__fetchCleanups=[]),wE();let n=t.refetchInterval;if(n){let s=typeof n=="number"?n:ei(n);if(s>0){let i=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&Sr(t,e,r,{force:!0})},s);o.__fetchCleanups.push(()=>clearInterval(i))}}if(t.refetchOnWindowFocus!==!1){let s=()=>{let i=ll(e,r),a=k_(e,r),c=_E(t,i,a),l=si(c),f=Yp(t.cache);(!l||l.stale||Date.now()-l.time>(f?.staleTime||0))&&Sr(t,e,r,{force:!0})};Jo.focus.add(s),o.__fetchCleanups.push(()=>Jo.focus.delete(s))}if(t.refetchOnReconnect!==!1){let s=()=>Sr(t,e,r,{force:!0});Jo.online.add(s),o.__fetchCleanups.push(()=>Jo.online.delete(s))}},CE=(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&&no(t,i,n),s},Kp=(t,e)=>{let r=t.__ref,o=r.__optimisticSnapshot;o!==void 0&&(no(t,o,e.as),delete r.__optimisticSnapshot)},EE=async(t,e,r)=>{let o=r?.fetch;if(!o)return;let n=await Xp(o,r);if(!n)return;let s=e.__ref,{method:i,from:a,fields:c,transform:l,as:f,on:u,auth:d,headers:h,baseUrl:g,invalidates:p,optimistic:m,onMutate:b,onSuccess:_,onError:y,onSettled:x}=t,k;if(c===!0||u==="submit")k=ni(e);else if(O(c)){let D=ni(e);k={};for(let I of c)k[I]=D[I]}else e.state?.parse?k=e.state.parse():S(e.state)&&(k={...e.state});l&&(k=l(k,e,e.state)),A(b)&&b(k,e,e.state);let E=m?CE(e,t,k):null;s.__fetching=!0,Ue(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),fe(e,"onFetchStart"),Ce(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 K=await n.getSession();if(d===!0&&!K){E!==void 0&&Kp(e,t);let lt={message:"Not authenticated"};fe(e,"onFetchError",lt),Ce(t,e,"onFetchError",lt);return}}let D=n[i];if(!A(D))return;let I={from:a,data:k,headers:h,baseUrl:g};t.params&&(I.params=v_(t.params,e,r));let z=ll(e,r);z&&(I.headers={...I.headers,"Accept-Language":z});let V=w_(t),rt=await S_(()=>D(I),V),{data:at,error:G}=rt||{};if(G){E!==void 0&&Kp(e,t),Ue(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:G,status:"error",fetchStatus:"idle"}),fe(e,"onFetchError",G),A(y)&&y(G,k,e),A(x)&&x(null,G,k,e),T&&T({phase:"error",mode:"mutation",from:a,method:i,error:G.message||String(G),durationMs:(typeof performance<"u"?performance.now():Date.now())-$});return}if(delete s.__optimisticSnapshot,at!==void 0){let K=f?{[f]:at}:at;e.state?.update&&e.state.update(K,{preventFetch:!0})}if(Ue(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),fe(e,"onFetchComplete",at),Ce(t,e,"onFetchComplete",at),A(_)&&_(at,k,e),A(x)&&x(at,null,k,e),T&&T({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-$}),p){let K=O(p)?p:[p];for(let lt of K)if(lt===!0||lt==="*")for(let[Vt]of Ft)Vt.startsWith(a+":")&&oi(Vt);else oi(lt)}}catch(D){E!==void 0&&Kp(e,t),Ue(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:D,status:"error",fetchStatus:"idle"}),fe(e,"onFetchError",D),Ce(t,e,"onFetchError",D),A(y)&&y(D,k,e),A(x)&&x(null,D,k,e),T&&T({phase:"error",mode:"mutation",from:a,method:i,error:D.message||String(D),durationMs:(typeof performance<"u"?performance.now():Date.now())-$})}finally{s.__fetching=!1}},ii=(t,e,r,o)=>{if(!t||!o?.fetch)return;let s=ut(t,e);if(!s)return;let i=O(s)?s.map(c=>b_(ut(c,e),e)).filter(Boolean):[b_(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?EE:Sr;c.on==="create"?f(c,e,o):Promise.resolve().then(()=>{kE({...c,__runner:f},e,o)}),!l&&c.on==="create"&&(c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&vE(c,e,o)}let a=e.__ref;a.refetch=c=>{for(let l of i)Sr(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};Sr(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};Sr(f,e,o,{direction:"previous",force:!0})}},AE={invalidateQueries:t=>{if(!t){oi();return}if(w(t))for(let[e]of Ft)(e.startsWith(t)||e.includes(t))&&oi(e);else if(O(t)){let e=t.join(":");for(let[r]of Ft)r.includes(e)&&oi(r)}},removeQueries:t=>{if(!t){il();return}if(w(t))for(let[e]of Ft)(e.startsWith(t)||e.includes(t))&&il(e)},getQueryData:t=>si(t)?.data??void 0,setQueryData:(t,e)=>{let r=si(t),o=A(e)?e(r?.data):e;ri(t,o,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let o=await Xp(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=ri(n,i.data,null);a.gcTime=Yp(t.cache)?.gcTime||3e5}return i},getCache:()=>Ft,clear:()=>il(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of Ft)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||il(r))}},Jp={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||Qs.clear(),ii(e,t,t.state,t.context))}},TE=ii});function ci(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 Qp(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 th(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 eh(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 fl(t={}){let e=this;if(e.node?.style){for(let r in t){let o=t[r],n=e[r];if(S(o)&&n)fl.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 E_(t){let e=this;if(wr("beforeRemove",e,t)===!1)return e;A(e.node.remove)?e.node.remove():_r()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=ks(e.parent.__ref.__children,e.key)),wr("remove",e,t)}function rh(t){return this[t]}function oh(t,e){let r=this;if(t)return r.update(t,e),r}function nh(t){return t?this.__ref&&this.__ref[t]:this.__ref}function li(){return this.getRef("__children").map(e=>this[e])}function fi(){return this.getRef().path}function di(t){let e=null,r=o=>o.__element&&o.root?.isRootState;if(!this)e=C_();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=C_()),t?e?.[t]:e}function pi(t){let e=this.getRootState()?.__element;return e&&Object.keys(e).length>0&&t?e[t]:e}function hi(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function gi(t){let e=this.getRoot()?.context;return t?e[t]:e}function mi(t){let e=this.context;return t?e[t]:e}function ul(){let t=this,e=[];for(let r in t)!Object.prototype.hasOwnProperty.call(t,r)||yr.has(r)&&!Ts.has(r)||e.push(r);return e}function dl(t=[]){let e=this,r={},o=ul.call(e),n=o.includes("children"),s=t.length?new Set(t):null;for(let i=0;i<o.length;i++){let a=o[i];if(s&&s.has(a)||!Object.prototype.hasOwnProperty.call(e,a)||n&&a==="content")continue;let c=e[a];if(a==="state"){if(e.__ref&&!e.__ref.__hasRootState)continue;let l=A(c&&c.parse)?c.parse():c;r[a]=A(l)?l:JSON.parse(JSON.stringify(l||{}))}else if(a==="scope"){if(e.__ref&&!e.__ref.__hasRootScope)continue;r[a]=JSON.parse(JSON.stringify(c||{}))}else if(a==="props"){let{__element:l,update:f,...u}=e[a];r[a]=u}else bt(c)&&Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=c)}return r}function ai(t=[],e=new WeakSet){let r=this;if(e.has(r))return;e.add(r);let o=dl.call(r,t),n=t.length?new Set(t):null;for(let s in o){if(n&&n.has(s)||!Object.prototype.hasOwnProperty.call(r,s))continue;let i=o[s];Array.isArray(i)?o[s]=i.map(a=>H(a)?ai.call(a,t,e):a):H(i)&&(o[s]=ai.call(i,t,e))}return o}function Zo(...t){if(vr!=="test"&&vr!=="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 ih(...t){(vr==="test"||vr==="development")&&console.log(...t)}function yi(...t){(vr==="test"||vr==="development")&&console.warn(...t)}function io(...t){if(vr==="test"||vr==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&Zo.call(this),new Error(...t)}}function bi(){let t=this,{key:e,parent:r}=t,{__children:o}=r.__ref,n=o.indexOf(e),s=o[n+1];return r[s]}function _i(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 xi(t={}){let e=this;e.data||(e.data={}),e.data.varCaches||(e.data.varCaches={});let r=e.data.varCaches,o={},n;for(let s in t)t[s]!==r[s]&&(n=!0,o[s]=t[s]);return{changed:s=>{if(!n)return;let i=s(o,ft(r));for(let a in o)r[a]=o[a];return i},timeout:(s,i)=>{if(!n)return;let a=setTimeout(()=>{s(o),clearTimeout(a)},i)}}}function ah(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=>{io.call(this,s)}),n}catch(n){if(io.call(this,n),r?.strictMode)throw n}}async function wi(){let t=this,e=t.context?.fetch;if(!e)return null;if(typeof e.select=="function"){if(!e.__authInitialized&&e.getSession){let{initAdapterAuth:n}=await Promise.resolve().then(()=>(kr(),so));await n(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:n}=await Promise.resolve().then(()=>(kr(),so));await n(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let r=Promise.resolve().then(()=>(kr(),so)).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(()=>(kr(),so));await n(o,t.context)}return o}function Si(t){let e=this,r=t||Zs.useStateQuery||e.context?.useStateQuery;if(!r)return null;let o={};if(Zp(e,o),r===!0)return o;let n=LE[r];return n?n(o):o}function ch(t,e){return!!(Ho.has(t)||e?.context?.methods?.[t])}var vr,A_,ui,C_,sh,Zp,OE,T_,RE,PE,IE,DE,$E,LE,O_=F(()=>{"use strict";Hp();zo();Ot();Qe();tp();Vo();Wp();vr="production";A_=null,ui=t=>{A_=t||null},C_=()=>A_||null;sh=(t,e,r,o)=>Object.defineProperty(t,e,{get:r,set:o});Zp=(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&&Zp(c,e)}let s=r.contentElementKey||"content",i=t[s];i&&i.__ref&&Zp(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])}},T_=(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
+ ${T_(i,e+1)}
23
23
  ${r}}`).join(`
24
- `):""},kE=t=>`{
25
- ${v_(t,1)}
26
- }`,vE=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},CE=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("&")},EE=(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
+ `):""},RE=t=>`{
25
+ ${T_(t,1)}
26
+ }`,PE=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("&")},DE=(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}`},AE=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},TE={graphql:kE,"json-api":vE,odata:CE,sql:EE,paths:AE}});var OE,ah,E_=F(()=>{"use strict";vc();OE={snapshotId:Ds},ah=(t,e)=>{let r=t.__ref,{currentSnapshot:o,calleeElement:n}=e;if(!n||n===t){let a=OE.snapshotId();return r.__currentSnapshot=a,[a,t]}let i=n.__ref.__currentSnapshot;return o<i?[i,n,!0]:[i,n]}});var ul,ch,A_=F(()=>{ul=new Set(["__proto__","constructor","prototype","_id","__v","id","createdAt","updatedAt","schema"]),ch=t=>typeof t=="string"&&ul.has(t)});async function lh(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 T_=F(()=>{"use strict"});var Zo,Qo,wi,fe,vr,tn,Si,Ce,dl,RE,io,PE,en,fh,O_=F(()=>{"use strict";Zo=t=>t!=="latest"?`@${t}`:"",Qo=t=>t?`/${t}`:"",wi=t=>{let e=typeof t=="string"?t.replace(/\/+$/,""):"";if(!e)return{name:"",subpath:""};let r=e.split("/"),o=e.startsWith("@")?2:1;return{name:r.slice(0,o).join("/"),subpath:r.slice(o).join("/")}},fe={skypack:{url:"https://cdn.skypack.dev",formatUrl:(t,e,r)=>`${fe.skypack.url}/${t}${Zo(e)}${Qo(r)}`},esmsh:{url:"https://esm.sh",formatUrl:(t,e,r)=>`${fe.esmsh.url}/${t}${Zo(e)}${Qo(r)}`},unpkg:{url:"https://unpkg.com",formatUrl:(t,e,r)=>`${fe.unpkg.url}/${t}${Zo(e)}${Qo(r)}?module`},jsdelivr:{url:"https://cdn.jsdelivr.net/npm",formatUrl:(t,e,r)=>`${fe.jsdelivr.url}/${t}${Zo(e)}${Qo(r)}/+esm`},symbols:{url:"https://pkg.symbo.ls",formatUrl:(t,e,r)=>`${fe.symbols.url}/${t}${Zo(e)}${Qo(r)}/+esm`}},vr={"esm.sh":"esmsh",unpkg:"unpkg",skypack:"skypack",jsdelivr:"jsdelivr","pkg.symbo.ls":"symbols"},tn=(t={})=>{let{packageManager:e}=t;return vr[e]||null},Si=t=>{if(typeof t!="string")return t;let e=t.trim().match(/^[\^~](\d.*)$/);return e?e[1]:t},Ce=(t,e="latest",r="esmsh")=>{let o=fe[r]||fe.esmsh,{name:n,subpath:s}=wi(t);return o.formatUrl(n||t,Si(e),s)},dl=(t,e="latest",r="esmsh")=>{let o=fe[r]||fe.esmsh,n=Si(e),{name:s,subpath:i}=wi(t);return`${o.url}/${s||t}${Zo(n)}${Qo(i)}/`},RE=/^node:|^@symbo-ls\//,io=t=>typeof t=="string"&&RE.test(t),PE=/[<>…]/,en=t=>typeof t=="string"&&PE.test(t),fh=(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(io(f)||en(f))continue;let u=s[f]||o[f]||"latest";i[f]=Ce(f,u,e),f.endsWith("/")||(i[f+"/"]=dl(f,u,e))}if(!Object.keys(i).length)return"";let a='<script type="importmap">',c="<\/script>",l=`{
29
+ FROM ${a}${l}`},$E=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:RE,"json-api":PE,odata:IE,sql:DE,paths:$E}});var ME,lh,R_=F(()=>{"use strict";Ec();ME={snapshotId:Ls},lh=(t,e)=>{let r=t.__ref,{currentSnapshot:o,calleeElement:n}=e;if(!n||n===t){let a=ME.snapshotId();return r.__currentSnapshot=a,[a,t]}let i=n.__ref.__currentSnapshot;return o<i?[i,n,!0]:[i,n]}});var pl,fh,P_=F(()=>{pl=new Set(["__proto__","constructor","prototype","_id","__v","id","createdAt","updatedAt","schema"]),fh=t=>typeof t=="string"&&pl.has(t)});async function uh(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 I_=F(()=>{"use strict"});var Qo,tn,ki,ue,Cr,en,vi,Ee,hl,FE,ao,NE,rn,on,dh,D_=F(()=>{"use strict";Qo=t=>t!=="latest"?`@${t}`:"",tn=t=>t?`/${t}`:"",ki=t=>{let e=typeof t=="string"?t.replace(/\/+$/,""):"";if(!e)return{name:"",subpath:""};let r=e.split("/"),o=e.startsWith("@")?2:1;return{name:r.slice(0,o).join("/"),subpath:r.slice(o).join("/")}},ue={skypack:{url:"https://cdn.skypack.dev",formatUrl:(t,e,r)=>`${ue.skypack.url}/${t}${Qo(e)}${tn(r)}`},esmsh:{url:"https://esm.sh",formatUrl:(t,e,r)=>`${ue.esmsh.url}/${t}${Qo(e)}${tn(r)}`},unpkg:{url:"https://unpkg.com",formatUrl:(t,e,r)=>`${ue.unpkg.url}/${t}${Qo(e)}${tn(r)}?module`},jsdelivr:{url:"https://cdn.jsdelivr.net/npm",formatUrl:(t,e,r)=>`${ue.jsdelivr.url}/${t}${Qo(e)}${tn(r)}/+esm`},symbols:{url:"https://pkg.symbo.ls",formatUrl:(t,e,r)=>`${ue.symbols.url}/${t}${Qo(e)}${tn(r)}/+esm`}},Cr={"esm.sh":"esmsh",unpkg:"unpkg",skypack:"skypack",jsdelivr:"jsdelivr","pkg.symbo.ls":"symbols"},en=(t={})=>{let{packageManager:e}=t;return Cr[e]||null},vi=t=>{if(typeof t!="string")return t;let e=t.trim().match(/^[\^~](\d.*)$/);return e?e[1]:t},Ee=(t,e="latest",r="esmsh")=>{let o=ue[r]||ue.esmsh,{name:n,subpath:s}=ki(t);return o.formatUrl(n||t,vi(e),s)},hl=(t,e="latest",r="esmsh")=>{let o=ue[r]||ue.esmsh,n=vi(e),{name:s,subpath:i}=ki(t);return`${o.url}/${s||t}${Qo(n)}${tn(i)}/`},FE=/^node:|^@symbo-ls\//,ao=t=>typeof t=="string"&&FE.test(t),NE=/[<>…]/,rn=t=>typeof t=="string"&&NE.test(t),on=t=>!!t&&typeof t=="object"&&!Array.isArray(t),dh=(t,e="skypack",r={})=>{let o=t.dependencies;if(!on(o))return"";let n=Object.keys(o);if(!n.length)return"";let s=r.pin||{},i={};for(let f of n){if(ao(f)||rn(f))continue;let u=s[f]||o[f]||"latest";i[f]=Ee(f,u,e),f.endsWith("/")||(i[f+"/"]=hl(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 uh,R_=F(()=>{"use strict";uh=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 dh,P_=F(()=>{"use strict";dh=(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 ph,I_=F(()=>{"use strict";ph=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 hh,D_=F(()=>{"use strict";hh=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function rn(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 xh(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 gh,mh,yh,bh,_h,$_=F(()=>{"use strict";gh=(t,e=!1,r=document,o="text/javascript")=>new Promise((n,s)=>{try{let i=r.createElement("script");i.type=o,i.async=e,i.src=t,i.addEventListener("load",a=>{n({status:!0})}),i.addEventListener("error",a=>{s(new Error({status:!1,message:`Failed to load the script ${t}`}))}),r.body.appendChild(i)}catch(i){s(i)}}),mh=(t,e=document,r="text/javascript")=>new Promise((o,n)=>{let s=e.createElement("script");s.type=r,s.src=t;let i=e.createElement("div");i.style.cssText="position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(255,255,255,0.8);z-index:9999;",e.body.appendChild(i),s.onload=()=>{console.log(`Successfully loaded: ${t}`),e.body.removeChild(i),o()},s.onerror=()=>{e.body.removeChild(i),n(new Error(`Failed to load: ${t}`))},e.body.appendChild(s)}),yh=(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}`)},bh=(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)}}),_h=(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 LE(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 pl(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 ME(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]??pl(a,p)??d;if(g==="getLocalStateLang")return pl(c,p+s)??d;let m=pl(c,p);return m!==void 0?m:a[p]??pl(a,p)??d}));return l}function L_(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 Sh(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=L_(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=L_(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=ME(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=LE(d,t.files);let g=t.name||t.app?.metadata?.title||t.app?.name||"";for(let[p,m]of Object.entries(d))if(typeof m=="string"&&m.includes("{{")){let b=m.replace(/\{\{[^}]*\}\}/g,"").trim();b?d[p]=b:p==="title"?d[p]=g:delete d[p]}return d}var Rt,IE,on,DE,hl,wh,$E,M_=F(()=>{"use strict";Ot();Rt=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,r=>e[r])},IE=t=>Object.entries(t||{}).filter(([e,r])=>r!==void 0).map(([e,r])=>`${e}="${Rt(r)}"`).join(" "),on=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)},DE=new Set(["jsonLd","styles","scripts"]),hl=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="${on(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="${on(o)}">${o}</style>`)}if(Array.isArray(t.scripts))for(let r of t.scripts){if(!r)continue;let o=typeof r=="string",n=o?r:r.src;if(!n&&!r.body)continue;let s=[];n&&s.push(`src="${Rt(n)}"`),o||(r.type&&s.push(`type="${Rt(r.type)}"`),r.async&&s.push("async"),r.defer&&s.push("defer"),r.integrity&&s.push(`integrity="${Rt(r.integrity)}"`),r.crossorigin&&s.push(`crossorigin="${Rt(r.crossorigin)}"`),r.referrerpolicy&&s.push(`referrerpolicy="${Rt(r.referrerpolicy)}"`),r.nomodule&&s.push("nomodule"));let i=` data-smbls-script="${Rt(n||on(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},wh=(t,e)=>{e||(t={...t,robots:"noindex"});let r=Object.entries(t).reduce((o,[n,s])=>{if(!s&&s!==0&&s!==!1||DE.has(n))return o;if(n==="title")return o.push(`<title>${Rt(s)}</title>`),o;if(n==="canonical")return o.push(`<link rel="canonical" href="${Rt(s)}">`),o;if(n==="manifest")return o.push(`<link rel="manifest" href="${Rt(s)}">`),o;if(n==="favicon"||n==="favicons"||n==="icon"||n==="icons")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="string")o.push(`<link rel="icon" href="${Rt(f)}">`);else if(typeof f=="object"){let u=IE(f);/rel=/.test(u)?o.push(`<link ${u}>`):o.push(`<link rel="icon" ${u}>`)}}),o;if(n==="alternate")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).filter(([d,h])=>h!==void 0).map(([d,h])=>`${d}="${Rt(h)}"`).join(" ");o.push(`<link rel="alternate" ${u}>`)}}),o;let i=(l,f,u="name")=>{if(typeof f=="string"||typeof f=="number"||typeof f=="boolean")o.push(`<meta ${u}="${Rt(l)}" content="${Rt(f)}">`);else if(Array.isArray(f))f.forEach(d=>{if(typeof d=="string"||typeof d=="number"||typeof d=="boolean")o.push(`<meta ${u}="${Rt(l)}" content="${Rt(d)}">`);else if(typeof d=="object"){let h=Object.entries(d).filter(([g,p])=>p!==void 0).map(([g,p])=>`${g}="${Rt(p)}"`).join(" ");o.push(`<meta ${h}>`)}});else if(typeof f=="object"){let d=Object.entries(f).filter(([h,g])=>g!==void 0).map(([h,g])=>`${h}="${Rt(g)}"`).join(" ");o.push(`<meta ${d}>`)}};if(n.startsWith("http-equiv:")){let l=n.replace("http-equiv:","");return i(l,s,"http-equiv"),o}if(n.startsWith("itemprop:")){let l=n.replace("itemprop:","");return i(l,s,"itemprop"),o}let c=["og:","twitter:","fb:","article:","profile:","book:","business:","music:","product:","video:","DC:","DCTERMS:"].find(l=>n.startsWith(l));if(c){let l=n.replace(c,"");return i(`${c.replace(":","")}:${l}`,s,c==="twitter:"||c==="DC:"||c==="DCTERMS:"?"name":"property"),o}if(n.startsWith("apple:")||n.startsWith("msapplication:")){let l=n.startsWith("apple:")?"apple-":"msapplication-",f=n.replace(/^apple:|^msapplication:/,"");return i(`${l}${f}`,s,"name"),o}return i(n,s),o},['<meta charset="UTF-8">','<meta name="viewport" content="width=device-width, initial-scale=1">']);return r.push(...hl(t)),r.join(`
32
- `)},$E=t=>typeof t=="string"&&t.length>0&&!t.startsWith("/")&&!t.startsWith("http")});var gl,kh,F_=F(()=>{"use strict";Ot();gl=(t,e)=>(O(e)?e:Object.values(e)).reduce((r,o)=>Math.abs(o-t)<Math.abs(r-t)?o:r),kh=(t,e)=>(t=parseFloat(t),S(e)&&(e=Object.values(e)),gl(t,e))});function nn(t){let e=String(t||"").trim();if(!e)return{owner:N_,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=N_);let n=o?`${r}/${o}`:"";return{owner:r,key:o,full:n}}async function ml(t,e={}){if((e.provider||"kv")==="api")return B_(t,e);let o=await zE(t,e);return o||B_(t,e)}async function zE(t,e={}){let r=e.kvBaseUrl||FE,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 B_(t,e={}){let r=e.apiBaseUrl||NE,{key:o}=nn(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}=nn(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 U_(t,e={}){if(S(t))return t;if(w(t)){let{full:r}=nn(t);if(!r)return null;try{let o=await ml(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 Ch(t,e={}){return!t||!t.length?[]:(await Promise.all(t.map(async o=>{if(Ci(o)){let n=await U_(VE(o),e);return n?{library:n,ignoreList:o.ignoreList}:null}return U_(o,e)}))).filter(Boolean)}var N_,FE,NE,ki,V_,jE,BE,j_,UE,vi,vh,Ci,VE,HE,Ei,H_=F(()=>{"use strict";Ot();N_="system",FE="https://smbls-kv.nika-980.workers.dev",NE="https://api.symbols.app";ki=(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])&&ki(t[n],e[n],r,s):t[n]=e[n])}},V_=(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]=V_(t[i],e,a))}return s},jE=new Set,BE=new Set(["components","pages","functions","snippets","methods"]),j_=(t,e)=>e===""&&BE.has(t),UE=t=>t.replace(/\.js$/iu,""),vi=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=>UE(n.trim())).filter(Boolean).join("/");o&&e.add(o)}return e},vh=(t,e={})=>({library:t,ignoreList:Array.isArray(e.ignoreList)?e.ignoreList:[]}),Ci=t=>S(t)&&Array.isArray(t.ignoreList)&&("library"in t||"key"in t||"name"in t),VE=t=>t.library!==void 0?t.library:t.key??t.name,HE=(t,e,r)=>{let o=vi(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")ki(t[s],e[s],n,s);else for(let i in e[s])n.has(`${s}/${i}`)||(i in t[s]?j_(s,t[s][i])&&!j_(s,e[s][i])&&(t[s][i]=e[s][i]):t[s][i]=e[s][i]);else s in t||(t[s]=V_(e[s],n,s))},Ei=(t,e)=>{if(!(!e||!e.length))for(let r=0;r<e.length;r++){let o=e[r],n=jE;Ci(o)&&(n=vi(o.ignoreList),o=o.library),S(o)&&HE(t,o,n)}}});var Eh,Ah,Th,Ai,Oh,Ti,Rh,ao,z_=F(()=>{"use strict";Ot();Eh=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},Ah=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)}},Th=t=>t.replace(/[^a-zA-Z0-9_]/g,""),Ai=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,"")),Oh=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),Ti=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),Rh=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},ao=t=>{if(O(t))return t;if(w(t))return t.split(" ");if(S(t))return Object.values(t);if(Me(t))return[t]}});var Ph,W_=F(()=>{"use strict";Ph=()=>{let t=document.styleSheets[0],e="";if(t)try{let r=t.cssRules||t.rules;for(let o=0;o<r.length;o++)e+=r[o].cssText}catch(r){console.error("Unable to access CSS rules. This may be due to CORS restrictions:",r)}else console.log("No stylesheets found in document.styleSheets[0].");return e}});var Kt,sn,Oi,Ri,q_=F(()=>{"use strict";Kt=t=>{let e=t&&t.src;if(!e||typeof e!="string")return null;let r=t.context;if(!r)return null;let o=r.assets&&r.assets[e]||r.files&&r.files[e];return o?typeof o=="string"?{src:o,type:null,variants:null}:typeof o=="object"&&typeof o.src=="string"?o:null:null},sn=(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(", ")},Oi=t=>{if(!t||!Array.isArray(t.variants))return"";let e=t.variants.filter(r=>r.format===t.type);return sn(e,{keepOneX:!1})},Ri=(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:sn(c,{keepOneX:!0})}});let n=r.get(t.type)||[],s=sn(n,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...o,{tag:"img",attr:i}]}});var yl={};P(yl,{CDN_PROVIDERS:()=>fe,DOMQL_EVENTS:()=>Pd,DOMQ_PROPERTIES:()=>mr,ENV:()=>Kd,HTML_TAGS:()=>Ko,METHODS:()=>Vo,METHODS_EXL:()=>As,NODE_ENV:()=>ke,OPTIONS:()=>Xs,PACKAGE_MANAGER_TO_CDN:()=>vr,PARSED_DOMQ_PROPERTIES:()=>Es,PROPS_METHODS:()=>yr,STATE_METHODS:()=>Qr,STATE_PROPERTIES:()=>Rd,SVG_TAGS:()=>Kb,TYPES:()=>_s,UNIVERSAL_RESERVED_KEYS:()=>ul,addCaching:()=>Kc,addContext:()=>qc,addExtend:()=>bp,addExtends:()=>qt,addItemAfterEveryElement:()=>yd,addProtoToArray:()=>Ss,addRef:()=>Hc,applyDependentState:()=>Fp,applyEvent:()=>Qc,applyEventUpdate:()=>tl,applyExtends:()=>Xb,applyProps:()=>zs,arrayContainsOtherArray:()=>fd,arraysEqual:()=>_d,arrayzeValue:()=>ao,buildImgSrcset:()=>Oi,buildSourcesAndImg:()=>Ri,cache:()=>Vp,call:()=>sh,captureSnapshot:()=>ah,checkForStateTypes:()=>Dp,checkIfInherits:()=>Zc,checkIfStringIsInArray:()=>Sd,clone:()=>Dd,cloneAndMergeArrayExtend:()=>Ms,cloneFunction:()=>rp,concatAddExtends:()=>gp,copyJavaScriptToClipboard:()=>Ah,copyStringToClipboard:()=>Eh,createBasedOnType:()=>Vc,createElement:()=>Ip,createElementExtends:()=>Rc,createExtends:()=>Ns,createExtendsFromKeys:()=>Go,createExtendsStack:()=>$c,createIfConditionFlag:()=>op,createInheritedState:()=>$p,createKey:()=>$s,createNestedObject:()=>Bd,createNestedObjectByKeyPath:()=>Mp,createObjectWithoutPrototype:()=>kc,createParent:()=>zc,createPath:()=>Wc,createProps:()=>Ws,createPropsStack:()=>Bc,createRoot:()=>Pp,createScope:()=>jp,createSnapshotId:()=>Ds,customDecodeURIComponent:()=>Od,customEncodeURIComponent:()=>Td,cutArrayAfterValue:()=>gd,cutArrayBeforeValue:()=>hd,debounce:()=>Ls,debounceOnContext:()=>Qd,decodeNewlines:()=>Ad,deepClone:()=>dt,deepContains:()=>Nd,deepDefaults:()=>ki,deepDestringifyFunctions:()=>ce,deepExtend:()=>Oc,deepMerge:()=>st,deepMergeExtends:()=>Ne,deepStringifyFunctions:()=>Ts,defineSetter:()=>oh,destringifyGlobalScope:()=>Rs,detectHeightOnInit:()=>dh,detectInfiniteLoop:()=>zd,document:()=>Q,encodeNewlines:()=>Ed,error:()=>so,excludeKeysFromObject:()=>qd,exec:()=>ft,extendCachedRegistry:()=>mp,extendStackRegistry:()=>js,extractArrayExtend:()=>Us,fetchLibraryData:()=>ml,fibonacciNumberByIndex:()=>ph,filterArrays:()=>xd,filterArraysFast:()=>wd,finalizeExtends:()=>Lc,findClosestNumber:()=>gl,findClosestNumberInFactory:()=>kh,findInheritedState:()=>Jc,findKeyPosition:()=>vd,flattenExtend:()=>Yo,formatDate:()=>uh,generateHash:()=>Ec,generateHeadArrayTags:()=>hl,generateKey:()=>Is,generateMetaTags:()=>wh,get:()=>th,getCDNDirUrl:()=>dl,getCDNUrl:()=>Ce,getCapitalCaseKeys:()=>wp,getCdnProviderFromConfig:()=>tn,getChildStateInKey:()=>Xc,getChildren:()=>ai,getContext:()=>hi,getCookie:()=>cp,getDB:()=>_i,getEmotionStylesheet:()=>Ph,getExtendsInElement:()=>_p,getExtendsStack:()=>Fs,getExtendsStackRegistry:()=>Tc,getFrequencyInArray:()=>ud,getHashedExtend:()=>Bs,getImportMapScript:()=>fh,getInObjectByPath:()=>Hd,getLocalStorage:()=>fp,getNev:()=>Jd,getPageMetadata:()=>Sh,getParentStateInKey:()=>Yc,getPath:()=>ci,getQuery:()=>xi,getRef:()=>rh,getRoot:()=>ui,getRootContext:()=>pi,getRootData:()=>di,getRootState:()=>fi,getRootStateInKey:()=>Gc,getSpreadChildren:()=>Sp,global:()=>ad,hasFunction:()=>Fe,hasHandlerPlugin:()=>zo,hasOwnProperty:()=>Ld,hashContent:()=>on,inheritChildExtends:()=>Ic,inheritChildPropsExtends:()=>Pc,inheritParentProps:()=>qs,inheritRecursiveChildExtends:()=>Dc,initProps:()=>Tp,is:()=>zt,isArray:()=>O,isBoolean:()=>bc,isContextComponent:()=>kp,isCyclic:()=>Wd,isDOMNode:()=>Ht,isDate:()=>xc,isDefined:()=>bt,isDevelopment:()=>_r,isEmpty:()=>wc,isEmptyObject:()=>Md,isEqualDeep:()=>Sc,isFunction:()=>A,isHtmlElement:()=>ys,isLocal:()=>Xd,isLoudDevRuntime:()=>Pt,isMalformedDependency:()=>en,isMethod:()=>ih,isMobile:()=>ip,isNode:()=>Je,isNot:()=>ld,isNotProduction:()=>ro,isNull:()=>_c,isNumber:()=>Me,isObject:()=>S,isObjectLike:()=>H,isPhoto:()=>hh,isProduction:()=>br,isStaging:()=>Yd,isState:()=>Lp,isString:()=>w,isStringFunction:()=>ep,isTest:()=>Cc,isTesting:()=>Gd,isUndefined:()=>Tt,isUniversallyReservedKey:()=>ch,isUnresolvableDependency:()=>io,isValidHtmlTag:()=>dp,isWrappedLibrary:()=>Ci,joinArrays:()=>jo,jointStacks:()=>yp,keys:()=>ll,loadCssFile:()=>bh,loadJavascript:()=>_h,loadJavascriptFile:()=>gh,loadJavascriptFileEmbedSync:()=>yh,loadJavascriptFileSync:()=>mh,loadRemoteCSS:()=>xh,loadRemoteScript:()=>rn,log:()=>nh,logGroupIf:()=>sp,logIf:()=>np,lookdown:()=>Zp,lookdownAll:()=>Qp,lookup:()=>Jp,lowercaseFirstLetter:()=>Zr,makeObjectWithoutPrototype:()=>Fd,map:()=>Id,mapStringsWithContextComponents:()=>Vs,matchesComponentNaming:()=>je,memoize:()=>tp,merge:()=>gt,mergeSharedLibraries:()=>Ei,nextElement:()=>mi,normalizeIgnoreList:()=>vi,normalizeLibraryKey:()=>nn,objectToString:()=>Os,objectizeStringProperty:()=>Hs,overwrite:()=>Ps,overwriteDeep:()=>Wt,overwriteShallow:()=>eo,overwriteState:()=>Np,parse:()=>fl,parseDeep:()=>si,pickupElementFromProps:()=>Nc,pickupPropsFromElement:()=>Fc,previousElement:()=>yi,propExists:()=>Ep,propertizeElement:()=>jc,propertizeUpdate:()=>Cp,remove:()=>S_,removeChars:()=>Th,removeCookie:()=>lp,removeDuplicateProps:()=>Gs,removeDuplicatesInArray:()=>Bo,removeFromArray:()=>dd,removeFromObject:()=>jd,removeNestedKeyByPath:()=>Ud,removeValueFromArray:()=>ws,removeValueFromArrayAll:()=>md,reorderArrayByValues:()=>bd,replaceLiteralsWithObjectFields:()=>Jr,replaceOctalEscapeSequences:()=>Cd,resolveAsset:()=>Kt,resolveHandler:()=>Wo,resolveSharedLibraries:()=>Ch,returnValueAsText:()=>Uc,runPluginHook:()=>At,self:()=>cd,setActiveRootState:()=>li,setCookie:()=>ap,setHashedExtend:()=>Ac,setInObjectByPath:()=>Vd,setLocalStorage:()=>up,setNodeStyles:()=>cl,setProps:()=>eh,setPropsPrototype:()=>Ks,sharedLibrary:()=>vh,splitPackageSpecifier:()=>wi,spotByPath:()=>ii,srcsetFor:()=>sn,stringIncludesAny:()=>vs,stringToObject:()=>$d,stripVersionRangePrefix:()=>Si,swapItemsInArray:()=>pd,syncProps:()=>Ys,toCamelCase:()=>Ai,toDashCase:()=>Ti,toDescriptionCase:()=>Rh,toTitleCase:()=>Oh,toggleFullscreen:()=>lh,triggerEventOn:()=>xr,triggerEventOnUpdate:()=>Bp,trimStringFromSymbols:()=>kd,unstackArrayOfObjects:()=>xs,update:()=>Ap,updateProps:()=>Op,variables:()=>bi,verbose:()=>Jo,warn:()=>gi,window:()=>v});var R=F(()=>{"use strict";vc();Zd();Ot();Ze();qo();Uo();bs();zb();Wb();Cs();ms();qb();pp();xp();Rp();Mc();r_();o_();Ho();n_();C_();Hp();E_();Up();A_();T_();O_();R_();P_();I_();D_();$_();M_();F_();H_();z_();W_();q_()});var Cv=Vu((KU,vv)=>{var es=1e3,rs=es*60,os=rs*60,Ro=os*24,jR=Ro*7,BR=Ro*365.25;vv.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return UR(t);if(r==="number"&&isFinite(t))return e.long?HR(t):VR(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function UR(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*BR;case"weeks":case"week":case"w":return r*jR;case"days":case"day":case"d":return r*Ro;case"hours":case"hour":case"hrs":case"hr":case"h":return r*os;case"minutes":case"minute":case"mins":case"min":case"m":return r*rs;case"seconds":case"second":case"secs":case"sec":case"s":return r*es;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function VR(t){var e=Math.abs(t);return e>=Ro?Math.round(t/Ro)+"d":e>=os?Math.round(t/os)+"h":e>=rs?Math.round(t/rs)+"m":e>=es?Math.round(t/es)+"s":t+"ms"}function HR(t){var e=Math.abs(t);return e>=Ro?pu(t,e,Ro,"day"):e>=os?pu(t,e,os,"hour"):e>=rs?pu(t,e,rs,"minute"):e>=es?pu(t,e,es,"second"):t+" ms"}function pu(t,e,r,o){var n=e>=r*1.5;return Math.round(t/r)+" "+o+(n?"s":"")}});var Av=Vu((GU,Ev)=>{function zR(t){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=n,r.enabled=a,r.humanize=Cv(),r.destroy=l,Object.keys(t).forEach(f=>{r[f]=t[f]}),r.names=[],r.skips=[],r.formatters={};function e(f){let u=0;for(let d=0;d<f.length;d++)u=(u<<5)-u+f.charCodeAt(d),u|=0;return r.colors[Math.abs(u)%r.colors.length]}r.selectColor=e;function r(f){let u,d=null,h,g;function p(...m){if(!p.enabled)return;let b=p,_=Number(new Date),y=_-(u||_);b.diff=y,b.prev=u,b.curr=_,u=_,m[0]=r.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let x=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(E,T)=>{if(E==="%%")return"%";x++;let $=r.formatters[T];if(typeof $=="function"){let D=m[x];E=$.call(b,D),m.splice(x,1),x--}return E}),r.formatArgs.call(b,m),(b.log||r.log).apply(b,m)}return p.namespace=f,p.useColors=r.useColors(),p.color=r.selectColor(f),p.extend=o,p.destroy=r.destroy,Object.defineProperty(p,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,g=r.enabled(f)),g),set:m=>{d=m}}),typeof r.init=="function"&&r.init(p),p}function o(f,u){let d=r(this.namespace+(typeof u>"u"?":":u)+f);return d.log=this.log,d}function n(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];let u=(typeof f=="string"?f:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of u)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function s(f,u){let d=0,h=0,g=-1,p=0;for(;d<f.length;)if(h<u.length&&(u[h]===f[d]||u[h]==="*"))u[h]==="*"?(g=h,p=d,h++):(d++,h++);else if(g!==-1)h=g+1,p++,d=p;else return!1;for(;h<u.length&&u[h]==="*";)h++;return h===u.length}function i(){let f=[...r.names,...r.skips.map(u=>"-"+u)].join(",");return r.enable(""),f}function a(f){for(let u of r.skips)if(s(f,u))return!1;for(let u of r.names)if(s(f,u))return!0;return!1}function c(f){return f instanceof Error?f.stack||f.message:f}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Ev.exports=zR});var Tv=Vu((Qt,hu)=>{Qt.formatArgs=qR;Qt.save=KR;Qt.load=GR;Qt.useColors=WR;Qt.storage=YR();Qt.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Qt.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function WR(){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 qR(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+hu.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(r++,n==="%c"&&(o=r))}),t.splice(o,0,e)}Qt.log=console.debug||console.log||(()=>{});function KR(t){try{t?Qt.storage.setItem("debug",t):Qt.storage.removeItem("debug")}catch{}}function GR(){let t;try{t=Qt.storage.getItem("debug")||Qt.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function YR(){try{return localStorage}catch{}}hu.exports=Av()(Qt);var{formatters:XR}=hu.exports;XR.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var vb={};P(vb,{ANIMATION_PROPS:()=>Vg,ARIA_ROLES:()=>ZA,ATTR_TRANSFORMS:()=>Fg,BLOCK_PROPS:()=>Hg,CDN_PROVIDERS:()=>fe,CONFIG:()=>po,CSS_NAMED_COLOR_HEX:()=>bl,CSS_NATIVE_COLOR_REGEX:()=>te,CSS_PROPS_REGISTRY:()=>xt,CSS_UNITS:()=>No,DEFAULT_CONFIG:()=>Ca,DEFAULT_CSS_PROPERTIES_LIST:()=>vt,DELEGATED_EVENTS:()=>Tn,DESIGN_SYSTEM_OPTIONS:()=>yy,DOMQL_EVENTS:()=>Pd,DOMQ_PROPERTIES:()=>mr,DOM_EVENTS:()=>$x,ENV:()=>Kd,FACTORY:()=>pe,FLEX_PROPS:()=>Xg,FONT_PROPS:()=>zg,GRID_PROPS:()=>Jg,HOST_REGISTERED_PACKAGES:()=>$k,HTML_ATTRIBUTES:()=>uf,HTML_TAGS:()=>Ko,LIFECYCLE_EVENTS:()=>Dr,METHODS:()=>Vo,METHODS_EXL:()=>As,MISC_PROPS:()=>Wg,MIXINS:()=>af,NODE_ENV:()=>ke,OPTIONS:()=>Xs,PACKAGE_MANAGER_TO_CDN:()=>vr,PARSED_DOMQ_PROPERTIES:()=>Es,POSITION_PROPS:()=>qg,PROPS_METHODS:()=>yr,REGISTRY:()=>Nt,RESERVED_STORE_METHODS:()=>Lb,ROUTER_OPTIONS:()=>Df,SIGNAL_ENGINE_KEY:()=>Mo,SIGNAL_INSTANCES_KEY:()=>$o,STANDARD_SCHEME_QUERIES:()=>Ul,STATE_PROPERTIES:()=>Rd,STORE_METHOD_NAMES:()=>$b,SVG_TAGS:()=>En,THEME_PROPS:()=>Yg,TIMING_PROPS:()=>ya,TYPES:()=>_s,UNIVERSAL_RESERVED_KEYS:()=>ul,VALUE_TRANSFORMERS:()=>Jl,VERSION:()=>Fb,__resetSignalEngine:()=>nd,__resetSignalInstances:()=>od,__resetStateShadowWarnings:()=>Mb,activateConfig:()=>J_,addCaching:()=>Kc,addContext:()=>qc,addDelegatedEvent:()=>ga,addExtend:()=>bp,addExtends:()=>qt,addItemAfterEveryElement:()=>yd,addMethods:()=>$n,addProtoToArray:()=>Ss,addRef:()=>Hc,animation:()=>rg,appendSVGSprite:()=>la,appendSvgIconsSprite:()=>yo,applyAttrTransforms:()=>jg,applyCSS:()=>fy,applyDependentState:()=>Fp,applyDocument:()=>ca,applyEvent:()=>Qc,applyEventUpdate:()=>tl,applyExtends:()=>Rn,applyHeadings:()=>Wl,applyInitialState:()=>xf,applyMediaSequenceVars:()=>Er,applyProps:()=>zs,applyReset:()=>fa,applySequenceGlobalVars:()=>qi,applySequenceVars:()=>or,applySpacingSequence:()=>Yi,applyStateMethods:()=>ie,applyTimingSequence:()=>aa,applyTrueProps:()=>Qg,applyTypographySequence:()=>na,arrayContainsOtherArray:()=>fd,arraysEqual:()=>_d,arrayzeValue:()=>ao,assertEmitIntegrity:()=>Ag,batch:()=>hc,breakpoints:()=>tg,buildImgSrcset:()=>Oi,buildSourcesAndImg:()=>Ri,buildThemeVarStyles:()=>Vn,cache:()=>Vp,cacheNode:()=>Ir,call:()=>sh,callStateMethod:()=>_a,camelToAttr:()=>Lr,camelToLowerAttr:()=>Lx,captureSnapshot:()=>ah,changeGlobalTheme:()=>Zl,changeLightness:()=>Fh,checkAttributeByTagName:()=>Mr,checkEventFunctions:()=>Ng,checkForStateTypes:()=>Dp,checkIfBoxSize:()=>Gi,checkIfInherits:()=>Zc,checkIfStringIsInArray:()=>Sd,class:()=>ag,clone:()=>Dd,cloneAndMergeArrayExtend:()=>Ms,cloneFunction:()=>rp,color:()=>Kh,colorStringToRgbaArray:()=>ue,components:()=>Bn,compositeOverBackdrop:()=>lo,concatAddExtends:()=>gp,contrastRatio:()=>ln,convertSvgToSymbol:()=>Ki,copyJavaScriptToClipboard:()=>Ah,copyStringToClipboard:()=>Eh,create:()=>kb,createAsync:()=>NP,createBasedOnType:()=>Vc,createComputed:()=>Pb,createConfig:()=>ji,createDefine:()=>j0,createEffect:()=>Z,createElement:()=>Ip,createElementExtends:()=>Rc,createExtends:()=>Ns,createExtendsFromKeys:()=>Go,createExtendsStack:()=>$c,createHTMLNode:()=>Cn,createIfConditionFlag:()=>op,createInheritedState:()=>$p,createKey:()=>$s,createNestedObject:()=>Bd,createNestedObjectByKeyPath:()=>Mp,createObjectWithoutPrototype:()=>kc,createParent:()=>zc,createPath:()=>Wc,createProps:()=>Ws,createPropsStack:()=>Bc,createRoot:()=>Pp,createScope:()=>jp,createScopeStore:()=>mc,createSignal:()=>hs,createSkeleton:()=>BP,createSnapshotId:()=>Ds,createState:()=>nm,createStore:()=>Ge,createSync:()=>jP,css:()=>be,cssMediaVars:()=>Ml,cssVars:()=>Ll,customDecodeURIComponent:()=>Od,customEncodeURIComponent:()=>Td,cutArrayAfterValue:()=>gd,cutArrayBeforeValue:()=>hd,debounce:()=>Ls,debounceOnContext:()=>Qd,decodeNewlines:()=>Ad,deepClone:()=>dt,deepContains:()=>Nd,deepDefaults:()=>ki,deepDestringifyFunctions:()=>ce,deepExtend:()=>Oc,deepMerge:()=>st,deepMergeExtends:()=>Ne,deepStringifyFunctions:()=>Ts,defaultDefine:()=>zn,defineResolvedThemeSignal:()=>hn,defineSetter:()=>oh,defineThemeSignal:()=>pn,destringifyGlobalScope:()=>Rs,destroy:()=>Pa,detectHeightOnInit:()=>dh,detectInfiniteLoop:()=>zd,detectTag:()=>Pr,devices:()=>eg,dispose:()=>Fr,encodeNewlines:()=>Ed,error:()=>so,excludeKeysFromObject:()=>qd,exec:()=>ft,executeAttr:()=>rT,exetuteClassPerComponent:()=>IT,extendCachedRegistry:()=>mp,extendStackRegistry:()=>js,extractArrayExtend:()=>Us,extractConditionalAttrs:()=>sT,fetchLibraryData:()=>ml,fibonacciNumberByIndex:()=>ph,filterArrays:()=>xd,filterArraysFast:()=>wd,filterAttributesByTagName:()=>eT,finalizeExtends:()=>Lc,findClosestNumber:()=>gl,findClosestNumberInFactory:()=>kh,findHeadingLetter:()=>Bl,findHeadings:()=>Wi,findInheritedState:()=>Jc,findKeyPosition:()=>vd,flattenExtend:()=>Yo,font:()=>Uh,fontFace:()=>zh,fontFamily:()=>Vh,fontFamilyTypes:()=>Hh,formatDate:()=>uh,generateHash:()=>Ec,generateHeadArrayTags:()=>hl,generateKey:()=>Is,generateMetaTags:()=>wh,generateSequence:()=>Yt,generateSequencePosition:()=>dg,generateSprite:()=>gn,generateSubSequence:()=>Hi,get:()=>th,getActiveConfig:()=>C,getActiveDocument:()=>of,getActiveLang:()=>qn,getCDNDirUrl:()=>dl,getCDNUrl:()=>Ce,getCacheSize:()=>Og,getCapitalCaseKeys:()=>wp,getCdnProviderFromConfig:()=>tn,getChildStateInKey:()=>Xc,getChildren:()=>ai,getColor:()=>et,getColorShade:()=>kl,getContext:()=>hi,getCookie:()=>cp,getDB:()=>_i,getDefaultOrFirstKey:()=>fo,getEmitStats:()=>nf,getEmotionStylesheet:()=>Ph,getExtendsInElement:()=>_p,getExtendsStack:()=>Fs,getExtendsStackRegistry:()=>Tc,getFnPrefixAndValue:()=>rr,getFontFace:()=>jh,getFontFaceEach:()=>uo,getFontFaceEachString:()=>Pl,getFontFaceString:()=>Li,getFontFamily:()=>oa,getFontFormat:()=>Ol,getFontSizeByKey:()=>sa,getFrequencyInArray:()=>ud,getHashedExtend:()=>Bs,getImportMapScript:()=>fh,getInObjectByPath:()=>Hd,getLanguages:()=>$a,getLocalStateLang:()=>ja,getLocalStorage:()=>fp,getMediaColor:()=>It,getMediaTheme:()=>ge,getNev:()=>Jd,getObserver:()=>gc,getPageMetadata:()=>Sh,getParentStateInKey:()=>Yc,getPath:()=>ci,getQuery:()=>xi,getRef:()=>rh,getResolvedThemeSignal:()=>X_,getRgbTone:()=>Ue,getRoot:()=>ui,getRootContext:()=>pi,getRootData:()=>di,getRootState:()=>fi,getRootStateInKey:()=>Gc,getSafeInk:()=>Vl,getSafeInkInfo:()=>hg,getSequenceValue:()=>zi,getSequenceValueBySymbols:()=>jl,getSequenceValuePropertyPair:()=>He,getShadow:()=>Ji,getShapeByKey:()=>ia,getSignals:()=>Db,getSpacingBasedOnRatio:()=>Ae,getSpacingByKey:()=>St,getSpreadChildren:()=>Sp,getSubratio:()=>Vi,getSubratioDifference:()=>Ui,getSystemGlobalTheme:()=>_e,getTheme:()=>Qi,getThemeSignal:()=>Y_,getTimingByKey:()=>re,getTimingFunction:()=>me,global:()=>ad,gradient:()=>Gh,grid:()=>ig,hasFunction:()=>Fe,hasHandlerPlugin:()=>zo,hasOwnProperty:()=>Ld,hashContent:()=>on,hexToRgb:()=>Dh,hexToRgbArray:()=>_l,hexToRgba:()=>Lh,hslToRgb:()=>Sl,icons:()=>Jh,inheritChildExtends:()=>Ic,inheritChildPropsExtends:()=>Pc,inheritParentProps:()=>qs,inheritRecursiveChildExtends:()=>Dc,init:()=>cr,initPolyglot:()=>Mf,initProps:()=>Tp,injectGlobal:()=>kt,is:()=>zt,isArray:()=>O,isBoolean:()=>bc,isCSSVar:()=>mt,isContextComponent:()=>kp,isCyclic:()=>Wd,isDOMNode:()=>Ht,isDate:()=>xc,isDefined:()=>bt,isDevelopment:()=>_r,isDomDocument:()=>Ye,isEmpty:()=>wc,isEmptyObject:()=>Md,isEnumeratedTrueFalseAttr:()=>sr,isEqualDeep:()=>Sc,isFunction:()=>A,isGoogleFontsUrl:()=>fn,isHostObject:()=>Xe,isHtmlElement:()=>ys,isLocal:()=>Xd,isLoudDevRuntime:()=>Pt,isMalformedDependency:()=>en,isMethod:()=>ih,isMobile:()=>ip,isNode:()=>Je,isNot:()=>ld,isNotProduction:()=>ro,isNull:()=>_c,isNumber:()=>Me,isObject:()=>S,isObjectLike:()=>H,isPhoto:()=>hh,isProduction:()=>br,isRawUnitValue:()=>gs,isResolvedColor:()=>Ee,isScalingUnit:()=>Xr,isStaging:()=>Yd,isState:()=>Lp,isStore:()=>yt,isString:()=>w,isStringFunction:()=>ep,isSvgTag:()=>An,isTest:()=>Cc,isTesting:()=>Gd,isTracking:()=>im,isUndefined:()=>Tt,isUniversallyReservedKey:()=>ch,isUnresolvableDependency:()=>io,isValidHtmlTag:()=>dp,isValidTag:()=>vn,isWasmLoaded:()=>C0,isWrappedLibrary:()=>Ci,isWritableFamilyBucket:()=>id,joinArrays:()=>jo,jointStacks:()=>yp,keyframes:()=>kn,keys:()=>ll,linearChannelToSrgb:()=>El,loadCssFile:()=>bh,loadJavascript:()=>_h,loadJavascriptFile:()=>gh,loadJavascriptFileEmbedSync:()=>yh,loadJavascriptFileSync:()=>mh,loadRemoteCSS:()=>xh,loadRemoteScript:()=>rn,loadTranslations:()=>Ma,loadWasm:()=>v0,log:()=>nh,logGroupIf:()=>sp,logIf:()=>np,lookdown:()=>Zp,lookdownAll:()=>Qp,lookup:()=>Jp,lowercaseFirstLetter:()=>Zr,makeObjectWithoutPrototype:()=>Fd,map:()=>Id,mapStringsWithContextComponents:()=>Vs,matchesComponentNaming:()=>je,media:()=>Wh,memoize:()=>tp,merge:()=>gt,mergeSharedLibraries:()=>Ei,mixTwoColors:()=>Ih,mixTwoRgb:()=>Mh,mixTwoRgba:()=>vl,nextElement:()=>mi,normalizeIgnoreList:()=>vi,normalizeLibraryKey:()=>nn,numToLetterMap:()=>Ve,objectToString:()=>Os,objectizeStringProperty:()=>Hs,oklabToLinearSrgb:()=>Al,oklabToOklch:()=>Ii,oklchToGamutSafeSrgb:()=>Di,oklchToOklab:()=>Tl,opacify:()=>cn,overwrite:()=>Ps,overwriteDeep:()=>Wt,overwriteShallow:()=>eo,overwriteState:()=>Np,parkHostObject:()=>gr,parse:()=>fl,parseColorToken:()=>Gt,parseDeep:()=>si,pickupElementFromProps:()=>Nc,pickupPropsFromElement:()=>Fc,polyglotFunctions:()=>Ya,polyglotPlugin:()=>Kn,popConfig:()=>tt,popStaticCssPass:()=>Gg,previousElement:()=>yi,propExists:()=>Ep,propertizeElement:()=>jc,propertizeUpdate:()=>Cp,pushConfig:()=>it,pushStaticCssPass:()=>Kg,refreshContextProto:()=>gf,registerEvent:()=>On,registerHostPackages:()=>Lk,registerSignalInstance:()=>Lo,reinit:()=>ly,relativeLuminance:()=>co,remove:()=>Dn,removeChars:()=>Th,removeCookie:()=>lp,removeDelegatedEvent:()=>ma,removeDuplicateProps:()=>Gs,removeDuplicatesInArray:()=>Bo,removeFromArray:()=>dd,removeFromObject:()=>jd,removeNestedKeyByPath:()=>Ud,removeValueFromArray:()=>ws,removeValueFromArrayAll:()=>md,reorderArrayByValues:()=>bd,replaceLiteralsWithObjectFields:()=>Jr,replaceOctalEscapeSequences:()=>Cd,resetEmitStats:()=>Eg,resolveAsset:()=>Kt,resolveBorderValue:()=>ee,resolveColorRgb:()=>ho,resolveColorsInGradient:()=>da,resolveConfigDocument:()=>Fo,resolveFileSource:()=>Mg,resolveFileUrl:()=>de,resolveHandler:()=>Wo,resolvePropValue:()=>$r,resolveShadowValue:()=>go,resolveSharedLibraries:()=>Ch,returnSubThemeOrDefault:()=>Nh,returnValueAsText:()=>Uc,rgbArrayToHex:()=>xl,rgbToHSL:()=>wl,rgbToHex:()=>$h,runPluginHook:()=>At,runThroughMedia:()=>zl,scratchDefaultConfig:()=>dn,scratchSystem:()=>_n,scratchUtils:()=>Ar,self:()=>cd,semanticIcons:()=>Zh,sequence:()=>er,serializeAttrValue:()=>We,set:()=>bo,setActiveConfig:()=>Fl,setActiveDocument:()=>Cg,setActiveRootState:()=>li,setAdaptiveSchemeVar:()=>Or,setClass:()=>U1,setClassname:()=>DT,setColor:()=>Tr,setCookie:()=>ap,setCssEngineHook:()=>Pf,setCustomFont:()=>$i,setCustomFontMedia:()=>Cr,setEach:()=>wg,setFont:()=>ra,setFontFamily:()=>yn,setFontImport:()=>un,setGradient:()=>mn,setHashedExtend:()=>Ac,setInCustomFontMedia:()=>Rl,setInObjectByPath:()=>Vd,setLang:()=>Fa,setLocalStorage:()=>up,setMediaTheme:()=>ea,setNodeStyles:()=>cl,setObserver:()=>Ib,setProps:()=>eh,setPropsPrototype:()=>Ks,setSVG:()=>bn,setScalingVar:()=>Bi,setShadow:()=>Rr,setSubScalingVar:()=>Nl,setSvgIcon:()=>mo,setTheme:()=>ta,setValue:()=>xg,setVariables:()=>pg,setWasmEngine:()=>ha,shadow:()=>Xh,shape:()=>fg,sharedLibrary:()=>vh,sizes:()=>lg,spacing:()=>qh,splitPackageSpecifier:()=>wi,splitSpacedValue:()=>Xi,splitTopLevelCommas:()=>tr,splitTransition:()=>Xl,spotByPath:()=>ii,srcsetFor:()=>sn,srgbChannelToLinear:()=>Cl,srgbToOklab:()=>Pi,stringIncludesAny:()=>vs,stringToObject:()=>$d,stripVersionRangePrefix:()=>Si,svg:()=>og,svgData:()=>ng,swapItemsInArray:()=>pd,syncProps:()=>Ys,templates:()=>sg,theme:()=>Yh,timing:()=>Qh,toCamel:()=>Ni,toCamelCase:()=>Ai,toDashCase:()=>Ti,toDescriptionCase:()=>Rh,toLinearChannel:()=>an,toTitleCase:()=>Oh,toggleFullscreen:()=>lh,transformBackgroundImage:()=>Gl,transformBorder:()=>ze,transformBorderRadius:()=>nr,transformBoxShadow:()=>ua,transformClassname:()=>zx,transformDuration:()=>pa,transformShadow:()=>Kl,transformSize:()=>_t,transformSizeRatio:()=>N,transformTextStroke:()=>ql,transformTransition:()=>_g,transformersByPrefix:()=>tm,transfromGap:()=>Yl,translate:()=>La,triggerEventOn:()=>xr,triggerEventOnUpdate:()=>Bp,trimStringFromSymbols:()=>kd,typography:()=>Mi,unit:()=>Bh,unstackArrayOfObjects:()=>xs,update:()=>Pn,updateProps:()=>Op,updateVars:()=>B1,upsertTranslation:()=>Na,useCssInProps:()=>se,useHostState:()=>sm,usePropsAsCSS:()=>Vx,useSelectorsAsCSS:()=>Hx,variables:()=>bi,vars:()=>cg,verbose:()=>Jo,warn:()=>gi,warnStateKeyShadowsMethod:()=>yc,window:()=>v,wrapHoverRule:()=>Te});module.exports=SC(vb);var sd={};P(sd,{RESERVED_STORE_METHODS:()=>Lb,SIGNAL_ENGINE_KEY:()=>Mo,SIGNAL_INSTANCES_KEY:()=>$o,STORE_METHOD_NAMES:()=>$b,VERSION:()=>Fb,__resetSignalEngine:()=>nd,__resetSignalInstances:()=>od,__resetStateShadowWarnings:()=>Mb,batch:()=>hc,createComputed:()=>Pb,createEffect:()=>Z,createScopeStore:()=>mc,createSignal:()=>hs,createStore:()=>Ge,getObserver:()=>gc,getSignals:()=>Db,isStore:()=>yt,registerSignalInstance:()=>Lo,setObserver:()=>Ib,warnStateKeyShadowsMethod:()=>yc});var Yu={};P(Yu,{WRITE_JOURNAL:()=>fs,batch:()=>ds,createComputed:()=>vC,createEffect:()=>CC,createSignal:()=>$e,getObserver:()=>Ku,journalWrite:()=>us,setObserver:()=>kC});var Vt=null,ac=0,cc=[],Ku=()=>Vt,kC=t=>{Vt=t},lc=0,Hu=[];function $e(t){let e=new Set;function r(){return Vt&&(e.add(Vt),Vt._sources.add(s)),t}function o(i){i!==t&&(t=i,PC(e))}function n(){return t}let s={get:r,set:o,peek:n,_subscribers:e,_type:"signal"};return s}function vC(t){let e,r=!0,o=new Set,n={_sources:new Set,_type:"computed",_subscribers:o,_execute(){qu(n);let s=Vt;Vt=n;try{e=t(),r=!1}finally{Vt=s}},_notify(){r=!0,o.size>0&&Ob(o)},get(){return Vt&&(o.add(Vt),Vt._sources.add(n)),r&&n._execute(),e},peek(){return r&&n._execute(),e}};return n._execute(),n}var Se=new Set,zu=!1,fs=[];function us(t){fs.push(t),fs.length>32&&fs.shift()}function CC(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;qu(o);let n=Vt;Vt=o;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{Vt=n}},_notify(){o._disposed||(ac>0?cc.push(o):lc>0?Hu.push(o):Gu(o))},dispose(){o._disposed=!0,qu(o)}};return o._execute(),o}function ds(t){ac++;try{t()}finally{ac--,ac===0&&RC()}}var Wu=!1,Eb=1e3,EC=8,AC=256,TC=4;function Ab(){return typeof performance<"u"?performance.now():Date.now()}function Gu(t){Se.add(t),!Wu&&(zu||(zu=!0,queueMicrotask(Tb)))}var Do=[];function OC(){if(Se.size===1){let[e]=Se;return Se.clear(),e._disposed?0:(e._execute(),1)}Do.length=0;for(let e of Se)Do.push(e);Se.clear(),Do.sort((e,r)=>e._depth-r._depth);let t=0;for(let e=0;e<Do.length;e++){let r=Do[e];r._disposed||(r._execute(),t++)}return Do.length=0,t}function Tb(t=0,e=0){if(zu=!1,Se.size===0)return;Wu=!0;let r=Ab(),o=!1;try{for(;Se.size>0;){if(++t>Eb){let n=new Map;for(let c of Se){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 fs)i.set(c,(i.get(c)||0)+1);let a=[...i.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", ");console.error("[smbls] reactive effect cascade exceeded",Eb,"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>"),Se.clear();break}if(e+=OC(),Se.size>0&&(e>=AC||t>=TC)&&Ab()-r>EC){o=!0,setTimeout(()=>Tb(t,e),0);break}}}finally{o||(Wu=!1)}}function RC(){for(let t=0;t<cc.length;t++)Gu(cc[t]);cc.length=0}function Ob(t){lc++;try{for(let e of t)e._notify()}finally{if(lc--,lc===0&&Hu.length>0){let e=Hu.splice(0);for(let r=0;r<e.length;r++)Gu(e[r])}}}function PC(t){Ob(t)}function qu(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var rd={};P(rd,{RESERVED_STORE_METHODS:()=>ps,STORE_METHOD_NAMES:()=>ed,__resetStateShadowWarnings:()=>IC,createScopeStore:()=>MC,createStore:()=>fc,getSignals:()=>LC,isStore:()=>$C,warnStateKeyShadowsMethod:()=>td});var Le=Symbol("store"),uc=Symbol("signals"),ed=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],ps=new Set(ed),Qu=new Set,Xu=(t,e)=>t?t+"."+e:String(e);function td(t,e){let r=(e||"")+"::"+t;if(Qu.has(r))return;Qu.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: ${ed.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(n)}function IC(){Qu.clear()}var Ju=t=>!t||typeof t!="object"||Array.isArray(t)||t[Le]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!dc(t),DC=12,dc=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function pc(t,e,r){if(t===e)return!0;if(r>DC)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(!pc(t[o],e[o],r+1))return!1;return!0}if(dc(t)&&dc(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)||!pc(t[s],e[s],r+1))return!1;return!0}return!1}function fc(t,e,r,o){r===void 0&&(r=0),o===void 0&&(o="");let n={},s={},i=e&&e.maxDepth||8;if(t&&typeof t=="object")for(let _ in t){if(_==="__proto__"||!Object.prototype.hasOwnProperty.call(t,_))continue;if(_.startsWith("__")){s[_]=t[_];continue}ps.has(_)&&td(_,o);let y=t[_];r<i&&y&&typeof y=="object"&&!Ju(y)?(s[_]=y,n[_]=$e(fc(y,e,r+1,Xu(o,_)))):(s[_]=y,n[_]=$e(y))}let a=new Proxy(s,{get(_,y){if(y===Le)return!0;if(y===uc)return n;if(y==="__raw")return _;if(y==="$update")return c;if(y==="$parse")return f;if(y==="$clean")return u;if(y==="$keys")return d;if(y==="$values")return h;if(y==="$replace")return g;if(y==="$add")return p;if(y==="$remove")return m;if(y==="$destroy")return b;if(y==="$quietUpdate")return l;if(ps.has(y)&&!Object.prototype.hasOwnProperty.call(n,y))switch(y){case"update":return c;case"parse":return f;case"clean":return u;case"keys":return d;case"values":return h;case"replace":return g;case"add":return p;case"remove":return m;case"destroy":return b;case"quietUpdate":return l}if(y==="__element")return _.__element;if(y==="parent")return _.parent;if(y==="root")return _.root;if(Object.prototype.hasOwnProperty.call(n,y)){let k=n[y].get();if(k!==void 0||!(y!=="root"&&_.root&&_.root!==a))return k}if(_[y]!==void 0)return _[y];let x=typeof y=="string"&&!y.startsWith("__")&&y!=="then"&&y!=="constructor"&&Ku()!=null;if(y!=="root"&&_.root&&_.root!==a){let k=_.root[y];return k===void 0&&x&&!Object.prototype.hasOwnProperty.call(n,y)?(n[y]=$e(void 0),n[y].get()):k}if(x)return n[y]=$e(void 0),n[y].get()},set(_,y,x){if(y==="__proto__")return!1;if(y==="__element"||y==="parent"||y==="root"||typeof y=="string"&&y.startsWith("__")&&!Object.prototype.hasOwnProperty.call(n,y))return _[y]=x,!0;ps.has(y)&&td(y,o);let k=Xu(o,y);if(Object.prototype.hasOwnProperty.call(n,y))if(x&&typeof x=="object"&&!Ju(x)){if(x===_[y])return!0;let E=n[y].peek(),T=E&&E[Le]?E.$parse():E;if(pc(x,T,0))return!0;_[y]=x,us(k),n[y].set(fc(x,e,r+1,k))}else{if(Array.isArray(x)&&x!==_[y]&&Array.isArray(n[y].peek())&&pc(x,n[y].peek(),0))return!0;n[y].peek()!==x&&us(k),_[y]=x,n[y].set(x)}else _[y]=x,x&&typeof x=="object"&&!Ju(x)?n[y]=$e(fc(x,e,r+1,k)):n[y]=$e(x);return!0},has(_,y){return typeof y=="string"&&y.charCodeAt(0)===36&&ps.has(y.slice(1))?!0:y in n||y in _},ownKeys(_){return Object.keys(n)},getOwnPropertyDescriptor(_,y){return y in n?{enumerable:!0,configurable:!0,value:n[y].peek()}:Object.getOwnPropertyDescriptor(_,y)},deleteProperty(_,y){return n[y]&&(n[y].peek()!==void 0&&us(Xu(o,y)),n[y].set(void 0),delete n[y]),delete _[y],!0}});function c(_,y){ds(()=>{for(let k in _)k!=="__proto__"&&(a[k]=_[k])});let x=s.__element;return x&&x.onUpdate&&!y?.quiet&&x.onUpdate(x,a,x.context),a}function l(_){return c(_,{quiet:!0})}function f(_){if(_||(_=new Set),_.has(a))return"[Circular]";_.add(a);let y={};for(let x in n){if(x==="parent"||x==="root"||x.startsWith("__"))continue;let k=n[x].peek();k&&k[Le]?y[x]=k.$parse(_):y[x]=k}return y}function u(){return ds(()=>{for(let _ in n)delete a[_]}),a}function d(){return Object.keys(n)}function h(){return Object.keys(n).map(_=>n[_].peek())}function g(_){return ds(()=>{for(let y in n)y in _||delete a[y];for(let y in _)y!=="__proto__"&&(a[y]=_[y])}),a}function p(_,y){let x=Object.prototype.hasOwnProperty.call(n,_)?n[_].peek():s[_];if(Array.isArray(x))return a[_]=[...x,y],a;if(x&&typeof x=="object"&&!Array.isArray(x)){if(dc(y))x[Le]?x.$update(y):a[_]={...x,...y};else{let k=String(Object.keys(x).length);x[Le]?x.$update({[k]:y}):a[_]={...x,[k]:y}}return a}return a[_]=y,a}function m(_){return delete a[_],a}function b(){u(),s.__element=null,s.parent=null}return a}function $C(t){return t&&t[Le]===!0}function LC(t){return t[uc]}function MC(t,e){let r={},o={};if(t&&typeof t=="object")for(let i in t)o[i]=t[i],r[i]=$e(t[i]);let n=i=>{if(Object.prototype.hasOwnProperty.call(r,i))return r;let a=e;for(;a;){let c=a[uc];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[Le]?a[Zu]:null}return null};return new Proxy(o,{get(i,a){return a===Le?!0:a===uc?r:a===Zu?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]=$e(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[Le]?c[Zu]: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 Zu=Symbol("scope.parent");var Yr="3.14.781";var $o="__SMBLS_SIGNAL_INSTANCES__",Lo=(t,e,r)=>{let o=e||(typeof globalThis<"u"?globalThis:null);if(!o)return null;let n=o[$o]||(o[$o]={versions:[],engines:0,reported:!1});return typeof n.engines!="number"&&(n.engines=n.versions.length),n.versions.push(t||Yr),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},od=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[$o]};var Mo="__SMBLS_SIGNAL_ENGINE__",Rb=(t,e,r)=>{let o=e||Yr,n=r||(typeof globalThis<"u"?globalThis:null);if(!n)return t;let s=n[Mo];return s&&s.engine&&s.version===o?(Lo(o,n,!0),s.engine):(s||(n[Mo]={version:o,engine:t}),Lo(o,n,!1),t)},nd=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[Mo]};var Mt=Rb({...Yu,...rd,VERSION:Yr},Yr),hs=Mt.createSignal,Pb=Mt.createComputed,Z=Mt.createEffect,hc=Mt.batch,gc=Mt.getObserver,Ib=Mt.setObserver,Ge=Mt.createStore,mc=Mt.createScopeStore,yt=Mt.isStore,Db=Mt.getSignals,$b=Mt.STORE_METHOD_NAMES,Lb=Mt.RESERVED_STORE_METHODS,yc=Mt.warnStateKeyShadowsMethod,Mb=Mt.__resetStateShadowWarnings,Fb=Mt.VERSION;var Rg={};P(Rg,{assertEmitIntegrity:()=>Ag,css:()=>be,getActiveDocument:()=>of,getCacheSize:()=>Og,getEmitStats:()=>nf,injectGlobal:()=>kt,keyframes:()=>kn,reset:()=>vx,resetEmitStats:()=>Eg,setActiveDocument:()=>Cg,setWasmEngine:()=>ha,wrapHoverRule:()=>Te});var Sg={};P(Sg,{CONFIG:()=>po,CSS_NAMED_COLOR_HEX:()=>bl,CSS_NATIVE_COLOR_REGEX:()=>te,CSS_UNITS:()=>No,FACTORY:()=>pe,STANDARD_SCHEME_QUERIES:()=>Ul,VALUE_TRANSFORMERS:()=>Jl,activateConfig:()=>J_,animation:()=>rg,appendSVGSprite:()=>la,appendSvgIconsSprite:()=>yo,applyDocument:()=>ca,applyHeadings:()=>Wl,applyMediaSequenceVars:()=>Er,applyReset:()=>fa,applySequenceGlobalVars:()=>qi,applySequenceVars:()=>or,applySpacingSequence:()=>Yi,applyTimingSequence:()=>aa,applyTypographySequence:()=>na,breakpoints:()=>tg,changeGlobalTheme:()=>Zl,changeLightness:()=>Fh,checkIfBoxSize:()=>Gi,class:()=>ag,color:()=>Kh,colorStringToRgbaArray:()=>ue,compositeOverBackdrop:()=>lo,contrastRatio:()=>ln,convertSvgToSymbol:()=>Ki,createConfig:()=>ji,cssMediaVars:()=>Ml,cssVars:()=>Ll,defineResolvedThemeSignal:()=>hn,defineThemeSignal:()=>pn,devices:()=>eg,document:()=>K_,findHeadingLetter:()=>Bl,findHeadings:()=>Wi,font:()=>Uh,fontFace:()=>zh,fontFamily:()=>Vh,fontFamilyTypes:()=>Hh,generateSequence:()=>Yt,generateSequencePosition:()=>dg,generateSprite:()=>gn,generateSubSequence:()=>Hi,getActiveConfig:()=>C,getColor:()=>et,getColorShade:()=>kl,getDefaultOrFirstKey:()=>fo,getFnPrefixAndValue:()=>rr,getFontFace:()=>jh,getFontFaceEach:()=>uo,getFontFaceEachString:()=>Pl,getFontFaceString:()=>Li,getFontFamily:()=>oa,getFontFormat:()=>Ol,getFontSizeByKey:()=>sa,getMediaColor:()=>It,getMediaTheme:()=>ge,getResolvedThemeSignal:()=>X_,getRgbTone:()=>Ue,getSafeInk:()=>Vl,getSafeInkInfo:()=>hg,getSequenceValue:()=>zi,getSequenceValueBySymbols:()=>jl,getSequenceValuePropertyPair:()=>He,getShadow:()=>Ji,getShapeByKey:()=>ia,getSpacingBasedOnRatio:()=>Ae,getSpacingByKey:()=>St,getSubratio:()=>Vi,getSubratioDifference:()=>Ui,getTheme:()=>Qi,getThemeSignal:()=>Y_,getTimingByKey:()=>re,getTimingFunction:()=>me,gradient:()=>Gh,grid:()=>ig,hexToRgb:()=>Dh,hexToRgbArray:()=>_l,hexToRgba:()=>Lh,hslToRgb:()=>Sl,icons:()=>Jh,isCSSVar:()=>mt,isDomDocument:()=>Ye,isGoogleFontsUrl:()=>fn,isHostObject:()=>Xe,isRawUnitValue:()=>gs,isResolvedColor:()=>Ee,isScalingUnit:()=>Xr,isWritableFamilyBucket:()=>id,linearChannelToSrgb:()=>El,media:()=>Wh,mixTwoColors:()=>Ih,mixTwoRgb:()=>Mh,mixTwoRgba:()=>vl,numToLetterMap:()=>Ve,oklabToLinearSrgb:()=>Al,oklabToOklch:()=>Ii,oklchToGamutSafeSrgb:()=>Di,oklchToOklab:()=>Tl,opacify:()=>cn,parkHostObject:()=>gr,parseColorToken:()=>Gt,popConfig:()=>tt,pushConfig:()=>it,relativeLuminance:()=>co,reset:()=>G_,resolveBorderValue:()=>ee,resolveColorRgb:()=>ho,resolveColorsInGradient:()=>da,resolveConfigDocument:()=>Fo,resolveFileUrl:()=>de,resolveShadowValue:()=>go,returnSubThemeOrDefault:()=>Nh,rgbArrayToHex:()=>xl,rgbToHSL:()=>wl,rgbToHex:()=>$h,runThroughMedia:()=>zl,scratchDefaultConfig:()=>dn,scratchSystem:()=>_n,scratchUtils:()=>Ar,semanticIcons:()=>Zh,sequence:()=>er,set:()=>bo,setActiveConfig:()=>Fl,setAdaptiveSchemeVar:()=>Or,setColor:()=>Tr,setCustomFont:()=>$i,setCustomFontMedia:()=>Cr,setEach:()=>wg,setFont:()=>ra,setFontFamily:()=>yn,setFontImport:()=>un,setGradient:()=>mn,setInCustomFontMedia:()=>Rl,setMediaTheme:()=>ea,setSVG:()=>bn,setScalingVar:()=>Bi,setShadow:()=>Rr,setSubScalingVar:()=>Nl,setSvgIcon:()=>mo,setTheme:()=>ta,setValue:()=>xg,setVariables:()=>pg,shadow:()=>Xh,shape:()=>fg,sizes:()=>lg,spacing:()=>qh,splitSpacedValue:()=>Xi,splitTopLevelCommas:()=>tr,splitTransition:()=>Xl,srgbChannelToLinear:()=>Cl,srgbToOklab:()=>Pi,svg:()=>og,svgData:()=>ng,templates:()=>sg,theme:()=>Yh,timing:()=>Qh,toCamel:()=>Ni,toLinearChannel:()=>an,transformBackgroundImage:()=>Gl,transformBorder:()=>ze,transformBorderRadius:()=>nr,transformBoxShadow:()=>ua,transformDuration:()=>pa,transformShadow:()=>Kl,transformSize:()=>_t,transformSizeRatio:()=>N,transformTextStroke:()=>ql,transformTransition:()=>_g,transfromGap:()=>Yl,typography:()=>Mi,unit:()=>Bh,vars:()=>cg});var Ar={};P(Ar,{CSS_NAMED_COLOR_HEX:()=>bl,CSS_NATIVE_COLOR_REGEX:()=>te,CSS_UNITS:()=>No,applyMediaSequenceVars:()=>Er,applySequenceGlobalVars:()=>qi,applySequenceVars:()=>or,changeLightness:()=>Fh,colorStringToRgbaArray:()=>ue,compositeOverBackdrop:()=>lo,contrastRatio:()=>ln,convertSvgToSymbol:()=>Ki,findHeadingLetter:()=>Bl,findHeadings:()=>Wi,generateSequence:()=>Yt,generateSequencePosition:()=>dg,generateSprite:()=>gn,generateSubSequence:()=>Hi,getColorShade:()=>kl,getDefaultOrFirstKey:()=>fo,getFnPrefixAndValue:()=>rr,getFontFace:()=>jh,getFontFaceEach:()=>uo,getFontFaceEachString:()=>Pl,getFontFaceString:()=>Li,getFontFormat:()=>Ol,getRgbTone:()=>Ue,getSequenceValue:()=>zi,getSequenceValueBySymbols:()=>jl,getSequenceValuePropertyPair:()=>He,getSubratio:()=>Vi,getSubratioDifference:()=>Ui,hexToRgb:()=>Dh,hexToRgbArray:()=>_l,hexToRgba:()=>Lh,hslToRgb:()=>Sl,isCSSVar:()=>mt,isDomDocument:()=>Ye,isGoogleFontsUrl:()=>fn,isHostObject:()=>Xe,isRawUnitValue:()=>gs,isResolvedColor:()=>Ee,isScalingUnit:()=>Xr,isWritableFamilyBucket:()=>id,linearChannelToSrgb:()=>El,mixTwoColors:()=>Ih,mixTwoRgb:()=>Mh,mixTwoRgba:()=>vl,numToLetterMap:()=>Ve,oklabToLinearSrgb:()=>Al,oklabToOklch:()=>Ii,oklchToGamutSafeSrgb:()=>Di,oklchToOklab:()=>Tl,opacify:()=>cn,parkHostObject:()=>gr,parseColorToken:()=>Gt,relativeLuminance:()=>co,resolveConfigDocument:()=>Fo,resolveFileUrl:()=>de,returnSubThemeOrDefault:()=>Nh,rgbArrayToHex:()=>xl,rgbToHSL:()=>wl,rgbToHex:()=>$h,setCustomFont:()=>$i,setCustomFontMedia:()=>Cr,setFontImport:()=>un,setInCustomFontMedia:()=>Rl,setScalingVar:()=>Bi,setSubScalingVar:()=>Nl,setVariables:()=>pg,splitTopLevelCommas:()=>tr,srgbChannelToLinear:()=>Cl,srgbToOklab:()=>Pi,toLinearChannel:()=>an});var Ye=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0),Xe=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)},id=t=>t!==null&&typeof t=="object"&&!Xe(t),gr=(t,e,r)=>{if(!t)return;if(Ye(r)){t.__domDocument||(t.__domDocument=r);return}let o=`__host_${e}`;t[o]||(t[o]=r)},Fo=t=>t?Ye(t.__domDocument)?t.__domDocument:Ye(t.document)?t.document:null:null;var Xr=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",No=["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"],FC=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),NC=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${No.filter(t=>t!=="auto").map(FC).join("|")})$`),gs=t=>NC.test(String(t).trim());R();var bl={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"},ue=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=bl[t.toLowerCase()];if(e&&(t=e),t[0]==="#")return t.length<7&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(t.length>4?t[4]+t[4]:"")),[parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16),parseInt(t.substr(5,2),16),t.length>7?parseInt(t.substr(7,2),16)/255:1];if(t.indexOf("rgb")===-1&&Q&&v){let r=Q.body.appendChild(Q.createElement("fictum")),o="rgb(1, 2, 3)";if(r.style.color=o,r.style.color!==o){Q.body.removeChild(r);return}if(r.style.color=t,r.style.color===o||r.style.color==="")return Q.body.removeChild(r),[0,0,0,0];t=v.getComputedStyle(r).color,Q.body.removeChild(r)}return t.indexOf("rgb")===0?(t.indexOf("rgba")===-1&&(t=`${t}, 1`),t.match(/[\.\d]+/g).map(r=>+r)):[0,0,0,0]},Ih=(t,e,r=.5)=>(t=ue(t),e=ue(e),vl(t,e,r)),Dh=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${r},${o},${n})`},_l=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[r,o,n]},$h=(t,e,r)=>"#"+(1<<24|t<<16|e<<8|r).toString(16).slice(1),xl=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1),Lh=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${r},${o},${n},${e})`},Mh=(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})`},Fh=(t,e)=>{let[r,o,n]=e,s=Math.max(0,Math.min(100,n+parseFloat(t)));return[r,o,s]},wl=(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]},Sl=(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)],kl=(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)},vl=(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})`},cn=(t,e)=>{let r=ue(t);if(!r){ro()&&console.warn(t+" color is not rgba");return}return r[3]=e,`rgba(${r})`},mt=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,te=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,WE=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,Gt=t=>{if(!w(t))return null;if(te.test(t))return{passthrough:t};if(mt(t))return{cssVar:t};let e=t.match(WE);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}},Ee=t=>w(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),tr=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},an=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),co=t=>.2126*an(t[0])+.7152*an(t[1])+.0722*an(t[2]),ln=(t,e)=>{let r=co(t)+.05,o=co(e)+.05;return r>o?r/o:o/r},Cl=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),El=t=>(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*255,Pi=([t,e,r])=>{let[o,n,s]=[t,e,r].map(Cl),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]},Al=([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]},Ii=([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]},Tl=([t,e,r])=>{let o=r*Math.PI/180;return[t,e*Math.cos(o),e*Math.sin(o)]},Di=(t,e,r,o=24)=>{let n=a=>Al(Tl([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=>El(Math.max(0,Math.min(1,a))))},lo=(t,e=1,r=[255,255,255])=>e>=1?t:t.map((o,n)=>o*e+r[n]*(1-e)),Ue=(t,e)=>{w(t)&&t.includes("rgb")&&(t=ue(t).join(", ")),w(t)&&(t=t.split(",").map(n=>parseFloat(n.trim()))),Me(e)&&(e+="");let r=xl(t),o=e.slice(0,1);if(o==="-"||o==="+"){let n=kl(r,parseFloat(e));return _l(n).join(", ")}else{let[n,s,i]=t,[a,c]=wl(n/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return Sl(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var Nh=(t,e)=>{if(t)return t.themes&&t.themes[e]?t.themes[e]:t[e]?[t,t[e]]:t};var de=(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},fo=(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},Ol=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},fn=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),un=t=>`@import url('${t}');`,Rl=t=>`@font-face { ${t} }`,$i=(t,e,r,o={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=Ol(a),l=c?` format('${c}')`:"";return`url('${a}')${l}`}).join(`,
31
+ }`;return`${a}${l}${c}`}});var ph,$_=F(()=>{"use strict";ph=t=>{if(!t)return"";let e=new Date(t),r=new Intl.DateTimeFormat("en",{year:"numeric"}).format(e),o=new Intl.DateTimeFormat("en",{month:"short"}).format(e);return`${new Intl.DateTimeFormat("en",{day:"2-digit"}).format(e)} ${o}, ${r}`}});var hh,L_=F(()=>{"use strict";hh=(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 gh,M_=F(()=>{"use strict";gh=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 mh,F_=F(()=>{"use strict";mh=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function nn(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 Sh(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 yh,bh,_h,xh,wh,N_=F(()=>{"use strict";yh=(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)}}),bh=(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)}),_h=(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}`)},xh=(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)}}),wh=(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 VE(t,e){if(!e||typeof e!="object")return t;let r=n=>{if(!UE(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 gl(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 HE(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]??gl(a,p)??d;if(g==="getLocalStateLang")return gl(c,p+s)??d;let m=gl(c,p);return m!==void 0?m:a[p]??gl(a,p)??d}));return l}function j_(t){let e={...t};for(let[r,o]of Object.entries(e))if(typeof o=="function"){let n=o.toString(),s=n.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | getLocalStateLang }}`;continue}let i=n.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(i){e[r]=`{{ ${i[1]} | polyglot }}`;continue}let a=n.match(/s\.(\w+(?:\.\w+)+)/);if(a){e[r]=`{{ ${a[1]} }}`;continue}delete e[r]}else if(typeof o=="string"){let n=o.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(n){e[r]=`{{ ${n[1]} | getLocalStateLang }}`;continue}let s=o.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[r]=`{{ ${s[1]} | polyglot }}`;continue}if(o.includes("=>")&&o.includes("s.")){let i=o.match(/s\.(\w+(?:\.\w+)+)/);if(i){e[r]=`{{ ${i[1]} }}`;continue}}}return e}function vh(t,e,r,{isProduction:o=!1,channel:n="production"}={}){let s=t.pages?.[e],i=S(s?.state)&&s?.state,a=s?.metadata||s?.helmet||i||{},c=j_(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=j_(f),d={};if(t.integrations?.seo?d={...t.integrations.seo,...u,...c}:Object.keys(u).length?d={...u,...c}:d={...c},!d.title){let p=t.name||t.key;p?o?d.title=p:n==="development"?d.title=`${p} / dev:symbo.ls`:n==="staging"?d.title=`${p} / staging:symbo.ls`:d.title=`${p} / symbo.ls`:d.title="Symbols demo"}d=HE(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=VE(d,t.files);let g=t.name||t.app?.metadata?.title||t.app?.name||"";for(let[p,m]of Object.entries(d))if(typeof m=="string"&&m.includes("{{")){let b=m.replace(/\{\{[^}]*\}\}/g,"").trim();b?d[p]=b:p==="title"?d[p]=g:delete d[p]}return d}var Rt,jE,sn,BE,ml,kh,UE,B_=F(()=>{"use strict";Ot();Rt=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,r=>e[r])},jE=t=>Object.entries(t||{}).filter(([e,r])=>r!==void 0).map(([e,r])=>`${e}="${Rt(r)}"`).join(" "),sn=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"]),ml=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="${sn(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="${sn(o)}">${o}</style>`)}if(Array.isArray(t.scripts))for(let r of t.scripts){if(!r)continue;let o=typeof r=="string",n=o?r:r.src;if(!n&&!r.body)continue;let s=[];n&&s.push(`src="${Rt(n)}"`),o||(r.type&&s.push(`type="${Rt(r.type)}"`),r.async&&s.push("async"),r.defer&&s.push("defer"),r.integrity&&s.push(`integrity="${Rt(r.integrity)}"`),r.crossorigin&&s.push(`crossorigin="${Rt(r.crossorigin)}"`),r.referrerpolicy&&s.push(`referrerpolicy="${Rt(r.referrerpolicy)}"`),r.nomodule&&s.push("nomodule"));let i=` data-smbls-script="${Rt(n||sn(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},kh=(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>${Rt(s)}</title>`),o;if(n==="canonical")return o.push(`<link rel="canonical" href="${Rt(s)}">`),o;if(n==="manifest")return o.push(`<link rel="manifest" href="${Rt(s)}">`),o;if(n==="favicon"||n==="favicons"||n==="icon"||n==="icons")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="string")o.push(`<link rel="icon" href="${Rt(f)}">`);else if(typeof f=="object"){let u=jE(f);/rel=/.test(u)?o.push(`<link ${u}>`):o.push(`<link rel="icon" ${u}>`)}}),o;if(n==="alternate")return(Array.isArray(s)?s:[s]).forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).filter(([d,h])=>h!==void 0).map(([d,h])=>`${d}="${Rt(h)}"`).join(" ");o.push(`<link rel="alternate" ${u}>`)}}),o;let i=(l,f,u="name")=>{if(typeof f=="string"||typeof f=="number"||typeof f=="boolean")o.push(`<meta ${u}="${Rt(l)}" content="${Rt(f)}">`);else if(Array.isArray(f))f.forEach(d=>{if(typeof d=="string"||typeof d=="number"||typeof d=="boolean")o.push(`<meta ${u}="${Rt(l)}" content="${Rt(d)}">`);else if(typeof d=="object"){let h=Object.entries(d).filter(([g,p])=>p!==void 0).map(([g,p])=>`${g}="${Rt(p)}"`).join(" ");o.push(`<meta ${h}>`)}});else if(typeof f=="object"){let d=Object.entries(f).filter(([h,g])=>g!==void 0).map(([h,g])=>`${h}="${Rt(g)}"`).join(" ");o.push(`<meta ${d}>`)}};if(n.startsWith("http-equiv:")){let l=n.replace("http-equiv:","");return i(l,s,"http-equiv"),o}if(n.startsWith("itemprop:")){let l=n.replace("itemprop:","");return i(l,s,"itemprop"),o}let c=["og:","twitter:","fb:","article:","profile:","book:","business:","music:","product:","video:","DC:","DCTERMS:"].find(l=>n.startsWith(l));if(c){let l=n.replace(c,"");return i(`${c.replace(":","")}:${l}`,s,c==="twitter:"||c==="DC:"||c==="DCTERMS:"?"name":"property"),o}if(n.startsWith("apple:")||n.startsWith("msapplication:")){let l=n.startsWith("apple:")?"apple-":"msapplication-",f=n.replace(/^apple:|^msapplication:/,"");return i(`${l}${f}`,s,"name"),o}return i(n,s),o},['<meta charset="UTF-8">','<meta name="viewport" content="width=device-width, initial-scale=1">']);return r.push(...ml(t)),r.join(`
32
+ `)},UE=t=>typeof t=="string"&&t.length>0&&!t.startsWith("/")&&!t.startsWith("http")});var yl,Ch,U_=F(()=>{"use strict";Ot();yl=(t,e)=>(O(e)?e:Object.values(e)).reduce((r,o)=>Math.abs(o-t)<Math.abs(r-t)?o:r),Ch=(t,e)=>(t=parseFloat(t),S(e)&&(e=Object.values(e)),yl(t,e))});function an(t){let e=String(t||"").trim();if(!e)return{owner:V_,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=V_);let n=o?`${r}/${o}`:"";return{owner:r,key:o,full:n}}async function bl(t,e={}){if((e.provider||"kv")==="api")return z_(t,e);let o=await JE(t,e);return o||z_(t,e)}async function JE(t,e={}){let r=e.kvBaseUrl||zE,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 z_(t,e={}){let r=e.apiBaseUrl||WE,{key:o}=an(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}=an(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 W_(t,e={}){if(S(t))return t;if(w(t)){let{full:r}=an(t);if(!r)return null;try{let o=await bl(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 Ah(t,e={}){return!t||!t.length?[]:(await Promise.all(t.map(async o=>{if(Ai(o)){let n=await W_(YE(o),e);return n?{library:n,ignoreList:o.ignoreList}:null}return W_(o,e)}))).filter(Boolean)}var V_,zE,WE,Ci,q_,qE,KE,H_,GE,Ei,Eh,Ai,YE,XE,Ti,K_=F(()=>{"use strict";Ot();V_="system",zE="https://smbls-kv.nika-980.workers.dev",WE="https://api.symbols.app";Ci=(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])&&Ci(t[n],e[n],r,s):t[n]=e[n])}},q_=(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]=q_(t[i],e,a))}return s},qE=new Set,KE=new Set(["components","pages","functions","snippets","methods"]),H_=(t,e)=>e===""&&KE.has(t),GE=t=>t.replace(/\.js$/iu,""),Ei=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=>GE(n.trim())).filter(Boolean).join("/");o&&e.add(o)}return e},Eh=(t,e={})=>({library:t,ignoreList:Array.isArray(e.ignoreList)?e.ignoreList:[]}),Ai=t=>S(t)&&Array.isArray(t.ignoreList)&&("library"in t||"key"in t||"name"in t),YE=t=>t.library!==void 0?t.library:t.key??t.name,XE=(t,e,r)=>{let o=Ei(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")Ci(t[s],e[s],n,s);else for(let i in e[s])n.has(`${s}/${i}`)||(i in t[s]?H_(s,t[s][i])&&!H_(s,e[s][i])&&(t[s][i]=e[s][i]):t[s][i]=e[s][i]);else s in t||(t[s]=q_(e[s],n,s))},Ti=(t,e)=>{if(!(!e||!e.length))for(let r=0;r<e.length;r++){let o=e[r],n=qE;Ai(o)&&(n=Ei(o.ignoreList),o=o.library),S(o)&&XE(t,o,n)}}});var Th,Oh,Rh,Oi,Ph,Ri,Ih,co,G_=F(()=>{"use strict";Ot();Th=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},Oh=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)}},Rh=t=>t.replace(/[^a-zA-Z0-9_]/g,""),Oi=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,"")),Ph=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),Ri=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),Ih=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},co=t=>{if(O(t))return t;if(w(t))return t.split(" ");if(S(t))return Object.values(t);if(Fe(t))return[t]}});var Dh,Y_=F(()=>{"use strict";Dh=()=>{let t=document.styleSheets[0],e="";if(t)try{let r=t.cssRules||t.rules;for(let o=0;o<r.length;o++)e+=r[o].cssText}catch(r){console.error("Unable to access CSS rules. This may be due to CORS restrictions:",r)}else console.log("No stylesheets found in document.styleSheets[0].");return e}});var Gt,cn,Pi,Ii,X_=F(()=>{"use strict";Gt=t=>{let e=t&&t.src;if(!e||typeof e!="string")return null;let r=t.context;if(!r)return null;let o=r.assets&&r.assets[e]||r.files&&r.files[e];return o?typeof o=="string"?{src:o,type:null,variants:null}:typeof o=="object"&&typeof o.src=="string"?o:null:null},cn=(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(", ")},Pi=t=>{if(!t||!Array.isArray(t.variants))return"";let e=t.variants.filter(r=>r.format===t.type);return cn(e,{keepOneX:!1})},Ii=(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:cn(c,{keepOneX:!0})}});let n=r.get(t.type)||[],s=cn(n,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...o,{tag:"img",attr:i}]}});var _l={};P(_l,{CDN_PROVIDERS:()=>ue,DOMQL_EVENTS:()=>Dd,DOMQ_PROPERTIES:()=>yr,ENV:()=>Yd,HTML_TAGS:()=>Go,METHODS:()=>Ho,METHODS_EXL:()=>Os,NODE_ENV:()=>ve,OPTIONS:()=>Zs,PACKAGE_MANAGER_TO_CDN:()=>Cr,PARSED_DOMQ_PROPERTIES:()=>Ts,PROPS_METHODS:()=>br,STATE_METHODS:()=>to,STATE_PROPERTIES:()=>Id,SVG_TAGS:()=>Jb,TYPES:()=>ws,UNIVERSAL_RESERVED_KEYS:()=>pl,addCaching:()=>Yc,addContext:()=>Gc,addExtend:()=>xp,addExtends:()=>Kt,addItemAfterEveryElement:()=>_d,addProtoToArray:()=>vs,addRef:()=>Wc,applyDependentState:()=>jp,applyEvent:()=>el,applyEventUpdate:()=>rl,applyExtends:()=>t_,applyProps:()=>qs,arrayContainsOtherArray:()=>dd,arraysEqual:()=>wd,arrayzeValue:()=>co,buildImgSrcset:()=>Pi,buildSourcesAndImg:()=>Ii,cache:()=>zp,call:()=>ah,captureSnapshot:()=>lh,checkForStateTypes:()=>Lp,checkIfInherits:()=>tl,checkIfStringIsInArray:()=>vd,clone:()=>Ld,cloneAndMergeArrayExtend:()=>Ns,cloneFunction:()=>np,concatAddExtends:()=>yp,copyJavaScriptToClipboard:()=>Oh,copyStringToClipboard:()=>Th,createBasedOnType:()=>zc,createElement:()=>$p,createElementExtends:()=>Ic,createExtends:()=>Bs,createExtendsFromKeys:()=>Yo,createExtendsStack:()=>Mc,createIfConditionFlag:()=>sp,createInheritedState:()=>Mp,createKey:()=>Ms,createNestedObject:()=>Vd,createNestedObjectByKeyPath:()=>Np,createObjectWithoutPrototype:()=>Cc,createParent:()=>qc,createPath:()=>Kc,createProps:()=>Ks,createPropsStack:()=>Vc,createRoot:()=>Dp,createScope:()=>Up,createSnapshotId:()=>Ls,customDecodeURIComponent:()=>Pd,customEncodeURIComponent:()=>Rd,cutArrayAfterValue:()=>yd,cutArrayBeforeValue:()=>md,debounce:()=>Fs,debounceOnContext:()=>ep,decodeNewlines:()=>Od,deepClone:()=>ft,deepContains:()=>Bd,deepDefaults:()=>Ci,deepDestringifyFunctions:()=>le,deepExtend:()=>Pc,deepMerge:()=>st,deepMergeExtends:()=>je,deepStringifyFunctions:()=>Rs,defineSetter:()=>sh,destringifyGlobalScope:()=>Is,detectHeightOnInit:()=>hh,detectInfiniteLoop:()=>qd,document:()=>Q,encodeNewlines:()=>Td,error:()=>io,excludeKeysFromObject:()=>Gd,exec:()=>ut,extendCachedRegistry:()=>bp,extendStackRegistry:()=>Us,extractArrayExtend:()=>Hs,fetchLibraryData:()=>bl,fibonacciNumberByIndex:()=>gh,filterArrays:()=>Sd,filterArraysFast:()=>kd,finalizeExtends:()=>Fc,findClosestNumber:()=>yl,findClosestNumberInFactory:()=>Ch,findInheritedState:()=>Qc,findKeyPosition:()=>Ed,flattenExtend:()=>Xo,formatDate:()=>ph,generateHash:()=>Tc,generateHeadArrayTags:()=>ml,generateKey:()=>$s,generateMetaTags:()=>kh,get:()=>rh,getCDNDirUrl:()=>hl,getCDNUrl:()=>Ee,getCapitalCaseKeys:()=>kp,getCdnProviderFromConfig:()=>en,getChildStateInKey:()=>Zc,getChildren:()=>li,getContext:()=>mi,getCookie:()=>fp,getDB:()=>wi,getEmotionStylesheet:()=>Dh,getExtendsInElement:()=>wp,getExtendsStack:()=>js,getExtendsStackRegistry:()=>Rc,getFrequencyInArray:()=>pd,getHashedExtend:()=>Vs,getImportMapScript:()=>dh,getInObjectByPath:()=>Wd,getLocalStorage:()=>dp,getNev:()=>Qd,getPageMetadata:()=>vh,getParentStateInKey:()=>Jc,getPath:()=>fi,getQuery:()=>Si,getRef:()=>nh,getRoot:()=>pi,getRootContext:()=>gi,getRootData:()=>hi,getRootState:()=>di,getRootStateInKey:()=>Xc,getSpreadChildren:()=>vp,global:()=>ld,hasFunction:()=>Ne,hasHandlerPlugin:()=>Wo,hasOwnProperty:()=>Fd,hashContent:()=>sn,inheritChildExtends:()=>$c,inheritChildPropsExtends:()=>Dc,inheritParentProps:()=>Gs,inheritRecursiveChildExtends:()=>Lc,initProps:()=>Rp,is:()=>Wt,isArray:()=>O,isBoolean:()=>xc,isContextComponent:()=>Cp,isCyclic:()=>Kd,isDOMNode:()=>zt,isDate:()=>Sc,isDefined:()=>bt,isDevelopment:()=>xr,isEmpty:()=>kc,isEmptyObject:()=>Nd,isEqualDeep:()=>vc,isFunction:()=>A,isHtmlElement:()=>_s,isLocal:()=>Zd,isLoudDevRuntime:()=>Pt,isMalformedDependency:()=>rn,isMethod:()=>ch,isMobile:()=>cp,isNode:()=>Ze,isNot:()=>ud,isNotProduction:()=>oo,isNull:()=>wc,isNumber:()=>Fe,isObject:()=>S,isObjectLike:()=>H,isPhoto:()=>mh,isProduction:()=>_r,isStaging:()=>Jd,isState:()=>Fp,isString:()=>w,isStringFunction:()=>op,isTest:()=>Ac,isTesting:()=>Xd,isUndefined:()=>Tt,isUniversallyReservedKey:()=>fh,isUnresolvableDependency:()=>ao,isValidDependencyMap:()=>on,isValidHtmlTag:()=>hp,isWrappedLibrary:()=>Ai,joinArrays:()=>Bo,jointStacks:()=>_p,keys:()=>ul,loadCssFile:()=>xh,loadJavascript:()=>wh,loadJavascriptFile:()=>yh,loadJavascriptFileEmbedSync:()=>_h,loadJavascriptFileSync:()=>bh,loadRemoteCSS:()=>Sh,loadRemoteScript:()=>nn,log:()=>ih,logGroupIf:()=>ap,logIf:()=>ip,lookdown:()=>th,lookdownAll:()=>eh,lookup:()=>Qp,lowercaseFirstLetter:()=>Qr,makeObjectWithoutPrototype:()=>jd,map:()=>$d,mapStringsWithContextComponents:()=>zs,matchesComponentNaming:()=>Be,memoize:()=>rp,merge:()=>gt,mergeSharedLibraries:()=>Ti,nextElement:()=>bi,normalizeIgnoreList:()=>Ei,normalizeLibraryKey:()=>an,objectToString:()=>Ps,objectizeStringProperty:()=>Ws,overwrite:()=>Ds,overwriteDeep:()=>qt,overwriteShallow:()=>ro,overwriteState:()=>Bp,parse:()=>dl,parseDeep:()=>ai,pickupElementFromProps:()=>Bc,pickupPropsFromElement:()=>jc,previousElement:()=>_i,propExists:()=>Tp,propertizeElement:()=>Uc,propertizeUpdate:()=>Ap,remove:()=>E_,removeChars:()=>Rh,removeCookie:()=>up,removeDuplicateProps:()=>Xs,removeDuplicatesInArray:()=>Uo,removeFromArray:()=>hd,removeFromObject:()=>Ud,removeNestedKeyByPath:()=>Hd,removeValueFromArray:()=>ks,removeValueFromArrayAll:()=>bd,reorderArrayByValues:()=>xd,replaceLiteralsWithObjectFields:()=>Zr,replaceOctalEscapeSequences:()=>Ad,resolveAsset:()=>Gt,resolveHandler:()=>qo,resolveSharedLibraries:()=>Ah,returnValueAsText:()=>Hc,runPluginHook:()=>At,self:()=>fd,setActiveRootState:()=>ui,setCookie:()=>lp,setHashedExtend:()=>Oc,setInObjectByPath:()=>zd,setLocalStorage:()=>pp,setNodeStyles:()=>fl,setProps:()=>oh,setPropsPrototype:()=>Ys,sharedLibrary:()=>Eh,splitPackageSpecifier:()=>ki,spotByPath:()=>ci,srcsetFor:()=>cn,stringIncludesAny:()=>Es,stringToObject:()=>Md,stripVersionRangePrefix:()=>vi,swapItemsInArray:()=>gd,syncProps:()=>Js,toCamelCase:()=>Oi,toDashCase:()=>Ri,toDescriptionCase:()=>Ih,toTitleCase:()=>Ph,toggleFullscreen:()=>uh,triggerEventOn:()=>wr,triggerEventOnUpdate:()=>Vp,trimStringFromSymbols:()=>Cd,unstackArrayOfObjects:()=>Ss,update:()=>Op,updateProps:()=>Pp,variables:()=>xi,verbose:()=>Zo,warn:()=>yi,window:()=>v});var R=F(()=>{"use strict";Ec();tp();Ot();Qe();Ko();Vo();xs();Gb();Yb();As();bs();Xb();gp();Sp();Ip();Nc();i_();a_();zo();c_();O_();Wp();R_();Hp();P_();I_();D_();$_();L_();M_();F_();N_();B_();U_();K_();G_();Y_();X_()});var Iv=zu((nV,Pv)=>{var os=1e3,ns=os*60,ss=ns*60,Po=ss*24,WR=Po*7,qR=Po*365.25;Pv.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return KR(t);if(r==="number"&&isFinite(t))return e.long?YR(t):GR(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function KR(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*qR;case"weeks":case"week":case"w":return r*WR;case"days":case"day":case"d":return r*Po;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ss;case"minutes":case"minute":case"mins":case"min":case"m":return r*ns;case"seconds":case"second":case"secs":case"sec":case"s":return r*os;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function GR(t){var e=Math.abs(t);return e>=Po?Math.round(t/Po)+"d":e>=ss?Math.round(t/ss)+"h":e>=ns?Math.round(t/ns)+"m":e>=os?Math.round(t/os)+"s":t+"ms"}function YR(t){var e=Math.abs(t);return e>=Po?gu(t,e,Po,"day"):e>=ss?gu(t,e,ss,"hour"):e>=ns?gu(t,e,ns,"minute"):e>=os?gu(t,e,os,"second"):t+" ms"}function gu(t,e,r,o){var n=e>=r*1.5;return Math.round(t/r)+" "+o+(n?"s":"")}});var $v=zu((sV,Dv)=>{function XR(t){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=n,r.enabled=a,r.humanize=Iv(),r.destroy=l,Object.keys(t).forEach(f=>{r[f]=t[f]}),r.names=[],r.skips=[],r.formatters={};function e(f){let u=0;for(let d=0;d<f.length;d++)u=(u<<5)-u+f.charCodeAt(d),u|=0;return r.colors[Math.abs(u)%r.colors.length]}r.selectColor=e;function r(f){let u,d=null,h,g;function p(...m){if(!p.enabled)return;let b=p,_=Number(new Date),y=_-(u||_);b.diff=y,b.prev=u,b.curr=_,u=_,m[0]=r.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let x=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(E,T)=>{if(E==="%%")return"%";x++;let $=r.formatters[T];if(typeof $=="function"){let D=m[x];E=$.call(b,D),m.splice(x,1),x--}return E}),r.formatArgs.call(b,m),(b.log||r.log).apply(b,m)}return p.namespace=f,p.useColors=r.useColors(),p.color=r.selectColor(f),p.extend=o,p.destroy=r.destroy,Object.defineProperty(p,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,g=r.enabled(f)),g),set:m=>{d=m}}),typeof r.init=="function"&&r.init(p),p}function o(f,u){let d=r(this.namespace+(typeof u>"u"?":":u)+f);return d.log=this.log,d}function n(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];let u=(typeof f=="string"?f:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of u)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function s(f,u){let d=0,h=0,g=-1,p=0;for(;d<f.length;)if(h<u.length&&(u[h]===f[d]||u[h]==="*"))u[h]==="*"?(g=h,p=d,h++):(d++,h++);else if(g!==-1)h=g+1,p++,d=p;else return!1;for(;h<u.length&&u[h]==="*";)h++;return h===u.length}function i(){let f=[...r.names,...r.skips.map(u=>"-"+u)].join(",");return r.enable(""),f}function a(f){for(let u of r.skips)if(s(f,u))return!1;for(let u of r.names)if(s(f,u))return!0;return!1}function c(f){return f instanceof Error?f.stack||f.message:f}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Dv.exports=XR});var Lv=zu((Qt,mu)=>{Qt.formatArgs=ZR;Qt.save=QR;Qt.load=tP;Qt.useColors=JR;Qt.storage=eP();Qt.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Qt.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function JR(){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 ZR(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+mu.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(r++,n==="%c"&&(o=r))}),t.splice(o,0,e)}Qt.log=console.debug||console.log||(()=>{});function QR(t){try{t?Qt.storage.setItem("debug",t):Qt.storage.removeItem("debug")}catch{}}function tP(){let t;try{t=Qt.storage.getItem("debug")||Qt.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function eP(){try{return localStorage}catch{}}mu.exports=$v()(Qt);var{formatters:rP}=mu.exports;rP.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Tb={};P(Tb,{ANIMATION_PROPS:()=>Wg,ARIA_ROLES:()=>iT,ATTR_TRANSFORMS:()=>Bg,BLOCK_PROPS:()=>qg,CDN_PROVIDERS:()=>ue,CONFIG:()=>ho,CONFIG_MERGE_EXL:()=>ee,CSS_NAMED_COLOR_HEX:()=>xl,CSS_NATIVE_COLOR_REGEX:()=>te,CSS_PROPS_REGISTRY:()=>xt,CSS_UNITS:()=>jo,DEFAULT_CONFIG:()=>Aa,DEFAULT_CSS_PROPERTIES_LIST:()=>vt,DELEGATED_EVENTS:()=>Rn,DESIGN_SYSTEM_OPTIONS:()=>xy,DOMQL_EVENTS:()=>Dd,DOMQ_PROPERTIES:()=>yr,DOM_EVENTS:()=>Nx,ENV:()=>Yd,FACTORY:()=>he,FLEX_PROPS:()=>Qg,FONT_PROPS:()=>Kg,GRID_PROPS:()=>tm,HOST_REGISTERED_PACKAGES:()=>Uk,HTML_ATTRIBUTES:()=>pf,HTML_TAGS:()=>Go,LIFECYCLE_EVENTS:()=>$r,METHODS:()=>Ho,METHODS_EXL:()=>Os,MISC_PROPS:()=>Gg,MIXINS:()=>lf,NODE_ENV:()=>ve,OPTIONS:()=>Zs,PACKAGE_MANAGER_TO_CDN:()=>Cr,PARSED_DOMQ_PROPERTIES:()=>Ts,POSITION_PROPS:()=>Yg,PROPS_METHODS:()=>br,REGISTRY:()=>jt,RESERVED_STORE_METHODS:()=>jb,ROUTER_OPTIONS:()=>Mf,SIGNAL_ENGINE_KEY:()=>Fo,SIGNAL_INSTANCES_KEY:()=>Lo,STANDARD_SCHEME_QUERIES:()=>Hl,STATE_PROPERTIES:()=>Id,STORE_METHOD_NAMES:()=>Nb,SVG_TAGS:()=>Tn,THEME_PROPS:()=>Zg,TIMING_PROPS:()=>_a,TYPES:()=>ws,UNIVERSAL_RESERVED_KEYS:()=>pl,VALUE_TRANSFORMERS:()=>Ql,VERSION:()=>Ub,__resetSignalEngine:()=>id,__resetSignalInstances:()=>sd,__resetStateShadowWarnings:()=>Bb,activateConfig:()=>ex,addCaching:()=>Yc,addContext:()=>Gc,addDelegatedEvent:()=>ya,addExtend:()=>xp,addExtends:()=>Kt,addItemAfterEveryElement:()=>_d,addMethods:()=>Mn,addProtoToArray:()=>vs,addRef:()=>Wc,animation:()=>ng,appendSVGSprite:()=>ua,appendSvgIconsSprite:()=>bo,applyAttrTransforms:()=>Vg,applyCSS:()=>py,applyDependentState:()=>jp,applyDocument:()=>fa,applyEvent:()=>el,applyEventUpdate:()=>rl,applyExtends:()=>In,applyHeadings:()=>Kl,applyInitialState:()=>Sf,applyMediaSequenceVars:()=>Ar,applyProps:()=>qs,applyReset:()=>da,applySequenceGlobalVars:()=>Gi,applySequenceVars:()=>nr,applySpacingSequence:()=>Ji,applyStateMethods:()=>ae,applyTimingSequence:()=>la,applyTrueProps:()=>rm,applyTypographySequence:()=>ia,arrayContainsOtherArray:()=>dd,arraysEqual:()=>wd,arrayzeValue:()=>co,assertEmitIntegrity:()=>Rg,batch:()=>mc,breakpoints:()=>rg,buildImgSrcset:()=>Pi,buildSourcesAndImg:()=>Ii,buildThemeVarStyles:()=>zn,cache:()=>zp,cacheNode:()=>Dr,call:()=>ah,callStateMethod:()=>wa,camelToAttr:()=>Mr,camelToLowerAttr:()=>jx,captureSnapshot:()=>lh,changeGlobalTheme:()=>tf,changeLightness:()=>jh,checkAttributeByTagName:()=>Fr,checkEventFunctions:()=>Ug,checkForStateTypes:()=>Lp,checkIfBoxSize:()=>Xi,checkIfInherits:()=>tl,checkIfStringIsInArray:()=>vd,class:()=>lg,clone:()=>Ld,cloneAndMergeArrayExtend:()=>Ns,cloneFunction:()=>np,color:()=>Yh,colorStringToRgbaArray:()=>de,components:()=>Vn,compositeOverBackdrop:()=>fo,concatAddExtends:()=>yp,contrastRatio:()=>un,convertSvgToSymbol:()=>Yi,copyJavaScriptToClipboard:()=>Oh,copyStringToClipboard:()=>Th,create:()=>Ab,createAsync:()=>zP,createBasedOnType:()=>zc,createComputed:()=>Lb,createConfig:()=>Ui,createDefine:()=>q0,createEffect:()=>Z,createElement:()=>$p,createElementExtends:()=>Ic,createExtends:()=>Bs,createExtendsFromKeys:()=>Yo,createExtendsStack:()=>Mc,createHTMLNode:()=>An,createIfConditionFlag:()=>sp,createInheritedState:()=>Mp,createKey:()=>Ms,createNestedObject:()=>Vd,createNestedObjectByKeyPath:()=>Np,createObjectWithoutPrototype:()=>Cc,createParent:()=>qc,createPath:()=>Kc,createProps:()=>Ks,createPropsStack:()=>Vc,createRoot:()=>Dp,createScope:()=>Up,createScopeStore:()=>bc,createSignal:()=>ms,createSkeleton:()=>qP,createSnapshotId:()=>Ls,createState:()=>am,createStore:()=>Ye,createSync:()=>WP,css:()=>_e,cssMediaVars:()=>Nl,cssVars:()=>Fl,customDecodeURIComponent:()=>Pd,customEncodeURIComponent:()=>Rd,cutArrayAfterValue:()=>yd,cutArrayBeforeValue:()=>md,debounce:()=>Fs,debounceOnContext:()=>ep,decodeNewlines:()=>Od,deepClone:()=>ft,deepContains:()=>Bd,deepDefaults:()=>Ci,deepDestringifyFunctions:()=>le,deepExtend:()=>Pc,deepMerge:()=>st,deepMergeExtends:()=>je,deepStringifyFunctions:()=>Rs,defaultDefine:()=>qn,defineResolvedThemeSignal:()=>mn,defineSetter:()=>sh,defineThemeSignal:()=>gn,destringifyGlobalScope:()=>Is,destroy:()=>Da,detectHeightOnInit:()=>hh,detectInfiniteLoop:()=>qd,detectTag:()=>Ir,devices:()=>og,dispose:()=>Nr,encodeNewlines:()=>Td,error:()=>io,excludeKeysFromObject:()=>Gd,exec:()=>ut,executeAttr:()=>fT,exetuteClassPerComponent:()=>BT,extendCachedRegistry:()=>bp,extendStackRegistry:()=>Us,extractArrayExtend:()=>Hs,extractConditionalAttrs:()=>pT,fetchLibraryData:()=>bl,fibonacciNumberByIndex:()=>gh,filterArrays:()=>Sd,filterArraysFast:()=>kd,filterAttributesByTagName:()=>lT,finalizeExtends:()=>Fc,findClosestNumber:()=>yl,findClosestNumberInFactory:()=>Ch,findHeadingLetter:()=>Vl,findHeadings:()=>Ki,findInheritedState:()=>Qc,findKeyPosition:()=>Ed,flattenExtend:()=>Xo,font:()=>Hh,fontFace:()=>qh,fontFamily:()=>zh,fontFamilyTypes:()=>Wh,formatDate:()=>ph,generateHash:()=>Tc,generateHeadArrayTags:()=>ml,generateKey:()=>$s,generateMetaTags:()=>kh,generateSequence:()=>Yt,generateSequencePosition:()=>hg,generateSprite:()=>yn,generateSubSequence:()=>Wi,get:()=>rh,getActiveConfig:()=>C,getActiveDocument:()=>sf,getActiveLang:()=>Gn,getCDNDirUrl:()=>hl,getCDNUrl:()=>Ee,getCacheSize:()=>Ig,getCapitalCaseKeys:()=>kp,getCdnProviderFromConfig:()=>en,getChildStateInKey:()=>Zc,getChildren:()=>li,getColor:()=>et,getColorShade:()=>Cl,getContext:()=>mi,getCookie:()=>fp,getDB:()=>wi,getDefaultOrFirstKey:()=>uo,getEmitStats:()=>af,getEmotionStylesheet:()=>Dh,getExtendsInElement:()=>wp,getExtendsStack:()=>js,getExtendsStackRegistry:()=>Rc,getFnPrefixAndValue:()=>or,getFontFace:()=>Uh,getFontFaceEach:()=>po,getFontFaceEachString:()=>Dl,getFontFaceString:()=>Fi,getFontFamily:()=>sa,getFontFormat:()=>Pl,getFontSizeByKey:()=>aa,getFrequencyInArray:()=>pd,getHashedExtend:()=>Vs,getImportMapScript:()=>dh,getInObjectByPath:()=>Wd,getLanguages:()=>Ma,getLocalStateLang:()=>Ua,getLocalStorage:()=>dp,getMediaColor:()=>It,getMediaTheme:()=>me,getNev:()=>Qd,getObserver:()=>yc,getPageMetadata:()=>vh,getParentStateInKey:()=>Jc,getPath:()=>fi,getQuery:()=>Si,getRef:()=>nh,getResolvedThemeSignal:()=>tx,getRgbTone:()=>Ve,getRoot:()=>pi,getRootContext:()=>gi,getRootData:()=>hi,getRootState:()=>di,getRootStateInKey:()=>Xc,getSafeInk:()=>zl,getSafeInkInfo:()=>yg,getSequenceValue:()=>qi,getSequenceValueBySymbols:()=>Ul,getSequenceValuePropertyPair:()=>ze,getShadow:()=>Qi,getShapeByKey:()=>ca,getSignals:()=>Fb,getSpacingBasedOnRatio:()=>Te,getSpacingByKey:()=>St,getSpreadChildren:()=>vp,getSubratio:()=>zi,getSubratioDifference:()=>Hi,getSystemGlobalTheme:()=>xe,getTheme:()=>ea,getThemeSignal:()=>Q_,getTimingByKey:()=>oe,getTimingFunction:()=>ye,global:()=>ld,gradient:()=>Xh,grid:()=>cg,hasFunction:()=>Ne,hasHandlerPlugin:()=>Wo,hasOwnProperty:()=>Fd,hashContent:()=>sn,hexToRgb:()=>Lh,hexToRgbArray:()=>wl,hexToRgba:()=>Fh,hslToRgb:()=>vl,icons:()=>Qh,inheritChildExtends:()=>$c,inheritChildPropsExtends:()=>Dc,inheritParentProps:()=>Gs,inheritRecursiveChildExtends:()=>Lc,init:()=>lr,initPolyglot:()=>jf,initProps:()=>Rp,injectGlobal:()=>kt,is:()=>Wt,isArray:()=>O,isBoolean:()=>xc,isCSSVar:()=>mt,isContextComponent:()=>Cp,isCyclic:()=>Kd,isDOMNode:()=>zt,isDate:()=>Sc,isDefined:()=>bt,isDevelopment:()=>xr,isDomDocument:()=>Xe,isEmpty:()=>kc,isEmptyObject:()=>Nd,isEnumeratedTrueFalseAttr:()=>ir,isEqualDeep:()=>vc,isFunction:()=>A,isGoogleFontsUrl:()=>dn,isHostObject:()=>Je,isHtmlElement:()=>_s,isLocal:()=>Zd,isLoudDevRuntime:()=>Pt,isMalformedDependency:()=>rn,isMethod:()=>ch,isMobile:()=>cp,isNode:()=>Ze,isNot:()=>ud,isNotProduction:()=>oo,isNull:()=>wc,isNumber:()=>Fe,isObject:()=>S,isObjectLike:()=>H,isPhoto:()=>mh,isProduction:()=>_r,isRawUnitValue:()=>ys,isResolvedColor:()=>Ae,isScalingUnit:()=>Jr,isStaging:()=>Jd,isState:()=>Fp,isStore:()=>yt,isString:()=>w,isStringFunction:()=>op,isSvgTag:()=>On,isTest:()=>Ac,isTesting:()=>Xd,isTracking:()=>lm,isUndefined:()=>Tt,isUniversallyReservedKey:()=>fh,isUnresolvableDependency:()=>ao,isValidDependencyMap:()=>on,isValidHtmlTag:()=>hp,isValidTag:()=>En,isWasmLoaded:()=>I0,isWrappedLibrary:()=>Ai,isWritableFamilyBucket:()=>cd,joinArrays:()=>Bo,jointStacks:()=>_p,keyframes:()=>Cn,keys:()=>ul,linearChannelToSrgb:()=>Tl,loadCssFile:()=>xh,loadJavascript:()=>wh,loadJavascriptFile:()=>yh,loadJavascriptFileEmbedSync:()=>_h,loadJavascriptFileSync:()=>bh,loadRemoteCSS:()=>Sh,loadRemoteScript:()=>nn,loadTranslations:()=>Na,loadWasm:()=>P0,log:()=>ih,logGroupIf:()=>ap,logIf:()=>ip,lookdown:()=>th,lookdownAll:()=>eh,lookup:()=>Qp,lowercaseFirstLetter:()=>Qr,makeObjectWithoutPrototype:()=>jd,map:()=>$d,mapStringsWithContextComponents:()=>zs,matchesComponentNaming:()=>Be,media:()=>Kh,memoize:()=>rp,merge:()=>gt,mergeSharedLibraries:()=>Ti,mixTwoColors:()=>$h,mixTwoRgb:()=>Nh,mixTwoRgba:()=>El,nextElement:()=>bi,normalizeIgnoreList:()=>Ei,normalizeLibraryKey:()=>an,numToLetterMap:()=>He,objectToString:()=>Ps,objectizeStringProperty:()=>Ws,oklabToLinearSrgb:()=>Ol,oklabToOklch:()=>$i,oklchToGamutSafeSrgb:()=>Li,oklchToOklab:()=>Rl,opacify:()=>fn,overwrite:()=>Ds,overwriteDeep:()=>qt,overwriteShallow:()=>ro,overwriteState:()=>Bp,parkHostObject:()=>mr,parse:()=>dl,parseColorToken:()=>Nt,parseDeep:()=>ai,pickupElementFromProps:()=>Bc,pickupPropsFromElement:()=>jc,polyglotFunctions:()=>Ja,polyglotPlugin:()=>Yn,popConfig:()=>tt,popStaticCssPass:()=>Jg,previousElement:()=>_i,propExists:()=>Tp,propertizeElement:()=>Uc,propertizeUpdate:()=>Ap,pushConfig:()=>it,pushStaticCssPass:()=>Xg,refreshContextProto:()=>yf,registerEvent:()=>Pn,registerHostPackages:()=>Vk,registerSignalInstance:()=>Mo,reinit:()=>dy,relativeLuminance:()=>lo,remove:()=>Ln,removeChars:()=>Rh,removeCookie:()=>up,removeDelegatedEvent:()=>ba,removeDuplicateProps:()=>Xs,removeDuplicatesInArray:()=>Uo,removeFromArray:()=>hd,removeFromObject:()=>Ud,removeNestedKeyByPath:()=>Hd,removeValueFromArray:()=>ks,removeValueFromArrayAll:()=>bd,reorderArrayByValues:()=>xd,replaceLiteralsWithObjectFields:()=>Zr,replaceOctalEscapeSequences:()=>Ad,resetEmitStats:()=>Og,resolveAsset:()=>Gt,resolveBorderValue:()=>re,resolveColorRgb:()=>go,resolveColorsInGradient:()=>ha,resolveConfigDocument:()=>No,resolveFileSource:()=>jg,resolveFileUrl:()=>pe,resolveHandler:()=>qo,resolvePropValue:()=>Lr,resolveShadowValue:()=>mo,resolveSharedLibraries:()=>Ah,returnSubThemeOrDefault:()=>Bh,returnValueAsText:()=>Hc,rgbArrayToHex:()=>Sl,rgbToHSL:()=>kl,rgbToHex:()=>Mh,runPluginHook:()=>At,runThroughMedia:()=>ql,scratchDefaultConfig:()=>hn,scratchSystem:()=>wn,scratchUtils:()=>Tr,self:()=>fd,semanticIcons:()=>tg,sequence:()=>rr,serializeAttrValue:()=>qe,set:()=>_o,setActiveConfig:()=>jl,setActiveDocument:()=>Tg,setActiveRootState:()=>ui,setAdaptiveSchemeVar:()=>Rr,setClass:()=>K1,setClassname:()=>UT,setColor:()=>Or,setCookie:()=>lp,setCssEngineHook:()=>$f,setCustomFont:()=>Mi,setCustomFontMedia:()=>Er,setEach:()=>vg,setFont:()=>na,setFontFamily:()=>_n,setFontImport:()=>pn,setGradient:()=>bn,setHashedExtend:()=>Oc,setInCustomFontMedia:()=>Il,setInObjectByPath:()=>zd,setLang:()=>ja,setLocalStorage:()=>pp,setMediaTheme:()=>oa,setNodeStyles:()=>fl,setObserver:()=>Mb,setProps:()=>oh,setPropsPrototype:()=>Ys,setSVG:()=>xn,setScalingVar:()=>Vi,setShadow:()=>Pr,setSubScalingVar:()=>Bl,setSvgIcon:()=>yo,setTheme:()=>ra,setValue:()=>kg,setVariables:()=>gg,setWasmEngine:()=>ma,shadow:()=>Zh,shape:()=>dg,sharedLibrary:()=>Eh,sizes:()=>ug,spacing:()=>Gh,splitPackageSpecifier:()=>ki,splitSpacedValue:()=>Zi,splitTopLevelCommas:()=>er,splitTransition:()=>Zl,spotByPath:()=>ci,srcsetFor:()=>cn,srgbChannelToLinear:()=>Al,srgbToOklab:()=>Di,stringIncludesAny:()=>Es,stringToObject:()=>Md,stripVersionRangePrefix:()=>vi,svg:()=>sg,svgData:()=>ig,swapItemsInArray:()=>gd,syncProps:()=>Js,templates:()=>ag,theme:()=>Jh,timing:()=>eg,toCamel:()=>Bi,toCamelCase:()=>Oi,toDashCase:()=>Ri,toDescriptionCase:()=>Ih,toLinearChannel:()=>ln,toTitleCase:()=>Ph,toggleFullscreen:()=>uh,transformBackgroundImage:()=>Xl,transformBorder:()=>We,transformBorderRadius:()=>sr,transformBoxShadow:()=>pa,transformClassname:()=>Gx,transformDuration:()=>ga,transformShadow:()=>Yl,transformSize:()=>_t,transformSizeRatio:()=>N,transformTextStroke:()=>Gl,transformTransition:()=>Sg,transformersByPrefix:()=>om,transfromGap:()=>Jl,translate:()=>Fa,triggerEventOn:()=>wr,triggerEventOnUpdate:()=>Vp,trimStringFromSymbols:()=>Cd,typography:()=>Ni,unit:()=>Vh,unstackArrayOfObjects:()=>Ss,update:()=>Dn,updateProps:()=>Pp,updateVars:()=>q1,upsertTranslation:()=>Ba,useCssInProps:()=>ie,useHostState:()=>cm,usePropsAsCSS:()=>qx,useSelectorsAsCSS:()=>Kx,variables:()=>xi,vars:()=>fg,verbose:()=>Zo,warn:()=>yi,warnStateKeyShadowsMethod:()=>_c,window:()=>v,wrapHoverRule:()=>Oe});module.exports=OC(Tb);var ad={};P(ad,{RESERVED_STORE_METHODS:()=>jb,SIGNAL_ENGINE_KEY:()=>Fo,SIGNAL_INSTANCES_KEY:()=>Lo,STORE_METHOD_NAMES:()=>Nb,VERSION:()=>Ub,__resetSignalEngine:()=>id,__resetSignalInstances:()=>sd,__resetStateShadowWarnings:()=>Bb,batch:()=>mc,createComputed:()=>Lb,createEffect:()=>Z,createScopeStore:()=>bc,createSignal:()=>ms,createStore:()=>Ye,getObserver:()=>yc,getSignals:()=>Fb,isStore:()=>yt,registerSignalInstance:()=>Mo,setObserver:()=>Mb,warnStateKeyShadowsMethod:()=>_c});var Ju={};P(Ju,{WRITE_JOURNAL:()=>ds,batch:()=>hs,createComputed:()=>PC,createEffect:()=>IC,createSignal:()=>Le,getObserver:()=>Yu,journalWrite:()=>ps,setObserver:()=>RC});var Ht=null,lc=0,fc=[],Yu=()=>Ht,RC=t=>{Ht=t},uc=0,Wu=[];function Le(t){let e=new Set;function r(){return Ht&&(e.add(Ht),Ht._sources.add(s)),t}function o(i){i!==t&&(t=i,NC(e))}function n(){return t}let s={get:r,set:o,peek:n,_subscribers:e,_type:"signal"};return s}function PC(t){let e,r=!0,o=new Set,n={_sources:new Set,_type:"computed",_subscribers:o,_execute(){Gu(n);let s=Ht;Ht=n;try{e=t(),r=!1}finally{Ht=s}},_notify(){r=!0,o.size>0&&Db(o)},get(){return Ht&&(o.add(Ht),Ht._sources.add(n)),r&&n._execute(),e},peek(){return r&&n._execute(),e}};return n._execute(),n}var ke=new Set,qu=!1,ds=[];function ps(t){ds.push(t),ds.length>32&&ds.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;Gu(o);let n=Ht;Ht=o;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{Ht=n}},_notify(){o._disposed||(lc>0?fc.push(o):uc>0?Wu.push(o):Xu(o))},dispose(){o._disposed=!0,Gu(o)}};return o._execute(),o}function hs(t){lc++;try{t()}finally{lc--,lc===0&&FC()}}var Ku=!1,Rb=1e3,DC=8,$C=256,LC=4;function Pb(){return typeof performance<"u"?performance.now():Date.now()}function Xu(t){ke.add(t),!Ku&&(qu||(qu=!0,queueMicrotask(Ib)))}var $o=[];function MC(){if(ke.size===1){let[e]=ke;return ke.clear(),e._disposed?0:(e._execute(),1)}$o.length=0;for(let e of ke)$o.push(e);ke.clear(),$o.sort((e,r)=>e._depth-r._depth);let t=0;for(let e=0;e<$o.length;e++){let r=$o[e];r._disposed||(r._execute(),t++)}return $o.length=0,t}function Ib(t=0,e=0){if(qu=!1,ke.size===0)return;Ku=!0;let r=Pb(),o=!1;try{for(;ke.size>0;){if(++t>Rb){let n=new Map;for(let c of ke){let l=c._label;if(typeof l=="function")try{l=l()}catch{l="<label error>"}if(l=l||"<unlabeled>",n.set(l,(n.get(l)||0)+1),n.size>=12)break}let s=[...n.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", "),i=new Map;for(let c of ds)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",Rb,"passes in a single flush \u2014 breaking to avoid hanging the thread.","This usually means an effect (or an onUpdate/subscribeTo handler","it calls into) unconditionally writes back a signal it depends on.","Still queued at break (the loop participants):",s||"<queue empty>","\u2014 last notifying store writes:",a||"<none recorded>"),ke.clear();break}if(e+=MC(),ke.size>0&&(e>=$C||t>=LC)&&Pb()-r>DC){o=!0,setTimeout(()=>Ib(t,e),0);break}}}finally{o||(Ku=!1)}}function FC(){for(let t=0;t<fc.length;t++)Xu(fc[t]);fc.length=0}function Db(t){uc++;try{for(let e of t)e._notify()}finally{if(uc--,uc===0&&Wu.length>0){let e=Wu.splice(0);for(let r=0;r<e.length;r++)Xu(e[r])}}}function NC(t){Db(t)}function Gu(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var nd={};P(nd,{RESERVED_STORE_METHODS:()=>gs,STORE_METHOD_NAMES:()=>od,__resetStateShadowWarnings:()=>jC,createScopeStore:()=>HC,createStore:()=>dc,getSignals:()=>VC,isStore:()=>UC,warnStateKeyShadowsMethod:()=>rd});var Me=Symbol("store"),pc=Symbol("signals"),od=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],gs=new Set(od),ed=new Set,Zu=(t,e)=>t?t+"."+e:String(e);function rd(t,e){let r=(e||"")+"::"+t;if(ed.has(r))return;ed.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: ${od.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(n)}function jC(){ed.clear()}var Qu=t=>!t||typeof t!="object"||Array.isArray(t)||t[Me]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!hc(t),BC=12,hc=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function gc(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(!gc(t[o],e[o],r+1))return!1;return!0}if(hc(t)&&hc(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)||!gc(t[s],e[s],r+1))return!1;return!0}return!1}function dc(t,e,r,o){r===void 0&&(r=0),o===void 0&&(o="");let n={},s={},i=e&&e.maxDepth||8;if(t&&typeof t=="object")for(let _ in t){if(_==="__proto__"||!Object.prototype.hasOwnProperty.call(t,_))continue;if(_.startsWith("__")){s[_]=t[_];continue}gs.has(_)&&rd(_,o);let y=t[_];r<i&&y&&typeof y=="object"&&!Qu(y)?(s[_]=y,n[_]=Le(dc(y,e,r+1,Zu(o,_)))):(s[_]=y,n[_]=Le(y))}let a=new Proxy(s,{get(_,y){if(y===Me)return!0;if(y===pc)return n;if(y==="__raw")return _;if(y==="$update")return c;if(y==="$parse")return f;if(y==="$clean")return u;if(y==="$keys")return d;if(y==="$values")return h;if(y==="$replace")return g;if(y==="$add")return p;if(y==="$remove")return m;if(y==="$destroy")return b;if(y==="$quietUpdate")return l;if(gs.has(y)&&!Object.prototype.hasOwnProperty.call(n,y))switch(y){case"update":return c;case"parse":return f;case"clean":return u;case"keys":return d;case"values":return h;case"replace":return g;case"add":return p;case"remove":return m;case"destroy":return b;case"quietUpdate":return l}if(y==="__element")return _.__element;if(y==="parent")return _.parent;if(y==="root")return _.root;if(Object.prototype.hasOwnProperty.call(n,y)){let k=n[y].get();if(k!==void 0||!(y!=="root"&&_.root&&_.root!==a))return k}if(_[y]!==void 0)return _[y];let x=typeof y=="string"&&!y.startsWith("__")&&y!=="then"&&y!=="constructor"&&Yu()!=null;if(y!=="root"&&_.root&&_.root!==a){let k=_.root[y];return k===void 0&&x&&!Object.prototype.hasOwnProperty.call(n,y)?(n[y]=Le(void 0),n[y].get()):k}if(x)return n[y]=Le(void 0),n[y].get()},set(_,y,x){if(y==="__proto__")return!1;if(y==="__element"||y==="parent"||y==="root"||typeof y=="string"&&y.startsWith("__")&&!Object.prototype.hasOwnProperty.call(n,y))return _[y]=x,!0;gs.has(y)&&rd(y,o);let k=Zu(o,y);if(Object.prototype.hasOwnProperty.call(n,y))if(x&&typeof x=="object"&&!Qu(x)){if(x===_[y])return!0;let E=n[y].peek(),T=E&&E[Me]?E.$parse():E;if(gc(x,T,0))return!0;_[y]=x,ps(k),n[y].set(dc(x,e,r+1,k))}else{if(Array.isArray(x)&&x!==_[y]&&Array.isArray(n[y].peek())&&gc(x,n[y].peek(),0))return!0;n[y].peek()!==x&&ps(k),_[y]=x,n[y].set(x)}else _[y]=x,x&&typeof x=="object"&&!Qu(x)?n[y]=Le(dc(x,e,r+1,k)):n[y]=Le(x);return!0},has(_,y){return typeof y=="string"&&y.charCodeAt(0)===36&&gs.has(y.slice(1))?!0:y in n||y in _},ownKeys(_){return Object.keys(n)},getOwnPropertyDescriptor(_,y){return y in n?{enumerable:!0,configurable:!0,value:n[y].peek()}:Object.getOwnPropertyDescriptor(_,y)},deleteProperty(_,y){return n[y]&&(n[y].peek()!==void 0&&ps(Zu(o,y)),n[y].set(void 0),delete n[y]),delete _[y],!0}});function c(_,y){hs(()=>{for(let k in _)k!=="__proto__"&&(a[k]=_[k])});let x=s.__element;return x&&x.onUpdate&&!y?.quiet&&x.onUpdate(x,a,x.context),a}function l(_){return c(_,{quiet:!0})}function f(_){if(_||(_=new Set),_.has(a))return"[Circular]";_.add(a);let y={};for(let x in n){if(x==="parent"||x==="root"||x.startsWith("__"))continue;let k=n[x].peek();k&&k[Me]?y[x]=k.$parse(_):y[x]=k}return y}function u(){return hs(()=>{for(let _ in n)delete a[_]}),a}function d(){return Object.keys(n)}function h(){return Object.keys(n).map(_=>n[_].peek())}function g(_){return hs(()=>{for(let y in n)y in _||delete a[y];for(let y in _)y!=="__proto__"&&(a[y]=_[y])}),a}function p(_,y){let x=Object.prototype.hasOwnProperty.call(n,_)?n[_].peek():s[_];if(Array.isArray(x))return a[_]=[...x,y],a;if(x&&typeof x=="object"&&!Array.isArray(x)){if(hc(y))x[Me]?x.$update(y):a[_]={...x,...y};else{let k=String(Object.keys(x).length);x[Me]?x.$update({[k]:y}):a[_]={...x,[k]:y}}return a}return a[_]=y,a}function m(_){return delete a[_],a}function b(){u(),s.__element=null,s.parent=null}return a}function UC(t){return t&&t[Me]===!0}function VC(t){return t[pc]}function HC(t,e){let r={},o={};if(t&&typeof t=="object")for(let i in t)o[i]=t[i],r[i]=Le(t[i]);let n=i=>{if(Object.prototype.hasOwnProperty.call(r,i))return r;let a=e;for(;a;){let c=a[pc];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[Me]?a[td]:null}return null};return new Proxy(o,{get(i,a){return a===Me?!0:a===pc?r:a===td?e:a==="__raw"?i:Object.prototype.hasOwnProperty.call(r,a)?r[a].get():e&&a!=="then"&&a!=="constructor"?e[a]:i[a]},set(i,a,c){let l=n(a);return l?(l===r&&(i[a]=c),l[a].set(c),!0):(i[a]=c,r[a]=Le(c),!0)},has(i,a){if(a in r||a in i)return!0;let c=e;for(;c;){if(a in c)return!0;c=c[Me]?c[td]: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 td=Symbol("scope.parent");var Xr="3.14.781";var Lo="__SMBLS_SIGNAL_INSTANCES__",Mo=(t,e,r)=>{let o=e||(typeof globalThis<"u"?globalThis:null);if(!o)return null;let n=o[Lo]||(o[Lo]={versions:[],engines:0,reported:!1});return typeof n.engines!="number"&&(n.engines=n.versions.length),n.versions.push(t||Xr),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},sd=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[Lo]};var Fo="__SMBLS_SIGNAL_ENGINE__",$b=(t,e,r)=>{let o=e||Xr,n=r||(typeof globalThis<"u"?globalThis:null);if(!n)return t;let s=n[Fo];return s&&s.engine&&s.version===o?(Mo(o,n,!0),s.engine):(s||(n[Fo]={version:o,engine:t}),Mo(o,n,!1),t)},id=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[Fo]};var Mt=$b({...Ju,...nd,VERSION:Xr},Xr),ms=Mt.createSignal,Lb=Mt.createComputed,Z=Mt.createEffect,mc=Mt.batch,yc=Mt.getObserver,Mb=Mt.setObserver,Ye=Mt.createStore,bc=Mt.createScopeStore,yt=Mt.isStore,Fb=Mt.getSignals,Nb=Mt.STORE_METHOD_NAMES,jb=Mt.RESERVED_STORE_METHODS,_c=Mt.warnStateKeyShadowsMethod,Bb=Mt.__resetStateShadowWarnings,Ub=Mt.VERSION;var Dg={};P(Dg,{assertEmitIntegrity:()=>Rg,css:()=>_e,getActiveDocument:()=>sf,getCacheSize:()=>Ig,getEmitStats:()=>af,injectGlobal:()=>kt,keyframes:()=>Cn,reset:()=>Tx,resetEmitStats:()=>Og,setActiveDocument:()=>Tg,setWasmEngine:()=>ma,wrapHoverRule:()=>Oe});var Cg={};P(Cg,{CONFIG:()=>ho,CONFIG_MERGE_EXL:()=>ee,CSS_NAMED_COLOR_HEX:()=>xl,CSS_NATIVE_COLOR_REGEX:()=>te,CSS_UNITS:()=>jo,FACTORY:()=>he,STANDARD_SCHEME_QUERIES:()=>Hl,VALUE_TRANSFORMERS:()=>Ql,activateConfig:()=>ex,animation:()=>ng,appendSVGSprite:()=>ua,appendSvgIconsSprite:()=>bo,applyDocument:()=>fa,applyHeadings:()=>Kl,applyMediaSequenceVars:()=>Ar,applyReset:()=>da,applySequenceGlobalVars:()=>Gi,applySequenceVars:()=>nr,applySpacingSequence:()=>Ji,applyTimingSequence:()=>la,applyTypographySequence:()=>ia,breakpoints:()=>rg,changeGlobalTheme:()=>tf,changeLightness:()=>jh,checkIfBoxSize:()=>Xi,class:()=>lg,color:()=>Yh,colorStringToRgbaArray:()=>de,compositeOverBackdrop:()=>fo,contrastRatio:()=>un,convertSvgToSymbol:()=>Yi,createConfig:()=>Ui,cssMediaVars:()=>Nl,cssVars:()=>Fl,defineResolvedThemeSignal:()=>mn,defineThemeSignal:()=>gn,devices:()=>og,document:()=>J_,findHeadingLetter:()=>Vl,findHeadings:()=>Ki,font:()=>Hh,fontFace:()=>qh,fontFamily:()=>zh,fontFamilyTypes:()=>Wh,generateSequence:()=>Yt,generateSequencePosition:()=>hg,generateSprite:()=>yn,generateSubSequence:()=>Wi,getActiveConfig:()=>C,getColor:()=>et,getColorShade:()=>Cl,getDefaultOrFirstKey:()=>uo,getFnPrefixAndValue:()=>or,getFontFace:()=>Uh,getFontFaceEach:()=>po,getFontFaceEachString:()=>Dl,getFontFaceString:()=>Fi,getFontFamily:()=>sa,getFontFormat:()=>Pl,getFontSizeByKey:()=>aa,getMediaColor:()=>It,getMediaTheme:()=>me,getResolvedThemeSignal:()=>tx,getRgbTone:()=>Ve,getSafeInk:()=>zl,getSafeInkInfo:()=>yg,getSequenceValue:()=>qi,getSequenceValueBySymbols:()=>Ul,getSequenceValuePropertyPair:()=>ze,getShadow:()=>Qi,getShapeByKey:()=>ca,getSpacingBasedOnRatio:()=>Te,getSpacingByKey:()=>St,getSubratio:()=>zi,getSubratioDifference:()=>Hi,getTheme:()=>ea,getThemeSignal:()=>Q_,getTimingByKey:()=>oe,getTimingFunction:()=>ye,gradient:()=>Xh,grid:()=>cg,hexToRgb:()=>Lh,hexToRgbArray:()=>wl,hexToRgba:()=>Fh,hslToRgb:()=>vl,icons:()=>Qh,isCSSVar:()=>mt,isDomDocument:()=>Xe,isGoogleFontsUrl:()=>dn,isHostObject:()=>Je,isRawUnitValue:()=>ys,isResolvedColor:()=>Ae,isScalingUnit:()=>Jr,isWritableFamilyBucket:()=>cd,linearChannelToSrgb:()=>Tl,media:()=>Kh,mixTwoColors:()=>$h,mixTwoRgb:()=>Nh,mixTwoRgba:()=>El,numToLetterMap:()=>He,oklabToLinearSrgb:()=>Ol,oklabToOklch:()=>$i,oklchToGamutSafeSrgb:()=>Li,oklchToOklab:()=>Rl,opacify:()=>fn,parkHostObject:()=>mr,parseColorToken:()=>Nt,popConfig:()=>tt,pushConfig:()=>it,relativeLuminance:()=>lo,reset:()=>Z_,resolveBorderValue:()=>re,resolveColorRgb:()=>go,resolveColorsInGradient:()=>ha,resolveConfigDocument:()=>No,resolveFileUrl:()=>pe,resolveShadowValue:()=>mo,returnSubThemeOrDefault:()=>Bh,rgbArrayToHex:()=>Sl,rgbToHSL:()=>kl,rgbToHex:()=>Mh,runThroughMedia:()=>ql,scratchDefaultConfig:()=>hn,scratchSystem:()=>wn,scratchUtils:()=>Tr,semanticIcons:()=>tg,sequence:()=>rr,set:()=>_o,setActiveConfig:()=>jl,setAdaptiveSchemeVar:()=>Rr,setColor:()=>Or,setCustomFont:()=>Mi,setCustomFontMedia:()=>Er,setEach:()=>vg,setFont:()=>na,setFontFamily:()=>_n,setFontImport:()=>pn,setGradient:()=>bn,setInCustomFontMedia:()=>Il,setMediaTheme:()=>oa,setSVG:()=>xn,setScalingVar:()=>Vi,setShadow:()=>Pr,setSubScalingVar:()=>Bl,setSvgIcon:()=>yo,setTheme:()=>ra,setValue:()=>kg,setVariables:()=>gg,shadow:()=>Zh,shape:()=>dg,sizes:()=>ug,spacing:()=>Gh,splitSpacedValue:()=>Zi,splitTopLevelCommas:()=>er,splitTransition:()=>Zl,srgbChannelToLinear:()=>Al,srgbToOklab:()=>Di,svg:()=>sg,svgData:()=>ig,templates:()=>ag,theme:()=>Jh,timing:()=>eg,toCamel:()=>Bi,toLinearChannel:()=>ln,transformBackgroundImage:()=>Xl,transformBorder:()=>We,transformBorderRadius:()=>sr,transformBoxShadow:()=>pa,transformDuration:()=>ga,transformShadow:()=>Yl,transformSize:()=>_t,transformSizeRatio:()=>N,transformTextStroke:()=>Gl,transformTransition:()=>Sg,transfromGap:()=>Jl,typography:()=>Ni,unit:()=>Vh,vars:()=>fg});var Tr={};P(Tr,{CSS_NAMED_COLOR_HEX:()=>xl,CSS_NATIVE_COLOR_REGEX:()=>te,CSS_UNITS:()=>jo,applyMediaSequenceVars:()=>Ar,applySequenceGlobalVars:()=>Gi,applySequenceVars:()=>nr,changeLightness:()=>jh,colorStringToRgbaArray:()=>de,compositeOverBackdrop:()=>fo,contrastRatio:()=>un,convertSvgToSymbol:()=>Yi,findHeadingLetter:()=>Vl,findHeadings:()=>Ki,generateSequence:()=>Yt,generateSequencePosition:()=>hg,generateSprite:()=>yn,generateSubSequence:()=>Wi,getColorShade:()=>Cl,getDefaultOrFirstKey:()=>uo,getFnPrefixAndValue:()=>or,getFontFace:()=>Uh,getFontFaceEach:()=>po,getFontFaceEachString:()=>Dl,getFontFaceString:()=>Fi,getFontFormat:()=>Pl,getRgbTone:()=>Ve,getSequenceValue:()=>qi,getSequenceValueBySymbols:()=>Ul,getSequenceValuePropertyPair:()=>ze,getSubratio:()=>zi,getSubratioDifference:()=>Hi,hexToRgb:()=>Lh,hexToRgbArray:()=>wl,hexToRgba:()=>Fh,hslToRgb:()=>vl,isCSSVar:()=>mt,isDomDocument:()=>Xe,isGoogleFontsUrl:()=>dn,isHostObject:()=>Je,isRawUnitValue:()=>ys,isResolvedColor:()=>Ae,isScalingUnit:()=>Jr,isWritableFamilyBucket:()=>cd,linearChannelToSrgb:()=>Tl,mixTwoColors:()=>$h,mixTwoRgb:()=>Nh,mixTwoRgba:()=>El,numToLetterMap:()=>He,oklabToLinearSrgb:()=>Ol,oklabToOklch:()=>$i,oklchToGamutSafeSrgb:()=>Li,oklchToOklab:()=>Rl,opacify:()=>fn,parkHostObject:()=>mr,parseColorToken:()=>Nt,relativeLuminance:()=>lo,resolveConfigDocument:()=>No,resolveFileUrl:()=>pe,returnSubThemeOrDefault:()=>Bh,rgbArrayToHex:()=>Sl,rgbToHSL:()=>kl,rgbToHex:()=>Mh,setCustomFont:()=>Mi,setCustomFontMedia:()=>Er,setFontImport:()=>pn,setInCustomFontMedia:()=>Il,setScalingVar:()=>Vi,setSubScalingVar:()=>Bl,setVariables:()=>gg,splitTopLevelCommas:()=>er,srgbChannelToLinear:()=>Al,srgbToOklab:()=>Di,toLinearChannel:()=>ln});var Xe=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0),Je=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)},cd=t=>t!==null&&typeof t=="object"&&!Je(t),mr=(t,e,r)=>{if(!t)return;if(Xe(r)){t.__domDocument||(t.__domDocument=r);return}let o=`__host_${e}`;t[o]||(t[o]=r)},No=t=>t?Xe(t.__domDocument)?t.__domDocument:Xe(t.document)?t.document:null:null;var Jr=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",jo=["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"],zC=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),WC=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${jo.filter(t=>t!=="auto").map(zC).join("|")})$`),ys=t=>WC.test(String(t).trim());R();var xl={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},de=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=xl[t.toLowerCase()];if(e&&(t=e),t[0]==="#")return t.length<7&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(t.length>4?t[4]+t[4]:"")),[parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16),parseInt(t.substr(5,2),16),t.length>7?parseInt(t.substr(7,2),16)/255:1];if(t.indexOf("rgb")===-1&&Q&&v){let r=Q.body.appendChild(Q.createElement("fictum")),o="rgb(1, 2, 3)";if(r.style.color=o,r.style.color!==o){Q.body.removeChild(r);return}if(r.style.color=t,r.style.color===o||r.style.color==="")return Q.body.removeChild(r),[0,0,0,0];t=v.getComputedStyle(r).color,Q.body.removeChild(r)}return t.indexOf("rgb")===0?(t.indexOf("rgba")===-1&&(t=`${t}, 1`),t.match(/[\.\d]+/g).map(r=>+r)):[0,0,0,0]},$h=(t,e,r=.5)=>(t=de(t),e=de(e),El(t,e,r)),Lh=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${r},${o},${n})`},wl=(t,e=1)=>{let[r,o,n]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[r,o,n]},Mh=(t,e,r)=>"#"+(1<<24|t<<16|e<<8|r).toString(16).slice(1),Sl=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1),Fh=(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})`},jh=(t,e)=>{let[r,o,n]=e,s=Math.max(0,Math.min(100,n+parseFloat(t)));return[r,o,s]},kl=(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]},vl=(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)],Cl=(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)},El=(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})`},fn=(t,e)=>{let r=de(t);if(!r){oo()&&console.warn(t+" color is not rgba");return}return r[3]=e,`rgba(${r})`},mt=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,te=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,ZE=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,Nt=t=>{if(!w(t))return null;if(te.test(t))return{passthrough:t};if(mt(t))return{cssVar:t};let e=t.match(ZE);if(!e)return null;let[,r,o,n]=e,s=o!==void 0?`0.${o}`:void 0,i=n&&n[0]==="="?n.slice(1):n;return{name:r,alpha:s,tone:i}},Ae=t=>w(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),er=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},ln=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),lo=t=>.2126*ln(t[0])+.7152*ln(t[1])+.0722*ln(t[2]),un=(t,e)=>{let r=lo(t)+.05,o=lo(e)+.05;return r>o?r/o:o/r},Al=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),Tl=t=>(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*255,Di=([t,e,r])=>{let[o,n,s]=[t,e,r].map(Al),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]},Ol=([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]},$i=([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]},Rl=([t,e,r])=>{let o=r*Math.PI/180;return[t,e*Math.cos(o),e*Math.sin(o)]},Li=(t,e,r,o=24)=>{let n=a=>Ol(Rl([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=>Tl(Math.max(0,Math.min(1,a))))},fo=(t,e=1,r=[255,255,255])=>e>=1?t:t.map((o,n)=>o*e+r[n]*(1-e)),Ve=(t,e)=>{w(t)&&t.includes("rgb")&&(t=de(t).join(", ")),w(t)&&(t=t.split(",").map(n=>parseFloat(n.trim()))),Fe(e)&&(e+="");let r=Sl(t),o=e.slice(0,1);if(o==="-"||o==="+"){let n=Cl(r,parseFloat(e));return wl(n).join(", ")}else{let[n,s,i]=t,[a,c]=kl(n/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return vl(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var Bh=(t,e)=>{if(t)return t.themes&&t.themes[e]?t.themes[e]:t[e]?[t,t[e]]:t};var pe=(t,e)=>{if(!t||!e)return null;try{return new URL(t),null}catch{}let r=e[t];return r?r.content&&r.content.src:null},uo=(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},Pl=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},dn=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),pn=t=>`@import url('${t}');`,Il=t=>`@font-face { ${t} }`,Mi=(t,e,r,o={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=Pl(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};`},Cr=(t,e,r,o)=>`@font-face {${$i(t,e,r,o)}
40
- }`,uo=(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=>de(u,r)||u):de(s,r)||s;return $i(t,f,i,{fontStyle:a,fontDisplay:c,fontStretch:l})}),jh=t=>Object.keys(t).map(r=>uo(r,t[r].value)),Pl=(t,e,r)=>{if(e&&e.isVariable){let s=de(e.url,r)||e.url;return fn(s)?un(s):Cr(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap"})}if(e[0])return uo(t,e,r).map(Rl);let n=Array.isArray(e.url)?e.url.map(s=>de(s,r)||s):de(e.url,r)||e.url;return Cr(t,n,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch})},Li=(t,e)=>Object.keys(t).map(o=>Pl(o,t[o].value,e));R();R();R();R();var dn={};P(dn,{animation:()=>rg,breakpoints:()=>tg,class:()=>ag,color:()=>Kh,devices:()=>eg,document:()=>K_,font:()=>Uh,fontFace:()=>zh,fontFamily:()=>Vh,fontFamilyTypes:()=>Hh,gradient:()=>Gh,grid:()=>ig,icons:()=>Jh,media:()=>Wh,reset:()=>G_,semanticIcons:()=>Zh,sequence:()=>er,shadow:()=>Xh,shape:()=>fg,sizes:()=>lg,spacing:()=>qh,svg:()=>og,svgData:()=>ng,templates:()=>sg,theme:()=>Yh,timing:()=>Qh,typography:()=>Mi,unit:()=>Bh,vars:()=>cg});var er={"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 Bh={default:"em"};var qE={browserDefault:16,base:16,type:"font-size",ratio:er["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},Mi=qE;var Uh={};var Vh={},Hh={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},zh={};var Wh={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var KE={base:Mi.base,type:"spacing",ratio:er.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},qh=KE;var Kh={},Gh={};var Yh={};var Xh={};var Jh={},Zh={};var GE={default:150,base:150,type:"timing",ratio:er["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},Qh=GE;var K_={};var tg={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},eg={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 rg={};var og={},ng={};var sg={};var YE={},ig=YE;var ag={};var G_={},cg={},lg={},fg={};var Ll={},Ml={},Il=dn,Dl={},Ni=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in Il){let e=t.toLowerCase();Dl[e]=Il[t];let r=Ni(e);r!==e&&(Dl[r]=Il[t]),e!==t&&(Dl[t]=Il[t])}var po={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:Ll,cssMediaVars:Ml,CSS_VARS:Ll,CSS_MEDIA_VARS:Ml,_scratchConfig:!0,...Dl},pn=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return bt(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let r=bt(e)?e:t.globalTheme,o=hs(bt(r)?r:"auto");return Object.defineProperty(t,"globalTheme",{get(){return o.get()},set(n){o.set(n)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"__globalThemeSignal",{value:o,enumerable:!1,configurable:!0,writable:!0}),o},Y_=t=>t?pn(t):null,hn=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return bt(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let r=bt(e)?e:t.resolvedTheme,o=hs(bt(r)?r:null);return Object.defineProperty(t,"resolvedTheme",{get(){return o.get()},set(n){o.set(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"__resolvedThemeSignal",{value:o,enumerable:!1,configurable:!0,writable:!0}),o},X_=t=>t?hn(t):null;pn(po);hn(po);var $l=dt(po),pe={active:"0",0:po},J_=t=>(bt(t)&&(pe.active=t),pe[t||pe.active]),Fi=[],it=t=>{t&&t._scratchConfig&&Fi.push(t)},tt=()=>{Fi.pop()},C=t=>Fi.length?Fi[Fi.length-1]:pe[t||pe.active]||po,Fl=t=>{if(S(t))return pe.active="1",pe[1]=st(t,dt($l)),pn(pe[1]),hn(pe[1]),t},XE=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],JE=["useVariable","globalTheme","verbose"],ZE=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],QE=t=>{for(let e of ZE){let r;for(let o of e){let n=t[o];S(n)&&(r=r?st(n,r):n)}if(r)for(let o of e)S(t[o])&&(t[o]=r)}},ji=(t,e,{cleanBase:r=!1}={})=>{let o=r?null:C(),n=dt(!r&&o&&o._scratchConfig?o:$l);for(let i of XE)delete n[i];for(let i of JE)Object.prototype.hasOwnProperty.call($l,i)?n[i]=$l[i]:delete n[i];let s=st(e||{},n);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s._scratchConfig=!0,QE(s),pn(s),hn(s),t&&(pe[t]=s),s};var Ve={"-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"},ug=(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},rr=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"]),Bi=(t,e)=>{let{base:r,type:o,unit:n}=e,s=Z_.has(n)?"rem":n,i=(Xr(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=Ve[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=Ve[t+1],u=Math.abs(t),d=Math.pow(Q_,2*u),h=Ve[u];return h?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${h}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},Nl=(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}))`},Ui=(t,e)=>{let o=(t*e-t)/1.618,n=t*e-o,s=t+o,i=(n+s)/2;return[n,i,s]},Vi=(t,e)=>Ui(t,e).map(r=>r/t),Hi=(t,e)=>{let{key:r,base:o,value:n,ratio:s,variable:i,index:a}=t,l=~~(n*s)-~~n,f,[u,d,h]=Ui(n,s);l>16?f=[u,d,h]:f=[u,h],f.forEach((g,p)=>{let m=~~(g/o*1e3)/1e3,b=i+(p+1),_=a+(p+1)/10,y=Nl(p+1,f,i,e),x={key:r+(p+1),variable:b,value:g,scaling:m,scalingVariable:y,index:_};ug(x,e)})},Q_=1.618,tA=(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(Q_,2*o);return Math.max(n,s)},Yt=t=>{let{type:e,base:r,ratio:o,range:n,subSequence:s}=t,i=Math.abs(n[0])+Math.abs(n[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=n[1]-l,u=Ve[f],d=tA(f,r,o),h=~~(d/r*100)/100,g=c+u,p=Bi(f,t),m={key:u,variable:g,value:d,base:r,scaling:h,scalingVariable:p,ratio:o,index:f};ug(m,t),s&&Hi(m,t)}return t},dg=(t,e=0)=>{let{type:r,base:o,ratio:n,subSequence:s}=t,i=w(e)?e:Ve[e],a=w(e)?Object.entries(Ve).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=Bi(a,t),p={key:i,variable:h,value:l,base:o,scaling:f,scalingVariable:g,ratio:n,index:a};return ug(p,c),s&&Hi(p,c),c},zi=(t="A",e)=>{let r=C(),{unit:o}=r;if(w(t)&&mt(t))return`var(${t})`;if(w(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(w(t)){let y=r.sizes;if(y){let x=y[t]||y[t.toLowerCase()];if(x!==void 0)return t.slice(0,1)==="-"?`calc(${x} * -1)`:x}}let{sequence:n,unit:s=o.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(gs(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+"-":""}${Ti(e.type.replace(".","-"))}-`,h=t.toUpperCase(),g=h.slice(0,1)==="-"?"-":"",p=g?h.slice(1):h,m="";p.includes("_")&&(m="_"+p.split("_")[1].toLowerCase(),p=p.split("_")[0]);let b=y=>a.test(y)?`var(${d}${y}${m})`:y;if(p.includes("+")){let[y,x]=p.split("+"),k=`${b(y)} + ${b(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(p.includes("*")){let[y,x]=p.split("*"),k=`${b(y)} * ${b(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(p.includes("-")){let[y,x]=p.split("-"),k=`${b(y)} - ${b(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}if(!n[p]&&p.length===2&&(r.verbose&&console.warn(p,"- value is not found because `subSequence` is set to false"),p=p.slice(0,1)),i||r.useVariable){let y=`var(${d}${p}${m})`;return g?`calc(${y} * -1)`:y}let _=n?n[p]:null;if(!_){if(console.warn("can't find",n,p),Pt())throw new Error(`[smbls] Unresolvable design-system token "${t}"`+(e.type?` for sequence "${e.type}"`:"")+" \u2014 not a registered `sizes` name and not a valid spacing/typography/timing sequence letter. The CSS property using it would silently be dropped in production. Register the token in `designSystem/sizes.js` (or the relevant sequence family) or fix the typo.");return}return s==="ms"||s==="s"?g+_.val+s:g+_.scaling+s},jl=(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:zi(i,e)}).join("")},He=(t,e,r,o)=>{if(typeof t!="string")return C().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!o&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let s=rr(t);o=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=jl(t,r):t=zi(t,r),{[e]:o?`${o}(${t})`:t}},Bl=(t,e)=>Ve[t-e],Wi=t=>{let{h1Matches:e,sequence:r}=t;return new Array(6).fill(null).map((o,n)=>{let s=Bl(e,n);return r[s]})};R();var pg=(t,e)=>{let r=C(),{cssVars:o}=r;H(t.value)||(o[t.var]=t.value)},qi=(t,e,r)=>{let o=C(),{unit:n}=o,s=e.unit||n.default,{base:i,ratio:a,type:c}=e,f="--"+(e.varPrefix?e.varPrefix+"-":"")+(c&&c.replace(".","-"));t[`${f}-base`]=i,t[`${f}-unit`]=s;let u=`${f}-ratio`;t[u]=a;let[d,h,g]=Vi(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})`},tx=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),or=(t,e={})=>{let r=C(),{unit:o,timing:n,cssVars:s}=r,i=t.unit||o.default,a=tx.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||qi(s,t,e);for(let u in l){let d=l[u],h=(t.type===n.type?l[u].val:f[u])+a;if(!c){s[d.variable+"_default"]=h,s[d.variable]=d.scalingVariable;continue}e.useDefault===!1?s[d.variable]=h:(s[d.variable+"_default"]=h,s[d.variable]=`var(${d.variable+"_default"})`)}},Er=(t,e,r={})=>{let o=C(),{unit:n,media:s,cssVars:i}=o,a=e.slice(1),c=t[e],l=c.unit||t.unit||n.default,f=tx.has(l)?"rem":l,{mediaRegenerate:u}=t,{sequence:d,scales:h}=c,g=s[a];if(!g&&o.verbose&&console.warn("Can't find media query ",g),!u){let p=i[`@media ${g}`];p||(p=i[`@media ${g}`]={}),qi(p,c,r);let m=t.unit||n.default;if(f!==m&&d)for(let b in d){let _=d[b],y=h[b]+f;p[_.variable+"_default"]=y,p[_.variable]=y}return}for(let p in d){let m=d[p],b=(Xr(f)?h[p]:d[p].val)+f;!g&&o.verbose&&console.warn("Can't find query ",g);let _=i[`@media ${g}`];_||(_=i[`@media ${g}`]={}),_[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=b}};R();var rx=ro(),gn=t=>{let e=C(),r="";for(let o in t)e.__svgCache[o]||(e.__svgCache[o]=!0,r+=t[o]);return r},eA=t=>{let e=t&&(t.default||t);if(!w(e))return rx&&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},{}):{}},rA=(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},ex=new Set,Ki=(t,e)=>{let r=e&&e.default?e.default:e;if(!w(r))return rx&&!ex.has(t)&&(ex.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=eA(e),{width:s,height:i}=n,a=n.viewBox||`0 0 ${s||24} ${i||24}`,f=rA(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=sA(f),f},oA="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",nA=new RegExp(`<(${oA})\\b([^>]*?)\\s*/>`,"g"),sA=t=>t.replace(nA,"<$1$2></$1>");var _n={};P(_n,{STANDARD_SCHEME_QUERIES:()=>Ul,appendSVGSprite:()=>la,appendSvgIconsSprite:()=>yo,applyDocument:()=>ca,applyHeadings:()=>Wl,applyReset:()=>fa,applySpacingSequence:()=>Yi,applyTimingSequence:()=>aa,applyTypographySequence:()=>na,checkIfBoxSize:()=>Gi,getColor:()=>et,getFontFamily:()=>oa,getFontSizeByKey:()=>sa,getMediaColor:()=>It,getMediaTheme:()=>ge,getSafeInk:()=>Vl,getSafeInkInfo:()=>hg,getShadow:()=>Ji,getShapeByKey:()=>ia,getSpacingBasedOnRatio:()=>Ae,getSpacingByKey:()=>St,getTheme:()=>Qi,getTimingByKey:()=>re,getTimingFunction:()=>me,resolveBorderValue:()=>ee,resolveColorRgb:()=>ho,resolveShadowValue:()=>go,runThroughMedia:()=>zl,setAdaptiveSchemeVar:()=>Or,setColor:()=>Tr,setFont:()=>ra,setFontFamily:()=>yn,setGradient:()=>mn,setMediaTheme:()=>ea,setSVG:()=>bn,setShadow:()=>Rr,setSvgIcon:()=>mo,setTheme:()=>ta,splitSpacedValue:()=>Xi});R();var Ul={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},he=new Set,iA=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"]),ox=new Set,aA=t=>{if(!t)return!1;let{color:e,gradient:r}=t;return!!(S(e)&&Object.keys(e).length||S(r)&&Object.keys(r).length)},sx=(t,e,r)=>{let o=w(e)?e.toLowerCase():"";if(!iA.has(o)||!aA(r))return t;if(!ox.has(o)){ox.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.`)}},et=(t,e,r)=>{let o=r||C();if(!w(t)){o.verbose&&console.warn(t,"- type for color is not valid");return}if(mt(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let n,s,i;if(O(t))[n,s,i]=t;else{let u=Gt(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 sx(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(he.has(n))return l;he.add(n);try{return et(l,null,r)}finally{he.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=Ue(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})`},nx=t=>{let e=ue(t);return!e||e.length<3||e[0]===0&&e[1]===0&&e[2]===0&&e[3]===0&&t.toLowerCase()!=="transparent"?null:{rgb:[e[0],e[1],e[2]],alpha:e[3]!==void 0?e[3]:1}},cA=(t,e)=>{if(!e)return t;let r=t.rgb;if(e.tone){let n=Ue(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}},ho=(t,e,r)=>{let o=e||C();if(!w(t))return null;let n=Gt(t);if(n){if(n.passthrough){let d=ue(n.passthrough);return d&&d.length>=3?{rgb:[d[0],d[1],d[2]],alpha:d[3]!==void 0?d[3]:1}:null}if(n.cssVar)return null}let s=n?n.name:t,{color:i,gradient:a}=o,c=i[s]||a[s];if(!c)return nx(t);if(w(c)){let d;if(he.has(s))d=nx(c);else{he.add(s);try{d=ho(c,o,r)}finally{he.delete(s)}}return d?cA(d,n):null}if(c.rgb===void 0&&S(c)){let d=`@${r||"light"}`;c=c[d]!==void 0?c[d]:c["@light"]}if(!c||c.rgb===void 0)return null;let l=c.rgb;n&&n.tone&&(l=Ue(l,n.tone));let f=w(l)?l.split(",").map(d=>parseFloat(d.trim())):l,u=n&&n.alpha!==void 0?parseFloat(n.alpha):c.alpha!==void 0?c.alpha:1;return{rgb:f,alpha:u}},It=(t,e,r)=>{let o=r||C();if(e||(e=o.globalTheme==="auto"?null:o.globalTheme),!w(t)){o.verbose&&console.warn(t,"- type for color is not valid");return}if(mt(t))return`var(${t})`;let n,s,i;if(O(t))n=t[0];else{let u=Gt(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;n=u.name,s=u.alpha,i=u.tone}else n=t}let{color:a,gradient:c}=o,l=a[n]||c[n],f=S(l);if(f&&l.value)return et(t,`@${e}`,r);if(f){if(o.useVariable&&l.var)return s||i?et(t,null,r):`var(${l.var})`;if(e)return et(t,`@${e}`,r);{let u={},d=o.scopeSelector||":root",h=d===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${d}:not([data-theme])`;for(let g in l){if(g.charCodeAt(0)!==64)continue;let p=g.slice(1),m=et(t,g,r);if(m!==void 0&&(u[`[data-theme="${p}"] &`]=m,p==="light"||p==="dark")){let b=o.media&&o.media[p]||Ul[p];if(!b)continue;let _="@media "+(b==="print"?`${b}`:`screen and ${b}`);u[_]={[`${h} &`]:m}}}return u}}else return sx(t,n,o)},Or=(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}},Tr=(t,e,r)=>{let o=C();if(S(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0))return o.useVariable&&t.var&&(o.cssVars[t.var]=t.value),t;if(w(t)&&mt(t)){let p=t.slice(2);if(t=et(p),!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let m=p.split(" "),b=o.color[m[0]];if(b&&!b.value&&!b.rgb&&(w(b)||O(b)||S(b))&&!he.has(m[0])){he.add(m[0]);try{o.color[m[0]]=Tr(b,m[0])}finally{he.delete(m[0])}b=o.color[m[0]]}if(b&&b.value){let _=b.rgb,y=m[1]!==void 0?m[1]:"1",x=m[2];x&&(_=Ue(_,x)),t=`rgba(${_}, ${y})`}else{let _=m[2],y=m[1]!==void 0?m[1]:"1";if(_)try{let x=ue(m[0]);x&&x.length>=3?t=`rgba(${Ue(x.slice(0,3).join(", "),_)}, ${y})`:t=m[0]}catch{t=m[0]}else t=m[0]}}}if(O(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),S(t)){let p={};for(let m in t)m!=="var"&&(p[m]=Tr(t[m],e,m.slice(0,1)==="@"?m.slice(1):m));return o.useVariable&&Or(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=Gt(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))&&!he.has(p.name)){he.add(p.name);try{o.color[p.name]=Tr(m,p.name)}finally{he.delete(p.name)}}let b=o.color[p.name];if(b&&b.rgb){let _=b.rgb;p.tone&&(_=Ue(_,p.tone));let y=p.alpha!==void 0?parseFloat(p.alpha):b.alpha!==void 0?b.alpha:1;i=`rgba(${_}, ${y})`}}}let a=ue(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}},mn=(t,e,r)=>{let o=C();if(S(t)&&t.value!==void 0&&t.var!==void 0)return o.useVariable&&(o.cssVars[t.var]=t.value),t;if(w(t)&&mt(t)&&(t=et(t.slice(2))),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]=mn(t[a],e,a.slice(0,1)==="@"?a.slice(1):a));return o.useVariable&&Or(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 Vl=(t,e,r={},o)=>{let n=o||C(),{min:s=4.5,large:i=!1,scheme:a,meta:c=!1,maxIterations:l=15}=r,f=i?3:s,u=a||(n.globalTheme&&n.globalTheme!=="auto"?n.globalTheme:"light"),d=w(e)?e:String(e),h=Gt(t),g=h&&!h.passthrough&&!h.cssVar?h.name:null,p=(Y,j)=>c?{value:Y,...j}:Y;if(g){let Y=n.color[`${g}Safe`];if(Y){let j=`${d}@${u}`,pt=Y[j]!==void 0?Y[j]:Y[d];if(pt!==void 0){let Et=pt&&pt.rgb!==void 0?n.useVariable&&pt.var?`var(${pt.var})`:pt.value:et(pt,null,n);return p(Et,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=et(t,u?`@${u}`:null,n),b=ho(t,n,u),_=ho(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=lo(_.rgb,_.alpha),x=lo(b.rgb,b.alpha,y),k=ln(x,y);if(k>=f-.02)return p(m,{ratio:k,deviation:0,derived:!1,overridden:!1});let[E,T,$]=Pi(b.rgb),[,D,I]=Ii([E,T,$]),z=co(y)>.5,V=z?E:1-E,rt=Y=>{let j=z?E-Y:E+Y,pt=Math.max(0,Math.min(1,j));return{rgb:Di(pt,D,I),L:pt}},at=Y=>{let{rgb:j}=rt(Y),pt=lo(j.map(Et=>Math.round(Et)),b.alpha,y);return ln(pt,y)},G=0,K=V,lt=at(K)>=f;if(lt)for(let Y=0;Y<l;Y++){let j=(G+K)/2;at(j)>=f?K=j:G=j}else G=K;let{rgb:Ut,L:W}=rt(K),wt=Ut.map(Y=>Math.round(Y)),L=at(K),ot=b.alpha<1?`rgba(${wt.join(", ")}, ${b.alpha})`:`rgb(${wt.join(", ")})`,U=Math.abs(W-E)*100;return p(ot,{rgb:wt,ratio:L,startRatio:k,deviation:U,derived:!0,overridden:!1,reachable:lt})},hg=(t,e,r={},o)=>Vl(t,e,{...r,meta:!0},o);R();R();var lA=t=>{let r=C().spacing||{},o=parseFloat(t.spacingRatio),n={...r,ratio:Number.isFinite(o)?o:r.ratio,sequence:{},scales:{}};return Yt(n),n},fA=t=>{for(let e in t){let r=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:n,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;gt(r,{type:n,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),Yt(r),Er(t,e)}},Gi=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),o=e.includes("border")||e.includes("outline");return r&&!o},Yi=()=>{let t=C(),{spacing:e}=t;Yt(e),or(e),fA(e)},uA=t=>{let e=C(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:Yt(t)},St=(t,e="padding",r,o)=>{let n=uA(r);if(w(t)){if(!o&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!o&&t.includes("(")){let i=rr(t);o=i[0],t=i[1]}}let s=o?[t]:ao(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)=>He(s[f],e+l+i,n,o);return a[s.length].map((l,f)=>c(l,f))}return He(t,e,n,o)}},Ae=(t,e,r,o)=>{let n=C(),{spacing:s}=n,i=r||t[e];if(!o&&w(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!o&&w(i)&&i.includes("(")){let a=rr(i);o=a[0],i=a[1]}if(t.spacingRatio){let a=lA(t);return St(i,e,a,o)}return St(i,e,s,o)},Xi=t=>{let e=r=>{let o=["+","-","*","/"].includes(r),n=No.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 go=(t,e,r)=>!w(t)||te.test(t)?t:tr(t).map(o=>(o=o.trim(),o.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(n.startsWith("--"))return`var(${n})`;let s=et(n,e);if(Ee(s))return s;if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em"||n==="inset"||n==="none")return n;r&&r(n);let i=St(n,"shadow");return i&&i.shadow?i.shadow:n}).join(" "))).join(", "),Rr=(t,e,r,o)=>{let n=C();if(O(t)){let a={"@light":Rr(t[0],e,"light"),"@dark":Rr(t[1],e,"dark")};return n.useVariable&&Or(a,"shadow",e,n),a}if(S(t)){let a={};for(let c in t)a[c]=Rr(t[c],e,c.startsWith("@")?c.slice(1):c);return n.useVariable&&Or(a,"shadow",e,n),a}w(t)&&!te.test(t)&&(t=go(t));let i=`--${n.varPrefix?n.varPrefix+"-":""}shadow-${e}`+(r?`-${r}`:"");return n.useVariable&&(n.cssVars[i]=t),{var:i,value:t}},Ji=(t,e)=>{let r=C();if(e||(e=r.globalTheme==="auto"?null:r.globalTheme),!w(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(mt(t))return`var(${t})`;let[o]=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 dA=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),pA=t=>dA.has(t),ee=(t,e,r)=>{let o=t+"";if(te.test(o))return o;let n=o.trim();return n==="none"||n==="0"||n==="initial"||n==="inherit"||n==="unset"?o:o.split(/\s+/).map(s=>{if(s=s.trim(),!s)return"";if(mt(s))return`var(${s})`;if(pA(s)||/^\d/.test(s)||s==="0")return s;let i=et(s,e);if(Ee(i))return i;r&&r(s);let a=St(s,"border");return a&&a.border?a.border:s}).join(" ")};R();var hA=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"]),ix=["color","Color","background","Background","fill","Fill","stroke","Stroke"],gA=t=>{for(let e=0;e<ix.length;e++)if(t.includes(ix[e]))return!0;return!1},mA={boxShadow:go,textShadow:go,border:ee,borderTop:ee,borderRight:ee,borderBottom:ee,borderLeft:ee,outline:ee,columnRule:ee},yA=t=>{if(!t)return!1;let e=Gt(t);return!e||!e.name||e.passthrough||e.cssVar?!1:e.alpha!==void 0||e.tone!==void 0},ax=new Set,bA=(t,e,r,o,n,s)=>{if(!Pt())return;let i=`${t}::${e}::${r||""}::${o}`;ax.has(i)||(ax.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.`))},lx=(t,e,r,o)=>{let n=mA[e];if(!n)return et(r,o);let s=null,i=n(r,o,a=>{!s&&yA(a)&&(s=a)});return s&&bA(t,e,o,r,i,s),i},Hl=t=>{let e={},{state:r,media:o,helpers:n,...s}=t;return Object.keys(s).map(a=>{let l=["color","Color","background","border"].some(f=>a.includes(f));return e[a]=l?et(t[a]):t[a]}),e},Zi=t=>(t.value||(t.value=Hl(t)),t.value),Qi=(t,e)=>{let r=C();if(r.useVariable)return ge(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(H(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 Hl(t)},_A=(t,e,r)=>{if(S(e))t.variants.inverse.value=Hl(e);else if(e===!0){let{color:o,background:n}=r;t.variants.inverse={value:{color:n,background:o}}}},xA=(t,e,r,o)=>{let n=Qi(r);o[`&:${e}`]=n,S(r)&&!r.value&&(r.value=n)},wA=(t,e)=>{let{state:r}=t;return r?(Object.keys(r).map(n=>{let s=r[n];return xA(t,n,s,e),t}),t):void 0},SA=(t,e,r,o)=>{let n=Qi(r);o[`@media (prefers-color-scheme: ${e})`]=n,S(r)&&!r.value&&(r.value=n)},kA=(t,e)=>{let{media:r}=t;return r?(Object.keys(r).map(n=>{let s=r[n];return(n==="dark"||n==="light")&&SA(t,n,s,e),n==="inverse"&&_A(t,s,e),t}),t):void 0},vA=(t,e)=>{let r=C(),{helpers:o}=t;return o?(Object.keys(o).map(s=>{let i=o[s];return w(i)?o[s]=r.theme[i]:Zi(o[s]),t}),t):void 0},ta=(t,e)=>{let r=C();if(r.useVariable)return ea(t,e);let{state:o,media:n,helpers:s}=t,i=Hl(t,e),c=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}`;return wA(t,i),kA(t,i),vA(t,i),{var:c,value:i,state:o,media:n,helpers:s}};var gg=(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===":")&&gA(l))for(let u in t){if(c.has(u))continue;let d=t[u]?.[l];if(d===void 0)continue;let h=et(d,`@${u}`);h!==void 0&&w(h)&&/^[a-z][a-zA-Z]+$/.test(h)&&!hA.has(h)&&c.add(u)}}for(let l of a){let f=l.slice(0,1),u=Object.values(t).some(d=>H(d?.[l]));if(f==="."&&u){let d=l.slice(1),h={};for(let g in t)H(t[g]?.[l])&&(h[g]=t[g][l]);i[l]=gg(h,`${e}-${d}`,r)}else if(f===":"&&u){let d=l.replace(/^:+/,""),h={};for(let g in t)H(t[g]?.[l])&&(h[g]=t[g][l]);i[l]=gg(h,`${e}-${d}`,r)}else if(f!=="@"&&f!=="."&&f!==":"){let h=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}-${l}`,g=s&&s!=="auto"?String(s).replace(/^'|'$/g,""):null,p;for(let m in t){if(c.has(m))continue;let b=t[m]?.[l];if(b===void 0)continue;let _=lx(e,l,b,`@${m}`);if(_===void 0)continue;(g&&m===g||!g&&(m==="light"||p===void 0))&&(p=_);let y=`[data-theme="${m}"]`;if(n[y]||(n[y]={}),n[y][h]=_,m==="dark"||m==="light"){let x=`@media (prefers-color-scheme: ${m})`;n[x]||(n[x]={}),n[x][h]=_}}p!==void 0&&(o[h]=p),i[l]=`var(${h})`,i[`.${l}`]={[l]:i[l]}}}return(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color}),i},ea=(t,e,r,o)=>{let n=C(),{cssVars:s}=n,i={value:t},a=!r&&!o;if(H(t)){if(a&&n.useVariable){let c={};for(let l in t)l.startsWith("@")&&H(t[l])&&(c[l.slice(1)]=t[l]);if(Object.keys(c).length){let l=gg(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]=ea(f,e,c,o||u)}else if(!a){let u=lx(e,c,f,o),d=[...new Set([o,r].filter(m=>m).map(m=>m.slice(1)))],h=d.length?"-"+d.join("-"):"",p=`--${n.varPrefix?n.varPrefix+"-":""}theme-${e}${h}-${c}`;n.useVariable?(n.useThemeSuffixedVars&&(s[p]=u),i[c]=`var(${p})`):i[c]=u,i[`.${c}`]={[c]:i[c]}}}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(w(t)&&mt(t)){let l=n.theme[t.slice(2)];return ge(l,o)}return i},mg=t=>{let e=C(),r={};for(let o in t){let n=o.slice(0,1);if(H(t[o])){if(n==="@")continue;n===":"?r[`&${o}`]=mg(t[o]):n==="."&&(r[`&${o}`]=mg(t[o]))}else r[o]=t[o]}return r},fx=(t,e)=>{let r=e.shift();return t[r]?fx(t[r],e):t},cx=(t,e)=>O(e)?fx(t,e):w(e)&&t[e]?t[e]:t;var ge=(t,e)=>{let r=C();if(w(t)&&mt(t)&&(t=ge(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=cx(s,n):s&&e&&(s=cx(s,e)),mg(s)};R();R();var ra=(t,e)=>{let r=C(),o=`--font-${e}`;if(!t||O(t)&&!t[0])return;let n;if(t.isVariable){let s=de(t.url,r.files)||t.url;fn(s)?n=un(s):n=Cr(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap"})}else if(t[0])n=uo(e,t,r.files);else{let s=Array.isArray(t.url)?t.url.map(i=>de(i,r.files)||i):de(t.url,r.files)||t.url;n=Cr(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch})}return{var:o,value:t,fontFace:n}},oa=(t,e)=>{let r=C(),{fontFamily:o}=r;return fo(e||o,t)},yn=(t,e)=>{let r=C(),{fontFamily:o,fontFamilyTypes:n}=r,{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!o.default)&&(o.default=e),S(s)&&(s=ao(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 zl=t=>{let e=C(),{typography:r,media:o}=e;for(let n in t){let s=n.slice(0,1)==="@",i=t[n];if(!s)continue;let{mediaRegenerate:a}=t,c=n.slice(1),{type:l,base:f,ratio:u,range:d,subSequence:h,h1Matches:g,unit:p}=t;gt(i,{type:l,base:f,ratio:u,range:d,subSequence:h,h1Matches:g,unit:p});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),b=i.unit||p,_=!i.unit&&m.has(p)?"rem":b,y=o[c],x="@media "+(y==="print"?`${y}`:`screen and ${y}`);if(r.templates[x]={fontSize:i.base/r.browserDefault+_},!a){gt(i,{sequence:{},scales:{},vars:{}}),Yt(i),Er(t,n);continue}gt(i,{sequence:{},scales:{},templates:{},vars:{}}),Yt(i),Er(t,n)}},Wl=t=>{let e=C();if(t.h1Matches){let r=t.unit,o=Wi(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}}}},na=()=>{let t=C(),{typography:e}=t;Yt(e),Wl(e),or(e),zl(e)},sa=t=>{let e=C(),{typography:r}=e;return He(t,"fontSize",r)};R();var ia=t=>{if(!w(t))return;let r=C().shape;if(r)return r[t]!==void 0?r[t]:r[t.toLowerCase()]};R();var aa=()=>{let t=C(),{timing:e}=t;Yt(e),or(e)},me=t=>{let e=C(),{timing:r}=e;return r[t]||r[Ai(t)]||t},re=(t,e="timing")=>{let r=C(),{timing:o}=r;return He(t,e,o)};R();var ca=()=>{let t=C(),{fontFamily:e,theme:r,typography:o}=t,n=t.document;return Xe(n)?(gr(t,"document",n),n=t.document={}):n||(n=t.document={}),gt(n,{theme:r.document,fontFamily:fo(e),fontSize:o.base,lineHeight:o.lineHeight})};R();var bg={document:Q},bn=(t,e)=>{let r=C();if(!t){r.verbose&&console.warn("setSVG: val is not defined",e);return}return r.useSvgSprite?Ki(e,t):t},la=(t,e=bg)=>{let r=C(),o=Object.keys(t).length?{}:r.svg;for(let n in t)o[n]=t[n];dx(o,e)},mo=(t,e)=>{let r=C();return r.useIconSprite&&!r.semanticIcons?.[e]?bn(t,e):t},yo=(t,e=bg)=>{let r=C(),o=Object.keys(t).length?{}:r.icons;for(let n in t)o[n]=t[n];dx(o,e)},yg=(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},CA=(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},ux=(t,e,r)=>{for(;e.firstChild;){let o=e.firstChild;r.appendChild(t.importNode(o,!0)),o.remove()}},dx=(t,e=bg)=>{let r=C(),o=e.document||Q;if(!o||!o.documentElement)return r.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),gn(t);let n=o.querySelector("#svgSprite"),s=gn(t),i=`<svg aria-hidden="true" width="0" height="0" style="position:absolute" id="svgSprite">${s}</svg>`,a=CA(o,s);if(n)if(a)ux(o,a,n);else if(o.body.insertAdjacentHTML)n.insertAdjacentHTML("beforeend",s);else{let c=yg(o,{isRoot:!1});c.innerHTML=s,n.append(...c.children)}else if(a){let c=yg(o);c&&c.nodeType&&(ux(o,a,c),o.body.prepend(c))}else if(o.body.insertAdjacentHTML)o.body.insertAdjacentHTML("afterbegin",i);else{let c=yg(o);c&&c.nodeType&&(c.innerHTML=s,o.body.prepend(c))}};R();var fa=(t={})=>{let e=C(),r=e.typography||{},o=e.document||{},n=S(e.reset)?e.reset:e.reset={};if(n[":root"]){let c=n,l=r.templates||{};c.body={...e.useDocumentTheme?ge("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?ge("document"):{};if(n.html&&Wt(n.html,a),r.unit){let c=e.media||{};for(let l in r){if(l.charAt(0)!=="@")continue;let f=r[l];if(!f||f.unit===r.unit||!f.unit)continue;let u=f.unit,d=f.base||r.base,h=f.browserDefault||r.browserDefault,g=l.slice(1),p=c[g];if(!p)continue;let m="@media "+(p==="print"?p:"screen and "+p);n[m]||(n[m]={}),n[m].html||(n[m].html={}),n[m].html.fontSize=d/h+u}}return st(gt(n,t),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",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 EA=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),ze=t=>ee(t),ql=t=>te.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(mt(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=et(e);return Ee(r)?r:e}).join(" "),Kl=(t,e)=>Ji(t,e),ua=(t,e)=>te.test(t)?t:tr(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(mt(o))return`var(${o})`;if(o==="inset"||o==="none")return o;let n=et(o);if(Ee(n)){let i=It(o,e);return S(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(o)||o==="0"||o.includes("px")||o.slice(-2)==="em")return o;let s=St(o,"shadow");return s&&s.shadow?s.shadow:o}).join(" "):"")).join(", "),da=(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=tr(n).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||EA.has(f)||f==="transparent"||te.test(f))return f;let u=et(f);return Ee(u)?u:f}).join(" ")));return o+a.join(", ")+s},Gl=(t,e)=>{let r=C();return tr(t).map(o=>{let n=o.trim();if(mt(n))return`var(${n})`;if(/^var\(/.test(n)||n.includes("url"))return n;if(r.gradient?.[n]){let s=It(n,e);if(w(s))return s;if(S(s)){for(let i in s)if(w(s[i]))return s[i]}return n}return n.includes("gradient")?da(n,e):n.includes("/")||n.startsWith("http")||n.includes(".")&&!Gt(n)?`url(${n})`:n}).join(", ")},Yl=t=>w(t)&&t.split(" ").map(e=>St(e,"gap").gap).join(" "),_g=t=>{let e=t.split(" ");return e.length?e.map(r=>mt(r)?`var(${r})`:r.length<3||r.includes("ms")?re(r).timing||r:me(r)?me(r):r).join(" "):t},pa=(t,e,r)=>{if(w(t))return t.split(",").map(o=>re(o).timing||o).join(",")},Xl=t=>{let e=t.split(",");if(e.length)return e.map(_g).join(",")};function _t(t,e,r={},o={}){let n=ft.call(this,e||r[t]);if(n==null)return;let s;if(w(n)){if(/^(?:env|var)\(/.test(n.trim()))return{[t]:n};if(n.includes("(")){let c=rr(n);s=c[0],n=c[1]}let i=r.scaleBoxSize,a=Gi(t);!i&&a&&!o.ratio&&(n=Xi(n))}return o.ratio?Ae(r,t,n,s):St(n,t,void 0,s)}var N=(t,e=null,r)=>_t(t,e,r,{ratio:!0}),nr=(t,e,r,o="borderRadius")=>{if(w(t))return{[o]:t.split(" ").map(n=>{let s=ia(n);return s!==void 0?s:Ae(e,r,n)[r]}).join(" ")}};R();var xn="__smblsThemeRootOwner",wn=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)},px=(t,e,r)=>{if(!(!t||!e)){wn(t),t.__prefersListener=r,t.__prefersMq=e;try{e.addEventListener("change",r)}catch{e.addListener(r)}}},AA=(t,e)=>{let r=C(),{cssVars:o}=r,n=e.startsWith("--")?e:`--${e}`;return o[n]=t,t},Xt=t=>t,Jl={color:Tr,gradient:mn,font:ra,fontFamily:yn,fontfamily:yn,theme:ta,icons:mo,semanticIcons:Xt,semanticicons:Xt,svg:bn,svgData:Xt,typography:Xt,shadow:Rr,spacing:Xt,media:Xt,grid:Xt,class:Xt,timing:Xt,reset:Xt,unit:Xt,animation:Xt,vars:AA,sizes:Xt,shape:Xt},TA=(t,e,r,o)=>{gr(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},xg=(t,e,r)=>{let o=C(),n=Ni(t),s=n.toLowerCase(),i=o[n]||o[s]||o[t],a=Xe(i)?TA(o,i,s,[n,s,t]):i,c=Jl[n]||Jl[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")},wg=(t,e)=>{let r=C(),o=t.toLowerCase();return Xe(e)?(gr(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 xg(o,e[s],s)}catch(i){r.verbose&&console.warn("Error setting",o,"value",e[s],s,i)}}),r[o]||r[t])},Zl=(t,e)=>{let r=e||C();r.globalTheme=t;let n=Fo(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[xn]=r,c)wn(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",px(r,f,l)}else wn(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},OA={},bo=(t,e=OA)=>{let r=e.config||C(),{version:o,verbose:n,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:c,useIconSprite:l,globalTheme:f,themeRoot:u,useDocumentTheme:d,useDefaultConfig:h,semanticIcons:g,hoverMedia:p,files:m,assets:b,..._}=t;e.newConfig&&(r=Fl(e.newConfig)),Ye(_.document)&&(r.__domDocument=_.document,delete _.document),Ye(r.document)&&(r.__domDocument||(r.__domDocument=r.document),r.document={}),m!==void 0&&(r.files=m),b!==void 0&&(r.assets=b),n!==void 0&&(r.verbose=n),s!==void 0&&(r.useVariable=s),i!==void 0&&(r.useReset=i),c!==void 0&&(r.useFontImport=c),a!==void 0&&(r.useSvgSprite=a),l!==void 0&&(r.useIconSprite=l),d!==void 0&&(r.useDocumentTheme=d),f!==void 0&&(r.globalTheme=f),u!==void 0&&(r.themeRoot=u),t.useThemeSuffixedVars!==void 0&&(r.useThemeSuffixedVars=t.useThemeSuffixedVars),h!==void 0&&(r.useDefaultConfig=h),g!==void 0&&(r.semanticIcons=g),p!==void 0&&(r.hoverMedia=p),r.verbose&&console.log(r);let x=Fo(r)||(typeof document<"u"?document:null),k=x&&x.defaultView||(typeof window<"u"?window:null),E=x&&(r.themeRoot||x.documentElement);if(E&&typeof E.setAttribute=="function")if(r.globalTheme&&r.globalTheme!=="auto")wn(r),E.setAttribute("data-theme",r.globalTheme),r.resolvedTheme=r.globalTheme,E[xn]=r,r.globalTheme==="dark"||r.globalTheme==="light"?E.style.colorScheme=r.globalTheme:E.style.colorScheme="light dark";else if(E[xn]&&E[xn]!==r&&E.hasAttribute("data-theme"))wn(r),r.resolvedTheme=E.getAttribute("data-theme");else if(k&&k.matchMedia){let z=rt=>{let at=rt.matches?"dark":"light";E.setAttribute("data-theme",at),r.resolvedTheme=at},V=k.matchMedia("(prefers-color-scheme: dark)");z(V),E.style.colorScheme="light dark",E[xn]=r,px(r,V,z)}else wn(r),E.setAttribute("data-theme","light"),r.resolvedTheme="light",E.style.colorScheme="light",E[xn]=r;r.__svgCache||(r.__svgCache={});let T=Object.keys(_).filter(I=>!I.startsWith("__")),$=new Set(T);if(T.forEach(I=>{let z=I.toLowerCase();z!==I&&$.has(z)&&st(_[z],_[I])}),T.map(I=>{let z=I.toLowerCase();if(!(z!==I&&$.has(z)))return wg(I,_[I])}),r.varPrefix&&(r.typography&&(r.typography.varPrefix=r.varPrefix),r.spacing&&(r.spacing.varPrefix=r.varPrefix),r.timing&&(r.timing.varPrefix=r.varPrefix)),_.typography)try{na()}catch(I){r.verbose&&console.warn("Error applying typography sequence",I)}if(_.spacing)try{Yi()}catch(I){r.verbose&&console.warn("Error applying spacing sequence",I)}if(_.timing)try{aa()}catch(I){r.verbose&&console.warn("Error applying timing sequence",I)}ca();let D=fa();return D&&(r.reset=D),r};var _o=new Map,wx=null,vg=null,RA=null;function ha(t){t.batchAtomicCss&&(vg=t.batchAtomicCss),t.compoundCssClass&&(RA=t.compoundCssClass)}var PA=new Set,gx=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function Cg(t){try{let e=C();e&&(e.__domDocument=t)}catch{}t&&PA.add(t)}function of(){try{let t=C();if(t){if(gx(t.__domDocument))return t.__domDocument;if(gx(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var Jt={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};function nf(){return{...Jt}}function Eg(){for(let t in Jt)Jt[t]=0;ef=!1}var ef=!1,tf=(t,e)=>`${t} ${e}${t===1?"":"s"}`;function IA(t){let e=Date.parse(t);if(!isFinite(e))return"";let r=Math.floor((Date.now()-e)/864e5);return r<1?" (today)":` (${tf(r,"day")} ago)`}function DA(){try{let t=sf();return t&&t.cssRules?t.cssRules.length:-1}catch{return-1}}function $A(t,e){if(ef)return!1;ef=!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 ${tf(Jt.variable,"variable rule")} and ${tf(Jt.atomic,"atomic rule")}, while the design system held ${tf(e,"CSS variable")}.
39
+ src: ${i};`},Er=(t,e,r,o)=>`@font-face {${Mi(t,e,r,o)}
40
+ }`,po=(t,e,r)=>Object.keys(e).map(n=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l}=e[n],f=Array.isArray(s)?s.map(u=>pe(u,r)||u):pe(s,r)||s;return Mi(t,f,i,{fontStyle:a,fontDisplay:c,fontStretch:l})}),Uh=t=>Object.keys(t).map(r=>po(r,t[r].value)),Dl=(t,e,r)=>{if(e&&e.isVariable){let s=pe(e.url,r)||e.url;return dn(s)?pn(s):Er(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap"})}if(e[0])return po(t,e,r).map(Il);let n=Array.isArray(e.url)?e.url.map(s=>pe(s,r)||s):pe(e.url,r)||e.url;return Er(t,n,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch})},Fi=(t,e)=>Object.keys(t).map(o=>Dl(o,t[o].value,e));R();R();R();R();var hn={};P(hn,{animation:()=>ng,breakpoints:()=>rg,class:()=>lg,color:()=>Yh,devices:()=>og,document:()=>J_,font:()=>Hh,fontFace:()=>qh,fontFamily:()=>zh,fontFamilyTypes:()=>Wh,gradient:()=>Xh,grid:()=>cg,icons:()=>Qh,media:()=>Kh,reset:()=>Z_,semanticIcons:()=>tg,sequence:()=>rr,shadow:()=>Zh,shape:()=>dg,sizes:()=>ug,spacing:()=>Gh,svg:()=>sg,svgData:()=>ig,templates:()=>ag,theme:()=>Jh,timing:()=>eg,typography:()=>Ni,unit:()=>Vh,vars:()=>fg});var rr={"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 Vh={default:"em"};var QE={browserDefault:16,base:16,type:"font-size",ratio:rr["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},Ni=QE;var Hh={};var zh={},Wh={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},qh={};var Kh={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var tA={base:Ni.base,type:"spacing",ratio:rr.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},Gh=tA;var Yh={},Xh={};var Jh={};var Zh={};var Qh={},tg={};var eA={default:150,base:150,type:"timing",ratio:rr["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},eg=eA;var J_={};var rg={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},og={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 ng={};var sg={},ig={};var ag={};var rA={},cg=rA;var lg={};var Z_={},fg={},ug={},dg={};var Fl={},Nl={},ee=new Set,$l=hn,Ll={},Bi=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in $l){let e=t.toLowerCase();Ll[e]=$l[t];let r=Bi(e);r!==e&&(Ll[r]=$l[t]),e!==t&&(Ll[t]=$l[t])}var ho={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:Fl,cssMediaVars:Nl,CSS_VARS:Fl,CSS_MEDIA_VARS:Nl,_scratchConfig:!0,...Ll},gn=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return bt(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let r=bt(e)?e:t.globalTheme,o=ms(bt(r)?r:"auto");return Object.defineProperty(t,"globalTheme",{get(){return o.get()},set(n){o.set(n)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"__globalThemeSignal",{value:o,enumerable:!1,configurable:!0,writable:!0}),o},Q_=t=>t?gn(t):null,mn=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return bt(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let r=bt(e)?e:t.resolvedTheme,o=ms(bt(r)?r:null);return Object.defineProperty(t,"resolvedTheme",{get(){return o.get()},set(n){o.set(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"__resolvedThemeSignal",{value:o,enumerable:!1,configurable:!0,writable:!0}),o},tx=t=>t?mn(t):null;gn(ho);mn(ho);var Ml=ft(ho),he={active:"0",0:ho},ex=t=>(bt(t)&&(he.active=t),he[t||he.active]),ji=[],it=t=>{t&&t._scratchConfig&&ji.push(t)},tt=()=>{ji.pop()},C=t=>ji.length?ji[ji.length-1]:he[t||he.active]||ho,jl=t=>{if(S(t))return he.active="1",he[1]=st(t,ft(Ml),ee),gn(he[1]),mn(he[1]),t},oA=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],nA=["useVariable","globalTheme","verbose"],sA=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],iA=t=>{for(let e of sA){let r;for(let o of e){let n=t[o];S(n)&&(r=r?st(n,r,ee):n)}if(r)for(let o of e)S(t[o])&&(t[o]=r)}},Ui=(t,e,{cleanBase:r=!1}={})=>{let o=r?null:C(),n=ft(!r&&o&&o._scratchConfig?o:Ml);for(let i of oA)delete n[i];for(let i of nA)Object.prototype.hasOwnProperty.call(Ml,i)?n[i]=Ml[i]:delete n[i];let s=st(e||{},n,ee);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s._scratchConfig=!0,iA(s),gn(s),mn(s),t&&(he[t]=s),s};var He={"-6":"U","-5":"V","-4":"W","-3":"X","-2":"Y","-1":"Z",0:"A",1:"B",2:"C",3:"D",4:"E",5:"F",6:"G",7:"H",8:"I",9:"J",10:"K",11:"L",12:"M",13:"N",14:"O",15:"P",16:"Q",17:"R",18:"S",19:"T"},pg=(t,e)=>{let{key:r,variable:o,value:n,scaling:s,index:i,scalingVariable:a}=t;e.sequence[r]={key:r,decimal:~~(n*100)/100,val:~~n,scaling:s,index:i,scalingVariable:a,variable:o},e.scales[r]=s;let c=rx.has(e.unit)?"rem":e.unit;e.vars[o]=s+c},or=t=>{if(!t.includes("("))return t;let e=t.split("(")[0],r=t.slice(t.indexOf("(")+1,t.lastIndexOf(")"));return[e,r]},rx=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Vi=(t,e)=>{let{base:r,type:o,unit:n}=e,s=rx.has(n)?"rem":n,i=(Jr(s)?1:r)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(o&&o.replace(".","-")),l=`${c}-ratio`;if(t>0){let f=He[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=He[t+1],u=Math.abs(t),d=Math.pow(ox,2*u),h=He[u];return h?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${h}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},Bl=(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}))`},Hi=(t,e)=>{let o=(t*e-t)/1.618,n=t*e-o,s=t+o,i=(n+s)/2;return[n,i,s]},zi=(t,e)=>Hi(t,e).map(r=>r/t),Wi=(t,e)=>{let{key:r,base:o,value:n,ratio:s,variable:i,index:a}=t,l=~~(n*s)-~~n,f,[u,d,h]=Hi(n,s);l>16?f=[u,d,h]:f=[u,h],f.forEach((g,p)=>{let m=~~(g/o*1e3)/1e3,b=i+(p+1),_=a+(p+1)/10,y=Bl(p+1,f,i,e),x={key:r+(p+1),variable:b,value:g,scaling:m,scalingVariable:y,index:_};pg(x,e)})},ox=1.618,aA=(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(ox,2*o);return Math.max(n,s)},Yt=t=>{let{type:e,base:r,ratio:o,range:n,subSequence:s}=t,i=Math.abs(n[0])+Math.abs(n[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=n[1]-l,u=He[f],d=aA(f,r,o),h=~~(d/r*100)/100,g=c+u,p=Vi(f,t),m={key:u,variable:g,value:d,base:r,scaling:h,scalingVariable:p,ratio:o,index:f};pg(m,t),s&&Wi(m,t)}return t},hg=(t,e=0)=>{let{type:r,base:o,ratio:n,subSequence:s}=t,i=w(e)?e:He[e],a=w(e)?Object.entries(He).find(([,m])=>m===e)?.[0]:e;if(!i)return console.warn(`Position ${e} is out of range in numToLetterMap`),null;let c={sequence:{},scales:{},vars:{},...t},l=o*Math.pow(n,a),f=~~(l/o*100)/100,h="--"+(t.varPrefix?t.varPrefix+"-":"")+(r&&r.replace(".","-"))+"-"+i,g=Vi(a,t),p={key:i,variable:h,value:l,base:o,scaling:f,scalingVariable:g,ratio:n,index:a};return pg(p,c),s&&Wi(p,c),c},qi=(t="A",e)=>{let r=C(),{unit:o}=r;if(w(t)&&mt(t))return`var(${t})`;if(w(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(w(t)){let y=r.sizes;if(y){let x=y[t]||y[t.toLowerCase()];if(x!==void 0)return t.slice(0,1)==="-"?`calc(${x} * -1)`:x}}let{sequence:n,unit:s=o.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(ys(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+"-":""}${Ri(e.type.replace(".","-"))}-`,h=t.toUpperCase(),g=h.slice(0,1)==="-"?"-":"",p=g?h.slice(1):h,m="";p.includes("_")&&(m="_"+p.split("_")[1].toLowerCase(),p=p.split("_")[0]);let b=y=>a.test(y)?`var(${d}${y}${m})`:y;if(p.includes("+")){let[y,x]=p.split("+"),k=`${b(y)} + ${b(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(p.includes("*")){let[y,x]=p.split("*"),k=`${b(y)} * ${b(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}else if(p.includes("-")){let[y,x]=p.split("-"),k=`${b(y)} - ${b(x)}`;return g?`calc((${k}) * -1)`:`calc(${k})`}if(!n[p]&&p.length===2&&(r.verbose&&console.warn(p,"- value is not found because `subSequence` is set to false"),p=p.slice(0,1)),i||r.useVariable){let y=`var(${d}${p}${m})`;return g?`calc(${y} * -1)`:y}let _=n?n[p]:null;if(!_){if(console.warn("can't find",n,p),Pt())throw new Error(`[smbls] Unresolvable design-system token "${t}"`+(e.type?` for sequence "${e.type}"`:"")+" \u2014 not a registered `sizes` name and not a valid spacing/typography/timing sequence letter. The CSS property using it would silently be dropped in production. Register the token in `designSystem/sizes.js` (or the relevant sequence family) or fix the typo.");return}return s==="ms"||s==="s"?g+_.val+s:g+_.scaling+s},Ul=(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:qi(i,e)}).join("")},ze=(t,e,r,o)=>{if(typeof t!="string")return C().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!o&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let s=or(t);o=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=Ul(t,r):t=qi(t,r),{[e]:o?`${o}(${t})`:t}},Vl=(t,e)=>He[t-e],Ki=t=>{let{h1Matches:e,sequence:r}=t;return new Array(6).fill(null).map((o,n)=>{let s=Vl(e,n);return r[s]})};R();var gg=(t,e)=>{let r=C(),{cssVars:o}=r;H(t.value)||(o[t.var]=t.value)},Gi=(t,e,r)=>{let o=C(),{unit:n}=o,s=e.unit||n.default,{base:i,ratio:a,type:c}=e,f="--"+(e.varPrefix?e.varPrefix+"-":"")+(c&&c.replace(".","-"));t[`${f}-base`]=i,t[`${f}-unit`]=s;let u=`${f}-ratio`;t[u]=a;let[d,h,g]=zi(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})`},nx=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),nr=(t,e={})=>{let r=C(),{unit:o,timing:n,cssVars:s}=r,i=t.unit||o.default,a=nx.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||Gi(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"})`)}},Ar=(t,e,r={})=>{let o=C(),{unit:n,media:s,cssVars:i}=o,a=e.slice(1),c=t[e],l=c.unit||t.unit||n.default,f=nx.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}`]={}),Gi(p,c,r);let m=t.unit||n.default;if(f!==m&&d)for(let b in d){let _=d[b],y=h[b]+f;p[_.variable+"_default"]=y,p[_.variable]=y}return}for(let p in d){let m=d[p],b=(Jr(f)?h[p]:d[p].val)+f;!g&&o.verbose&&console.warn("Can't find query ",g);let _=i[`@media ${g}`];_||(_=i[`@media ${g}`]={}),_[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=b}};R();var ix=oo(),yn=t=>{let e=C(),r="";for(let o in t)e.__svgCache[o]||(e.__svgCache[o]=!0,r+=t[o]);return r},cA=t=>{let e=t&&(t.default||t);if(!w(e))return ix&&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},{}):{}},lA=(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},sx=new Set,Yi=(t,e)=>{let r=e&&e.default?e.default:e;if(!w(r))return ix&&!sx.has(t)&&(sx.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=cA(e),{width:s,height:i}=n,a=n.viewBox||`0 0 ${s||24} ${i||24}`,f=lA(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=dA(f),f},fA="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",uA=new RegExp(`<(${fA})\\b([^>]*?)\\s*/>`,"g"),dA=t=>t.replace(uA,"<$1$2></$1>");var wn={};P(wn,{STANDARD_SCHEME_QUERIES:()=>Hl,appendSVGSprite:()=>ua,appendSvgIconsSprite:()=>bo,applyDocument:()=>fa,applyHeadings:()=>Kl,applyReset:()=>da,applySpacingSequence:()=>Ji,applyTimingSequence:()=>la,applyTypographySequence:()=>ia,checkIfBoxSize:()=>Xi,getColor:()=>et,getFontFamily:()=>sa,getFontSizeByKey:()=>aa,getMediaColor:()=>It,getMediaTheme:()=>me,getSafeInk:()=>zl,getSafeInkInfo:()=>yg,getShadow:()=>Qi,getShapeByKey:()=>ca,getSpacingBasedOnRatio:()=>Te,getSpacingByKey:()=>St,getTheme:()=>ea,getTimingByKey:()=>oe,getTimingFunction:()=>ye,resolveBorderValue:()=>re,resolveColorRgb:()=>go,resolveShadowValue:()=>mo,runThroughMedia:()=>ql,setAdaptiveSchemeVar:()=>Rr,setColor:()=>Or,setFont:()=>na,setFontFamily:()=>_n,setGradient:()=>bn,setMediaTheme:()=>oa,setSVG:()=>xn,setShadow:()=>Pr,setSvgIcon:()=>yo,setTheme:()=>ra,splitSpacedValue:()=>Zi});R();var Hl={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},ge=new Set,pA=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"]),ax=new Set,hA=t=>{if(!t)return!1;let{color:e,gradient:r}=t;return!!(S(e)&&Object.keys(e).length||S(r)&&Object.keys(r).length)},cx=new Set,gA=(t,e)=>{if(!w(t)||t.indexOf(" ")===-1)return null;let r=t.replace(/\s+/g,""),o=Nt(r);if(!o||o.passthrough||o.cssVar)return null;let{color:n,gradient:s}=e;return!n[o.name]&&!s[o.name]?null:r},mg=(t,e,r)=>{let o=gA(t,r);if(o){if(!cx.has(t)){cx.add(t);let s=r&&r.name?` (design system \`${r.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` has a space before its alpha/tone modifier${s} \u2014 did you mean \`${o}\`? The space form never resolves, so the atomic class it mints carries no CSS value and paints invisibly. Dropped rather than shipped invisible.`)}return}let n=w(e)?e.toLowerCase():"";if(!pA.has(n)||!hA(r))return t;if(!ax.has(n)){ax.add(n);let s=r&&r.name?` (design system \`${r.name}\`)`:"";console.warn(`[scratch] color \`${t}\` is a CSS named colour that is not in the palette${s}. Dropped rather than emitted as a raw browser colour, which renders theme-blind and can be unreadable ("looks designed", so it ships unnoticed). Define it in designSystem/color.js or use a palette token.`)}},et=(t,e,r)=>{let o=r||C();if(!w(t)){o.verbose&&console.warn(t,"- type for color is not valid");return}if(mt(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let n,s,i;if(O(t))[n,s,i]=t;else{let u=Nt(t);if(!u){let{color:d,gradient:h}=o,g=h[t]||d[t];return g?(e&&g[e]&&(g=g[e]),o.useVariable?`var(${g.var})`:g.value):mg(t,t,o)}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;n=u.name,s=u.alpha,i=u.tone}let{color:a,gradient:c}=o,l=a[n]||c[n];if(!l)return mg(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(ge.has(n))return l;ge.add(n);try{return et(l,null,r)}finally{ge.delete(n)}}let f=l.rgb;if(!f){let u=o.useVariable?`var(${l.var})`:l.value;if((s||i)&&u){let d=s!==void 0?s:1;if(!i)return`rgb(from ${u} r g b / ${d})`;if(i.charCodeAt(0)===43||i.charCodeAt(0)===45){let g=parseFloat(i),p=g<0?"-":"+",m=Math.abs(g);return`rgb(from ${u} calc(r ${p} ${m}) calc(g ${p} ${m}) calc(b ${p} ${m}) / ${d})`}return`hsl(from ${u} h s ${i}% / ${d})`}return u}return i&&!l[i]&&(f=Ve(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})`},lx=t=>{let e=de(t);return!e||e.length<3||e[0]===0&&e[1]===0&&e[2]===0&&e[3]===0&&t.toLowerCase()!=="transparent"?null:{rgb:[e[0],e[1],e[2]],alpha:e[3]!==void 0?e[3]:1}},mA=(t,e)=>{if(!e)return t;let r=t.rgb;if(e.tone){let n=Ve(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}},go=(t,e,r)=>{let o=e||C();if(!w(t))return null;let n=Nt(t);if(n){if(n.passthrough){let d=de(n.passthrough);return d&&d.length>=3?{rgb:[d[0],d[1],d[2]],alpha:d[3]!==void 0?d[3]:1}:null}if(n.cssVar)return null}let s=n?n.name:t,{color:i,gradient:a}=o,c=i[s]||a[s];if(!c)return lx(t);if(w(c)){let d;if(ge.has(s))d=lx(c);else{ge.add(s);try{d=go(c,o,r)}finally{ge.delete(s)}}return d?mA(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=Ve(l,n.tone));let f=w(l)?l.split(",").map(d=>parseFloat(d.trim())):l,u=n&&n.alpha!==void 0?parseFloat(n.alpha):c.alpha!==void 0?c.alpha:1;return{rgb:f,alpha:u}},It=(t,e,r)=>{let o=r||C();if(e||(e=o.globalTheme==="auto"?null:o.globalTheme),!w(t)){o.verbose&&console.warn(t,"- type for color is not valid");return}if(mt(t))return`var(${t})`;let n,s,i;if(O(t))n=t[0];else{let u=Nt(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;n=u.name,s=u.alpha,i=u.tone}else n=t}let{color:a,gradient:c}=o,l=a[n]||c[n],f=S(l);if(f&&l.value)return et(t,`@${e}`,r);if(f){if(o.useVariable&&l.var)return s||i?et(t,null,r):`var(${l.var})`;if(e)return et(t,`@${e}`,r);{let u={},d=o.scopeSelector||":root",h=d===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${d}:not([data-theme])`;for(let g in l){if(g.charCodeAt(0)!==64)continue;let p=g.slice(1),m=et(t,g,r);if(m!==void 0&&(u[`[data-theme="${p}"] &`]=m,p==="light"||p==="dark")){let b=o.media&&o.media[p]||Hl[p];if(!b)continue;let _="@media "+(b==="print"?`${b}`:`screen and ${b}`);u[_]={[`${h} &`]:m}}}return u}}else return mg(t,n,o)},Rr=(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}},Or=(t,e,r)=>{let o=C();if(S(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0))return o.useVariable&&t.var&&(o.cssVars[t.var]=t.value),t;if(w(t)&&mt(t)){let p=t.slice(2);if(t=et(p),!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let m=p.split(" "),b=o.color[m[0]];if(b&&!b.value&&!b.rgb&&(w(b)||O(b)||S(b))&&!ge.has(m[0])){ge.add(m[0]);try{o.color[m[0]]=Or(b,m[0])}finally{ge.delete(m[0])}b=o.color[m[0]]}if(b&&b.value){let _=b.rgb,y=m[1]!==void 0?m[1]:"1",x=m[2];x&&(_=Ve(_,x)),t=`rgba(${_}, ${y})`}else{let _=m[2],y=m[1]!==void 0?m[1]:"1";if(_)try{let x=de(m[0]);x&&x.length>=3?t=`rgba(${Ve(x.slice(0,3).join(", "),_)}, ${y})`:t=m[0]}catch{t=m[0]}else t=m[0]}}}if(O(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),S(t)){let p={};for(let m in t)m!=="var"&&(p[m]=Or(t[m],e,m.slice(0,1)==="@"?m.slice(1):m));return o.useVariable&&Rr(p,"color",e,o),p}let s=`--${o.varPrefix?o.varPrefix+"-":""}color-${e}`+(r?`-${r}`:""),i=t.value||t;if(w(i)&&!i.includes("(")&&!i.startsWith("#")){let p=Nt(i);if(p&&p.name&&!p.passthrough&&!p.cssVar){let m=o.color[p.name];if(m&&!m.value&&!m.rgb&&(w(m)||O(m)||S(m))&&!ge.has(p.name)){ge.add(p.name);try{o.color[p.name]=Or(m,p.name)}finally{ge.delete(p.name)}}let b=o.color[p.name];if(b&&b.rgb){let _=b.rgb;p.tone&&(_=Ve(_,p.tone));let y=p.alpha!==void 0?parseFloat(p.alpha):b.alpha!==void 0?b.alpha:1;i=`rgba(${_}, ${y})`}}}let a=de(i),[c,l,f,u=1]=a,d=parseFloat(u.toFixed(2)),h=`${c}, ${l}, ${f}`,g=`rgba(${h}, ${d})`;return o.useVariable&&(o.cssVars[s]=g),{var:s,rgb:h,alpha:d,value:g}},bn=(t,e,r)=>{let o=C();if(S(t)&&t.value!==void 0&&t.var!==void 0)return o.useVariable&&(o.cssVars[t.var]=t.value),t;if(w(t)&&mt(t)&&(t=et(t.slice(2))),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]=bn(t[a],e,a.slice(0,1)==="@"?a.slice(1):a));return o.useVariable&&Rr(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 zl=(t,e,r={},o)=>{let n=o||C(),{min:s=4.5,large:i=!1,scheme:a,meta:c=!1,maxIterations:l=15}=r,f=i?3:s,u=a||(n.globalTheme&&n.globalTheme!=="auto"?n.globalTheme:"light"),d=w(e)?e:String(e),h=Nt(t),g=h&&!h.passthrough&&!h.cssVar?h.name:null,p=(Y,j)=>c?{value:Y,...j}:Y;if(g){let Y=n.color[`${g}Safe`];if(Y){let j=`${d}@${u}`,pt=Y[j]!==void 0?Y[j]:Y[d];if(pt!==void 0){let Et=pt&&pt.rgb!==void 0?n.useVariable&&pt.var?`var(${pt.var})`:pt.value:et(pt,null,n);return p(Et,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=et(t,u?`@${u}`:null,n),b=go(t,n,u),_=go(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=fo(_.rgb,_.alpha),x=fo(b.rgb,b.alpha,y),k=un(x,y);if(k>=f-.02)return p(m,{ratio:k,deviation:0,derived:!1,overridden:!1});let[E,T,$]=Di(b.rgb),[,D,I]=$i([E,T,$]),z=lo(y)>.5,V=z?E:1-E,rt=Y=>{let j=z?E-Y:E+Y,pt=Math.max(0,Math.min(1,j));return{rgb:Li(pt,D,I),L:pt}},at=Y=>{let{rgb:j}=rt(Y),pt=fo(j.map(Et=>Math.round(Et)),b.alpha,y);return un(pt,y)},G=0,K=V,lt=at(K)>=f;if(lt)for(let Y=0;Y<l;Y++){let j=(G+K)/2;at(j)>=f?K=j:G=j}else G=K;let{rgb:Vt,L:W}=rt(K),wt=Vt.map(Y=>Math.round(Y)),L=at(K),ot=b.alpha<1?`rgba(${wt.join(", ")}, ${b.alpha})`:`rgb(${wt.join(", ")})`,U=Math.abs(W-E)*100;return p(ot,{rgb:wt,ratio:L,startRatio:k,deviation:U,derived:!0,overridden:!1,reachable:lt})},yg=(t,e,r={},o)=>zl(t,e,{...r,meta:!0},o);R();R();var yA=t=>{let r=C().spacing||{},o=parseFloat(t.spacingRatio),n={...r,ratio:Number.isFinite(o)?o:r.ratio,sequence:{},scales:{}};return Yt(n),n},bA=t=>{for(let e in t){let r=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:n,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;gt(r,{type:n,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),Yt(r),Ar(t,e)}},Xi=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),o=e.includes("border")||e.includes("outline");return r&&!o},Ji=()=>{let t=C(),{spacing:e}=t;Yt(e),nr(e),bA(e)},_A=t=>{let e=C(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:Yt(t)},St=(t,e="padding",r,o)=>{let n=_A(r);if(w(t)){if(!o&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!o&&t.includes("(")){let i=or(t);o=i[0],t=i[1]}}let s=o?[t]:co(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)=>ze(s[f],e+l+i,n,o);return a[s.length].map((l,f)=>c(l,f))}return ze(t,e,n,o)}},Te=(t,e,r,o)=>{let n=C(),{spacing:s}=n,i=r||t[e];if(!o&&w(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!o&&w(i)&&i.includes("(")){let a=or(i);o=a[0],i=a[1]}if(t.spacingRatio){let a=yA(t);return St(i,e,a,o)}return St(i,e,s,o)},Zi=t=>{let e=r=>{let o=["+","-","*","/"].includes(r),n=jo.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 mo=(t,e,r)=>!w(t)||te.test(t)?t:er(t).map(o=>(o=o.trim(),o.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(n.startsWith("--"))return`var(${n})`;let s=et(n,e);if(Ae(s))return s;if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em"||n==="inset"||n==="none")return n;r&&r(n);let i=St(n,"shadow");return i&&i.shadow?i.shadow:n}).join(" "))).join(", "),Pr=(t,e,r,o)=>{let n=C();if(O(t)){let a={"@light":Pr(t[0],e,"light"),"@dark":Pr(t[1],e,"dark")};return n.useVariable&&Rr(a,"shadow",e,n),a}if(S(t)){let a={};for(let c in t)a[c]=Pr(t[c],e,c.startsWith("@")?c.slice(1):c);return n.useVariable&&Rr(a,"shadow",e,n),a}w(t)&&!te.test(t)&&(t=mo(t));let i=`--${n.varPrefix?n.varPrefix+"-":""}shadow-${e}`+(r?`-${r}`:"");return n.useVariable&&(n.cssVars[i]=t),{var:i,value:t}},Qi=(t,e)=>{let r=C();if(e||(e=r.globalTheme==="auto"?null:r.globalTheme),!w(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(mt(t))return`var(${t})`;let[o]=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 xA=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),wA=t=>xA.has(t),re=(t,e,r)=>{if(t==null)return;let o=t+"";if(te.test(o))return o;let n=o.trim();return n==="none"||n==="0"||n==="initial"||n==="inherit"||n==="unset"?o:o.split(/\s+/).map(s=>{if(s=s.trim(),!s)return"";if(mt(s))return`var(${s})`;if(wA(s)||/^\d/.test(s)||s==="0")return s;let i=et(s,e);if(Ae(i))return i;r&&r(s);let a=St(s,"border");return a&&a.border?a.border:s}).join(" ")};R();var SA=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"]),fx=["color","Color","background","Background","fill","Fill","stroke","Stroke"],kA=t=>{for(let e=0;e<fx.length;e++)if(t.includes(fx[e]))return!0;return!1},vA={boxShadow:mo,textShadow:mo,border:re,borderTop:re,borderRight:re,borderBottom:re,borderLeft:re,outline:re,columnRule:re},CA=t=>{if(!t)return!1;let e=Nt(t);return!e||!e.name||e.passthrough||e.cssVar?!1:e.alpha!==void 0||e.tone!==void 0},ux=new Set,EA=(t,e,r,o,n,s)=>{if(!Pt())return;let i=`${t}::${e}::${r||""}::${o}`;ux.has(i)||(ux.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.`))},px=(t,e,r,o)=>{let n=vA[e];if(!n)return et(r,o);let s=null,i=n(r,o,a=>{!s&&CA(a)&&(s=a)});return s&&EA(t,e,o,r,i,s),i},Wl=t=>{let e={},{state:r,media:o,helpers:n,...s}=t;return Object.keys(s).map(a=>{let l=["color","Color","background","border"].some(f=>a.includes(f));return e[a]=l?et(t[a]):t[a]}),e},ta=t=>(t.value||(t.value=Wl(t)),t.value),ea=(t,e)=>{let r=C();if(r.useVariable)return me(t,e);let o=r.theme;if(w(t)){let[n,s]=t.split(" "),i=o[n];if(i){if(!s&&!e)return ta(i);t=[n,s||e]}}if(H(t)&&t[1]){let n=t[0],s=t[1],{helpers:i,media:a,state:c}=o[n];if(a&&a[s])return ta(a[s]);if(i&&i[s])return ta(i[s]);if(c&&c[s])return ta(c[s])}else if(S(t))return Wl(t)},AA=(t,e,r)=>{if(S(e))t.variants.inverse.value=Wl(e);else if(e===!0){let{color:o,background:n}=r;t.variants.inverse={value:{color:n,background:o}}}},TA=(t,e,r,o)=>{let n=ea(r);o[`&:${e}`]=n,S(r)&&!r.value&&(r.value=n)},OA=(t,e)=>{let{state:r}=t;return r?(Object.keys(r).map(n=>{let s=r[n];return TA(t,n,s,e),t}),t):void 0},RA=(t,e,r,o)=>{let n=ea(r);o[`@media (prefers-color-scheme: ${e})`]=n,S(r)&&!r.value&&(r.value=n)},PA=(t,e)=>{let{media:r}=t;return r?(Object.keys(r).map(n=>{let s=r[n];return(n==="dark"||n==="light")&&RA(t,n,s,e),n==="inverse"&&AA(t,s,e),t}),t):void 0},IA=(t,e)=>{let r=C(),{helpers:o}=t;return o?(Object.keys(o).map(s=>{let i=o[s];return w(i)?o[s]=r.theme[i]:ta(o[s]),t}),t):void 0},ra=(t,e)=>{let r=C();if(r.useVariable)return oa(t,e);let{state:o,media:n,helpers:s}=t,i=Wl(t,e),c=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}`;return OA(t,i),PA(t,i),IA(t,i),{var:c,value:i,state:o,media:n,helpers:s}};var bg=(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===":")&&kA(l))for(let u in t){if(c.has(u))continue;let d=t[u]?.[l];if(d===void 0)continue;let h=et(d,`@${u}`);h!==void 0&&w(h)&&/^[a-z][a-zA-Z]+$/.test(h)&&!SA.has(h)&&c.add(u)}}for(let l of a){let f=l.slice(0,1),u=Object.values(t).some(d=>H(d?.[l]));if(f==="."&&u){let d=l.slice(1),h={};for(let g in t)H(t[g]?.[l])&&(h[g]=t[g][l]);i[l]=bg(h,`${e}-${d}`,r)}else if(f===":"&&u){let d=l.replace(/^:+/,""),h={};for(let g in t)H(t[g]?.[l])&&(h[g]=t[g][l]);i[l]=bg(h,`${e}-${d}`,r)}else if(f!=="@"&&f!=="."&&f!==":"){let h=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}-${l}`,g=s&&s!=="auto"?String(s).replace(/^'|'$/g,""):null,p;for(let m in t){if(c.has(m))continue;let b=t[m]?.[l];if(b===void 0)continue;let _=px(e,l,b,`@${m}`);if(_===void 0)continue;(g&&m===g||!g&&(m==="light"||p===void 0))&&(p=_);let y=`[data-theme="${m}"]`;if(n[y]||(n[y]={}),n[y][h]=_,m==="dark"||m==="light"){let x=`@media (prefers-color-scheme: ${m})`;n[x]||(n[x]={}),n[x][h]=_}}p!==void 0&&(o[h]=p),i[l]=`var(${h})`,i[`.${l}`]={[l]:i[l]}}}return(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color}),i},oa=(t,e,r,o)=>{let n=C(),{cssVars:s}=n,i={value:t},a=!r&&!o;if(H(t)){if(a&&n.useVariable){let c={};for(let l in t)l.startsWith("@")&&H(t[l])&&(c[l.slice(1)]=t[l]);if(Object.keys(c).length){let l=bg(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]=oa(f,e,c,o||u)}else if(!a){let u=px(e,c,f,o),d=[...new Set([o,r].filter(m=>m).map(m=>m.slice(1)))],h=d.length?"-"+d.join("-"):"",p=`--${n.varPrefix?n.varPrefix+"-":""}theme-${e}${h}-${c}`;n.useVariable?(n.useThemeSuffixedVars&&(s[p]=u),i[c]=`var(${p})`):i[c]=u,i[`.${c}`]={[c]:i[c]}}}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(w(t)&&mt(t)){let l=n.theme[t.slice(2)];return me(l,o)}return i},_g=t=>{let e=C(),r={};for(let o in t){let n=o.slice(0,1);if(H(t[o])){if(n==="@")continue;n===":"?r[`&${o}`]=_g(t[o]):n==="."&&(r[`&${o}`]=_g(t[o]))}else r[o]=t[o]}return r},hx=(t,e)=>{let r=e.shift();return t[r]?hx(t[r],e):t},dx=(t,e)=>O(e)?hx(t,e):w(e)&&t[e]?t[e]:t;var me=(t,e)=>{let r=C();if(w(t)&&mt(t)&&(t=me(t.slice(2))),!t||!w(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[o,...n]=O(t)?t:t.split(" "),s=r.theme[o];return s&&n.length?s=dx(s,n):s&&e&&(s=dx(s,e)),_g(s)};R();R();var na=(t,e)=>{let r=C(),o=`--font-${e}`;if(!t||O(t)&&!t[0])return;let n;if(t.isVariable){let s=pe(t.url,r.files)||t.url;dn(s)?n=pn(s):n=Er(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap"})}else if(t[0])n=po(e,t,r.files);else{let s=Array.isArray(t.url)?t.url.map(i=>pe(i,r.files)||i):pe(t.url,r.files)||t.url;n=Er(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch})}return{var:o,value:t,fontFace:n}},sa=(t,e)=>{let r=C(),{fontFamily:o}=r;return uo(e||o,t)},_n=(t,e)=>{let r=C(),{fontFamily:o,fontFamilyTypes:n}=r,{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!o.default)&&(o.default=e),S(s)&&(s=co(s));let a=`--font-family-${e}`,c=`${s.join(", ")}, ${n[i]}`;return{var:a,value:c,arr:s,type:i,isSystemFallback:!!t.isSystemFallback}};R();var ql=t=>{let e=C(),{typography:r,media:o}=e;for(let n in t){let s=n.slice(0,1)==="@",i=t[n];if(!s)continue;let{mediaRegenerate:a}=t,c=n.slice(1),{type:l,base:f,ratio:u,range:d,subSequence:h,h1Matches:g,unit:p}=t;gt(i,{type:l,base:f,ratio:u,range:d,subSequence:h,h1Matches:g,unit:p});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),b=i.unit||p,_=!i.unit&&m.has(p)?"rem":b,y=o[c],x="@media "+(y==="print"?`${y}`:`screen and ${y}`);if(r.templates[x]={fontSize:i.base/r.browserDefault+_},!a){gt(i,{sequence:{},scales:{},vars:{}}),Yt(i),Ar(t,n);continue}gt(i,{sequence:{},scales:{},templates:{},vars:{}}),Yt(i),Ar(t,n)}},Kl=t=>{let e=C();if(t.h1Matches){let r=t.unit,o=Ki(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}}}},ia=()=>{let t=C(),{typography:e}=t;Yt(e),Kl(e),nr(e),ql(e)},aa=t=>{let e=C(),{typography:r}=e;return ze(t,"fontSize",r)};R();var ca=t=>{if(!w(t))return;let r=C().shape;if(r)return r[t]!==void 0?r[t]:r[t.toLowerCase()]};R();var la=()=>{let t=C(),{timing:e}=t;Yt(e),nr(e)},ye=t=>{let e=C(),{timing:r}=e;return r[t]||r[Oi(t)]||t},oe=(t,e="timing")=>{let r=C(),{timing:o}=r;return ze(t,e,o)};R();var fa=()=>{let t=C(),{fontFamily:e,theme:r,typography:o}=t,n=t.document;return Je(n)?(mr(t,"document",n),n=t.document={}):n||(n=t.document={}),gt(n,{theme:r.document,fontFamily:uo(e),fontSize:o.base,lineHeight:o.lineHeight})};R();var wg={document:Q},xn=(t,e)=>{let r=C();if(!t){r.verbose&&console.warn("setSVG: val is not defined",e);return}return r.useSvgSprite?Yi(e,t):t},ua=(t,e=wg)=>{let r=C(),o=Object.keys(t).length?{}:r.svg;for(let n in t)o[n]=t[n];mx(o,e)},yo=(t,e)=>{let r=C();return r.useIconSprite&&!r.semanticIcons?.[e]?xn(t,e):t},bo=(t,e=wg)=>{let r=C(),o=Object.keys(t).length?{}:r.icons;for(let n in t)o[n]=t[n];mx(o,e)},xg=(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},DA=(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},gx=(t,e,r)=>{for(;e.firstChild;){let o=e.firstChild;r.appendChild(t.importNode(o,!0)),o.remove()}},mx=(t,e=wg)=>{let r=C(),o=e.document||Q;if(!o||!o.documentElement)return r.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),yn(t);let n=o.querySelector("#svgSprite"),s=yn(t),i=`<svg aria-hidden="true" width="0" height="0" style="position:absolute" id="svgSprite">${s}</svg>`,a=DA(o,s);if(n)if(a)gx(o,a,n);else if(o.body.insertAdjacentHTML)n.insertAdjacentHTML("beforeend",s);else{let c=xg(o,{isRoot:!1});c.innerHTML=s,n.append(...c.children)}else if(a){let c=xg(o);c&&c.nodeType&&(gx(o,a,c),o.body.prepend(c))}else if(o.body.insertAdjacentHTML)o.body.insertAdjacentHTML("afterbegin",i);else{let c=xg(o);c&&c.nodeType&&(c.innerHTML=s,o.body.prepend(c))}};R();var da=(t={})=>{let e=C(),r=e.typography||{},o=e.document||{},n=S(e.reset)?e.reset:e.reset={};if(n[":root"]){let c=n,l=r.templates||{};c.body={...e.useDocumentTheme?me("document"):{},...l.body},c.h1=l.h1,c.h2=l.h2,c.h3=l.h3,c.h4=l.h4,c.h5=l.h5,c.h6=l.h6}let{body:s,...i}=r.templates||{},a=e.useDocumentTheme?me("document"):{};if(n.html&&qt(n.html,a),r.unit){let c=e.media||{};for(let l in r){if(l.charAt(0)!=="@")continue;let f=r[l];if(!f||f.unit===r.unit||!f.unit)continue;let u=f.unit,d=f.base||r.base,h=f.browserDefault||r.browserDefault,g=l.slice(1),p=c[g];if(!p)continue;let m="@media "+(p==="print"?p:"screen and "+p);n[m]||(n[m]={}),n[m].html||(n[m].html={}),n[m].html.fontSize=d/h+u}}return st(gt(n,t),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",...a,fontSize:r.unit?r.base/r.browserDefault+r.unit:r.browserDefault+"px",fontFamily:o.fontFamily,lineHeight:o.lineHeight},body:{boxSizing:"border-box",height:"100%",margin:0,fontFamily:o.fontFamily,fontSize:r.unit?"1"+e.unit.default:r.base/r.browserDefault+e.unit.default,...i,...s},a:{color:"currentColor"},button:{color:"inherit",font:"inherit",background:"transparent",border:"none",cursor:"pointer",appearance:"none",WebkitAppearance:"none"},"input, select, textarea":{color:"inherit",font:"inherit"},fieldset:{border:0,padding:0,margin:0}},ee)};R();var $A=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),We=t=>re(t),Gl=t=>te.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(mt(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=et(e);return Ae(r)?r:e}).join(" "),Yl=(t,e)=>Qi(t,e),pa=(t,e)=>te.test(t)?t:er(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(mt(o))return`var(${o})`;if(o==="inset"||o==="none")return o;let n=et(o);if(Ae(n)){let i=It(o,e);return S(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(o)||o==="0"||o.includes("px")||o.slice(-2)==="em")return o;let s=St(o,"shadow");return s&&s.shadow?s.shadow:o}).join(" "):"")).join(", "),ha=(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=er(n).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||$A.has(f)||f==="transparent"||te.test(f))return f;let u=et(f);return Ae(u)?u:f}).join(" ")));return o+a.join(", ")+s},Xl=(t,e)=>{let r=C();return er(t).map(o=>{let n=o.trim();if(mt(n))return`var(${n})`;if(/^var\(/.test(n)||n.includes("url"))return n;if(r.gradient?.[n]){let s=It(n,e);if(w(s))return s;if(S(s)){for(let i in s)if(w(s[i]))return s[i]}return n}return n.includes("gradient")?ha(n,e):n.includes("/")||n.startsWith("http")||n.includes(".")&&!Nt(n)?`url(${n})`:n}).join(", ")},Jl=t=>w(t)&&t.split(" ").map(e=>St(e,"gap").gap).join(" "),Sg=t=>{let e=t.split(" ");return e.length?e.map(r=>mt(r)?`var(${r})`:r.length<3||r.includes("ms")?oe(r).timing||r:ye(r)?ye(r):r).join(" "):t},ga=(t,e,r)=>{if(w(t))return t.split(",").map(o=>oe(o).timing||o).join(",")},Zl=t=>{let e=t.split(",");if(e.length)return e.map(Sg).join(",")};function _t(t,e,r={},o={}){let n=ut.call(this,e||r[t]);if(n==null)return;let s;if(w(n)){if(/^(?:env|var)\(/.test(n.trim()))return{[t]:n};if(n.includes("(")){let c=or(n);s=c[0],n=c[1]}let i=r.scaleBoxSize,a=Xi(t);!i&&a&&!o.ratio&&(n=Zi(n))}return o.ratio?Te(r,t,n,s):St(n,t,void 0,s)}var N=(t,e=null,r)=>_t(t,e,r,{ratio:!0}),sr=(t,e,r,o="borderRadius")=>{if(w(t))return{[o]:t.split(" ").map(n=>{let s=ca(n);return s!==void 0?s:Te(e,r,n)[r]}).join(" ")}};R();var Sn="__smblsThemeRootOwner",kn=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)},yx=(t,e,r)=>{if(!(!t||!e)){kn(t),t.__prefersListener=r,t.__prefersMq=e;try{e.addEventListener("change",r)}catch{e.addListener(r)}}},LA=(t,e)=>{let r=C(),{cssVars:o}=r,n=e.startsWith("--")?e:`--${e}`;return o[n]=t,t},Xt=t=>t,Ql={color:Or,gradient:bn,font:na,fontFamily:_n,fontfamily:_n,theme:ra,icons:yo,semanticIcons:Xt,semanticicons:Xt,svg:xn,svgData:Xt,typography:Xt,shadow:Pr,spacing:Xt,media:Xt,grid:Xt,class:Xt,timing:Xt,reset:Xt,unit:Xt,animation:Xt,vars:LA,sizes:Xt,shape:Xt},MA=(t,e,r,o)=>{mr(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},kg=(t,e,r)=>{let o=C(),n=Bi(t),s=n.toLowerCase(),i=o[n]||o[s]||o[t],a=Je(i)?MA(o,i,s,[n,s,t]):i,c=Ql[n]||Ql[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")},vg=(t,e)=>{let r=C(),o=t.toLowerCase();return Je(e)?(mr(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 kg(o,e[s],s)}catch(i){r.verbose&&console.warn("Error setting",o,"value",e[s],s,i)}}),r[o]||r[t])},tf=(t,e)=>{let r=e||C();r.globalTheme=t;let n=No(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[Sn]=r,c)kn(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",yx(r,f,l)}else kn(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={},_o=(t,e=FA)=>{let r=e.config||C(),{version:o,verbose:n,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:c,useIconSprite:l,globalTheme:f,themeRoot:u,useDocumentTheme:d,useDefaultConfig:h,semanticIcons:g,hoverMedia:p,files:m,assets:b,..._}=t;e.newConfig&&(r=jl(e.newConfig)),Xe(_.document)&&(r.__domDocument=_.document,delete _.document),Xe(r.document)&&(r.__domDocument||(r.__domDocument=r.document),r.document={}),m!==void 0&&(r.files=m),b!==void 0&&(r.assets=b),n!==void 0&&(r.verbose=n),s!==void 0&&(r.useVariable=s),i!==void 0&&(r.useReset=i),c!==void 0&&(r.useFontImport=c),a!==void 0&&(r.useSvgSprite=a),l!==void 0&&(r.useIconSprite=l),d!==void 0&&(r.useDocumentTheme=d),f!==void 0&&(r.globalTheme=f),u!==void 0&&(r.themeRoot=u),t.useThemeSuffixedVars!==void 0&&(r.useThemeSuffixedVars=t.useThemeSuffixedVars),h!==void 0&&(r.useDefaultConfig=h),g!==void 0&&(r.semanticIcons=g),p!==void 0&&(r.hoverMedia=p),r.verbose&&console.log(r);let x=No(r)||(typeof document<"u"?document:null),k=x&&x.defaultView||(typeof window<"u"?window:null),E=x&&(r.themeRoot||x.documentElement);if(E&&typeof E.setAttribute=="function")if(r.globalTheme&&r.globalTheme!=="auto")kn(r),E.setAttribute("data-theme",r.globalTheme),r.resolvedTheme=r.globalTheme,E[Sn]=r,r.globalTheme==="dark"||r.globalTheme==="light"?E.style.colorScheme=r.globalTheme:E.style.colorScheme="light dark";else if(E[Sn]&&E[Sn]!==r&&E.hasAttribute("data-theme"))kn(r),r.resolvedTheme=E.getAttribute("data-theme");else if(k&&k.matchMedia){let z=rt=>{let at=rt.matches?"dark":"light";E.setAttribute("data-theme",at),r.resolvedTheme=at},V=k.matchMedia("(prefers-color-scheme: dark)");z(V),E.style.colorScheme="light dark",E[Sn]=r,yx(r,V,z)}else kn(r),E.setAttribute("data-theme","light"),r.resolvedTheme="light",E.style.colorScheme="light",E[Sn]=r;r.__svgCache||(r.__svgCache={});let T=Object.keys(_).filter(I=>!I.startsWith("__")),$=new Set(T);if(T.forEach(I=>{let z=I.toLowerCase();z!==I&&$.has(z)&&st(_[z],_[I],ee)}),T.map(I=>{let z=I.toLowerCase();if(!(z!==I&&$.has(z)))return vg(I,_[I])}),r.varPrefix&&(r.typography&&(r.typography.varPrefix=r.varPrefix),r.spacing&&(r.spacing.varPrefix=r.varPrefix),r.timing&&(r.timing.varPrefix=r.varPrefix)),_.typography)try{ia()}catch(I){r.verbose&&console.warn("Error applying typography sequence",I)}if(_.spacing)try{Ji()}catch(I){r.verbose&&console.warn("Error applying spacing sequence",I)}if(_.timing)try{la()}catch(I){r.verbose&&console.warn("Error applying timing sequence",I)}fa();let D=da();return D&&(r.reset=D),r};var xo=new Map,Cx=null,Ag=null,NA=null;function ma(t){t.batchAtomicCss&&(Ag=t.batchAtomicCss),t.compoundCssClass&&(NA=t.compoundCssClass)}var jA=new Set,_x=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function Tg(t){try{let e=C();e&&(e.__domDocument=t)}catch{}t&&jA.add(t)}function sf(){try{let t=C();if(t){if(_x(t.__domDocument))return t.__domDocument;if(_x(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var Jt={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};function af(){return{...Jt}}function Og(){for(let t in Jt)Jt[t]=0;of=!1}var of=!1,rf=(t,e)=>`${t} ${e}${t===1?"":"s"}`;function BA(t){let e=Date.parse(t);if(!isFinite(e))return"";let r=Math.floor((Date.now()-e)/864e5);return r<1?" (today)":` (${rf(r,"day")} ago)`}function UA(){try{let t=cf();return t&&t.cssRules?t.cssRules.length:-1}catch{return-1}}function VA(t,e){if(of)return!1;of=!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 ${rf(Jt.variable,"variable rule")} and ${rf(Jt.atomic,"atomic rule")}, while the design system held ${rf(e,"CSS variable")}.
41
41
  The document will render UNSTYLED and nothing else will report an error.
42
42
  This is what a STALE dist/ looks like: an obsolete emitter against a current design system.
43
43
  package : ${n}
44
44
  built : ${r}
45
45
  source : ${o}
46
46
  emitted : ${JSON.stringify(Jt)}
47
- sheet : style[data-smbls] currently holds ${DA()} rule(s)
47
+ sheet : style[data-smbls] currently holds ${UA()} 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 Sx(){try{let t=C(),e=t&&(t.CSS_VARS||t.cssVars);return e?Object.keys(e).length:0}catch{return 0}}function mx(t){ef||Jt.variable>0||Jt.atomic>0||kx(Math.max(t,Sx()))}function Ag(t){let e=t&&(t.CSS_VARS||t.cssVars);return kx(e?Object.keys(e).length:Sx())}function kx(t){let e=nf();if(t===0)return{ok:!0,reason:"no-design-system",stats:e,varCount:t};if(!sf())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 LA={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 xo(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function rf(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 MA(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():rf(e)}var FA={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select"};function Sn(t,e){let r=FA[t];return r?`${t}:${e};${r}:${e};`:`${t}:${e};`}var NA="@media (hover: hover)",jA=/(?:^|[^\\]):hover(?![\w-])/;function Tg(){try{let t=C();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function Te(t,e,r){return r===!1||!jA.test(e)||r===void 0&&!Tg()?t:`${NA}{${t}}`}function yx(t,e,r){let o=(r?r+"":"")+t+":"+e,n=_o.get(o),s=n?null:xo(t);if(!n){let c=LA[t]||rf(t),l=MA(e);n=r?`_${r}_${c}-${l}`:`_${c}-${l}`,_o.set(o,n)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return n;let i=s||xo(t),a=`.${n}{${Sn(i,e)}}`;return ye(a,void 0,"atomic"),n}var bx=new WeakMap,_x=new WeakMap;function ye(t,e,r){let o=sf(e);if(!o)return Jt.dropped++,"dropped";let n=bx.get(o);if(n||(n=new Set,bx.set(o,n)),n.has(t))return Jt.duplicate++,Jt[r||"global"]++,"duplicate";let s=_x.get(o);if(s&&s.has(t))return Jt.invalid++,"invalid";try{o.insertRule(t,o.cssRules.length)}catch{return s||(s=new Set,_x.set(o,s)),s.add(t),Jt.invalid++,"invalid"}return n.add(t),Jt[r||"global"]++,"inserted"}var xx=new WeakMap;function sf(t){let e=t||of();if(!e||!e.head)return null;let r=xx.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 xx.set(e,n),wx=n,n}var BA=8;function be(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]):vg?(o||(o=[]),o.push(c,String(l)),n++):s.push(yx(c,String(l),r)))}if(o&&n>=BA){let c=o.join("\0"),l=vg(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]&&ye(h[g],void 0,"atomic")}s.push(u)}else if(o)for(let c=0;c<o.length;c+=2)s.push(yx(o[c],o[c+1],r));let a=[];for(let c=0;c<i.length;c++)a.push(HA(i[c][0],i[c][1],r));return s.concat(a).join(" ").trim()}var kg=new Map,UA=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function VA(t){return typeof t!="string"||!t||t.startsWith("@media")||t.startsWith("@supports")?!1:t.split(",").every(e=>UA.test(e.trim()))}function HA(t,e,r){let o=JSON.stringify(e),n=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,s=n&&Tg(),i=(r?r+"":"")+t+o+(n&&!s?"rawhover":""),a=_o.get(i);if(a){let b=kg.get(a);if(b)for(let _=0;_<b.length;_++)ye(b[_],void 0,"atomic");return a}a=r?`_${r}_c${rf(i)}`:`_c${rf(i)}`;let c=`.${a}`,l=VA(t)?`.${a}.${a}`:c,f="",u=[],d=b=>typeof b=="string"&&(b.indexOf("{")!==-1||b.indexOf("}")!==-1),h=(b,_)=>{let y="";for(let x in _){let k=_[x];if(k!=null)if(typeof k=="object")h([...b,x],k);else{if(d(k))continue;y+=Sn(xo(x),k)}}y&&(b.length===0?f+=y:u.push({chain:b,body:y}))};h([],e);let g=b=>{let _=b.length===1?l:c;if(!b.length)return _;let y=b[0].split(",").map(x=>x.trim()).map(x=>x.includes("&")?x.replace(/&/g,_):x.startsWith(":")?`${_}${x}`:`${_} ${x}`);for(let x=1;x<b.length;x++){let k=b[x].split(",").map(T=>T.trim()),E=[];for(let T of y)for(let $ of k)$.includes("&")?E.push($.replace(/&/g,T)):$.startsWith(":")?E.push(T+$):E.push(T+" "+$);y=E}return y.join(", ")},p=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(f){let b=`${t}{${c}{${f}}}`;p.push(b),ye(b,void 0,"atomic")}for(let b of u){let _=g(b.chain),y=Te(`${t}{${_}{${b.body}}}`,_,s);p.push(y),ye(y,void 0,"atomic")}return kg.set(a,p),_o.set(i,a),a}let m=g([t]);if(f){let b=Te(`${m}{${f}}`,m,s);p.push(b),ye(b,void 0,"atomic")}for(let b of u){let _=g([t,...b.chain]),y=Te(`${_}{${b.body}}`,_,s);p.push(y),ye(y,void 0,"atomic")}return kg.set(a,p),_o.set(i,a),a}function kt(t){if(t==null||typeof t!="string"&&typeof t!="object")return;if(sf(),typeof t=="string"){let s=t.indexOf("--")!==-1;ye(t,void 0,s?"variable":"global"),s&&mx(1);return}let e=Tg(),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:xo(u);l+=Sn(h,c[u])}r+=f,ye(Te(`${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:xo(a);ye(`${s}{${Sn(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:xo(f);a+=Sn(h,u)}}if(r+=l,a&&ye(Te(`${s}{${a}}`,s,e),void 0,l?"variable":"global"),c){let f=[],u=[];for(let d in i)typeof i[d]=="object"&&i[d]!==null&&(d.startsWith("@media")||d.startsWith("@supports")?f.push(d):u.push(d));f.sort((d,h)=>{let g=p=>{let m=p.match(/max-width:\s*(\d+)/);return m?parseInt(m[1]):0};return g(h)-g(d)});for(let d of u)kt({[`${s} ${d}`]:i[d]});for(let d of f)kt({[d]:{[s]:i[d]}})}}}r>0&&mx(r)}function kn(t,e){let r="";for(let o in e){let n="";for(let s in e[o])n+=Sn(xo(s),e[o][s]);r+=`${o}{${n}}`}return ye(`@keyframes ${t}{${r}}`,void 0,"keyframes"),t}function vx(){_o.clear(),wx=null}function Og(){return _o.size}R();var xm={};P(xm,{DELEGATED_EVENTS:()=>Tn,LIFECYCLE_EVENTS:()=>Dr,MIXINS:()=>af,NON_BUBBLING_EVENTS:()=>cf,REGISTRY:()=>Nt,SVG_TAGS:()=>En,addDelegatedEvent:()=>ga,addMethods:()=>$n,applyExtends:()=>Rn,cacheNode:()=>Ir,create:()=>oe,createHTMLNode:()=>Cn,detectTag:()=>Pr,dispose:()=>Fr,flushMounts:()=>ka,globalEventKeyInfo:()=>lf,isSvgTag:()=>An,isValidTag:()=>vn,refreshContextProto:()=>gf,registerEvent:()=>On,registerGlobalEvent:()=>ff,remove:()=>Dn,removeDelegatedEvent:()=>ma,update:()=>Pn});var Pg="http://www.w3.org/2000/svg",En=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"]),zA=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 vn(t){return zA.has(t)||En.has(t)}function An(t){return En.has(t)}function Pr(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"&&vn(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]),vn(n)&&!o.has(n)?n:"div"}var Cx={};function Cn(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(An(t)){let o=e?.parent;if(t==="svg"||o?.node?.namespaceURI===Pg)return r.createElementNS(Pg,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Ir(t){let e=t.tag=Pr(t),o=An(e)&&(e==="svg"||t.parent?.node?.namespaceURI===Pg)?"svg:"+e:e,n=t?.context?.document||globalThis.document,s=Cx[o];if(s||(s=Cx[o]=Cn(e,t)),!s)return null;let i=n&&s.ownerDocument!==n?Cn(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var Nt=new Set(["extends","children","content","childrenAs","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","autoGrow","__name","__ref","__hash","__text","parent","node"]),af={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},Dr=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"]),cf=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"]),Ig=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),Tn=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 $g=new WeakMap,WA={passive:!0},qA={passive:!0,capture:!0},Lg=(t,e)=>Ig.has(t)?e?qA:WA:e||!1;function Ax(t){let e=$g.get(t);return e||(e={handlers:new Map,installed:new Set},$g.set(t,e)),e}function KA(t,e){let r=Ax(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}},Lg(t,o))}function ga(t,e,r,o){o||(o=e.ownerDocument?.documentElement||e.getRootNode());let n=Ax(o);KA(t,o),n.handlers.has(t)||n.handlers.set(t,new WeakMap),n.handlers.get(t).set(e,r)}function ma(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let o=$g.get(r);if(!o)return;let n=o.handlers.get(t);n&&n.delete(e)}function Ex(t){return Tn.has(t)&&!Dr.has(t)}function Tx(t,e){let{context:r}=t,o=r?.designSystem;return n=>{o&&it(o);try{let s=e.call(t,n,t,t.state,r);if(s&&typeof s.then=="function"){s.catch(i=>{t.error=i,console.error("[DOMQL] Async event error:",i)}).finally(()=>{o&&tt()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),r?.strictMode)throw s}o&&tt()}}function On(t,e,r){let{node:o,context:n}=e;if(!o)return;let s=Tx(e,r),i=cf.has(t);if(!i&&Ex(t)){let a=n?.rootNode||o.ownerDocument?.documentElement;ga(t,o,s,a)}else o.addEventListener(t,s,Lg(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!i&&Ex(t)){let a=n?.rootNode||o.ownerDocument?.documentElement;ma(t,o,a)}else o.removeEventListener(t,s,Lg(t,!1))})}var Dg=[["onDocument","document"],["onWindow","window"]];function lf(t){if(typeof t!="string")return null;for(let e=0;e<Dg.length;e++){let r=Dg[e][0];if(t.length<=r.length||!t.startsWith(r))continue;let o=t.charCodeAt(r.length);if(!(o<65||o>90))return{target:Dg[e][1],eventName:t.slice(r.length).toLowerCase()}}return null}var GA=/^[A-Za-z_$][\w$]*$/;function YA(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"&&GA.test(o)){let a=o;o=function(l){return t.call(a,l)}}return typeof o!="function"?null:(s===void 0&&(s=Ig.has(r)),{handler:o,capture:n,passive:s,once:i})}function XA(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 JA(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 ff(t,e,r){let o=e.__ref;if(!o)return;let n=YA(e,r,t.eventName);if(!n)return;let s=XA(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=Tx(e,n.handler),c=f=>{JA(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 Ox(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 Rn(t,e,r){let o=Ox(e);if(!o.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<o.length;i++){let a=Rx(o[i],s);a&&a!==e&&Px(t,a,r,new Set([e]))}}function Rx(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 Px(t,e,r,o=new Set){if(o.has(e))return;o.add(e);let n=Ox(e);if(n.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<n.length;a++){let c=Rx(n[a],i);c&&Px(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]=Ix(t[s],i):t[s]=i}}function Ix(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]=Ix(n,s):r[o]=s}return r}qo();R();var ZA=["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"],uf={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"]},$x=["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"],Lr=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()):Lx(t),QA=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate"]),Lx=t=>QA.has(t)?t.toLowerCase():null,tT=new Set(["draggable","contenteditable","spellcheck","autocorrect"]),sr=t=>typeof t=="string"&&(tT.has(t)||t.startsWith("aria-")),We=(t,e)=>e!==!0&&e!==!1?e:sr(t)?e?"true":"false":e===!0?"":e,Mr=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Lr(e)||uf.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(uf,t)?uf[t].includes(e):!1,Ng=t=>{if(!w(t))return!1;let e=t.toLowerCase();return $x.includes(e)},eT=(t,e,r)=>{let o={};for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(r&&n in r)continue;if(n==="aria"&&e[n]&&typeof e[n]=="object"){for(let a in e[n])bt(e[n][a])&&(o["aria-"+a]=e[n][a]);continue}if(n==="data"&&e[n]&&typeof e[n]=="object"){for(let a in e[n])if(bt(e[n][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());o["data-"+c]=e[n][a]}continue}let s=Mr(t,n),i=Ng(n);if(bt(e[n])&&(s||i)){let a=Lr(n)||n;o[a]=e[n]}}return o},rT=(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},$r=(t,e)=>{let r=t.call("exec",e,t);if(r)return w(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},Mg=(t,e)=>{let r=(t.preSrc||"")+($r(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},Fg={src:t=>Mg(t,t.src),href:t=>$r(t,t.href),action:t=>$r(t,t.action),poster:t=>Mg(t,t.poster),data:t=>$r(t,t.data)},jg=t=>{let e=t.tag||"div",r={};for(let o in Fg)if(t[o]!==void 0&&Mr(e,o)){let n=Fg[o](t);n!==void 0&&(r[o]=n)}return r},Dx=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},oT=(t,e,r)=>{if(t==="$"){let n=Dx(e,r);return n===void 0&&(n=!!r[e]),n}let o=r[e]===!0||r.state[e];if(!o){let n=Dx(e,r);n!==void 0&&(o=n)}return t==="."?!!o:!o},nT=new Set(["$",".","!"]),sT=(t,e,r)=>{let o={},n=(s,i,a,c)=>{let l=i;o[s]=f=>{if(oT(a,c,f))return A(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!nT.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=Mr(e,l),u=Ng(l);if(!f&&!u)continue;let d=Lr(l)||l;n(d,a[l],i,c)}}return o};function Pn(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"&&Bg(o))try{let s=r.onBeforeUpdate(r,r.state,r.context,e);if(s&&typeof s.then=="function")s.then(()=>ir(o,!1),i=>{ir(o,!0),r.context?.plugins?.length&&At("error",r,{hook:"onBeforeUpdate",error:i})||console.error("[DOMQL] onBeforeUpdate error:",i)});else if(ir(o,!1),s===!1)return r}catch(s){throw ir(o,!0),s}let n=!t||Object.keys(t).length===0;if(hc(()=>{if(t.state&&yt(r.state)&&r.state.$update(t.state),t.text!==void 0&&(r.text=t.text,!o.__exec.text&&r.node&&In(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&&!sr(s)?r.node.removeAttribute(s):typeof i!="function"&&typeof i!="object"&&r.node.setAttribute(s,We(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(Nt.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&&oe(i,r,s,e)}else s!=="text"&&s!=="html"&&s!=="style"&&s!=="attr"&&s!=="data"&&(r[s]=i)}}),r.node&&n&&o.__effects&&o.__effects.length)for(let s=0;s<o.__effects.length;s++){let i=o.__effects[s];i&&!i._disposed&&!i._isSubscribeToEffect&&typeof i._execute=="function"&&i._execute()}else if(r.node&&o.__conditionalRunners)for(let s of o.__conditionalRunners)s();return At("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}function Fr(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&&Fr(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 Dn(){Fr(this)}R();R();R();var iT=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],aT=["none","forwards","backwards","both"],cT=["normal","reverse","alternate","alternate-reverse"],lT=["running","paused"],fT=t=>/^[\d.]+m?s$/.test(t),uT=/^(?: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*\))$/,dT=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=>uT.test(o.replace(/\s+/g,"")))},Mx=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),pT={transform:dT,translate:Mx,rotate:t=>Mx(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},hT=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},gT=t=>{if(!S(t))return null;let e=null,r=-1;for(let o in t){let n=hT(o);n==null||!S(t[o])||n>=r&&(r=n,e=t[o])}return e},mT=t=>{let e=gT(t);if(!e)return!1;let r=Object.keys(e);if(!r.length)return!1;for(let o of r){let n=pT[o];if(!n)return!1;let s=e[o];if(s==null||typeof s=="object"||typeof s=="function"||!n(s))return!1}return!0},yT=(t,e)=>{if(S(t))return t;let{animation:r}=e.context&&e.context.designSystem||{},o=r&&r[t];return S(o)?o:null},bT=["reverse","alternate","alternate-reverse"],Fx=(t,e,r)=>{let o=r||e.animationDirection;return o&&bT.includes(String(o))?"both":mT(yT(t,e))?"backwards":"both"},_T=0,Nx=new Map,Ug=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(S(t)){let n=JSON.stringify(t),s=Nx.get(n);if(s)return s;let i=`smbls-anim-${_T++}`,a=kn(i,t);return Nx.set(n,a),a}let o=r&&r[t];return S(o)?kn(t,o):t},xT=(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:fT(u)?s.push(u):iT.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):cT.includes(u)?c=u:aT.includes(u)?l=u:lT.includes(u)?f=u:n||(n=u);return{name:n,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},Vg={animation:(t,e)=>{if(w(t)&&t.includes(" ")){let r=xT(t,e);return{animationName:Ug(r.name||t,e),animationDuration:r.durations[0]||re(e.animationDuration||"A").timing,animationDelay:r.durations[1]||re(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||me(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||Fx(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:Ug(t,e),animationDuration:re(e.animationDuration||"A").timing,animationDelay:re(e.animationDelay||"0s").timing,animationTimingFunction:me(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||Fx(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:Ug(t,e)}),animationDuration:t=>({animationDuration:re(t).timing}),animationDelay:t=>({animationDelay:re(t).timing}),animationTimingFunction:t=>({animationTimingFunction:me(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};R();var Hg={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>N("height",t,e),width:(t,e)=>N("width",t,e),boxSizing:t=>Tt(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("height",e),..._t("width",r||e)}},inlineSize:(t,e)=>N("inlineSize",t,e),blockSize:(t,e)=>N("blockSize",t,e),minWidth:(t,e)=>N("minWidth",t,e),maxWidth:(t,e)=>N("maxWidth",t,e),widthRange:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("minWidth",e),..._t("maxWidth",r||e)}},minHeight:(t,e)=>N("minHeight",t,e),maxHeight:(t,e)=>N("maxHeight",t,e),heightRange:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("minHeight",e),..._t("maxHeight",r||e)}},size:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...N("inlineSize",e),...N("blockSize",r||e)}},minBlockSize:(t,e)=>N("minBlockSize",t,e),minInlineSize:(t,e)=>N("minInlineSize",t,e),maxBlockSize:(t,e)=>N("maxBlockSize",t,e),maxInlineSize:(t,e)=>N("maxInlineSize",t,e),minSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("minInlineSize",e),..._t("minBlockSize",r||e)}},maxSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("maxInlineSize",e),..._t("maxBlockSize",r||e)}},borderWidth:(t,e)=>N("borderWidth",t,e),borderTopWidth:(t,e)=>N("borderTopWidth",t,e),borderRightWidth:(t,e)=>N("borderRightWidth",t,e),borderBottomWidth:(t,e)=>N("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>N("borderLeftWidth",t,e),padding:(t,e)=>N("padding",t,e),scrollPadding:(t,e)=>N("scrollPadding",t,e),paddingInline:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("paddingInlineStart",e),..._t("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("paddingBlockStart",e),..._t("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>N("paddingBlockStart",t,e),paddingBottom:(t,e)=>N("paddingBlockEnd",t,e),paddingLeft:(t,e)=>N("paddingInlineStart",t,e),paddingRight:(t,e)=>N("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>N("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>N("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>N("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>N("paddingInlineEnd",t,e),margin:(t,e)=>N("margin",t,e),marginInline:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("marginInlineStart",e),..._t("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!w(e.marginBlock))return;let[r,o]=e.marginBlock.split(" ");return{..._t("marginBlockStart",r),..._t("marginBlockEnd",o||r)}},marginTop:(t,e)=>N("marginBlockStart",t,e),marginBottom:(t,e)=>N("marginBlockEnd",t,e),marginLeft:(t,e)=>N("marginInlineStart",t,e),marginRight:(t,e)=>N("marginInlineEnd",t,e),marginInlineStart:(t,e)=>N("marginInlineStart",t,e),marginInlineEnd:(t,e)=>N("marginInlineEnd",t,e),marginBlockStart:(t,e)=>N("marginBlockStart",t,e),marginBlockEnd:(t,e)=>N("marginBlockEnd",t,e),gap:t=>({gap:Yl(t)}),columnGap:(t,e)=>Ae(e,"columnGap",t),rowGap:(t,e)=>Ae(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)=>nr(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>nr(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>nr(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>nr(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>nr(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>nr(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var zg={fontSize:t=>sa(t)||t,fontFamily:t=>({fontFamily:oa(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 Wg={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 qg={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>St(r,"k").k).join(" ")}},left:t=>St(t,"left"),top:t=>St(t,"top"),right:t=>St(t,"right"),bottom:t=>St(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>St(r,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>St(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};R();var df=0,Kg=()=>{df++},Gg=()=>{df>0&&df--},_e=({context:t,state:e})=>{let r=t?.designSystem,o=e?.root?.globalTheme||r?.globalTheme;return o&&o!=="auto"?o:df>0?null:r&&r.resolvedTheme||null},ne=(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=ne(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?ge(t,`@${e.themeModifier}`):ge(t)},color:(t,e)=>{let r=_e(e);if(t)return ne("color",It(t,r))},background:(t,e)=>{let r=_e(e);if(t)return w(t)&&t.includes("gradient")&&t.includes("(")?{background:da(t,r)}:ne("background",It(t,r))},backgroundColor:(t,e)=>{let r=_e(e);if(t)return ne("backgroundColor",It(t,r))},backgroundImage:(t,e,r,o)=>{let n=_e(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 ne("backgroundImage",Gl(t,n))},textStroke:t=>({WebkitTextStroke:ql(t)}),outline:t=>({outline:ze(t)}),outlineOffset:(t,e)=>N("outlineOffset",t,e),border:t=>({border:ze(t)}),borderColor:(t,e)=>{let r=_e(e);if(t)return ne("borderColor",It(t,r))},borderTopColor:(t,e)=>{let r=_e(e);if(t)return ne("borderTopColor",It(t,r))},borderBottomColor:(t,e)=>{let r=_e(e);if(t)return ne("borderBottomColor",It(t,r))},borderLeftColor:(t,e)=>{let r=_e(e);if(t)return ne("borderLeftColor",It(t,r))},borderRightColor:(t,e)=>{let r=_e(e);if(t)return ne("borderRightColor",It(t,r))},borderLeft:t=>({borderLeft:ze(t)}),borderTop:t=>({borderTop:ze(t)}),borderRight:t=>({borderRight:ze(t)}),borderBottom:t=>({borderBottom:ze(t)}),shadow:(t,e)=>{let r=_e(e);if(t)return ne("boxShadow",Kl(t,r))},boxShadow:(t,e)=>{if(!w(t))return;let[r,o]=t.split("!importan"),n=_e(e),s=o?" !important":"",i=ua(r.trim(),n);return w(i)?{boxShadow:i+s}:ne("boxShadow",i)},textShadow:(t,{context:e})=>ne("textShadow",ua(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:ze(t)})};var ya={transition:t=>({transition:Xl(t)}),transitionDuration:t=>({transitionDuration:pa(t)}),transitionDelay:t=>({transitionDelay:pa(t)}),transitionTimingFunction:t=>({transitionTimingFunction:me(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};R();var Xg={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 Jg={area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:t}),templateColumns:t=>({gridTemplateColumns:t}),autoColumns:t=>({gridAutoColumns:t}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:t}),templateRows:t=>({gridTemplateRows:t}),autoRows:t=>({gridAutoRows:t}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var xt={...Vg,...Hg,...zg,...Wg,...qg,...Yg,...ya,...Xg,...Jg};var vt=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction","appearance","aspectRatio","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundRepeatX","backgroundRepeatY","backgroundSize","baselineShift","blockSize","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxDecorationBreak","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caretColor","clear","clip","clipPath","color","colorAdjust","colorInterpolation","colorInterpolationFilters","colorRendering","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","content","counterIncrement","counterReset","cursor","direction","display","emptyCells","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantNumeric","fontVariantPosition","fontWeight","fontVariationSettings","fontSynthesis","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","hyphens","imageOrientation","imageRendering","imeMode","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","initialLetter","isolation","justifyContent","justifyItems","justifySelf","left","letterSpacing","lineBreak","lineClamp","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","marginBlock","marginBlockEnd","marginBlockStart","marginInline","marginInlineEnd","marginInlineStart","mask","maskBorder","maskBorderImage","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","maxBlockSize","maxHeight","maxInlineSize","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","objectFit","objectPosition","objectViewBox","offset","offsetDistance","offsetPath","offsetRotate","opacity","order","orientation","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowClip","overflowScrolling","overflowWrap","overflowX","overflowY","overscrollBehavior","overscrollBehaviorX","overscrollBehaviorY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollPadding","scrollSnapAlign","scrollSnapType","scrollbarColor","scrollbarGutter","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","top","touchAction","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);R();var wT=/^-?[A-Z][0-9]?$/,ST=/^[a-z][0-9]?$/,jx=/var\(\s*(--[A-Za-z0-9-]+)/g,kT=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}},vT=(t,e)=>{if(!e.size)return[];let r=t.split(/[(),\s]+/).filter(Boolean),o=new Set;for(let n of r){if(!wT.test(n))continue;let s=n.charCodeAt(0)===45?n.slice(1):n;e.has(s)&&o.add(n)}return[...o]},CT=(t,e)=>{if(!e.size)return[];let r=[];jx.lastIndex=0;let o;for(;o=jx.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(!ST.test(i))continue;let a=n.slice(0,s+1)+i.toUpperCase();a!==n&&e.has(a)&&r.push({varName:n,corrected:a})}return r},pf=new Set,Bx=(t,e,r)=>{if(!Pt()||!w(e)||!e)return;let o;try{o=C()}catch{return}let{knownLetters:n,knownVars:s}=kT(o);if(!n.size&&!s.size)return;let i=vT(e,n),a=CT(e,s);if(!i.length&&!a.length)return;let c=r?.__ref?.path?r.__ref.path.join("."):r?.key||"?";for(let l of i){let f=`${c}::${t}::bare::${l}::${e}`;pf.has(f)||(pf.add(f),console.warn(`[smbls/css-in-props] "${t}" on <${c}> looks like it contains an un-wrapped design-system token ("${l}") \u2014 "${t}" has no registered resolver, so its value is forwarded to the browser untouched. A bare letter token there is invalid CSS, so the browser drops the ENTIRE "${t}" declaration (not just this argument). Wrap it in var(--<family>-${l.replace("-","")}) (or calc(-1 * var(--<family>-${l.replace("-","")})) for a negative). Value: "${e}"`))}for(let{varName:l,corrected:f}of a){let u=`${c}::${t}::case::${l}::${e}`;pf.has(u)||(pf.add(u),console.warn(`[smbls/css-in-props] "${t}" on <${c}> references ${l}, which the active design system never emits. CSS custom-property names are case-sensitive \u2014 the real variable is ${f}, so this reference silently never resolves. Value: "${e}"`))}};R();var ET=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,AT=(t,e,r)=>{let{context:o}=r;if(!o.designSystem?.media)return;let n=t.slice(1),s=o.designSystem.media[n],i=se(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(ET),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},Ux=(t,e,r)=>({[t]:se(e,r)}),ba=(t,e,r)=>{let o=`&${t}`,n=se(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}},Zg=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},TT=(t,e,r)=>{let o=t.slice(1),n=Zg(o,r);if(n===void 0&&(n=!!r[o]),!!n)return se(e,r)},OT=(t,e,r)=>({[t]:e}),RT=(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=Zg(o,r);s!==void 0&&(n=s)}if(n)return se(e,r)},PT=(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=Zg(o,r);s!==void 0&&(n=s)}if(!n)return se(e,r)},Qg=(t,e)=>se(t,e),tm={"@":AT,":":ba,"[":ba,"*":ba,"+":ba,"~":ba,"&":Ux,">":Ux,$:TT,"-":OT,".":RT,"!":PT};var hf=br(),Vx=(t,e,r)=>{let o=e?.context?.designSystem;o&&it(o);try{let n={},s={},i=(a,c)=>{if(r.unpack){n={...n,...c};return}n[a]=c};for(let a in t){let c=t[a];if(a==="class"&&e.call("isString",t.class)){let l=c.split(" ");if(l.length){let f=e.context.designSystem.class,u=l.reduce((d,h)=>gt(d,f[h]),{});n.designSystemClass=u}}else if(a==="true"){let l=ft(c,e);gt(n,Qg(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),!hf&&S(n[a])&&(n[a].label=a)}else if(xt[a]){let l=ft(c,e);O(l)&&(l=l.reduce((u,d)=>gt(u,d),{}));let f=xt[a](l,e,e.state,e.context);O(f)&&(f=f.reduce((u,d)=>gt(u,d),{})),f&&i(a,f),!hf&&S(n[a])&&(n[a].label=a)}else if(vt.has(a)){let l=ft(c,e);typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),hf||Bx(a,l,e),i(a,{[a]:l}),!hf&&S(n[a])&&(n[a].label=a)}else s[a]=c}return[n,s]}finally{o&&tt()}},Hx=(t,e)=>{let r={};for(let o in t){let n=tm[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"?Wt(r[i],s[i]):r[i]=s[i])}}return r},se=(t,e,r={unpack:!0})=>{let[o,n]=Vx(t,e,r),s=Hx(n,e),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return Ps(o,s);o._selectors=s}return o},IT=(t,e)=>{let r={};if(t.class)for(let o in t.class)r[o]=t.class[o](e);return r};R();var zx=t=>{if(S(t))return se(t,t)},DT=(t,e)=>{let r=zx(t);return typeof e=="function"?e(r):be(r)};R();function rm(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 Wx=new Set;function $T(t,e,r){let o=String(e);if(Wx.has(o))return;Wx.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.`;rm(t,"error",[a]),console.error(a)}function LT(...t){return rm(this,"warn",t),gi.apply(this,t)}function MT(...t){return rm(this,"error",t),so.apply(this,t)}var qx={update:Pn,remove:Dn,getDB:_i,getQuery:xi,getRootData:di,getChildren:ai,getPath:ci,nextElement:mi,previousElement:yi,verbose:Jo,warn:LT,error:MT,variables:bi,spotByPath:ii,set(t,e){let r=this.__ref;if(r){if(r.__setLocked){r.__setQueued={content:t,options:e};return}r.__setLocked=!0}try{if(this.removeContent(),t!=null){let 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:ui,getRootState:fi,getRootContext:pi,getContext:hi,parse(t){let e={},r=t?new Set(t):null,o=this.__ref?.__exec;for(let n in this)if(!(n==="parent"||n==="node"||n==="__ref")&&!r?.has(n)){if(o&&o[n]!==void 0){e[n]=o[n];continue}typeof this[n]!="function"&&(e[n]=this[n])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let o of r.__children)this[o]?.parseDeep&&(e[o]=this[o].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let r of t)e[r]=this[r];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(let e in t){let r=t[e];if(r==null)continue;let o=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),n=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(o,n,"important")}},call(t,...e){let r=this.context,o=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof o=="function")return o.call(this,...e);Pt()&&$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)}},em=new WeakMap;function FT(t){if(!t)return qx;let e=em.get(t);if(e)return e;e=Object.create(qx);let r=t.methods;if(r)for(let o in r)e[o]=r[o];return em.set(t,e),e}function $n(t){let e=FT(t.context);Object.setPrototypeOf(t,e)}function gf(t){if(!t)return!1;let e=em.get(t);if(!e)return!1;let r=t.methods;if(!r)return!1;for(let o in r)e[o]=r[o];return!0}var mf=[],yf=!1,Nr=0;function bf(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function Kx(t){let e=typeof globalThis<"u"?globalThis.scheduler:null;if(e&&typeof e.yield=="function"){e.yield().then(t,t);return}if(typeof MessageChannel=="function"){let r=new MessageChannel;r.port1.onmessage=()=>{r.port1.close(),t()},r.port2.postMessage(0);return}setTimeout(t,0)}function Gx(){return Nr?bf()-Nr>=50:!1}var Ln=0;function Yx(){Ln===0&&!Nr&&(Nr=bf()),Ln++}function Xx(){Ln>0&&Ln--,Ln===0&&!yf&&(Nr=0)}function Jx(t){mf.push(t),yf||(yf=!0,Kx(Zx))}function Zx(){for(Nr=bf();mf.length;){let t=mf.shift();try{t()}catch(e){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",e?.message||e)}if(bf()-Nr>=50)break}if(mf.length){Kx(Zx);return}yf=!1,Nr=0,Ln=0}R();qo();var am={};P(am,{STATE_METHODS:()=>Qx,applyInitialState:()=>xf,applyStateMethods:()=>ie,callStateMethod:()=>_a,createState:()=>nm,isTracking:()=>im,useHostState:()=>sm});var Qx=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"]),_f=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},Oe=(t,e,r,{onlyIfAbsent:o}={})=>{_f(t,"$"+e,r),!(o&&Object.prototype.hasOwnProperty.call(t,e))&&_f(t,e,r)},_a=(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)},ie=(t,e)=>{if(yt(e)){let n=e.__raw||e;Oe(n,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),Oe(n,"set",function(s,i={}){return e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,i),e},{onlyIfAbsent:!0}),Oe(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}),Oe(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}),Oe(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}),Oe(n,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),Oe(n,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),Oe(n,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),Oe(n,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&yt(a.parent);)a=a.parent;return _a(a,"update",s,i)}),Oe(n,"parentUpdate",function(s,i={}){if(e.parent)return _a(e.parent,"update",s,i)}),Oe(n,"quietReplace",function(s,i={}){return e.$replace(s,{quiet:!0,...i})}),Object.getOwnPropertyDescriptor(n,"root")||Object.defineProperty(n,"root",{get:function(){let s=e,i=yt(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,yt(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]},o={update(n){if(!n||typeof n!="object")return e;for(let s in n)e[s]=n[s];return e},apply(n){if(typeof n!="function")return e;let s=n(e);return s?e.$update(s):e},parse(){return{...e}},toggle(n){return e[n]=!e[n],e},set(n){if(!n||typeof n!="object")return e;r();for(let s in n)e[s]=n[s];return e},replace(n){return e.$set(n)},clean(){return r(),e}};for(let n in o)if(_f(e,"$"+n,o[n]),typeof e[n]!="function"){if(Object.prototype.hasOwnProperty.call(e,n)){yc(n,"");continue}_f(e,n,o[n])}};var nm=function(t,e,r){return t.state=xf(t,e,r),t.state},xf=function(t,e,r){let{__ref:o}=t,n=t.state;if(n==null||n===!1){let s=e?.state||{};return ie(t,s),s}if(typeof n=="string")return o&&(o.__state=n),o.__stateType="string",NT(n,t,e);if(typeof n=="number"||typeof n=="boolean"){o&&(o.__state=n,o.__stateType=typeof n,o.__hasRootState=!0);let s=Ge({value:n});return s.__element=t,e?.state&&(s.parent=e.state),ie(t,s),s}if(typeof n=="function"&&(n=n(t,e?.state)||{}),typeof n=="object"&&!yt(n)){o&&(o.__hasRootState=!0),n.isRootState&&o&&(o.__hasRootState=!0);let s=Ge({...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)),ie(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,r),s}return yt(n)?(n.__element=t,n):e?.state||{}};function om(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 NT(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?om(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?om(n,s):n??{}}let o=om(r.state,t);if(o&&typeof o=="object"&&!yt(o)&&!Object.getOwnPropertyDescriptor(o,"root")){let n=r.state?.root||r.state;Object.defineProperty(o,"root",{get:()=>n,enumerable:!1,configurable:!0})}return o}var sm=(t,e)=>{if(!t)return ew;let r=BT(t,e);return!r||!r.state?ew:VT(r.state)},im=()=>gc()!=null,jT=128;function BT(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<jT&&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 UT={get(t,e){return t[e]}},tw=new WeakMap,VT=t=>{let e=tw.get(t);return e||(e=new Proxy(t,UT),tw.set(t,e)),e},ew=new Proxy(Object.create(null),{get(){},has(){return!1}});var HT=1,wa=[],um=!1;function rw(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function zT(){return typeof document<"u"&&document.visibilityState==="hidden"}var WT=250;function lw(){if(!um){if(um=!0,typeof requestAnimationFrame!="function"){setTimeout(ka,0);return}zT()?setTimeout(ka,WT):requestAnimationFrame(ka)}}var qT=300,KT=15e4;function ka(){if(um=!1,!wa.length)return;let t=wa.splice(0,wa.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=rw());let n=rw()-o.__mountFirstAttemptAt;o.__mountAttempts<=qT&&n<KT?(wa.push(r),lw()):console.warn("[DOMQL] onMounted dropped after",o.__mountAttempts,"attempts /",n,"ms \u2014 node never connected:",r.key||r.tag||r);continue}ar("Mounted",r,r.__ref?.__mountOptions||{})}}}function fw(t,e){typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,wa.push(t),lw())}function ow(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&At("contentUpdate",t,e);let r=t.context?.designSystem;r&&it(r);try{t.onContentUpdate(t,t.state,t.context,e)}catch(o){if(t.context?.plugins?.length&&At("error",t,{hook:"onContentUpdate",error:o})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',o),t.context?.strictMode)throw o}finally{r&&tt()}}function Fn(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function GT(t){return t.charAt(2).toLowerCase()+t.slice(3)}function YT(t){return t.toLowerCase()}function dm(t){let e=t.charCodeAt(0);return e===58||e===64||e===38}function Sa(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]=Sa(n,s):r[o]=s}return r}function oe(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||`_${HT++}`,s.parent=e||null,s.context=t.context||e?.context||o.context||{},s.context.__create||(s.context.__create=oe);let i=s.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||s,path:e?.__ref?.path?[...e.__ref.path,s.key]:[s.key],origin:t};if(r&&!t.extends&&!t.extend){let p=r.indexOf("_");if(p>0){let m=r.substring(0,p),b=s.context?.components;b&&(b[m]||b["smbls."+m])?t={...t,extends:m}:b&&Pt()&&/^[A-Z]\w*_\d+$/.test(r)&&console.warn(`[smbls] auto-extend: key "${r}" looks like a multi-instance (${m}_N) but neither "${m}" nor "smbls.${m}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}Rn(s,t,o);let a=new Set(["childProps","attr","style","scope","data"]),c=s.props&&typeof s.props=="object"?s.props:null;for(let p in t){if(p==="parent"||p==="node"||p==="__ref"||p==="extends"||p==="context"||p==="props")continue;let m=t[p],b=s[p],_=b&&m&&typeof b=="object"&&typeof m=="object"&&!Array.isArray(b)&&!Array.isArray(m)&&typeof b!="function"&&typeof m!="function";_&&p.charCodeAt(0)>=65&&p.charCodeAt(0)<=90?s[p]=Sa(b,m):_&&a.has(p)?s[p]={...b,...m}:_&&dm(p)?s[p]=Sa(b,m):s[p]=m}function l(p){for(let m in p){let b=p[m],_=s[m],y=_&&b&&typeof _=="object"&&typeof b=="object"&&!Array.isArray(_)&&!Array.isArray(b)&&typeof _!="function"&&typeof b!="function";y&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?s[m]=Sa(_,b):y&&a.has(m)?s[m]={..._,...b}:y&&dm(m)?s[m]=Sa(_,b):s[m]=b}}c&&l(c),t.props&&typeof t.props=="object"&&l(t.props),t.data!==void 0&&(s.data=t.data),t.classlist!==void 0&&(s.classlist=t.classlist),t.text!==void 0&&(s.text=t.text),t.html!==void 0&&(s.html=t.html);let f=s.scope&&typeof s.scope=="object"?s.scope:null,u=e?.scope,d=s.context&&typeof s.context.globalScope=="object"&&s.context.globalScope||null,h=u||d||null;if(t.scope!==void 0||f){let p={};f&&Object.assign(p,f),t.scope!==void 0&&Object.assign(p,t.scope),s.scope=mc(p,h)}else h&&(s.scope=h);if(t.if!==void 0&&(s.if=t.if),$n(s),XT(s,e,t),s.if!=null){let p;if(typeof s.if=="function")try{p=s.if(s,s.state,s.context)}catch(m){if(p=!1,i.__ifError=m,typeof console<"u"&&console.warn){let b=s.key||s.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${b} \u2014 treating as false:`,m?.message||m)}}else p=s.if;i.__if=!!p}if(i.__if)typeof s.if=="function"&&(i.__ifInitialized=!0);else return e&&(e[s.key]=s),typeof s.if=="function"&&pw(s,i,s.if),s;s.tag||(s.tag=Pr(s)),ar("Init",s,o);let g=s.node=Ir(s);if(!g)return s;if(s.tag==="fragment"){let m=(s.context?.document||globalThis.document).createComment("");g.appendChild(m),i.__fragmentAnchor=m}ar("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),yw(s,o),dw(s),pm(s),gw(s),d1(s);try{bw(s,o)}catch(p){if(typeof console<"u"&&console.error){let m=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${m}:`,p?.message||p,p?.stack?`
50
+ Do NOT trust any browser measurement taken on this page until that reads clean.`),!0}function Ex(){try{let t=C(),e=t&&(t.CSS_VARS||t.cssVars);return e?Object.keys(e).length:0}catch{return 0}}function xx(t){of||Jt.variable>0||Jt.atomic>0||Ax(Math.max(t,Ex()))}function Rg(t){let e=t&&(t.CSS_VARS||t.cssVars);return Ax(e?Object.keys(e).length:Ex())}function Ax(t){let e=af();if(t===0)return{ok:!0,reason:"no-design-system",stats:e,varCount:t};if(!cf())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 VA(r,t),{ok:!1,reason:r,stats:e,varCount:t}}var HA={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 wo(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function nf(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 zA(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():nf(e)}var WA={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select"};function vn(t,e){let r=WA[t];return r?`${t}:${e};${r}:${e};`:`${t}:${e};`}var qA="@media (hover: hover)",KA=/(?:^|[^\\]):hover(?![\w-])/;function Pg(){try{let t=C();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function Oe(t,e,r){return r===!1||!KA.test(e)||r===void 0&&!Pg()?t:`${qA}{${t}}`}function wx(t,e,r){let o=(r?r+"":"")+t+":"+e,n=xo.get(o),s=n?null:wo(t);if(!n){let c=HA[t]||nf(t),l=zA(e);n=r?`_${r}_${c}-${l}`:`_${c}-${l}`,xo.set(o,n)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return n;let i=s||wo(t),a=`.${n}{${vn(i,e)}}`;return be(a,void 0,"atomic"),n}var Sx=new WeakMap,kx=new WeakMap;function be(t,e,r){let o=cf(e);if(!o)return Jt.dropped++,"dropped";let n=Sx.get(o);if(n||(n=new Set,Sx.set(o,n)),n.has(t))return Jt.duplicate++,Jt[r||"global"]++,"duplicate";let s=kx.get(o);if(s&&s.has(t))return Jt.invalid++,"invalid";try{o.insertRule(t,o.cssRules.length)}catch{return s||(s=new Set,kx.set(o,s)),s.add(t),Jt.invalid++,"invalid"}return n.add(t),Jt[r||"global"]++,"inserted"}var vx=new WeakMap;function cf(t){let e=t||sf();if(!e||!e.head)return null;let r=vx.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 vx.set(e,n),Cx=n,n}var GA=8;function _e(t,e,r){if(!t||typeof t!="object")return"";let o=null,n=0,s=[],i=[];for(let c in t){let l=t[c];l==null||l===!1||l===""||(typeof l=="object"?i.push([c,l]):Ag?(o||(o=[]),o.push(c,String(l)),n++):s.push(wx(c,String(l),r)))}if(o&&n>=GA){let c=o.join("\0"),l=Ag(c),f=l.indexOf("\0"),u=l.substring(0,f),d=l.substring(f+1);if(d){let h=d.split(`
51
+ `);for(let g=0;g<h.length;g++)h[g]&&be(h[g],void 0,"atomic")}s.push(u)}else if(o)for(let c=0;c<o.length;c+=2)s.push(wx(o[c],o[c+1],r));let a=[];for(let c=0;c<i.length;c++)a.push(JA(i[c][0],i[c][1],r));return s.concat(a).join(" ").trim()}var Eg=new Map,YA=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function XA(t){return typeof t!="string"||!t||t.startsWith("@media")||t.startsWith("@supports")?!1:t.split(",").every(e=>YA.test(e.trim()))}function JA(t,e,r){let o=JSON.stringify(e),n=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,s=n&&Pg(),i=(r?r+"":"")+t+o+(n&&!s?"rawhover":""),a=xo.get(i);if(a){let b=Eg.get(a);if(b)for(let _=0;_<b.length;_++)be(b[_],void 0,"atomic");return a}a=r?`_${r}_c${nf(i)}`:`_c${nf(i)}`;let c=`.${a}`,l=XA(t)?`.${a}.${a}`:c,f="",u=[],d=b=>typeof b=="string"&&(b.indexOf("{")!==-1||b.indexOf("}")!==-1),h=(b,_)=>{let y="";for(let x in _){let k=_[x];if(k!=null)if(typeof k=="object")h([...b,x],k);else{if(d(k))continue;y+=vn(wo(x),k)}}y&&(b.length===0?f+=y:u.push({chain:b,body:y}))};h([],e);let g=b=>{let _=b.length===1?l:c;if(!b.length)return _;let y=b[0].split(",").map(x=>x.trim()).map(x=>x.includes("&")?x.replace(/&/g,_):x.startsWith(":")?`${_}${x}`:`${_} ${x}`);for(let x=1;x<b.length;x++){let k=b[x].split(",").map(T=>T.trim()),E=[];for(let T of y)for(let $ of k)$.includes("&")?E.push($.replace(/&/g,T)):$.startsWith(":")?E.push(T+$):E.push(T+" "+$);y=E}return y.join(", ")},p=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(f){let b=`${t}{${c}{${f}}}`;p.push(b),be(b,void 0,"atomic")}for(let b of u){let _=g(b.chain),y=Oe(`${t}{${_}{${b.body}}}`,_,s);p.push(y),be(y,void 0,"atomic")}return Eg.set(a,p),xo.set(i,a),a}let m=g([t]);if(f){let b=Oe(`${m}{${f}}`,m,s);p.push(b),be(b,void 0,"atomic")}for(let b of u){let _=g([t,...b.chain]),y=Oe(`${_}{${b.body}}`,_,s);p.push(y),be(y,void 0,"atomic")}return Eg.set(a,p),xo.set(i,a),a}function kt(t){if(t==null||typeof t!="string"&&typeof t!="object")return;if(cf(),typeof t=="string"){let s=t.indexOf("--")!==-1;be(t,void 0,s?"variable":"global"),s&&xx(1);return}let e=Pg(),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:wo(u);l+=vn(h,c[u])}r+=f,be(Oe(`${s}{${a}{${l}}}`,a,e),void 0,f?"variable":"global")}else{let l=a.charCodeAt(0)===45&&a.charCodeAt(1)===45;l&&r++;let f=l?a:wo(a);be(`${s}{${vn(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:wo(f);a+=vn(h,u)}}if(r+=l,a&&be(Oe(`${s}{${a}}`,s,e),void 0,l?"variable":"global"),c){let f=[],u=[];for(let d in i)typeof i[d]=="object"&&i[d]!==null&&(d.startsWith("@media")||d.startsWith("@supports")?f.push(d):u.push(d));f.sort((d,h)=>{let g=p=>{let m=p.match(/max-width:\s*(\d+)/);return m?parseInt(m[1]):0};return g(h)-g(d)});for(let d of u)kt({[`${s} ${d}`]:i[d]});for(let d of f)kt({[d]:{[s]:i[d]}})}}}r>0&&xx(r)}function Cn(t,e){let r="";for(let o in e){let n="";for(let s in e[o])n+=vn(wo(s),e[o][s]);r+=`${o}{${n}}`}return be(`@keyframes ${t}{${r}}`,void 0,"keyframes"),t}function Tx(){xo.clear(),Cx=null}function Ig(){return xo.size}R();var km={};P(km,{DELEGATED_EVENTS:()=>Rn,LIFECYCLE_EVENTS:()=>$r,MIXINS:()=>lf,NON_BUBBLING_EVENTS:()=>ff,REGISTRY:()=>jt,SVG_TAGS:()=>Tn,addDelegatedEvent:()=>ya,addMethods:()=>Mn,applyExtends:()=>In,cacheNode:()=>Dr,create:()=>ne,createHTMLNode:()=>An,detectTag:()=>Ir,dispose:()=>Nr,flushMounts:()=>Ca,globalEventKeyInfo:()=>uf,isSvgTag:()=>On,isValidTag:()=>En,refreshContextProto:()=>yf,registerEvent:()=>Pn,registerGlobalEvent:()=>df,remove:()=>Ln,removeDelegatedEvent:()=>ba,update:()=>Dn});var $g="http://www.w3.org/2000/svg",Tn=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"]),ZA=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 En(t){return ZA.has(t)||Tn.has(t)}function On(t){return Tn.has(t)}function Ir(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"&&En(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]),En(n)&&!o.has(n)?n:"div"}var Ox={};function An(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(On(t)){let o=e?.parent;if(t==="svg"||o?.node?.namespaceURI===$g)return r.createElementNS($g,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Dr(t){let e=t.tag=Ir(t),o=On(e)&&(e==="svg"||t.parent?.node?.namespaceURI===$g)?"svg:"+e:e,n=t?.context?.document||globalThis.document,s=Ox[o];if(s||(s=Ox[o]=An(e,t)),!s)return null;let i=n&&s.ownerDocument!==n?An(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var jt=new Set(["extends","children","content","childrenAs","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","autoGrow","__name","__ref","__hash","__text","parent","node"]),lf={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},$r=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"]),ff=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"]),Lg=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),Rn=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 Fg=new WeakMap,QA={passive:!0},tT={passive:!0,capture:!0},Ng=(t,e)=>Lg.has(t)?e?tT:QA:e||!1;function Px(t){let e=Fg.get(t);return e||(e={handlers:new Map,installed:new Set},Fg.set(t,e)),e}function eT(t,e){let r=Px(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}},Ng(t,o))}function ya(t,e,r,o){o||(o=e.ownerDocument?.documentElement||e.getRootNode());let n=Px(o);eT(t,o),n.handlers.has(t)||n.handlers.set(t,new WeakMap),n.handlers.get(t).set(e,r)}function ba(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let o=Fg.get(r);if(!o)return;let n=o.handlers.get(t);n&&n.delete(e)}function Rx(t){return Rn.has(t)&&!$r.has(t)}function Ix(t,e){let{context:r}=t,o=r?.designSystem;return n=>{o&&it(o);try{let s=e.call(t,n,t,t.state,r);if(s&&typeof s.then=="function"){s.catch(i=>{t.error=i,console.error("[DOMQL] Async event error:",i)}).finally(()=>{o&&tt()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),r?.strictMode)throw s}o&&tt()}}function Pn(t,e,r){let{node:o,context:n}=e;if(!o)return;let s=Ix(e,r),i=ff.has(t);if(!i&&Rx(t)){let a=n?.rootNode||o.ownerDocument?.documentElement;ya(t,o,s,a)}else o.addEventListener(t,s,Ng(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!i&&Rx(t)){let a=n?.rootNode||o.ownerDocument?.documentElement;ba(t,o,a)}else o.removeEventListener(t,s,Ng(t,!1))})}var Mg=[["onDocument","document"],["onWindow","window"]];function uf(t){if(typeof t!="string")return null;for(let e=0;e<Mg.length;e++){let r=Mg[e][0];if(t.length<=r.length||!t.startsWith(r))continue;let o=t.charCodeAt(r.length);if(!(o<65||o>90))return{target:Mg[e][1],eventName:t.slice(r.length).toLowerCase()}}return null}var rT=/^[A-Za-z_$][\w$]*$/;function oT(t,e,r){let o=e,n=!1,s,i=!1;if(e&&typeof e=="object"&&typeof e!="function"&&(o=e.handler,n=!!e.capture,i=!!e.once,typeof e.passive=="boolean"&&(s=e.passive)),typeof o=="string"&&rT.test(o)){let a=o;o=function(l){return t.call(a,l)}}return typeof o!="function"?null:(s===void 0&&(s=Lg.has(r)),{handler:o,capture:n,passive:s,once:i})}function nT(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 sT(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 df(t,e,r){let o=e.__ref;if(!o)return;let n=oT(e,r,t.eventName);if(!n)return;let s=nT(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=Ix(e,n.handler),c=f=>{sT(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 Dx(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 In(t,e,r){let o=Dx(e);if(!o.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<o.length;i++){let a=$x(o[i],s);a&&a!==e&&Lx(t,a,r,new Set([e]))}}function $x(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 Lx(t,e,r,o=new Set){if(o.has(e))return;o.add(e);let n=Dx(e);if(n.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<n.length;a++){let c=$x(n[a],i);c&&Lx(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]=Mx(t[s],i):t[s]=i}}function Mx(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]=Mx(n,s):r[o]=s}return r}Ko();R();var iT=["alert","alertdialog","application","article","banner","button","cell","checkbox","columnheader","combobox","complementary","contentinfo","definition","dialog","directory","document","feed","figure","form","grid","gridcell","group","heading","img","link","list","listbox","listitem","log","main","marquee","math","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","navigation","none","note","option","presentation","progressbar","radio","radiogroup","region","row","rowgroup","rowheader","scrollbar","search","searchbox","separator","slider","spinbutton","status","switch","tab","table","tablist","tabpanel","term","textbox","timer","toolbar","tooltip","tree","treegrid","treeitem"],pf={default:["accesskey","autofocus","class","contenteditable","contextmenu","dir","draggable","hidden","id","lang","part","placeholder","slot","spellcheck","style","tabindex","title","translate","inert","radiogroup","role","about","datatype","inlist","prefix","property","resource","typeof","vocab","autocapitalize","autocorrect","autosave","color","itemprop","itemscope","itemtype","itemid","itemref","results","security","unselectable","is"],a:["accesskey","charset","coords","download","href","hreflang","name","rel","rev","shape","target","type"],aria:["aria-activedescendant","aria-atomic","aria-autocomplete","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],anchor:["download","href","hreflang","media","ping","rel","target","type","referrerpolicy"],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],area:["alt","coords","download","href","hreflang","media","referrerpolicy","rel","shape","target","ping"],base:["href","target"],blockquote:["cite"],button:["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","type","value"],canvas:["height","width"],col:["span","width"],colgroup:["span"],data:["value"],details:["open"],del:["cite","datetime"],dialog:["open"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],form:["acceptcharset","action","autocomplete","enctype","method","name","novalidate","target","rel"],html:["manifest"],iframe:["allow","allowfullscreen","allowtransparency","frameborder","height","loading","marginheight","marginwidth","mozallowfullscreen","name","referrerpolicy","sandbox","scrolling","seamless","src","srcdoc","webkitallowfullscreen","width"],img:["alt","crossorigin","decoding","height","ismap","loading","referrerpolicy","sizes","src","srcset","usemap","width"],ins:["cite","datetime"],input:["accept","alt","autocomplete","capture","checked","crossorigin","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","indeterminate","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","type","value","width"],keygen:["challenge","disabled","form","keytype","keyparams","name"],label:["form","for"],li:["value"],link:["as","crossorigin","href","hreflang","integrity","media","imagesrcset","imagesizes","referrerpolicy","rel","sizes","type","charset"],map:["name"],menu:["type"],media:["autoplay","controls","currenttime","defaultmuted","defaultplaybackrate","loop","mediagroup","muted","playsinline","preload","src","volume"],meta:["charset","content","http-equiv","name","media"],meter:["form","high","low","max","min","optimum","value"],quote:["cite"],object:["classid","data","form","height","name","type","usemap","width","wmode"],ol:["reversed","start","type"],optgroup:["disabled","label"],option:["disabled","label","selected","value"],output:["form","for","name"],param:["name","value"],progress:["max","value"],slot:["name"],script:["async","charset","crossorigin","defer","integrity","nomodule","nonce","referrerpolicy","src","type"],select:["autocomplete","disabled","form","multiple","name","required","size","value","onchange"],source:["height","media","sizes","src","srcset","type","width"],style:["media","nonce","scoped","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],textarea:["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","value","wrap"],td:["align","colspan","headers","rowspan","scope","abbr","height","width","valign"],th:["align","colspan","headers","rowspan","scope","abbr"],time:["datetime"],track:["default","kind","label","src","srclang"],video:["autoplay","controls","crossorigin","disablepictureinpicture","disableremoteplayback","height","loop","muted","playsinline","poster","preload","src","width"],svg:["className","class","color","height","id","lang","max","media","method","min","name","style","target","type","width","role","tabindex","crossorigin","accent-height","accumulate","additive","alignment-baseline","allowReorder","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","clip","clip-path","clipPathUnits","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","focusable","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","href","horiz-adv-x","horiz-origin-x","ideographic","image-rendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","markerHeight","marker-mid","marker-start","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","paint-order","panose-1","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","surfaceScale","systemLanguage","tableValues","targetX","targetY","text-anchor","text-decoration","textLength","text-rendering","to","transform","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","values","vector-effect","version","vert-adv-y","vert-origin-x","vert-origin-y","v-hanging","v-ideographic","viewBox","viewTarget","visibility","v-mathematical","widths","word-spacing","writing-mode","x1","x2","x","xChannelSelector","x-height","xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xmlns","xmlns:xlink","xml:space","y1","y2","y","yChannelSelector","z","zoomAndPan"]},Nx=["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"],Mr=t=>t.startsWith("aria")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"aria-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):t.startsWith("data")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"data-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):jx(t),aT=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate"]),jx=t=>aT.has(t)?t.toLowerCase():null,cT=new Set(["draggable","contenteditable","spellcheck","autocorrect"]),ir=t=>typeof t=="string"&&(cT.has(t)||t.startsWith("aria-")),qe=(t,e)=>e!==!0&&e!==!1?e:ir(t)?e?"true":"false":e===!0?"":e,Fr=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Mr(e)||pf.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(pf,t)?pf[t].includes(e):!1,Ug=t=>{if(!w(t))return!1;let e=t.toLowerCase();return Nx.includes(e)},lT=(t,e,r)=>{let o={};for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(r&&n in r)continue;if(n==="aria"&&e[n]&&typeof e[n]=="object"){for(let a in e[n])bt(e[n][a])&&(o["aria-"+a]=e[n][a]);continue}if(n==="data"&&e[n]&&typeof e[n]=="object"){for(let a in e[n])if(bt(e[n][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());o["data-"+c]=e[n][a]}continue}let s=Fr(t,n),i=Ug(n);if(bt(e[n])&&(s||i)){let a=Mr(n)||n;o[a]=e[n]}}return o},fT=(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},Lr=(t,e)=>{let r=t.call("exec",e,t);if(r)return w(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},jg=(t,e)=>{let r=(t.preSrc||"")+(Lr(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},Bg={src:t=>jg(t,t.src),href:t=>Lr(t,t.href),action:t=>Lr(t,t.action),poster:t=>jg(t,t.poster),data:t=>Lr(t,t.data)},Vg=t=>{let e=t.tag||"div",r={};for(let o in Bg)if(t[o]!==void 0&&Fr(e,o)){let n=Bg[o](t);n!==void 0&&(r[o]=n)}return r},Fx=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},uT=(t,e,r)=>{if(t==="$"){let n=Fx(e,r);return n===void 0&&(n=!!r[e]),n}let o=r[e]===!0||r.state[e];if(!o){let n=Fx(e,r);n!==void 0&&(o=n)}return t==="."?!!o:!o},dT=new Set(["$",".","!"]),pT=(t,e,r)=>{let o={},n=(s,i,a,c)=>{let l=i;o[s]=f=>{if(uT(a,c,f))return A(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!dT.has(i))continue;let a=t[s];if(!a||typeof a!="object")continue;let c=s.slice(1);for(let l in a){if(r&&l in r)continue;if(l==="aria"&&a[l]&&typeof a[l]=="object"){for(let 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=Fr(e,l),u=Ug(l);if(!f&&!u)continue;let d=Mr(l)||l;n(d,a[l],i,c)}}return o};function Dn(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"&&Hg(o))try{let s=r.onBeforeUpdate(r,r.state,r.context,e);if(s&&typeof s.then=="function")s.then(()=>ar(o,!1),i=>{ar(o,!0),r.context?.plugins?.length&&At("error",r,{hook:"onBeforeUpdate",error:i})||console.error("[DOMQL] onBeforeUpdate error:",i)});else if(ar(o,!1),s===!1)return r}catch(s){throw ar(o,!0),s}let n=!t||Object.keys(t).length===0;if(mc(()=>{if(t.state&&yt(r.state)&&r.state.$update(t.state),t.text!==void 0&&(r.text=t.text,!o.__exec.text&&r.node&&$n(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&&!ir(s)?r.node.removeAttribute(s):typeof i!="function"&&typeof i!="object"&&r.node.setAttribute(s,qe(s,i))}r.attr||(r.attr={}),Object.assign(r.attr,t.attr)}if(t.data&&r.node?.dataset){for(let s in t.data)r.node.dataset[s]=t.data[s];r.data||(r.data={}),Object.assign(r.data,t.data)}for(let s in t){if(jt.has(s)||s==="state")continue;let i=t[s],a=r[s];if(a&&a.__ref&&typeof a.update=="function")a.update(i,e);else if(typeof i=="object"&&i!==null){let c=s.charCodeAt(0);c>=65&&c<=90&&ne(i,r,s,e)}else s!=="text"&&s!=="html"&&s!=="style"&&s!=="attr"&&s!=="data"&&(r[s]=i)}}),r.node&&n&&o.__effects&&o.__effects.length)for(let s=0;s<o.__effects.length;s++){let i=o.__effects[s];i&&!i._disposed&&!i._isSubscribeToEffect&&typeof i._execute=="function"&&i._execute()}else if(r.node&&o.__conditionalRunners)for(let s of o.__conditionalRunners)s();return At("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}function Nr(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&&Nr(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 Ln(){Nr(this)}R();R();R();var hT=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],gT=["none","forwards","backwards","both"],mT=["normal","reverse","alternate","alternate-reverse"],yT=["running","paused"],bT=t=>/^[\d.]+m?s$/.test(t),_T=/^(?: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*\))$/,xT=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=>_T.test(o.replace(/\s+/g,"")))},Bx=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),wT={transform:xT,translate:Bx,rotate:t=>Bx(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},ST=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},kT=t=>{if(!S(t))return null;let e=null,r=-1;for(let o in t){let n=ST(o);n==null||!S(t[o])||n>=r&&(r=n,e=t[o])}return e},vT=t=>{let e=kT(t);if(!e)return!1;let r=Object.keys(e);if(!r.length)return!1;for(let o of r){let n=wT[o];if(!n)return!1;let s=e[o];if(s==null||typeof s=="object"||typeof s=="function"||!n(s))return!1}return!0},CT=(t,e)=>{if(S(t))return t;let{animation:r}=e.context&&e.context.designSystem||{},o=r&&r[t];return S(o)?o:null},ET=["reverse","alternate","alternate-reverse"],Ux=(t,e,r)=>{let o=r||e.animationDirection;return o&&ET.includes(String(o))?"both":vT(CT(t,e))?"backwards":"both"},AT=0,Vx=new Map,zg=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(S(t)){let n=JSON.stringify(t),s=Vx.get(n);if(s)return s;let i=`smbls-anim-${AT++}`,a=Cn(i,t);return Vx.set(n,a),a}let o=r&&r[t];return S(o)?Cn(t,o):t},TT=(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:bT(u)?s.push(u):hT.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):mT.includes(u)?c=u:gT.includes(u)?l=u:yT.includes(u)?f=u:n||(n=u);return{name:n,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},Wg={animation:(t,e)=>{if(w(t)&&t.includes(" ")){let r=TT(t,e);return{animationName:zg(r.name||t,e),animationDuration:r.durations[0]||oe(e.animationDuration||"A").timing,animationDelay:r.durations[1]||oe(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||ye(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||Ux(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:zg(t,e),animationDuration:oe(e.animationDuration||"A").timing,animationDelay:oe(e.animationDelay||"0s").timing,animationTimingFunction:ye(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||Ux(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:zg(t,e)}),animationDuration:t=>({animationDuration:oe(t).timing}),animationDelay:t=>({animationDelay:oe(t).timing}),animationTimingFunction:t=>({animationTimingFunction:ye(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};R();var qg={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>N("height",t,e),width:(t,e)=>N("width",t,e),boxSizing:t=>Tt(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("height",e),..._t("width",r||e)}},inlineSize:(t,e)=>N("inlineSize",t,e),blockSize:(t,e)=>N("blockSize",t,e),minWidth:(t,e)=>N("minWidth",t,e),maxWidth:(t,e)=>N("maxWidth",t,e),widthRange:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("minWidth",e),..._t("maxWidth",r||e)}},minHeight:(t,e)=>N("minHeight",t,e),maxHeight:(t,e)=>N("maxHeight",t,e),heightRange:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("minHeight",e),..._t("maxHeight",r||e)}},size:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{...N("inlineSize",e),...N("blockSize",r||e)}},minBlockSize:(t,e)=>N("minBlockSize",t,e),minInlineSize:(t,e)=>N("minInlineSize",t,e),maxBlockSize:(t,e)=>N("maxBlockSize",t,e),maxInlineSize:(t,e)=>N("maxInlineSize",t,e),minSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("minInlineSize",e),..._t("minBlockSize",r||e)}},maxSize:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("maxInlineSize",e),..._t("maxBlockSize",r||e)}},borderWidth:(t,e)=>N("borderWidth",t,e),borderTopWidth:(t,e)=>N("borderTopWidth",t,e),borderRightWidth:(t,e)=>N("borderRightWidth",t,e),borderBottomWidth:(t,e)=>N("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>N("borderLeftWidth",t,e),padding:(t,e)=>N("padding",t,e),scrollPadding:(t,e)=>N("scrollPadding",t,e),paddingInline:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("paddingInlineStart",e),..._t("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("paddingBlockStart",e),..._t("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>N("paddingBlockStart",t,e),paddingBottom:(t,e)=>N("paddingBlockEnd",t,e),paddingLeft:(t,e)=>N("paddingInlineStart",t,e),paddingRight:(t,e)=>N("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>N("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>N("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>N("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>N("paddingInlineEnd",t,e),margin:(t,e)=>N("margin",t,e),marginInline:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{..._t("marginInlineStart",e),..._t("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!w(e.marginBlock))return;let[r,o]=e.marginBlock.split(" ");return{..._t("marginBlockStart",r),..._t("marginBlockEnd",o||r)}},marginTop:(t,e)=>N("marginBlockStart",t,e),marginBottom:(t,e)=>N("marginBlockEnd",t,e),marginLeft:(t,e)=>N("marginInlineStart",t,e),marginRight:(t,e)=>N("marginInlineEnd",t,e),marginInlineStart:(t,e)=>N("marginInlineStart",t,e),marginInlineEnd:(t,e)=>N("marginInlineEnd",t,e),marginBlockStart:(t,e)=>N("marginBlockStart",t,e),marginBlockEnd:(t,e)=>N("marginBlockEnd",t,e),gap:t=>({gap:Jl(t)}),columnGap:(t,e)=>Te(e,"columnGap",t),rowGap:(t,e)=>Te(e,"rowGap",t),flexWrap:t=>({display:"flex",flexWrap:t}),flexFlow:(t,e)=>{let r=e.reverse;if(!w(t))return;let[o,n]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(o="row"),(t.startsWith("y")||t==="column")&&(o="column"),{display:"flex",flexFlow:(o||"")+(!o.includes("-reverse")&&r?"-reverse":"")+" "+(n||"")}},flexAlign:t=>{if(!w(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>sr(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>sr(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>sr(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>sr(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>sr(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>sr(t,e,"borderBottomRightRadius","borderBottomRightRadius")};var Kg={fontSize:t=>aa(t)||t,fontFamily:t=>({fontFamily:sa(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 Gg={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 Yg={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>St(r,"k").k).join(" ")}},left:t=>St(t,"left"),top:t=>St(t,"top"),right:t=>St(t,"right"),bottom:t=>St(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>St(r,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>St(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};R();var hf=0,Xg=()=>{hf++},Jg=()=>{hf>0&&hf--},xe=({context:t,state:e})=>{let r=t?.designSystem,o=e?.root?.globalTheme||r?.globalTheme;return o&&o!=="auto"?o:hf>0?null:r&&r.resolvedTheme||null},se=(t,e)=>{if(e==null||e==="")return;if(!S(e))return{[t]:e};let r={},o=!1;for(let n in e){let s=e[n];if(!(s==null||s==="")){if(S(s)){let i=se(t,s);i&&(r[n]=i,o=!0);continue}r[n]={[t]:s},o=!0}}return o?r:void 0},Zg={theme:(t,e)=>{if(t)return e.themeModifier?me(t,`@${e.themeModifier}`):me(t)},color:(t,e)=>{let r=xe(e);if(t)return se("color",It(t,r))},background:(t,e)=>{let r=xe(e);if(t)return w(t)&&t.includes("gradient")&&t.includes("(")?{background:ha(t,r)}:se("background",It(t,r))},backgroundColor:(t,e)=>{let r=xe(e);if(t)return se("backgroundColor",It(t,r))},backgroundImage:(t,e,r,o)=>{let n=xe(e);if(!t)return;let s=o.assets&&o.assets[t];if(s&&s.content)t=s.content.src;else{let i=o.files&&o.files[t];i&&i.content&&(t=i.content.src)}return se("backgroundImage",Xl(t,n))},textStroke:t=>({WebkitTextStroke:Gl(t)}),outline:t=>({outline:We(t)}),outlineOffset:(t,e)=>N("outlineOffset",t,e),border:t=>({border:We(t)}),borderColor:(t,e)=>{let r=xe(e);if(t)return se("borderColor",It(t,r))},borderTopColor:(t,e)=>{let r=xe(e);if(t)return se("borderTopColor",It(t,r))},borderBottomColor:(t,e)=>{let r=xe(e);if(t)return se("borderBottomColor",It(t,r))},borderLeftColor:(t,e)=>{let r=xe(e);if(t)return se("borderLeftColor",It(t,r))},borderRightColor:(t,e)=>{let r=xe(e);if(t)return se("borderRightColor",It(t,r))},borderLeft:t=>({borderLeft:We(t)}),borderTop:t=>({borderTop:We(t)}),borderRight:t=>({borderRight:We(t)}),borderBottom:t=>({borderBottom:We(t)}),shadow:(t,e)=>{let r=xe(e);if(t)return se("boxShadow",Yl(t,r))},boxShadow:(t,e)=>{if(!w(t))return;let[r,o]=t.split("!importan"),n=xe(e),s=o?" !important":"",i=pa(r.trim(),n);return w(i)?{boxShadow:i+s}:se("boxShadow",i)},textShadow:(t,{context:e})=>se("textShadow",pa(t,e.designSystem.globalTheme)),columnRule:t=>({columnRule:We(t)})};var _a={transition:t=>({transition:Zl(t)}),transitionDuration:t=>({transitionDuration:ga(t)}),transitionDelay:t=>({transitionDelay:ga(t)}),transitionTimingFunction:t=>({transitionTimingFunction:ye(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};R();var Qg={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 tm={area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:t}),templateColumns:t=>({gridTemplateColumns:t}),autoColumns:t=>({gridAutoColumns:t}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:t}),templateRows:t=>({gridTemplateRows:t}),autoRows:t=>({gridAutoRows:t}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var xt={...Wg,...qg,...Kg,...Gg,...Yg,...Zg,..._a,...Qg,...tm};var vt=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction","appearance","aspectRatio","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundRepeatX","backgroundRepeatY","backgroundSize","baselineShift","blockSize","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxDecorationBreak","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caretColor","clear","clip","clipPath","color","colorAdjust","colorInterpolation","colorInterpolationFilters","colorRendering","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","content","counterIncrement","counterReset","cursor","direction","display","emptyCells","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantNumeric","fontVariantPosition","fontWeight","fontVariationSettings","fontSynthesis","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","hyphens","imageOrientation","imageRendering","imeMode","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","initialLetter","isolation","justifyContent","justifyItems","justifySelf","left","letterSpacing","lineBreak","lineClamp","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","marginBlock","marginBlockEnd","marginBlockStart","marginInline","marginInlineEnd","marginInlineStart","mask","maskBorder","maskBorderImage","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","maxBlockSize","maxHeight","maxInlineSize","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","objectFit","objectPosition","objectViewBox","offset","offsetDistance","offsetPath","offsetRotate","opacity","order","orientation","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowClip","overflowScrolling","overflowWrap","overflowX","overflowY","overscrollBehavior","overscrollBehaviorX","overscrollBehaviorY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollPadding","scrollSnapAlign","scrollSnapType","scrollbarColor","scrollbarGutter","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","top","touchAction","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);R();var OT=/^-?[A-Z][0-9]?$/,RT=/^[a-z][0-9]?$/,Hx=/var\(\s*(--[A-Za-z0-9-]+)/g,PT=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}},IT=(t,e)=>{if(!e.size)return[];let r=t.split(/[(),\s]+/).filter(Boolean),o=new Set;for(let n of r){if(!OT.test(n))continue;let s=n.charCodeAt(0)===45?n.slice(1):n;e.has(s)&&o.add(n)}return[...o]},DT=(t,e)=>{if(!e.size)return[];let r=[];Hx.lastIndex=0;let o;for(;o=Hx.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(!RT.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},gf=new Set,zx=(t,e,r)=>{if(!Pt()||!w(e)||!e)return;let o;try{o=C()}catch{return}let{knownLetters:n,knownVars:s}=PT(o);if(!n.size&&!s.size)return;let i=IT(e,n),a=DT(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}`;gf.has(f)||(gf.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}`;gf.has(u)||(gf.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 $T=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,LT=(t,e,r)=>{let{context:o}=r;if(!o.designSystem?.media)return;let n=t.slice(1),s=o.designSystem.media[n],i=ie(e,r);if(!s)return{[t]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match($T),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},Wx=(t,e,r)=>({[t]:ie(e,r)}),xa=(t,e,r)=>{let o=`&${t}`,n=ie(e,r);if(t.includes(",")&&n){let s={},i={};for(let a in n)typeof n[a]=="object"&&n[a]!==null?i[a]=n[a]:s[a]=n[a];if(Object.keys(i).length){let a=o.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[o]=s);for(let l in i){let f=a.map(u=>`${u} ${l}`).join(", ");c[f]=i[l]}return c}}return{[o]:n}},em=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return A(r)?r.call(e,e):!!r},MT=(t,e,r)=>{let o=t.slice(1),n=em(o,r);if(n===void 0&&(n=!!r[o]),!!n)return ie(e,r)},FT=(t,e,r)=>({[t]:e}),NT=(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=em(o,r);s!==void 0&&(n=s)}if(n)return ie(e,r)},jT=(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=em(o,r);s!==void 0&&(n=s)}if(!n)return ie(e,r)},rm=(t,e)=>ie(t,e),om={"@":LT,":":xa,"[":xa,"*":xa,"+":xa,"~":xa,"&":Wx,">":Wx,$:MT,"-":FT,".":NT,"!":jT};var mf=_r(),qx=(t,e,r)=>{let o=e?.context?.designSystem;o&&it(o);try{let n={},s={},i=(a,c)=>{if(r.unpack){n={...n,...c};return}n[a]=c};for(let a in t){let c=t[a];if(c!==null)if(a==="class"&&e.call("isString",t.class)){let l=c.split(" ");if(l.length){let f=e.context.designSystem.class,u=l.reduce((d,h)=>gt(d,f[h]),{});n.designSystemClass=u}}else if(a==="true"){let l=ut(c,e);gt(n,rm(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),!mf&&S(n[a])&&(n[a].label=a)}else if(xt[a]){let l=ut(c,e);if(l===null)continue;O(l)&&(l=l.reduce((u,d)=>gt(u,d),{}));let f=xt[a](l,e,e.state,e.context);O(f)&&(f=f.reduce((u,d)=>gt(u,d),{})),f&&i(a,f),!mf&&S(n[a])&&(n[a].label=a)}else if(vt.has(a)){let l=ut(c,e);if(l===null)continue;typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),mf||zx(a,l,e),i(a,{[a]:l}),!mf&&S(n[a])&&(n[a].label=a)}else s[a]=c}return[n,s]}finally{o&&tt()}},Kx=(t,e)=>{let r={};for(let o in t){let n=om[o.slice(0,1)];if(n){let s=n(o,t[o],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]&&typeof r[i]=="object"&&typeof s[i]=="object"?qt(r[i],s[i]):r[i]=s[i])}}return r},ie=(t,e,r={unpack:!0})=>{let[o,n]=qx(t,e,r),s=Kx(n,e),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return Ds(o,s);o._selectors=s}return o},BT=(t,e)=>{let r={};if(t.class)for(let o in t.class)r[o]=t.class[o](e);return r};R();var Gx=t=>{if(S(t))return ie(t,t)},UT=(t,e)=>{let r=Gx(t);return typeof e=="function"?e(r):_e(r)};R();function sm(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 Yx=new Set;function VT(t,e,r){let o=String(e);if(Yx.has(o))return;Yx.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.`;sm(t,"error",[a]),console.error(a)}function HT(...t){return sm(this,"warn",t),yi.apply(this,t)}function zT(...t){return sm(this,"error",t),io.apply(this,t)}var Xx={update:Dn,remove:Ln,getDB:wi,getQuery:Si,getRootData:hi,getChildren:li,getPath:fi,nextElement:bi,previousElement:_i,verbose:Zo,warn:HT,error:zT,variables:xi,spotByPath:ci,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:pi,getRootState:di,getRootContext:gi,getContext:mi,parse(t){let e={},r=t?new Set(t):null,o=this.__ref?.__exec;for(let n in this)if(!(n==="parent"||n==="node"||n==="__ref")&&!r?.has(n)){if(o&&o[n]!==void 0){e[n]=o[n];continue}typeof this[n]!="function"&&(e[n]=this[n])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let o of r.__children)this[o]?.parseDeep&&(e[o]=this[o].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let r of t)e[r]=this[r];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(let e in t){let r=t[e];if(r==null)continue;let o=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),n=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(o,n,"important")}},call(t,...e){let r=this.context,o=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof o=="function")return o.call(this,...e);Pt()&&VT(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)}},nm=new WeakMap;function WT(t){if(!t)return Xx;let e=nm.get(t);if(e)return e;e=Object.create(Xx);let r=t.methods;if(r)for(let o in r)e[o]=r[o];return nm.set(t,e),e}function Mn(t){let e=WT(t.context);Object.setPrototypeOf(t,e)}function yf(t){if(!t)return!1;let e=nm.get(t);if(!e)return!1;let r=t.methods;if(!r)return!1;for(let o in r)e[o]=r[o];return!0}var bf=[],_f=!1,jr=0;function xf(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function Jx(t){let e=typeof globalThis<"u"?globalThis.scheduler:null;if(e&&typeof e.yield=="function"){e.yield().then(t,t);return}if(typeof MessageChannel=="function"){let r=new MessageChannel;r.port1.onmessage=()=>{r.port1.close(),t()},r.port2.postMessage(0);return}setTimeout(t,0)}function Zx(){return jr?xf()-jr>=50:!1}var Fn=0;function Qx(){Fn===0&&!jr&&(jr=xf()),Fn++}function tw(){Fn>0&&Fn--,Fn===0&&!_f&&(jr=0)}function ew(t){bf.push(t),_f||(_f=!0,Jx(rw))}function rw(){for(jr=xf();bf.length;){let t=bf.shift();try{t()}catch(e){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",e?.message||e)}if(xf()-jr>=50)break}if(bf.length){Jx(rw);return}_f=!1,jr=0,Fn=0}R();Ko();var fm={};P(fm,{STATE_METHODS:()=>ow,applyInitialState:()=>Sf,applyStateMethods:()=>ae,callStateMethod:()=>wa,createState:()=>am,isTracking:()=>lm,useHostState:()=>cm});var ow=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"]),wf=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},Re=(t,e,r,{onlyIfAbsent:o}={})=>{wf(t,"$"+e,r),!(o&&Object.prototype.hasOwnProperty.call(t,e))&&wf(t,e,r)},wa=(t,e,...r)=>{if(!t)return;let o=t["$"+e];if(typeof o=="function")return o.apply(t,r);let n=t[e];if(typeof n=="function")return n.apply(t,r)},ae=(t,e)=>{if(yt(e)){let n=e.__raw||e;Re(n,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),Re(n,"set",function(s,i={}){return e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,i),e},{onlyIfAbsent:!0}),Re(n,"setByPath",function(s,i,a={}){let c=s.split("."),l=e;for(let f=0;f<c.length-1;f++)l[c[f]]===void 0&&(l[c[f]]={}),l=l[c[f]];return l[c[c.length-1]]=i,e}),Re(n,"getByPath",function(s){let i=s.split("."),a=e;for(let c=0;c<i.length;c++){if(a==null)return;a=a[i[c]]}return a}),Re(n,"removeByPath",function(s,i={}){let a=s.split("."),c=e;for(let l=0;l<a.length-1;l++){if(c==null)return e;c=c[a[l]]}return c&&delete c[a[a.length-1]],e}),Re(n,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),Re(n,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),Re(n,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),Re(n,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&yt(a.parent);)a=a.parent;return wa(a,"update",s,i)}),Re(n,"parentUpdate",function(s,i={}){if(e.parent)return wa(e.parent,"update",s,i)}),Re(n,"quietReplace",function(s,i={}){return e.$replace(s,{quiet:!0,...i})}),Object.getOwnPropertyDescriptor(n,"root")||Object.defineProperty(n,"root",{get:function(){let s=e,i=yt(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,yt(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]},o={update(n){if(!n||typeof n!="object")return e;for(let s in n)e[s]=n[s];return e},apply(n){if(typeof n!="function")return e;let s=n(e);return s?e.$update(s):e},parse(){return{...e}},toggle(n){return e[n]=!e[n],e},set(n){if(!n||typeof n!="object")return e;r();for(let s in n)e[s]=n[s];return e},replace(n){return e.$set(n)},clean(){return r(),e}};for(let n in o)if(wf(e,"$"+n,o[n]),typeof e[n]!="function"){if(Object.prototype.hasOwnProperty.call(e,n)){_c(n,"");continue}wf(e,n,o[n])}};var am=function(t,e,r){return t.state=Sf(t,e,r),t.state},Sf=function(t,e,r){let{__ref:o}=t,n=t.state;if(n==null||n===!1){let s=e?.state||{};return ae(t,s),s}if(typeof n=="string")return o&&(o.__state=n),o.__stateType="string",qT(n,t,e);if(typeof n=="number"||typeof n=="boolean"){o&&(o.__state=n,o.__stateType=typeof n,o.__hasRootState=!0);let s=Ye({value:n});return s.__element=t,e?.state&&(s.parent=e.state),ae(t,s),s}if(typeof n=="function"&&(n=n(t,e?.state)||{}),typeof n=="object"&&!yt(n)){o&&(o.__hasRootState=!0),n.isRootState&&o&&(o.__hasRootState=!0);let s=Ye({...n});if(s.__element=t,!Object.getOwnPropertyDescriptor(s,"root")){let i=e?.state?.root||e?.state||s;Object.defineProperty(s,"root",{get:()=>i,enumerable:!1,configurable:!0})}return e?.state&&(s.parent=e.state,e.state.__children&&(e.state.__children[t.key]=s)),ae(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,r),s}return yt(n)?(n.__element=t,n):e?.state||{}};function im(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 qT(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?im(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?im(n,s):n??{}}let o=im(r.state,t);if(o&&typeof o=="object"&&!yt(o)&&!Object.getOwnPropertyDescriptor(o,"root")){let n=r.state?.root||r.state;Object.defineProperty(o,"root",{get:()=>n,enumerable:!1,configurable:!0})}return o}var cm=(t,e)=>{if(!t)return sw;let r=GT(t,e);return!r||!r.state?sw:XT(r.state)},lm=()=>yc()!=null,KT=128;function GT(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<KT&&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 YT={get(t,e){return t[e]}},nw=new WeakMap,XT=t=>{let e=nw.get(t);return e||(e=new Proxy(t,YT),nw.set(t,e)),e},sw=new Proxy(Object.create(null),{get(){},has(){return!1}});var kf="3.14.781";var iw="__SMBLS_ELEMENT_ID_ENGINE__",aw=(t,e,r)=>{let o=e||kf,n=r||(typeof globalThis<"u"?globalThis:null);if(!n)return t;let s=n[iw];return s&&s.engine&&s.version===o?s.engine:(s||(n[iw]={version:o,engine:t}),t)};var gw=aw({uniqId:1,scopedStyleId:0},kf),ka=[],hm=!1;function cw(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function JT(){return typeof document<"u"&&document.visibilityState==="hidden"}var ZT=250;function mw(){if(!hm){if(hm=!0,typeof requestAnimationFrame!="function"){setTimeout(Ca,0);return}JT()?setTimeout(Ca,ZT):requestAnimationFrame(Ca)}}var QT=300,t1=15e4;function Ca(){if(hm=!1,!ka.length)return;let t=ka.splice(0,ka.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=cw());let n=cw()-o.__mountFirstAttemptAt;o.__mountAttempts<=QT&&n<t1?(ka.push(r),mw()):console.warn("[DOMQL] onMounted dropped after",o.__mountAttempts,"attempts /",n,"ms \u2014 node never connected:",r.key||r.tag||r);continue}cr("Mounted",r,r.__ref?.__mountOptions||{})}}}function yw(t,e){typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,ka.push(t),mw())}function lw(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&At("contentUpdate",t,e);let r=t.context?.designSystem;r&&it(r);try{t.onContentUpdate(t,t.state,t.context,e)}catch(o){if(t.context?.plugins?.length&&At("error",t,{hook:"onContentUpdate",error:o})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',o),t.context?.strictMode)throw o}finally{r&&tt()}}function jn(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function e1(t){return t.charAt(2).toLowerCase()+t.slice(3)}function r1(t){return t.toLowerCase()}function gm(t){let e=t.charCodeAt(0);return e===58||e===64||e===38}function va(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]=va(n,s):r[o]=s}return r}function ne(t,e,r,o={},n){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});let s=Object.create(null);s.key=r||t.key||`_${gw.uniqId++}`,s.parent=e||null,s.context=t.context||e?.context||o.context||{},s.context.__create||(s.context.__create=ne);let i=s.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||s,path:e?.__ref?.path?[...e.__ref.path,s.key]:[s.key],origin:t};if(r&&!t.extends&&!t.extend){let p=r.indexOf("_");if(p>0){let m=r.substring(0,p),b=s.context?.components;b&&(b[m]||b["smbls."+m])?t={...t,extends:m}:b&&Pt()&&/^[A-Z]\w*_\d+$/.test(r)&&console.warn(`[smbls] auto-extend: key "${r}" looks like a multi-instance (${m}_N) but neither "${m}" nor "smbls.${m}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}In(s,t,o);let a=new Set(["childProps","attr","style","scope","data"]),c=s.props&&typeof s.props=="object"?s.props:null;for(let p in t){if(p==="parent"||p==="node"||p==="__ref"||p==="extends"||p==="context"||p==="props")continue;let m=t[p],b=s[p],_=b&&m&&typeof b=="object"&&typeof m=="object"&&!Array.isArray(b)&&!Array.isArray(m)&&typeof b!="function"&&typeof m!="function";_&&p.charCodeAt(0)>=65&&p.charCodeAt(0)<=90?s[p]=va(b,m):_&&a.has(p)?s[p]={...b,...m}:_&&gm(p)?s[p]=va(b,m):s[p]=m}function l(p){for(let m in p){let b=p[m],_=s[m],y=_&&b&&typeof _=="object"&&typeof b=="object"&&!Array.isArray(_)&&!Array.isArray(b)&&typeof _!="function"&&typeof b!="function";y&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?s[m]=va(_,b):y&&a.has(m)?s[m]={..._,...b}:y&&gm(m)?s[m]=va(_,b):s[m]=b}}c&&l(c),t.props&&typeof t.props=="object"&&l(t.props),t.data!==void 0&&(s.data=t.data),t.classlist!==void 0&&(s.classlist=t.classlist),t.text!==void 0&&(s.text=t.text),t.html!==void 0&&(s.html=t.html);let f=s.scope&&typeof s.scope=="object"?s.scope:null,u=e?.scope,d=s.context&&typeof s.context.globalScope=="object"&&s.context.globalScope||null,h=u||d||null;if(t.scope!==void 0||f){let p={};f&&Object.assign(p,f),t.scope!==void 0&&Object.assign(p,t.scope),s.scope=bc(p,h)}else h&&(s.scope=h);if(t.if!==void 0&&(s.if=t.if),Mn(s),o1(s,e,t),s.if!=null){let p;if(typeof s.if=="function")try{p=s.if(s,s.state,s.context)}catch(m){if(p=!1,i.__ifError=m,typeof console<"u"&&console.warn){let b=s.key||s.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${b} \u2014 treating as false:`,m?.message||m)}}else p=s.if;i.__if=!!p}if(i.__if)typeof s.if=="function"&&(i.__ifInitialized=!0);else return e&&(e[s.key]=s),typeof s.if=="function"&&xw(s,i,s.if),s;s.tag||(s.tag=Ir(s)),cr("Init",s,o);let g=s.node=Dr(s);if(!g)return s;if(s.tag==="fragment"){let m=(s.context?.document||globalThis.document).createComment("");g.appendChild(m),i.__fragmentAnchor=m}cr("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),vw(s,o),_w(s),mm(s),Sw(s),b1(s);try{Cw(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(mm(s,!0),_w(s,e,n),typeof s.html=="function"&&s.node&&!s.node.innerHTML){let p=s.context?.designSystem;p&&it(p);try{let m=s.html(s,s.state,s.context);m!=null&&typeof m!="function"&&(s.node.innerHTML=m)}catch{}finally{p&&tt()}}if(ar("Create",s,o),ar("Complete",s,o),ar("Render",s,o),ar("RenderRouter",s,o),fw(s,o),typeof s.onFrame=="function"){let p=s.onFrame,m=s.context?.designSystem,b=()=>{if(s.node){if(s.node.isConnected){m&&it(m);try{p(s,s.state,s.context)}catch(_){console.error("[DOMQL] onFrame error:",_)}finally{m&&tt()}}requestAnimationFrame(b)}};requestAnimationFrame(b)}return s}function XT(t,e,r){let o=!e,n=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=o&&n&&t.context?.state,i=r.state!==void 0&&!s?r.state:t.state&&!yt(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,ie(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=yt(c)?c:Ge(c),t.state.__element=t,t.state.root=t.state,ie(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),ie(t,t.state);return}if(typeof i=="string"){if(t.state=uw(i,e),t.state&&typeof t.state=="object"&&!yt(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}ie(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=yt(a)?a:Ge(a||{})}else yt(i)?t.state=i:t.state=Ge({...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,ie(t,t.state)}function cm(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 uw(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let n=t.slice(3);return n?cm(e.state,n):e.state??{}}if(t.startsWith("~/")){let n=e.state?.root||e.state,s=t.slice(2);return s?cm(n,s):n??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=cm(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 JT=new Set(["s","state","ctx","context"]);function ZT(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 QT(t){if(typeof t!="function"||t.length!==2)return!1;let e=ZT(t);if(e.length<2)return!1;let r=e[1].replace(/[{}[\]]/g,"").trim();return r.length>0&&!JT.has(r)}function t1(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"||Nt.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||Fn(a)||xt[a]||vt&&vt.has(a)||Mr(r,a)||(Pt()&&QT(t[a])&&console.warn(`[smbls] custom prop "${a}"${t.key?` on key "${t.key}"`:""} is a function \u2014 it will be auto-invoked on read and its RETURN VALUE stored, not preserved as a callable reference. If you meant to stash a callback, use el.call('${a}', \u2026) instead of reading el.${a}(\u2026) directly (see RULES.md Rule 8).`),n.push({prop:a,fn:t[a]}))}for(let i=0;i<n.length;i++){let{prop:a,fn:c}=n[i];e.__exec[a]=c,Object.defineProperty(t,a,{get(){o&&it(o);try{return c(t,t.state,t.context)}catch{return}finally{o&&tt()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function e1(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 jt(t,e,r){return!Array.isArray(e)||e.length===0?r:function(...o){return e1(t,e),r.apply(this,o)}}function xa(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function Ct(t,e){return()=>t.path.join(".")+"::"+e}function dw(t,e){let r=t.__ref,o=!!(e&&e.skipIfEffect);if(t1(t),typeof t.text=="function"){let s=t.text,i=jt(t,t.textDeps,s),a=Z(()=>{if(!r.contentManaged)try{let c=i(t,t.state,t.context);t.node&&c!=null&&typeof c!="function"&&typeof c!="object"&&(typeof c=="string"&&c.includes("{{")&&(c=Jr.call(t,c,t.state)),In(t,c))}catch{}},{depth:r.path.length,label:Ct(r,"text")});r.__effects.push(a),r.__exec.text=s}else if(typeof t.text=="string"&&t.text.includes("{{")){let s=t.text,i=Z(()=>{if(r.contentManaged)return;let a=Jr.call(t,s,t.state);a!=null&&(t.text=a),t.node&&In(t,a??"")},{depth:r.path.length,label:Ct(r,"text")});r.__effects.push(i),r.__exec.text=s}for(let s of Object.keys(t))if(typeof t[s]=="function"&&!Nt.has(s)&&!Fn(s)&&!r.__exec[s]){if(xt[s]){let i=t[s],a=jt(t,t[s+"Deps"],i),c=s,l,f=Z(()=>{let u=t.context?.designSystem;u&&it(u);try{let d=a(t,t.state,t.context),h=xt[c](d,t,t.state,t.context),g=c==="show"||c==="hide";if(h&&t.node){let p=hm(h),m=g&&t.node.style.display!=="none";(p===null||p!==l||m)&&(l=p,Mn(t.node,h))}else if(t.node&&g){l=void 0;let p=r.__explicitDisplay;t.node.style.display=typeof p=="string"?p:""}}finally{u&&tt()}},{depth:r.path.length,label:Ct(r,c)});r.__effects.push(f),r.__exec[s]=i}else if(vt&&vt.has(s)){let i=t[s],a=jt(t,t[s+"Deps"],i),c=s,l,f=Z(()=>{let u=t.context?.designSystem;u&&it(u);try{let d=a(t,t.state,t.context);if(t.node)if(d!=null){let h=c+":"+String(d);h!==l&&(l=h,Mn(t.node,{[c]:d}))}else l=void 0,t.node.style[c]=""}finally{u&&tt()}},{depth:r.path.length,label:Ct(r,c)});r.__effects.push(f),r.__exec[s]=i}}if(typeof t.html=="function"){let s=t.html,i=jt(t,t.htmlDeps,s),a=Z(()=>{let c=t.context?.designSystem;c&&it(c);try{let l=i(t,t.state,t.context);t.node&&l!=null&&typeof l!="function"&&(t.node.innerHTML=l)}finally{c&&tt()}},{depth:r.path.length,label:Ct(r,"html")});r.__effects.push(a),r.__exec.html=s}if(typeof t.value=="function"){let s=t.value,i=jt(t,t.valueDeps,s),a=Z(()=>{try{let c=i(t,t.state,t.context);if(!t.node||!("value"in t.node))return;let l=c==null?"":String(c);if(t.node.value===l)return;let f=typeof document<"u"&&document.activeElement===t.node,u=f&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,d=f&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=l,f&&u!=null&&d!=null)try{t.node.setSelectionRange(u,d)}catch{}}catch{}},{depth:r.path.length,label:Ct(r,"value")});r.__effects.push(a),r.__exec.value=s}if(typeof t.style=="function"){let s=t.style,i=jt(t,t.styleDeps,s),a,c=Z(()=>{let l=i(t,t.state,t.context),f=hm(l);(f===null||f!==a)&&(a=f,Mn(t.node,l))},{depth:r.path.length,label:Ct(r,"style")});r.__effects.push(c),r.__exec.style=s}else if(t.style&&typeof t.style=="object")for(let s in t.style){let i=t.style[s];if(typeof i!="function")continue;let a=jt(t,xa(t.styleDeps,s),i),c,l=Z(()=>{try{let f=a(t,t.state,t.context);if(t.node){let u=s+":"+String(f);u!==c&&(c=u,Mn(t.node,{[s]:f}))}}catch{}},{depth:r.path.length,label:Ct(r,"style."+s)});r.__effects.push(l)}if(t.attr&&typeof t.attr=="object"){for(let s in t.attr)if(typeof t.attr[s]=="function"){let i=jt(t,xa(t.attrDeps,s),t.attr[s]),a=s,c=Z(()=>{try{let l=i(t,t.state,t.context);t.node?.setAttribute&&(l==null||l===!1&&!sr(a)?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,We(a,l)))}catch{}},{depth:r.path.length,label:Ct(r,"attr."+a)});r.__effects.push(c)}}if(t.aria&&typeof t.aria=="object")for(let s in t.aria){if(typeof t.aria[s]!="function")continue;let i=jt(t,xa(t.ariaDeps,s),t.aria[s]),a="aria-"+s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=Z(()=>{try{let l=i(t,t.state,t.context);if(!t.node?.setAttribute)return;l==null?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,We(a,l))}catch{}},{depth:r.path.length,label:Ct(r,"aria."+s)});r.__effects.push(c)}if(t.data&&typeof t.data=="object")for(let s in t.data){if(typeof t.data[s]!="function")continue;let i=jt(t,xa(t.dataDeps,s),t.data[s]),c="data-"+s.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),l=Z(()=>{try{let f=i(t,t.state,t.context);if(!t.node?.setAttribute)return;f==null||f===!1?t.node.removeAttribute(c):typeof f!="function"&&typeof f!="object"&&t.node.setAttribute(c,f===!0?"":f)}catch{}},{depth:r.path.length,label:Ct(r,"data."+s)});r.__effects.push(l)}let n=t.classlist&&typeof t.classlist=="object"&&!Array.isArray(t.classlist)?t.classlist:t.class&&typeof t.class=="object"&&!Array.isArray(t.class)?t.class:null;if(n)for(let s in n){if(typeof n[s]!="function")continue;let i=jt(t,xa(t.classDeps,s),n[s]),a=Z(()=>{try{let c=i(t,t.state,t.context);if(!t.node?.classList)return;typeof c=="string"?t.node.classList.add(c):c?t.node.classList.add(s):t.node.classList.remove(s)}catch{}},{depth:r.path.length,label:Ct(r,"class."+s)});r.__effects.push(a)}!o&&typeof t.if=="function"&&pw(t,r,t.if);for(let s of Object.keys(t)){if(Nt.has(s)||typeof t[s]!="function")continue;let i=s.charCodeAt(0);if(i>=65&&i<=90||Fn(s))continue;let a=t[s];r.__exec[s]=a;let c=t.tag||"div";if(Mr(c,s)&&!xt[s]&&!(vt&&vt.has(s))){let l=Lr(s)||s,f=jt(t,t[s+"Deps"],a),u=Z(()=>{try{let d=f(t,t.state,t.context);t.node?.setAttribute&&(d==null||d===!1&&!sr(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,We(l,d))))}catch{}},{depth:r.path.length,label:Ct(r,s)});r.__effects.push(u)}}if(s1(t),c1(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let s=t.onStateUpdate,i=t.stateDeps,a=!1,c=[],l=Z(()=>{let f=[];for(let g=0;g<i.length;g++){let p=i[g];try{f[g]=typeof p=="function"?p(t,t.state,t.context):t.state?.[p]}catch{f[g]=void 0}}if(!a){a=!0,c=f;return}let u=f.length!==c.length;for(let g=0;!u&&g<f.length;g++)f[g]!==c[g]&&(u=!0);let d=c;if(c=f,!u)return;let h=t.context?.designSystem;h&&it(h);try{s(t,t.state,t.context,{prev:d,next:f})}catch(g){if(t.context?.plugins?.length&&At("error",t,{hook:"onStateUpdate",error:g})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',g),t.context?.strictMode)throw g}finally{h&&tt()}},{depth:r.path.length,label:Ct(r,"onStateUpdate")});r.__effects.push(l)}a1(t)}function nw(t){let e=t.parent,r=e?.node;if(!r||!t.node){_w(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 pw(t,e,r){let o=jt(t,t.ifDeps,r),n=Z(()=>{let s;try{s=o(t,t.state,t.context)}catch(a){if(s=!1,e.__ifError=a,typeof console<"u"&&console.warn){let c=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${c} \u2014 treating as false:`,a?.message||a)}return}let i=e.__if;if(e.__if=!!s,i&&!e.__if&&t.node)t.node.remove();else if(!i&&e.__if)if(e.__ifInitialized)t.node||(t.node=Ir(t)),t.node&&(t.node.ref=t),nw(t),pm(t);else{if(e.__ifInitialized=!0,t.tag||(t.tag=Pr(t)),ar("Init",t,{}),t.node||(t.node=Ir(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}ar("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),yw(t,{}),dw(t,{skipIfEffect:!0}),pm(t),gw(t),bw(t,{}),nw(t),fw(t,{})}},{depth:e.path.length,label:Ct(e,"if")});e.__effects.push(n)}function In(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 pm(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&In(t,t.text),f1(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"&&Mn(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&&!sr(r)||e.setAttribute&&e.setAttribute(r,We(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 hm(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function Mn(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&&o1(t,r)}var r1=0;function o1(t,e){let r=`_ds${r1++}`;t.classList.add(r);let o=t.ownerDocument,n=o.querySelector("style[data-smbls-scoped]");n||(n=o.createElement("style"),n.setAttribute("data-smbls-scoped",""),o.head.appendChild(n));let s="";for(let i in e){let a="."+r,c=i.replace(/&/g,a).split(",").map(f=>{let u=f.trim();return u.includes(a)?u:a+u}).join(", "),l=e[i];if(typeof l=="object"){let f="",u="";for(let d in l){let h=l[d];if(typeof h=="object"){let g=d.includes("&")?c.split(", ").map(m=>d.replace(/&/g,m)).join(", "):c.split(", ").map(m=>`${m} ${d}`).join(", "),p="";for(let m in h)p+=`${m.replace(/[A-Z]/g,b=>"-"+b.toLowerCase())}: ${h[m]};`;u+=Te(`${g} { ${p} }`,g)+`
55
- `}else f+=`${d.replace(/[A-Z]/g,g=>"-"+g.toLowerCase())}: ${h};`}f&&(s+=Te(`${c} { ${f} }`,c)+`
56
- `),u&&(s+=u)}}s&&(n.textContent+=s)}var sw=new Set;function iw(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 n1(t,e,r){let o=iw(r);queueMicrotask(()=>{if(!t.__ref)return;let n;try{n=e(t,t.state,t.context)}catch{return}if(iw(n)===o)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";sw.has(s)||(sw.add(s),console.warn(`[smbls] subscribeTo function at "${s}" resolved to a DIFFERENT key list one microtask after create \u2014 wired [${r.join(", ")||"(none)"}], probed [${Array.isArray(n)?n.join(", "):String(n)}]. subscribeTo's function form is resolved ONCE at element-create time (registerSubscribeToEffects, @symbo.ls/element create.js) \u2014 this element stays wired to the ORIGINAL list for its whole lifetime, so this drift is invisible to the reactive effect and any key only present in the new list will never trigger onUpdate. If the watched key genuinely is not known until later (e.g. a module config that loads after shell boot), route the write through an imperative call instead of subscribeTo \u2014 see functions/moduleOpenBridge.js's moduleOpenPage (workspace repo) for the house pattern.`))})}function s1(t){let e=t.subscribeTo,r=typeof e=="function",o=e;if(r)try{o=e(t,t.state,t.context)}catch{o=null}if(r&&Pt()&&n1(t,e,Array.isArray(o)?o:[]),!Array.isArray(o)||o.length===0)return;let n=t.__ref;for(let s=0;s<o.length;s++){let i=o[s];if(typeof i!="string"||i.length===0)continue;let a=i.split("."),c=a[0],l=a.slice(1),f={value:!1},u=Z(()=>{let d=t.state&&(yt(t.state)?t.state.root:null);if(!d||!yt(d))return;let h=d;h=h[c];for(let p=0;p<l.length&&!(h==null||typeof h!="object");p++)if(yt(h))h=h[l[p]];else break;if(!f.value)return;let g=!1;if(typeof t.onBeforeUpdate=="function"){let p=t.context?.designSystem;p&&it(p);try{if(Bg(n)){let m=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});m&&typeof m.then=="function"?m.then(()=>ir(n,!1),b=>{ir(n,!0),t.context?.plugins?.length&&At("error",t,{hook:"onBeforeUpdate",error:b})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",b)}):(ir(n,!1),m===!1&&(g=!0))}}catch(m){ir(n,!0),t.context?.plugins?.length&&At("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}finally{p&&tt()}}if(!g&&t.node&&n.__effects)for(let p=0;p<n.__effects.length;p++){let m=n.__effects[p];m&&m!==u&&!m._disposed&&!m._isSubscribeToEffect&&typeof m._execute=="function"&&m._execute()}if(!g&&typeof t.onUpdate=="function"){let p=t.context?.designSystem;p&&it(p);try{t.onUpdate(t,t.state,t.context)}catch(m){t.context?.plugins?.length&&At("error",t,{hook:"onUpdate",error:m})||console.error("[DOMQL] subscribeTo onUpdate error:",m)}finally{p&&tt()}}},{depth:n.path.length,label:Ct(n,"subscribeTo("+i+")")});f.value=!0,u._isSubscribeToEffect=!0,n.__effects.push(u)}}function bm(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 aw=new Set;function i1(t,e){let r=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",o=r+"::"+t;aw.has(o)||(aw.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 Nn(t,e,r){let o={},n=new Set,s=(i,a,c)=>{let l=c?new Set(Object.keys(o)):null;if(xt[i]){let f=xt[i](a,e,e.state,e.context);if(f){let u=Array.isArray(f)?f:[f];for(let d of u)d&&Object.assign(o,d)}}else o[i]=a;if(c)for(let f in o)l.has(f)||n.add(f)};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=t[i];if(typeof a=="function"&&(a=a(e,e.state,e.context)),a==null||typeof a=="function")continue;if(typeof a=="object"&&!Array.isArray(a)){if(i==="style"){for(let u in a){let d=a[u];if(typeof d=="function"&&(d=d(e,e.state,e.context)),d==null||typeof d=="function")continue;let h=typeof e[u]=="function"&&(xt[u]||vt&&vt.has(u));s(u,d,h)}continue}if(bm(i,e)){let u=Nn(a,e,!1);Object.keys(u).length&&(o[`[data-theme="${i.slice(1)}"] &`]=u);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(i)){Pt()&&i1(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=Nn(a,e,!1);Object.keys(f).length&&(o[l]=f);continue}let c=typeof e[i]=="function"&&(xt[i]||vt&&vt.has(i));s(i,a,c)}if(r)for(let i in o)n.add(i);for(let i of n){let a=o[i];typeof a=="string"&&!a.includes("!important")&&(o[i]=a+" !important")}return o}function _m(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)&&_m(t[r],e+1))return!0}return!1}function hw(t,e,r){if(!e||typeof e!="object"||Array.isArray(e))return null;if(bm(t,r)){let s=Nn(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=Nn(e,r,!1);return Object.keys(n).length?{cssProp:o,block:n}:null}function a1(t){let e=t.__ref;for(let r of Object.keys(t)){if(!dm(r))continue;let o=t[r];if(!o||typeof o!="object"||Array.isArray(o)||!_m(o))continue;let n=null,s,i=Z(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&it(a);let c,l=!1;try{let f=hw(r,o,t),u=f?hm(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=be({[f.cssProp]:f.block},null,t.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&tt()}if(!(l||!t.node.classList)){if(n)for(let f of n)t.node.classList.remove(f);if(c&&c.length)for(let f of c)t.node.classList.add(f);n=c}},{depth:e.path.length,label:Ct(e,"cssBlock("+r+")")});e.__effects.push(i)}}function c1(t){let e=t.__ref;e.__conditionalRunners=[];let r=new Map;for(let o of Object.keys(t)){let n=o.charAt(0);if(n!=="."&&n!=="!")continue;let s=o.slice(1);if(!s)continue;if(/[:@\s>~+[\]]/.test(s)){if(typeof console<"u"&&console.warn){let u=s.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${o}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${n}\` is read as one prop name. Nest the selector inside instead: \`${n}${u}: { '${s.slice(u.length)}': {...} }\`.`)}continue}let i=t[o];if(!i||typeof i!="object")continue;let a=n==="!",c={lastMatch:!1,appliedKeys:null,appliedClasses:null},l=()=>{let u,d=t[s];if(d===void 0){let p=!!t.state&&s in t.state,m=t.state?t.state[s]:void 0;if(p||m!==void 0)u=m;else{let b=t.context?.cases?.[s];if(b===void 0)return;try{u=typeof b=="function"?b.call(t,t):b}catch(_){u=!1,e.__conditionalError=_,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,_?.message||_)}}}else if(typeof d=="function")try{u=d(t,t.state,t.context)}catch(p){u=!1,e.__conditionalError=p,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,p?.message||p)}else u=d;let h=a?!u:!!u;if(!t.node||h===c.lastMatch)return;c.lastMatch=h;let g=t.context?.designSystem;g&&it(g);try{if(h){let p={},m={},b=!1;for(let y in i){if(!Object.prototype.hasOwnProperty.call(i,y))continue;let x=i[y],k=y.charAt(0);if((k===":"||k==="@"||k==="&")&&x&&typeof x=="object"&&!Array.isArray(x)){if(bm(y,t)){let T=Nn(x,t,!1);Object.keys(T).length&&(m[`[data-theme="${y.slice(1)}"] &`]=T,b=!0)}else{let T=y;if(k==="@"&&!y.startsWith("@media")&&!y.startsWith("@keyframes")){let D=t.context?.designSystem?.media?.[y.slice(1)];D&&(T=`@media ${D}`)}let $=Nn(x,t,!1);Object.keys($).length&&(m[T]=$,b=!0)}continue}let E=typeof x=="function"?x(t,t.state,t.context):x;if(E!=null)if(xt[y]){let T=xt[y](E,t,t.state,t.context);if(T){let $=Array.isArray(T)?T:[T];for(let D of $)D&&Object.assign(p,D)}}else vt&&vt.has(y)&&(p[y]=E)}let _=Object.keys(p);if(_.length){Mn(t.node,p);for(let y of _)r.set(y,o);c.appliedKeys=_}else c.appliedKeys=null;if(b){let y=be(m,null,t.context?.cssPrefix),x=y?y.split(" ").filter(Boolean):[];if(x.length&&t.node.classList){for(let k of x)t.node.classList.add(k);c.appliedClasses=x}else c.appliedClasses=null}else if(c.appliedClasses){for(let y of c.appliedClasses)t.node.classList.remove(y);c.appliedClasses=null}}else{if(c.appliedKeys){for(let p of c.appliedKeys)r.get(p)===o&&(t.node.style[p]="",r.delete(p));c.appliedKeys=null}if(c.appliedClasses){for(let p of c.appliedClasses)t.node.classList.remove(p);c.appliedClasses=null}}}finally{g&&tt()}};e.__conditionalRunners.push(l);let f=Z(l,{depth:e.path.length,label:Ct(e,"conditional("+o+")")});e.__effects.push(f)}}var lm=new WeakSet;function l1(t){let e=t.ownerDocument;!e||lm.has(e)||(lm.add(e),queueMicrotask(()=>{lm.delete(e);let r=e.body||e.documentElement;r&&r.offsetWidth}))}var fm=new WeakSet,cw=!1;function f1(t){let{node:e}=t;if(!e)return;if(cw||(cw=!0,be({display:"none"})),fm.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}fm.add(t);let r=t.context?.designSystem;r&&it(r),Kg();try{let o={},n=!1;if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&xt.theme){let s=xt.theme(t.theme,t,t.state,t.context);if(s){if(Array.isArray(s))for(let i of s)i&&Object.assign(o,i);else Object.assign(o,s);n=!0}}for(let s of Object.keys(t)){if(typeof t[s]=="function"||Nt.has(s)||s==="theme")continue;let i=s.charCodeAt(0);if(!(i>=65&&i<=90)&&!Fn(s)){if(xt[s]){let a=t[s],c=xt[s](a,t,t.state,t.context);if(c){if(Array.isArray(c))for(let l of c)l&&Object.assign(o,l);else Object.assign(o,c);n=!0}}else if(vt&&vt.has(s)){let a=t[s];a!=null&&typeof a!="object"&&(o[s]=a,n=!0)}else if(s.charCodeAt(0)===45){let a=t[s];a!=null&&typeof a!="object"&&(o[s]=a,n=!0)}else if(s.charAt(0)==="&"||s.charAt(0)==="@"||s.charAt(0)===":"){let a=t[s];if(a&&typeof a=="object"&&!Array.isArray(a)){if(_m(a))continue;let c=hw(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=be(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&&l1(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{Gg(),r&&tt(),fm.delete(t)}}function gw(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,We(i,s))}let r=jg(t);for(let n in r){let s=r[n];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(n,s===!0?"":s)}let o=t.tag||"div";for(let n of Object.keys(t)){if(typeof t[n]=="function"||Nt.has(n)||n==="on"||r[n]!==void 0)continue;let s=n.charCodeAt(0);if(!(s>=65&&s<=90)&&!Fn(n)&&!(xt[n]||vt&&vt.has(n))&&Mr(o,n)){let i=t[n];if(i==null||(typeof i=="string"&&i.includes("{{")&&(i=Jr(i,t,t.state,t.context),t[n]=i),i==null||typeof i=="function"||typeof i=="object")||i===!1&&!sr(Lr(n)||n))continue;let a=Lr(n)||n;e.setAttribute(a,We(a,i))}}}function u1(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 d1(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"?jt(t,t.autoGrowDeps,o):null,s=Z(()=>{let i=t.autoGrow,a=i;if(typeof i=="function")try{a=(i===o&&n?n:i)(t,t.state,t.context)}catch{a=null}u1(t,a)},{depth:r.path.length,label:Ct(r,"autoGrow")});r.__effects||(r.__effects=[]),r.__effects.push(s),n&&(r.__exec.autoGrow=o)}var mw=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function yw(t,e){for(let r of Object.keys(t)){if(!Fn(r)||mw.has(r))continue;let o=lf(r);if(o){ff(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=GT(r);Dr.has(s)||On(YT(s),t,n)}p1(t)}function p1(t){let e=t.node;if(!e||!e.addEventListener)return;let r={},o=!1;for(let d of mw){let h=t[d];typeof h=="function"&&(r[d]=h,o=!0)}if(!o)return;let n=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,s=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600,i=0,a=0,c=0,l=!1,f=d=>{let h=d.touches&&d.touches[0]||d.changedTouches&&d.changedTouches[0];h&&(i=h.clientX,a=h.clientY,c=Date.now(),l=!0)},u=d=>{if(!l)return;l=!1;let h=d.changedTouches&&d.changedTouches[0]||d.touches&&d.touches[0];if(!h)return;let g=h.clientX-i,p=h.clientY-a,m=Date.now()-c;if(m>s)return;let b=Math.abs(g),_=Math.abs(p);if(Math.max(b,_)<n)return;let y;if(b>_*1.2)y=g<0?"left":"right";else if(_>b*1.2)y=p<0?"up":"down";else return;let x="onSwipe"+y.charAt(0).toUpperCase()+y.slice(1),k=r[x],E=r.onSwipe;k&&k.call(t,d,t,t.state,t.context),E&&E.call(t,{direction:y,dx:g,dy:p,dt:m,event:d},t,t.state,t.context)};e.addEventListener("touchstart",f,{passive:!0}),e.addEventListener("touchend",u,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{e.removeEventListener("touchstart",f)}catch{}try{e.removeEventListener("touchend",u)}catch{}})}function va(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]=va(n,s):r[o]=s}return r}function gm(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=va(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=oe(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=uw(e,t);if(Array.isArray(n))return gm(t,n,r)}if(typeof e=="object")for(let n in e){if(Nt.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=va(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};oe(s,t,n,r)}}}function mm(t,e){let r=t.node;if(!r||r.tagName!=="SELECT")return;let o=r.options;if(!o||!o.length)return;let n=t.__ref,s=n&&n.__exec&&n.__exec.value,i=typeof s=="function",a=t.value!=null&&typeof t.value!="function";if(i||a){let f;if(i)try{f=s(t,t.state,t.context)}catch{return}else f=t.value;let u=f==null?"":String(f);r.value!==u&&(r.value=u);return}let c=e||!(n&&n.__selectSynced);if(n&&(n.__selectSynced=!0),!c)return;let l=-1;for(let f=0;f<o.length;f++)o[f].defaultSelected&&(l=f);l>=0&&r.selectedIndex!==l&&(r.selectedIndex=l)}function bw(t,e){let{children:r,content:o}=t,n=t.childExtends;if(typeof r=="function"){let u=r;try{r=u(t,t.state,t.context)}catch(m){if(r=void 0,typeof console<"u"&&console.error){let b=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${b} (initial run, treating as empty):`,m?.message||m)}}t.children=r;let d=t.__ref,h=!1,g=jt(t,t.childrenDeps,u),p=Z(()=>{let m=h;h=!0;let b;try{b=g(t,t.state,t.context)}catch(D){if(typeof console<"u"&&console.error){let I=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${I}${m?"":" (initial tracking run)"}:`,D?.message||D)}return}if(!m||b===t.children)return;t.children=b;let _=typeof t.onContentUpdate=="function",y=_?[]:null,x=_?[]:null,k=_?[]:null;if(Array.isArray(b)&&t.childrenAs==="state"){let D=t.childProps,I=[],z=new Map;for(let W=0;W<b.length;W++){let wt=b[W],L=D;if(typeof D=="function")try{L=D(t,wt)}catch{L=null}let ot=L&&L.key||wt&&wt.key||`${W}`;I.push(ot),z.set(ot,{rawChild:wt,childProps:L})}let V=new Set(I),rt=d.__children.slice();for(let W of rt)if(!V.has(W)){let wt=t[W];wt?.remove&&wt.remove(),delete t[W],x&&x.push(W)}let at=t.childExtends,G=t.tag==="fragment",K=t.context?.document||globalThis.document,lt=G?null:K?.createDocumentFragment(),Ut=new Set;for(let W of I){let wt=z.get(W),L=wt.rawChild,ot=t[W];if(ot&&ot.state){if(L&&typeof L=="object"){let Et=ot.state,Ke=Et.$replace||Et.replace,nt=Et.$update||Et.update;try{if(typeof Ke=="function")Ke.call(Et,L);else if(typeof nt=="function"){for(let M in Et)if(!(M==="__element"||M==="root"||M==="parent"||M==="update")&&!Object.prototype.hasOwnProperty.call(L,M))try{Et[M]=void 0}catch{}nt.call(Et,L)}else for(let M in L)Et[M]=L[M]}catch(M){if(typeof console<"u"&&console.error){let ht=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${W}" failed to patch at ${ht} (reconcile, keeping its previous data for this pass):`,M?.message||M)}}}k&&k.push(W);continue}let U=L;(typeof L=="string"||typeof L=="number")&&(U={value:L,text:L});let Y=wt.childProps,j=Y?{...Y,state:U}:{state:U};if(at&&!j.ignoreChildExtends)if(j.extends){let Et=Array.isArray(j.extends)?j.extends:[j.extends],Ke=Array.isArray(at)?at:[at];j={...j,extends:[...Ke,...Et]}}else j={...j,extends:at};let pt;try{pt=oe(j,t,W,e)}catch(Et){if(typeof console<"u"&&console.error){let Ke=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${W}" failed to construct at ${Ke} (reconcile, skipping this row):`,Et?.message||Et)}Ut.add(W);continue}!G&&pt?.node&&lt&&lt.appendChild(pt.node),y&&y.push(W)}if(!G&&lt&&lt.childNodes.length&&t.node&&t.node.appendChild(lt),!G&&t.node){let W=null;for(let wt of I){let L=t[wt]?.node;if(!L)continue;let ot=W?W.nextSibling:t.node.firstChild;L!==ot&&t.node.insertBefore(L,ot),W=L}}d.__children=Ut.size?I.filter(W=>!Ut.has(W)):I,_&&(y.length||x.length)&&ow(t,{added:y,removed:x,kept:k}),mm(t,!1);return}let $=_?[...d.__children]:null;for(let D of[...d.__children]){let I=t[D];I?.remove&&I.remove(),delete t[D]}d.__children=[],gm(t,b,e),mm(t,!1),_&&ow(t,{added:[...d.__children],removed:$,kept:[]})},{depth:d.path.length,label:Ct(d,"children")});d.__effects.push(p)}let s=gm(t,r,e);if(o!=null&&!(o&&o.__ref)){let u=o;if(typeof u=="string"||typeof u=="number"?u={text:u}:typeof u!="object"&&(u={}),t.childProps&&(u=va(t.childProps,u)),n&&!u.ignoreChildExtends)if(u.extends){let d=Array.isArray(u.extends)?u.extends:[u.extends],h=Array.isArray(n)?n:[n];u={...u,extends:[...h,...d]}}else u={...u,extends:n};oe(u,t,"content",e)}if(r&&!s)return;let i=t.context?.components||{};{let u=Object.keys(t);for(let d=0;d<u.length;d++){let h=u[d];if(!h.endsWith("Extends")||typeof t[h]!="string")continue;let g=h.slice(0,-7);if(!g||g.charCodeAt(0)<65||g.charCodeAt(0)>90)continue;let p={extends:t[h]};delete t[h];for(let m=d+1;m<u.length;m++){let b=u[m],_=b.charCodeAt(0);if(_>=65&&_<=90||Nt.has(b)||typeof t[b]=="function"&&(b.startsWith("on")||b.startsWith(".")))break;let y=t[b];y!==void 0&&(p[b]=y,delete t[b])}t[g]&&typeof t[g]=="object"?t[g]={...p,...t[g]}:t[g]=p}}let a=e?.mountYield===!0||t.yieldChildren===!0,c=Object.keys(t),l=u=>{if(Nt.has(u)||typeof t[u]!="object"||t[u]===null)return;let d=u.charCodeAt(0);if(d<65||d>90)return;let h=t[u];if(!h.__ref){if(!h.extends&&!h.extend){let g=i[u]||i[`smbls.${u}`];g&&(h={...h,extends:g})}if(t.childProps&&(h=va(t.childProps,h)),n&&!h.ignoreChildExtends)if(h.extends){let g=Array.isArray(h.extends)?h.extends:[h.extends],p=Array.isArray(n)?n:[n];h={...h,extends:[...p,...g]}}else h={...h,extends:n};oe(h,t,u,e)}};if(!a){for(let u of c)l(u);return}Yx();let f=u=>{for(let d=u;d<c.length;d++)if(l(c[d]),d+1<c.length&&Gx()){let h=d+1;Jx(()=>f(h));return}};f(0),Xx()}function _w(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 ym=3;function Bg(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=ym?!1:(t.__inBeforeUpdate=!0,!0)}function ir(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===ym&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${ym}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function ar(t,e,r){let o=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&At(o,e,r);let n="on"+t,s=e[n];if(typeof s=="function"){let c=t==="Render"?"__inRender":t==="RenderRouter"?"__inRenderRouter":null;if(c){if(e.__ref[c])return!0;e.__ref[c]=!0}let l=e.context?.designSystem;l&&it(l);let f=!!c;try{let u=s(e,e.state,e.context,r);if(u&&typeof u.then=="function"){let d=e.__ref;return u.catch(h=>{e.context?.plugins?.length&&At("error",e,{hook:n,error:h})||console.error(`[DOMQL] Lifecycle "${n}" error:`,h)}).finally(()=>{c&&d&&(d[c]=!1)}),f=!1,!0}if(u===!1)return!1}catch(u){if(e.context?.plugins?.length&&At("error",e,{hook:n,error:u})||console.error(`[DOMQL] Lifecycle "${n}" error:`,u),e.context?.strictMode)throw u}finally{l&&tt(),f&&e.__ref&&(e.__ref[c]=!1)}}return!0}var xw={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"]},ww={"gradient-blue-light":`linear-gradient(to right,
54
+ `):"")}}if(_m(s,!0),Ew(s,e,n),typeof s.html=="function"&&s.node&&!s.node.innerHTML){let p=s.context?.designSystem;p&&it(p);try{let m=s.html(s,s.state,s.context);m!=null&&typeof m!="function"&&(s.node.innerHTML=m)}catch{}finally{p&&tt()}}if(cr("Create",s,o),cr("Complete",s,o),cr("Render",s,o),cr("RenderRouter",s,o),yw(s,o),typeof s.onFrame=="function"){let p=s.onFrame,m=s.context?.designSystem,b=()=>{if(s.node){if(s.node.isConnected){m&&it(m);try{p(s,s.state,s.context)}catch(_){console.error("[DOMQL] onFrame error:",_)}finally{m&&tt()}}requestAnimationFrame(b)}};requestAnimationFrame(b)}return s}function o1(t,e,r){let o=!e,n=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=o&&n&&t.context?.state,i=r.state!==void 0&&!s?r.state:t.state&&!yt(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,ae(t,t.state);else if(t.context?.state){let a=t.context.state,c={...a},l=t.context?.polyglot;if(l?.translations){let f=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=yt(c)?c:Ye(c),t.state.__element=t,t.state.root=t.state,ae(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),ae(t,t.state);return}if(typeof i=="string"){if(t.state=bw(i,e),t.state&&typeof t.state=="object"&&!yt(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}ae(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=yt(a)?a:Ye(a||{})}else yt(i)?t.state=i:t.state=Ye({...i});t.state.__element=t,e?.state?(t.state.parent=e.state,t.state.root=e.state.root||e.state):t.state.root=t.state,ae(t,t.state)}function um(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 bw(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let n=t.slice(3);return n?um(e.state,n):e.state??{}}if(t.startsWith("~/")){let n=e.state?.root||e.state,s=t.slice(2);return s?um(n,s):n??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=um(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 n1=new Set(["s","state","ctx","context"]);function s1(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 i1(t){if(typeof t!="function"||t.length!==2)return!1;let e=s1(t);if(e.length<2)return!1;let r=e[1].replace(/[{}[\]]/g,"").trim();return r.length>0&&!n1.has(r)}function a1(t){let e=t.__ref,r=t.tag||"div",o=t.context?.designSystem,n=[],s=Object.keys(t);for(let i=0;i<s.length;i++){let a=s[i];if(typeof t[a]!="function"||jt.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||jn(a)||xt[a]||vt&&vt.has(a)||Fr(r,a)||(Pt()&&i1(t[a])&&console.warn(`[smbls] custom prop "${a}"${t.key?` on key "${t.key}"`:""} is a function \u2014 it will be auto-invoked on read and its RETURN VALUE stored, not preserved as a callable reference. If you meant to stash a callback, use el.call('${a}', \u2026) instead of reading el.${a}(\u2026) directly (see RULES.md Rule 8).`),n.push({prop:a,fn:t[a]}))}for(let i=0;i<n.length;i++){let{prop:a,fn:c}=n[i];e.__exec[a]=c,Object.defineProperty(t,a,{get(){o&&it(o);try{return c(t,t.state,t.context)}catch{return}finally{o&&tt()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function c1(t,e){if(!(!Array.isArray(e)||e.length===0))for(let r=0;r<e.length;r++){let o=e[r];try{typeof o=="function"?o(t,t.state,t.context):typeof o=="string"&&t.state?.[o]}catch{}}}function Bt(t,e,r){return!Array.isArray(e)||e.length===0?r:function(...o){return c1(t,e),r.apply(this,o)}}function Sa(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function Ct(t,e){return()=>t.path.join(".")+"::"+e}function _w(t,e){let r=t.__ref,o=!!(e&&e.skipIfEffect);if(a1(t),typeof t.text=="function"){let s=t.text,i=Bt(t,t.textDeps,s),a=Z(()=>{if(!r.contentManaged)try{let c=i(t,t.state,t.context);t.node&&c!=null&&typeof c!="function"&&typeof c!="object"&&(typeof c=="string"&&c.includes("{{")&&(c=Zr.call(t,c,t.state)),$n(t,c))}catch{}},{depth:r.path.length,label:Ct(r,"text")});r.__effects.push(a),r.__exec.text=s}else if(typeof t.text=="string"&&t.text.includes("{{")){let s=t.text,i=Z(()=>{if(r.contentManaged)return;let a=Zr.call(t,s,t.state);a!=null&&(t.text=a),t.node&&$n(t,a??"")},{depth:r.path.length,label:Ct(r,"text")});r.__effects.push(i),r.__exec.text=s}for(let s of Object.keys(t))if(typeof t[s]=="function"&&!jt.has(s)&&!jn(s)&&!r.__exec[s]){if(xt[s]){let i=t[s],a=Bt(t,t[s+"Deps"],i),c=s,l,f=Z(()=>{let u=t.context?.designSystem;u&&it(u);try{let d=a(t,t.state,t.context),h=xt[c](d,t,t.state,t.context),g=c==="show"||c==="hide";if(h&&t.node){let p=ym(h),m=g&&t.node.style.display!=="none";(p===null||p!==l||m)&&(l=p,Nn(t.node,h))}else if(t.node&&g){l=void 0;let p=r.__explicitDisplay;t.node.style.display=typeof p=="string"?p:""}}finally{u&&tt()}},{depth:r.path.length,label:Ct(r,c)});r.__effects.push(f),r.__exec[s]=i}else if(vt&&vt.has(s)){let i=t[s],a=Bt(t,t[s+"Deps"],i),c=s,l,f=Z(()=>{let u=t.context?.designSystem;u&&it(u);try{let d=a(t,t.state,t.context);if(t.node)if(d!=null){let h=c+":"+String(d);h!==l&&(l=h,Nn(t.node,{[c]:d}))}else l=void 0,t.node.style[c]=""}finally{u&&tt()}},{depth:r.path.length,label:Ct(r,c)});r.__effects.push(f),r.__exec[s]=i}}if(typeof t.html=="function"){let s=t.html,i=Bt(t,t.htmlDeps,s),a=Z(()=>{let c=t.context?.designSystem;c&&it(c);try{let l=i(t,t.state,t.context);t.node&&l!=null&&typeof l!="function"&&(t.node.innerHTML=l)}finally{c&&tt()}},{depth:r.path.length,label:Ct(r,"html")});r.__effects.push(a),r.__exec.html=s}if(typeof t.value=="function"){let s=t.value,i=Bt(t,t.valueDeps,s),a=Z(()=>{try{let c=i(t,t.state,t.context);if(!t.node||!("value"in t.node))return;let l=c==null?"":String(c);if(t.node.value===l)return;let f=typeof document<"u"&&document.activeElement===t.node,u=f&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,d=f&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=l,f&&u!=null&&d!=null)try{t.node.setSelectionRange(u,d)}catch{}}catch{}},{depth:r.path.length,label:Ct(r,"value")});r.__effects.push(a),r.__exec.value=s}if(typeof t.style=="function"){let s=t.style,i=Bt(t,t.styleDeps,s),a,c=Z(()=>{let l=i(t,t.state,t.context),f=ym(l);(f===null||f!==a)&&(a=f,Nn(t.node,l))},{depth:r.path.length,label:Ct(r,"style")});r.__effects.push(c),r.__exec.style=s}else if(t.style&&typeof t.style=="object")for(let s in t.style){let i=t.style[s];if(typeof i!="function")continue;let a=Bt(t,Sa(t.styleDeps,s),i),c,l=Z(()=>{try{let f=a(t,t.state,t.context);if(t.node){let u=s+":"+String(f);u!==c&&(c=u,Nn(t.node,{[s]:f}))}}catch{}},{depth:r.path.length,label:Ct(r,"style."+s)});r.__effects.push(l)}if(t.attr&&typeof t.attr=="object"){for(let s in t.attr)if(typeof t.attr[s]=="function"){let i=Bt(t,Sa(t.attrDeps,s),t.attr[s]),a=s,c=Z(()=>{try{let l=i(t,t.state,t.context);t.node?.setAttribute&&(l==null||l===!1&&!ir(a)?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,qe(a,l)))}catch{}},{depth:r.path.length,label:Ct(r,"attr."+a)});r.__effects.push(c)}}if(t.aria&&typeof t.aria=="object")for(let s in t.aria){if(typeof t.aria[s]!="function")continue;let i=Bt(t,Sa(t.ariaDeps,s),t.aria[s]),a="aria-"+s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=Z(()=>{try{let l=i(t,t.state,t.context);if(!t.node?.setAttribute)return;l==null?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,qe(a,l))}catch{}},{depth:r.path.length,label:Ct(r,"aria."+s)});r.__effects.push(c)}if(t.data&&typeof t.data=="object")for(let s in t.data){if(typeof t.data[s]!="function")continue;let i=Bt(t,Sa(t.dataDeps,s),t.data[s]),c="data-"+s.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),l=Z(()=>{try{let f=i(t,t.state,t.context);if(!t.node?.setAttribute)return;f==null||f===!1?t.node.removeAttribute(c):typeof f!="function"&&typeof f!="object"&&t.node.setAttribute(c,f===!0?"":f)}catch{}},{depth:r.path.length,label:Ct(r,"data."+s)});r.__effects.push(l)}let n=t.classlist&&typeof t.classlist=="object"&&!Array.isArray(t.classlist)?t.classlist:t.class&&typeof t.class=="object"&&!Array.isArray(t.class)?t.class:null;if(n)for(let s in n){if(typeof n[s]!="function")continue;let i=Bt(t,Sa(t.classDeps,s),n[s]),a=Z(()=>{try{let c=i(t,t.state,t.context);if(!t.node?.classList)return;typeof c=="string"?t.node.classList.add(c):c?t.node.classList.add(s):t.node.classList.remove(s)}catch{}},{depth:r.path.length,label:Ct(r,"class."+s)});r.__effects.push(a)}!o&&typeof t.if=="function"&&xw(t,r,t.if);for(let s of Object.keys(t)){if(jt.has(s)||typeof t[s]!="function")continue;let i=s.charCodeAt(0);if(i>=65&&i<=90||jn(s))continue;let a=t[s];r.__exec[s]=a;let c=t.tag||"div";if(Fr(c,s)&&!xt[s]&&!(vt&&vt.has(s))){let l=Mr(s)||s,f=Bt(t,t[s+"Deps"],a),u=Z(()=>{try{let d=f(t,t.state,t.context);t.node?.setAttribute&&(d==null||d===!1&&!ir(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,qe(l,d))))}catch{}},{depth:r.path.length,label:Ct(r,s)});r.__effects.push(u)}}if(u1(t),h1(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let s=t.onStateUpdate,i=t.stateDeps,a=!1,c=[],l=Z(()=>{let f=[];for(let g=0;g<i.length;g++){let p=i[g];try{f[g]=typeof p=="function"?p(t,t.state,t.context):t.state?.[p]}catch{f[g]=void 0}}if(!a){a=!0,c=f;return}let u=f.length!==c.length;for(let g=0;!u&&g<f.length;g++)f[g]!==c[g]&&(u=!0);let d=c;if(c=f,!u)return;let h=t.context?.designSystem;h&&it(h);try{s(t,t.state,t.context,{prev:d,next:f})}catch(g){if(t.context?.plugins?.length&&At("error",t,{hook:"onStateUpdate",error:g})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',g),t.context?.strictMode)throw g}finally{h&&tt()}},{depth:r.path.length,label:Ct(r,"onStateUpdate")});r.__effects.push(l)}p1(t)}function fw(t){let e=t.parent,r=e?.node;if(!r||!t.node){Ew(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 xw(t,e,r){let o=Bt(t,t.ifDeps,r),n=Z(()=>{let s;try{s=o(t,t.state,t.context)}catch(a){if(s=!1,e.__ifError=a,typeof console<"u"&&console.warn){let c=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${c} \u2014 treating as false:`,a?.message||a)}return}let i=e.__if;if(e.__if=!!s,i&&!e.__if&&t.node)t.node.remove();else if(!i&&e.__if)if(e.__ifInitialized)t.node||(t.node=Dr(t)),t.node&&(t.node.ref=t),fw(t),mm(t);else{if(e.__ifInitialized=!0,t.tag||(t.tag=Ir(t)),cr("Init",t,{}),t.node||(t.node=Dr(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}cr("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),vw(t,{}),_w(t,{skipIfEffect:!0}),mm(t),Sw(t),Cw(t,{}),fw(t),yw(t,{})}},{depth:e.path.length,label:Ct(e,"if")});e.__effects.push(n)}function $n(t,e){let r=t.node;if(!r)return;let o=e==null||typeof e=="object"?"":String(e);if(t.tag==="string"){r.nodeValue!==o&&(r.nodeValue=o);return}let n=t.__ref,s=n?n.__textNode:null;if(s&&s.parentNode!==r&&(s=null),!s){let i=r.firstChild;i&&i.nodeType===3&&(s=i)}s?s.nodeValue!==o&&(s.nodeValue=o):r.firstChild?(s=(r.ownerDocument||t.context?.document||globalThis.document).createTextNode(o),r.insertBefore(s,r.firstChild)):(r.textContent=o,s=r.firstChild&&r.firstChild.nodeType===3?r.firstChild:null),n&&(n.__textNode=s||null)}function mm(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&$n(t,t.text),m1(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"&&Nn(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&&!ir(r)||e.setAttribute&&e.setAttribute(r,qe(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 ym(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function Nn(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&&l1(t,r)}function l1(t,e){let r=`_ds${gw.scopedStyleId++}`;t.classList.add(r);let o=t.ownerDocument,n=o.querySelector("style[data-smbls-scoped]");n||(n=o.createElement("style"),n.setAttribute("data-smbls-scoped",""),o.head.appendChild(n));let s="";for(let i in e){let a="."+r,c=i.replace(/&/g,a).split(",").map(f=>{let u=f.trim();return u.includes(a)?u:a+u}).join(", "),l=e[i];if(typeof l=="object"){let f="",u="";for(let d in l){let h=l[d];if(typeof h=="object"){let g=d.includes("&")?c.split(", ").map(m=>d.replace(/&/g,m)).join(", "):c.split(", ").map(m=>`${m} ${d}`).join(", "),p="";for(let m in h)p+=`${m.replace(/[A-Z]/g,b=>"-"+b.toLowerCase())}: ${h[m]};`;u+=Oe(`${g} { ${p} }`,g)+`
55
+ `}else f+=`${d.replace(/[A-Z]/g,g=>"-"+g.toLowerCase())}: ${h};`}f&&(s+=Oe(`${c} { ${f} }`,c)+`
56
+ `),u&&(s+=u)}}s&&(n.textContent+=s)}var uw=new Set;function dw(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 f1(t,e,r){let o=dw(r);queueMicrotask(()=>{if(!t.__ref)return;let n;try{n=e(t,t.state,t.context)}catch{return}if(dw(n)===o)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";uw.has(s)||(uw.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 u1(t){let e=t.subscribeTo,r=typeof e=="function",o=e;if(r)try{o=e(t,t.state,t.context)}catch{o=null}if(r&&Pt()&&f1(t,e,Array.isArray(o)?o:[]),!Array.isArray(o)||o.length===0)return;let n=t.__ref;for(let s=0;s<o.length;s++){let i=o[s];if(typeof i!="string"||i.length===0)continue;let a=i.split("."),c=a[0],l=a.slice(1),f={value:!1},u=Z(()=>{let d=t.state&&(yt(t.state)?t.state.root:null);if(!d||!yt(d))return;let h=d;h=h[c];for(let p=0;p<l.length&&!(h==null||typeof h!="object");p++)if(yt(h))h=h[l[p]];else break;if(!f.value)return;let g=!1;if(typeof t.onBeforeUpdate=="function"){let p=t.context?.designSystem;p&&it(p);try{if(Hg(n)){let m=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});m&&typeof m.then=="function"?m.then(()=>ar(n,!1),b=>{ar(n,!0),t.context?.plugins?.length&&At("error",t,{hook:"onBeforeUpdate",error:b})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",b)}):(ar(n,!1),m===!1&&(g=!0))}}catch(m){ar(n,!0),t.context?.plugins?.length&&At("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}finally{p&&tt()}}if(!g&&t.node&&n.__effects)for(let p=0;p<n.__effects.length;p++){let m=n.__effects[p];m&&m!==u&&!m._disposed&&!m._isSubscribeToEffect&&typeof m._execute=="function"&&m._execute()}if(!g&&typeof t.onUpdate=="function"){let p=t.context?.designSystem;p&&it(p);try{t.onUpdate(t,t.state,t.context)}catch(m){t.context?.plugins?.length&&At("error",t,{hook:"onUpdate",error:m})||console.error("[DOMQL] subscribeTo onUpdate error:",m)}finally{p&&tt()}}},{depth:n.path.length,label:Ct(n,"subscribeTo("+i+")")});f.value=!0,u._isSubscribeToEffect=!0,n.__effects.push(u)}}function wm(t,e){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&(t==="@dark"||t==="@light"||!e.context?.designSystem?.media?.[t.slice(1)])}var pw=new Set;function d1(t,e){let r=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",o=r+"::"+t;pw.has(o)||(pw.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 Bn(t,e,r){let o={},n=new Set,s=(i,a,c)=>{let l=c?new Set(Object.keys(o)):null;if(xt[i]){let f=xt[i](a,e,e.state,e.context);if(f){let u=Array.isArray(f)?f:[f];for(let d of u)d&&Object.assign(o,d)}}else o[i]=a;if(c)for(let f in o)l.has(f)||n.add(f)};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=t[i];if(typeof a=="function"&&(a=a(e,e.state,e.context)),a==null||typeof a=="function")continue;if(typeof a=="object"&&!Array.isArray(a)){if(i==="style"){for(let u in a){let d=a[u];if(typeof d=="function"&&(d=d(e,e.state,e.context)),d==null||typeof d=="function")continue;let h=typeof e[u]=="function"&&(xt[u]||vt&&vt.has(u));s(u,d,h)}continue}if(wm(i,e)){let u=Bn(a,e,!1);Object.keys(u).length&&(o[`[data-theme="${i.slice(1)}"] &`]=u);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(i)){Pt()&&d1(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=Bn(a,e,!1);Object.keys(f).length&&(o[l]=f);continue}let c=typeof e[i]=="function"&&(xt[i]||vt&&vt.has(i));s(i,a,c)}if(r)for(let i in o)n.add(i);for(let i of n){let a=o[i];typeof a=="string"&&!a.includes("!important")&&(o[i]=a+" !important")}return o}function Sm(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)&&Sm(t[r],e+1))return!0}return!1}function ww(t,e,r){if(!e||typeof e!="object"||Array.isArray(e))return null;if(wm(t,r)){let s=Bn(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=Bn(e,r,!1);return Object.keys(n).length?{cssProp:o,block:n}:null}function p1(t){let e=t.__ref;for(let r of Object.keys(t)){if(!gm(r))continue;let o=t[r];if(!o||typeof o!="object"||Array.isArray(o)||!Sm(o))continue;let n=null,s,i=Z(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&it(a);let c,l=!1;try{let f=ww(r,o,t),u=f?ym(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=_e({[f.cssProp]:f.block},null,t.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&tt()}if(!(l||!t.node.classList)){if(n)for(let f of n)t.node.classList.remove(f);if(c&&c.length)for(let f of c)t.node.classList.add(f);n=c}},{depth:e.path.length,label:Ct(e,"cssBlock("+r+")")});e.__effects.push(i)}}function h1(t){let e=t.__ref;e.__conditionalRunners=[];let r=new Map;for(let o of Object.keys(t)){let n=o.charAt(0);if(n!=="."&&n!=="!")continue;let s=o.slice(1);if(!s)continue;if(/[:@\s>~+[\]]/.test(s)){if(typeof console<"u"&&console.warn){let u=s.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${o}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${n}\` is read as one prop name. Nest the selector inside instead: \`${n}${u}: { '${s.slice(u.length)}': {...} }\`.`)}continue}let i=t[o];if(!i||typeof i!="object")continue;let a=n==="!",c={lastMatch:!1,appliedKeys:null,appliedClasses:null},l=()=>{let u,d=t[s];if(d===void 0){let p=!!t.state&&s in t.state,m=t.state?t.state[s]:void 0;if(p||m!==void 0)u=m;else{let b=t.context?.cases?.[s];if(b===void 0)return;try{u=typeof b=="function"?b.call(t,t):b}catch(_){u=!1,e.__conditionalError=_,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,_?.message||_)}}}else if(typeof d=="function")try{u=d(t,t.state,t.context)}catch(p){u=!1,e.__conditionalError=p,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,p?.message||p)}else u=d;let h=a?!u:!!u;if(!t.node||h===c.lastMatch)return;c.lastMatch=h;let g=t.context?.designSystem;g&&it(g);try{if(h){let p={},m={},b=!1;for(let y in i){if(!Object.prototype.hasOwnProperty.call(i,y))continue;let x=i[y],k=y.charAt(0);if((k===":"||k==="@"||k==="&")&&x&&typeof x=="object"&&!Array.isArray(x)){if(wm(y,t)){let T=Bn(x,t,!1);Object.keys(T).length&&(m[`[data-theme="${y.slice(1)}"] &`]=T,b=!0)}else{let T=y;if(k==="@"&&!y.startsWith("@media")&&!y.startsWith("@keyframes")){let D=t.context?.designSystem?.media?.[y.slice(1)];D&&(T=`@media ${D}`)}let $=Bn(x,t,!1);Object.keys($).length&&(m[T]=$,b=!0)}continue}let E=typeof x=="function"?x(t,t.state,t.context):x;if(E!=null)if(xt[y]){let T=xt[y](E,t,t.state,t.context);if(T){let $=Array.isArray(T)?T:[T];for(let D of $)D&&Object.assign(p,D)}}else vt&&vt.has(y)&&(p[y]=E)}let _=Object.keys(p);if(_.length){Nn(t.node,p);for(let y of _)r.set(y,o);c.appliedKeys=_}else c.appliedKeys=null;if(b){let y=_e(m,null,t.context?.cssPrefix),x=y?y.split(" ").filter(Boolean):[];if(x.length&&t.node.classList){for(let k of x)t.node.classList.add(k);c.appliedClasses=x}else c.appliedClasses=null}else if(c.appliedClasses){for(let y of c.appliedClasses)t.node.classList.remove(y);c.appliedClasses=null}}else{if(c.appliedKeys){for(let p of c.appliedKeys)r.get(p)===o&&(t.node.style[p]="",r.delete(p));c.appliedKeys=null}if(c.appliedClasses){for(let p of c.appliedClasses)t.node.classList.remove(p);c.appliedClasses=null}}}finally{g&&tt()}};e.__conditionalRunners.push(l);let f=Z(l,{depth:e.path.length,label:Ct(e,"conditional("+o+")")});e.__effects.push(f)}}var dm=new WeakSet;function g1(t){let e=t.ownerDocument;!e||dm.has(e)||(dm.add(e),queueMicrotask(()=>{dm.delete(e);let r=e.body||e.documentElement;r&&r.offsetWidth}))}var pm=new WeakSet,hw=!1;function m1(t){let{node:e}=t;if(!e)return;if(hw||(hw=!0,_e({display:"none"})),pm.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}pm.add(t);let r=t.context?.designSystem;r&&it(r),Xg();try{let o={},n=!1;if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&xt.theme){let s=xt.theme(t.theme,t,t.state,t.context);if(s){if(Array.isArray(s))for(let i of s)i&&Object.assign(o,i);else Object.assign(o,s);n=!0}}for(let s of Object.keys(t)){if(typeof t[s]=="function"||jt.has(s)||s==="theme")continue;let i=s.charCodeAt(0);if(!(i>=65&&i<=90)&&!jn(s)){if(xt[s]){let a=t[s],c=xt[s](a,t,t.state,t.context);if(c){if(Array.isArray(c))for(let l of c)l&&Object.assign(o,l);else Object.assign(o,c);n=!0}}else if(vt&&vt.has(s)){let a=t[s];a!=null&&typeof a!="object"&&(o[s]=a,n=!0)}else if(s.charCodeAt(0)===45){let a=t[s];a!=null&&typeof a!="object"&&(o[s]=a,n=!0)}else if(s.charAt(0)==="&"||s.charAt(0)==="@"||s.charAt(0)===":"){let a=t[s];if(a&&typeof a=="object"&&!Array.isArray(a)){if(Sm(a))continue;let c=ww(s,a,t);c&&(o[c.cssProp]=c.block,n=!0)}}}}if(n){o.display&&String(o.display).includes("!important")&&(e.style.setProperty("display",String(o.display).replace(/\s*!important\s*$/,""),"important"),delete o.display);let s=_e(o,null,t.context?.cssPrefix);if(s&&e.classList){let a=s.split(" ").filter(Boolean),c=!1;for(let l of a)e.classList.add(l),c||(l.charCodeAt(0)===95&&l.charCodeAt(1)===99||l.charCodeAt(0)===95&&l.indexOf("_c",1)!==-1)&&(c=!0);c&&g1(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{Jg(),r&&tt(),pm.delete(t)}}function Sw(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,qe(i,s))}let r=Vg(t);for(let n in r){let s=r[n];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(n,s===!0?"":s)}let o=t.tag||"div";for(let n of Object.keys(t)){if(typeof t[n]=="function"||jt.has(n)||n==="on"||r[n]!==void 0)continue;let s=n.charCodeAt(0);if(!(s>=65&&s<=90)&&!jn(n)&&!(xt[n]||vt&&vt.has(n))&&Fr(o,n)){let i=t[n];if(i==null||(typeof i=="string"&&i.includes("{{")&&(i=Zr(i,t,t.state,t.context),t[n]=i),i==null||typeof i=="function"||typeof i=="object")||i===!1&&!ir(Mr(n)||n))continue;let a=Mr(n)||n;e.setAttribute(a,qe(a,i))}}}function y1(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 b1(t){if(!t.autoGrow)return;let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let r=t.__ref,o=t.autoGrow,n=typeof o=="function"?Bt(t,t.autoGrowDeps,o):null,s=Z(()=>{let i=t.autoGrow,a=i;if(typeof i=="function")try{a=(i===o&&n?n:i)(t,t.state,t.context)}catch{a=null}y1(t,a)},{depth:r.path.length,label:Ct(r,"autoGrow")});r.__effects||(r.__effects=[]),r.__effects.push(s),n&&(r.__exec.autoGrow=o)}var kw=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function vw(t,e){for(let r of Object.keys(t)){if(!jn(r)||kw.has(r))continue;let o=uf(r);if(o){df(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=e1(r);$r.has(s)||Pn(r1(s),t,n)}_1(t)}function _1(t){let e=t.node;if(!e||!e.addEventListener)return;let r={},o=!1;for(let d of kw){let h=t[d];typeof h=="function"&&(r[d]=h,o=!0)}if(!o)return;let n=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,s=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600,i=0,a=0,c=0,l=!1,f=d=>{let h=d.touches&&d.touches[0]||d.changedTouches&&d.changedTouches[0];h&&(i=h.clientX,a=h.clientY,c=Date.now(),l=!0)},u=d=>{if(!l)return;l=!1;let h=d.changedTouches&&d.changedTouches[0]||d.touches&&d.touches[0];if(!h)return;let g=h.clientX-i,p=h.clientY-a,m=Date.now()-c;if(m>s)return;let b=Math.abs(g),_=Math.abs(p);if(Math.max(b,_)<n)return;let y;if(b>_*1.2)y=g<0?"left":"right";else if(_>b*1.2)y=p<0?"up":"down";else return;let x="onSwipe"+y.charAt(0).toUpperCase()+y.slice(1),k=r[x],E=r.onSwipe;k&&k.call(t,d,t,t.state,t.context),E&&E.call(t,{direction:y,dx:g,dy:p,dt:m,event:d},t,t.state,t.context)};e.addEventListener("touchstart",f,{passive:!0}),e.addEventListener("touchend",u,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{e.removeEventListener("touchstart",f)}catch{}try{e.removeEventListener("touchend",u)}catch{}})}function Ea(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]=Ea(n,s):r[o]=s}return r}function bm(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=Ea(d,f));if(o&&!f.ignoreChildExtends)if(f.extends){let p=Array.isArray(f.extends)?f.extends:[f.extends],m=Array.isArray(o)?o:[o];f={...f,extends:[...m,...p]}}else f={...f,extends:o};let h=f?.key||u&&typeof u=="object"&&u.key||`${l}`,g;try{g=ne(f,t,h,r)}catch(p){if(typeof console<"u"&&console.error){let m=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${h}" failed to construct at ${m} (initial render, skipping this row):`,p?.message||p)}continue}!n&&g?.node&&i.appendChild(g.node)}return n||t.node.appendChild(i),!0}if(typeof e=="string"){let n=bw(e,t);if(Array.isArray(n))return bm(t,n,r)}if(typeof e=="object")for(let n in e){if(jt.has(n))continue;let s=e[n];if(!(s==null||s===!1)){if((typeof s=="string"||typeof s=="number")&&(s={text:s}),t.childProps&&(s=Ea(t.childProps,s)),o&&!s.ignoreChildExtends)if(s.extends){let i=Array.isArray(s.extends)?s.extends:[s.extends],a=Array.isArray(o)?o:[o];s={...s,extends:[...a,...i]}}else s={...s,extends:o};ne(s,t,n,r)}}}function _m(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 Cw(t,e){let{children:r,content:o}=t,n=t.childExtends;if(typeof r=="function"){let u=r;try{r=u(t,t.state,t.context)}catch(m){if(r=void 0,typeof console<"u"&&console.error){let b=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${b} (initial run, treating as empty):`,m?.message||m)}}t.children=r;let d=t.__ref,h=!1,g=Bt(t,t.childrenDeps,u),p=Z(()=>{let m=h;h=!0;let b;try{b=g(t,t.state,t.context)}catch(D){if(typeof console<"u"&&console.error){let I=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${I}${m?"":" (initial tracking run)"}:`,D?.message||D)}return}if(!m||b===t.children)return;t.children=b;let _=typeof t.onContentUpdate=="function",y=_?[]:null,x=_?[]:null,k=_?[]:null;if(Array.isArray(b)&&t.childrenAs==="state"){let D=t.childProps,I=[],z=new Map;for(let W=0;W<b.length;W++){let wt=b[W],L=D;if(typeof D=="function")try{L=D(t,wt)}catch{L=null}let ot=L&&L.key||wt&&wt.key||`${W}`;I.push(ot),z.set(ot,{rawChild:wt,childProps:L})}let V=new Set(I),rt=d.__children.slice();for(let W of rt)if(!V.has(W)){let wt=t[W];wt?.remove&&wt.remove(),delete t[W],x&&x.push(W)}let at=t.childExtends,G=t.tag==="fragment",K=t.context?.document||globalThis.document,lt=G?null:K?.createDocumentFragment(),Vt=new Set;for(let W of I){let wt=z.get(W),L=wt.rawChild,ot=t[W];if(ot&&ot.state){if(L&&typeof L=="object"){let Et=ot.state,Ge=Et.$replace||Et.replace,nt=Et.$update||Et.update;try{if(typeof Ge=="function")Ge.call(Et,L);else if(typeof nt=="function"){for(let M in Et)if(!(M==="__element"||M==="root"||M==="parent"||M==="update")&&!Object.prototype.hasOwnProperty.call(L,M))try{Et[M]=void 0}catch{}nt.call(Et,L)}else for(let M in L)Et[M]=L[M]}catch(M){if(typeof console<"u"&&console.error){let ht=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${W}" failed to patch at ${ht} (reconcile, keeping its previous data for this pass):`,M?.message||M)}}}k&&k.push(W);continue}let U=L;(typeof L=="string"||typeof L=="number")&&(U={value:L,text:L});let Y=wt.childProps,j=Y?{...Y,state:U}:{state:U};if(at&&!j.ignoreChildExtends)if(j.extends){let Et=Array.isArray(j.extends)?j.extends:[j.extends],Ge=Array.isArray(at)?at:[at];j={...j,extends:[...Ge,...Et]}}else j={...j,extends:at};let pt;try{pt=ne(j,t,W,e)}catch(Et){if(typeof console<"u"&&console.error){let Ge=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${W}" failed to construct at ${Ge} (reconcile, skipping this row):`,Et?.message||Et)}Vt.add(W);continue}!G&&pt?.node&&lt&&lt.appendChild(pt.node),y&&y.push(W)}if(!G&&lt&&lt.childNodes.length&&t.node&&t.node.appendChild(lt),!G&&t.node){let W=null;for(let wt of I){let L=t[wt]?.node;if(!L)continue;let ot=W?W.nextSibling:t.node.firstChild;L!==ot&&t.node.insertBefore(L,ot),W=L}}d.__children=Vt.size?I.filter(W=>!Vt.has(W)):I,_&&(y.length||x.length)&&lw(t,{added:y,removed:x,kept:k}),_m(t,!1);return}let $=_?[...d.__children]:null;for(let D of[...d.__children]){let I=t[D];I?.remove&&I.remove(),delete t[D]}d.__children=[],bm(t,b,e),_m(t,!1),_&&lw(t,{added:[...d.__children],removed:$,kept:[]})},{depth:d.path.length,label:Ct(d,"children")});d.__effects.push(p)}let s=bm(t,r,e);if(o!=null&&!(o&&o.__ref)){let u=o;if(typeof u=="string"||typeof u=="number"?u={text:u}:typeof u!="object"&&(u={}),t.childProps&&(u=Ea(t.childProps,u)),n&&!u.ignoreChildExtends)if(u.extends){let d=Array.isArray(u.extends)?u.extends:[u.extends],h=Array.isArray(n)?n:[n];u={...u,extends:[...h,...d]}}else u={...u,extends:n};ne(u,t,"content",e)}if(r&&!s)return;let i=t.context?.components||{};{let u=Object.keys(t);for(let d=0;d<u.length;d++){let h=u[d];if(!h.endsWith("Extends")||typeof t[h]!="string")continue;let g=h.slice(0,-7);if(!g||g.charCodeAt(0)<65||g.charCodeAt(0)>90)continue;let p={extends:t[h]};delete t[h];for(let m=d+1;m<u.length;m++){let b=u[m],_=b.charCodeAt(0);if(_>=65&&_<=90||jt.has(b)||typeof t[b]=="function"&&(b.startsWith("on")||b.startsWith(".")))break;let y=t[b];y!==void 0&&(p[b]=y,delete t[b])}t[g]&&typeof t[g]=="object"?t[g]={...p,...t[g]}:t[g]=p}}let a=e?.mountYield===!0||t.yieldChildren===!0,c=Object.keys(t),l=u=>{if(jt.has(u)||typeof t[u]!="object"||t[u]===null)return;let d=u.charCodeAt(0);if(d<65||d>90)return;let h=t[u];if(!h.__ref){if(!h.extends&&!h.extend){let g=i[u]||i[`smbls.${u}`];g&&(h={...h,extends:g})}if(t.childProps&&(h=Ea(t.childProps,h)),n&&!h.ignoreChildExtends)if(h.extends){let g=Array.isArray(h.extends)?h.extends:[h.extends],p=Array.isArray(n)?n:[n];h={...h,extends:[...p,...g]}}else h={...h,extends:n};ne(h,t,u,e)}};if(!a){for(let u of c)l(u);return}Qx();let f=u=>{for(let d=u;d<c.length;d++)if(l(c[d]),d+1<c.length&&Zx()){let h=d+1;ew(()=>f(h));return}};f(0),tw()}function Ew(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 xm=3;function Hg(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=xm?!1:(t.__inBeforeUpdate=!0,!0)}function ar(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===xm&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${xm}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function cr(t,e,r){let o=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&At(o,e,r);let n="on"+t,s=e[n];if(typeof s=="function"){let c=t==="Render"?"__inRender":t==="RenderRouter"?"__inRenderRouter":null;if(c){if(e.__ref[c])return!0;e.__ref[c]=!0}let l=e.context?.designSystem;l&&it(l);let f=!!c;try{let u=s(e,e.state,e.context,r);if(u&&typeof u.then=="function"){let d=e.__ref;return u.catch(h=>{e.context?.plugins?.length&&At("error",e,{hook:n,error:h})||console.error(`[DOMQL] Lifecycle "${n}" error:`,h)}).finally(()=>{c&&d&&(d[c]=!1)}),f=!1,!0}if(u===!1)return!1}catch(u){if(e.context?.plugins?.length&&At("error",e,{hook:n,error:u})||console.error(`[DOMQL] Lifecycle "${n}" error:`,u),e.context?.strictMode)throw u}finally{l&&tt(),f&&e.__ref&&(e.__ref[c]=!1)}}return!0}var Aw={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"]},Tw={"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}`},AE=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 h1={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"}}}},g1={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},m1={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"}}},Sw={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...h1,...g1,...m1,none:{color:"none",background:"none"},transparent:{color:"currentColor",background:"transparent"}};var kw={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var vw={ratio:1.618,subSequence:!0};var Cw={SourceSans:[{url:""}]},Ew={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 Aw={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 Tw={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 Ow={base:150,ratio:1.333,unit:"ms",subSequence:!0};var Rw={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var Ca={version:"0.0.1",color:xw,gradient:ww,theme:Sw,typography:kw,spacing:vw,font:Cw,fontFamily:Ew,timing:Ow,icons:Aw,media:Tw,sizes:Rw,reset:{html:{},body:{}},animation:{fadeIn:{from:{opacity:0},to:{opacity:1}}},devices:{},class:{},svg:{},grid:{},shape:{}};var Bn={};P(Bn,{A:()=>KS,AssetPicture:()=>Gw,Audio:()=>Jw,Avatar:()=>c0,B:()=>mS,Block:()=>Pw,Box:()=>Cf,Br:()=>xS,Button:()=>XS,ButtonSet:()=>t0,COMPONENTS:()=>wo,Caption:()=>aS,Checkbox:()=>RS,CheckboxHgroup:()=>PS,Circle:()=>Ww,CircleButton:()=>ZS,Clickable:()=>Vw,Data:()=>bS,Dialog:()=>r0,DialogFooter:()=>n0,DialogHeader:()=>o0,Dropdown:()=>f0,DropdownList:()=>u0,DropdownParent:()=>d0,DropdownParentFocus:()=>p0,DropdownSiblingFocus:()=>h0,FileIcon:()=>HS,Flex:()=>Dw,Focusable:()=>Hw,FocusableComponent:()=>zw,Footnote:()=>gS,Form:()=>jw,Grid:()=>Lw,Gutter:()=>Fw,H1:()=>tS,H2:()=>eS,H3:()=>rS,H4:()=>oS,H5:()=>nS,H6:()=>sS,Headline:()=>pS,Hgroup:()=>CS,HgroupButton:()=>AS,HgroupRows:()=>ES,Hoverable:()=>Uw,Hr:()=>_S,I:()=>yS,Icon:()=>US,IconButton:()=>e0,IconText:()=>VS,Iframe:()=>Bw,Img:()=>Nw,Inline:()=>Iw,InlineFlex:()=>$w,InlineGrid:()=>Mw,Input:()=>TS,Italic:()=>uS,KangorooButton:()=>QS,Li:()=>wS,Link:()=>Ym,Notification:()=>g0,NumberInput:()=>OS,Ol:()=>kS,P:()=>iS,Picture:()=>Kw,Radio:()=>IS,RadioHgroup:()=>DS,Range:()=>l0,RouteLink:()=>GS,RouterLink:()=>Xm,SHAPES:()=>kf,Select:()=>YS,Shape:()=>Em,Span:()=>Qw,SquareButton:()=>JS,Strong:()=>cS,Subhead:()=>hS,Svg:()=>Yw,Text:()=>Zw,Textarea:()=>MS,TextareaWithButton:()=>FS,Theme:()=>qw,Title:()=>dS,Toggle:()=>$S,ToggleHgroup:()=>LS,Tooltip:()=>s0,TooltipHidden:()=>i0,TooltipParent:()=>a0,U:()=>lS,Ul:()=>SS,Underline:()=>fS,Video:()=>Xw,depth:()=>vf,focusableRingEnabled:()=>wf,getSystemGlobalTheme:()=>Ea});var wm={};P(wm,{Block:()=>Pw,Flex:()=>Dw,Grid:()=>Lw,Gutter:()=>Fw,Inline:()=>Iw,InlineFlex:()=>$w,InlineGrid:()=>Mw});var Pw={display:"block"},Iw={display:"inline"},Dw={display:"flex"},$w={display:"inline-flex"},Lw={display:"grid"},Mw={display:"inline-grid"},Fw={boxSize:"C1"};var Sm={};P(Sm,{Img:()=>Nw});R();var Nw={tag:"img",attr:{title:t=>t.title||t.alt,alt:t=>t.alt!=null?t.alt:t.title||"",src:t=>{let e=Kt(t);return e&&e.src||t.src},srcset:t=>{let e=Kt(t);return(e?Oi(e):"")||t.srcset}}};var km={};P(km,{Form:()=>jw});var jw={tag:"form"};var vm={};P(vm,{Iframe:()=>Bw});var Bw={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var Cm={};P(Cm,{Clickable:()=>Vw,Focusable:()=>Hw,FocusableComponent:()=>zw,Hoverable:()=>Uw,focusableRingEnabled:()=>wf});var y1={appearance:"none",cursor:"pointer",fontFamily:"inherit"},Uw={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}}},Vw={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}};function wf(t){let e=t.context&&t.context.designSystem;return!e||e.focusableRing!==!1}var Hw={border:"none",outline:t=>wf(t)?"solid 0 blue.3":"none",":focus-visible":{opacity:1,outline:t=>wf(t)?"solid X blue.3":"none"},attr:{tabIndex:t=>t.tabIndex}},zw={extends:"Focusable",tag:"button",fontSize:"A",type:"button",border:"none",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",fontFamily:"inherit",style:y1};var Om={};P(Om,{Picture:()=>Kw});var Tm={};P(Tm,{Theme:()=>qw,getSystemGlobalTheme:()=>Ea});var Am={};P(Am,{Circle:()=>Ww,SHAPES:()=>kf,Shape:()=>Em,default:()=>b1,depth:()=>vf});R();var xe=C(),vf={4:{boxShadow:`rgba(0,0,0,.10) 0 2${xe.unit.default} 4${xe.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${xe.unit.default} 6${xe.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${xe.unit.default} 10${xe.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${xe.unit.default} 16${xe.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${xe.unit.default} 26${xe.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${xe.unit.default} 42${xe.unit.default}`}},jn=t=>et(t.shapeDirectionColor)||et(t.borderColor)||et(t.backgroundColor)||et(t.background),Sf=t=>{let e=ya.transition(t.transition,t);return e&&e.transition},kf={rectangle:{},circle:{borderRadius:"100%"},bubble:{},tv:{borderRadius:"1.15em/2.5em"},tooltip:t=>({position:t.position||"relative","&:before":{content:'""',display:"block",width:"0px",height:"0px",border:".35em solid",borderColor:jn(t),transition:Sf(t),transitionProperty:"border-color",position:"absolute",borderRadius:".15em"}}),tooltipDirection:{top:{"&:before":{top:"0",left:"50%",transform:"translate(-50%, -50%) rotate(45deg)"}},right:{"&:before":{top:"50%",right:"0",transform:"translate(50%, -50%) rotate(45deg)"}},bottom:{"&:before":{bottom:"0",left:"50%",transform:"translate(-50%, 50%) rotate(45deg)"}},left:{"&:before":{top:"50%",left:"0",transform:"translate(-50%, -50%) rotate(45deg)"}}},tag:t=>({position:"relative","&:before":{content:'""',display:"block",background:jn(t),transition:Sf(t),transitionProperty:"background",borderRadius:".25em",position:"absolute",zIndex:"-1",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",height:"73%"}}),tagDirection:{top:{"&:before":{bottom:"100%",left:"50%",transform:"translate(-50%, 50%) rotate(45deg)"}},right:{"&:before":{top:"50%",left:"100%",transform:"translate(-50%, -50%) rotate(45deg)"}},bottom:{"&:before":{top:"100%",left:"50%",transform:"translate(-50%, -50%) rotate(45deg)"}},left:{"&:before":{top:"50%",right:"100%",transform:"translate(50%, -50%) rotate(45deg)"}}},hexagon:t=>({position:"relative","&:before, &:after":{content:'""',display:"block",position:"absolute",zIndex:"-1",borderRadius:".25em",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",height:"73%",background:jn(t),transition:Sf(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:Sf(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${jn(t)} 25%, transparent 25%), linear-gradient(315deg, ${jn(t)} 25%, transparent 25%)`},"&:after":{background:jn(t),borderRadius:".25em"}}),chevronDirection:{left:{"&:before":{height:"100%",left:"100%",transform:"translate3d(-1%, -50%, 1px) scale(-1, 1)"},"&:after":{height:"73%",left:"0",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}},right:{"&:before":{height:"100%",left:"0",transform:"translate3d(-99%, -50%, 1px)"},"&:after":{height:"73%",left:"100%",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}}}},Em={deps:{exec:ft,getSpacingBasedOnRatio:Ae,getMediaColor:It},classlist:{shape:t=>t.deps.exec(kf[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=kf[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}}},Ww={round:"100%"},b1=Em;R();var Ea=({context:t,state:e})=>{let r=e&&e.root,o=r&&r.globalTheme||t.designSystem&&t.designSystem.globalTheme;return o==="auto"?null:o},qw={deps:{depth:vf},classlist:{depth:t=>!Tt(t.depth)&&t.deps.depth[t.depth]}};var Kw={deps:{getSystemGlobalTheme:Ea},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:Ea},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 Rm={};P(Rm,{AssetPicture:()=>Gw});R();var Gw={tag:"picture",children:t=>{let e=Kt(t);if(e)return Ri(e,t.alt)}};var Pm={};P(Pm,{Svg:()=>Yw});var Yw={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 Im={};P(Im,{Video:()=>Xw});R();var Xw={tag:"video",controls:!0,attr:{src:t=>{let e=Kt(t);return e&&e.src||t.src}},children:t=>{let e=Kt(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(r=>({tag:"source",attr:{src:r.src,type:r.format}}))},childExtends:{tag:"source"}};var Dm={};P(Dm,{Audio:()=>Jw});R();var Jw={tag:"audio",controls:!0,attr:{src:t=>{let e=Kt(t);return e&&e.src||t.src}},children:t=>{let e=Kt(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(r=>({tag:"source",attr:{src:r.src,type:r.format}}))},childExtends:{tag:"source"}};var $m={};P($m,{B:()=>mS,Caption:()=>aS,Data:()=>bS,Footnote:()=>gS,H1:()=>tS,H2:()=>eS,H3:()=>rS,H4:()=>oS,H5:()=>nS,H6:()=>sS,Headline:()=>pS,I:()=>yS,Italic:()=>uS,P:()=>iS,Span:()=>Qw,Strong:()=>cS,Subhead:()=>hS,Text:()=>Zw,Title:()=>dS,U:()=>lS,Underline:()=>fS});var Zw={},Qw={tag:"span"},tS={tag:"h1"},eS={tag:"h2"},rS={tag:"h3"},oS={tag:"h4"},nS={tag:"h5"},sS={tag:"h6"},iS={tag:"p"},aS={tag:"caption"},cS={tag:"strong",fontWeight:"700"},lS={tag:"u"},fS={tag:"u"},uS={tag:"i"},dS={},pS={tag:"h6",fontSize:"B",fontWeight:500},hS={tag:"span",fontSize:"Z1"},gS={tag:"span",fontSize:"Z"},mS={tag:"b"},yS={tag:"i"},bS={tag:"data"};var Lm={};P(Lm,{Box:()=>Cf,Br:()=>xS,Hr:()=>_S,Li:()=>wS,Ol:()=>kS,Ul:()=>SS});var _1=t=>{if(!t.context)return;let{props:e,__ref:r}=t,o=se(e,t,{unpack:!1});r.__class=o},Cf={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:_1},_S={tag:"hr",margin:"C1 0"},xS={tag:"br"},wS={tag:"li"},SS={tag:"ul",childExtends:{extends:"Li"}},kS={tag:"ol",childExtends:{extends:"Li"}};var Mm={};P(Mm,{Hgroup:()=>CS,HgroupButton:()=>AS,HgroupRows:()=>ES});var vS=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},CS={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:vS,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:vS,margin:"0",color:"paragraph"}},ES={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},AS={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var Fm={};P(Fm,{Input:()=>TS});var TS={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 Nm={};P(Nm,{NumberInput:()=>OS});var OS={extends:["Flex","Input"],type:"number",boxSize:"C+X",align:"center center",textAlign:"center",round:"Y1",theme:"transparent",border:"solid gray3",borderWidth:"1px",placeholder:"0",fontWeight:"400","::-webkit-inner-spin-button":{appearance:"none"},attr:{step:t=>t.step,min:t=>t.min,max:t=>t.max}};var jm={};P(jm,{Checkbox:()=>RS,CheckboxHgroup:()=>PS});var RS={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"}}},PS={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var Bm={};P(Bm,{Radio:()=>IS,RadioHgroup:()=>DS});var IS={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}},DS={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var Um={};P(Um,{Toggle:()=>$S,ToggleHgroup:()=>LS});var $S={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}},LS={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var Vm={};P(Vm,{Textarea:()=>MS,TextareaWithButton:()=>FS});var MS={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"}},FS={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 Hm={};P(Hm,{FileIcon:()=>HS,Icon:()=>US,IconText:()=>VS});var NS=new Set,jS=(t,e)=>{if(!NS.has(t)&&(NS.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.`)}},BS=new WeakMap,x1=t=>{let e=BS.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},BS.set(t,e)),e},w1=(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},S1=(t,e,r)=>{let o=r&&r.context&&r.context.document||(typeof document<"u"?document:null);it(t);try{let n=C();n&&!n.__svgCache&&(n.__svgCache={}),t.__svgCache||(t.__svgCache={});let s={};for(let i in e){let a=mo(e[i],i);a&&(t.icons[i]=a,s[i]=a)}return t.useIconSprite&&o&&Object.keys(s).length&&yo(s,{document:o}),Object.keys(s).length>0}finally{tt()}},k1=(t,e,r,o,n)=>{let s=t&&t.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=x1(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=w1(f,r);return u?S1(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},US={extends:"Svg",width:"A",height:"A",display:"inline-block",style:{fill:"currentColor","*":{fill:"currentColor"}},onInit:(t,e,r)=>{let{parent:o}=t,{icons:n,useIconSprite:s,verbose:i}=r&&r.designSystem,{toCamelCase:a}=r&&r.utils,c=g=>{let p=g[".isActive"];if(p)return g.call("exec",p.name||p.icon)},l=(g,p,m)=>{let{semanticIcons:b}=m&&m.designSystem,{toCamelCase:_}=m&&m.utils,y=f(g,p),k=_(y).split(/([a-z])([A-Z])/g),E=k[1]?k[0]:y.split(".")[0].split(" ")[0],T=b&&b[E];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,b=g.call("exec",g.name||g.icon||m,g);return g.call("isString",b)&&b.includes("{{")&&(b=g.call("replaceLiteralsWithObjectFields",b)),g.call("isString",b)?b:m},u=t.src,d,h=()=>{let g=f(t,e),p=g;if(g.includes(" ")){let I=g.split(" ");g=I[0]+I.slice(1).map(z=>z.charAt(0).toUpperCase()+z.slice(1)).join("")}let m=a(g),b=m.split(/([a-z])([A-Z])/g),_=l(t,e,r);if(_){Object.assign(t,_);return}let y;t.isActive&&(y=c(t));let x=o[".isActive"];o&&o.isActive&&x&&x.icon&&(y=t.call("exec",x.icon||x.Icon.name||x.Icon.icon,t)),t.call("isString",y)&&y.includes("{{")&&(y=t.call("replaceLiteralsWithObjectFields",y));let k;n[y]&&(k=y),n[m]?k=m:n[b[0]+b[1]]?k=b[0]+b[1]:n[b[0]]?k=b[0]:i&&t.warn("Can't find icon:",g,k);let E=n[k],T=o&&o.src||u;!E&&!T&&(k1(r,p,m,t,z=>{if(!(d&&d._disposed)){if(!z)return jS(p,t);h()}})||jS(p,t));let $=s&&k,D=E||T||n.noIcon;if(!(t.spriteId===$&&t.src===D&&t.node&&t.node.innerHTML)&&(t.spriteId=$,t.src=D,typeof t.html=="function"&&t.node)){let I=t.context&&t.context.designSystem;I&&it(I);try{let z=t.html(t,t.state,t.context);z!=null&&typeof z!="function"&&(t.node.innerHTML=z)}finally{I&&tt()}}};d=Z(h,{depth:t.__ref&&t.__ref.path&&t.__ref.path.length||0}),t.__ref&&(t.__ref.__effects||(t.__ref.__effects=[]),t.__ref.__effects.push(d))},attr:{viewBox:"0 0 24 24","aria-hidden":t=>t.ariaLabel||t.role==="img"?null:"true",focusable:"false"}},VS={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},HS={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var Jm={};P(Jm,{A:()=>KS,Link:()=>Ym,RouteLink:()=>GS,RouterLink:()=>Xm});var Aa={};P(Aa,{default:()=>T1,getActiveRoute:()=>Gm,lastLevel:()=>Af,lastPathname:()=>Ef,matchRoute:()=>Wm,parseQuery:()=>qm,parseRoutePattern:()=>zm,router:()=>qe,runGuards:()=>Km});R();var WS=/^:(.+)/,qS=/^\*$/,zS=new Map,zm=t=>{let e=zS.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(WS);a?o.push({index:i,name:a[1]}):qS.test(r[i])&&(n=!0)}let s={segments:r,params:o,hasWildcard:n,pattern:t};return zS.set(t,s),s},Wm=(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=zm(l),u=v1(n,f);u>a&&(a=u,i=l,c=C1(n,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},v1=(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(WS.test(r[i]))n+=1;else if(qS.test(r[i]))n+=.5;else return-1;return n},C1=(t,e)=>{let r={};for(let{index:o,name:n}of e.params)t[o]&&(r[n]=decodeURIComponent(t[o]));return r},qm=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},Km=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},Gm=(t=0,e)=>{e||(e=typeof v<"u"?v.location.pathname:"/");let o=e.split("/")[t+1];if(o)return`/${o}`},Ef,Af=0,E1=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,A1={level:Af,pushState:!0,initialRender:!1,scrollToTop:!0,scrollToNode:!1,get scrollNode(){return typeof Q<"u"&&(Q.scrollingElement||Q.documentElement)||null},scrollBody:!1,useFragment:!1,updateState:!0,scrollToOffset:0,contentElementKey:"content",scrollToOptions:{behavior:"smooth"},useParamsMatching:!0},qe=async(t,e,r={},o={})=>{let n=e||void 0,s=n?.context?.window||v,i=n?.context?.document||Q,a={...A1,...n.context.routerOptions,...o};Af=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=E1(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=qm(g),b=n.node,_=p&&p!==s.location.hash.slice(1),y=h!==Ef;Ef=h;let x=c.__routerRendered,k,E,T,$;if(a.useParamsMatching){let V=Wm(h,n.routes,a.level);k=V.key,E=V.routePath,T=V.content,$=V.params}else{k=Gm(a.level,h),E=k;let V=n.routes;T=V?V[k||"/"]||V["/*"]:null,$={}}let D=a.scrollToNode?b: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 V={pathname:h,route:k,params:$,query:m,hash:p,element:n,state:r},rt=await Km(a.guards,V);if(rt===!1)return;if(typeof rt=="string")return qe(rt,e,r,{...o,guards:[]})}if(a.pushState)try{s.history.pushState(r,null,h+(g||"")+(p||""))}catch{}if(y||!_){let V={route:k,routePath:E,hash:p,debugging:!1};Object.keys($).length&&(V.params=$),Object.keys(m).length&&(V.query=m),a.updateState&&n.state.update(V,{preventContentUpdate:!0})}let I=!x||x.content!==T||x.route!==k;if(y||I||a.force===!0){l&&a.removeOldElement&&n[l].remove();let V=n.__ref?.origin?.content,rt={};if(V)for(let G in V){let K=V[G];G==="__ref"||G==="props"||G==="node"||G==="parent"||G==="key"||(typeof K=="string"||typeof K=="number"||typeof K=="boolean"||typeof K=="object"&&K!==null&&!K.node&&!K.__ref)&&(rt[G]=K)}let at={...rt,...typeof T=="object"?T:{extends:T}};a.useFragment&&(at.tag="fragment");try{if(typeof n?.set!="function")return;n.set(at,{contentElementKey:l}),c.__routerRendered={content:T,route:k}}catch(G){console.error("[smbls/router] failed to render route content",h,G)}}if(a.scrollToTop&&D?.scrollTo&&D.scrollTo({...a.scrollToOptions||{},top:0,left:0}),a.scrollToNode&&T[l]?.node?.scrollTo&&T[l].node.scrollTo({...a.scrollToOptions||{},top:0,left:0}),p){let V=i.getElementById(p);if(V&&D?.scrollTo){let rt=V.getBoundingClientRect().top+b.scrollTop-(a.scrollToOffset||0);D.scrollTo({...a.scrollToOptions||{},top:rt,left:0})}}xr("routeChanged",n,a)},T1=qe;var O1=(t,e,r)=>{let{context:o}=e,{href:n,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",n,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=o,d=e.__ref.root,h=a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")||a.startsWith("sketch:")||a.startsWith("whatsapp:")||a.startsWith("sms:")||a.startsWith("skype:")||a.startsWith("viber:")||a.startsWith("callto:")||a.startsWith("facetime:")||a.startsWith("facetime-audio:")||a.startsWith("geo:")||a.startsWith("maps:");if(a&&!h){t.preventDefault();try{let g=d;if(u&&u.customRouterElement){let p=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let b of p){if(!m||!m[b]){m=null;break}m=m[b]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||qe)(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=>$r(t,t.href)||$r(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:O1},KS={extends:"Link"},Xm={onClick:(t,e,r)=>{let{context:o}=e,{href:n,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",n,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=o,d=e.__ref.root,h=a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")||a.startsWith("sketch:")||a.startsWith("whatsapp:")||a.startsWith("sms:")||a.startsWith("skype:")||a.startsWith("viber:")||a.startsWith("callto:")||a.startsWith("facetime:")||a.startsWith("facetime-audio:")||a.startsWith("geo:")||a.startsWith("maps:");if(a&&!h){t.preventDefault();try{let g=d;if(u&&u.customRouterElement){let p=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let b of p){if(!m||!m[b]){m=null;break}m=m[b]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||qe)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}}},GS={extends:[Ym,Xm]};var Zm={};P(Zm,{Select:()=>YS});var YS={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 Qm={};P(Qm,{Button:()=>XS,ButtonSet:()=>t0,CircleButton:()=>ZS,IconButton:()=>e0,KangorooButton:()=>QS,SquareButton:()=>JS});var XS={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)},JS={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"},ZS={extends:"SquareButton",round:"C"},QS={extends:"Button",childExtends:"IconText"},t0={tag:"nav",display:"flex",childExtends:"SquareButton"},e0={extends:["SquareButton","ClickableItem"],round:"Z"};var ty={};P(ty,{Dialog:()=>r0,DialogFooter:()=>n0,DialogHeader:()=>o0});var r0={display:"flex",tag:"dialog",flow:"column",border:"0",theme:"dialog",round:"Z2"},o0={extends:"Hgroup",minWidth:"100%",gap:"A",Title:{align:"center space-between",Text:{text:"Title"},SquareButton:{icon:"x",theme:"transparent"}},Paragraph:{color:"caption"}},n0={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 ey={};P(ey,{Tooltip:()=>s0,TooltipHidden:()=>i0,TooltipParent:()=>a0});R();var s0={display:"flex",theme:"dialog",background:"black",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>bt(t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"gray12",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"gray6",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},i0={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)}},a0={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 ry={};P(ry,{Avatar:()=>c0});var R1=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)},c0={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=R1(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 oy={};P(oy,{Range:()=>l0});var l0={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:cn("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:cn("#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 ny={};P(ny,{Dropdown:()=>f0,DropdownList:()=>u0,DropdownParent:()=>d0,DropdownParentFocus:()=>p0,DropdownSiblingFocus:()=>h0});var f0={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"},u0={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"}}},d0={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},p0={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()}}},h0={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 sy={};P(sy,{Notification:()=>g0});var g0={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 wo=Object.assign({},wm,Sm,km,vm,Cm,Om,Rm,Pm,Am,Im,Dm,Tm,$m,Lm,Mm,Fm,Nm,jm,Bm,Um,Vm,Hm,Jm,Zm,Qm,ty,ey,ry,oy,ny,sy);function Tf(t){if(t==null)return 0;if(typeof t!="object")return m0(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let o=0;o<t.length;o++)e=(e^Tf(t[o]))*16777619;return e>>>0}let r=Object.keys(t).sort();for(let o=0;o<r.length;o++)e=(e^m0(r[o]))*16777619,e=(e^Tf(t[r[o]]))*16777619;return e>>>0}function m0(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e}function Of(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(!Of(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)||!Of(t[s],e[s]))return!1}return!0}function iy(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=iy(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 ay(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])?ay(t[o],n,r):t[o]=n}return t}function jr(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 Un(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Ta(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():jr(e)}function y0(t){return t.split(`
83
- `).map(jr).join(`
84
- `)}var b0={display:"d",position:"pos",padding:"p",paddingTop:"pt",paddingRight:"pr",paddingBottom:"pb",paddingLeft:"pl",paddingBlock:"pbl",paddingInline:"pin",margin:"m",marginTop:"mt",marginRight:"mr",marginBottom:"mb",marginLeft:"ml",marginBlock:"mbl",marginInline:"min",width:"w",height:"h",minWidth:"mnw",minHeight:"mnh",maxWidth:"mxw",maxHeight:"mxh",top:"t",right:"r",bottom:"b",left:"l",flex:"fx",flexDirection:"fxd",flexWrap:"fxw",flexGrow:"fxg",flexShrink:"fxs",flexBasis:"fxb",justifyContent:"jc",alignItems:"ai",alignSelf:"as",alignContent:"ac",gap:"g",rowGap:"rg",columnGap:"cg",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",gridColumn:"gc",gridRow:"gr",overflow:"of",overflowX:"ofx",overflowY:"ofy",fontSize:"fs",fontWeight:"fw",fontFamily:"ff",fontStyle:"fst",lineHeight:"lh",letterSpacing:"ls",textAlign:"ta",textDecoration:"td",textTransform:"tt",color:"c",background:"bg",backgroundColor:"bgc",backgroundImage:"bgi",border:"bd",borderRadius:"br",borderColor:"bdc",borderWidth:"bdw",borderStyle:"bds",boxShadow:"bxsh",opacity:"op",zIndex:"z",cursor:"cur",transition:"tr",transform:"tf",animation:"an",visibility:"vis",whiteSpace:"ws",wordBreak:"wb",objectFit:"obj",pointerEvents:"pe",userSelect:"us",boxSizing:"bxz",outline:"ol",listStyle:"lis",textOverflow:"txo",verticalAlign:"va",float:"fl",clear:"cl",content:"cnt",backdropFilter:"bdf",filter:"flt",resize:"rsz",appearance:"apr",fill:"fil",stroke:"stk",scrollBehavior:"sb",inset:"ins"};function _0(t,e){let r=b0[t]||jr(t),o=Ta(e),n=`_${r}-${o}`,s=Un(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"},L1="@media (hover: hover)",M1=/(?:^|[^\\]):hover(?![\w-])/,x0=t=>typeof t=="string"&&(t.indexOf("{")!==-1||t.indexOf("}")!==-1);function w0(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||x0(i))continue;let a=b0[s]||jr(s),c=Ta(i),l=`_${a}-${c}`,f=Un(s);r.push(l),o.push(`.${l}{${f}:${i}}`)}return r.join(" ")+"\0"+o.join(`
86
- `)}function S0(t,e,r){let o=t+e,n=`_c${jr(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&&(x0(u)||(i+=`${Un(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&&M1.test(c)&&(a=`${L1}{${a}}`),`${n}
87
- ${a}`}var cy=null;function Pf(t){cy=t}var Re={structuralHash:Tf,deepEqual:Of,mergeStructural:iy,overwriteDeep:ay,shortHash:jr,toKebab:Un,sanitizeValue:Ta,batchShortHash:y0,atomicCssClass:_0,batchAtomicCss:w0,compoundCssClass:S0},k0=!1,Rf=null;function v0(t){return Rf||(Rf=import(t||"@symbo.ls/wasm/pkg").then(e=>(e.structuralHash&&(Re.structuralHash=e.structuralHash),e.deepEqual&&(Re.deepEqual=e.deepEqual),e.mergeStructural&&(Re.mergeStructural=e.mergeStructural),e.overwriteDeep&&(Re.overwriteDeep=e.overwriteDeep),e.shortHash&&(Re.shortHash=e.shortHash),e.toKebab&&(Re.toKebab=e.toKebab),e.sanitizeValue&&(Re.sanitizeValue=e.sanitizeValue),e.batchShortHash&&(Re.batchShortHash=e.batchShortHash),e.atomicCssClass&&(Re.atomicCssClass=e.atomicCssClass),e.batchAtomicCss&&(Re.batchAtomicCss=e.batchAtomicCss),e.compoundCssClass&&(Re.compoundCssClass=e.compoundCssClass),k0=!0,cy&&e.batchAtomicCss&&cy({batchAtomicCss:e.batchAtomicCss,compoundCssClass:e.compoundCssClass}),!0)).catch(e=>(console.debug("[smbls] WASM not available, using JS fallbacks:",e.message),!1)),Rf)}function C0(){return k0}R();var Oa={};P(Oa,{CDN_PROVIDERS:()=>fe,DOMQL_EVENTS:()=>Pd,DOMQ_PROPERTIES:()=>mr,ENV:()=>Kd,HTML_TAGS:()=>Ko,METHODS:()=>Vo,METHODS_EXL:()=>As,NODE_ENV:()=>ke,OPTIONS:()=>Xs,PACKAGE_MANAGER_TO_CDN:()=>vr,PARSED_DOMQ_PROPERTIES:()=>Es,PROPS_METHODS:()=>yr,STATE_METHODS:()=>Qr,STATE_PROPERTIES:()=>Rd,SVG_TAGS:()=>Kb,TYPES:()=>_s,UNIVERSAL_RESERVED_KEYS:()=>ul,addCaching:()=>Kc,addContext:()=>qc,addExtend:()=>bp,addExtends:()=>qt,addItemAfterEveryElement:()=>yd,addProtoToArray:()=>Ss,addRef:()=>Hc,applyCSS:()=>fy,applyDependentState:()=>Fp,applyEvent:()=>Qc,applyEventUpdate:()=>tl,applyExtends:()=>Xb,applyProps:()=>zs,arrayContainsOtherArray:()=>fd,arraysEqual:()=>_d,arrayzeValue:()=>ao,buildImgSrcset:()=>Oi,buildSourcesAndImg:()=>Ri,cache:()=>Vp,call:()=>sh,captureSnapshot:()=>ah,checkForStateTypes:()=>Dp,checkIfInherits:()=>Zc,checkIfStringIsInArray:()=>Sd,clone:()=>Dd,cloneAndMergeArrayExtend:()=>Ms,cloneFunction:()=>rp,concatAddExtends:()=>gp,copyJavaScriptToClipboard:()=>Ah,copyStringToClipboard:()=>Eh,createBasedOnType:()=>Vc,createElement:()=>Ip,createElementExtends:()=>Rc,createExtends:()=>Ns,createExtendsFromKeys:()=>Go,createExtendsStack:()=>$c,createIfConditionFlag:()=>op,createInheritedState:()=>$p,createKey:()=>$s,createNestedObject:()=>Bd,createNestedObjectByKeyPath:()=>Mp,createObjectWithoutPrototype:()=>kc,createParent:()=>zc,createPath:()=>Wc,createProps:()=>Ws,createPropsStack:()=>Bc,createRoot:()=>Pp,createScope:()=>jp,createSnapshotId:()=>Ds,customDecodeURIComponent:()=>Od,customEncodeURIComponent:()=>Td,cutArrayAfterValue:()=>gd,cutArrayBeforeValue:()=>hd,debounce:()=>Ls,debounceOnContext:()=>Qd,decodeNewlines:()=>Ad,deepClone:()=>dt,deepContains:()=>Nd,deepDefaults:()=>ki,deepDestringifyFunctions:()=>ce,deepExtend:()=>Oc,deepMerge:()=>st,deepMergeExtends:()=>Ne,deepStringifyFunctions:()=>Ts,defineSetter:()=>oh,destringifyGlobalScope:()=>Rs,detectHeightOnInit:()=>dh,detectInfiniteLoop:()=>zd,document:()=>Q,encodeNewlines:()=>Ed,error:()=>so,excludeKeysFromObject:()=>qd,exec:()=>ft,extendCachedRegistry:()=>mp,extendStackRegistry:()=>js,extractArrayExtend:()=>Us,fetchLibraryData:()=>ml,fibonacciNumberByIndex:()=>ph,filterArrays:()=>xd,filterArraysFast:()=>wd,finalizeExtends:()=>Lc,findClosestNumber:()=>gl,findClosestNumberInFactory:()=>kh,findInheritedState:()=>Jc,findKeyPosition:()=>vd,flattenExtend:()=>Yo,formatDate:()=>uh,generateHash:()=>Ec,generateHeadArrayTags:()=>hl,generateKey:()=>Is,generateMetaTags:()=>wh,get:()=>th,getActiveRoute:()=>Gm,getCDNDirUrl:()=>dl,getCDNUrl:()=>Ce,getCapitalCaseKeys:()=>wp,getCdnProviderFromConfig:()=>tn,getChildStateInKey:()=>Xc,getChildren:()=>ai,getContext:()=>hi,getCookie:()=>cp,getDB:()=>_i,getEmotionStylesheet:()=>Ph,getExtendsInElement:()=>_p,getExtendsStack:()=>Fs,getExtendsStackRegistry:()=>Tc,getFrequencyInArray:()=>ud,getHashedExtend:()=>Bs,getImportMapScript:()=>fh,getInObjectByPath:()=>Hd,getLocalStorage:()=>fp,getNev:()=>Jd,getPageMetadata:()=>Sh,getParentStateInKey:()=>Yc,getPath:()=>ci,getQuery:()=>xi,getRef:()=>rh,getRoot:()=>ui,getRootContext:()=>pi,getRootData:()=>di,getRootState:()=>fi,getRootStateInKey:()=>Gc,getSpreadChildren:()=>Sp,global:()=>ad,hasFunction:()=>Fe,hasHandlerPlugin:()=>zo,hasOwnProperty:()=>Ld,hashContent:()=>on,inheritChildExtends:()=>Ic,inheritChildPropsExtends:()=>Pc,inheritParentProps:()=>qs,inheritRecursiveChildExtends:()=>Dc,init:()=>cr,initProps:()=>Tp,is:()=>zt,isArray:()=>O,isBoolean:()=>bc,isContextComponent:()=>kp,isCyclic:()=>Wd,isDOMNode:()=>Ht,isDate:()=>xc,isDefined:()=>bt,isDevelopment:()=>_r,isEmpty:()=>wc,isEmptyObject:()=>Md,isEqualDeep:()=>Sc,isFunction:()=>A,isHtmlElement:()=>ys,isLocal:()=>Xd,isLoudDevRuntime:()=>Pt,isMalformedDependency:()=>en,isMethod:()=>ih,isMobile:()=>ip,isNode:()=>Je,isNot:()=>ld,isNotProduction:()=>ro,isNull:()=>_c,isNumber:()=>Me,isObject:()=>S,isObjectLike:()=>H,isPhoto:()=>hh,isProduction:()=>br,isStaging:()=>Yd,isState:()=>Lp,isString:()=>w,isStringFunction:()=>ep,isTest:()=>Cc,isTesting:()=>Gd,isUndefined:()=>Tt,isUniversallyReservedKey:()=>ch,isUnresolvableDependency:()=>io,isValidHtmlTag:()=>dp,isWrappedLibrary:()=>Ci,joinArrays:()=>jo,jointStacks:()=>yp,keys:()=>ll,lastLevel:()=>Af,lastPathname:()=>Ef,loadCssFile:()=>bh,loadJavascript:()=>_h,loadJavascriptFile:()=>gh,loadJavascriptFileEmbedSync:()=>yh,loadJavascriptFileSync:()=>mh,loadRemoteCSS:()=>xh,loadRemoteScript:()=>rn,log:()=>nh,logGroupIf:()=>sp,logIf:()=>np,lookdown:()=>Zp,lookdownAll:()=>Qp,lookup:()=>Jp,lowercaseFirstLetter:()=>Zr,makeObjectWithoutPrototype:()=>Fd,map:()=>Id,mapStringsWithContextComponents:()=>Vs,matchRoute:()=>Wm,matchesComponentNaming:()=>je,memoize:()=>tp,merge:()=>gt,mergeSharedLibraries:()=>Ei,nextElement:()=>mi,normalizeIgnoreList:()=>vi,normalizeLibraryKey:()=>nn,objectToString:()=>Os,objectizeStringProperty:()=>Hs,overwrite:()=>Ps,overwriteDeep:()=>Wt,overwriteShallow:()=>eo,overwriteState:()=>Np,parse:()=>fl,parseDeep:()=>si,parseQuery:()=>qm,parseRoutePattern:()=>zm,pickupElementFromProps:()=>Nc,pickupPropsFromElement:()=>Fc,previousElement:()=>yi,propExists:()=>Ep,propertizeElement:()=>jc,propertizeUpdate:()=>Cp,reinit:()=>ly,remove:()=>S_,removeChars:()=>Th,removeCookie:()=>lp,removeDuplicateProps:()=>Gs,removeDuplicatesInArray:()=>Bo,removeFromArray:()=>dd,removeFromObject:()=>jd,removeNestedKeyByPath:()=>Ud,removeValueFromArray:()=>ws,removeValueFromArrayAll:()=>md,reorderArrayByValues:()=>bd,replaceLiteralsWithObjectFields:()=>Jr,replaceOctalEscapeSequences:()=>Cd,resolveAsset:()=>Kt,resolveHandler:()=>Wo,resolveSharedLibraries:()=>Ch,returnValueAsText:()=>Uc,router:()=>qe,runGuards:()=>Km,runPluginHook:()=>At,scratchSystem:()=>_n,scratchUtils:()=>Ar,self:()=>cd,set:()=>bo,setActiveRootState:()=>li,setCookie:()=>ap,setHashedExtend:()=>Ac,setInObjectByPath:()=>Vd,setLocalStorage:()=>up,setNodeStyles:()=>cl,setProps:()=>eh,setPropsPrototype:()=>Ks,sharedLibrary:()=>vh,splitPackageSpecifier:()=>wi,spotByPath:()=>ii,srcsetFor:()=>sn,stringIncludesAny:()=>vs,stringToObject:()=>$d,stripVersionRangePrefix:()=>Si,swapItemsInArray:()=>pd,syncProps:()=>Ys,toCamelCase:()=>Ai,toDashCase:()=>Ti,toDescriptionCase:()=>Rh,toTitleCase:()=>Oh,toggleFullscreen:()=>lh,triggerEventOn:()=>xr,triggerEventOnUpdate:()=>Bp,trimStringFromSymbols:()=>kd,unstackArrayOfObjects:()=>xs,update:()=>Ap,updateProps:()=>Op,variables:()=>bi,verbose:()=>Jo,warn:()=>gi,window:()=>v});R();R();var N1=C(),E0=(t=N1,e)=>{let r=S(e.localFile)?e.localFile:{},o=dt(r.designSystem||{});return st(t,o)},j1={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},Vn=(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},cr=(t,e=j1)=>{let r=E0(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=bo({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=Li(s.font,s.files),a=s.useReset,c=s.useVariable,l=s.useFontImport,f=s.useSvgSprite,u=t.svg,d=s.useIconSprite,h=t.icons;l&&kt(i),c&&(kt({[o]:s.CSS_VARS}),s.CSS_MEDIA_VARS&&kt(Vn(s.CSS_MEDIA_VARS,o))),a&&kt(s.reset);let g=s.animation;if(g){let p={};for(let m in g)p[`@keyframes ${m}`]=g[m];kt(p)}return(u||f)&&la(s.svg,{document:e.document}),(h||d)&&yo(s.icons,{document:e.document}),s},If={},ly=(t,e=If)=>{let r=E0(t||{},e),o=e.scopeSelector||":root",n=bo({verbose:!1,...r});return e.preventInject||(kt({[o]:n.CSS_VARS}),n.CSS_MEDIA_VARS&&kt(Vn(n.CSS_MEDIA_VARS,o)),kt(n.reset)),n},fy=(t,e=If)=>{kt(t)},B1=(t,e=If)=>{let r=e.scopeSelector||":root";kt({[r]:t.CSS_VARS}),t.CSS_MEDIA_VARS&&kt(Vn(t.CSS_MEDIA_VARS,r))};var U1=(t,e=If)=>{};R();var A0=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,V1=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},uy={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},Ra=(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},T0=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=uy:e.router=gt(e.router||{},uy);let r=e.router,o=async(s,i)=>{let a=s.context?.window||v,c=V1(r);if(!c){if(!a.location)return;let{pathname:f,search:u,hash:d}=a.location;f=A0(f),c=f+u+d}let l=s;if(r.customRouterElement){let f=Ra(s,r.customRouterElement);f&&(l=f,s.routes&&(l.routes=s.routes))}l.routes&&await qe(c,l,{},{initialRender:!0,pushState:!1})},n=!Tt(t.onRenderRouter);return r&&r.initRouter&&!n&&(t.onRenderRouter=o),H1(e,r),r},dy=(t,e)=>{if(e.router===!1)return;let r=e.router||uy;if(!r.popState)return;let o=e.utils&&e.utils.router?e.utils.router:qe,n=e.window||v,s=async i=>{let{pathname:a,search:c,hash:l}=n.location;a=A0(a);let f=a+c+l,u=t;if(r.customRouterElement){let d=Ra(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))},H1=(t,e)=>{let{components:r}=t;if(e&&e.injectRouterInLinkComponent)return st(r.Link||r["smbls.Link"],r.RouterLink||r["smbls.RouterLink"])};R();var py=v&&v.location?v.location.host.includes("dev."):_r(),O0=py?"http://localhost:8080/get":"https://api.symbols.app/get",z1={endpoint:O0},R0=async(t,e=z1)=>{let r=e.endpoint||O0,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)}},W1=async(t,e)=>{let{editor:r}=e;if(r&&r.remote){let o=await R0(t,r),n=py||e.isDevelopment?ce(o):ce(o.releases[0]);r.serviceRoute?O(r.serviceRoute)?r.serviceRoute.forEach(s=>{Wt(e[s],n[s.toLowerCase()])}):Wt(e[r.serviceRoute],n):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{Wt(e[s],n[s.toLowerCase()])})}return e},q1=async(t,e,r)=>{let{editor:o}=e;if(o&&o.remote){let n=await R0(t,o),s=py||e.isDevelopment?ce(n):ce(n.releases[0]);r(s)}},P0=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await W1(t,e)}catch(r){console.error(r)}},I0=(t,e,r,o)=>{if(e&&r.editor)try{r.editor.async&&q1(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 Pa=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{Fr(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 my={};P(my,{Helmet:()=>L0,applyMetadata:()=>Hn,default:()=>Z1,extractMetadata:()=>Y1,generateHeadHtml:()=>J1,helmetPlugin:()=>gy,resolveMetadata:()=>Br});R();var K1={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"}},G1=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}"]`},D0=t=>ce({v:t}).v,$0=(t,e,r,o)=>{try{return ft(t,e,r)}catch(n){console.warn(`[helmet] metadata factory for "${o}" threw; treating as unset:`,n&&n.message||n);return}},Br=(t,e,r)=>{if(!t)return{};let o=t;w(o)&&Fe(o)&&(o=D0(o));let n=A(o)?$0(o,e,r,"metadata"):S(o)?{...o}:{};if(!S(n))return{};for(let s in n){let i=n[s];w(i)&&Fe(i)&&(i=D0(i)),A(i)?i=$0(i,e,r,s):w(i)&&Fe(i)&&(i=void 0),w(i)&&i.includes("{{")&&e?.call&&(i=e.call("replaceLiteralsWithObjectFields",i,r)),n[s]=i}return n},Y1=(t,e="/",r,o)=>{let s=(t.pages||{})[e],i={};if(t.integrations?.seo&&(i={...t.integrations.seo}),t.app?.metadata){let c=Br(t.app.metadata,r,o);i={...i,...c}}let a=new Set;if(s){let c=s.metadata||s.helmet||{},l=Br(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},X1=(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},Ia=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)},hy=(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))}},Hn=(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=K1[r];if(!n)continue;let s=G1(n),i=e.querySelector(s)||X1(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(Ia);hy(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(Ia);hy(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));hy(e,"data-smbls-script",o,n=>{let s=o.indexOf(n),i=r[s],a=e.createElement("script");return w(i)?a.setAttribute("src",i):(i.src&&a.setAttribute("src",i.src),i.type&&a.setAttribute("type",i.type),i.async&&(a.async=!0),i.defer&&(a.defer=!0),i.integrity&&a.setAttribute("integrity",i.integrity),i.crossorigin&&a.setAttribute("crossorigin",i.crossorigin),i.referrerpolicy&&a.setAttribute("referrerpolicy",i.referrerpolicy),i.nomodule&&(a.noModule=!0),i.body&&(a.textContent=String(i.body))),a})}}},ct=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,r=>e[r])},J1=t=>{let e=['<meta charset="UTF-8">'],r=new Set(["charset","jsonLd","styles","scripts"]),o=!1;for(let[n,s]of Object.entries(t)){if(!s&&s!==0&&s!==!1||r.has(n)||typeof s=="function")continue;if(n==="title"){e.push(`<title>${ct(s)}</title>`);continue}if(n==="viewport"){o||(e.push(`<meta name="viewport" content="${ct(s)}">`),o=!0);continue}if(n==="canonical"){e.push(`<link rel="canonical" href="${ct(s)}">`);continue}if(n==="icon"||n==="favicon"){let f=ct(s),u=f.endsWith(".svg")?' type="image/svg+xml"':f.endsWith(".png")?' type="image/png"':"";e.push(`<link rel="icon" href="${f}"${u}>`);continue}if(n==="favicons"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${ct(h)}"`).join(" ");e.push(`<link rel="icon" ${u}>`)}else typeof f=="string"&&e.push(`<link rel="icon" href="${ct(f)}">`)});continue}if(n==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${ct(h)}"`).join(" ");e.push(`<link rel="alternate" ${u}>`)}});continue}let i=["og:","article:","product:","fb:","profile:","book:","business:","music:","video:"],a=["twitter:","DC:","DCTERMS:"],c=i.some(f=>n.startsWith(f)),l=a.some(f=>n.startsWith(f));if(n.startsWith("http-equiv:")){let f=n.replace("http-equiv:","");e.push(`<meta http-equiv="${ct(f)}" content="${ct(s)}">`)}else if(n.startsWith("itemprop:")){let f=n.replace("itemprop:","");e.push(`<meta itemprop="${ct(f)}" content="${ct(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>e.push(`<meta property="${ct(n)}" content="${ct(f)}">`)):e.push(`<meta property="${ct(n)}" content="${ct(s)}">`):l?e.push(`<meta name="${ct(n)}" content="${ct(s)}">`):Array.isArray(s)?s.forEach(f=>e.push(`<meta name="${ct(n)}" content="${ct(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.push(`<meta name="${ct(n)}" content="${ct(s)}">`)}if(o||e.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),Array.isArray(t.jsonLd))for(let n of t.jsonLd){if(n==null)continue;let s=typeof n=="string"?n:JSON.stringify(n),i=String(s).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${Ia(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="${Ia(s)}">${s}</style>`)}if(Array.isArray(t.scripts))for(let n of t.scripts){if(!n)continue;let s=typeof n=="string",i=s?n:n.src;if(!i&&!(n&&n.body))continue;let a=[];i&&a.push(`src="${ct(i)}"`),s||(n.type&&a.push(`type="${ct(n.type)}"`),n.async&&a.push("async"),n.defer&&a.push("defer"),n.integrity&&a.push(`integrity="${ct(n.integrity)}"`),n.crossorigin&&a.push(`crossorigin="${ct(n.crossorigin)}"`),n.referrerpolicy&&a.push(`referrerpolicy="${ct(n.referrerpolicy)}"`),n.nomodule&&a.push("nomodule"));let c=` data-smbls-script="${ct(i||Ia(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
- `)},L0={define:{metadata:(t,e,r)=>{let o=e.context?.document||typeof document<"u"&&document;if(!o)return;let n=Z(()=>{let s=Br(t,e,e.state);Hn(s,o);let i=e.state?.root;S(i)&&(i.$helmet=s)});e.__ref?.__effects&&e.__ref.__effects.push(n)}}},gy={name:"helmet",create(t){if(!t.metadata)return;let e=t.context?.document||typeof document<"u"&&document;if(!e)return;let r=Z(()=>{let o=t.metadata;if(!o)return;let n=Br(o,t,t.state);Hn(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=Br(e,t,t.state);Hn(o,r)}},Z1=L0;Sr();var M0=(t,e,r,o)=>{t&&ni(t,e,r,o)},F0=(t,e,r)=>{if(!t)return;let o=e.context?.document||typeof document<"u"&&document;if(!o)return;let n=Br(t,e,r);Hn(n,o)},N0=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},zn={routes:t=>t,metadata:F0,fetch:M0,$router:N0},j0=(t={})=>{let e={routes:r=>r};return t.metadata!==!1&&(e.metadata=F0),t.fetch!==!1&&(e.fetch=M0),t.router!==!1&&(e.$router=N0),e};var yy={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},Df={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},$f={...yy,router:Df},Q1={state:{},pages:{},components:{},router:Df,define:zn},Ur=Q1;R();R();var B0=(t,e)=>H(t.extends)?t.extends:[];R();var by={};P(by,{default:()=>rO,getActiveLang:()=>qn,getLanguages:()=>$a,getLocalStateLang:()=>ja,initPolyglot:()=>Mf,loadTranslations:()=>Ma,polyglotPlugin:()=>Kn,setLang:()=>Fa,translate:()=>La,upsertTranslation:()=>Na});R();var V0="smbls_lang",tO="smbls_t_",eO="smbls_tv_",Wn={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)}}},Da={};function qn(){let t=this?.context,e=t?.polyglot;return(this?.state?.root||t?.state?.root)?.lang||e?.defaultLang||"en"}function $a(){let t=this?.context?.polyglot;return t?t.languages?t.languages:t.translations?Object.keys(t.translations):[]:[]}var Lf=(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},U0=(t,e,r)=>{let o=e.lastIndexOf(".");if(o===-1)return t[e+"_"+r];let n=Lf(t,e.substring(0,o));if(n!=null)return n[e.substring(o+1)+"_"+r]};function La(t,e){if(!t)return"";let r=this?.context,o=r?.polyglot,n=e||this.call("getActiveLang"),s=this?.state;if(s){let l=U0(s,t,n);if(l!==void 0)return l}if(o?.translations){let l=o.translations[n];if(l){let f=Lf(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=Lf(l,t);if(f!==void 0)return f}}let c=o?.defaultLang||"en";if(s){let l=U0(s,t,c);if(l!==void 0)return l}if(o?.translations){let l=o.translations[c];if(l){let f=Lf(l,t);if(f!==void 0)return f}}return t}async function Ma(t){let e=this?.context,r=e?.polyglot,o=this?.state?.root||e?.state?.root;if(!r||!o)return;let n=r.storagePrefix||tO,s=r.storageVersionPrefix||(r.storagePrefix?r.storagePrefix.replace(/_$/,"v_"):eO);if(r.translations&&r.translations[t]&&!r.fetch||!r.fetch||r._fetchFailed?.[t])return;if(!o.translations?.[t]){let c=Wn.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(Da[i])return Da[i];let a=this;return Da[i]=(async()=>{try{let c=r.fetch,l=parseInt(Wn.get(s+t),10)||0,f,u,d;if(A(c)){let g=await c(t,l,a);if(!g||g.changed===!1)return;f=g.translations||g.data||g,u=g.version||0,d=!0}else if(S(c)){let g=a.getDB||(()=>e.fetch),p=A(g)?await g.call(a):e.fetch;if(!p)return;let m=c.rpc||c.from||"get_translations_if_changed",b={p_lang:t,p_cached_version:l,...c.params||{}},_=await p.rpc({from:m,params:b});if(_.error)throw r._fetchFailed||(r._fetchFailed={}),r._fetchFailed[t]=!0,_.error;let y=_.data;if(!y||!y.changed)return;f=y.translations||{},u=y.version||0,d=!0}else return;if(!d||!f)return;Wn.set(n+t,JSON.stringify(f)),u&&Wn.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 Da[i]}})(),Da[i]}async function Fa(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||V0;Wn.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 Na(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 Mf(){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||V0,s=Wn.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 ja(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 Kn={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,Mf.call(t))}},rO=Kn;Sr();var xy={};P(xy,{SYSTEM_METRICS:()=>Ba,capsizeHandler:()=>_y,capsizePlugin:()=>Nf,computeCapsize:()=>H0,default:()=>oO,resolveFontSizePx:()=>z0,resolveMetrics:()=>W0});var Ba={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}},Ff=t=>parseFloat(t.toFixed(4)),H0=(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:`${Ff(t/16)}rem`,lineHeight:`${Ff(f)}px`,capHeightTrim:`${Ff(-h)}em`,baselineTrim:`${Ff(-g)}em`}},z0=(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},W0=(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(Ba[i])return Ba[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(Ba[a])return Ba[a]}}return null},_y=(t,e,r,o)=>{if(!t)return;let n=z0(e.fontSize,o);if(!n)return;let s=W0(e.fontFamily,o);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=H0(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},Nf={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},oO=Nf;var Ay={};P(Ay,{PRESERVE_VALUE_KEYS:()=>$t,SKIP_INLINE_KEYS:()=>Vr,abbrToProp:()=>Dt,decode:()=>X0,encode:()=>K0,expand:()=>ko,isComponentKey:()=>Pe,isSelectorKey:()=>Ie,parse:()=>vo,parseFurther:()=>Eo,propToAbbr:()=>we,shorten:()=>Ua,shorthandPlugin:()=>Va,stringify:()=>So,stringifyFurther:()=>Co});var we={attr:"at",childExtends:"cex",childExtendsRecursive:"cexr",childProps:"cp",children:"ch",childrenAs:"cha",class:"cl",content:"cnt",context:"ctx",data:"dt",extends:"ext",hide:"hd",html:"htm",if:"if",ignoreChildExtends:"icex",key:"ky",query:"qy",routes:"rt",scope:"scp",show:"shw",state:"st",style:"sy",tag:"tg",text:"tx",align:"aln",boxSize:"bsz",flow:"fl",heightRange:"hr",horizontalInset:"hi",round:"rnd",shadow:"shd",size:"sz",templateColumns:"tcol",verticalInset:"vi",widthRange:"wr",wrap:"wrp",aspectRatio:"ar",blockSize:"bks",boxSizing:"bxs",height:"h",inlineSize:"ins",margin:"m",marginBottom:"mb",marginLeft:"ml",marginRight:"mr",marginTop:"mt",maxBlockSize:"mxbs",maxHeight:"mxh",maxInlineSize:"mxis",maxWidth:"mxw",minBlockSize:"mnbs",minHeight:"mnh",minInlineSize:"mnis",minWidth:"mnw",padding:"p",paddingBottom:"pb",paddingInline:"pil",paddingLeft:"pl",paddingRight:"pr",paddingTop:"pt",width:"w",alignContent:"ac",alignItems:"ai",alignSelf:"as",flex:"fx",flexBasis:"fxb",flexDirection:"fxd",flexFlow:"fxf",flexGrow:"fxg",flexShrink:"fxs",flexWrap:"fxw",gap:"g",justifyContent:"jc",justifyItems:"ji",justifySelf:"js",order:"od",placeContent:"pcn",placeItems:"pit",placeSelf:"psl",rowGap:"rg",columnGap:"cg",gridArea:"ga",gridAutoColumns:"gac",gridAutoFlow:"gaf",gridAutoRows:"gar",gridColumn:"gc",gridColumnEnd:"gce",gridColumnStart:"gcs",gridRow:"gr",gridRowEnd:"gre",gridRowStart:"grs",gridTemplateAreas:"gta",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",bottom:"bot",float:"flt",inset:"ist",left:"lft",position:"pos",right:"rgt",top:"tp",zIndex:"zi",clear:"clr",contain:"ctn",cursor:"cur",display:"d",opacity:"op",overflow:"ov",overflowX:"ovx",overflowY:"ovy",pointerEvents:"pe",resize:"rsz",userSelect:"us",visibility:"vis",background:"bg",backgroundAttachment:"bga",backgroundBlendMode:"bgbm",backgroundClip:"bgcl",backgroundColor:"bgc",backgroundImage:"bgi",backgroundOrigin:"bgo",backgroundPosition:"bgp",backgroundPositionX:"bgpx",backgroundPositionY:"bgpy",backgroundRepeat:"bgr",backgroundRepeatX:"bgrx",backgroundRepeatY:"bgry",backgroundSize:"bgs",color:"c",theme:"thm",themeModifier:"thmm",border:"bd",borderBottom:"bdb",borderBottomLeftRadius:"bdblr",borderBottomRightRadius:"bdbrr",borderCollapse:"bdcl",borderColor:"bdc",borderImage:"bdi",borderImageOutset:"bdio",borderImageRepeat:"bdir",borderImageSlice:"bdis",borderImageSource:"bdisrc",borderImageWidth:"bdiw",borderLeft:"bdl",borderRadius:"bdr",borderRight:"bdrg",borderSpacing:"bdsp",borderStyle:"bdst",borderTop:"bdt",borderTopLeftRadius:"bdtlr",borderTopRightRadius:"bdtrr",borderWidth:"bdw",outline:"ol",outlineColor:"olc",outlineOffset:"olo",outlineStyle:"ols",outlineWidth:"olw",boxShadow:"bxsh",textShadow:"txsh",direction:"dir",fontDisplay:"fdi",fontFamily:"ff",fontFeatureSettings:"ffs",fontKerning:"fk",fontOpticalSizing:"fos",fontPalette:"fpl",fontSize:"fs",fontSizeAdjust:"fsa",fontSmooth:"fsm",fontStretch:"fsr",fontStyle:"fsy",fontSynthesis:"fsyn",fontVariant:"fv",fontVariationSettings:"fvs",fontWeight:"fw",hyphens:"hyp",letterSpacing:"ls",lineHeight:"lh",tabSize:"tsz",textAlign:"ta",textDecoration:"td",textDecorationColor:"tdc",textDecorationLine:"tdl",textDecorationStyle:"tds",textIndent:"ti",textOverflow:"tov",textStroke:"tsk",textTransform:"tt",unicodeBidi:"ub",verticalAlign:"va",whiteSpace:"ws",wordBreak:"wbr",wordSpacing:"wsp",wordWrap:"wwr",writingMode:"wm",captionSide:"cps",counterIncrement:"ci",counterReset:"cr",emptyCells:"ec",listStyle:"lst",listStyleImage:"lsi",listStylePosition:"lsp",listStyleType:"lsty",quotes:"qt",tableLayout:"tl",columnCount:"cc",columnFill:"cf",columnRule:"crl",columnRuleColor:"crlc",columnRuleStyle:"crls",columnRuleWidth:"crlw",columnSpan:"cspn",columnWidth:"cwi",columns:"col",backdropFilter:"bdf",boxDecorationBreak:"bxdb",clipPath:"cpth",filter:"fil",isolation:"iso",mixBlendMode:"mbm",objectFit:"obf",objectPosition:"obp",perspective:"prs",perspectiveOrigin:"prso",willChange:"wc",transform:"tf",transformOrigin:"tfo",transformStyle:"tfs",transition:"trn",transitionDelay:"trnd",transitionDuration:"trndr",transitionProperty:"trnp",transitionTimingFunction:"trntf",animation:"an",animationDelay:"and",animationDirection:"andr",animationDuration:"andur",animationFillMode:"anfm",animationIterationCount:"anic",animationName:"ann",animationPlayState:"anps",animationTimingFunction:"antf",scrollBehavior:"sb",scrollMargin:"smr",scrollMarginBottom:"smrb",scrollMarginLeft:"smrl",scrollMarginRight:"smrr",scrollMarginTop:"smrt",scrollPadding:"spd",scrollPaddingBottom:"spdb",scrollPaddingLeft:"spdl",scrollPaddingRight:"spdr",scrollPaddingTop:"spdt",scrollSnapAlign:"ssa",scrollSnapStop:"sss",scrollSnapType:"sst",breakAfter:"bka",breakBefore:"bkb",breakInside:"bki",pageBreakAfter:"pbka",pageBreakBefore:"pbkb",pageBreakInside:"pbki",accessKey:"ack",className:"cn",contentEditable:"ced",contextMenu:"cmu",draggable:"drg",hidden:"hid",id:"id",is:"is",lang:"lng",nonce:"nnc",spellCheck:"spc",tabIndex:"tbi",title:"ttl",translate:"trl",accept:"acp",acceptCharset:"accs",action:"act",autoComplete:"atc",autoFocus:"atf",capture:"cap",challenge:"chg",checked:"chk",cols:"cls",colSpan:"csn",controls:"ctl",default:"def",defer:"dfr",disabled:"dis",encType:"ect",form:"frm",formAction:"fac",formEncType:"fect",formMethod:"fme",formNoValidate:"fnv",formTarget:"ftg",high:"hgh",inputMode:"imd",kind:"knd",label:"lbl",list:"lis",loop:"lp",low:"lw",max:"mx",maxLength:"mxl",method:"mtd",min:"mn",minLength:"mnl",multiple:"mul",muted:"mut",name:"nm",open:"opn",optimum:"opt",pattern:"ptn",placeholder:"phd",readOnly:"ro",required:"req",reversed:"rev",rows:"rws",rowSpan:"rsn",selected:"sel",span:"spn",start:"srt",step:"stp",type:"typ",value:"val",download:"dl",href:"hrf",hrefLang:"hrl",ping:"png",referrerPolicy:"rfp",rel:"rl",target:"tgt",allow:"alw",allowFullScreen:"afs",allowPaymentRequest:"apr",alt:"alt",cellPadding:"cpg",cellSpacing:"csg",cite:"cit",coords:"crd",crossOrigin:"cor",dateTime:"dtm",fetchPriority:"fpr",headers:"hds",httpEquiv:"hte",integrity:"itg",isMap:"ism",keyType:"kty",loading:"ldg",manifest:"mft",media:"mda",poster:"pst",preload:"prl",radioGroup:"rdg",sandbox:"sbx",scoped:"scod",seamless:"sml",shape:"shp",sizes:"szs",src:"src",srcDoc:"srd",srcLang:"srl",srcSet:"srs",useMap:"ump",ariaActiveDescendant:"aad",ariaAtomic:"aat",ariaBusy:"abu",ariaChecked:"achk",ariaControls:"acl",ariaCurrent:"acr",ariaDescribedBy:"adb",ariaDetails:"adt",ariaDisabled:"adis",ariaDropEffect:"ade",ariaErrorMessage:"aem",ariaExpanded:"aexp",ariaGrabbed:"agr",ariaHasPopup:"ahp",ariaHidden:"ahid",ariaInvalid:"ainv",ariaLabel:"alb",ariaLabelledBy:"alby",ariaLive:"alv",ariaModal:"amod",ariaMultiSelectable:"ams",ariaOrientation:"aor",ariaOwns:"aow",ariaPosInSet:"apis",ariaPressed:"aprs",ariaReadOnly:"aro",ariaRelevant:"arl",ariaRequired:"areq",ariaSelected:"asel",ariaSetSize:"assz",ariaValueMax:"avmx",ariaValueMin:"avmn",ariaValueNow:"avn",role:"role",onInit:"@in",onRender:"@rn",onUpdate:"@up",onStateChange:"@sc",onStateUpdate:"@su",onClick:"@ck",onContextMenu:"@cm",onDblClick:"@dc",onMouseDown:"@md",onMouseEnter:"@me",onMouseLeave:"@ml",onMouseMove:"@mm",onMouseOut:"@mo",onMouseOver:"@mv",onMouseUp:"@mu",onKeyDown:"@kd",onKeyPress:"@kp",onKeyUp:"@ku",onBlur:"@bl",onFocus:"@fc",onFocusIn:"@fi",onFocusOut:"@fo",onBeforeInput:"@bi",onChange:"@cg",onFormData:"@fd",onInput:"@ip",onInvalid:"@iv",onReset:"@rs",onSearch:"@sr",onSelect:"@sl",onSubmit:"@sm",onTouchCancel:"@tc",onTouchEnd:"@te",onTouchMove:"@tm",onTouchStart:"@ts",onPointerCancel:"@pc",onPointerDown:"@pd",onPointerEnter:"@pe",onPointerLeave:"@ple",onPointerMove:"@pm",onPointerOut:"@po",onPointerOver:"@pov",onPointerUp:"@pu",onDrag:"@dg",onDragEnd:"@dge",onDragEnter:"@dgn",onDragLeave:"@dgl",onDragOver:"@dgo",onDragStart:"@dgs",onDrop:"@dp",onResize:"@rz",onScroll:"@scl",onWheel:"@wh",onCopy:"@cy",onCut:"@ct",onPaste:"@pt",onCompositionEnd:"@cpe",onCompositionStart:"@cps",onCompositionUpdate:"@cpu",onAnimationEnd:"@ae",onAnimationIteration:"@ai",onAnimationStart:"@as",onTransitionEnd:"@tre",onTransitionStart:"@trs",onAbort:"@ab",onCanPlay:"@cap",onCanPlayThrough:"@cpt",onDurationChange:"@duc",onEmptied:"@em",onEncrypted:"@enc",onEnded:"@end",onError:"@er",onLoad:"@ld",onLoadedData:"@ldd",onLoadedMetadata:"@ldm",onPause:"@pa",onPlay:"@pl",onPlaying:"@plg",onProgress:"@prg",onRateChange:"@rc",onSeeked:"@sk",onSeeking:"@skg",onStalled:"@stl",onSuspend:"@ssp",onTimeUpdate:"@tu",onVolumeChange:"@vc",onWaiting:"@wt",icon:"ico",iconText:"ict",lookup:"lkp",router:"rtr",shapeModifier:"shpm"},Dt=Object.create(null);for(let t in we)Dt[we[t]]=t;var wy=Object.create(null);for(let t in we){let e=we[t];if(wy[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${wy[e]}"`);wy[e]=t}var $t=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),Vr=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function Pe(t){return/^[A-Z]/.test(t)}function Ie(t){return/^[:@.!$>&]/.test(t)||t.startsWith("> ")}function K0(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=we[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=>jf(i));e.push(n+":"+s.join(","))}else e.push(n+":"+jf(o))}return e.join(" ")}function jf(t){return String(t).replace(/ /g,"_")}function Ua(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Ua(r):r});let e={};for(let r in t){let o=t[r];if(Pe(r)){e[r]=Sy(o);continue}if(Ie(r)){e[r]=Sy(o);continue}let n=we[r]||r;if($t.has(r)||$t.has(n)){e[n]=o;continue}e[n]=Sy(o)}return e}function Sy(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Ua(e):e}):typeof t=="object"?Ua(t):t}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(Pe(o)){e[o]=q0(n);continue}if(Ie(o)){e[o]=q0(n);continue}let s=we[o]||o;if($t.has(o)||$t.has(s)){e[s]=n;continue}if(typeof n=="function"){e[s]=n;continue}if(n==null){e[s]=n;continue}if(Vr.has(o)||Vr.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(jf).join(","));continue}if(typeof n=="object"){e[s]=So(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+":"+jf(n))}return r.length&&(e.in=r.join(" ")),e}function q0(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 X0(t){if(!t||typeof t!="string")return{};let e={},r=J0(t);for(let o of r){if(o.startsWith("!")){let c=o.slice(1),l=Dt[c]||c;e[l]=!1;continue}let n=o.indexOf(":");if(n===-1){let c=Dt[o]||o;e[c]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(G0);continue}e[a]=G0(i)}return e}function J0(t){return t.trim().split(/\s+/).filter(Boolean)}function G0(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function Y0(t){return t.replace(/_/g," ")}function nO(t){if(!t||typeof t!="string")return{};let e={},r=J0(t);for(let o of r){if(o.startsWith("!")){let c=o.slice(1),l=Dt[c]||c;e[l]=!1;continue}let n=o.indexOf(":");if(n===-1){let c=Dt[o]||o;e[c]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(Y0);continue}e[a]=Y0(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={};for(let r in t){let o=t[r];if(Pe(r)){e[r]=ky(o);continue}let n=Dt[r]||r;if(Ie(r)&&n===r){e[r]=ky(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=ky(o)}return e}function ky(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}function vo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?vo(r):r});let e={};if(typeof t.in=="string"){let r=nO(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(Pe(r)){e[r]=vy(o);continue}let n=Dt[r]||r;if(Ie(r)&&n===r){e[r]=vy(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=vy(o)}return e}function vy(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?vo(e):e}):typeof t=="object"?vo(t):t}function Z0(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function sO(t){let e="",r=0;for(;r<t.length;){if(t[r]==="\\"&&r+1<t.length){let o=t[r+1];if(o===","||o==="_"||o==="\\"){e+=o,r+=2;continue}}t[r]==="_"?e+=" ":e+=t[r],r++}return e}function iO(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 Q0(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 Co(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(o){return o!==null&&typeof o=="object"?Co(o):o});let e={},r=[];for(let o in t){let n=t[o];if(Pe(o)){let i=tk(n);e[o]=Q0(i)?i.in:i;continue}if(Ie(o)){let i=tk(n);e[o]=Q0(i)?i.in:i;continue}let s=we[o]||o;if($t.has(o)||$t.has(s)){e[s]=n;continue}if(typeof n=="function"){e[s]=n;continue}if(n==null){e[s]=n;continue}if(Vr.has(o)||Vr.has(s)){e[s]=n;continue}if(Array.isArray(n)){if(n.some(function(a){return a!==null&&typeof a=="object"})){e[s]=n.map(function(a){return a!==null&&typeof a=="object"?Co(a):a});continue}if(n.length<=1){e[s]=n;continue}r.push(s+":"+n.map(Z0).join(","));continue}if(typeof n=="object"){e[s]=Co(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+":"+Z0(n))}return r.length&&(e.in=r.join(" ")),e}function tk(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Co(e):e}):typeof t=="object"?Co(t):t}function ek(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):sO(t)}function Cy(t){if(!t||typeof t!="string")return{};let e={},r=t.trim().split(/\s+/).filter(Boolean);for(let o of r){if(o.startsWith("!")){let l=o.slice(1),f=Dt[l]||l;e[f]=!1;continue}let n=o.indexOf(":");if(n===-1){let l=Dt[o]||o;e[l]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s,c=iO(i);if(c.length>1){e[a]=c.map(ek);continue}e[a]=ek(i)}return e}function Eo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Eo(r):r});let e={};if(typeof t.in=="string"){let r=Cy(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(Pe(r)){typeof o=="string"?e[r]=Cy(o):e[r]=Ey(o);continue}let n=Dt[r]||r;if(Ie(r)&&n===r){typeof o=="string"?e[r]=Cy(o):e[r]=Ey(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=Ey(o)}return e}function Ey(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Eo(e):e}):typeof t=="object"?Eo(t):t}var aO={shorten:ko,stringify:vo,stringifyFurther:Eo};function cO(t,e){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(o=>e(o));let r={};for(let o in t){let n=t[o];r[o]=n&&typeof n=="object"?e(n):n}return r}var lO=["components","pages","snippets"],Va={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let o=aO[e===!0?"shorten":e];if(o){for(let n of lO)t[n]&&(t[n]=cO(t[n],o));t.app&&typeof t.app=="object"&&(t.app=o(t.app))}}};var jy={};P(jy,{LEVELS:()=>Ha,analyzePlugin:()=>Yn,attachBrowserListeners:()=>Gf,attachNetworkListeners:()=>Wa,classifyEvent:()=>$y,createAnalyzeState:()=>Yf,createBeaconSink:()=>Fy,createConsoleSink:()=>Ly,createDedupe:()=>Py,createEnrich:()=>Oy,createMemorySink:()=>My,createPipeline:()=>Hf,createRedact:()=>Vf,createRemoteSink:()=>Wf,createSample:()=>Iy,createSummarize:()=>Ry,default:()=>Yn,emitFetchEvent:()=>lk,makeEvent:()=>X,meetsLevel:()=>Bf,normalizeLevel:()=>za,resolveSinks:()=>Kf,summarizeElement:()=>Ao});var fO=0,uO=()=>`${Date.now().toString(36)}-${(fO++).toString(36)}`,X=(t,e,r={})=>({id:uO(),ts:Date.now(),type:t,level:e,...r}),dO=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(" > ")},Ao=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:dO(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var Gn=t=>t?.context?.analyze,pO={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"}},hO=(t,{category:e,type:r,level:o})=>n=>{let s=Gn(n);!s||!s.shouldCapture(e)||s.emit(X(r,o,{hook:t,element:Ao(n)}))},rk=t=>(e,r)=>{let o=Gn(e);!o||!o.shouldCapture("state")||o.emit(X("state","debug",{hook:t,element:Ao(e),changedKeys:r?.changedKeys||null}))},Yn={name:"analyze",error(t,e){let r=Gn(t);if(!r||r.config.enabled===!1||!r.shouldCapture("errors"))return;let o=e?.error||e?.err||(e instanceof Error?e:null);r.emit(X("error","error",{hook:e?.hook||"error",element:Ao(t),error:o,message:o?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=Gn(t);e&&(!e.shouldCapture("navigation")&&!e.shouldCapture("lifecycle")||e.emit(X("navigation","info",{hook:"renderRouter",route:t.context?.routerOptions?.currentRoute||null})))},beforeUpdate(t){let e=Gn(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=Gn(t);if(!e||!e.shouldCapture("updates"))return;let r=null;t.__ref?.__analyzeUpdateStart!=null&&(r=(typeof performance<"u"?performance.now():Date.now())-t.__ref.__analyzeUpdateStart,t.__ref.__analyzeUpdateStart=null),e.emit(X("update","debug",{hook:"update",element:Ao(t),durationMs:r}))},beforeStateUpdate:rk("beforeStateUpdate"),stateUpdate:rk("stateUpdate")};for(let[t,e]of Object.entries(pO))Yn[t]=hO(t,e);R();var Ha={error:0,warn:1,info:2,debug:3,trace:4};var Bf=(t,e)=>{let r=Ha[t],o=Ha[e];return r==null||o==null?!0:r<=o},za=t=>Ha[t]!=null?t:"warn";R();var Uf=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var gO=(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},mO=(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"***"}},Ty=(t,e,r,o)=>{if(o>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>Ty(s,e,r,o+1));let n={};for(let s of Object.keys(t))if(gO(s,e)||Uf.test(s)){let a=mO(t[s],r);a!==void 0&&(n[s]=a)}else n[s]=Ty(t[s],e,r,o+1);return n},Vf=(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=Ty(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 Oy=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}}}},Ry=()=>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},Py=(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}},Iy=t=>e=>{if(!e)return e;let r=t[e.type];return r==null||r>=1?e:Math.random()>r?null:e},ok={redact:t=>Vf(t.config.redact||[],t.config.maskStrategy),enrich:t=>Oy(t),summarize:()=>Ry(),dedupe:t=>Py(t.config.cache?.dedupeWindowMs||1e3),sample:t=>Iy(t.config.sample||{})},yO=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let r=ok[t];return r?r(e):null}return null},Hf=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(ok.redact(t));for(let s of r){let i=yO(s,t);i&&n.push(i)}return s=>{let i=s;for(let a of n){if(i==null)return null;let c=a(i);if(c==null)return null;if(Array.isArray(c)){let l=n.slice(n.indexOf(a)+1),f=[];for(let u of c){let d=u,h=!1;for(let g of l)if(d=g(d),d==null){h=!0;break}!h&&d!=null&&f.push(d)}return f}i=c}return i}};R();R();var zf=typeof v<"u"&&typeof v.document<"u",bO=5e3,_O=50,xO=3,wO=1500,SO=1e3,$y=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",kO=t=>{try{return JSON.stringify(t)}catch{return null}},vO=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},CO=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}},EO=()=>{if(!zf)return null;try{let t=v.document?.documentElement?.getAttribute("data-theme")||null,e=typeof v.matchMedia=="function"?v.matchMedia("(prefers-color-scheme: dark)").matches:null;return{active:t||(e?"dark":e===!1?"light":null),forced:t||null,prefers:e==null?null:e?"dark":"light"}}catch{return null}},AO=()=>{if(!zf)return null;let t=v.location,e=typeof navigator<"u"?navigator:null,r=typeof screen<"u"?screen:null;return{url:t?.href||null,path:t?.pathname||null,referrer:v.document?.referrer||null,title:v.document?.title||null,ua:e?.userAgent||null,browser:CO(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:vO(),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:EO()}},Wf=(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:$y,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:bO,b=t.maxBatch||_O,_=t.maxRetries!=null?t.maxRetries:xO,y=t.backoffMs||wO,x=t.queueLimit||SO,k=t.sampleRate!=null?t.sampleRate:1,E=()=>typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,T=t.sessionId||E(),$=[],D=[],I=null,z=null,V=()=>{I||!$.length||(I=setTimeout(K,m))},rt=L=>{if(z)return;let ot=y*Math.pow(2,Math.max(0,L-1));z=setTimeout(()=>{if(z=null,!D.length)return;let U=D.shift();G(U.envelope,U.attempt)},ot)},at=(L,ot=!1)=>{let U=u?Dy(u):null,Y={id:T,sentAt:Date.now()};ot&&(Y.endedAt=Date.now());let j={v:1,session:Y,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:AO(),user:U?.user||null,traits:U?.traits||null,tags:U?.tags||null,events:L};if((p?Dy(p)===!0:g)&&(j.app.debug=!0),h)try{return h(j)||null}catch{return j}return j},G=async(L,ot=1)=>{if(L)try{let U=!0;if(r){let Y=await r(L);U=Y!==!1&&Y?.ok!==!1}else U=await TO(e,L,{apiKey:n,getAuth:f});!U&&ot<_&&(D.push({envelope:L,attempt:ot+1}),rt(ot+1))}catch{ot<_&&(D.push({envelope:L,attempt:ot+1}),rt(ot+1))}},K=(L=!1,ot=!1)=>{if(I&&(clearTimeout(I),I=null),!$.length&&!ot)return;let U=$;$=[];let Y=at(U,ot);if(Y){if(L&&zf){if(typeof o=="function"&&Dy(()=>o(Y)))return;if(navigator.sendBeacon&&e){let j=kO(Y);if(j)try{navigator.sendBeacon(e,new v.Blob([j],{type:"application/json"}));return}catch{}}}G(Y)}},lt=!1,Ut=()=>{lt||(lt=!0,K(!0,!0))};zf&&(v.addEventListener("pagehide",Ut,{passive:!0}),v.addEventListener("beforeunload",Ut,{passive:!0}),v.addEventListener("visibilitychange",()=>{v.document.visibilityState==="hidden"&&K(!0)},{passive:!0}));let W=L=>{if(!L||k<1&&Math.random()>k)return;lt&&(lt=!1);let ot={...L,log_type:d(L)};$.push(ot),$.length>x&&($=$.slice(-x)),$.length>=b?K():V()},wt=L=>(K(!1,!0),T=L||E(),lt=!1,W.sessionId=T,T);return W.flush=()=>K(!1),W.endSession=Ut,W.startNewSession=wt,W.sessionId=T,W},Dy=t=>{try{return t()}catch{return null}},TO=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 OO={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},RO="\x1B[0m",qf=typeof v<"u"&&typeof v.document<"u",Ly=(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(qf)i(a,s);else{let c=OO[s.level]||"";i(`${c}${a}${RO}`,s)}}},My=(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},Fy=(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=qf?new v.Blob([c],{type:"application/json"}):c;if(qf&&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(()=>{})};qf&&(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},nk={console:Ly,memory:My,beacon:Fy,remote:Wf},sk=(t,e)=>e.getDebug!=null||e.debug!=null?e:{...e,getDebug:()=>t.config.debug===!0},Kf=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=nk[o];if(!n)continue;r.push(o==="memory"?n(t,{}):n(o==="remote"?sk(t,{}):{}))}else if(o&&typeof o=="object"&&o.type){let n=nk[o.type];if(!n)continue;r.push(o.type==="memory"?n(t,o):n(o.type==="remote"?sk(t,o):o))}return r};R();var PO=typeof v<"u"&&typeof v.document<"u",IO=new Set(["password","hidden"]),ik=(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))))}},Ny="__analyzeKeyPath",Xn=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[Ny])return e[Ny];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[Ny]=i}catch{}return i},DO=(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"&&IO.has(t.type)||Uf.test(t.name||"")||Uf.test(t.id||"")||t.dataset?.analyze==="skip"),Gf=t=>{if(!PO)return;let e=t.config.capture,r=t.config.throttle,o=t.__teardown,n=(s,i,a,c)=>{s.addEventListener(i,a,c),o.push(()=>s.removeEventListener(i,a,c))};if(e.errors&&(n(v,"error",s=>{t.emit(X("error","error",{hook:"window.onerror",message:s.message||null,error:s.error||null,source:s.filename||null,line:s.lineno||null,col:s.colno||null}))}),n(v,"unhandledrejection",s=>{let i=s.reason,a=i instanceof Error?i:null;t.emit(X("error","error",{hook:"unhandledrejection",message:a?.message||(typeof i=="string"?i:"Unhandled promise rejection"),error:a}))})),e.pointer){n(v,"click",i=>{t.emit(X("pointer","info",{hook:"click",target:Xn(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:ak(i)}))},{passive:!0,capture:!0}),n(v,"dblclick",i=>{t.emit(X("pointer","info",{hook:"dblclick",target:Xn(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),n(v,"contextmenu",i=>{t.emit(X("pointer","info",{hook:"contextmenu",target:Xn(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=ik(i=>{t.emit(X("pointer","trace",{hook:"pointermove",x:i.clientX,y:i.clientY}))},r.pointermove);n(v,"pointermove",s,{passive:!0})}if(e.keyboard&&n(v,"keydown",s=>{t.emit(X("keyboard","info",{hook:"keydown",code:s.code,key:s.key&&s.key.length===1?"\xB7":s.key,modifiers:ak(s),target:Xn(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=DO(a.value,t.config.maskStrategy)),t.emit(X("forms","info",{hook:i.type,target:Xn(i),field:{name:a.name||null,type:a.type||a.tagName.toLowerCase()},value:u}))};n(v,"input",s,{passive:!0,capture:!0}),n(v,"change",s,{passive:!0,capture:!0}),n(v,"submit",i=>{t.emit(X("forms","info",{hook:"submit",target:Xn(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=ik(()=>{t.emit(X("scroll","trace",{hook:"scroll",x:v.scrollX,y:v.scrollY}))},r.scroll);n(v,"scroll",s,{passive:!0,capture:!0})}if(e.viewport){let s=Ls(()=>{t.emit(X("viewport","info",{hook:"resize",w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}))},r.resize);n(v,"resize",s,{passive:!0}),n(v,"orientationchange",()=>{t.emit(X("viewport","info",{hook:"orientationchange",orientation:typeof screen<"u"&&screen.orientation?screen.orientation.type:null}))},{passive:!0}),n(v.document,"visibilitychange",()=>{t.emit(X("viewport","info",{hook:"visibilitychange",hidden:v.document.hidden}))},{passive:!0}),t.emit(X("viewport","info",{hook:"initial",w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}))}if(e.console)for(let s of["log","warn","error","debug"]){let i=console[s];console[s]=function(...a){try{t.emit(X("console",s==="error"?"error":s==="warn"?"warn":"debug",{hook:`console.${s}`,args:a.map(ck)}))}catch{}return i.apply(console,a)},o.push(()=>{console[s]=i})}if(e.performance&&typeof PerformanceObserver<"u")try{let s=new PerformanceObserver(a=>{for(let c of a.getEntries())t.emit(X("performance","info",{hook:c.entryType,name:c.name,startTime:c.startTime,duration:c.duration,value:c.value!=null?c.value:null}))}),i=["largest-contentful-paint","layout-shift","longtask","paint","first-input","event"];for(let a of i)try{s.observe({type:a,buffered:!0})}catch{}o.push(()=>s.disconnect())}catch{}},ak=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),LO=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=ck(t.cause)),e},ck=t=>{if(t==null)return t;if(t instanceof Error)return LO(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};R();var MO=typeof v<"u"&&typeof v.document<"u",lk=(t,e)=>{let r=t?.analyze;if(!r||!r.shouldCapture("network"))return;let o=e.phase==="error"?"error":"info";r.emit(X("network",o,{hook:`fetch.${e.phase}`,source:"symbo-fetch",...e}))},Wa=t=>{if(MO&&t.config.capture.network&&!t.__networkListeners){if(t.__networkListeners=!0,t.__teardown.push(()=>{t.__networkListeners=!1}),typeof v.fetch=="function"){let e=v.fetch.bind(v),r=function(o,n){if(n?.headers?.["X-Analyze-Beacon"]||!t.shouldCapture("network"))return e(o,n);let s=typeof o=="string"?o:o&&o.url||"",i=(n?.method||typeof o=="object"&&o?.method||"GET").toUpperCase(),a=typeof performance<"u"?performance.now():Date.now();return t.emit(X("network","info",{hook:"fetch.start",source:"window.fetch",url:s,method:i})),e(o,n).then(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;return t.emit(X("network",c.ok?"info":"warn",{hook:"fetch.success",source:"window.fetch",url:s,method:i,status:c.status,ok:c.ok,durationMs:l})),c}).catch(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;throw t.emit(X("network","error",{hook:"fetch.error",source:"window.fetch",url:s,method:i,error:c,durationMs:l})),c})};v.fetch=r,t.__teardown.push(()=>{v.fetch=e})}if(typeof v.XMLHttpRequest=="function"){let e=v.XMLHttpRequest,r=e.prototype.open,o=e.prototype.send;e.prototype.open=function(n,s){return this.__analyze={method:String(n).toUpperCase(),url:String(s)},r.apply(this,arguments)},e.prototype.send=function(n){let s=this.__analyze;if(!s||!t.shouldCapture("network"))return o.apply(this,arguments);let i=typeof performance<"u"?performance.now():Date.now();t.emit(X("network","info",{hook:"xhr.start",source:"xhr",url:s.url,method:s.method}));let a=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i,f=this.status>=200&&this.status<400;t.emit(X("network",f?"info":"warn",{hook:"xhr.success",source:"xhr",url:s.url,method:s.method,status:this.status,ok:f,durationMs:l}))},c=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i;t.emit(X("network","error",{hook:"xhr.error",source:"xhr",url:s.url,method:s.method,status:this.status,durationMs:l}))};return this.addEventListener("loadend",a),this.addEventListener("error",c),o.apply(this,arguments)},t.__teardown.push(()=>{e.prototype.open=r,e.prototype.send=o})}}};var FO={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},NO={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},jO={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},BO={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},UO=t=>{let e={...FO,...t};return e.replay&&Object.assign(e,NO),e.telemetry&&Object.assign(e,jO),e.remote&&Object.assign(e,BO),Object.assign(e,t),e},VO=64,HO=()=>{if(typeof v>"u"||!v.location)return null;try{let e=new URLSearchParams(v.location.search).get("analyze");return e||null}catch{return null}},Yf=(t={})=>{let e=t===!0?{}:{...t};e.capture=UO(e.capture||{});let r=HO();(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=za(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=Hf(o),o.__sinks=Kf(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&&Bf(s.level,o.config.level)){if(!o.__ready){if(s.level!=="error"&&!o.config.captureDuringHydration)return;o.__preBuffer.length<VO&&o.__preBuffer.push(s);return}n(),fk(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)fk(o,a)}try{Gf(o)}catch(a){console.error("[analyze] browser attach error:",a)}try{Wa(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=za(s)},o.setCapture=(s,i)=>{if(o.config.capture[s]=!!i,s==="network"&&i&&o.__ready)try{Wa(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},fk=(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 Vy={};P(Vy,{Inspect:()=>Xf,inspectPlugin:()=>Uy});R();function uk(t){return w(t)?t:O(t)?t.find(e=>w(e)):""}function By(t){if(!t)return;let e=t.__ref.__componentKey,r=t.extends&&uk(t.extends),o=t.parent&&t.parent.childExtends&&uk(t.parent.childExtends);return(e||r||o||"").split("_")[0].split(".")[0].split("+")[0]}function Jf(t){if(!t||!t.__ref)return;let{components:e,pages:r,editor:o}=t.context,n=By(t);return o&&o.onInitInspect&&!o.onInitInspect(n,t,t.state)?Jf(t.parent):n&&(e[n]||r[n])?t:Jf(t.parent)}var zO=(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}))}},Xf={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:zO,onMousemove:(t,e,r)=>{let o=t.target.ref,n=Jf(o),s=e.Inspector.state;if(!n||!r.debugging||!n.__ref)return s.update({area:!1});let i=By(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=Jf(o);if(!n)return;let s=By(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)Bn[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 x1={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"}}}},w1={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},S1={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"}}},Ow={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...x1,...w1,...S1,none:{color:"none",background:"none"},transparent:{color:"currentColor",background:"transparent"}};var Rw={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var Pw={ratio:1.618,subSequence:!0};var Iw={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 $w={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 Lw={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 Mw={base:150,ratio:1.333,unit:"ms",subSequence:!0};var Fw={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var Aa={version:"0.0.1",color:Aw,gradient:Tw,theme:Ow,typography:Rw,spacing:Pw,font:Iw,fontFamily:Dw,timing:Mw,icons:$w,media:Lw,sizes:Fw,reset:{html:{},body:{}},animation:{fadeIn:{from:{opacity:0},to:{opacity:1}}},devices:{},class:{},svg:{},grid:{},shape:{}};var Vn={};P(Vn,{A:()=>t0,AssetPicture:()=>eS,Audio:()=>nS,Avatar:()=>g0,B:()=>kS,Block:()=>Nw,Box:()=>Tf,Br:()=>AS,Button:()=>o0,ButtonSet:()=>a0,COMPONENTS:()=>So,Caption:()=>hS,Checkbox:()=>FS,CheckboxHgroup:()=>NS,Circle:()=>Zw,CircleButton:()=>s0,Clickable:()=>Yw,Data:()=>CS,Dialog:()=>l0,DialogFooter:()=>u0,DialogHeader:()=>f0,Dropdown:()=>y0,DropdownList:()=>b0,DropdownParent:()=>_0,DropdownParentFocus:()=>x0,DropdownSiblingFocus:()=>w0,FileIcon:()=>XS,Flex:()=>Bw,Focusable:()=>Xw,FocusableComponent:()=>Jw,Footnote:()=>SS,Form:()=>qw,Grid:()=>Vw,Gutter:()=>zw,H1:()=>aS,H2:()=>cS,H3:()=>lS,H4:()=>fS,H5:()=>uS,H6:()=>dS,Headline:()=>xS,Hgroup:()=>IS,HgroupButton:()=>$S,HgroupRows:()=>DS,Hoverable:()=>Gw,Hr:()=>ES,I:()=>vS,Icon:()=>GS,IconButton:()=>c0,IconText:()=>YS,Iframe:()=>Kw,Img:()=>Ww,Inline:()=>jw,InlineFlex:()=>Uw,InlineGrid:()=>Hw,Input:()=>LS,Italic:()=>bS,KangorooButton:()=>i0,Li:()=>TS,Link:()=>Zm,Notification:()=>S0,NumberInput:()=>MS,Ol:()=>RS,P:()=>pS,Picture:()=>tS,Radio:()=>jS,RadioHgroup:()=>BS,Range:()=>m0,RouteLink:()=>e0,RouterLink:()=>Qm,SHAPES:()=>Ef,Select:()=>r0,Shape:()=>Om,Span:()=>iS,SquareButton:()=>n0,Strong:()=>gS,Subhead:()=>wS,Svg:()=>rS,Text:()=>sS,Textarea:()=>HS,TextareaWithButton:()=>zS,Theme:()=>Qw,Title:()=>_S,Toggle:()=>US,ToggleHgroup:()=>VS,Tooltip:()=>d0,TooltipHidden:()=>p0,TooltipParent:()=>h0,U:()=>mS,Ul:()=>OS,Underline:()=>yS,Video:()=>oS,depth:()=>Af,focusableRingEnabled:()=>vf,getSystemGlobalTheme:()=>Ta});var vm={};P(vm,{Block:()=>Nw,Flex:()=>Bw,Grid:()=>Vw,Gutter:()=>zw,Inline:()=>jw,InlineFlex:()=>Uw,InlineGrid:()=>Hw});var Nw={display:"block"},jw={display:"inline"},Bw={display:"flex"},Uw={display:"inline-flex"},Vw={display:"grid"},Hw={display:"inline-grid"},zw={boxSize:"C1"};var Cm={};P(Cm,{Img:()=>Ww});R();var Ww={tag:"img",attr:{title:t=>t.title||t.alt,alt:t=>t.alt!=null?t.alt:t.title||"",src:t=>{let e=Gt(t);return e&&e.src||t.src},srcset:t=>{let e=Gt(t);return(e?Pi(e):"")||t.srcset}}};var Em={};P(Em,{Form:()=>qw});var qw={tag:"form"};var Am={};P(Am,{Iframe:()=>Kw});var Kw={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var Tm={};P(Tm,{Clickable:()=>Yw,Focusable:()=>Xw,FocusableComponent:()=>Jw,Hoverable:()=>Gw,focusableRingEnabled:()=>vf});var k1={appearance:"none",cursor:"pointer",fontFamily:"inherit"},Gw={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}}},Yw={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}};function vf(t){let e=t.context&&t.context.designSystem;return!e||e.focusableRing!==!1}var Xw={border:"none",outline:t=>vf(t)?"solid 0 blue.3":"none",":focus-visible":{opacity:1,outline:t=>vf(t)?"solid X blue.3":"none"},attr:{tabIndex:t=>t.tabIndex}},Jw={extends:"Focusable",tag:"button",fontSize:"A",type:"button",border:"none",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",fontFamily:"inherit",style:k1};var Im={};P(Im,{Picture:()=>tS});var Pm={};P(Pm,{Theme:()=>Qw,getSystemGlobalTheme:()=>Ta});var Rm={};P(Rm,{Circle:()=>Zw,SHAPES:()=>Ef,Shape:()=>Om,default:()=>v1,depth:()=>Af});R();var we=C(),Af={4:{boxShadow:`rgba(0,0,0,.10) 0 2${we.unit.default} 4${we.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${we.unit.default} 6${we.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${we.unit.default} 10${we.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${we.unit.default} 16${we.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${we.unit.default} 26${we.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${we.unit.default} 42${we.unit.default}`}},Un=t=>et(t.shapeDirectionColor)||et(t.borderColor)||et(t.backgroundColor)||et(t.background),Cf=t=>{let e=_a.transition(t.transition,t);return e&&e.transition},Ef={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:Un(t),transition:Cf(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:Un(t),transition:Cf(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:Un(t),transition:Cf(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:Cf(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${Un(t)} 25%, transparent 25%), linear-gradient(315deg, ${Un(t)} 25%, transparent 25%)`},"&:after":{background:Un(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)"}}}},Om={deps:{exec:ut,getSpacingBasedOnRatio:Te,getMediaColor:It},classlist:{shape:t=>t.deps.exec(Ef[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=Ef[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}}},Zw={round:"100%"},v1=Om;R();var Ta=({context:t,state:e})=>{let r=e&&e.root,o=r&&r.globalTheme||t.designSystem&&t.designSystem.globalTheme;return o==="auto"?null:o},Qw={deps:{depth:Af},classlist:{depth:t=>!Tt(t.depth)&&t.deps.depth[t.depth]}};var tS={deps:{getSystemGlobalTheme:Ta},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:Ta},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 Dm={};P(Dm,{AssetPicture:()=>eS});R();var eS={tag:"picture",children:t=>{let e=Gt(t);if(e)return Ii(e,t.alt)}};var $m={};P($m,{Svg:()=>rS});var rS={tag:"svg",attr:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},html:t=>{let{context:e}=t;if(t.semanticIcons)return;if(t.html&&typeof t.html!="function")return t.call("exec",t.html,t);let{designSystem:r,utils:o}=e,n=r&&r.svg,s=t.spriteId||r&&r.useSvgSprite,i=t.call("exec",t.src,t),a=d=>`<use xlink:href="#${d}" />`;if(typeof i=="string"){let d=i.match(/^\s*<symbol\b[^>]*\bid="([^"]+)"/);if(d){let h=d[1],g=e.document||(typeof document<"u"?document:null);if(!(g&&typeof g.getElementById=="function"&&g.getElementById(h))){let m=o&&o.scratchSystem&&o.scratchSystem.appendSVGSprite;r&&!r.__svgCache&&(r.__svgCache={}),typeof m=="function"?m({[h]:i},{document:g}):o&&typeof o.init=="function"&&o.init({svg:{[h]:i}},{document:g,emotion:e.emotion})}return a(h)}}if(!s&&i)return i;let c=t.spriteId;if(c)return a(c);if(n&&n[i])return a(i);let l=Symbol.for(i),f=n[l];if(f&&n[f])return a(f);if(!i)return a("");if(typeof i=="string"&&!i.includes("<"))return typeof console<"u"&&console.warn&&console.warn(`[Svg] Unknown sprite symbol "${i}" \u2014 not registered in design-system sprite. Set the icon name to one that exists in designSystem.icons / context.svg, or register the SVG body via utils.init({ svg: { '${i}': '<svg>...</svg>' } }).`),a("");let u=0;for(let d=0;d<i.length;d++)u=(u<<5)-u+i.charCodeAt(d)|0;return f=n[l]=`svg-${(u>>>0).toString(36)}`,o.init({svg:{[f]:i}},{document:e.document,emotion:e.emotion}),a(f)}};var Lm={};P(Lm,{Video:()=>oS});R();var oS={tag:"video",controls:!0,attr:{src:t=>{let e=Gt(t);return e&&e.src||t.src}},children:t=>{let e=Gt(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(r=>({tag:"source",attr:{src:r.src,type:r.format}}))},childExtends:{tag:"source"}};var Mm={};P(Mm,{Audio:()=>nS});R();var nS={tag:"audio",controls:!0,attr:{src:t=>{let e=Gt(t);return e&&e.src||t.src}},children:t=>{let e=Gt(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(r=>({tag:"source",attr:{src:r.src,type:r.format}}))},childExtends:{tag:"source"}};var Fm={};P(Fm,{B:()=>kS,Caption:()=>hS,Data:()=>CS,Footnote:()=>SS,H1:()=>aS,H2:()=>cS,H3:()=>lS,H4:()=>fS,H5:()=>uS,H6:()=>dS,Headline:()=>xS,I:()=>vS,Italic:()=>bS,P:()=>pS,Span:()=>iS,Strong:()=>gS,Subhead:()=>wS,Text:()=>sS,Title:()=>_S,U:()=>mS,Underline:()=>yS});var sS={},iS={tag:"span"},aS={tag:"h1"},cS={tag:"h2"},lS={tag:"h3"},fS={tag:"h4"},uS={tag:"h5"},dS={tag:"h6"},pS={tag:"p"},hS={tag:"caption"},gS={tag:"strong",fontWeight:"700"},mS={tag:"u"},yS={tag:"u"},bS={tag:"i"},_S={},xS={tag:"h6",fontSize:"B",fontWeight:500},wS={tag:"span",fontSize:"Z1"},SS={tag:"span",fontSize:"Z"},kS={tag:"b"},vS={tag:"i"},CS={tag:"data"};var Nm={};P(Nm,{Box:()=>Tf,Br:()=>AS,Hr:()=>ES,Li:()=>TS,Ol:()=>RS,Ul:()=>OS});var C1=t=>{if(!t.context)return;let{props:e,__ref:r}=t,o=ie(e,t,{unpack:!1});r.__class=o},Tf={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:C1},ES={tag:"hr",margin:"C1 0"},AS={tag:"br"},TS={tag:"li"},OS={tag:"ul",childExtends:{extends:"Li"}},RS={tag:"ol",childExtends:{extends:"Li"}};var jm={};P(jm,{Hgroup:()=>IS,HgroupButton:()=>$S,HgroupRows:()=>DS});var PS=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},IS={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:PS,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:PS,margin:"0",color:"paragraph"}},DS={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},$S={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var Bm={};P(Bm,{Input:()=>LS});var LS={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 Um={};P(Um,{NumberInput:()=>MS});var MS={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 Vm={};P(Vm,{Checkbox:()=>FS,CheckboxHgroup:()=>NS});var FS={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"}}},NS={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var Hm={};P(Hm,{Radio:()=>jS,RadioHgroup:()=>BS});var jS={extends:"Checkbox",Input:{type:"radio",":checked + div:after":{opacity:"1"}},Flex:{round:"100%",padding:"Y",":after":{content:'""',display:"block",boxSize:"X+W1",round:"100%",background:"white",opacity:"0",transition:"opacity .15s ease-in-out"},Icon:null}},BS={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var zm={};P(zm,{Toggle:()=>US,ToggleHgroup:()=>VS});var US={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}},VS={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var Wm={};P(Wm,{Textarea:()=>HS,TextareaWithButton:()=>zS});var HS={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"}},zS={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 qm={};P(qm,{FileIcon:()=>XS,Icon:()=>GS,IconText:()=>YS});var WS=new Set,qS=(t,e)=>{if(!WS.has(t)&&(WS.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.`)}},KS=new WeakMap,E1=t=>{let e=KS.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},KS.set(t,e)),e},A1=(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},T1=(t,e,r)=>{let o=r&&r.context&&r.context.document||(typeof document<"u"?document:null);it(t);try{let n=C();n&&!n.__svgCache&&(n.__svgCache={}),t.__svgCache||(t.__svgCache={});let s={};for(let i in e){let a=yo(e[i],i);a&&(t.icons[i]=a,s[i]=a)}return t.useIconSprite&&o&&Object.keys(s).length&&bo(s,{document:o}),Object.keys(s).length>0}finally{tt()}},O1=(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=A1(f,r);return u?T1(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},GS={extends:"Svg",width:"A",height:"A",display:"inline-block",style:{fill:"currentColor","*":{fill:"currentColor"}},onInit:(t,e,r)=>{let{parent:o}=t,{icons:n,useIconSprite:s,verbose:i}=r&&r.designSystem,{toCamelCase:a}=r&&r.utils,c=g=>{let p=g[".isActive"];if(p)return g.call("exec",p.name||p.icon)},l=(g,p,m)=>{let{semanticIcons:b}=m&&m.designSystem,{toCamelCase:_}=m&&m.utils,y=f(g,p),k=_(y).split(/([a-z])([A-Z])/g),E=k[1]?k[0]:y.split(".")[0].split(" ")[0],T=b&&b[E];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,b=g.call("exec",g.name||g.icon||m,g);return g.call("isString",b)&&b.includes("{{")&&(b=g.call("replaceLiteralsWithObjectFields",b)),g.call("isString",b)?b:m},u=t.src,d,h=()=>{let g=f(t,e),p=g;if(g.includes(" ")){let I=g.split(" ");g=I[0]+I.slice(1).map(z=>z.charAt(0).toUpperCase()+z.slice(1)).join("")}let m=a(g),b=m.split(/([a-z])([A-Z])/g),_=l(t,e,r);if(_){Object.assign(t,_);return}let y;t.isActive&&(y=c(t));let x=o[".isActive"];o&&o.isActive&&x&&x.icon&&(y=t.call("exec",x.icon||x.Icon.name||x.Icon.icon,t)),t.call("isString",y)&&y.includes("{{")&&(y=t.call("replaceLiteralsWithObjectFields",y));let k;n[y]&&(k=y),n[m]?k=m:n[b[0]+b[1]]?k=b[0]+b[1]:n[b[0]]?k=b[0]:i&&t.warn("Can't find icon:",g,k);let E=n[k],T=o&&o.src||u;!E&&!T&&(O1(r,p,m,t,z=>{if(!(d&&d._disposed)){if(!z)return qS(p,t);h()}})||qS(p,t));let $=s&&k,D=E||T||n.noIcon;if(!(t.spriteId===$&&t.src===D&&t.node&&t.node.innerHTML)&&(t.spriteId=$,t.src=D,typeof t.html=="function"&&t.node)){let I=t.context&&t.context.designSystem;I&&it(I);try{let z=t.html(t,t.state,t.context);z!=null&&typeof z!="function"&&(t.node.innerHTML=z)}finally{I&&tt()}}};d=Z(h,{depth:t.__ref&&t.__ref.path&&t.__ref.path.length||0}),t.__ref&&(t.__ref.__effects||(t.__ref.__effects=[]),t.__ref.__effects.push(d))},attr:{viewBox:"0 0 24 24","aria-hidden":t=>t.ariaLabel||t.role==="img"?null:"true",focusable:"false"}},YS={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},XS={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var ty={};P(ty,{A:()=>t0,Link:()=>Zm,RouteLink:()=>e0,RouterLink:()=>Qm});var Oa={};P(Oa,{default:()=>$1,getActiveRoute:()=>Jm,lastLevel:()=>Rf,lastPathname:()=>Of,matchRoute:()=>Gm,parseQuery:()=>Ym,parseRoutePattern:()=>Km,router:()=>Ke,runGuards:()=>Xm});R();var ZS=/^:(.+)/,QS=/^\*$/,JS=new Map,Km=t=>{let e=JS.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(ZS);a?o.push({index:i,name:a[1]}):QS.test(r[i])&&(n=!0)}let s={segments:r,params:o,hasWildcard:n,pattern:t};return JS.set(t,s),s},Gm=(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=Km(l),u=R1(n,f);u>a&&(a=u,i=l,c=P1(n,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},R1=(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(ZS.test(r[i]))n+=1;else if(QS.test(r[i]))n+=.5;else return-1;return n},P1=(t,e)=>{let r={};for(let{index:o,name:n}of e.params)t[o]&&(r[n]=decodeURIComponent(t[o]));return r},Ym=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},Xm=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},Jm=(t=0,e)=>{e||(e=typeof v<"u"?v.location.pathname:"/");let o=e.split("/")[t+1];if(o)return`/${o}`},Of,Rf=0,I1=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,D1={level:Rf,pushState:!0,initialRender:!1,scrollToTop:!0,scrollToNode:!1,get scrollNode(){return typeof Q<"u"&&(Q.scrollingElement||Q.documentElement)||null},scrollBody:!1,useFragment:!1,updateState:!0,scrollToOffset:0,contentElementKey:"content",scrollToOptions:{behavior:"smooth"},useParamsMatching:!0},Ke=async(t,e,r={},o={})=>{let n=e||void 0,s=n?.context?.window||v,i=n?.context?.document||Q,a={...D1,...n.context.routerOptions,...o};Rf=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=I1(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=Ym(g),b=n.node,_=p&&p!==s.location.hash.slice(1),y=h!==Of;Of=h;let x=c.__routerRendered,k,E,T,$;if(a.useParamsMatching){let V=Gm(h,n.routes,a.level);k=V.key,E=V.routePath,T=V.content,$=V.params}else{k=Jm(a.level,h),E=k;let V=n.routes;T=V?V[k||"/"]||V["/*"]:null,$={}}let D=a.scrollToNode?b: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 V={pathname:h,route:k,params:$,query:m,hash:p,element:n,state:r},rt=await Xm(a.guards,V);if(rt===!1)return;if(typeof rt=="string")return Ke(rt,e,r,{...o,guards:[]})}if(a.pushState)try{s.history.pushState(r,null,h+(g||"")+(p||""))}catch{}if(y||!_){let V={route:k,routePath:E,hash:p,debugging:!1};Object.keys($).length&&(V.params=$),Object.keys(m).length&&(V.query=m),a.updateState&&n.state.update(V,{preventContentUpdate:!0})}let I=!x||x.content!==T||x.route!==k;if(y||I||a.force===!0){l&&a.removeOldElement&&n[l].remove();let V=n.__ref?.origin?.content,rt={};if(V)for(let G in V){let K=V[G];G==="__ref"||G==="props"||G==="node"||G==="parent"||G==="key"||(typeof K=="string"||typeof K=="number"||typeof K=="boolean"||typeof K=="object"&&K!==null&&!K.node&&!K.__ref)&&(rt[G]=K)}let at={...rt,...typeof T=="object"?T:{extends:T}};a.useFragment&&(at.tag="fragment");try{if(typeof n?.set!="function")return;n.set(at,{contentElementKey:l}),c.__routerRendered={content:T,route:k}}catch(G){console.error("[smbls/router] failed to render route content",h,G)}}if(a.scrollToTop&&D?.scrollTo&&D.scrollTo({...a.scrollToOptions||{},top:0,left:0}),a.scrollToNode&&T[l]?.node?.scrollTo&&T[l].node.scrollTo({...a.scrollToOptions||{},top:0,left:0}),p){let V=i.getElementById(p);if(V&&D?.scrollTo){let rt=V.getBoundingClientRect().top+b.scrollTop-(a.scrollToOffset||0);D.scrollTo({...a.scrollToOptions||{},top:rt,left:0})}}wr("routeChanged",n,a)},$1=Ke;var L1=(t,e,r)=>{let{context:o}=e,{href:n,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",n,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=o,d=e.__ref.root,h=a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")||a.startsWith("sketch:")||a.startsWith("whatsapp:")||a.startsWith("sms:")||a.startsWith("skype:")||a.startsWith("viber:")||a.startsWith("callto:")||a.startsWith("facetime:")||a.startsWith("facetime-audio:")||a.startsWith("geo:")||a.startsWith("maps:");if(a&&!h){t.preventDefault();try{let g=d;if(u&&u.customRouterElement){let p=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let b of p){if(!m||!m[b]){m=null;break}m=m[b]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||Ke)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}},Zm={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:t=>Lr(t,t.href)||Lr(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:L1},t0={extends:"Link"},Qm={onClick:(t,e,r)=>{let{context:o}=e,{href:n,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",n,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a)return;let{utils:c,snippets:l,functions:f,routerOptions:u}=o,d=e.__ref.root,h=a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")||a.startsWith("sketch:")||a.startsWith("whatsapp:")||a.startsWith("sms:")||a.startsWith("skype:")||a.startsWith("viber:")||a.startsWith("callto:")||a.startsWith("facetime:")||a.startsWith("facetime-audio:")||a.startsWith("geo:")||a.startsWith("maps:");if(a&&!h){t.preventDefault();try{let g=d;if(u&&u.customRouterElement){let p=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let b of p){if(!m||!m[b]){m=null;break}m=m[b]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||Ke)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}}},e0={extends:[Zm,Qm]};var ey={};P(ey,{Select:()=>r0});var r0={extends:"Focusable",tag:"select",fontSize:"A",border:"none",boxSizing:"border-box",theme:"field",cursor:"pointer",childProps:{tag:"option",attr:{value:t=>t.value,selected:t=>t.selected,disabled:t=>t.disabled}},attr:{name:t=>t.name,disabled:t=>t.disabled,value:t=>{if(!t.value)return;let e=t.call("exec",t.value,t);return t.call("isString",e)&&e.includes("{{")?t.call("replaceLiteralsWithObjectFields",e):e}}};var ry={};P(ry,{Button:()=>o0,ButtonSet:()=>a0,CircleButton:()=>s0,IconButton:()=>c0,KangorooButton:()=>i0,SquareButton:()=>n0});var o0={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)},n0={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"},s0={extends:"SquareButton",round:"C"},i0={extends:"Button",childExtends:"IconText"},a0={tag:"nav",display:"flex",childExtends:"SquareButton"},c0={extends:["SquareButton","ClickableItem"],round:"Z"};var oy={};P(oy,{Dialog:()=>l0,DialogFooter:()=>u0,DialogHeader:()=>f0});var l0={display:"flex",tag:"dialog",flow:"column",border:"0",theme:"dialog",round:"Z2"},f0={extends:"Hgroup",minWidth:"100%",gap:"A",Title:{align:"center space-between",Text:{text:"Title"},SquareButton:{icon:"x",theme:"transparent"}},Paragraph:{color:"caption"}},u0={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 ny={};P(ny,{Tooltip:()=>d0,TooltipHidden:()=>p0,TooltipParent:()=>h0});R();var d0={display:"flex",theme:"dialog",background:"black",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>bt(t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"gray12",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"gray6",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},p0={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)}},h0={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 sy={};P(sy,{Avatar:()=>g0});var M1=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)},g0={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=M1(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 iy={};P(iy,{Range:()=>m0});var m0={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:fn("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:fn("#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 ay={};P(ay,{Dropdown:()=>y0,DropdownList:()=>b0,DropdownParent:()=>_0,DropdownParentFocus:()=>x0,DropdownSiblingFocus:()=>w0});var y0={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"},b0={display:"flex",attr:{dropdown:!0},padding:"0 Y",maxHeight:"G",flow:"column",theme:"quaternary",overflow:"hidden auto",style:{listStyleType:"none"},transition:"B defaultBezier",transitionProperty:"transform, opacity, visibility",children:t=>t.options||[],childrenAs:"props",".hidden":{transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},childExtends:{extends:"Button",state:{},isActive:({key:t,state:e})=>e.active===t,position:"relative",round:"0",align:"center flex-end",flow:"row-reverse",padding:"Z2 C Z2 Y2",margin:"0",gap:"Y2",theme:"quaternary .child",":hover":{style:{svg:{opacity:"0.5"}}},Icon:{isActive:({key:t,state:e})=>e.active===t,name:"checkmark",opacity:"0.1",".active":{opacity:"1"}},":not(:first-child)":{"@dark":{border:"solid gray4.65"},"@light":{border:"solid gray11"},borderWidth:"1px 0 0"}}},_0={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},x0={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()}}},w0={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 cy={};P(cy,{Notification:()=>S0});var S0={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 So=Object.assign({},vm,Cm,Em,Am,Tm,Im,Dm,$m,Rm,Lm,Mm,Pm,Fm,Nm,jm,Bm,Um,Vm,Hm,zm,Wm,qm,ty,ey,ry,oy,ny,sy,iy,ay,cy);function Pf(t){if(t==null)return 0;if(typeof t!="object")return k0(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let o=0;o<t.length;o++)e=(e^Pf(t[o]))*16777619;return e>>>0}let r=Object.keys(t).sort();for(let o=0;o<r.length;o++)e=(e^k0(r[o]))*16777619,e=(e^Pf(t[r[o]]))*16777619;return e>>>0}function k0(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e}function If(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(!If(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)||!If(t[s],e[s]))return!1}return!0}function ly(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=ly(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 fy(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])?fy(t[o],n,r):t[o]=n}return t}function Br(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 Hn(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Ra(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Br(e)}function v0(t){return t.split(`
83
+ `).map(Br).join(`
84
+ `)}var C0={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 E0(t,e){let r=C0[t]||Br(t),o=Ra(e),n=`_${r}-${o}`,s=Hn(t),i=B1[s],a=i?`${s}: ${e};${i}: ${e}`:`${s}: ${e}`,c=`.${n}{${a}}`;return`${n}
85
+ ${c}`}var B1={"backdrop-filter":"-webkit-backdrop-filter","user-select":"-webkit-user-select"},U1="@media (hover: hover)",V1=/(?:^|[^\\]):hover(?![\w-])/,A0=t=>typeof t=="string"&&(t.indexOf("{")!==-1||t.indexOf("}")!==-1);function T0(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||A0(i))continue;let a=C0[s]||Br(s),c=Ra(i),l=`_${a}-${c}`,f=Hn(s);r.push(l),o.push(`.${l}{${f}:${i}}`)}return r.join(" ")+"\0"+o.join(`
86
+ `)}function O0(t,e,r){let o=t+e,n=`_c${Br(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&&(A0(u)||(i+=`${Hn(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&&V1.test(c)&&(a=`${U1}{${a}}`),`${n}
87
+ ${a}`}var uy=null;function $f(t){uy=t}var Pe={structuralHash:Pf,deepEqual:If,mergeStructural:ly,overwriteDeep:fy,shortHash:Br,toKebab:Hn,sanitizeValue:Ra,batchShortHash:v0,atomicCssClass:E0,batchAtomicCss:T0,compoundCssClass:O0},R0=!1,Df=null;function P0(t){return Df||(Df=import(t||"@symbo.ls/wasm/pkg").then(e=>(e.structuralHash&&(Pe.structuralHash=e.structuralHash),e.deepEqual&&(Pe.deepEqual=e.deepEqual),e.mergeStructural&&(Pe.mergeStructural=e.mergeStructural),e.overwriteDeep&&(Pe.overwriteDeep=e.overwriteDeep),e.shortHash&&(Pe.shortHash=e.shortHash),e.toKebab&&(Pe.toKebab=e.toKebab),e.sanitizeValue&&(Pe.sanitizeValue=e.sanitizeValue),e.batchShortHash&&(Pe.batchShortHash=e.batchShortHash),e.atomicCssClass&&(Pe.atomicCssClass=e.atomicCssClass),e.batchAtomicCss&&(Pe.batchAtomicCss=e.batchAtomicCss),e.compoundCssClass&&(Pe.compoundCssClass=e.compoundCssClass),R0=!0,uy&&e.batchAtomicCss&&uy({batchAtomicCss:e.batchAtomicCss,compoundCssClass:e.compoundCssClass}),!0)).catch(e=>(console.debug("[smbls] WASM not available, using JS fallbacks:",e.message),!1)),Df)}function I0(){return R0}R();var Pa={};P(Pa,{CDN_PROVIDERS:()=>ue,DOMQL_EVENTS:()=>Dd,DOMQ_PROPERTIES:()=>yr,ENV:()=>Yd,HTML_TAGS:()=>Go,METHODS:()=>Ho,METHODS_EXL:()=>Os,NODE_ENV:()=>ve,OPTIONS:()=>Zs,PACKAGE_MANAGER_TO_CDN:()=>Cr,PARSED_DOMQ_PROPERTIES:()=>Ts,PROPS_METHODS:()=>br,STATE_METHODS:()=>to,STATE_PROPERTIES:()=>Id,SVG_TAGS:()=>Jb,TYPES:()=>ws,UNIVERSAL_RESERVED_KEYS:()=>pl,addCaching:()=>Yc,addContext:()=>Gc,addExtend:()=>xp,addExtends:()=>Kt,addItemAfterEveryElement:()=>_d,addProtoToArray:()=>vs,addRef:()=>Wc,applyCSS:()=>py,applyDependentState:()=>jp,applyEvent:()=>el,applyEventUpdate:()=>rl,applyExtends:()=>t_,applyProps:()=>qs,arrayContainsOtherArray:()=>dd,arraysEqual:()=>wd,arrayzeValue:()=>co,buildImgSrcset:()=>Pi,buildSourcesAndImg:()=>Ii,cache:()=>zp,call:()=>ah,captureSnapshot:()=>lh,checkForStateTypes:()=>Lp,checkIfInherits:()=>tl,checkIfStringIsInArray:()=>vd,clone:()=>Ld,cloneAndMergeArrayExtend:()=>Ns,cloneFunction:()=>np,concatAddExtends:()=>yp,copyJavaScriptToClipboard:()=>Oh,copyStringToClipboard:()=>Th,createBasedOnType:()=>zc,createElement:()=>$p,createElementExtends:()=>Ic,createExtends:()=>Bs,createExtendsFromKeys:()=>Yo,createExtendsStack:()=>Mc,createIfConditionFlag:()=>sp,createInheritedState:()=>Mp,createKey:()=>Ms,createNestedObject:()=>Vd,createNestedObjectByKeyPath:()=>Np,createObjectWithoutPrototype:()=>Cc,createParent:()=>qc,createPath:()=>Kc,createProps:()=>Ks,createPropsStack:()=>Vc,createRoot:()=>Dp,createScope:()=>Up,createSnapshotId:()=>Ls,customDecodeURIComponent:()=>Pd,customEncodeURIComponent:()=>Rd,cutArrayAfterValue:()=>yd,cutArrayBeforeValue:()=>md,debounce:()=>Fs,debounceOnContext:()=>ep,decodeNewlines:()=>Od,deepClone:()=>ft,deepContains:()=>Bd,deepDefaults:()=>Ci,deepDestringifyFunctions:()=>le,deepExtend:()=>Pc,deepMerge:()=>st,deepMergeExtends:()=>je,deepStringifyFunctions:()=>Rs,defineSetter:()=>sh,destringifyGlobalScope:()=>Is,detectHeightOnInit:()=>hh,detectInfiniteLoop:()=>qd,document:()=>Q,encodeNewlines:()=>Td,error:()=>io,excludeKeysFromObject:()=>Gd,exec:()=>ut,extendCachedRegistry:()=>bp,extendStackRegistry:()=>Us,extractArrayExtend:()=>Hs,fetchLibraryData:()=>bl,fibonacciNumberByIndex:()=>gh,filterArrays:()=>Sd,filterArraysFast:()=>kd,finalizeExtends:()=>Fc,findClosestNumber:()=>yl,findClosestNumberInFactory:()=>Ch,findInheritedState:()=>Qc,findKeyPosition:()=>Ed,flattenExtend:()=>Xo,formatDate:()=>ph,generateHash:()=>Tc,generateHeadArrayTags:()=>ml,generateKey:()=>$s,generateMetaTags:()=>kh,get:()=>rh,getActiveRoute:()=>Jm,getCDNDirUrl:()=>hl,getCDNUrl:()=>Ee,getCapitalCaseKeys:()=>kp,getCdnProviderFromConfig:()=>en,getChildStateInKey:()=>Zc,getChildren:()=>li,getContext:()=>mi,getCookie:()=>fp,getDB:()=>wi,getEmotionStylesheet:()=>Dh,getExtendsInElement:()=>wp,getExtendsStack:()=>js,getExtendsStackRegistry:()=>Rc,getFrequencyInArray:()=>pd,getHashedExtend:()=>Vs,getImportMapScript:()=>dh,getInObjectByPath:()=>Wd,getLocalStorage:()=>dp,getNev:()=>Qd,getPageMetadata:()=>vh,getParentStateInKey:()=>Jc,getPath:()=>fi,getQuery:()=>Si,getRef:()=>nh,getRoot:()=>pi,getRootContext:()=>gi,getRootData:()=>hi,getRootState:()=>di,getRootStateInKey:()=>Xc,getSpreadChildren:()=>vp,global:()=>ld,hasFunction:()=>Ne,hasHandlerPlugin:()=>Wo,hasOwnProperty:()=>Fd,hashContent:()=>sn,inheritChildExtends:()=>$c,inheritChildPropsExtends:()=>Dc,inheritParentProps:()=>Gs,inheritRecursiveChildExtends:()=>Lc,init:()=>lr,initProps:()=>Rp,is:()=>Wt,isArray:()=>O,isBoolean:()=>xc,isContextComponent:()=>Cp,isCyclic:()=>Kd,isDOMNode:()=>zt,isDate:()=>Sc,isDefined:()=>bt,isDevelopment:()=>xr,isEmpty:()=>kc,isEmptyObject:()=>Nd,isEqualDeep:()=>vc,isFunction:()=>A,isHtmlElement:()=>_s,isLocal:()=>Zd,isLoudDevRuntime:()=>Pt,isMalformedDependency:()=>rn,isMethod:()=>ch,isMobile:()=>cp,isNode:()=>Ze,isNot:()=>ud,isNotProduction:()=>oo,isNull:()=>wc,isNumber:()=>Fe,isObject:()=>S,isObjectLike:()=>H,isPhoto:()=>mh,isProduction:()=>_r,isStaging:()=>Jd,isState:()=>Fp,isString:()=>w,isStringFunction:()=>op,isTest:()=>Ac,isTesting:()=>Xd,isUndefined:()=>Tt,isUniversallyReservedKey:()=>fh,isUnresolvableDependency:()=>ao,isValidDependencyMap:()=>on,isValidHtmlTag:()=>hp,isWrappedLibrary:()=>Ai,joinArrays:()=>Bo,jointStacks:()=>_p,keys:()=>ul,lastLevel:()=>Rf,lastPathname:()=>Of,loadCssFile:()=>xh,loadJavascript:()=>wh,loadJavascriptFile:()=>yh,loadJavascriptFileEmbedSync:()=>_h,loadJavascriptFileSync:()=>bh,loadRemoteCSS:()=>Sh,loadRemoteScript:()=>nn,log:()=>ih,logGroupIf:()=>ap,logIf:()=>ip,lookdown:()=>th,lookdownAll:()=>eh,lookup:()=>Qp,lowercaseFirstLetter:()=>Qr,makeObjectWithoutPrototype:()=>jd,map:()=>$d,mapStringsWithContextComponents:()=>zs,matchRoute:()=>Gm,matchesComponentNaming:()=>Be,memoize:()=>rp,merge:()=>gt,mergeSharedLibraries:()=>Ti,nextElement:()=>bi,normalizeIgnoreList:()=>Ei,normalizeLibraryKey:()=>an,objectToString:()=>Ps,objectizeStringProperty:()=>Ws,overwrite:()=>Ds,overwriteDeep:()=>qt,overwriteShallow:()=>ro,overwriteState:()=>Bp,parse:()=>dl,parseDeep:()=>ai,parseQuery:()=>Ym,parseRoutePattern:()=>Km,pickupElementFromProps:()=>Bc,pickupPropsFromElement:()=>jc,previousElement:()=>_i,propExists:()=>Tp,propertizeElement:()=>Uc,propertizeUpdate:()=>Ap,reinit:()=>dy,remove:()=>E_,removeChars:()=>Rh,removeCookie:()=>up,removeDuplicateProps:()=>Xs,removeDuplicatesInArray:()=>Uo,removeFromArray:()=>hd,removeFromObject:()=>Ud,removeNestedKeyByPath:()=>Hd,removeValueFromArray:()=>ks,removeValueFromArrayAll:()=>bd,reorderArrayByValues:()=>xd,replaceLiteralsWithObjectFields:()=>Zr,replaceOctalEscapeSequences:()=>Ad,resolveAsset:()=>Gt,resolveHandler:()=>qo,resolveSharedLibraries:()=>Ah,returnValueAsText:()=>Hc,router:()=>Ke,runGuards:()=>Xm,runPluginHook:()=>At,scratchSystem:()=>wn,scratchUtils:()=>Tr,self:()=>fd,set:()=>_o,setActiveRootState:()=>ui,setCookie:()=>lp,setHashedExtend:()=>Oc,setInObjectByPath:()=>zd,setLocalStorage:()=>pp,setNodeStyles:()=>fl,setProps:()=>oh,setPropsPrototype:()=>Ys,sharedLibrary:()=>Eh,splitPackageSpecifier:()=>ki,spotByPath:()=>ci,srcsetFor:()=>cn,stringIncludesAny:()=>Es,stringToObject:()=>Md,stripVersionRangePrefix:()=>vi,swapItemsInArray:()=>gd,syncProps:()=>Js,toCamelCase:()=>Oi,toDashCase:()=>Ri,toDescriptionCase:()=>Ih,toTitleCase:()=>Ph,toggleFullscreen:()=>uh,triggerEventOn:()=>wr,triggerEventOnUpdate:()=>Vp,trimStringFromSymbols:()=>Cd,unstackArrayOfObjects:()=>Ss,update:()=>Op,updateProps:()=>Pp,variables:()=>xi,verbose:()=>Zo,warn:()=>yi,window:()=>v});R();R();var z1=C(),D0=(t=z1,e)=>{let r=S(e.localFile)?e.localFile:{},o=ft(r.designSystem||{});return st(t,o,ee)},W1={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},zn=(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},lr=(t,e=W1)=>{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=_o({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=Fi(s.font,s.files),a=s.useReset,c=s.useVariable,l=s.useFontImport,f=s.useSvgSprite,u=t.svg,d=s.useIconSprite,h=t.icons;l&&kt(i),c&&(kt({[o]:s.CSS_VARS}),s.CSS_MEDIA_VARS&&kt(zn(s.CSS_MEDIA_VARS,o))),a&&kt(s.reset);let g=s.animation;if(g){let p={};for(let m in g)p[`@keyframes ${m}`]=g[m];kt(p)}return(u||f)&&ua(s.svg,{document:e.document}),(h||d)&&bo(s.icons,{document:e.document}),s},Lf={},dy=(t,e=Lf)=>{let r=D0(t||{},e),o=e.scopeSelector||":root",n=_o({verbose:!1,...r});return e.preventInject||(kt({[o]:n.CSS_VARS}),n.CSS_MEDIA_VARS&&kt(zn(n.CSS_MEDIA_VARS,o)),kt(n.reset)),n},py=(t,e=Lf)=>{kt(t)},q1=(t,e=Lf)=>{let r=e.scopeSelector||":root";kt({[r]:t.CSS_VARS}),t.CSS_MEDIA_VARS&&kt(zn(t.CSS_MEDIA_VARS,r))};var K1=(t,e=Lf)=>{};R();var $0=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,G1=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},hy={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},Ia=(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},L0=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=hy:e.router=gt(e.router||{},hy);let r=e.router,o=async(s,i)=>{let a=s.context?.window||v,c=G1(r);if(!c){if(!a.location)return;let{pathname:f,search:u,hash:d}=a.location;f=$0(f),c=f+u+d}let l=s;if(r.customRouterElement){let f=Ia(s,r.customRouterElement);f&&(l=f,s.routes&&(l.routes=s.routes))}l.routes&&await Ke(c,l,{},{initialRender:!0,pushState:!1})},n=!Tt(t.onRenderRouter);return r&&r.initRouter&&!n&&(t.onRenderRouter=o),Y1(e,r),r},gy=(t,e)=>{if(e.router===!1)return;let r=e.router||hy;if(!r.popState)return;let o=e.utils&&e.utils.router?e.utils.router:Ke,n=e.window||v,s=async i=>{let{pathname:a,search:c,hash:l}=n.location;a=$0(a);let f=a+c+l,u=t;if(r.customRouterElement){let d=Ia(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))},Y1=(t,e)=>{let{components:r}=t;if(e&&e.injectRouterInLinkComponent)return st(r.Link||r["smbls.Link"],r.RouterLink||r["smbls.RouterLink"])};R();var my=v&&v.location?v.location.host.includes("dev."):xr(),M0=my?"http://localhost:8080/get":"https://api.symbols.app/get",X1={endpoint:M0},F0=async(t,e=X1)=>{let r=e.endpoint||M0,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)}},J1=async(t,e)=>{let{editor:r}=e;if(r&&r.remote){let o=await F0(t,r),n=my||e.isDevelopment?le(o):le(o.releases[0]);r.serviceRoute?O(r.serviceRoute)?r.serviceRoute.forEach(s=>{qt(e[s],n[s.toLowerCase()])}):qt(e[r.serviceRoute],n):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{qt(e[s],n[s.toLowerCase()])})}return e},Z1=async(t,e,r)=>{let{editor:o}=e;if(o&&o.remote){let n=await F0(t,o),s=my||e.isDevelopment?le(n):le(n.releases[0]);r(s)}},N0=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await J1(t,e)}catch(r){console.error(r)}},j0=(t,e,r,o)=>{if(e&&r.editor)try{r.editor.async&&Z1(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 Da=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{Nr(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 _y={};P(_y,{Helmet:()=>V0,applyMetadata:()=>Wn,default:()=>nO,extractMetadata:()=>eO,generateHeadHtml:()=>oO,helmetPlugin:()=>by,resolveMetadata:()=>Ur});R();var Q1={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"}},tO=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}"]`},B0=t=>le({v:t}).v,U0=(t,e,r,o)=>{try{return ut(t,e,r)}catch(n){console.warn(`[helmet] metadata factory for "${o}" threw; treating as unset:`,n&&n.message||n);return}},Ur=(t,e,r)=>{if(!t)return{};let o=t;w(o)&&Ne(o)&&(o=B0(o));let n=A(o)?U0(o,e,r,"metadata"):S(o)?{...o}:{};if(!S(n))return{};for(let s in n){let i=n[s];w(i)&&Ne(i)&&(i=B0(i)),A(i)?i=U0(i,e,r,s):w(i)&&Ne(i)&&(i=void 0),w(i)&&i.includes("{{")&&e?.call&&(i=e.call("replaceLiteralsWithObjectFields",i,r)),n[s]=i}return n},eO=(t,e="/",r,o)=>{let s=(t.pages||{})[e],i={};if(t.integrations?.seo&&(i={...t.integrations.seo}),t.app?.metadata){let c=Ur(t.app.metadata,r,o);i={...i,...c}}let a=new Set;if(s){let c=s.metadata||s.helmet||{},l=Ur(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},rO=(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},$a=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)},yy=(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))}},Wn=(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=Q1[r];if(!n)continue;let s=tO(n),i=e.querySelector(s)||rO(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($a);yy(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($a);yy(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));yy(e,"data-smbls-script",o,n=>{let s=o.indexOf(n),i=r[s],a=e.createElement("script");return w(i)?a.setAttribute("src",i):(i.src&&a.setAttribute("src",i.src),i.type&&a.setAttribute("type",i.type),i.async&&(a.async=!0),i.defer&&(a.defer=!0),i.integrity&&a.setAttribute("integrity",i.integrity),i.crossorigin&&a.setAttribute("crossorigin",i.crossorigin),i.referrerpolicy&&a.setAttribute("referrerpolicy",i.referrerpolicy),i.nomodule&&(a.noModule=!0),i.body&&(a.textContent=String(i.body))),a})}}},ct=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,r=>e[r])},oO=t=>{let e=['<meta charset="UTF-8">'],r=new Set(["charset","jsonLd","styles","scripts"]),o=!1;for(let[n,s]of Object.entries(t)){if(!s&&s!==0&&s!==!1||r.has(n)||typeof s=="function")continue;if(n==="title"){e.push(`<title>${ct(s)}</title>`);continue}if(n==="viewport"){o||(e.push(`<meta name="viewport" content="${ct(s)}">`),o=!0);continue}if(n==="canonical"){e.push(`<link rel="canonical" href="${ct(s)}">`);continue}if(n==="icon"||n==="favicon"){let f=ct(s),u=f.endsWith(".svg")?' type="image/svg+xml"':f.endsWith(".png")?' type="image/png"':"";e.push(`<link rel="icon" href="${f}"${u}>`);continue}if(n==="favicons"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${ct(h)}"`).join(" ");e.push(`<link rel="icon" ${u}>`)}else typeof f=="string"&&e.push(`<link rel="icon" href="${ct(f)}">`)});continue}if(n==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(typeof f=="object"){let u=Object.entries(f).map(([d,h])=>`${d}="${ct(h)}"`).join(" ");e.push(`<link rel="alternate" ${u}>`)}});continue}let i=["og:","article:","product:","fb:","profile:","book:","business:","music:","video:"],a=["twitter:","DC:","DCTERMS:"],c=i.some(f=>n.startsWith(f)),l=a.some(f=>n.startsWith(f));if(n.startsWith("http-equiv:")){let f=n.replace("http-equiv:","");e.push(`<meta http-equiv="${ct(f)}" content="${ct(s)}">`)}else if(n.startsWith("itemprop:")){let f=n.replace("itemprop:","");e.push(`<meta itemprop="${ct(f)}" content="${ct(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>e.push(`<meta property="${ct(n)}" content="${ct(f)}">`)):e.push(`<meta property="${ct(n)}" content="${ct(s)}">`):l?e.push(`<meta name="${ct(n)}" content="${ct(s)}">`):Array.isArray(s)?s.forEach(f=>e.push(`<meta name="${ct(n)}" content="${ct(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.push(`<meta name="${ct(n)}" content="${ct(s)}">`)}if(o||e.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),Array.isArray(t.jsonLd))for(let n of t.jsonLd){if(n==null)continue;let s=typeof n=="string"?n:JSON.stringify(n),i=String(s).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${$a(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="${$a(s)}">${s}</style>`)}if(Array.isArray(t.scripts))for(let n of t.scripts){if(!n)continue;let s=typeof n=="string",i=s?n:n.src;if(!i&&!(n&&n.body))continue;let a=[];i&&a.push(`src="${ct(i)}"`),s||(n.type&&a.push(`type="${ct(n.type)}"`),n.async&&a.push("async"),n.defer&&a.push("defer"),n.integrity&&a.push(`integrity="${ct(n.integrity)}"`),n.crossorigin&&a.push(`crossorigin="${ct(n.crossorigin)}"`),n.referrerpolicy&&a.push(`referrerpolicy="${ct(n.referrerpolicy)}"`),n.nomodule&&a.push("nomodule"));let c=` data-smbls-script="${ct(i||$a(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
+ `)},V0={define:{metadata:(t,e,r)=>{let o=e.context?.document||typeof document<"u"&&document;if(!o)return;let n=Z(()=>{let s=Ur(t,e,e.state);Wn(s,o);let i=e.state?.root;S(i)&&(i.$helmet=s)});e.__ref?.__effects&&e.__ref.__effects.push(n)}}},by={name:"helmet",create(t){if(!t.metadata)return;let e=t.context?.document||typeof document<"u"&&document;if(!e)return;let r=Z(()=>{let o=t.metadata;if(!o)return;let n=Ur(o,t,t.state);Wn(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=Ur(e,t,t.state);Wn(o,r)}},nO=V0;kr();var H0=(t,e,r,o)=>{t&&ii(t,e,r,o)},z0=(t,e,r)=>{if(!t)return;let o=e.context?.document||typeof document<"u"&&document;if(!o)return;let n=Ur(t,e,r);Wn(n,o)},W0=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},qn={routes:t=>t,metadata:z0,fetch:H0,$router:W0},q0=(t={})=>{let e={routes:r=>r};return t.metadata!==!1&&(e.metadata=z0),t.fetch!==!1&&(e.fetch=H0),t.router!==!1&&(e.$router=W0),e};var xy={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},Mf={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},Ff={...xy,router:Mf},sO={state:{},pages:{},components:{},router:Mf,define:qn},Vr=sO;R();R();var K0=(t,e)=>H(t.extends)?t.extends:[];R();var wy={};P(wy,{default:()=>cO,getActiveLang:()=>Gn,getLanguages:()=>Ma,getLocalStateLang:()=>Ua,initPolyglot:()=>jf,loadTranslations:()=>Na,polyglotPlugin:()=>Yn,setLang:()=>ja,translate:()=>Fa,upsertTranslation:()=>Ba});R();var Y0="smbls_lang",iO="smbls_t_",aO="smbls_tv_",Kn={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)}}},La={};function Gn(){let t=this?.context,e=t?.polyglot;return(this?.state?.root||t?.state?.root)?.lang||e?.defaultLang||"en"}function Ma(){let t=this?.context?.polyglot;return t?t.languages?t.languages:t.translations?Object.keys(t.translations):[]:[]}var Nf=(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},G0=(t,e,r)=>{let o=e.lastIndexOf(".");if(o===-1)return t[e+"_"+r];let n=Nf(t,e.substring(0,o));if(n!=null)return n[e.substring(o+1)+"_"+r]};function Fa(t,e){if(!t)return"";let r=this?.context,o=r?.polyglot,n=e||this.call("getActiveLang"),s=this?.state;if(s){let l=G0(s,t,n);if(l!==void 0)return l}if(o?.translations){let l=o.translations[n];if(l){let f=Nf(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=Nf(l,t);if(f!==void 0)return f}}let c=o?.defaultLang||"en";if(s){let l=G0(s,t,c);if(l!==void 0)return l}if(o?.translations){let l=o.translations[c];if(l){let f=Nf(l,t);if(f!==void 0)return f}}return t}async function Na(t){let e=this?.context,r=e?.polyglot,o=this?.state?.root||e?.state?.root;if(!r||!o)return;let n=r.storagePrefix||iO,s=r.storageVersionPrefix||(r.storagePrefix?r.storagePrefix.replace(/_$/,"v_"):aO);if(r.translations&&r.translations[t]&&!r.fetch||!r.fetch||r._fetchFailed?.[t])return;if(!o.translations?.[t]){let c=Kn.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(La[i])return La[i];let a=this;return La[i]=(async()=>{try{let c=r.fetch,l=parseInt(Kn.get(s+t),10)||0,f,u,d;if(A(c)){let g=await c(t,l,a);if(!g||g.changed===!1)return;f=g.translations||g.data||g,u=g.version||0,d=!0}else if(S(c)){let g=a.getDB||(()=>e.fetch),p=A(g)?await g.call(a):e.fetch;if(!p)return;let m=c.rpc||c.from||"get_translations_if_changed",b={p_lang:t,p_cached_version:l,...c.params||{}},_=await p.rpc({from:m,params:b});if(_.error)throw r._fetchFailed||(r._fetchFailed={}),r._fetchFailed[t]=!0,_.error;let y=_.data;if(!y||!y.changed)return;f=y.translations||{},u=y.version||0,d=!0}else return;if(!d||!f)return;Kn.set(n+t,JSON.stringify(f)),u&&Kn.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 La[i]}})(),La[i]}async function ja(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||Y0;Kn.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 Ba(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 jf(){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||Y0,s=Kn.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 Ua(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 Yn={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,jf.call(t))}},cO=Yn;kr();var ky={};P(ky,{SYSTEM_METRICS:()=>Va,capsizeHandler:()=>Sy,capsizePlugin:()=>Uf,computeCapsize:()=>X0,default:()=>lO,resolveFontSizePx:()=>J0,resolveMetrics:()=>Z0});var Va={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}},Bf=t=>parseFloat(t.toFixed(4)),X0=(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:`${Bf(t/16)}rem`,lineHeight:`${Bf(f)}px`,capHeightTrim:`${Bf(-h)}em`,baselineTrim:`${Bf(-g)}em`}},J0=(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},Z0=(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(Va[i])return Va[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(Va[a])return Va[a]}}return null},Sy=(t,e,r,o)=>{if(!t)return;let n=J0(e.fontSize,o);if(!n)return;let s=Z0(e.fontFamily,o);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=X0(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},Uf={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},lO=Uf;var Ry={};P(Ry,{PRESERVE_VALUE_KEYS:()=>$t,SKIP_INLINE_KEYS:()=>Hr,abbrToProp:()=>Dt,decode:()=>ok,encode:()=>tk,expand:()=>vo,isComponentKey:()=>Ie,isSelectorKey:()=>De,parse:()=>Co,parseFurther:()=>Ao,propToAbbr:()=>Se,shorten:()=>Ha,shorthandPlugin:()=>za,stringify:()=>ko,stringifyFurther:()=>Eo});var Se={attr:"at",childExtends:"cex",childExtendsRecursive:"cexr",childProps:"cp",children:"ch",childrenAs:"cha",class:"cl",content:"cnt",context:"ctx",data:"dt",extends:"ext",hide:"hd",html:"htm",if:"if",ignoreChildExtends:"icex",key:"ky",query:"qy",routes:"rt",scope:"scp",show:"shw",state:"st",style:"sy",tag:"tg",text:"tx",align:"aln",boxSize:"bsz",flow:"fl",heightRange:"hr",horizontalInset:"hi",round:"rnd",shadow:"shd",size:"sz",templateColumns:"tcol",verticalInset:"vi",widthRange:"wr",wrap:"wrp",aspectRatio:"ar",blockSize:"bks",boxSizing:"bxs",height:"h",inlineSize:"ins",margin:"m",marginBottom:"mb",marginLeft:"ml",marginRight:"mr",marginTop:"mt",maxBlockSize:"mxbs",maxHeight:"mxh",maxInlineSize:"mxis",maxWidth:"mxw",minBlockSize:"mnbs",minHeight:"mnh",minInlineSize:"mnis",minWidth:"mnw",padding:"p",paddingBottom:"pb",paddingInline:"pil",paddingLeft:"pl",paddingRight:"pr",paddingTop:"pt",width:"w",alignContent:"ac",alignItems:"ai",alignSelf:"as",flex:"fx",flexBasis:"fxb",flexDirection:"fxd",flexFlow:"fxf",flexGrow:"fxg",flexShrink:"fxs",flexWrap:"fxw",gap:"g",justifyContent:"jc",justifyItems:"ji",justifySelf:"js",order:"od",placeContent:"pcn",placeItems:"pit",placeSelf:"psl",rowGap:"rg",columnGap:"cg",gridArea:"ga",gridAutoColumns:"gac",gridAutoFlow:"gaf",gridAutoRows:"gar",gridColumn:"gc",gridColumnEnd:"gce",gridColumnStart:"gcs",gridRow:"gr",gridRowEnd:"gre",gridRowStart:"grs",gridTemplateAreas:"gta",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",bottom:"bot",float:"flt",inset:"ist",left:"lft",position:"pos",right:"rgt",top:"tp",zIndex:"zi",clear:"clr",contain:"ctn",cursor:"cur",display:"d",opacity:"op",overflow:"ov",overflowX:"ovx",overflowY:"ovy",pointerEvents:"pe",resize:"rsz",userSelect:"us",visibility:"vis",background:"bg",backgroundAttachment:"bga",backgroundBlendMode:"bgbm",backgroundClip:"bgcl",backgroundColor:"bgc",backgroundImage:"bgi",backgroundOrigin:"bgo",backgroundPosition:"bgp",backgroundPositionX:"bgpx",backgroundPositionY:"bgpy",backgroundRepeat:"bgr",backgroundRepeatX:"bgrx",backgroundRepeatY:"bgry",backgroundSize:"bgs",color:"c",theme:"thm",themeModifier:"thmm",border:"bd",borderBottom:"bdb",borderBottomLeftRadius:"bdblr",borderBottomRightRadius:"bdbrr",borderCollapse:"bdcl",borderColor:"bdc",borderImage:"bdi",borderImageOutset:"bdio",borderImageRepeat:"bdir",borderImageSlice:"bdis",borderImageSource:"bdisrc",borderImageWidth:"bdiw",borderLeft:"bdl",borderRadius:"bdr",borderRight:"bdrg",borderSpacing:"bdsp",borderStyle:"bdst",borderTop:"bdt",borderTopLeftRadius:"bdtlr",borderTopRightRadius:"bdtrr",borderWidth:"bdw",outline:"ol",outlineColor:"olc",outlineOffset:"olo",outlineStyle:"ols",outlineWidth:"olw",boxShadow:"bxsh",textShadow:"txsh",direction:"dir",fontDisplay:"fdi",fontFamily:"ff",fontFeatureSettings:"ffs",fontKerning:"fk",fontOpticalSizing:"fos",fontPalette:"fpl",fontSize:"fs",fontSizeAdjust:"fsa",fontSmooth:"fsm",fontStretch:"fsr",fontStyle:"fsy",fontSynthesis:"fsyn",fontVariant:"fv",fontVariationSettings:"fvs",fontWeight:"fw",hyphens:"hyp",letterSpacing:"ls",lineHeight:"lh",tabSize:"tsz",textAlign:"ta",textDecoration:"td",textDecorationColor:"tdc",textDecorationLine:"tdl",textDecorationStyle:"tds",textIndent:"ti",textOverflow:"tov",textStroke:"tsk",textTransform:"tt",unicodeBidi:"ub",verticalAlign:"va",whiteSpace:"ws",wordBreak:"wbr",wordSpacing:"wsp",wordWrap:"wwr",writingMode:"wm",captionSide:"cps",counterIncrement:"ci",counterReset:"cr",emptyCells:"ec",listStyle:"lst",listStyleImage:"lsi",listStylePosition:"lsp",listStyleType:"lsty",quotes:"qt",tableLayout:"tl",columnCount:"cc",columnFill:"cf",columnRule:"crl",columnRuleColor:"crlc",columnRuleStyle:"crls",columnRuleWidth:"crlw",columnSpan:"cspn",columnWidth:"cwi",columns:"col",backdropFilter:"bdf",boxDecorationBreak:"bxdb",clipPath:"cpth",filter:"fil",isolation:"iso",mixBlendMode:"mbm",objectFit:"obf",objectPosition:"obp",perspective:"prs",perspectiveOrigin:"prso",willChange:"wc",transform:"tf",transformOrigin:"tfo",transformStyle:"tfs",transition:"trn",transitionDelay:"trnd",transitionDuration:"trndr",transitionProperty:"trnp",transitionTimingFunction:"trntf",animation:"an",animationDelay:"and",animationDirection:"andr",animationDuration:"andur",animationFillMode:"anfm",animationIterationCount:"anic",animationName:"ann",animationPlayState:"anps",animationTimingFunction:"antf",scrollBehavior:"sb",scrollMargin:"smr",scrollMarginBottom:"smrb",scrollMarginLeft:"smrl",scrollMarginRight:"smrr",scrollMarginTop:"smrt",scrollPadding:"spd",scrollPaddingBottom:"spdb",scrollPaddingLeft:"spdl",scrollPaddingRight:"spdr",scrollPaddingTop:"spdt",scrollSnapAlign:"ssa",scrollSnapStop:"sss",scrollSnapType:"sst",breakAfter:"bka",breakBefore:"bkb",breakInside:"bki",pageBreakAfter:"pbka",pageBreakBefore:"pbkb",pageBreakInside:"pbki",accessKey:"ack",className:"cn",contentEditable:"ced",contextMenu:"cmu",draggable:"drg",hidden:"hid",id:"id",is:"is",lang:"lng",nonce:"nnc",spellCheck:"spc",tabIndex:"tbi",title:"ttl",translate:"trl",accept:"acp",acceptCharset:"accs",action:"act",autoComplete:"atc",autoFocus:"atf",capture:"cap",challenge:"chg",checked:"chk",cols:"cls",colSpan:"csn",controls:"ctl",default:"def",defer:"dfr",disabled:"dis",encType:"ect",form:"frm",formAction:"fac",formEncType:"fect",formMethod:"fme",formNoValidate:"fnv",formTarget:"ftg",high:"hgh",inputMode:"imd",kind:"knd",label:"lbl",list:"lis",loop:"lp",low:"lw",max:"mx",maxLength:"mxl",method:"mtd",min:"mn",minLength:"mnl",multiple:"mul",muted:"mut",name:"nm",open:"opn",optimum:"opt",pattern:"ptn",placeholder:"phd",readOnly:"ro",required:"req",reversed:"rev",rows:"rws",rowSpan:"rsn",selected:"sel",span:"spn",start:"srt",step:"stp",type:"typ",value:"val",download:"dl",href:"hrf",hrefLang:"hrl",ping:"png",referrerPolicy:"rfp",rel:"rl",target:"tgt",allow:"alw",allowFullScreen:"afs",allowPaymentRequest:"apr",alt:"alt",cellPadding:"cpg",cellSpacing:"csg",cite:"cit",coords:"crd",crossOrigin:"cor",dateTime:"dtm",fetchPriority:"fpr",headers:"hds",httpEquiv:"hte",integrity:"itg",isMap:"ism",keyType:"kty",loading:"ldg",manifest:"mft",media:"mda",poster:"pst",preload:"prl",radioGroup:"rdg",sandbox:"sbx",scoped:"scod",seamless:"sml",shape:"shp",sizes:"szs",src:"src",srcDoc:"srd",srcLang:"srl",srcSet:"srs",useMap:"ump",ariaActiveDescendant:"aad",ariaAtomic:"aat",ariaBusy:"abu",ariaChecked:"achk",ariaControls:"acl",ariaCurrent:"acr",ariaDescribedBy:"adb",ariaDetails:"adt",ariaDisabled:"adis",ariaDropEffect:"ade",ariaErrorMessage:"aem",ariaExpanded:"aexp",ariaGrabbed:"agr",ariaHasPopup:"ahp",ariaHidden:"ahid",ariaInvalid:"ainv",ariaLabel:"alb",ariaLabelledBy:"alby",ariaLive:"alv",ariaModal:"amod",ariaMultiSelectable:"ams",ariaOrientation:"aor",ariaOwns:"aow",ariaPosInSet:"apis",ariaPressed:"aprs",ariaReadOnly:"aro",ariaRelevant:"arl",ariaRequired:"areq",ariaSelected:"asel",ariaSetSize:"assz",ariaValueMax:"avmx",ariaValueMin:"avmn",ariaValueNow:"avn",role:"role",onInit:"@in",onRender:"@rn",onUpdate:"@up",onStateChange:"@sc",onStateUpdate:"@su",onClick:"@ck",onContextMenu:"@cm",onDblClick:"@dc",onMouseDown:"@md",onMouseEnter:"@me",onMouseLeave:"@ml",onMouseMove:"@mm",onMouseOut:"@mo",onMouseOver:"@mv",onMouseUp:"@mu",onKeyDown:"@kd",onKeyPress:"@kp",onKeyUp:"@ku",onBlur:"@bl",onFocus:"@fc",onFocusIn:"@fi",onFocusOut:"@fo",onBeforeInput:"@bi",onChange:"@cg",onFormData:"@fd",onInput:"@ip",onInvalid:"@iv",onReset:"@rs",onSearch:"@sr",onSelect:"@sl",onSubmit:"@sm",onTouchCancel:"@tc",onTouchEnd:"@te",onTouchMove:"@tm",onTouchStart:"@ts",onPointerCancel:"@pc",onPointerDown:"@pd",onPointerEnter:"@pe",onPointerLeave:"@ple",onPointerMove:"@pm",onPointerOut:"@po",onPointerOver:"@pov",onPointerUp:"@pu",onDrag:"@dg",onDragEnd:"@dge",onDragEnter:"@dgn",onDragLeave:"@dgl",onDragOver:"@dgo",onDragStart:"@dgs",onDrop:"@dp",onResize:"@rz",onScroll:"@scl",onWheel:"@wh",onCopy:"@cy",onCut:"@ct",onPaste:"@pt",onCompositionEnd:"@cpe",onCompositionStart:"@cps",onCompositionUpdate:"@cpu",onAnimationEnd:"@ae",onAnimationIteration:"@ai",onAnimationStart:"@as",onTransitionEnd:"@tre",onTransitionStart:"@trs",onAbort:"@ab",onCanPlay:"@cap",onCanPlayThrough:"@cpt",onDurationChange:"@duc",onEmptied:"@em",onEncrypted:"@enc",onEnded:"@end",onError:"@er",onLoad:"@ld",onLoadedData:"@ldd",onLoadedMetadata:"@ldm",onPause:"@pa",onPlay:"@pl",onPlaying:"@plg",onProgress:"@prg",onRateChange:"@rc",onSeeked:"@sk",onSeeking:"@skg",onStalled:"@stl",onSuspend:"@ssp",onTimeUpdate:"@tu",onVolumeChange:"@vc",onWaiting:"@wt",icon:"ico",iconText:"ict",lookup:"lkp",router:"rtr",shapeModifier:"shpm"},Dt=Object.create(null);for(let t in Se)Dt[Se[t]]=t;var vy=Object.create(null);for(let t in Se){let e=Se[t];if(vy[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${vy[e]}"`);vy[e]=t}var $t=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),Hr=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function Ie(t){return/^[A-Z]/.test(t)}function De(t){return/^[:@.!$>&]/.test(t)||t.startsWith("> ")}function tk(t){if(!t||typeof t!="object")return"";let e=[];for(let r in t){let o=t[r];if(typeof o=="function"||o!==null&&typeof o=="object"&&!Array.isArray(o)||o===void 0)continue;let n=Se[r]||r;if(o===!0)e.push(n);else if(o===!1)e.push("!"+n);else if(Array.isArray(o)){let s=o.map(i=>Vf(i));e.push(n+":"+s.join(","))}else e.push(n+":"+Vf(o))}return e.join(" ")}function Vf(t){return String(t).replace(/ /g,"_")}function Ha(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Ha(r):r});let e={};for(let r in t){let o=t[r];if(Ie(r)){e[r]=Cy(o);continue}if(De(r)){e[r]=Cy(o);continue}let n=Se[r]||r;if($t.has(r)||$t.has(n)){e[n]=o;continue}e[n]=Cy(o)}return e}function Cy(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Ha(e):e}):typeof t=="object"?Ha(t):t}function ko(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(o){return o!==null&&typeof o=="object"?ko(o):o});let e={},r=[];for(let o in t){let n=t[o];if(Ie(o)){e[o]=Q0(n);continue}if(De(o)){e[o]=Q0(n);continue}let s=Se[o]||o;if($t.has(o)||$t.has(s)){e[s]=n;continue}if(typeof n=="function"){e[s]=n;continue}if(n==null){e[s]=n;continue}if(Hr.has(o)||Hr.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"?ko(a):a});continue}if(n.length<=1){e[s]=n;continue}r.push(s+":"+n.map(Vf).join(","));continue}if(typeof n=="object"){e[s]=ko(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+":"+Vf(n))}return r.length&&(e.in=r.join(" ")),e}function Q0(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}function ok(t){if(!t||typeof t!="string")return{};let e={},r=nk(t);for(let o of r){if(o.startsWith("!")){let c=o.slice(1),l=Dt[c]||c;e[l]=!1;continue}let n=o.indexOf(":");if(n===-1){let c=Dt[o]||o;e[c]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(ek);continue}e[a]=ek(i)}return e}function nk(t){return t.trim().split(/\s+/).filter(Boolean)}function ek(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function rk(t){return t.replace(/_/g," ")}function fO(t){if(!t||typeof t!="string")return{};let e={},r=nk(t);for(let o of r){if(o.startsWith("!")){let c=o.slice(1),l=Dt[c]||c;e[l]=!1;continue}let n=o.indexOf(":");if(n===-1){let c=Dt[o]||o;e[c]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s;if(i.includes(",")){e[a]=i.split(",").map(rk);continue}e[a]=rk(i)}return e}function vo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?vo(r):r});let e={};for(let r in t){let o=t[r];if(Ie(r)){e[r]=Ey(o);continue}let n=Dt[r]||r;if(De(r)&&n===r){e[r]=Ey(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=Ey(o)}return e}function Ey(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?vo(e):e}):typeof t=="object"?vo(t):t}function Co(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Co(r):r});let e={};if(typeof t.in=="string"){let r=fO(t.in);for(let o in r)e[o]=r[o]}for(let r in t){if(r==="in")continue;let o=t[r];if(Ie(r)){e[r]=Ay(o);continue}let n=Dt[r]||r;if(De(r)&&n===r){e[r]=Ay(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=Ay(o)}return e}function Ay(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Co(e):e}):typeof t=="object"?Co(t):t}function sk(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function uO(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 dO(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 ik(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 Eo(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(o){return o!==null&&typeof o=="object"?Eo(o):o});let e={},r=[];for(let o in t){let n=t[o];if(Ie(o)){let i=ak(n);e[o]=ik(i)?i.in:i;continue}if(De(o)){let i=ak(n);e[o]=ik(i)?i.in:i;continue}let s=Se[o]||o;if($t.has(o)||$t.has(s)){e[s]=n;continue}if(typeof n=="function"){e[s]=n;continue}if(n==null){e[s]=n;continue}if(Hr.has(o)||Hr.has(s)){e[s]=n;continue}if(Array.isArray(n)){if(n.some(function(a){return a!==null&&typeof a=="object"})){e[s]=n.map(function(a){return a!==null&&typeof a=="object"?Eo(a):a});continue}if(n.length<=1){e[s]=n;continue}r.push(s+":"+n.map(sk).join(","));continue}if(typeof n=="object"){e[s]=Eo(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+":"+sk(n))}return r.length&&(e.in=r.join(" ")),e}function ak(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Eo(e):e}):typeof t=="object"?Eo(t):t}function ck(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):uO(t)}function Ty(t){if(!t||typeof t!="string")return{};let e={},r=t.trim().split(/\s+/).filter(Boolean);for(let o of r){if(o.startsWith("!")){let l=o.slice(1),f=Dt[l]||l;e[f]=!1;continue}let n=o.indexOf(":");if(n===-1){let l=Dt[o]||o;e[l]=!0;continue}let s=o.slice(0,n),i=o.slice(n+1),a=Dt[s]||s,c=dO(i);if(c.length>1){e[a]=c.map(ck);continue}e[a]=ck(i)}return e}function Ao(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?Ao(r):r});let e={};if(typeof t.in=="string"){let r=Ty(t.in);for(let o in r)e[o]=r[o]}for(let r in t){if(r==="in")continue;let o=t[r];if(Ie(r)){typeof o=="string"?e[r]=Ty(o):e[r]=Oy(o);continue}let n=Dt[r]||r;if(De(r)&&n===r){typeof o=="string"?e[r]=Ty(o):e[r]=Oy(o);continue}if($t.has(n)||$t.has(r)){e[n]=o;continue}e[n]=Oy(o)}return e}function Oy(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Ao(e):e}):typeof t=="object"?Ao(t):t}var pO={shorten:vo,stringify:Co,stringifyFurther:Ao};function hO(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 gO=["components","pages","snippets"],za={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let o=pO[e===!0?"shorten":e];if(o){for(let n of gO)t[n]&&(t[n]=hO(t[n],o));t.app&&typeof t.app=="object"&&(t.app=o(t.app))}}};var Vy={};P(Vy,{LEVELS:()=>Wa,analyzePlugin:()=>Jn,attachBrowserListeners:()=>Jf,attachNetworkListeners:()=>Ka,classifyEvent:()=>Fy,createAnalyzeState:()=>Zf,createBeaconSink:()=>By,createConsoleSink:()=>Ny,createDedupe:()=>$y,createEnrich:()=>Iy,createMemorySink:()=>jy,createPipeline:()=>qf,createRedact:()=>Wf,createRemoteSink:()=>Gf,createSample:()=>Ly,createSummarize:()=>Dy,default:()=>Jn,emitFetchEvent:()=>mk,makeEvent:()=>X,meetsLevel:()=>Hf,normalizeLevel:()=>qa,resolveSinks:()=>Xf,summarizeElement:()=>To});var mO=0,yO=()=>`${Date.now().toString(36)}-${(mO++).toString(36)}`,X=(t,e,r={})=>({id:yO(),ts:Date.now(),type:t,level:e,...r}),bO=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(" > ")},To=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:bO(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var Xn=t=>t?.context?.analyze,_O={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"}},xO=(t,{category:e,type:r,level:o})=>n=>{let s=Xn(n);!s||!s.shouldCapture(e)||s.emit(X(r,o,{hook:t,element:To(n)}))},lk=t=>(e,r)=>{let o=Xn(e);!o||!o.shouldCapture("state")||o.emit(X("state","debug",{hook:t,element:To(e),changedKeys:r?.changedKeys||null}))},Jn={name:"analyze",error(t,e){let r=Xn(t);if(!r||r.config.enabled===!1||!r.shouldCapture("errors"))return;let o=e?.error||e?.err||(e instanceof Error?e:null);r.emit(X("error","error",{hook:e?.hook||"error",element:To(t),error:o,message:o?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=Xn(t);e&&(!e.shouldCapture("navigation")&&!e.shouldCapture("lifecycle")||e.emit(X("navigation","info",{hook:"renderRouter",route:t.context?.routerOptions?.currentRoute||null})))},beforeUpdate(t){let e=Xn(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=Xn(t);if(!e||!e.shouldCapture("updates"))return;let r=null;t.__ref?.__analyzeUpdateStart!=null&&(r=(typeof performance<"u"?performance.now():Date.now())-t.__ref.__analyzeUpdateStart,t.__ref.__analyzeUpdateStart=null),e.emit(X("update","debug",{hook:"update",element:To(t),durationMs:r}))},beforeStateUpdate:lk("beforeStateUpdate"),stateUpdate:lk("stateUpdate")};for(let[t,e]of Object.entries(_O))Jn[t]=xO(t,e);R();var Wa={error:0,warn:1,info:2,debug:3,trace:4};var Hf=(t,e)=>{let r=Wa[t],o=Wa[e];return r==null||o==null?!0:r<=o},qa=t=>Wa[t]!=null?t:"warn";R();var zf=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var wO=(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},SO=(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"***"}},Py=(t,e,r,o)=>{if(o>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>Py(s,e,r,o+1));let n={};for(let s of Object.keys(t))if(wO(s,e)||zf.test(s)){let a=SO(t[s],r);a!==void 0&&(n[s]=a)}else n[s]=Py(t[s],e,r,o+1);return n},Wf=(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=Py(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 Iy=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}}}},Dy=()=>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},$y=(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}},Ly=t=>e=>{if(!e)return e;let r=t[e.type];return r==null||r>=1?e:Math.random()>r?null:e},fk={redact:t=>Wf(t.config.redact||[],t.config.maskStrategy),enrich:t=>Iy(t),summarize:()=>Dy(),dedupe:t=>$y(t.config.cache?.dedupeWindowMs||1e3),sample:t=>Ly(t.config.sample||{})},kO=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let r=fk[t];return r?r(e):null}return null},qf=t=>{let e=t.config,r=Array.isArray(e.transformers)?e.transformers.slice():[],o=r.findIndex(s=>s==="redact");o>=0&&r.splice(o,1);let n=[];e.redact!==!1&&n.push(fk.redact(t));for(let s of r){let i=kO(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 Kf=typeof v<"u"&&typeof v.document<"u",vO=5e3,CO=50,EO=3,AO=1500,TO=1e3,Fy=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",OO=t=>{try{return JSON.stringify(t)}catch{return null}},RO=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},PO=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}},IO=()=>{if(!Kf)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(!Kf)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:PO(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:RO(),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:IO()}},Gf=(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:Fy,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:vO,b=t.maxBatch||CO,_=t.maxRetries!=null?t.maxRetries:EO,y=t.backoffMs||AO,x=t.queueLimit||TO,k=t.sampleRate!=null?t.sampleRate:1,E=()=>typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,T=t.sessionId||E(),$=[],D=[],I=null,z=null,V=()=>{I||!$.length||(I=setTimeout(K,m))},rt=L=>{if(z)return;let ot=y*Math.pow(2,Math.max(0,L-1));z=setTimeout(()=>{if(z=null,!D.length)return;let U=D.shift();G(U.envelope,U.attempt)},ot)},at=(L,ot=!1)=>{let U=u?My(u):null,Y={id:T,sentAt:Date.now()};ot&&(Y.endedAt=Date.now());let j={v:1,session:Y,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:DO(),user:U?.user||null,traits:U?.traits||null,tags:U?.tags||null,events:L};if((p?My(p)===!0:g)&&(j.app.debug=!0),h)try{return h(j)||null}catch{return j}return j},G=async(L,ot=1)=>{if(L)try{let U=!0;if(r){let Y=await r(L);U=Y!==!1&&Y?.ok!==!1}else U=await $O(e,L,{apiKey:n,getAuth:f});!U&&ot<_&&(D.push({envelope:L,attempt:ot+1}),rt(ot+1))}catch{ot<_&&(D.push({envelope:L,attempt:ot+1}),rt(ot+1))}},K=(L=!1,ot=!1)=>{if(I&&(clearTimeout(I),I=null),!$.length&&!ot)return;let U=$;$=[];let Y=at(U,ot);if(Y){if(L&&Kf){if(typeof o=="function"&&My(()=>o(Y)))return;if(navigator.sendBeacon&&e){let j=OO(Y);if(j)try{navigator.sendBeacon(e,new v.Blob([j],{type:"application/json"}));return}catch{}}}G(Y)}},lt=!1,Vt=()=>{lt||(lt=!0,K(!0,!0))};Kf&&(v.addEventListener("pagehide",Vt,{passive:!0}),v.addEventListener("beforeunload",Vt,{passive:!0}),v.addEventListener("visibilitychange",()=>{v.document.visibilityState==="hidden"&&K(!0)},{passive:!0}));let W=L=>{if(!L||k<1&&Math.random()>k)return;lt&&(lt=!1);let ot={...L,log_type:d(L)};$.push(ot),$.length>x&&($=$.slice(-x)),$.length>=b?K():V()},wt=L=>(K(!1,!0),T=L||E(),lt=!1,W.sessionId=T,T);return W.flush=()=>K(!1),W.endSession=Vt,W.startNewSession=wt,W.sessionId=T,W},My=t=>{try{return t()}catch{return null}},$O=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 LO={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},MO="\x1B[0m",Yf=typeof v<"u"&&typeof v.document<"u",Ny=(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(Yf)i(a,s);else{let c=LO[s.level]||"";i(`${c}${a}${MO}`,s)}}},jy=(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},By=(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=Yf?new v.Blob([c],{type:"application/json"}):c;if(Yf&&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(()=>{})};Yf&&(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},uk={console:Ny,memory:jy,beacon:By,remote:Gf},dk=(t,e)=>e.getDebug!=null||e.debug!=null?e:{...e,getDebug:()=>t.config.debug===!0},Xf=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=uk[o];if(!n)continue;r.push(o==="memory"?n(t,{}):n(o==="remote"?dk(t,{}):{}))}else if(o&&typeof o=="object"&&o.type){let n=uk[o.type];if(!n)continue;r.push(o.type==="memory"?n(t,o):n(o.type==="remote"?dk(t,o):o))}return r};R();var FO=typeof v<"u"&&typeof v.document<"u",NO=new Set(["password","hidden"]),pk=(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))))}},Uy="__analyzeKeyPath",Zn=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[Uy])return e[Uy];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[Uy]=i}catch{}return i},jO=(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"***"}},BO=t=>!!(!t||t.tagName==="INPUT"&&NO.has(t.type)||zf.test(t.name||"")||zf.test(t.id||"")||t.dataset?.analyze==="skip"),Jf=t=>{if(!FO)return;let e=t.config.capture,r=t.config.throttle,o=t.__teardown,n=(s,i,a,c)=>{s.addEventListener(i,a,c),o.push(()=>s.removeEventListener(i,a,c))};if(e.errors&&(n(v,"error",s=>{t.emit(X("error","error",{hook:"window.onerror",message:s.message||null,error:s.error||null,source:s.filename||null,line:s.lineno||null,col:s.colno||null}))}),n(v,"unhandledrejection",s=>{let i=s.reason,a=i instanceof Error?i:null;t.emit(X("error","error",{hook:"unhandledrejection",message:a?.message||(typeof i=="string"?i:"Unhandled promise rejection"),error:a}))})),e.pointer){n(v,"click",i=>{t.emit(X("pointer","info",{hook:"click",target:Zn(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:hk(i)}))},{passive:!0,capture:!0}),n(v,"dblclick",i=>{t.emit(X("pointer","info",{hook:"dblclick",target:Zn(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),n(v,"contextmenu",i=>{t.emit(X("pointer","info",{hook:"contextmenu",target:Zn(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=pk(i=>{t.emit(X("pointer","trace",{hook:"pointermove",x:i.clientX,y:i.clientY}))},r.pointermove);n(v,"pointermove",s,{passive:!0})}if(e.keyboard&&n(v,"keydown",s=>{t.emit(X("keyboard","info",{hook:"keydown",code:s.code,key:s.key&&s.key.length===1?"\xB7":s.key,modifiers:hk(s),target:Zn(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=BO(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=jO(a.value,t.config.maskStrategy)),t.emit(X("forms","info",{hook:i.type,target:Zn(i),field:{name:a.name||null,type:a.type||a.tagName.toLowerCase()},value:u}))};n(v,"input",s,{passive:!0,capture:!0}),n(v,"change",s,{passive:!0,capture:!0}),n(v,"submit",i=>{t.emit(X("forms","info",{hook:"submit",target:Zn(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=pk(()=>{t.emit(X("scroll","trace",{hook:"scroll",x:v.scrollX,y:v.scrollY}))},r.scroll);n(v,"scroll",s,{passive:!0,capture:!0})}if(e.viewport){let s=Fs(()=>{t.emit(X("viewport","info",{hook:"resize",w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}))},r.resize);n(v,"resize",s,{passive:!0}),n(v,"orientationchange",()=>{t.emit(X("viewport","info",{hook:"orientationchange",orientation:typeof screen<"u"&&screen.orientation?screen.orientation.type:null}))},{passive:!0}),n(v.document,"visibilitychange",()=>{t.emit(X("viewport","info",{hook:"visibilitychange",hidden:v.document.hidden}))},{passive:!0}),t.emit(X("viewport","info",{hook:"initial",w:v.innerWidth,h:v.innerHeight,dpr:v.devicePixelRatio||1}))}if(e.console)for(let s of["log","warn","error","debug"]){let i=console[s];console[s]=function(...a){try{t.emit(X("console",s==="error"?"error":s==="warn"?"warn":"debug",{hook:`console.${s}`,args:a.map(gk)}))}catch{}return i.apply(console,a)},o.push(()=>{console[s]=i})}if(e.performance&&typeof PerformanceObserver<"u")try{let s=new PerformanceObserver(a=>{for(let c of a.getEntries())t.emit(X("performance","info",{hook:c.entryType,name:c.name,startTime:c.startTime,duration:c.duration,value:c.value!=null?c.value:null}))}),i=["largest-contentful-paint","layout-shift","longtask","paint","first-input","event"];for(let a of i)try{s.observe({type:a,buffered:!0})}catch{}o.push(()=>s.disconnect())}catch{}},hk=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),UO=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=gk(t.cause)),e},gk=t=>{if(t==null)return t;if(t instanceof Error)return UO(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};R();var VO=typeof v<"u"&&typeof v.document<"u",mk=(t,e)=>{let r=t?.analyze;if(!r||!r.shouldCapture("network"))return;let o=e.phase==="error"?"error":"info";r.emit(X("network",o,{hook:`fetch.${e.phase}`,source:"symbo-fetch",...e}))},Ka=t=>{if(VO&&t.config.capture.network&&!t.__networkListeners){if(t.__networkListeners=!0,t.__teardown.push(()=>{t.__networkListeners=!1}),typeof v.fetch=="function"){let e=v.fetch.bind(v),r=function(o,n){if(n?.headers?.["X-Analyze-Beacon"]||!t.shouldCapture("network"))return e(o,n);let s=typeof o=="string"?o:o&&o.url||"",i=(n?.method||typeof o=="object"&&o?.method||"GET").toUpperCase(),a=typeof performance<"u"?performance.now():Date.now();return t.emit(X("network","info",{hook:"fetch.start",source:"window.fetch",url:s,method:i})),e(o,n).then(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;return t.emit(X("network",c.ok?"info":"warn",{hook:"fetch.success",source:"window.fetch",url:s,method:i,status:c.status,ok:c.ok,durationMs:l})),c}).catch(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;throw t.emit(X("network","error",{hook:"fetch.error",source:"window.fetch",url:s,method:i,error:c,durationMs:l})),c})};v.fetch=r,t.__teardown.push(()=>{v.fetch=e})}if(typeof v.XMLHttpRequest=="function"){let e=v.XMLHttpRequest,r=e.prototype.open,o=e.prototype.send;e.prototype.open=function(n,s){return this.__analyze={method:String(n).toUpperCase(),url:String(s)},r.apply(this,arguments)},e.prototype.send=function(n){let s=this.__analyze;if(!s||!t.shouldCapture("network"))return o.apply(this,arguments);let i=typeof performance<"u"?performance.now():Date.now();t.emit(X("network","info",{hook:"xhr.start",source:"xhr",url:s.url,method:s.method}));let a=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i,f=this.status>=200&&this.status<400;t.emit(X("network",f?"info":"warn",{hook:"xhr.success",source:"xhr",url:s.url,method:s.method,status:this.status,ok:f,durationMs:l}))},c=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i;t.emit(X("network","error",{hook:"xhr.error",source:"xhr",url:s.url,method:s.method,status:this.status,durationMs:l}))};return this.addEventListener("loadend",a),this.addEventListener("error",c),o.apply(this,arguments)},t.__teardown.push(()=>{e.prototype.open=r,e.prototype.send=o})}}};var HO={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},zO={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},WO={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},qO={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},KO=t=>{let e={...HO,...t};return e.replay&&Object.assign(e,zO),e.telemetry&&Object.assign(e,WO),e.remote&&Object.assign(e,qO),Object.assign(e,t),e},GO=64,YO=()=>{if(typeof v>"u"||!v.location)return null;try{let e=new URLSearchParams(v.location.search).get("analyze");return e||null}catch{return null}},Zf=(t={})=>{let e=t===!0?{}:{...t};e.capture=KO(e.capture||{});let r=YO();(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=qa(e.level||"warn"),e.cache={max:500,dedupeWindowMs:1e3,...e.cache||{}},e.throttle={pointermove:80,mousemove:80,scroll:100,resize:200,...e.throttle||{}},e.maskFormValues==null&&(e.maskFormValues=!0),e.maskStrategy||(e.maskStrategy="mask"),Array.isArray(e.sinks)||(e.sinks=["console","memory"]),Array.isArray(e.transformers)||(e.transformers=["enrich","summarize"]);let o={config:e,context:null,__ready:!1,__paused:!1,__preBuffer:[],__teardown:[],__pipeline:null,__sinks:null,__memory:null,__initialSnapshot:null},n=()=>{o.__pipeline||(o.__pipeline=qf(o),o.__sinks=Xf(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&&Hf(s.level,o.config.level)){if(!o.__ready){if(s.level!=="error"&&!o.config.captureDuringHydration)return;o.__preBuffer.length<GO&&o.__preBuffer.push(s);return}n(),yk(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)yk(o,a)}try{Jf(o)}catch(a){console.error("[analyze] browser attach error:",a)}try{Ka(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=qa(s)},o.setCapture=(s,i)=>{if(o.config.capture[s]=!!i,s==="network"&&i&&o.__ready)try{Ka(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},yk=(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 Wy={};P(Wy,{Inspect:()=>Qf,inspectPlugin:()=>zy});R();function bk(t){return w(t)?t:O(t)?t.find(e=>w(e)):""}function Hy(t){if(!t)return;let e=t.__ref.__componentKey,r=t.extends&&bk(t.extends),o=t.parent&&t.parent.childExtends&&bk(t.parent.childExtends);return(e||r||o||"").split("_")[0].split(".")[0].split("+")[0]}function tu(t){if(!t||!t.__ref)return;let{components:e,pages:r,editor:o}=t.context,n=Hy(t);return o&&o.onInitInspect&&!o.onInitInspect(n,t,t.state)?tu(t.parent):n&&(e[n]||r[n])?t:tu(t.parent)}var XO=(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}))}},Qf={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:XO,onMousemove:(t,e,r)=>{let o=t.target.ref,n=tu(o),s=e.Inspector.state;if(!n||!r.debugging||!n.__ref)return s.update({area:!1});let i=Hy(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=tu(o);if(!n)return;let s=Hy(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)Vn[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}}},Uy={name:"inspect",beforeCreate(t,e){Array.isArray(t.extends)?t.extends.push(Xf):t.extends?t.extends=[t.extends,Xf]:t.extends=[Xf]}};var zy={};P(zy,{apiUrl:()=>Hy,channelByApiUrl:()=>GO,channelNames:()=>qO,channels:()=>Zt,currentChannel:()=>Hr,defaultChannel:()=>rR,deployTarget:()=>QO,isKnownChannel:()=>eR,mermaidUrl:()=>ZO,normalizeOwnerSegment:()=>oR,normalizeProjectKey:()=>sR,normalizeProjectSlug:()=>nR,parseSymboLsHost:()=>iR,previewProjectUrl:()=>JO,previewUrl:()=>gk,resolveChannel:()=>To,screenshotCdnHost:()=>mk,screenshotCdnUrl:()=>tR,setChannel:()=>KO,shellUrl:()=>XO,socketUrl:()=>YO});var Zt={channels:{local:{api:"http://localhost:8080",socket:"http://localhost:8080",shell:"http://my.localhost:1355",preview:"http://preview.localhost:1355",mermaidApex:"localhost:1355",deploy:{}},development:{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.my.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},"demo-dev":{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.demo.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-demo-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},next:{api:"https://next.api.symbols.app",socket:"https://next.api.symbols.app",shell:"https://next.my.symbols.app",preview:"https://next.preview.symbols.app",mermaidApex:"next.symbo.ls",deploy:{shellBucket:"smbls-my-next",previewWorker:"smbls-preview-next",mermaidWorker:"mermaid-next"}},test:{api:"https://test.api.symbols.app",socket:"https://test.api.symbols.app",shell:"https://test.my.symbols.app",preview:"https://test.preview.symbols.app",mermaidApex:"test.symbo.ls",deploy:{shellBucket:"smbls-my-test",previewWorker:"smbls-preview-test",mermaidWorker:"mermaid-test"}},upcoming:{api:"https://upcoming.api.symbols.app",socket:"https://upcoming.api.symbols.app",shell:"https://upcoming.my.symbols.app",preview:"https://upcoming.preview.symbols.app",mermaidApex:"upcoming.symbo.ls",deploy:{shellBucket:"smbls-my-upcoming",previewWorker:"smbls-preview-upcoming",mermaidWorker:"mermaid-upcoming"}},staging:{api:"https://staging.api.symbols.app",socket:"https://staging.api.symbols.app",shell:"https://staging.my.symbols.app",preview:"https://staging.preview.symbols.app",mermaidApex:"staging.symbo.ls",deploy:{shellBucket:"smbls-my-staging",previewWorker:"smbls-preview-staging",mermaidWorker:"mermaid-staging"}},demo:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://demo.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-demo",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}},production:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://my.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-prod",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}}},defaultChannel:"production",screenshotCdn:"screenshots.api.symbols.app"};var qO=Object.keys(Zt.channels),lr=t=>!!(t&&Zt.channels[t]),To=t=>lr(t)?Zt.channels[t]:Zt.channels[Zt.defaultChannel],KO=t=>{typeof globalThis>"u"||(globalThis.__SYMBOLS_CHANNEL__=lr(t)?t:null,Jn=void 0)},Jn,qa=t=>typeof process<"u"&&process.env&&process.env[t]||null,Hr=()=>{if(Jn!==void 0)return Jn;let t=typeof globalThis<"u"?globalThis.__SYMBOLS_CHANNEL__:null,e=qa("SYMBOLS_CHANNEL"),r=qa("NODE_ENV");return Jn=lr(t)&&t||lr(e)&&e||lr(r)&&r||Zt.defaultChannel,Jn===Zt.defaultChannel&&!lr(t)&&!lr(e)&&!lr(r)&&typeof process<"u"&&process.versions&&process.versions.node&&console.warn(`[channels] no channel configured (NODE_ENV=${r||"unset"}, __SYMBOLS_CHANNEL__ unset) \u2014 falling back to "${Zt.defaultChannel}". Outbound URLs (shellUrl/apiUrl) will target production; set SYMBOLS_CHANNEL (preferred), NODE_ENV, or globalThis.__SYMBOLS_CHANNEL__ to a known channel.`),Jn},dk=["production","staging","upcoming","next","test","development","local","demo","demo-dev"],pk=t=>{let e=dk.indexOf(t);return e===-1?dk.length:e},GO=t=>{if(!t)return null;let e=Object.keys(Zt.channels).filter(r=>Zt.channels[r].api===t);return e.length===0?null:e.length===1?e[0]:e.sort((r,o)=>pk(r)-pk(o))[0]},Hy=(t=Hr())=>qa("SYMBOLS_API_URL")||To(t).api,YO=(t=Hr())=>qa("SYMBOLS_SOCKET_URL")||To(t).socket,XO=(t=Hr())=>To(t).shell||null,gk=(t=Hr())=>To(t).preview||null,JO=({owner:t,key:e,env:r="production"}={},o=Hr())=>{let n=gk(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)}`},ZO=({owner:t,key:e,env:r="production"}={},o=Hr())=>{let n=To(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}`},QO=(t=Hr())=>To(t).deploy||{},mk=()=>qa("SYMBOLS_SCREENSHOT_CDN")||Zt.screenshotCdn,tR=({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://${mk()}/${encodeURIComponent(t)}/${encodeURIComponent(e)}/${i}.webp${c}`},eR=lr,rR=Zt.defaultChannel,oR=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"",nR=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"",sR=(t,e={})=>{let r=String(t||"").trim();if(!r)return"";/\.symbo\.ls$/iu.test(r)&&(r=r.replace(/\.symbo\.ls$/iu,"")),r.includes("/")&&(r=r.split("/").pop());let o=typeof e.owner=="string"?e.owner.trim():"";return o&&r.startsWith(`${o}--`)?r=r.slice(o.length+2):!o&&r.includes("--")&&(r=r.slice(r.indexOf("--")+2)),r},hk={at:"production",prod:"production",production:"production",dev:"development",development:"development",next:"next",upcoming:"upcoming",test:"test",staging:"staging"},iR=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=hk[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?hk[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 Ky={};P(Ky,{BUILD_DOMQL_SYSTEM_PROMPT:()=>Ok,DEFAULT_MAX_TOKENS:()=>nu,DEFAULT_MODEL:()=>zr,DEFAULT_PROVIDER:()=>ru,DEFAULT_TEMPERATURE:()=>ou,MODEL_TIER_ALIASES:()=>qy,PROVIDER_MODELS:()=>bk,SIMONE_BASE_URL:()=>Ka,SIMONE_CHAT_PATH:()=>Zf,SIMONE_CODE_PATH:()=>Qf,SIMONE_CODE_SYMBOLS_PATH:()=>tu,SIMONE_HEALTH_PATH:()=>eu,SIMONE_TOOLS_PATH:()=>yk,WORKSPACE_SYSTEM_PROMPT:()=>Tk,buildMessages:()=>kk,chat:()=>Ga,health:()=>Sk,parseSimoneResponse:()=>Ek,resolveModel:()=>Rk,streamChat:()=>Ga,streamCode:()=>xk,streamCodeSymbols:()=>wk,toLegacyEnvelope:()=>Ak});var Ka="https://symbols-service-production.up.railway.app",Zf="/api/chat",Qf="/api/code",tu="/api/code-symbols",eu="/api/health",yk="/api/tools",ru="openai-compatible",zr="claude-sonnet-4-6",ou=.7,nu=4096,bk={"openai-compatible":["claude-sonnet-4-6","claude-opus-4-6","gpt-4o","gpt-4o-mini","deepseek-chat"],anthropic:["claude-sonnet-4-6","claude-sonnet-4-5-20250929","claude-opus-4-1-20250805","claude-haiku-4-5-20251001"],openrouter:["google/gemini-3-pro-preview"],gemini:["gemini-3-pro-preview"]};function _k(t,e){return t?t.replace(/\/$/,"")+e:e}function aR(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 Ga(t,e={},r){let{baseUrl:o=Ka,path:n=Zf,provider:s=ru,model:i=zr,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(_k(o,n),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...d},body:JSON.stringify(h),signal:u});if(!g.ok){let x=g.statusText;try{let E=await g.text();try{let T=JSON.parse(E);x=T.error||T.detail||x}catch{x=E||x}}catch{}let k=new Error(`simone: HTTP ${g.status} \u2014 ${x}`);throw k.status=g.status,k}if(!g.body||typeof g.body.getReader!="function"){let x=await g.text();return r&&r(x),{text:x,errors:[]}}let p=g.body.getReader(),m=new TextDecoder,b=[],_=[],y="";try{for(;;){let{done:x,value:k}=await p.read();if(x)break;y+=m.decode(k,{stream:!0});let E=y.indexOf(`
95
- `);for(;E!==-1;){let T=y.slice(0,E).trim();if(y=y.slice(E+1),T){let $=aR(T);if($?.done)return{text:b.join(""),errors:_};let D=$?.chunk;D?.delta&&(b.push(D.delta),r&&r(D.delta)),D?.error&&_.push(D.error)}E=y.indexOf(`
96
- `)}}return{text:b.join(""),errors:_}}finally{p.cancel().catch(()=>{})}}function xk(t,e={},r){return Ga(t,{...e,path:Qf},r)}function wk(t,e={},r){return Ga(t,{...e,path:tu},r)}async function Sk(t={}){let{baseUrl:e=Ka,signal:r,headers:o}=t,n=await fetch(_k(e,eu),{method:"GET",headers:o,signal:r});if(!n.ok)throw new Error(`simone health: HTTP ${n.status}`);return n.json()}function kk({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}}},zy={name:"inspect",beforeCreate(t,e){Array.isArray(t.extends)?t.extends.push(Qf):t.extends?t.extends=[t.extends,Qf]:t.extends=[Qf]}};var Ky={};P(Ky,{apiUrl:()=>qy,channelByApiUrl:()=>tR,channelNames:()=>ZO,channels:()=>Zt,currentChannel:()=>zr,defaultChannel:()=>cR,deployTarget:()=>sR,isKnownChannel:()=>aR,mermaidUrl:()=>nR,normalizeOwnerSegment:()=>lR,normalizeProjectKey:()=>uR,normalizeProjectSlug:()=>fR,parseSymboLsHost:()=>dR,previewProjectUrl:()=>oR,previewUrl:()=>Sk,resolveChannel:()=>Oo,screenshotCdnHost:()=>kk,screenshotCdnUrl:()=>iR,setChannel:()=>QO,shellUrl:()=>rR,socketUrl:()=>eR});var Zt={channels:{local:{api:"http://localhost:8080",socket:"http://localhost:8080",shell:"http://my.localhost:1355",preview:"http://preview.localhost:1355",mermaidApex:"localhost:1355",deploy:{}},development:{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.my.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},"demo-dev":{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.demo.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-demo-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},next:{api:"https://next.api.symbols.app",socket:"https://next.api.symbols.app",shell:"https://next.my.symbols.app",preview:"https://next.preview.symbols.app",mermaidApex:"next.symbo.ls",deploy:{shellBucket:"smbls-my-next",previewWorker:"smbls-preview-next",mermaidWorker:"mermaid-next"}},test:{api:"https://test.api.symbols.app",socket:"https://test.api.symbols.app",shell:"https://test.my.symbols.app",preview:"https://test.preview.symbols.app",mermaidApex:"test.symbo.ls",deploy:{shellBucket:"smbls-my-test",previewWorker:"smbls-preview-test",mermaidWorker:"mermaid-test"}},upcoming:{api:"https://upcoming.api.symbols.app",socket:"https://upcoming.api.symbols.app",shell:"https://upcoming.my.symbols.app",preview:"https://upcoming.preview.symbols.app",mermaidApex:"upcoming.symbo.ls",deploy:{shellBucket:"smbls-my-upcoming",previewWorker:"smbls-preview-upcoming",mermaidWorker:"mermaid-upcoming"}},staging:{api:"https://staging.api.symbols.app",socket:"https://staging.api.symbols.app",shell:"https://staging.my.symbols.app",preview:"https://staging.preview.symbols.app",mermaidApex:"staging.symbo.ls",deploy:{shellBucket:"smbls-my-staging",previewWorker:"smbls-preview-staging",mermaidWorker:"mermaid-staging"}},demo:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://demo.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-demo",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}},production:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://my.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-prod",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}}},defaultChannel:"production",screenshotCdn:"screenshots.api.symbols.app"};var ZO=Object.keys(Zt.channels),fr=t=>!!(t&&Zt.channels[t]),Oo=t=>fr(t)?Zt.channels[t]:Zt.channels[Zt.defaultChannel],QO=t=>{typeof globalThis>"u"||(globalThis.__SYMBOLS_CHANNEL__=fr(t)?t:null,Qn=void 0)},Qn,Ga=t=>typeof process<"u"&&process.env&&process.env[t]||null,zr=()=>{if(Qn!==void 0)return Qn;let t=typeof globalThis<"u"?globalThis.__SYMBOLS_CHANNEL__:null,e=Ga("SYMBOLS_CHANNEL"),r=Ga("NODE_ENV");return Qn=fr(t)&&t||fr(e)&&e||fr(r)&&r||Zt.defaultChannel,Qn===Zt.defaultChannel&&!fr(t)&&!fr(e)&&!fr(r)&&typeof process<"u"&&process.versions&&process.versions.node&&console.warn(`[channels] no channel configured (NODE_ENV=${r||"unset"}, __SYMBOLS_CHANNEL__ unset) \u2014 falling back to "${Zt.defaultChannel}". Outbound URLs (shellUrl/apiUrl) will target production; set SYMBOLS_CHANNEL (preferred), NODE_ENV, or globalThis.__SYMBOLS_CHANNEL__ to a known channel.`),Qn},_k=["production","staging","upcoming","next","test","development","local","demo","demo-dev"],xk=t=>{let e=_k.indexOf(t);return e===-1?_k.length:e},tR=t=>{if(!t)return null;let e=Object.keys(Zt.channels).filter(r=>Zt.channels[r].api===t);return e.length===0?null:e.length===1?e[0]:e.sort((r,o)=>xk(r)-xk(o))[0]},qy=(t=zr())=>Ga("SYMBOLS_API_URL")||Oo(t).api,eR=(t=zr())=>Ga("SYMBOLS_SOCKET_URL")||Oo(t).socket,rR=(t=zr())=>Oo(t).shell||null,Sk=(t=zr())=>Oo(t).preview||null,oR=({owner:t,key:e,env:r="production"}={},o=zr())=>{let n=Sk(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)}`},nR=({owner:t,key:e,env:r="production"}={},o=zr())=>{let n=Oo(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}`},sR=(t=zr())=>Oo(t).deploy||{},kk=()=>Ga("SYMBOLS_SCREENSHOT_CDN")||Zt.screenshotCdn,iR=({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://${kk()}/${encodeURIComponent(t)}/${encodeURIComponent(e)}/${i}.webp${c}`},aR=fr,cR=Zt.defaultChannel,lR=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"",fR=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"",uR=(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},wk={at:"production",prod:"production",production:"production",dev:"development",development:"development",next:"next",upcoming:"upcoming",test:"test",staging:"staging"},dR=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=wk[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?wk[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 Xy={};P(Xy,{BUILD_DOMQL_SYSTEM_PROMPT:()=>Mk,DEFAULT_MAX_TOKENS:()=>au,DEFAULT_MODEL:()=>Wr,DEFAULT_PROVIDER:()=>su,DEFAULT_TEMPERATURE:()=>iu,MODEL_TIER_ALIASES:()=>Yy,PROVIDER_MODELS:()=>Ck,SIMONE_BASE_URL:()=>Ya,SIMONE_CHAT_PATH:()=>eu,SIMONE_CODE_PATH:()=>ru,SIMONE_CODE_SYMBOLS_PATH:()=>ou,SIMONE_HEALTH_PATH:()=>nu,SIMONE_TOOLS_PATH:()=>vk,WORKSPACE_SYSTEM_PROMPT:()=>Lk,buildMessages:()=>Rk,chat:()=>Xa,health:()=>Ok,parseSimoneResponse:()=>Dk,resolveModel:()=>Fk,streamChat:()=>Xa,streamCode:()=>Ak,streamCodeSymbols:()=>Tk,toLegacyEnvelope:()=>$k});var Ya="https://symbols-service-production.up.railway.app",eu="/api/chat",ru="/api/code",ou="/api/code-symbols",nu="/api/health",vk="/api/tools",su="openai-compatible",Wr="claude-sonnet-4-6",iu=.7,au=4096,Ck={"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 Ek(t,e){return t?t.replace(/\/$/,"")+e:e}function pR(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 Xa(t,e={},r){let{baseUrl:o=Ya,path:n=eu,provider:s=su,model:i=Wr,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(Ek(o,n),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...d},body:JSON.stringify(h),signal:u});if(!g.ok){let x=g.statusText;try{let E=await g.text();try{let T=JSON.parse(E);x=T.error||T.detail||x}catch{x=E||x}}catch{}let k=new Error(`simone: HTTP ${g.status} \u2014 ${x}`);throw k.status=g.status,k}if(!g.body||typeof g.body.getReader!="function"){let x=await g.text();return r&&r(x),{text:x,errors:[]}}let p=g.body.getReader(),m=new TextDecoder,b=[],_=[],y="";try{for(;;){let{done:x,value:k}=await p.read();if(x)break;y+=m.decode(k,{stream:!0});let E=y.indexOf(`
95
+ `);for(;E!==-1;){let T=y.slice(0,E).trim();if(y=y.slice(E+1),T){let $=pR(T);if($?.done)return{text:b.join(""),errors:_};let D=$?.chunk;D?.delta&&(b.push(D.delta),r&&r(D.delta)),D?.error&&_.push(D.error)}E=y.indexOf(`
96
+ `)}}return{text:b.join(""),errors:_}}finally{p.cancel().catch(()=>{})}}function Ak(t,e={},r){return Xa(t,{...e,path:ru},r)}function Tk(t,e={},r){return Xa(t,{...e,path:ou},r)}async function Ok(t={}){let{baseUrl:e=Ya,signal:r,headers:o}=t,n=await fetch(Ek(e,nu),{method:"GET",headers:o,signal:r});if(!n.ok)throw new Error(`simone health: HTTP ${n.status}`);return n.json()}function Rk({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 Ck=/```(?<lang>[a-zA-Z0-9_+-]*)\n(?<code>[\s\S]*?)```/g,cR=new Set(["component","components","page","pages","function","method","state","theme","color","font","icon"]);function lR(t){let e=[];for(let r of t.matchAll(Ck))e.push({lang:(r.groups?.lang||"").toLowerCase(),code:r.groups?.code??""});return e}function fR(t){return t.replace(Ck,"").trim()}function Wy(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 vk(t){return!!t&&typeof t=="object"&&typeof t.type=="string"&&cR.has(t.type)}function Ek(t){let e=(typeof t=="string"?t:"").trim();if(!e)return{kind:"text",text:"",message:""};let r=lR(e),o=r.filter(i=>/^(js|javascript|ts|typescript|jsx|tsx)$/.test(i.lang)),n=r.filter(i=>i.lang==="json"),s=fR(e);for(let i of n){let a=Wy(i.code);if(vk(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=Wy("["+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=Wy(e);if(vk(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 Ak(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 Tk=["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(" "),Ok=["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
- `),qy={Starter:zr,Free:zr,Pro:"claude-opus-4-6"};function Rk(t){return t?qy[t]||t:zr}var Pk={"@symbo.ls/signal":sd,"@symbo.ls/scratch":Sg,"@symbo.ls/element":xm,"@symbo.ls/css":Rg,"@symbo.ls/utils":yl,"@symbo.ls/state":am,"@symbo.ls/router":Aa,"@symbo.ls/polyglot":by,"@symbo.ls/helmet":my,"@symbo.ls/fetch":no,"@symbo.ls/capsize":xy,"@symbo.ls/shorthand":Ay,"@symbo.ls/analyze":jy,"@symbo.ls/inspect":Vy,"@symbo.ls/channels":zy,"@symbo-ls/simone-server":Ky},Ik=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:{}),o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in Pk)o[n]||(o[n]=Pk[n]);if(e)for(let n in e)o[n]||(o[n]=e[n]);return o},Dk=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:null);if(!r||!e||typeof e!="object")return null;let o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in e){let s=e[n];if(typeof s!="function"||Object.prototype.hasOwnProperty.call(o,n))continue;let i=a=>(Object.defineProperty(o,n,{configurable:!0,enumerable:!0,writable:!0,value:a}),a);Object.defineProperty(o,n,{configurable:!0,enumerable:!0,get:()=>i(s()),set:i})}return o},$k=["@symbo.ls/sdk"],Lk=(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},Mk=(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 jk=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},Fk=(t="smbls")=>{let e={};for(let r in wo)Object.prototype.hasOwnProperty.call(wo,r)&&(je(r)?e[`smbls.${r}`]=wo[r]:e[r]=wo[r]);return e},Bk=t=>t.components?{...Fk(),...t.components}:Fk(),Uk=t=>({...Oa,...Aa,...Ar,...t.utils,...t.snippets,...t.functions}),Vk=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var uR=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,dR=3e3,pR=(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),dR);n.then(c=>{clearTimeout(a),i(c)})})}catch{return Promise.resolve(null)}},Nk={},Hk=async({dependencies:t,dependenciesOnDemand:e,document:r,preventCaching:o=!1,cdnProvider:n,packageManager:s,symbolsConfig:i,registerDependency:a=pR})=>{if(n||(n=vr[s]||tn(i)||"esmsh"),!t)return null;let c=!1;for(let d in t){c=!0;break}if(!c)return null;let l=_r()&&o?`?${Math.random()}`:"",f=async(d,h)=>{let g=Ce(d,h,n)+l;try{await Promise.race([rn(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=Ce(d,h,"symbols")+l;await Promise.race([rn(m,{document:r,type:"module"}),new Promise((b,_)=>setTimeout(()=>_(new Error(`Timeout fallback ${d}`)),2e4))]),console.log(`Successfully loaded ${d} from fallback (symbols.ls)`),await a(d,m)}catch(m){console.error(`Failed to load ${d} from fallback:`,m)}}},u=[];for(let d in t){let h=t[d];if(!(e&&e[d])&&!Nk[d]&&(Nk[d]=!0,!io(d))){if(en(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}uR(d)||u.push(f(d,h))}}return u.length&&await Promise.allSettled(u),t},zk=async(t,e)=>{let r=e.window||window,o=e.cdnProvider||tn(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]&&io(a))return await u.require(a,c);if(!u.packages[a]){let d=_r()?`?${Math.random()}`:"";if(l&&l[a]){let h=l[a],g=Ce(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=Ce(a,h,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let h=Ce(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=Ce(a,"latest","symbols")+d;await i.utils.loadRemoteScript(p,{window:u,document:f})}}u.packages[a]="loadedOnDeman"}}return await u.require(a,c)};r.packages?r.packages=gt(r.packages,t):r.packages=t,r.require||(e.utils.require=await n(e),r.require=e.utils.require),r.requireOnDemand||(e.utils.requireOnDemand=await s(e),r.requireOnDemand=e.utils.requireOnDemand)},hR=/\s+/g,Wk=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,gR=(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+=` ${Wk(n,e)}`)}return r},mR=(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=gR(t,e));let n=t.replace(hR," ").trim();if(r&&typeof r.setAttribute=="function")r.setAttribute("class",n);else if(r)try{r.className=n}catch{}return n},yR=()=>(t,e,r)=>{let o=Wk(t,e);if(t){let{__ref:n}=e;n.__class.style=o}qk()(e.classlist,e,e.state,!0)},qk=()=>(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=be(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];e.node&&mR(i,e,e.node)}},bR=()=>({style:yR(),classlist:qk()}),_R=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],Gy=new WeakSet,Yy=!1,xR=t=>!!t&&typeof t=="object",Kk=(t,e)=>{let r=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,o=e.initOptions||{},n=e.registry||bR(),s=e.designSystem?st(dt(e.designSystem),Ca):dt(Ca),i={};for(let p of _R)e[p]!==void 0&&(i[p]=e[p]);let a,c=xR(r),f=c&&Gy.has(r)&&!e.skipDesignSystemInit,u=!f&&!Yy,d=f?`[data-smbls-app="${t}"]`:":root";if(e.scopeSelector=d,e.skipDesignSystemInit){if(a=C(t)||C(),a&&(a.__domDocument=r),a?.CSS_VARS){it(a);try{kt({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&kt(Vn(a.CSS_MEDIA_VARS,d))}finally{tt()}}}else if(u){let p=C();p&&(p.__domDocument=r),a=cr(s,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...$f,...i,...o}),a&&a!==p&&(a.__domDocument=r),c&&Gy.add(r),Yy=!0}else{let p=ji(t,s,{cleanBase:!0});for(let m in i)p[m]=i[m];if(p.__domDocument=r,f){let m=t.replace(/[^a-zA-Z0-9]/g,"").substring(0,6);e.cssPrefix=m,p.varPrefix=m}it(p);try{a=cr(p,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...$f,...i,...o})}finally{tt()}c&&Gy.add(r),Yy=!0}let h=a?.CONFIG||a,g=h?.font;if(g){it(h);try{for(let p in g){let m=g[p];if(!m?.fontFace)continue;let b=Array.isArray(m.fontFace)?m.fontFace:[m.fontFace];for(let _ of b)typeof _=="string"&&_.includes("font-family")&&kt(`@font-face { ${_} }`)}}finally{tt()}}return[a,n]},Gk=(t,e)=>{let r={};e.state&&st(r,e.state),t&&t.state&&st(r,t.state);let o=e.polyglot;if(o?.translations){let n=null;try{typeof localStorage<"u"&&(n=localStorage.getItem(o.storageLangKey||"smbls_lang")||localStorage.getItem("lang"))}catch{}let s=n||r.lang||o.defaultLang||"en";n&&n!==r.lang&&(r.lang=n);let i=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,dt(r)},Yk=(t,e)=>{S(t.routes)&&S(e.pages)&&gt(t.routes,e.pages);let r=t.routes||e.pages||{};for(let o in r){if(o.charCodeAt(0)===47)continue;let n=o==="index"?"":o;r["/"+n]=r[o],delete r[o]}return r},Xk=t=>{Ei(t,t.sharedLibraries)};var Ya={polyglot:La,getLocalStateLang:ja,getActiveLang:qn,getLang:qn,setLang:Fa,getLanguages:$a,loadTranslations:Ma,upsertTranslation:Na};Sr();var De=Object.create(null);De.open="0";De.close="1";De.ping="2";De.pong="3";De.message="4";De.upgrade="5";De.noop="6";var Xa=Object.create(null);Object.keys(De).forEach(t=>{Xa[De[t]]=t});var Ja={type:"error",data:"parser error"};var Qk=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",tv=typeof ArrayBuffer=="function",ev=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Za=({type:t,data:e},r,o)=>Qk&&e instanceof Blob?r?o(e):Jk(e,o):tv&&(e instanceof ArrayBuffer||ev(e))?r?o(e):Jk(new Blob([e]),o):o(De[t]+(e||"")),Jk=(t,e)=>{let r=new FileReader;return r.onload=function(){let o=r.result.split(",")[1];e("b"+(o||""))},r.readAsDataURL(t)};function Zk(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var Xy;function rv(t,e){if(Qk&&t.data instanceof Blob)return t.data.arrayBuffer().then(Zk).then(e);if(tv&&(t.data instanceof ArrayBuffer||ev(t.data)))return e(Zk(t.data));Za(t,!1,r=>{Xy||(Xy=new TextEncoder),e(Xy.encode(r))})}var ov="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qa=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<ov.length;t++)Qa[ov.charCodeAt(t)]=t;var nv=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=Qa[t.charCodeAt(o)],i=Qa[t.charCodeAt(o+1)],a=Qa[t.charCodeAt(o+2)],c=Qa[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 wR=typeof ArrayBuffer=="function",tc=(t,e)=>{if(typeof t!="string")return{type:"message",data:sv(t,e)};let r=t.charAt(0);return r==="b"?{type:"message",data:SR(t.substring(1),e)}:Xa[r]?t.length>1?{type:Xa[r],data:t.substring(1)}:{type:Xa[r]}:Ja},SR=(t,e)=>{if(wR){let r=nv(t);return sv(r,e)}else return{base64:!0,data:t}},sv=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer;var iv="",av=(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(iv))})})},cv=(t,e)=>{let r=t.split(iv),o=[];for(let n=0;n<r.length;n++){let s=tc(r[n],e);if(o.push(s),s.type==="error")break}return o};function lv(){return new TransformStream({transform(t,e){rv(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 Jy;function su(t){return t.reduce((e,r)=>e+r.length,0)}function iu(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 fv(t,e){Jy||(Jy=new TextDecoder);let r=[],o=0,n=-1,s=!1;return new TransformStream({transform(i,a){for(r.push(i);;){if(o===0){if(su(r)<1)break;let c=iu(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(su(r)<2)break;let c=iu(r,2);n=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),o=3}else if(o===2){if(su(r)<8)break;let c=iu(r,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(Ja);break}n=f*Math.pow(2,32)+l.getUint32(4),o=3}else{if(su(r)<n)break;let c=iu(r,n);a.enqueue(tc(s?c:Jy.decode(c),e)),o=0}if(n===0||n>t){a.enqueue(Ja);break}}}})}var Zy=4;function ut(t){if(t)return kR(t)}function kR(t){for(var e in ut.prototype)t[e]=ut.prototype[e];return t}ut.prototype.on=ut.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};ut.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};ut.prototype.off=ut.prototype.removeListener=ut.prototype.removeAllListeners=ut.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var o,n=0;n<r.length;n++)if(o=r[n],o===e||o.fn===e){r.splice(n,1);break}return r.length===0&&delete this._callbacks["$"+t],this};ut.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],o=1;o<arguments.length;o++)e[o-1]=arguments[o];if(r){r=r.slice(0);for(var o=0,n=r.length;o<n;++o)r[o].apply(this,e)}return this};ut.prototype.emitReserved=ut.prototype.emit;ut.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};ut.prototype.hasListeners=function(t){return!!this.listeners(t).length};var fr=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),Bt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),uv="arraybuffer";function au(t,...e){return e.reduce((r,o)=>(t.hasOwnProperty(o)&&(r[o]=t[o]),r),{})}var vR=Bt.setTimeout,CR=Bt.clearTimeout;function ur(t,e){e.useNativeTimers?(t.setTimeoutFn=vR.bind(Bt),t.clearTimeoutFn=CR.bind(Bt)):(t.setTimeoutFn=Bt.setTimeout.bind(Bt),t.clearTimeoutFn=Bt.clearTimeout.bind(Bt))}var ER=1.33;function dv(t){return typeof t=="string"?AR(t):Math.ceil((t.byteLength||t.size)*ER)}function AR(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 cu(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function pv(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function hv(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 lu=class extends Error{constructor(e,r,o){super(e),this.description=r,this.context=o,this.type="TransportError"}},dr=class extends ut{constructor(e){super(),this.writable=!1,ur(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 lu(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=tc(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=pv(e);return r.length?"?"+r:""}};var ec=class extends dr{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)};cv(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,av(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]=cu()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}};var gv=!1;try{gv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var mv=gv;function TR(){}var Qy=class extends ec{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}},Wr=class t extends ut{constructor(e,r,o){super(),this.createRequest=e,ur(this,o),this._opts=o,this._method=o.method||"GET",this._uri=r,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var e;let r=au(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;let o=this._xhr=this.createRequest(r);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let n in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(n)&&o.setRequestHeader(n,this._opts.extraHeaders[n])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var n;o.readyState===3&&((n=this._opts.cookieJar)===null||n===void 0||n.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(n){this.setTimeoutFn(()=>{this._onError(n)},0);return}typeof document<"u"&&(this._index=t.requestsCount++,t.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=TR,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()}};Wr.requestsCount=0;Wr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",yv);else if(typeof addEventListener=="function"){let t="onpagehide"in Bt?"pagehide":"unload";addEventListener(t,yv,!1)}}function yv(){for(let t in Wr.requests)Wr.requests.hasOwnProperty(t)&&Wr.requests[t].abort()}var OR=(function(){let t=bv({xdomain:!1});return t&&t.responseType!==null})(),qr=class extends Qy{constructor(e){super(e);let r=e&&e.forceBase64;this.supportsBinary=OR&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Wr(bv,this.uri(),e)}};function bv(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||mv))return new XMLHttpRequest}catch{}if(!e)try{return new Bt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var _v=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",eb=class extends dr{get name(){return"websocket"}doOpen(){let e=this.uri(),r=this.opts.protocols,o=_v?{}:au(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,o)}catch(n){return this.emitReserved("error",n)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let r=0;r<e.length;r++){let o=e[r],n=r===e.length-1;Za(o,this.supportsBinary,s=>{try{this.doWrite(o,s)}catch{}n&&fr(()=>{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]=cu()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}},tb=Bt.WebSocket||Bt.MozWebSocket,Kr=class extends eb{createSocket(e,r,o){return _v?new tb(e,r,o):r?new tb(e,r):new tb(e)}doWrite(e,r){this.ws.send(r)}};var Zn=class extends dr{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=fv(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=e.readable.pipeThrough(r).getReader(),n=lv();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&&fr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var rb={websocket:Kr,webtransport:Zn,polling:qr};var RR=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,PR=["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=RR.exec(t||""),s={},i=14;for(;i--;)s[PR[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=IR(s,s.path),s.queryKey=DR(s,s.query),s}function IR(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 DR(t,e){let r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,n,s){n&&(r[n]=s)}),r}var ob=typeof addEventListener=="function"&&typeof removeEventListener=="function",fu=[];ob&&addEventListener("offline",()=>{fu.forEach(t=>t())},!1);var Oo=class t extends ut{constructor(e,r){if(super(),this.binaryType=uv,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);ur(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=hv(this.opts.query)),ob&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},fu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let r=Object.assign({},this.opts.query);r.EIO=Zy,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+=dv(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,fr(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,o){return this._sendPacket("message",e,r,o),this}send(e,r,o){return this._sendPacket("message",e,r,o),this}_sendPacket(e,r,o,n){if(typeof r=="function"&&(n=r,r=void 0),typeof o=="function"&&(n=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;let s={type:e,data:r,options:o};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),n&&this.once("flush",n),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},o=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():e()}):this.upgrading?o():e()),this}_onError(e){if(t.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ob&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let o=fu.indexOf(this._offlineEventListener);o!==-1&&fu.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}};Oo.protocol=Zy;var uu=class extends Oo{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;Oo.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;Oo.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}},ts=class extends uu{constructor(e,r={}){let o=typeof e=="object",n=o?{...e}:{...r};(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(s=>rb[s]).filter(s=>!!s)),super(o?n:e,n)}};var TU=ts.protocol;function xv(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 lb={};P(lb,{Decoder:()=>ab,Encoder:()=>ib,PacketType:()=>B,isPacketValid:()=>tP,protocol:()=>Pv});var LR=typeof ArrayBuffer=="function",MR=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,wv=Object.prototype.toString,FR=typeof Blob=="function"||typeof Blob<"u"&&wv.call(Blob)==="[object BlobConstructor]",NR=typeof File=="function"||typeof File<"u"&&wv.call(File)==="[object FileConstructor]";function oc(t){return LR&&(t instanceof ArrayBuffer||MR(t))||FR&&t instanceof Blob||NR&&t instanceof File}function rc(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,o=t.length;r<o;r++)if(rc(t[r]))return!0;return!1}if(oc(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return rc(t.toJSON(),!0);for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&rc(t[r]))return!0;return!1}function Sv(t){let e=[],r=t.data,o=t;return o.data=du(r,e),o.attachments=e.length,{packet:o,buffers:e}}function du(t,e,r){if(!t)return t;if(oc(t)){let o={_placeholder:!0,num:e.length};return e.push(t),o}else if(Array.isArray(t)){let o=new Array(t.length);for(let n=0;n<t.length;n++)o[n]=du(t[n],e);return o}else if(typeof t=="object"&&!(t instanceof Date)){if(t.toJSON&&typeof t.toJSON=="function"&&!r)return du(t.toJSON(),e,!0);let o={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(o[n]=du(t[n],e));return o}return t}function kv(t,e){return t.data=nb(t.data,e),delete t.attachments,t}function nb(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]=nb(t[r],e);else if(typeof t=="object")for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=nb(t[r],e));return t}var Ov=wC(Tv(),1),sb=(0,Ov.default)("socket.io-parser"),Rv=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Pv=5,B;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(B||(B={}));var ib=class{constructor(e){this.replacer=e}encode(e){return sb("encoding packet %j",e),(e.type===B.EVENT||e.type===B.ACK)&&rc(e)?this.encodeAsBinary({type:e.type===B.EVENT?B.BINARY_EVENT:B.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===B.BINARY_EVENT||e.type===B.BINARY_ACK)&&(r+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(r+=e.nsp+","),e.id!=null&&(r+=e.id),e.data!=null&&(r+=JSON.stringify(e.data,this.replacer)),sb("encoded %j as %s",e,r),r}encodeAsBinary(e){let r=Sv(e),o=this.encodeAsString(r.packet),n=r.buffers;return n.unshift(o),n}},ab=class t extends ut{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);let o=r.type===B.BINARY_EVENT;o||r.type===B.BINARY_ACK?(r.type=o?B.EVENT:B.ACK,this.reconstructor=new cb(r)):super.emitReserved("decoded",r)}else if(oc(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0,o={type:Number(e.charAt(0))};if(B[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===B.BINARY_EVENT||o.type===B.BINARY_ACK){let s=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);let i=e.substring(s,r);if(i!=Number(i)||e.charAt(r)!=="-")throw new Error("Illegal attachments");let a=Number(i);if(!Iv(a)||a<1)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 sb("decoded %s as %j",e,o),o}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case B.CONNECT:return gu(r);case B.DISCONNECT:return r===void 0;case B.CONNECT_ERROR:return typeof r=="string"||gu(r);case B.EVENT:case B.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&Rv.indexOf(r[0])===-1);case B.ACK:case B.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},cb=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=kv(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function JR(t){return typeof t=="string"}var Iv=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function ZR(t){return t===void 0||Iv(t)}function gu(t){return Object.prototype.toString.call(t)==="[object Object]"}function QR(t,e){switch(t){case B.CONNECT:return e===void 0||gu(e);case B.DISCONNECT:return e===void 0;case B.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&Rv.indexOf(e[0])===-1);case B.ACK:return Array.isArray(e);case B.CONNECT_ERROR:return typeof e=="string"||gu(e);default:return!1}}function tP(t){return JR(t.nsp)&&ZR(t.id)&&QR(t.type,t.data)}function ae(t,e,r){return t.on(e,r),function(){t.off(e,r)}}var eP=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),ns=class extends ut{constructor(e,r,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=r,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[ae(e,"open",this.onopen.bind(this)),ae(e,"packet",this.onpacket.bind(this)),ae(e,"error",this.onerror.bind(this)),ae(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(eP.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(r.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;let i={type:B.EVENT,data:r};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){let f=this.ids++,u=r.pop();this._registerAckCallback(f,u),i.id=f}let a=(n=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||n===void 0?void 0:n.writable,c=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,r){var o;let n=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(n===void 0){this.acks[e]=r;return}let s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);r.call(this,new Error("operation has timed out"))},n),i=(...a)=>{this.io.clearTimeoutFn(s),r.apply(this,a)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...r){return new Promise((o,n)=>{let s=(i,a)=>i?n(i):o(a);s.withError=!0,r.push(s),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());let o={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((n,...s)=>(this._queue[0],n!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(n)):(this._queue.shift(),r&&r(null,...s)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:B.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(o=>String(o.id)===e)){let o=this.acks[e];delete this.acks[e],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case B.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case B.EVENT:case B.BINARY_EVENT:this.onevent(e);break;case B.ACK:case B.BINARY_ACK:this.onack(e);break;case B.DISCONNECT:this.ondisconnect();break;case B.CONNECT_ERROR:this.destroy();let o=new Error(e.data.message);o.data=e.data.data,this.emitReserved("connect_error",o);break}}onevent(e){let r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let r=this._anyListeners.slice();for(let o of r)o.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let r=this,o=!1;return function(...n){o||(o=!0,r.packet({type:B.ACK,id:e,data:n}))}}onack(e){let r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:B.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let r=this._anyListeners;for(let o=0;o<r.length;o++)if(e===r[o])return r.splice(o,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let r=this._anyOutgoingListeners;for(let o=0;o<r.length;o++)if(e===r[o])return r.splice(o,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let r=this._anyOutgoingListeners.slice();for(let o of r)o.apply(this,e.data)}}};function Po(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}Po.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};Po.prototype.reset=function(){this.attempts=0};Po.prototype.setMin=function(t){this.ms=t};Po.prototype.setMax=function(t){this.max=t};Po.prototype.setJitter=function(t){this.jitter=t};var ss=class extends ut{constructor(e,r){var o;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,ur(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 Po({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||lb;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 ts(this.uri,this.opts);let r=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;let n=ae(r,"open",function(){o.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=ae(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(ae(e,"ping",this.onping.bind(this)),ae(e,"data",this.ondata.bind(this)),ae(e,"error",this.onerror.bind(this)),ae(e,"close",this.onclose.bind(this)),ae(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){fr(()=>{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 ns(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 nc={};function is(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let r=xv(t,e.path||"/socket.io"),o=r.source,n=r.id,s=r.path,i=nc[n]&&s in nc[n].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new ss(o,e):(nc[n]||(nc[n]=new ss(o,e)),c=nc[n]),r.query&&!e.query&&(e.query=r.queryKey),c.socket(r.path,e)}Object.assign(is,{Manager:ss,Socket:ns,io:is,connect:is});R();var Dv=new Set(["__proto__","constructor","prototype"]),$v=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(Dv.has(t[e]))return!1;return!0},rP=(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)},oP=(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)},fb=(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":rP(t,n);break;case"update":case"set":oP(t,n,s,!0);break;default:break}return r},Lv=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},Mv=(t,e)=>{for(let r in e){if(Dv.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}Mv(n,o)}else r in t||(t[r]=o)}},ub=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let n={designSystem:t.__rawDesignSystem};fb(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"&&Mv(r,s)}return r};R();var Fv=(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(Lv(r,c),o){let l=ub(r);l&&cr(l)}}else eo(r[a],c);else r[a]=c}),o=!0,i&&(r.schema=i))}},Nv=(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=fb(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=ub(r,s);cr(c||r.designSystem)}};var nP={success:"green",error:"red",warning:"yellow"},jv=(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)}},Bv={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:nP[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 sP=!1,iP=()=>sP?"http://localhost:8080":"https://api.symbols.app",aP=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}},cP=async t=>{try{let e=t||iP(),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)}},Hv=(t,e,r,o)=>{t.on("snapshot",Fv(e,r,o)),t.on("ops",Nv(e,r,o)),t.on("clients",n=>{o.editor?.verbose&&jv(n,e,r)}),t.on("disconnect",n=>{o.editor?.verbose&&console.info("[sync] disconnected",n)})},lP=async(t,e,r,o)=>{let n=await cP(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=is(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)")}),Hv(a,t,e,r),a},fP=(t,e,r)=>{let o=is({transports:["websocket","polling"],reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return o.on("connect",()=>{r.editor?.verbose!==!1&&console.info("[sync] connected (runner)")}),Hv(o,t,e,r),o.on("reload",()=>{typeof v<"u"&&v.location&&v.location.reload()}),o},uP=async(t,e,r)=>{let{mode:o,baseUrl:n}=aP(r);return o?o==="collab"?lP(t,e,r,n):o==="runner"?fP(t,e,r):null:null},dP={onInit:uP};var zv=t=>typeof t>"u",Uv=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),Vv=t=>t?.editor?.runtime==="runner",Wv=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},qv={name:"sync",beforeCreate(t,e){let r=e&&e.editor;(r&&!zv(r.liveSync)?r.liveSync:Uv(e)||Vv(e))&&(Uv(e)&&!Vv(e)&&!e?.key||Wv(t,dP))}},Kv={name:"notifications",beforeCreate(t,e){if(!e)return;let r=zv(e.notifications)?null:e.notifications,o=e.editor&&e.editor.verbose===!0;(r===!0||r!==!1&&o)&&Wv(t,Bv)}};var hb={};P(hb,{AlertTemplate:()=>Au,ConfirmTemplate:()=>Cu,CustomTemplate:()=>Ou,ModalLayer:()=>vu,ModalRoot:()=>ku,PromptTemplate:()=>Tu,windowsComponents:()=>pb});var db={};P(db,{alertDialog:()=>wu,closeAllModals:()=>_u,closeModal:()=>yu,confirmDialog:()=>xu,getLayer:()=>mu,openModal:()=>bu,promptDialog:()=>Su,windowsFunctions:()=>pr});function J(t){let e=t;for(;e;){if(e.layer!==void 0)return e.layer;e=e.parent}return null}function as(t){let e=t;for(;e;){if(e.key==="ModalRoot")return e;if(e.ModalRoot&&e.ModalRoot.__ref)return e.ModalRoot;e=e.parent}let r=t?.getRoot?.();return r?.ModalRoot?r.ModalRoot:typeof globalThis<"u"&&globalThis.__SMBLS_WINDOWS_MODAL_ROOT__?.__ref?globalThis.__SMBLS_WINDOWS_MODAL_ROOT__:null}function mu(){return J(this)}var pP=(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"))},Gv=(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 yu(t){let e=as(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)pP(e,i);for(let i of n)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function bu(t={}){let e=as(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 Gv(e,s),e.state.update({stack:[...n,o]}),r}function _u(){let t=as(this);!t||!t.state?.stack?.length||t.state.update({stack:[]})}function xu(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"confirm"})}function wu(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"alert"})}function Su(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"prompt"})}var pr={openModal:bu,closeModal:yu,closeAllModals:_u,confirmDialog:xu,alertDialog:wu,promptDialog:Su,getLayer:mu};var hP=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),Yv=t=>{if(!t?.querySelectorAll)return[];let e=t.querySelectorAll(hP),r=[];for(let o=0;o<e.length;o++){let n=e[o];(n.offsetParent!==null||n===document.activeElement)&&r.push(n)}return r},Xv=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},ku={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 pr)a in r.functions||(r.functions[a]=pr[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=Xv(t);if(!l)return;let f=Yv(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=Xv(t);if(!o)return;let n=Yv(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 vu={tag:"div",position:"fixed",inset:"0",alignItems:"center",justifyContent:"center",padding:"A",background:"black.45",backdropFilter:"blur(4px)",transitionProperty:"opacity",transitionDuration:"200ms",transitionTimingFunction:"ease",zIndex:(t,e)=>`${2e3+(t.__slotIndex||0)*10}`,display:(t,e)=>t.layer?"flex":"none",opacity:(t,e)=>t.layer?"1":"0",visibility:(t,e)=>t.layer?"visible":"hidden",pointerEvents:(t,e)=>t.layer?"auto":"none",ModalWindow:{attr:{role:"dialog","aria-modal":"true",tabindex:"-1","aria-labelledby":t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}},width:t=>J(t)?.width||"H",maxWidth:t=>J(t)?.maxWidth||"90vw",maxHeight:t=>J(t)?.maxHeight||null,onClick:t=>t.stopPropagation(),onMousedown:t=>t.stopPropagation(),ModalHeader:{display:"none"},overflow:"visible",ConfirmTemplate:{hide:t=>J(t)?.template!=="confirm"},AlertTemplate:{hide:t=>J(t)?.template!=="alert"},PromptTemplate:{hide:t=>J(t)?.template!=="prompt"},CustomTemplate:{hide:t=>J(t)?.template!=="custom"}}};var cs=(t,e,r)=>J(t)?.[e]||r,gP=t=>{let e=J(t)?.icon;return e===null||e===!1},Cu={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>cs(t,"title","Are you sure?"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>cs(t,"message","This action cannot be undone."),color:"dim"}},Icons:{hide:t=>gP(t),Indicator:{extends:"Icon",opacity:".7",icon:t=>cs(t,"icon","warning")}}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"Button",theme:"ghost",text:t=>cs(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let o=J(e);if(o?.onCancel)try{o.onCancel()}catch(n){console.warn("[windows] confirm.onCancel threw:",n)}e.call("closeModal",o?.id)}},ConfirmBtn:{extends:"Button",theme:t=>cs(t,"confirmTheme","primary"),text:t=>cs(t,"confirmText","Confirm"),onClick:(t,e,r)=>{let o=J(e);if(o?.onConfirm)try{o.onConfirm()}catch(n){console.warn("[windows] confirm.onConfirm threw:",n)}e.call("closeModal",o?.id)}}}};var Eu=(t,e,r)=>J(t)?.[e]||r,Au={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>Eu(t,"title","Notice"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>Eu(t,"message",""),color:"dim"}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:t=>Eu(t,"icon","info")}}},ModalFooter:{flow:"x",align:"center end",OkBtn:{extends:"Button",theme:"primary",text:t=>Eu(t,"okText","OK"),onClick:(t,e,r)=>{let o=J(e);if(o?.onOk)try{o.onOk()}catch(n){console.warn("[windows] alert.onOk threw:",n)}e.call("closeModal",o?.id)}}}};var sc=(t,e,r)=>J(t)?.[e]||r,Tu={tag:"div",flow:"y",gap:"B",scope:{value:""},onRender:(t,e)=>{let r=J(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let o=t.InputRow&&t.InputRow.node;o&&(o.value=t.scope.value)},onUpdate:(t,e)=>{let r=J(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let o=t.InputRow&&t.InputRow.node;o&&(o.value=t.scope.value)},ModalHeader:{Hgroup:{H:{text:t=>sc(t,"title","Enter a value"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>sc(t,"message",""),color:"dim"}}},InputRow:{extends:"Input",autofocus:!0,placeholder:t=>sc(t,"placeholder",""),value:(t,e)=>t.parent.scope?.value||"",onInput:(t,e,r)=>{e.parent.scope.value=t.target.value},onKeydown:(t,e,r)=>{if(t.key!=="Enter")return;t.preventDefault();let o=J(e),n=e.parent.scope?.value||"";if(o?.onConfirm)try{o.onConfirm(n)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",o?.id)}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"Button",theme:"ghost",text:t=>sc(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let o=J(e);if(o?.onCancel)try{o.onCancel()}catch(n){console.warn("[windows] prompt.onCancel threw:",n)}e.call("closeModal",o?.id)}},ConfirmBtn:{extends:"Button",theme:"primary",text:t=>sc(t,"confirmText","OK"),onClick:(t,e,r)=>{let o=J(e),n=e.parent.parent.scope?.value||"";if(o?.onConfirm)try{o.onConfirm(n)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",o?.id)}}}};var Ou={tag:"div",flow:"y",gap:"B",Title:{tag:"h2",text:t=>J(t)?.title||"",hide:t=>!J(t)?.title,position:"absolute",width:"1px",height:"1px",margin:"-1px",padding:"0",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0",attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},Slot:{tag:"div",onInit:t=>{let e=Z(()=>{let r=J(t),o=r?.content||null,n=r?.id||null;if(!o){t.__lastLayerId!=null&&(t.removeContent(),t.__lastLayerId=null);return}if(t.__lastLayerId!==n){t.__lastLayerId=n;try{t.set(o);let s=t.content?.context;if(s){s.functions||(s.functions={});for(let i in pr)i in s.functions||(s.functions[i]=pr[i])}}catch(s){console.warn("[windows] custom.content set failed:",s)}}});t.__ref&&t.__ref.__effects.push(e)}}};var pb={ModalRoot:ku,ModalLayer:vu,ConfirmTemplate:Cu,AlertTemplate:Au,PromptTemplate:Tu,CustomTemplate:Ou};var bb={};P(bb,{Dropdown:()=>Lu,DropdownList:()=>Mu,DropdownParent:()=>Fu,DropdownParentFocus:()=>Nu,DropdownRoot:()=>Du,DropdownSiblingFocus:()=>ju,DropdownTrigger:()=>$u,dropdownComponents:()=>yb});var Jv=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),mP=(t,e,r,o)=>{let n=Jv(t,r,o),s=i=>n[i]>=e.height+8;return s("bottom")?"bottom":s("top")?"top":n.bottom>=n.top?"bottom":"top"},yP=(t,e,r,o,n)=>{let s=Jv(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},Ru=(t,e,r)=>Math.max(e,Math.min(r,t)),Gr=(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=Ru((o-s.width)/2,8,Math.max(8,o-s.width-8)),h=Ru((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=mP(t,s,o,n),a="start";else{let d=r.split("-");i=d[0],a=d[1]||"start",i=yP(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=Ru(c,8,f),l=Ru(l,8,u),{left:c,top:l,side:i,align:a}},ls=t=>{switch(t){case"bottom":return"translateY(-6px)";case"top":return"translateY(6px)";case"left":return"translateX(6px)";case"right":return"translateX(-6px)";case"center":return"translateY(0px)";default:return"translateY(-6px)"}};var hr={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:"70vh",theme:"modal"},bP=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}},gb=t=>t?.getRoot?.()?.DropdownRoot||null,_P=0,xP=()=>`dropdown_${++_P}_${Date.now().toString(36)}`;function Pu(t={}){let e=gb(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||bP(r);if(!o)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let n=t.id||xP(),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||hr.placement,trigger:t.trigger||hr.trigger,offset:t.offset??hr.offset,minWidth:t.minWidth||hr.minWidth,maxWidth:t.maxWidth||hr.maxWidth,maxHeight:t.maxHeight||hr.maxHeight,theme:t.theme||hr.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 Iu(t){let e=gb(this);if(!e)return;let r=e.state?.layer;r&&e.state.update({layer:{...r,inert:!!t}})}function Io(t){let e=gb(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 wP=`
102
+ \`\`\``}n.push({role:"user",content:s})}return n}var Ik=/```(?<lang>[a-zA-Z0-9_+-]*)\n(?<code>[\s\S]*?)```/g,hR=new Set(["component","components","page","pages","function","method","state","theme","color","font","icon"]);function gR(t){let e=[];for(let r of t.matchAll(Ik))e.push({lang:(r.groups?.lang||"").toLowerCase(),code:r.groups?.code??""});return e}function mR(t){return t.replace(Ik,"").trim()}function Gy(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 Pk(t){return!!t&&typeof t=="object"&&typeof t.type=="string"&&hR.has(t.type)}function Dk(t){let e=(typeof t=="string"?t:"").trim();if(!e)return{kind:"text",text:"",message:""};let r=gR(e),o=r.filter(i=>/^(js|javascript|ts|typescript|jsx|tsx)$/.test(i.lang)),n=r.filter(i=>i.lang==="json"),s=mR(e);for(let i of n){let a=Gy(i.code);if(Pk(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=Gy("["+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=Gy(e);if(Pk(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 $k(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 Lk=["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(" "),Mk=["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
+ `),Yy={Starter:Wr,Free:Wr,Pro:"claude-opus-4-6"};function Fk(t){return t?Yy[t]||t:Wr}var Nk={"@symbo.ls/signal":ad,"@symbo.ls/scratch":Cg,"@symbo.ls/element":km,"@symbo.ls/css":Dg,"@symbo.ls/utils":_l,"@symbo.ls/state":fm,"@symbo.ls/router":Oa,"@symbo.ls/polyglot":wy,"@symbo.ls/helmet":_y,"@symbo.ls/fetch":so,"@symbo.ls/capsize":ky,"@symbo.ls/shorthand":Ry,"@symbo.ls/analyze":Vy,"@symbo.ls/inspect":Wy,"@symbo.ls/channels":Ky,"@symbo-ls/simone-server":Xy},jk=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:{}),o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in Nk)o[n]||(o[n]=Nk[n]);if(e)for(let n in e)o[n]||(o[n]=e[n]);return o},Bk=(t,e)=>{let r=t||(typeof globalThis<"u"?globalThis:null);if(!r||!e||typeof e!="object")return null;let o=r.__SMBLS_PKGS__||(r.__SMBLS_PKGS__={});for(let n in e){let s=e[n];if(typeof s!="function"||Object.prototype.hasOwnProperty.call(o,n))continue;let i=a=>(Object.defineProperty(o,n,{configurable:!0,enumerable:!0,writable:!0,value:a}),a);Object.defineProperty(o,n,{configurable:!0,enumerable:!0,get:()=>i(s()),set:i})}return o},Uk=["@symbo.ls/sdk"],Vk=(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},Hk=(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 qk=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},zk=(t="smbls")=>{let e={};for(let r in So)Object.prototype.hasOwnProperty.call(So,r)&&(Be(r)?e[`smbls.${r}`]=So[r]:e[r]=So[r]);return e},Kk=t=>t.components?{...zk(),...t.components}:zk(),Gk=t=>({...Pa,...Oa,...Tr,...t.utils,...t.snippets,...t.functions}),Yk=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var yR=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,bR=3e3,_R=(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),bR);n.then(c=>{clearTimeout(a),i(c)})})}catch{return Promise.resolve(null)}},Wk={},Xk=async({dependencies:t,dependenciesOnDemand:e,document:r,preventCaching:o=!1,cdnProvider:n,packageManager:s,symbolsConfig:i,registerDependency:a=_R})=>{if(n||(n=Cr[s]||en(i)||"esmsh"),!t)return null;if(!on(t))return console.warn(`[smbls] dependencies is ${Array.isArray(t)?"an ARRAY":`a ${typeof t}`}, not a package-name-keyed object \u2014 skipping the CDN fetch loop. This usually means a project's config.js declares its own "dependencies" field that collides with the platform package map once context.js spreads them together.`),null;let c=!1;for(let d in t){c=!0;break}if(!c)return null;let l=xr()&&o?`?${Math.random()}`:"",f=async(d,h)=>{let g=Ee(d,h,n)+l;try{await Promise.race([nn(g,{document:r,type:"module"}),new Promise((p,m)=>setTimeout(()=>m(new Error(`Timeout loading ${d}`)),1e4))]),await a(d,g)}catch(p){if(console.error(`Failed to load ${d} from ${n}:`,p),n!=="symbols")try{let m=Ee(d,h,"symbols")+l;await Promise.race([nn(m,{document:r,type:"module"}),new Promise((b,_)=>setTimeout(()=>_(new Error(`Timeout fallback ${d}`)),2e4))]),console.log(`Successfully loaded ${d} from fallback (symbols.ls)`),await a(d,m)}catch(m){console.error(`Failed to load ${d} from fallback:`,m)}}},u=[];for(let d in t){let h=t[d];if(!(e&&e[d])&&!Wk[d]&&(Wk[d]=!0,!ao(d))){if(rn(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}yR(d)||u.push(f(d,h))}}return u.length&&await Promise.allSettled(u),t},Jk=async(t,e)=>{let r=e.window||window,o=e.cdnProvider||en(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]&&ao(a))return await u.require(a,c);if(!u.packages[a]){let d=xr()?`?${Math.random()}`:"";if(l&&l[a]){let h=l[a],g=Ee(a,h,c)+d;try{await i.utils.loadRemoteScript(g,{window:u,document:f})}catch(p){if(console.error(`Failed to load ${a} from ${c}:`,p),c!=="symbols"){let m=Ee(a,h,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let h=Ee(a,"latest",c)+d;try{await i.utils.loadRemoteScript(h,{window:u,document:f})}catch(g){if(console.error(`Failed to load ${a} from ${c}:`,g),c!=="symbols"){let p=Ee(a,"latest","symbols")+d;await i.utils.loadRemoteScript(p,{window:u,document:f})}}u.packages[a]="loadedOnDeman"}}return await u.require(a,c)};r.packages?r.packages=gt(r.packages,t):r.packages=t,r.require||(e.utils.require=await n(e),r.require=e.utils.require),r.requireOnDemand||(e.utils.requireOnDemand=await s(e),r.requireOnDemand=e.utils.requireOnDemand)},xR=/\s+/g,Zk=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,wR=(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+=` ${Zk(n,e)}`)}return r},SR=(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=wR(t,e));let n=t.replace(xR," ").trim();if(r&&typeof r.setAttribute=="function")r.setAttribute("class",n);else if(r)try{r.className=n}catch{}return n},kR=()=>(t,e,r)=>{let o=Zk(t,e);if(t){let{__ref:n}=e;n.__class.style=o}Qk()(e.classlist,e,e.state,!0)},Qk=()=>(t,e,r,o)=>{if(e.style&&!o)return;let{__ref:n}=e,{__class:s,__classNames:i}=n;if(!(t===null||typeof t!="object"||Array.isArray(t))){e.class&&(i.classProps=e.class),e.attr?.class&&(i.class=e.attr.class);for(let a in s){let c=s[a];if(!c){delete i[a];continue}let l;typeof c=="string"||typeof c=="number"?l=c:typeof c=="boolean"?l=e.key:l=_e(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];e.node&&SR(i,e,e.node)}},vR=()=>({style:kR(),classlist:Qk()}),CR=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],Jy=new WeakSet,Zy=!1,ER=t=>!!t&&typeof t=="object",tv=(t,e)=>{let r=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,o=e.initOptions||{},n=e.registry||vR(),s=e.designSystem?st(ft(e.designSystem),ft(Aa),ee):ft(Aa),i={};for(let p of CR)e[p]!==void 0&&(i[p]=e[p]);let a,c=ER(r),f=c&&Jy.has(r)&&!e.skipDesignSystemInit,u=!f&&!Zy,d=f?`[data-smbls-app="${t}"]`:":root";if(e.scopeSelector=d,e.skipDesignSystemInit){if(a=C(t)||C(),a&&(a.__domDocument=r),a?.CSS_VARS){it(a);try{kt({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&kt(zn(a.CSS_MEDIA_VARS,d))}finally{tt()}}}else if(u){let p=C();p&&(p.__domDocument=r),a=lr(s,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...Ff,...i,...o}),a&&a!==p&&(a.__domDocument=r),c&&Jy.add(r),Zy=!0}else{let p=Ui(t,s,{cleanBase:!0});for(let m in i)p[m]=i[m];if(p.__domDocument=r,f){let m=t.replace(/[^a-zA-Z0-9]/g,"").substring(0,6);e.cssPrefix=m,p.varPrefix=m}it(p);try{a=lr(p,{key:t,document:r,files:e.files,assets:e.assets,scopeSelector:d,...Ff,...i,...o})}finally{tt()}c&&Jy.add(r),Zy=!0}let h=a?.CONFIG||a,g=h?.font;if(g){it(h);try{for(let p in g){let m=g[p];if(!m?.fontFace)continue;let b=Array.isArray(m.fontFace)?m.fontFace:[m.fontFace];for(let _ of b)typeof _=="string"&&_.includes("font-family")&&kt(`@font-face { ${_} }`)}}finally{tt()}}return[a,n]},ev=(t,e)=>{let r={};e.state&&st(r,e.state),t&&t.state&&st(r,t.state);let o=e.polyglot;if(o?.translations){let n=null;try{typeof localStorage<"u"&&(n=localStorage.getItem(o.storageLangKey||"smbls_lang")||localStorage.getItem("lang"))}catch{}let s=n||r.lang||o.defaultLang||"en";n&&n!==r.lang&&(r.lang=n);let i=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,ft(r)},rv=(t,e)=>{S(t.routes)&&S(e.pages)&&gt(t.routes,e.pages);let r=t.routes||e.pages||{};for(let o in r){if(o.charCodeAt(0)===47)continue;let n=o==="index"?"":o;r["/"+n]=r[o],delete r[o]}return r},ov=t=>{Ti(t,t.sharedLibraries)};var Ja={polyglot:Fa,getLocalStateLang:Ua,getActiveLang:Gn,getLang:Gn,setLang:ja,getLanguages:Ma,loadTranslations:Na,upsertTranslation:Ba};kr();var $e=Object.create(null);$e.open="0";$e.close="1";$e.ping="2";$e.pong="3";$e.message="4";$e.upgrade="5";$e.noop="6";var Za=Object.create(null);Object.keys($e).forEach(t=>{Za[$e[t]]=t});var Qa={type:"error",data:"parser error"};var iv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",av=typeof ArrayBuffer=="function",cv=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,tc=({type:t,data:e},r,o)=>iv&&e instanceof Blob?r?o(e):nv(e,o):av&&(e instanceof ArrayBuffer||cv(e))?r?o(e):nv(new Blob([e]),o):o($e[t]+(e||"")),nv=(t,e)=>{let r=new FileReader;return r.onload=function(){let o=r.result.split(",")[1];e("b"+(o||""))},r.readAsDataURL(t)};function sv(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var Qy;function lv(t,e){if(iv&&t.data instanceof Blob)return t.data.arrayBuffer().then(sv).then(e);if(av&&(t.data instanceof ArrayBuffer||cv(t.data)))return e(sv(t.data));tc(t,!1,r=>{Qy||(Qy=new TextEncoder),e(Qy.encode(r))})}var fv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ec=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<fv.length;t++)ec[fv.charCodeAt(t)]=t;var uv=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=ec[t.charCodeAt(o)],i=ec[t.charCodeAt(o+1)],a=ec[t.charCodeAt(o+2)],c=ec[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 AR=typeof ArrayBuffer=="function",rc=(t,e)=>{if(typeof t!="string")return{type:"message",data:dv(t,e)};let r=t.charAt(0);return r==="b"?{type:"message",data:TR(t.substring(1),e)}:Za[r]?t.length>1?{type:Za[r],data:t.substring(1)}:{type:Za[r]}:Qa},TR=(t,e)=>{if(AR){let r=uv(t);return dv(r,e)}else return{base64:!0,data:t}},dv=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer;var pv="",hv=(t,e)=>{let r=t.length,o=new Array(r),n=0;t.forEach((s,i)=>{tc(s,!1,a=>{o[i]=a,++n===r&&e(o.join(pv))})})},gv=(t,e)=>{let r=t.split(pv),o=[];for(let n=0;n<r.length;n++){let s=rc(r[n],e);if(o.push(s),s.type==="error")break}return o};function mv(){return new TransformStream({transform(t,e){lv(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 tb;function cu(t){return t.reduce((e,r)=>e+r.length,0)}function lu(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 yv(t,e){tb||(tb=new TextDecoder);let r=[],o=0,n=-1,s=!1;return new TransformStream({transform(i,a){for(r.push(i);;){if(o===0){if(cu(r)<1)break;let c=lu(r,1);s=(c[0]&128)===128,n=c[0]&127,n<126?o=3:n===126?o=1:o=2}else if(o===1){if(cu(r)<2)break;let c=lu(r,2);n=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),o=3}else if(o===2){if(cu(r)<8)break;let c=lu(r,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(Qa);break}n=f*Math.pow(2,32)+l.getUint32(4),o=3}else{if(cu(r)<n)break;let c=lu(r,n);a.enqueue(rc(s?c:tb.decode(c),e)),o=0}if(n===0||n>t){a.enqueue(Qa);break}}}})}var eb=4;function dt(t){if(t)return OR(t)}function OR(t){for(var e in dt.prototype)t[e]=dt.prototype[e];return t}dt.prototype.on=dt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};dt.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};dt.prototype.off=dt.prototype.removeListener=dt.prototype.removeAllListeners=dt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var o,n=0;n<r.length;n++)if(o=r[n],o===e||o.fn===e){r.splice(n,1);break}return r.length===0&&delete this._callbacks["$"+t],this};dt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],o=1;o<arguments.length;o++)e[o-1]=arguments[o];if(r){r=r.slice(0);for(var o=0,n=r.length;o<n;++o)r[o].apply(this,e)}return this};dt.prototype.emitReserved=dt.prototype.emit;dt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};dt.prototype.hasListeners=function(t){return!!this.listeners(t).length};var ur=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),Ut=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),bv="arraybuffer";function fu(t,...e){return e.reduce((r,o)=>(t.hasOwnProperty(o)&&(r[o]=t[o]),r),{})}var RR=Ut.setTimeout,PR=Ut.clearTimeout;function dr(t,e){e.useNativeTimers?(t.setTimeoutFn=RR.bind(Ut),t.clearTimeoutFn=PR.bind(Ut)):(t.setTimeoutFn=Ut.setTimeout.bind(Ut),t.clearTimeoutFn=Ut.clearTimeout.bind(Ut))}var IR=1.33;function _v(t){return typeof t=="string"?DR(t):Math.ceil((t.byteLength||t.size)*IR)}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 uu(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function xv(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function wv(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 du=class extends Error{constructor(e,r,o){super(e),this.description=r,this.context=o,this.type="TransportError"}},pr=class extends dt{constructor(e){super(),this.writable=!1,dr(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 du(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=rc(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=xv(e);return r.length?"?"+r:""}};var oc=class extends pr{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)};gv(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,hv(e,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=uu()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}};var Sv=!1;try{Sv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var kv=Sv;function $R(){}var rb=class extends oc{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}},qr=class t extends dt{constructor(e,r,o){super(),this.createRequest=e,dr(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=fu(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=$R,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()}};qr.requestsCount=0;qr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",vv);else if(typeof addEventListener=="function"){let t="onpagehide"in Ut?"pagehide":"unload";addEventListener(t,vv,!1)}}function vv(){for(let t in qr.requests)qr.requests.hasOwnProperty(t)&&qr.requests[t].abort()}var LR=(function(){let t=Cv({xdomain:!1});return t&&t.responseType!==null})(),Kr=class extends rb{constructor(e){super(e);let r=e&&e.forceBase64;this.supportsBinary=LR&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new qr(Cv,this.uri(),e)}};function Cv(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||kv))return new XMLHttpRequest}catch{}if(!e)try{return new Ut[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var Ev=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",nb=class extends pr{get name(){return"websocket"}doOpen(){let e=this.uri(),r=this.opts.protocols,o=Ev?{}:fu(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;tc(o,this.supportsBinary,s=>{try{this.doWrite(o,s)}catch{}n&&ur(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=uu()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}},ob=Ut.WebSocket||Ut.MozWebSocket,Gr=class extends nb{createSocket(e,r,o){return Ev?new ob(e,r,o):r?new ob(e,r):new ob(e)}doWrite(e,r){this.ws.send(r)}};var ts=class extends pr{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=yv(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=e.readable.pipeThrough(r).getReader(),n=mv();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&&ur(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var sb={websocket:Gr,webtransport:ts,polling:Kr};var MR=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,FR=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function es(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=MR.exec(t||""),s={},i=14;for(;i--;)s[FR[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=NR(s,s.path),s.queryKey=jR(s,s.query),s}function NR(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 jR(t,e){let r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,n,s){n&&(r[n]=s)}),r}var ib=typeof addEventListener=="function"&&typeof removeEventListener=="function",pu=[];ib&&addEventListener("offline",()=>{pu.forEach(t=>t())},!1);var Ro=class t extends dt{constructor(e,r){if(super(),this.binaryType=bv,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=es(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=es(r.host).host);dr(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=wv(this.opts.query)),ib&&(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"})},pu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let r=Object.assign({},this.opts.query);r.EIO=eb,r.transport=e,this.id&&(r.sid=this.id);let o=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let e=this.opts.rememberUpgrade&&t.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let r=this.createTransport(e);r.open(),this.setTransport(r)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",t.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let r=new Error("server error");r.code=e.data,this._onError(r);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let o=0;o<this.writeBuffer.length;o++){let n=this.writeBuffer[o].data;if(n&&(r+=_v(n)),o>0&&r>this._maxPayload)return this.writeBuffer.slice(0,o);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,ur(()=>{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(),ib&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let o=pu.indexOf(this._offlineEventListener);o!==-1&&pu.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}};Ro.protocol=eb;var hu=class extends Ro{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;Ro.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;Ro.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}},rs=class extends hu{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=>sb[n]).filter(n=>!!n)),super(e,o)}};var jU=rs.protocol;function Av(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=es(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 pb={};P(pb,{Decoder:()=>ub,Encoder:()=>fb,PacketType:()=>B,isPacketValid:()=>iP,protocol:()=>Nv});var UR=typeof ArrayBuffer=="function",VR=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Tv=Object.prototype.toString,HR=typeof Blob=="function"||typeof Blob<"u"&&Tv.call(Blob)==="[object BlobConstructor]",zR=typeof File=="function"||typeof File<"u"&&Tv.call(File)==="[object FileConstructor]";function sc(t){return UR&&(t instanceof ArrayBuffer||VR(t))||HR&&t instanceof Blob||zR&&t instanceof File}function nc(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,o=t.length;r<o;r++)if(nc(t[r]))return!0;return!1}if(sc(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return nc(t.toJSON(),!0);for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&nc(t[r]))return!0;return!1}function Ov(t){let e=[],r=t.data,o=t;return o.data=ab(r,e),o.attachments=e.length,{packet:o,buffers:e}}function ab(t,e){if(!t)return t;if(sc(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]=ab(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]=ab(t[o],e));return r}return t}function Rv(t,e){return t.data=cb(t.data,e),delete t.attachments,t}function cb(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]=cb(t[r],e);else if(typeof t=="object")for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=cb(t[r],e));return t}var Mv=TC(Lv(),1),lb=(0,Mv.default)("socket.io-parser"),Fv=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Nv=5,B;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(B||(B={}));var fb=class{constructor(e){this.replacer=e}encode(e){return lb("encoding packet %j",e),(e.type===B.EVENT||e.type===B.ACK)&&nc(e)?this.encodeAsBinary({type:e.type===B.EVENT?B.BINARY_EVENT:B.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===B.BINARY_EVENT||e.type===B.BINARY_ACK)&&(r+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(r+=e.nsp+","),e.id!=null&&(r+=e.id),e.data!=null&&(r+=JSON.stringify(e.data,this.replacer)),lb("encoded %j as %s",e,r),r}encodeAsBinary(e){let r=Ov(e),o=this.encodeAsString(r.packet),n=r.buffers;return n.unshift(o),n}},ub=class t extends dt{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);let o=r.type===B.BINARY_EVENT;o||r.type===B.BINARY_ACK?(r.type=o?B.EVENT:B.ACK,this.reconstructor=new db(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(sc(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0,o={type:Number(e.charAt(0))};if(B[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===B.BINARY_EVENT||o.type===B.BINARY_ACK){let s=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);let i=e.substring(s,r);if(i!=Number(i)||e.charAt(r)!=="-")throw new Error("Illegal attachments");let a=Number(i);if(!jv(a)||a<0)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");o.attachments=a}if(e.charAt(r+1)==="/"){let s=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););o.nsp=e.substring(s,r)}else o.nsp="/";let n=e.charAt(r+1);if(n!==""&&Number(n)==n){let s=r+1;for(;++r;){let i=e.charAt(r);if(i==null||Number(i)!=i){--r;break}if(r===e.length)break}o.id=Number(e.substring(s,r+1))}if(e.charAt(++r)){let s=this.tryParse(e.substr(r));if(t.isPayloadValid(o.type,s))o.data=s;else throw new Error("invalid payload")}return lb("decoded %s as %j",e,o),o}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case B.CONNECT:return yu(r);case B.DISCONNECT:return r===void 0;case B.CONNECT_ERROR:return typeof r=="string"||yu(r);case B.EVENT:case B.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&Fv.indexOf(r[0])===-1);case B.ACK:case B.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},db=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=Rv(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function oP(t){return typeof t=="string"}var jv=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function nP(t){return t===void 0||jv(t)}function yu(t){return Object.prototype.toString.call(t)==="[object Object]"}function sP(t,e){switch(t){case B.CONNECT:return e===void 0||yu(e);case B.DISCONNECT:return e===void 0;case B.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&Fv.indexOf(e[0])===-1);case B.ACK:return Array.isArray(e);case B.CONNECT_ERROR:return typeof e=="string"||yu(e);default:return!1}}function iP(t){return oP(t.nsp)&&nP(t.id)&&sP(t.type,t.data)}function ce(t,e,r){return t.on(e,r),function(){t.off(e,r)}}var aP=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),is=class extends dt{constructor(e,r,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=r,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[ce(e,"open",this.onopen.bind(this)),ce(e,"packet",this.onpacket.bind(this)),ce(e,"error",this.onerror.bind(this)),ce(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...r){var o,n,s;if(aP.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(r.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;let i={type:B.EVENT,data:r};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){let f=this.ids++,u=r.pop();this._registerAckCallback(f,u),i.id=f}let a=(n=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||n===void 0?void 0:n.writable,c=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,r){var o;let n=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(n===void 0){this.acks[e]=r;return}let s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);r.call(this,new Error("operation has timed out"))},n),i=(...a)=>{this.io.clearTimeoutFn(s),r.apply(this,a)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...r){return new Promise((o,n)=>{let s=(i,a)=>i?n(i):o(a);s.withError=!0,r.push(s),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());let o={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((n,...s)=>(this._queue[0],n!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(n)):(this._queue.shift(),r&&r(null,...s)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:B.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(o=>String(o.id)===e)){let o=this.acks[e];delete this.acks[e],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case B.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case B.EVENT:case B.BINARY_EVENT:this.onevent(e);break;case B.ACK:case B.BINARY_ACK:this.onack(e);break;case B.DISCONNECT:this.ondisconnect();break;case B.CONNECT_ERROR:this.destroy();let o=new Error(e.data.message);o.data=e.data.data,this.emitReserved("connect_error",o);break}}onevent(e){let r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let r=this._anyListeners.slice();for(let o of r)o.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let r=this,o=!1;return function(...n){o||(o=!0,r.packet({type:B.ACK,id:e,data:n}))}}onack(e){let r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:B.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let r=this._anyListeners;for(let o=0;o<r.length;o++)if(e===r[o])return r.splice(o,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let r=this._anyOutgoingListeners;for(let o=0;o<r.length;o++)if(e===r[o])return r.splice(o,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let r=this._anyOutgoingListeners.slice();for(let o of r)o.apply(this,e.data)}}};function Io(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}Io.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};Io.prototype.reset=function(){this.attempts=0};Io.prototype.setMin=function(t){this.ms=t};Io.prototype.setMax=function(t){this.max=t};Io.prototype.setJitter=function(t){this.jitter=t};var as=class extends dt{constructor(e,r){var o;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,dr(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 Io({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||pb;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 rs(this.uri,this.opts);let r=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;let n=ce(r,"open",function(){o.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=ce(r,"error",s);if(this._timeout!==!1){let a=this._timeout,c=this.setTimeoutFn(()=>{n(),s(new Error("timeout")),r.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(n),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(ce(e,"ping",this.onping.bind(this)),ce(e,"data",this.ondata.bind(this)),ce(e,"error",this.onerror.bind(this)),ce(e,"close",this.onclose.bind(this)),ce(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(r){this.onclose("parse error",r)}}ondecoded(e){ur(()=>{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 is(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 ic={};function cs(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let r=Av(t,e.path||"/socket.io"),o=r.source,n=r.id,s=r.path,i=ic[n]&&s in ic[n].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new as(o,e):(ic[n]||(ic[n]=new as(o,e)),c=ic[n]),r.query&&!e.query&&(e.query=r.queryKey),c.socket(r.path,e)}Object.assign(cs,{Manager:as,Socket:is,io:cs,connect:cs});R();var Bv=new Set(["__proto__","constructor","prototype"]),Uv=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(Bv.has(t[e]))return!1;return!0},cP=(t,e)=>{!t||!Uv(e)||e.reduce((r,o,n,s)=>{if(r&&o in r){if(n!==s.length-1)return r[o];delete r[o]}},t)},lP=(t,e,r,o=!1)=>{!t||!Uv(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)},hb=(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":cP(t,n);break;case"update":case"set":lP(t,n,s,!0);break;default:break}return r},Vv=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},Hv=(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}Hv(n,o)}else r in t||(t[r]=o)}},gb=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let n={designSystem:t.__rawDesignSystem};hb(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"&&Hv(r,s)}return r};R();var zv=(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(Vv(r,c),o){let l=gb(r);l&&lr(l)}}else ro(r[a],c);else r[a]=c}),o=!0,i&&(r.schema=i))}},Wv=(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=hb(r,i);if(s.length&&a.add("designSystem"),a.has("designSystem")){let c=gb(r,s);lr(c||r.designSystem)}if(a.has("state")&&e.update(r.state),["pages","components","snippets","functions","assets"].some(c=>a.has(c))){let{pathname:c,search:l,hash:f}=r.window.location;t.call("router",c+l+f,t.__ref.root,{},{scrollToTop:!1,force:!0})}};var fP={success:"green",error:"red",warning:"yellow"},qv=(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)}},Kv={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:fP[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 uP=!1,dP=()=>uP?"http://localhost:8080":"https://api.symbols.app",pP=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}},hP=async t=>{try{let e=t||dP(),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)}},Xv=(t,e,r,o)=>{t.on("snapshot",zv(e,r,o)),t.on("ops",Wv(e,r,o)),t.on("clients",n=>{o.editor?.verbose&&qv(n,e,r)}),t.on("disconnect",n=>{o.editor?.verbose&&console.info("[sync] disconnected",n)})},gP=async(t,e,r,o)=>{let n=await hP(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=cs(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)")}),Xv(a,t,e,r),a},mP=(t,e,r)=>{let o=cs({transports:["websocket","polling"],reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return o.on("connect",()=>{r.editor?.verbose!==!1&&console.info("[sync] connected (runner)")}),Xv(o,t,e,r),o.on("reload",()=>{typeof v<"u"&&v.location&&v.location.reload()}),o},yP=async(t,e,r)=>{let{mode:o,baseUrl:n}=pP(r);return o?o==="collab"?gP(t,e,r,n):o==="runner"?mP(t,e,r):null:null},bP={onInit:yP};var Jv=t=>typeof t>"u",Gv=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),Yv=t=>t?.editor?.runtime==="runner",Zv=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},Qv={name:"sync",beforeCreate(t,e){let r=e&&e.editor;(r&&!Jv(r.liveSync)?r.liveSync:Gv(e)||Yv(e))&&(Gv(e)&&!Yv(e)&&!e?.key||Zv(t,bP))}},tC={name:"notifications",beforeCreate(t,e){if(!e)return;let r=Jv(e.notifications)?null:e.notifications,o=e.editor&&e.editor.verbose===!0;(r===!0||r!==!1&&o)&&Zv(t,Kv)}};var bb={};P(bb,{AlertTemplate:()=>Ou,ConfirmTemplate:()=>Au,CustomTemplate:()=>Pu,ModalLayer:()=>Eu,ModalRoot:()=>Cu,PromptTemplate:()=>Ru,windowsComponents:()=>yb});var mb={};P(mb,{alertDialog:()=>ku,closeAllModals:()=>wu,closeModal:()=>_u,confirmDialog:()=>Su,getLayer:()=>bu,openModal:()=>xu,promptDialog:()=>vu,windowsFunctions:()=>hr});function J(t){let e=t;for(;e;){if(e.layer!==void 0)return e.layer;e=e.parent}return null}function ls(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 bu(){return J(this)}var _P=(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"))},eC=(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 _u(t){let e=ls(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)_P(e,i);for(let i of n)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function xu(t={}){let e=ls(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 eC(e,s),e.state.update({stack:[...n,o]}),r}function wu(){let t=ls(this);!t||!t.state?.stack?.length||t.state.update({stack:[]})}function Su(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"confirm"})}function ku(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"alert"})}function vu(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"prompt"})}var hr={openModal:xu,closeModal:_u,closeAllModals:wu,confirmDialog:Su,alertDialog:ku,promptDialog:vu,getLayer:bu};var xP=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),rC=t=>{if(!t?.querySelectorAll)return[];let e=t.querySelectorAll(xP),r=[];for(let o=0;o<e.length;o++){let n=e[o];(n.offsetParent!==null||n===document.activeElement)&&r.push(n)}return r},oC=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},Cu={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=oC(t);if(!l)return;let f=rC(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=oC(t);if(!o)return;let n=rC(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 Eu={tag:"div",position:"fixed",inset:"0",alignItems:"center",justifyContent:"center",padding:"A",background:"black.45",backdropFilter:"blur(4px)",transitionProperty:"opacity",transitionDuration:"200ms",transitionTimingFunction:"ease",zIndex:(t,e)=>`${2e3+(t.__slotIndex||0)*10}`,display:(t,e)=>t.layer?"flex":"none",opacity:(t,e)=>t.layer?"1":"0",visibility:(t,e)=>t.layer?"visible":"hidden",pointerEvents:(t,e)=>t.layer?"auto":"none",ModalWindow:{attr:{role:"dialog","aria-modal":"true",tabindex:"-1","aria-labelledby":t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}},width:t=>J(t)?.width||"H",maxWidth:t=>J(t)?.maxWidth||"90vw",maxHeight:t=>J(t)?.maxHeight||null,onClick:t=>t.stopPropagation(),onMousedown:t=>t.stopPropagation(),ModalHeader:{display:"none"},overflow:"visible",ConfirmTemplate:{hide:t=>J(t)?.template!=="confirm"},AlertTemplate:{hide:t=>J(t)?.template!=="alert"},PromptTemplate:{hide:t=>J(t)?.template!=="prompt"},CustomTemplate:{hide:t=>J(t)?.template!=="custom"}}};var fs=(t,e,r)=>J(t)?.[e]||r,wP=t=>{let e=J(t)?.icon;return e===null||e===!1},Au={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>fs(t,"title","Are you sure?"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>fs(t,"message","This action cannot be undone."),color:"dim"}},Icons:{hide:t=>wP(t),Indicator:{extends:"Icon",opacity:".7",icon:t=>fs(t,"icon","warning")}}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"Button",theme:"ghost",text:t=>fs(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let o=J(e);if(o?.onCancel)try{o.onCancel()}catch(n){console.warn("[windows] confirm.onCancel threw:",n)}e.call("closeModal",o?.id)}},ConfirmBtn:{extends:"Button",theme:t=>fs(t,"confirmTheme","primary"),text:t=>fs(t,"confirmText","Confirm"),onClick:(t,e,r)=>{let o=J(e);if(o?.onConfirm)try{o.onConfirm()}catch(n){console.warn("[windows] confirm.onConfirm threw:",n)}e.call("closeModal",o?.id)}}}};var Tu=(t,e,r)=>J(t)?.[e]||r,Ou={tag:"div",flow:"y",gap:"B",ModalHeader:{Hgroup:{H:{text:t=>Tu(t,"title","Notice"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>Tu(t,"message",""),color:"dim"}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:t=>Tu(t,"icon","info")}}},ModalFooter:{flow:"x",align:"center end",OkBtn:{extends:"Button",theme:"primary",text:t=>Tu(t,"okText","OK"),onClick:(t,e,r)=>{let o=J(e);if(o?.onOk)try{o.onOk()}catch(n){console.warn("[windows] alert.onOk threw:",n)}e.call("closeModal",o?.id)}}}};var ac=(t,e,r)=>J(t)?.[e]||r,Ru={tag:"div",flow:"y",gap:"B",scope:{value:""},onRender:(t,e)=>{let r=J(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let o=t.InputRow&&t.InputRow.node;o&&(o.value=t.scope.value)},onUpdate:(t,e)=>{let r=J(t);if(!r||t.scope._seededLayerId===r.id)return;t.scope._seededLayerId=r.id,t.scope.value=r.defaultValue||"";let o=t.InputRow&&t.InputRow.node;o&&(o.value=t.scope.value)},ModalHeader:{Hgroup:{H:{text:t=>ac(t,"title","Enter a value"),attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},P:{text:t=>ac(t,"message",""),color:"dim"}}},InputRow:{extends:"Input",autofocus:!0,placeholder:t=>ac(t,"placeholder",""),value:(t,e)=>t.parent.scope?.value||"",onInput:(t,e,r)=>{e.parent.scope.value=t.target.value},onKeydown:(t,e,r)=>{if(t.key!=="Enter")return;t.preventDefault();let o=J(e),n=e.parent.scope?.value||"";if(o?.onConfirm)try{o.onConfirm(n)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",o?.id)}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",CancelBtn:{extends:"Button",theme:"ghost",text:t=>ac(t,"cancelText","Cancel"),onClick:(t,e,r)=>{let o=J(e);if(o?.onCancel)try{o.onCancel()}catch(n){console.warn("[windows] prompt.onCancel threw:",n)}e.call("closeModal",o?.id)}},ConfirmBtn:{extends:"Button",theme:"primary",text:t=>ac(t,"confirmText","OK"),onClick:(t,e,r)=>{let o=J(e),n=e.parent.parent.scope?.value||"";if(o?.onConfirm)try{o.onConfirm(n)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",o?.id)}}}};var Pu={tag:"div",flow:"y",gap:"B",Title:{tag:"h2",text:t=>J(t)?.title||"",hide:t=>!J(t)?.title,position:"absolute",width:"1px",height:"1px",margin:"-1px",padding:"0",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0",attr:{id:t=>{let e=J(t)?.id;return e?"modal-title-"+e:null}}},Slot:{tag:"div",onInit:t=>{let e=Z(()=>{let r=J(t),o=r?.content||null,n=r?.id||null;if(!o){t.__lastLayerId!=null&&(t.removeContent(),t.__lastLayerId=null);return}if(t.__lastLayerId!==n){t.__lastLayerId=n;try{t.set(o);let s=t.content?.context;if(s){s.functions||(s.functions={});for(let i in 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 yb={ModalRoot:Cu,ModalLayer:Eu,ConfirmTemplate:Au,AlertTemplate:Ou,PromptTemplate:Ru,CustomTemplate:Pu};var Sb={};P(Sb,{Dropdown:()=>Fu,DropdownList:()=>Nu,DropdownParent:()=>ju,DropdownParentFocus:()=>Bu,DropdownRoot:()=>Lu,DropdownSiblingFocus:()=>Uu,DropdownTrigger:()=>Mu,dropdownComponents:()=>wb});var nC=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),SP=(t,e,r,o)=>{let n=nC(t,r,o),s=i=>n[i]>=e.height+8;return s("bottom")?"bottom":s("top")?"top":n.bottom>=n.top?"bottom":"top"},kP=(t,e,r,o,n)=>{let s=nC(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)),Yr=(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=SP(t,s,o,n),a="start";else{let d=r.split("-");i=d[0],a=d[1]||"start",i=kP(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}},us=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 gr={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:"70vh",theme:"modal"},vP=t=>{if(!t||typeof t.getBoundingClientRect!="function")return null;let e=t.getBoundingClientRect();return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}},_b=t=>t?.getRoot?.()?.DropdownRoot||null,CP=0,EP=()=>`dropdown_${++CP}_${Date.now().toString(36)}`;function Du(t={}){let e=_b(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||vP(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||gr.placement,trigger:t.trigger||gr.trigger,offset:t.offset??gr.offset,minWidth:t.minWidth||gr.minWidth,maxWidth:t.maxWidth||gr.maxWidth,maxHeight:t.maxHeight||gr.maxHeight,theme:t.theme||gr.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 $u(t){let e=_b(this);if(!e)return;let r=e.state?.layer;r&&e.state.update({layer:{...r,inert:!!t}})}function Do(t){let e=_b(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 AP=`
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
- `,SP=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let t=document.createElement("style");t.id="smbls-dropdown-css",t.textContent=wP,document.head.appendChild(t)},Zv=(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","")},kP=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")},Du={tag:"div",attr:{"data-smbls-dropdown-root":"true"},position:"fixed",inset:"0",zIndex:"1500",pointerEvents:"none",state:{layer:null},onInit:t=>{if(SP(),typeof window>"u")return;let e=o=>{o.key==="Escape"&&t.state?.layer&&(o.preventDefault(),Io.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}Io.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 Gr(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 Gr(e.anchor,r,e.placement).top+"px"},style:t=>{let e=t.parent?.layer;if(!e?.anchor)return{};let r=t._lastSize||{width:280,height:200};return{"--smbls-dropdown-from":ls(Gr(e.anchor,r,e.placement).side)}},minWidth:t=>t.parent?.layer?.minWidth||"180px",maxWidth:t=>t.parent?.layer?.maxWidth||"90vw",maxHeight:t=>t.parent?.layer?.maxHeight||"70vh",overflow:"auto",overscrollBehavior:"contain",padding:"0",round:t=>t.parent?.layer?.round||"Z",theme:t=>t.parent?.layer?.theme||"modal",border:"none",borderWidth:"0",shadow:"overlay",pointerEvents:t=>{let e=t.parent?.layer;return e?e.inert?"none":"auto":"none"},opacity:t=>t.parent?.layer?"0.999":"0",onClick:t=>t.stopPropagation(),onInit:t=>{let e=Z(()=>{let r=t.parent?.layer,o=r?.content||null,n=r?.id||null;if(!o){if(t.__lastLayerId!=null){try{t.removeContent?.()}catch{}t.__lastLayerId=null}return}if(t.__lastLayerId!==n){t.__lastLayerId=n;try{t.set(o)}catch(s){console.warn("[dropdown] content set failed:",s)}Zv(t,r),kP(t),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{if(!t.node)return;Zv(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=Gr(s.anchor,a,s.placement);t.node.style.left=c.left+"px",t.node.style.top=c.top+"px",t.node.style.setProperty("--smbls-dropdown-from",ls(c.side))})}});t.__ref&&t.__ref.__effects?.push(e)},onRender:t=>{if(t?.node&&(t.parent?.layer?t.node.setAttribute("data-smbls-open","true"):t.node.removeAttribute("data-smbls-open")),!t?.node)return;let e=t.parent?.layer;if(!e?.anchor)return;let r=t.node.getBoundingClientRect(),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=Gr(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",ls(s.side))}}}};var mb=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)},$u={position:"relative",onClick:(t,e)=>{(e.dropdownTrigger||"click")==="click"&&(t.preventDefault(),t.stopPropagation(),mb(e))},onFocus:(t,e)=>{e.dropdownTrigger==="focus"&&mb(e)},onMouseenter:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&clearTimeout(e._hoverTimer),e._hoverTimer=setTimeout(()=>mb(e),120))},onMouseleave:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&(clearTimeout(e._hoverTimer),e._hoverTimer=null),e._closeTimer=setTimeout(()=>e.call("closeDropdown"),250))}};var Lu={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"},Mu={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"}}},Fu={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},Nu={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()}}},ju={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 yb={DropdownRoot:Du,DropdownTrigger:$u,Dropdown:Lu,DropdownList:Mu,DropdownParent:Fu,DropdownParentFocus:Nu,DropdownSiblingFocus:ju};var xb={};P(xb,{DROPDOWN_DEFAULTS:()=>hr,closeDropdown:()=>Io,computePosition:()=>Gr,dropdownFunctions:()=>_b,fadeInTransform:()=>ls,openDropdown:()=>Pu,setDropdownInert:()=>Iu});var _b={openDropdown:Pu,closeDropdown:Io,setDropdownInert:Iu};var vP=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),CP=(t,e,r,o,n)=>{let s=vP(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},Qv=(t,e,r)=>Math.max(e,Math.min(r,t)),Bu=(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=CP(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=Qv(i,6,o-e.width-6),a=Qv(a,6,n-e.height-6),{left:i,top:a,side:s}},tC=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 EP=`
125
+ `,TP=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let t=document.createElement("style");t.id="smbls-dropdown-css",t.textContent=AP,document.head.appendChild(t)},sC=(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","")},OP=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")},Lu={tag:"div",attr:{"data-smbls-dropdown-root":"true"},position:"fixed",inset:"0",zIndex:"1500",pointerEvents:"none",state:{layer:null},onInit:t=>{if(TP(),typeof window>"u")return;let e=o=>{o.key==="Escape"&&t.state?.layer&&(o.preventDefault(),Do.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}Do.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 Yr(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 Yr(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":us(Yr(e.anchor,r,e.placement).side)}},minWidth:t=>t.parent?.layer?.minWidth||"180px",maxWidth:t=>t.parent?.layer?.maxWidth||"90vw",maxHeight:t=>t.parent?.layer?.maxHeight||"70vh",overflow:"auto",overscrollBehavior:"contain",padding:"0",round:t=>t.parent?.layer?.round||"Z",theme:t=>t.parent?.layer?.theme||"modal",border:"none",borderWidth:"0",shadow:"overlay",pointerEvents:t=>{let e=t.parent?.layer;return e?e.inert?"none":"auto":"none"},opacity:t=>t.parent?.layer?"0.999":"0",onClick:t=>t.stopPropagation(),onInit:t=>{let e=Z(()=>{let r=t.parent?.layer,o=r?.content||null,n=r?.id||null;if(!o){if(t.__lastLayerId!=null){try{t.removeContent?.()}catch{}t.__lastLayerId=null}return}if(t.__lastLayerId!==n){t.__lastLayerId=n;try{t.set(o)}catch(s){console.warn("[dropdown] content set failed:",s)}sC(t,r),OP(t),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{if(!t.node)return;sC(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=Yr(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",us(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=Yr(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",us(s.side))}}}};var xb=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)},Mu={position:"relative",onClick:(t,e)=>{(e.dropdownTrigger||"click")==="click"&&(t.preventDefault(),t.stopPropagation(),xb(e))},onFocus:(t,e)=>{e.dropdownTrigger==="focus"&&xb(e)},onMouseenter:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&clearTimeout(e._hoverTimer),e._hoverTimer=setTimeout(()=>xb(e),120))},onMouseleave:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&(clearTimeout(e._hoverTimer),e._hoverTimer=null),e._closeTimer=setTimeout(()=>e.call("closeDropdown"),250))}};var Fu={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"},Nu={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"}}},ju={position:"relative",zIndex:999,":hover":{zIndex:1e3,"& [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}}},Bu={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()}}},Uu={position:"relative",tabindex:"0",":focus-within":{zIndex:1e3,"& ~ [dropdown]":{transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"}},Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>{e.node===document.activeElement&&e.node.blur()}}};var wb={DropdownRoot:Lu,DropdownTrigger:Mu,Dropdown:Fu,DropdownList:Nu,DropdownParent:ju,DropdownParentFocus:Bu,DropdownSiblingFocus:Uu};var vb={};P(vb,{DROPDOWN_DEFAULTS:()=>gr,closeDropdown:()=>Do,computePosition:()=>Yr,dropdownFunctions:()=>kb,fadeInTransform:()=>us,openDropdown:()=>Du,setDropdownInert:()=>$u});var kb={openDropdown:Du,closeDropdown:Do,setDropdownInert:$u};var RP=(t,e,r)=>({bottom:r-t.bottom,top:t.top,right:e-t.right,left:t.left}),PP=(t,e,r,o,n)=>{let s=RP(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},iC=(t,e,r)=>Math.max(e,Math.min(r,t)),Vu=(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=PP(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=iC(i,6,o-e.width-6),a=iC(a,6,n-e.height-6),{left:i,top:a,side:s}},aC=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 IP=`
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
- `,AP=()=>{if(typeof document>"u"||document.getElementById("smbls-tooltip-css"))return;let t=document.createElement("style");t.id="smbls-tooltip-css",t.textContent=EP,document.head.appendChild(t)},eC={tag:"div",attr:{"data-smbls-tooltip-root":"true"},position:"fixed",inset:"0",zIndex:"2500",pointerEvents:"none",state:{tip:null},onInit:()=>{AP()},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 Bu(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 Bu(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":tC(Bu(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 TP=t=>{t.tooltipText&&t.call("openTooltip",{anchorEl:t,text:t.tooltipText,placement:t.tooltipPlacement||"bottom",theme:t.tooltipTheme,id:t.tooltipId||t.key})},rC=t=>{t._tooltipHideTimer&&(clearTimeout(t._tooltipHideTimer),t._tooltipHideTimer=null),!t._tooltipShowTimer&&(t._tooltipShowTimer=setTimeout(()=>{t._tooltipShowTimer=null,TP(t)},t.tooltipDelay??250))},oC=t=>{t._tooltipShowTimer&&(clearTimeout(t._tooltipShowTimer),t._tooltipShowTimer=null),!t._tooltipHideTimer&&(t._tooltipHideTimer=setTimeout(()=>{t._tooltipHideTimer=null,t.call("closeTooltip",t.tooltipId||t.key)},t.tooltipHideDelay??100))},nC={onMouseenter:(t,e)=>rC(e),onMouseleave:(t,e)=>oC(e),onFocus:(t,e)=>rC(e),onBlur:(t,e)=>oC(e)};R();var sC={display:"flex",theme:"dialog",background:"black",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>bt(t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"gray12",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"gray6",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},iC={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)}},aC={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 cC={TooltipRoot:eC,TooltipTrigger:nC,Tooltip:sC,TooltipHidden:iC,TooltipParent:aC};var lC={placement:"bottom",theme:"tooltip .quaternary",delay:250,hideDelay:100},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}},fC=t=>t?.getRoot?.()?.TooltipRoot||null,RP=0,PP=()=>`tooltip_${++RP}_${Date.now().toString(36)}`;function uC(t={}){let e=fC(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||OP(r);if(!o)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let n=t.id||PP(),s={id:n,text:t.text||"",anchor:o,placement:t.placement||lC.placement,theme:t.theme||lC.theme};return e.state.update({tip:s}),n}function dC(t){let e=fC(this);if(!e)return;let r=e.state?.tip;if(!r)return;let o=typeof t=="string"?t:t?.id;o&&r.id&&o!==r.id||e.state.update({tip:null})}var pC={openTooltip:uC,closeTooltip:dC};var hC=t=>!!(t&&typeof t=="object"&&t.__isStub===!0),IP=(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(!hC(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)},DP=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||zn,e.cssPropsRegistry=xt,e.window=jk(e),e.sharedLibraries&&e.sharedLibraries.length){if(e.sharedLibraries.some(g=>typeof g=="string"||hC(g))){e.sharedLibraries=IP(e.sharedLibraries,e.symbolsConfig);let{resolveSharedLibraries:g}=await Promise.resolve().then(()=>(R(),yl));e.sharedLibraries=await g(e.sharedLibraries,{apiBaseUrl:Hy()})}Mk(e.sharedLibraries),Xk(e)}let[s,i]=Kk(n,e);e.designSystem=s,e.registry=i,e.cases||(e.cases={}),e.shorthand&&Va.prepareContext(e);let a=Gk(t,e);if(e.state=a,li(a),e.pages=Yk(t,e),e.components=Bk(e),e.utils=Uk(e),vr[e.packageManager]&&(e.dependencies=await Hk(e)),e.methods=Vk(e),e.routerOptions=T0(t,e),e.defaultExtends=[Cf],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=Rs(e.globalScope));let c=(h,g)=>{let p=g?h[g]:h;if(!S(p))return;let m=ce(p);try{Object.assign(p,m)}catch(b){if(g)h[g]=m;else throw b}};c(t),c(e,"components"),c(e,"pages"),c(e,"functions"),c(e,"methods"),c(e,"snippets"),c(e,"app");let l=h=>h&&typeof h.select=="function";e.fetch?.__resolved&&!l(e.fetch.__resolved)&&delete e.fetch.__resolved,e.db?.__resolved&&!l(e.db.__resolved)&&delete e.db.__resolved;let f=h=>e.plugins.some(g=>g&&g.name===h);if(e.polyglot&&!f("polyglot")){e.plugins.push(Kn);for(let h in Ya)typeof e.functions[h]!="function"&&(e.functions[h]=Ya[h])}if(f("helmet")||e.plugins.push(gy),e.fetch&&!f("fetch")&&e.plugins.push(Yp),e.designSystem?.typography?.useCapsize!==!1&&!f("capsize")&&(e.plugins.push(Nf),e.cssPropsRegistry.useCapsize=_y),e.shorthand&&!f("shorthand")&&e.plugins.push(Va),e.analyze&&!f("analyze")){let h=e.analyze===!0?{}:e.analyze;e.analyze=Yf(h),e.plugins.push(Yn)}e.sync!==!1&&!f("sync")&&e.plugins.push(qv),e.inspect&&!f("inspect")&&e.plugins.push(Uy),(e.notifications===!0||e.editor&&e.editor.verbose===!0)&&e.notifications!==!1&&!f("notifications")&&e.plugins.push(Kv);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",pb,pr),d("dropdown",yb,_b),d("tooltip",cC,pC),e},wb=async(t,e)=>{S(e)||(e={}),Je(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 DP(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=B0(t,e),e.router!==!1&&(t.routes=e.pages),t.state=e.state,t.context=e,t.data=t.data||{},e.skipDesignSystemInit||await zk({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(oe,t,i,e,r,n);let a=oe(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 LP(n),c},LP=t=>{t&&(delete t.__BRENDER__,delete t.__BR_REGISTRY__)};var Sb=(t,e)=>st(t,S(e)?e:{}),MP=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},FP=()=>{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}},gC=t=>{let e=FP();e&&(t.editor||(t.editor={}),t.editor.runtime||(t.editor.runtime=e),e==="runner"&&typeof t.editor.livesync>"u"&&(t.editor.livesync=!0))},kb=(t,e=Ur,r)=>{let o={...Ur,...Sb(e,r)};return gC(o),MP(o),wb(t,o).then(s=>{if(dy(s,o),s.destroy=()=>Pa(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Ra(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})},NP=(t,e=Ur,r)=>{let o=kb(t,e,r),n={...Ur,...Sb(e,r)},s=n.key;return I0(o,s,{utils:Oa,...n}),o},jP=async(t,e=Ur,r)=>{let o={...Ur,...Sb(e,r)};gC(o);let n=e.key;await P0(n,o);let s=await wb(t,o);return dy(s,o),s.destroy=()=>Pa(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Ra(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},BP=(t={},e=Ur,r)=>kb({deps:{isUndefined:Tt},...t},st({domqlOptions:{onlyResolveExtends:!0}},e),r);Pf(ha);Ik(void 0,{smbls:vb});Dk(void 0,{"@symbo.ls/windows":()=>({...hb,...db}),"@symbo.ls/dropdown":()=>({...bb,...xb})});
133
+ `,DP=()=>{if(typeof document>"u"||document.getElementById("smbls-tooltip-css"))return;let t=document.createElement("style");t.id="smbls-tooltip-css",t.textContent=IP,document.head.appendChild(t)},cC={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 Vu(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 Vu(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":aC(Vu(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 $P=t=>{t.tooltipText&&t.call("openTooltip",{anchorEl:t,text:t.tooltipText,placement:t.tooltipPlacement||"bottom",theme:t.tooltipTheme,id:t.tooltipId||t.key})},lC=t=>{t._tooltipHideTimer&&(clearTimeout(t._tooltipHideTimer),t._tooltipHideTimer=null),!t._tooltipShowTimer&&(t._tooltipShowTimer=setTimeout(()=>{t._tooltipShowTimer=null,$P(t)},t.tooltipDelay??250))},fC=t=>{t._tooltipShowTimer&&(clearTimeout(t._tooltipShowTimer),t._tooltipShowTimer=null),!t._tooltipHideTimer&&(t._tooltipHideTimer=setTimeout(()=>{t._tooltipHideTimer=null,t.call("closeTooltip",t.tooltipId||t.key)},t.tooltipHideDelay??100))},uC={onMouseenter:(t,e)=>lC(e),onMouseleave:(t,e)=>fC(e),onFocus:(t,e)=>lC(e),onBlur:(t,e)=>fC(e)};R();var dC={display:"flex",theme:"dialog",background:"black",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>bt(t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"gray12",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"gray6",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},pC={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)}},hC={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 gC={TooltipRoot:cC,TooltipTrigger:uC,Tooltip:dC,TooltipHidden:pC,TooltipParent:hC};var mC={placement:"bottom",theme:"tooltip .quaternary",delay:250,hideDelay:100},LP=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}},yC=t=>t?.getRoot?.()?.TooltipRoot||null,MP=0,FP=()=>`tooltip_${++MP}_${Date.now().toString(36)}`;function bC(t={}){let e=yC(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||LP(r);if(!o)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let n=t.id||FP(),s={id:n,text:t.text||"",anchor:o,placement:t.placement||mC.placement,theme:t.theme||mC.theme};return e.state.update({tip:s}),n}function _C(t){let e=yC(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 xC={openTooltip:bC,closeTooltip:_C};var wC=t=>!!(t&&typeof t=="object"&&t.__isStub===!0),NP=(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(!wC(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)},jP=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||qn,e.cssPropsRegistry=xt,e.window=qk(e),e.sharedLibraries&&e.sharedLibraries.length){if(e.sharedLibraries.some(g=>typeof g=="string"||wC(g))){e.sharedLibraries=NP(e.sharedLibraries,e.symbolsConfig);let{resolveSharedLibraries:g}=await Promise.resolve().then(()=>(R(),_l));e.sharedLibraries=await g(e.sharedLibraries,{apiBaseUrl:qy()})}Hk(e.sharedLibraries),ov(e)}let[s,i]=tv(n,e);e.designSystem=s,e.registry=i,e.cases||(e.cases={}),e.shorthand&&za.prepareContext(e);let a=ev(t,e);if(e.state=a,ui(a),e.pages=rv(t,e),e.components=Kk(e),e.utils=Gk(e),Cr[e.packageManager]&&(e.dependencies=await Xk(e)),e.methods=Yk(e),e.routerOptions=L0(t,e),e.defaultExtends=[Tf],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=Is(e.globalScope));let c=(h,g)=>{let p=g?h[g]:h;if(!S(p))return;let m=le(p);try{Object.assign(p,m)}catch(b){if(g)h[g]=m;else throw b}};c(t),c(e,"components"),c(e,"pages"),c(e,"functions"),c(e,"methods"),c(e,"snippets"),c(e,"app");let l=h=>h&&typeof h.select=="function";e.fetch?.__resolved&&!l(e.fetch.__resolved)&&delete e.fetch.__resolved,e.db?.__resolved&&!l(e.db.__resolved)&&delete e.db.__resolved;let f=h=>e.plugins.some(g=>g&&g.name===h);if(e.polyglot&&!f("polyglot")){e.plugins.push(Yn);for(let h in Ja)typeof e.functions[h]!="function"&&(e.functions[h]=Ja[h])}if(f("helmet")||e.plugins.push(by),e.fetch&&!f("fetch")&&e.plugins.push(Jp),e.designSystem?.typography?.useCapsize!==!1&&!f("capsize")&&(e.plugins.push(Uf),e.cssPropsRegistry.useCapsize=Sy),e.shorthand&&!f("shorthand")&&e.plugins.push(za),e.analyze&&!f("analyze")){let h=e.analyze===!0?{}:e.analyze;e.analyze=Zf(h),e.plugins.push(Jn)}e.sync!==!1&&!f("sync")&&e.plugins.push(Qv),e.inspect&&!f("inspect")&&e.plugins.push(zy),(e.notifications===!0||e.editor&&e.editor.verbose===!0)&&e.notifications!==!1&&!f("notifications")&&e.plugins.push(tC);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",yb,hr),d("dropdown",wb,kb),d("tooltip",gC,xC),e},Cb=async(t,e)=>{S(e)||(e={}),Ze(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 jP(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=K0(t,e),e.router!==!1&&(t.routes=e.pages),t.state=e.state,t.context=e,t.data=t.data||{},e.skipDesignSystemInit||await Jk({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 BP(ne,t,i,e,r,n);let a=ne(t,i,e.key,{verbose:e.verbose,context:e,...e.domqlOptions});return typeof window<"u"&&!e.document&&(window.__smblsApp=a),a},BP=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 UP(n),c},UP=t=>{t&&(delete t.__BRENDER__,delete t.__BR_REGISTRY__)};var Eb=(t,e)=>st(t,S(e)?e:{}),VP=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},HP=()=>{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}},SC=t=>{let e=HP();e&&(t.editor||(t.editor={}),t.editor.runtime||(t.editor.runtime=e),e==="runner"&&typeof t.editor.livesync>"u"&&(t.editor.livesync=!0))},Ab=(t,e=Vr,r)=>{let o={...Vr,...Eb(e,r)};return SC(o),VP(o),Cb(t,o).then(s=>{if(gy(s,o),s.destroy=()=>Da(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Ia(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})},zP=(t,e=Vr,r)=>{let o=Ab(t,e,r),n={...Vr,...Eb(e,r)},s=n.key;return j0(o,s,{utils:Pa,...n}),o},WP=async(t,e=Vr,r)=>{let o={...Vr,...Eb(e,r)};SC(o);let n=e.key;await N0(n,o);let s=await Cb(t,o);return gy(s,o),s.destroy=()=>Da(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Ia(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},o.onCreate&&await o.onCreate(s,s.state,s.context,o),s},qP=(t={},e=Vr,r)=>Ab({deps:{isUndefined:Tt},...t},st({domqlOptions:{onlyResolveExtends:!0}},e),r);$f(ma);jk(void 0,{smbls:Tb});Bk(void 0,{"@symbo.ls/windows":()=>({...bb,...mb}),"@symbo.ls/dropdown":()=>({...Sb,...vb})});