smbls 3.14.335 → 3.14.337

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # smbls
2
2
 
3
+ ## 3.14.337
4
+
5
+ ### Patch Changes
6
+
7
+ - Auto-generated cross-repo patch release.
8
+
9
+ ## 3.14.336
10
+
11
+ ### Patch Changes
12
+
13
+ - Auto-generated cross-repo patch release.
14
+
3
15
  ## 3.14.335
4
16
 
5
17
  ### Patch Changes
package/dist/smbls.cjs CHANGED
@@ -33,7 +33,7 @@ FROM ${a}${l}`},gS=t=>{let e=[],r=(n,o)=>{for(let s in n){let i=o?`${o}/${s}`:s;
33
33
  font-display: ${n.fontDisplay};`:""}
34
34
  src: ${i};`},ir=(t,e,r,n)=>`@font-face {${ki(t,e,r,n)}
35
35
  }`,zr=(t,e,r)=>Object.keys(e).map(o=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l}=e[o],f=Array.isArray(s)?s.map(p=>Kt(p,r)||p):Kt(s,r)||s;return ki(t,f,i,{fontStyle:a,fontDisplay:c,fontStretch:l})}),qh=t=>Object.keys(t).map(r=>zr(r,t[r].value)),Wf=(t,e,r)=>{if(e&&e.isVariable){let s=Kt(e.url,r)||e.url;return To(s)?Oo(s):ir(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap"})}if(e[0])return zr(t,e,r).map(zf);let o=Array.isArray(e.url)?e.url.map(s=>Kt(s,r)||s):Kt(e.url,r)||e.url;return ir(t,o,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch})},vi=(t,e)=>Object.keys(t).map(n=>Wf(n,t[n].value,e));P();P();P();var Ro={};F(Ro,{animation:()=>fg,breakpoints:()=>cg,class:()=>gg,color:()=>eg,devices:()=>lg,document:()=>PS,font:()=>Yh,fontFace:()=>Jh,fontFamily:()=>Xh,fontFamilyTypes:()=>Zh,gradient:()=>rg,grid:()=>hg,icons:()=>sg,media:()=>Qh,reset:()=>$S,semanticIcons:()=>ig,sequence:()=>$e,shadow:()=>og,sizes:()=>yg,spacing:()=>tg,svg:()=>ug,svgData:()=>pg,templates:()=>dg,theme:()=>ng,timing:()=>ag,typography:()=>Ci,unit:()=>Kh,vars:()=>mg});var $e={"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 Kh={default:"em"};var TS={browserDefault:16,base:16,type:"font-size",ratio:$e["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},Ci=TS;var Yh={};var Xh={},Zh={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},Jh={};var Qh={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var OS={base:Ci.base,type:"spacing",ratio:$e.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},tg=OS;var eg={},rg={};var ng={};var og={};var sg={},ig={};var RS={default:150,base:150,type:"timing",ratio:$e["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},ag=RS;var PS={};var cg={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},lg={screenXXL:[2560,1440],screenXL:[2240,1260],screenL:[1920,1024],screenM:[1680,1024],screenS:[1440,720],tabletL:[1366,926],tabletM:[1280,768],tabletS:[1024,768],mobileL:[768,375],mobileM:[560,768],mobileS:[480,768],mobileXS:[375,768]};var fg={};var ug={},pg={};var dg={};var IS={},hg=IS;var gg={};var $S={},mg={},yg={};var Hf={},Gf={},Ai=Ro,Ei={},Ti=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in Ai){let e=t.toLowerCase();Ei[e]=Ai[t];let r=Ti(e);r!==e&&(Ei[r]=Ai[t]),e!==t&&(Ei[t]=Ai[t])}var Oi={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:Hf,cssMediaVars:Gf,CSS_VARS:Hf,CSS_MEDIA_VARS:Gf,_scratchConfig:!0,...Ei},bg=J(Oi),he={active:"0",0:Oi},FS=t=>(kt(t)&&(he.active=t),he[t||he.active]),Po=[],lt=t=>{t&&t._scratchConfig&&Po.push(t)},ot=()=>{Po.pop()},E=t=>Po.length?Po[Po.length-1]:he[t||he.active]||Oi,qf=t=>{if(_(t))return he.active="1",he[1]=W(t,J(bg)),t},DS=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],LS=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],MS=t=>{for(let e of LS){let r;for(let n of e){let o=t[n];_(o)&&(r=r?W(o,r):o)}if(r)for(let n of e)_(t[n])&&(t[n]=r)}},Kf=(t,e,{cleanBase:r=!1}={})=>{let n=r?null:E(),o=J(!r&&n&&n._scratchConfig?n:bg);for(let i of DS)delete o[i];let s=W(e||{},o);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s._scratchConfig=!0,MS(s),t&&(he[t]=s),s};var ge={"-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"},Yf=(t,e)=>{let{key:r,variable:n,value:o,scaling:s,index:i,scalingVariable:a}=t;e.sequence[r]={key:r,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:a,variable:n},e.scales[r]=s;let c=xg.has(e.unit)?"rem":e.unit;e.vars[n]=s+c},Fe=t=>{if(!t.includes("("))return t;let e=t.split("(")[0],r=t.slice(t.indexOf("(")+1,t.lastIndexOf(")"));return[e,r]},xg=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Ri=(t,e)=>{let{base:r,type:n,unit:o}=e,s=xg.has(o)?"rem":o,i=(wr(s)?1:r)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(n&&n.replace(".","-")),l=`${c}-ratio`;if(t>0){let f=ge[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=ge[t+1],p=Math.abs(t),u=Math.pow(_g,2*p),d=ge[p];return d?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${d}) / ${u.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},Xf=(t,e,r,n)=>{let{type:o}=n,i=t===2&&e.length===2?t+1:t,l=`${"--"+(n.varPrefix?n.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${l+i}))`},Pi=(t,e)=>{let n=(t*e-t)/1.618,o=t*e-n,s=t+n,i=(o+s)/2;return[o,i,s]},Ii=(t,e)=>Pi(t,e).map(r=>r/t),$i=(t,e)=>{let{key:r,base:n,value:o,ratio:s,variable:i,index:a}=t,l=~~(o*s)-~~o,f,[p,u,d]=Pi(o,s);l>16?f=[p,u,d]:f=[p,d],f.forEach((h,g)=>{let m=~~(h/n*1e3)/1e3,y=i+(g+1),b=a+(g+1)/10,w=Xf(g+1,f,i,e),x={key:r+(g+1),variable:y,value:h,scaling:m,scalingVariable:w,index:b};Yf(x,e)})},_g=1.618,NS=(t,e,r)=>{if(t>=0)return e*Math.pow(r,t);let n=Math.abs(t),o=e*Math.pow(r,t),s=e*Math.pow(r,n)/Math.pow(_g,2*n);return Math.max(o,s)},Rt=t=>{let{type:e,base:r,ratio:n,range:o,subSequence:s}=t,i=Math.abs(o[0])+Math.abs(o[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=o[1]-l,p=ge[f],u=NS(f,r,n),d=~~(u/r*100)/100,h=c+p,g=Ri(f,t),m={key:p,variable:h,value:u,base:r,scaling:d,scalingVariable:g,ratio:n,index:f};Yf(m,t),s&&$i(m,t)}return t},Sg=(t,e=0)=>{let{type:r,base:n,ratio:o,subSequence:s}=t,i=S(e)?e:ge[e],a=S(e)?Object.entries(ge).find(([,m])=>m===e)?.[0]:e;if(!i)return console.warn(`Position ${e} is out of range in numToLetterMap`),null;let c={sequence:{},scales:{},vars:{},...t},l=n*Math.pow(o,a),f=~~(l/n*100)/100,d="--"+(t.varPrefix?t.varPrefix+"-":"")+(r&&r.replace(".","-"))+"-"+i,h=Ri(a,t),g={key:i,variable:d,value:l,base:n,scaling:f,scalingVariable:h,ratio:o,index:a};return Yf(g,c),s&&$i(g,c),c},Fi=(t="A",e)=>{let r=E(),{unit:n}=r;if(S(t)&&nt(t))return`var(${t})`;let{sequence:o,unit:s=n.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(kr.some(x=>t.includes(x))||!c||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(t))return t;let u=`--${e.varPrefix?e.varPrefix+"-":""}${vo(e.type.replace(".","-"))}-`,d=t.toUpperCase(),h=d.slice(0,1)==="-"?"-":"",g=h?d.slice(1):d,m="";g.includes("_")&&(m="_"+g.split("_")[1].toLowerCase(),g=g.split("_")[0]);let y=x=>a.test(x)?`var(${u}${x}${m})`:x;if(g.includes("+")){let[x,v]=g.split("+"),A=`${y(x)} + ${y(v)}`;return h?`calc((${A}) * -1)`:`calc(${A})`}else if(g.includes("*")){let[x,v]=g.split("*"),A=`${y(x)} * ${y(v)}`;return h?`calc((${A}) * -1)`:`calc(${A})`}else if(g.includes("-")){let[x,v]=g.split("-"),A=`${y(x)} - ${y(v)}`;return h?`calc((${A}) * -1)`:`calc(${A})`}let b=r.sizes;if(b){let x=b[t]||b[t.toLowerCase()];if(x!==void 0)return h?`calc(${x} * -1)`:x}if(!o[g]&&g.length===2&&(r.verbose&&console.warn(g,"- value is not found because `subSequence` is set to false"),g=g.slice(0,1)),i||r.useVariable){let x=`var(${u}${g}${m})`;return h?`calc(${x} * -1)`:x}let w=o?o[g]:null;return w?s==="ms"||s==="s"?h+w.val+s:h+w.scaling+s:console.warn("can't find",o,g)},Zf=(t,e)=>{if(!["+","-","*","/",","].filter(s=>t.includes(s+" ")).length)return t;let n=/(\s*[+\-*/,]\s*)/;return t.split(n).map(s=>{let i=s.trim();return!i||["+","-","*","/",","].includes(i)?s:Fi(i,e)}).join("")},me=(t,e,r,n)=>{if(typeof t!="string")return E().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!n&&t.includes("(")){let s=Fe(t);n=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=Zf(t,r):t=Fi(t,r),{[e]:n?`${n}(${t})`:t}},Jf=(t,e)=>ge[t-e],Di=t=>{let{h1Matches:e,sequence:r}=t;return new Array(6).fill(null).map((n,o)=>{let s=Jf(e,o);return r[s]})};P();var wg=(t,e)=>{let r=E(),{cssVars:n}=r;N(t.value)||(n[t.var]=t.value)},Li=(t,e,r)=>{let n=E(),{unit:o}=n,s=e.unit||o.default,{base:i,ratio:a,type:c}=e,f="--"+(e.varPrefix?e.varPrefix+"-":"")+(c&&c.replace(".","-"));t[`${f}-base`]=i,t[`${f}-unit`]=s;let p=`${f}-ratio`;t[p]=a;let[u,d,h]=Ii(i,a);t[`${f}-sub-ratio-1`]=`calc(var(${f}-ratio) * ${u/a})`,t[`${f}-sub-ratio-2`]=`calc(var(${f}-ratio) * ${d/a})`,t[`${f}-sub-ratio-3`]=`calc(var(${f}-ratio) * ${h/a})`},kg=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),De=(t,e={})=>{let r=E(),{unit:n,timing:o,cssVars:s}=r,i=t.unit||n.default,a=kg.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||Li(s,t,e);for(let p in l){let u=l[p],d=(t.type===o.type?l[p].val:f[p])+a;if(!c){s[u.variable+"_default"]=d,s[u.variable]=u.scalingVariable;continue}e.useDefault===!1?s[u.variable]=d:(s[u.variable+"_default"]=d,s[u.variable]=`var(${u.variable+"_default"})`)}},ar=(t,e,r={})=>{let n=E(),{unit:o,media:s,cssVars:i}=n,a=e.slice(1),c=t[e],l=c.unit||t.unit||o.default,f=kg.has(l)?"rem":l,{mediaRegenerate:p}=t,{sequence:u,scales:d}=c,h=s[a];if(!h&&n.verbose&&console.warn("Can't find media query ",h),!p){let g=i[`@media ${h}`];g||(g=i[`@media ${h}`]={}),Li(g,c,r);let m=t.unit||o.default;if(f!==m&&u)for(let y in u){let b=u[y],w=d[y]+f;g[b.variable+"_default"]=w,g[b.variable]=w}return}for(let g in u){let m=u[g],y=(wr(f)?d[g]:u[g].val)+f;!h&&n.verbose&&console.warn("Can't find query ",h);let b=i[`@media ${h}`];b||(b=i[`@media ${h}`]={}),b[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=y}};P();var Cg=Qe(),Io=t=>{let e=E(),r="";for(let n in t)e.__svgCache[n]||(e.__svgCache[n]=!0,r+=t[n]);return r},jS=t=>{let e=t&&(t.default||t);if(!S(e))return Cg&&console.warn("parseRootAttributes:",e,"is not a string"),{};let r=e.match(/<svg\s+(.*?)>/);if(!r||!r[1])return{};let o=r[1].match(/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|\s*\/?[>"']))+.)["']?/gm);return o?o.reduce((s,i)=>{let[a,c]=i.split("=");return s[a]=c.replace(/['"]/g,""),s},{}):{}},BS=(t,e)=>{let r=[];if(t.replace(/id="([^"]*)"/g,(o,s)=>(r.push(s),o)),!r.length)return t;let n=t;for(let o of r){let s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${e}-${o}`;n=n.replace(new RegExp(`id="${s}"`,"g"),`id="${i}"`).replace(new RegExp(`url\\(#${s}\\)`,"g"),`url(#${i})`).replace(new RegExp(`xlink:href="#${s}"`,"g"),`xlink:href="#${i}"`).replace(new RegExp(`href="#${s}"`,"g"),`href="#${i}"`)}return n},vg=new Set,Mi=(t,e)=>{let r=e&&e.default?e.default:e;if(!S(r))return Cg&&!vg.has(t)&&(vg.add(t),console.warn("convertSvgToSymbol:",t,"is not a string")),"";e=r;let n=jS(e),{width:o,height:s}=n,i=n.viewBox||`0 0 ${o||24} ${s||24}`,l=BS(e,t).replace("<svg",`<symbol id="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="${i}"`);return l=l.replace(/width="[^"]*"/,""),l=l.replace(/height="[^"]*"/,""),l=l.replace("</svg","</symbol"),l=zS(l),l},VS="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",US=new RegExp(`<(${VS})\\b([^>]*?)\\s*/>`,"g"),zS=t=>t.replace(US,"<$1$2></$1>");var Lo={};F(Lo,{appendSVGSprite:()=>Ji,appendSvgIconsSprite:()=>ta,applyDocument:()=>Zi,applyHeadings:()=>ru,applyReset:()=>ea,applySpacingSequence:()=>qi,applyTimingSequence:()=>Xi,applyTypographySequence:()=>Wi,checkIfBoxSize:()=>Gi,getColor:()=>Q,getFontFamily:()=>zi,getFontSizeByKey:()=>Hi,getMediaColor:()=>mt,getMediaTheme:()=>Yt,getShadow:()=>Yi,getSpacingBasedOnRatio:()=>ae,getSpacingByKey:()=>dt,getTheme:()=>ji,getTimingByKey:()=>Nt,getTimingFunction:()=>Xt,runThroughMedia:()=>eu,setColor:()=>lr,setFont:()=>Ui,setFontFamily:()=>Fo,setGradient:()=>fr,setMediaTheme:()=>Vi,setSVG:()=>Do,setShadow:()=>ur,setSvgIcon:()=>Qi,setTheme:()=>Bi,splitSpacedValue:()=>Ki});P();var Q=(t,e,r)=>{let n=r||E();if(!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(nt(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(T(t))[o,s,i]=t;else{let p=Ie(t);if(!p){let{color:u,gradient:d}=n,h=d[t]||u[t];return h?(e&&h[e]&&(h=h[e]),n.useVariable?`var(${h.var})`:h.value):t}if(p.passthrough)return p.passthrough;if(p.cssVar)return`var(${p.cssVar})`;o=p.name,s=p.alpha,i=p.tone}let{color:a,gradient:c}=n,l=a[o]||c[o];if(!l)return n.verbose&&console.warn("Can't find color ",o),t;e&&(l[e]?l=l[e]:n.verbose&&console.warn(t," - does not have ",e));let f=l.rgb;if(!f){let p=n.useVariable?`var(${l.var})`:l.value;if(s&&p){let u=Math.round(parseFloat(s)*100);return`color-mix(in srgb, ${p} ${u}%, transparent)`}return p}return i&&!l[i]&&(f=sr(f,i),l[i]={rgb:f,var:`${l.var}-${i}`}),l[i]&&(f=l[i].rgb),s?`rgba(${f}, ${s})`:i?`rgba(${f}, 1)`:n.useVariable?`var(${l.var})`:`rgb(${f})`},mt=(t,e,r)=>{let n=r||E();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(nt(t))return`var(${t})`;let o,s,i;if(T(t))o=t[0];else{let p=Ie(t);if(p){if(p.passthrough)return p.passthrough;if(p.cssVar)return`var(${p.cssVar})`;o=p.name,s=p.alpha,i=p.tone}else o=t}let{color:a,gradient:c}=n,l=a[o]||c[o],f=_(l);if(f&&l.value)return Q(t,`@${e}`,r);if(f){if(n.useVariable&&l.var)return s||i?Q(t,null,r):`var(${l.var})`;if(e)return Q(t,`@${e}`,r);{let p={};for(let u in l){if(u.charCodeAt(0)!==64)continue;let d=n.media[u.slice(1)];if(!d)continue;let h="@media "+(d==="print"?`${d}`:`screen and ${d}`);p[h]=Q(t,u,r)}return p}}else return n.verbose&&console.warn("Can't find color",t),t},lr=(t,e,r)=>{let n=E();if(S(t)&&nt(t)){let g=t.slice(2);if(t=Q(g),!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let m=g.split(" "),y=n.color[m[0]];if(y&&!y.value&&!y.rgb&&(S(y)||T(y)||_(y))&&(n.color[m[0]]=lr(y,m[0]),y=n.color[m[0]]),y&&y.value){let b=y.rgb,w=m[1]!==void 0?m[1]:"1",x=m[2];x&&(b=sr(b,x)),t=`rgba(${b}, ${w})`}else{let b=m[2],w=m[1]!==void 0?m[1]:"1";if(b)try{let x=pe(m[0]);x&&x.length>=3?t=`rgba(${sr(x.slice(0,3).join(", "),b)}, ${w})`:t=m[0]}catch{t=m[0]}else t=m[0]}}}if(T(t)&&(t={"@light":t[0],"@dark":t[1]}),_(t)){let g={};for(let m in t)g[m]=lr(t[m],e,m.slice(0,1)==="@"?m.slice(1):m);if(n.useVariable){let y=`--${n.varPrefix?n.varPrefix+"-":""}color-${e}`,b,w={};for(let x in g){if(x.charCodeAt(0)!==64)continue;let v=x.slice(1),A=g[x],R=A&&(A.value||A);!R||typeof R!="string"||(w[v]=R,(v==="light"||b===void 0)&&(b=R))}if(b!==void 0){n.cssVars[y]=b,n.cssMediaVars||(n.cssMediaVars={});for(let x in w){let v=`[data-theme="${x}"]`;if(n.cssMediaVars[v]||(n.cssMediaVars[v]={}),n.cssMediaVars[v][y]=w[x],x==="light"||x==="dark"){let A=`@media (prefers-color-scheme: ${x})`;n.cssMediaVars[A]||(n.cssMediaVars[A]={}),n.cssMediaVars[A][y]=w[x]}}g.var=y}}return g}let s=`--${n.varPrefix?n.varPrefix+"-":""}color-${e}`+(r?`-${r}`:""),i=t.value||t;if(S(i)&&i.includes(".")&&!i.includes("(")){let[g,m]=i.split("."),y=n.color[g];y&&y.rgb&&(i=`rgba(${y.rgb}, ${parseFloat("0."+m)||1})`)}if(S(i)&&!i.includes("(")&&!i.startsWith("#")){let g=Ie(i);if(g&&g.name&&!g.passthrough&&!g.cssVar){let m=n.color[g.name];m&&!m.value&&!m.rgb&&(S(m)||T(m)||_(m))&&(n.color[g.name]=lr(m,g.name));let y=n.color[g.name];if(y&&y.rgb){let b=y.rgb;g.tone&&(b=sr(b,g.tone));let w=g.alpha?parseFloat(g.alpha):1;i=`rgba(${b}, ${w})`}}}let a=pe(i),[c,l,f,p=1]=a,u=parseFloat(p.toFixed(2)),d=`${c}, ${l}, ${f}`,h=`rgba(${d}, ${u})`;return n.useVariable&&(n.cssVars[s]=h),{var:s,rgb:d,alpha:u,value:h}},fr=(t,e,r)=>{let n=E();if(S(t)&&nt(t)&&(t=Q(t.slice(2))),T(t))return{"@light":fr(t[0],e,"light"),"@dark":fr(t[0],e,"dark")};if(_(t)){let i={};for(let a in t)i[a]=fr(t[a],e,a.slice(0,1)==="@"?a.slice(1):a);return i}let s=`--${n.varPrefix?n.varPrefix+"-":""}gradient-${e}`+(r?`-${r}`:"");return n.useVariable&&(n.cssVars[s]=t.value||t),{var:s,value:t.value||t}};P();var WS=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"]),Ag=["color","Color","background","Background","fill","Fill","stroke","Stroke"],HS=t=>{for(let e=0;e<Ag.length;e++)if(t.includes(Ag[e]))return!0;return!1},Ni=t=>{let e={},{state:r,media:n,helpers:o,...s}=t;return Object.keys(s).map(a=>{let l=["color","Color","background","border"].some(f=>a.includes(f));return e[a]=l?Q(t[a]):t[a]}),e},$o=t=>(t.value||(t.value=Ni(t)),t.value),ji=(t,e)=>{let r=E();if(r.useVariable)return Yt(t,e);let n=r.theme;if(S(t)){let[o,s]=t.split(" "),i=n[o];if(i){if(!s&&!e)return $o(i);t=[o,s||e]}}if(N(t)&&t[1]){let o=t[0],s=t[1],{helpers:i,media:a,state:c}=n[o];if(a&&a[s])return $o(a[s]);if(i&&i[s])return $o(i[s]);if(c&&c[s])return $o(c[s])}else if(_(t))return Ni(t)},GS=(t,e,r)=>{if(_(e))t.variants.inverse.value=Ni(e);else if(e===!0){let{color:n,background:o}=r;t.variants.inverse={value:{color:o,background:n}}}},qS=(t,e,r,n)=>{let o=ji(r);n[`&:${e}`]=o,_(r)&&!r.value&&(r.value=o)},KS=(t,e)=>{let{state:r}=t;return r?(Object.keys(r).map(o=>{let s=r[o];return qS(t,o,s,e),t}),t):void 0},YS=(t,e,r,n)=>{let o=ji(r);n[`@media (prefers-color-scheme: ${e})`]=o,_(r)&&!r.value&&(r.value=o)},XS=(t,e)=>{let{media:r}=t;return r?(Object.keys(r).map(o=>{let s=r[o];return(o==="dark"||o==="light")&&YS(t,o,s,e),o==="inverse"&&GS(t,s,e),t}),t):void 0},ZS=(t,e)=>{let r=E(),{helpers:n}=t;return n?(Object.keys(n).map(s=>{let i=n[s];return S(i)?n[s]=r.theme[i]:$o(n[s]),t}),t):void 0},Bi=(t,e)=>{let r=E();if(r.useVariable)return Vi(t,e);let{state:n,media:o,helpers:s}=t,i=Ni(t,e),c=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}`;return KS(t,i),XS(t,i),ZS(t,i),{var:c,value:i,state:n,media:o,helpers:s}};var Qf=(t,e,r)=>{let{cssVars:n}=r;r.cssMediaVars||(r.cssMediaVars={});let o=r.cssMediaVars,s=r.globalTheme!==void 0?r.globalTheme:"auto",i={},a=new Set;for(let l in t)if(t[l])for(let f of Object.keys(t[l]))a.add(f);let c=new Set;for(let l of a){let f=l.slice(0,1);if(!(f==="@"||f==="."||f===":")&&HS(l))for(let p in t){if(c.has(p))continue;let u=t[p]?.[l];if(u===void 0)continue;let d=Q(u,`@${p}`);d!==void 0&&S(d)&&/^[a-z][a-zA-Z]+$/.test(d)&&!WS.has(d)&&c.add(p)}}for(let l of a){let f=l.slice(0,1),p=Object.values(t).some(u=>N(u?.[l]));if(f==="."&&p){let u=l.slice(1),d={};for(let h in t)N(t[h]?.[l])&&(d[h]=t[h][l]);i[l]=Qf(d,`${e}-${u}`,r)}else if(f===":"&&p){let u=l.replace(/^:+/,""),d={};for(let h in t)N(t[h]?.[l])&&(d[h]=t[h][l]);i[l]=Qf(d,`${e}-${u}`,r)}else if(f!=="@"&&f!=="."&&f!==":"){let d=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}-${l}`,h=s&&s!=="auto"?String(s).replace(/^'|'$/g,""):null,g;for(let m in t){if(c.has(m))continue;let y=t[m]?.[l];if(y===void 0)continue;let b=Q(y,`@${m}`);if(b===void 0)continue;(h&&m===h||!h&&(m==="light"||g===void 0))&&(g=b);let w=`[data-theme="${m}"]`;if(o[w]||(o[w]={}),o[w][d]=b,m==="dark"||m==="light"){let x=`@media (prefers-color-scheme: ${m})`;o[x]||(o[x]={}),o[x][d]=b}}g!==void 0&&(n[d]=g),i[l]=`var(${d})`,i[`.${l}`]={[l]:i[l]}}}return(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color}),i},Vi=(t,e,r,n)=>{let o=E(),{cssVars:s}=o,i={value:t},a=!r&&!n;if(N(t)){if(a&&o.useVariable){let c={};for(let l in t)l.startsWith("@")&&N(t[l])&&(c[l.slice(1)]=t[l]);if(Object.keys(c).length){let l=Qf(c,e,o);Object.assign(i,l)}}for(let c in t){let l=c.slice(0,1),f=t[c];if(l==="@"||l===":"||l==="."){let p=l==="@"&&c;i[c]=Vi(f,e,c,n||p)}else if(!a){let p=Q(f,n),u=[...new Set([n,r].filter(m=>m).map(m=>m.slice(1)))],d=u.length?"-"+u.join("-"):"",g=`--${o.varPrefix?o.varPrefix+"-":""}theme-${e}${d}-${c}`;o.useVariable?(o.useThemeSuffixedVars&&(s[g]=p),i[c]=`var(${g})`):i[c]=p,i[`.${c}`]={[c]:i[c]}}}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(S(t)&&nt(t)){let l=o.theme[t.slice(2)];return Yt(l,n)}return i},tu=t=>{let e=E(),r={};for(let n in t){let o=n.slice(0,1);if(N(t[n])){if(o==="@")continue;o===":"?r[`&${n}`]=tu(t[n]):o==="."&&(r[`&${n}`]=tu(t[n]))}else r[n]=t[n]}return r},Tg=(t,e)=>{let r=e.shift();return t[r]?Tg(t[r],e):t},Eg=(t,e)=>T(e)?Tg(t,e):S(e)&&t[e]?t[e]:t;var Yt=(t,e)=>{let r=E();if(S(t)&&nt(t)&&(t=Yt(t.slice(2))),!t||!S(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[n,...o]=T(t)?t:t.split(" "),s=r.theme[n];return s&&o.length?s=Eg(s,o):s&&e&&(s=Eg(s,e)),tu(s)};P();P();var Ui=(t,e)=>{let r=E(),n=`--font-${e}`;if(!t||T(t)&&!t[0])return;let o;if(t.isVariable){let s=Kt(t.url,r.files)||t.url;To(s)?o=Oo(s):o=ir(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap"})}else if(t[0])o=zr(e,t,r.files);else{let s=Array.isArray(t.url)?t.url.map(i=>Kt(i,r.files)||i):Kt(t.url,r.files)||t.url;o=ir(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch})}return{var:n,value:t,fontFace:o}},zi=(t,e)=>{let r=E(),{fontFamily:n}=r;return Ur(e||n,t)},Fo=(t,e)=>{let r=E(),{fontFamily:n,fontFamilyTypes:o}=r,{value:s,type:i}=t;t.isDefault&&(n.default=e),_(s)&&(s=nr(s));let a=`--font-family-${e}`,c=`${s.join(", ")}, ${o[i]}`;return{var:a,value:c,arr:s,type:i}};P();var eu=t=>{let e=E(),{typography:r,media:n}=e;for(let o in t){let s=o.slice(0,1)==="@",i=t[o];if(!s)continue;let{mediaRegenerate:a}=t,c=o.slice(1),{type:l,base:f,ratio:p,range:u,subSequence:d,h1Matches:h,unit:g}=t;et(i,{type:l,base:f,ratio:p,range:u,subSequence:d,h1Matches:h,unit:g});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),y=i.unit||g,b=!i.unit&&m.has(g)?"rem":y,w=n[c],x="@media "+(w==="print"?`${w}`:`screen and ${w}`);if(r.templates[x]={fontSize:i.base/r.browserDefault+b},!a){et(i,{sequence:{},scales:{},vars:{}}),Rt(i),ar(t,o);continue}et(i,{sequence:{},scales:{},templates:{},vars:{}}),Rt(i),ar(t,o)}},ru=t=>{let e=E();if(t.h1Matches){let r=t.unit,n=Di(t),{templates:o}=t;for(let s in n){let i=`h${parseInt(s)+1}`,a=o[i];o[i]={fontSize:e.useVariable?`var(${n[s]?.variable})`:`${n[s]?.scaling}${r}`,margin:a?a.margin:0,lineHeight:a?a.lineHeight:t.lineHeight,letterSpacing:a?a.letterSpacing:t.letterSpacing,fontWeight:a?a.fontWeight:900-s*100}}}},Wi=()=>{let t=E(),{typography:e}=t;Rt(e),ru(e),De(e),eu(e)},Hi=t=>{let e=E(),{typography:r}=e;return me(t,"fontSize",r)};P();P();var JS=t=>{let r=E().spacing||{},n=parseFloat(t.spacingRatio),o={...r,ratio:Number.isFinite(n)?n:r.ratio,sequence:{},scales:{}};return Rt(o),o},QS=t=>{for(let e in t){let r=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;et(r,{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),Rt(r),ar(t,e)}},Gi=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),n=e.includes("border")||e.includes("outline");return r&&!n},qi=()=>{let t=E(),{spacing:e}=t;Rt(e),De(e),QS(e)},tw=t=>{let e=E(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:Rt(t)},dt=(t,e="padding",r,n)=>{let o=tw(r);if(S(t)&&!n&&t.includes("(")){let i=Fe(t);n=i[0],t=i[1]}let s=n?[t]:nr(t);if(T(s)){if(s.length>1){let i="";e==="borderWidth"&&(e="border",i="Width");let a={2:["Block","Inline"],3:["BlockStart","Inline","BlockEnd"],4:["BlockStart","InlineEnd","BlockEnd","InlineStart"]},c=(l,f)=>me(s[f],e+l+i,o,n);return a[s.length].map((l,f)=>c(l,f))}return me(t,e,o,n)}},ae=(t,e,r,n)=>{let o=E(),{spacing:s}=o,i=r||t[e];if(!n&&S(i)&&i.includes("(")){let a=Fe(i);n=a[0],i=a[1]}if(t.spacingRatio){let a=JS(t);return dt(i,e,a,n)}return dt(i,e,s,n)},Ki=t=>{let e=r=>{let n=["+","-","*","/"].includes(r),o=kr.some(i=>t.includes(i));return n||o?r:r.length<3&&/[A-Z]/.test(r)?r+"_default":r};return t.split(",").map(r=>r.trim()).map(e).join(",").split(" ").map(e).join(" ")};P();var ur=(t,e,r,n)=>{let o=E();if(T(t))return{"@light":ur(t[0],e,"light"),"@dark":ur(t[1],e,"dark")};if(_(t)){let a={};for(let c in t)a[c]=ur(t[c],e,c.startsWith("@")?c.slice(1):c);return a}S(t)&&!ie.test(t)&&(t=or(t).map(a=>(a=a.trim(),a.split(/\s+/).map(c=>{if(c=c.trim(),!c)return"";if(c.startsWith("--"))return`var(${c})`;let l=Q(c);if(de(l))return l;if(/^\d/.test(c)||c==="0"||c.includes("px")||c.slice(-2)==="em"||c==="inset"||c==="none")return c;let f=dt(c,"shadow");return f&&f.shadow?f.shadow:c}).join(" "))).join(", "));let i=`--${o.varPrefix?o.varPrefix+"-":""}shadow-${e}`+(r?`-${r}`:"");return o.useVariable&&(o.cssVars[i]=t),{var:i,value:t}},Yi=(t,e)=>{let r=E();if(e||(e=r.globalTheme),!S(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(nt(t))return`var(${t})`;let[n]=T(t)?t:t.split(" "),s=r.shadow[n],i=_(s);if(!s)return r.verbose&&console.warn("Can't find color ",n),t;if(e){if(s[e])return s[e].value;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){let l=r.media[c.slice(1)],f="@media "+(l==="print"?`${l}`:`screen and ${l}`);a[f]=s.value}return a}return r.verbose&&console.warn("Can't find color",t),t};P();var Xi=()=>{let t=E(),{timing:e}=t;Rt(e),De(e)},Xt=t=>{let e=E(),{timing:r}=e;return r[t]||r[ko(t)]||t},Nt=(t,e="timing")=>{let r=E(),{timing:n}=r;return me(t,e,n)};P();var Zi=()=>{let t=E(),{document:e,fontFamily:r,theme:n,typography:o}=t;return et(e,{theme:n.document,fontFamily:Ur(r),fontSize:o.base,lineHeight:o.lineHeight})};P();var ou={document:X},Do=(t,e)=>{let r=E();if(!t){r.verbose&&console.warn("setSVG: val is not defined",e);return}return r.useSvgSprite?Mi(e,t):t},Ji=(t,e=ou)=>{let r=E(),n=Object.keys(t).length?{}:r.svg;for(let o in t)n[o]=t[o];Rg(n,e)},Qi=(t,e)=>{let r=E();return r.useIconSprite&&!r.semanticIcons?.[e]?Do(t,e):t},ta=(t,e=ou)=>{let r=E(),n=Object.keys(t).length?{}:r.icons;for(let o in t)n[o]=t[o];Rg(n,e)},nu=(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},ew=(t,e)=>{let r=typeof DOMParser<"u"?DOMParser:null;if(r){let n=`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,s=new r().parseFromString(n,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},Og=(t,e,r)=>{for(;e.firstChild;){let n=e.firstChild;r.appendChild(t.importNode(n,!0)),n.remove()}},Rg=(t,e=ou)=>{let r=E(),n=e.document||X;if(!n||!n.documentElement)return r.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),Io(t);let o=n.querySelector("#svgSprite"),s=Io(t),i=`<svg aria-hidden="true" width="0" height="0" style="position:absolute" id="svgSprite">${s}</svg>`,a=ew(n,s);if(o)if(a)Og(n,a,o);else if(n.body.insertAdjacentHTML)o.insertAdjacentHTML("beforeend",s);else{let c=nu(n,{isRoot:!1});c.innerHTML=s,o.append(...c.children)}else if(a){let c=nu(n);c&&c.nodeType&&(Og(n,a,c),n.body.prepend(c))}else if(n.body.insertAdjacentHTML)n.body.insertAdjacentHTML("afterbegin",i);else{let c=nu(n);c&&c.nodeType&&(c.innerHTML=s,n.body.prepend(c))}};P();var ea=(t={})=>{let e=E(),{reset:r,typography:n,document:o}=e;if(r){if(r[":root"]){let c=r,l=n.templates;c.body={...e.useDocumentTheme?Yt("document"):{},...l.body},c.h1=l.h1,c.h2=l.h2,c.h3=l.h3,c.h4=l.h4,c.h5=l.h5,c.h6=l.h6}let{body:s,...i}=n.templates,a=e.useDocumentTheme?Yt("document"):{};if(r.html&&Ct(r.html,a),n.unit){let{media:c}=e;for(let l in n){if(l.charAt(0)!=="@")continue;let f=n[l];if(!f||f.unit===n.unit||!f.unit)continue;let p=f.unit,u=f.base||n.base,d=f.browserDefault||n.browserDefault,h=l.slice(1),g=c[h];if(!g)continue;let m="@media "+(g==="print"?g:"screen and "+g);r[m]||(r[m]={}),r[m].html||(r[m].html={}),r[m].html.fontSize=u/d+p}}return W(et(r,t),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",scrollBehavior:"smooth",...a,fontSize:n.unit?n.base/n.browserDefault+n.unit:n.browserDefault+"px",fontFamily:o.fontFamily,lineHeight:o.lineHeight},body:{boxSizing:"border-box",height:"100%",margin:0,fontFamily:o.fontFamily,fontSize:n.base/n.browserDefault+e.unit.default,...i,...s},a:{color:"currentColor"},button:{color:"inherit",font:"inherit",background:"transparent",border:"none",cursor:"pointer",appearance:"none",WebkitAppearance:"none"},"input, select, textarea":{color:"inherit",font:"inherit"},fieldset:{border:0,padding:0,margin:0}})}};P();var rw=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),nw=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),ow=t=>rw.has(t),ye=t=>{let e=t+"";if(ie.test(e))return e;let r=e.trim();return r==="none"||r==="0"||r==="initial"||r==="inherit"||r==="unset"?e:e.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(nt(o))return`var(${o})`;if(ow(o)||/^\d/.test(o)||o==="0")return o;let s=Q(o);if(de(s))return s;let i=dt(o,"border");return i&&i.border?i.border:o}).join(" ")},su=t=>ie.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(nt(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=Q(e);return de(r)?r:e}).join(" "),iu=(t,e)=>Yi(t,e),ra=(t,e)=>ie.test(t)?t:or(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(nt(n))return`var(${n})`;if(n==="inset"||n==="none")return n;let o=Q(n);if(de(o)){let i=mt(n,e);return _(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em")return n;let s=dt(n,"shadow");return s&&s.shadow?s.shadow:n}).join(" "):"")).join(", "),na=(t,e)=>{let r=t.indexOf("(");if(r===-1)return t;let n=t.slice(0,r+1),o=t.slice(r+1,t.lastIndexOf(")")),s=")",a=or(o).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||nw.has(f)||f==="transparent"||ie.test(f))return f;let p=Q(f);return de(p)?p:f}).join(" ")));return n+a.join(", ")+s},au=(t,e)=>{let r=E();return t.split(", ").map(n=>nt(n)?`var(${n})`:n.includes("url")?n:n.includes("gradient")?na(n,e):r.gradient[t]?{backgroundImage:mt(t,e||r.globalTheme)}:n.includes("/")||n.startsWith("http")||n.includes(".")&&!Ie(n)?`url(${n})`:n).join(" ")},cu=t=>S(t)&&t.split(" ").map(e=>dt(e,"gap").gap).join(" "),Pg=t=>{let e=t.split(" ");return e.length?e.map(r=>nt(r)?`var(${r})`:r.length<3||r.includes("ms")?Nt(r).timing||r:Xt(r)?Xt(r):r).join(" "):t},oa=(t,e,r)=>{if(S(t))return t.split(",").map(n=>Nt(n).timing||n).join(",")},lu=t=>{let e=t.split(",");if(e.length)return e.map(Pg).join(",")};function st(t,e,r={},n={}){let o=q.call(this,e||r[t]);if(o==null)return;let s;if(S(o)){if(o.includes("(")){let c=Fe(o);s=c[0],o=c[1]}let i=r.scaleBoxSize,a=Gi(t);!i&&a&&!n.ratio&&(o=Ki(o))}return n.ratio?ae(r,t,o,s):dt(o,t,void 0,s)}var j=(t,e=null,r)=>st(t,e,r,{ratio:!0}),sa=(t,e,r)=>{if(S(t))return{borderRadius:t.split(" ").map((n,o)=>ae(e,r,n)[r]).join(" ")}};P();var sw=(t,e)=>{let r=E(),{cssVars:n}=r,o=e.startsWith("--")?e:`--${e}`;return n[o]=t,t},Pt=t=>t,fu={color:lr,gradient:fr,font:Ui,fontFamily:Fo,fontfamily:Fo,theme:Bi,icons:Qi,semanticIcons:Pt,semanticicons:Pt,svg:Do,svgData:Pt,typography:Pt,shadow:ur,spacing:Pt,media:Pt,grid:Pt,class:Pt,timing:Pt,reset:Pt,unit:Pt,animation:Pt,vars:sw,sizes:Pt},Ig=(t,e,r)=>{let n=E(),o=Ti(t),s=o.toLowerCase(),i=n[o]||n[s]||n[t],a=fu[o]||fu[s];if(a)try{let c=a(e,r);return i&&(i[r]=c),i}catch(c){n.verbose&&console.warn("Error setting",s,"value",e,r,c)}n.verbose&&console.warn("Can not find",s,"method in scratch")},$g=(t,e)=>{let r=E(),n=t.toLowerCase();return Object.keys(e).sort((s,i)=>{let a=_(e[s])||T(e[s])?1:0,c=_(e[i])||T(e[i])?1:0;return a-c}).forEach(s=>{try{return Ig(n,e[s],s)}catch(i){r.verbose&&console.warn("Error setting",n,"value",e[s],s,i)}}),r[n]||r[t]},uu=(t,e)=>{let r=e||E();r.globalTheme=t;let o=(r.document&&r.document.documentElement?r.document:null)||(typeof document<"u"?document:null),s=o&&o.defaultView||(typeof window<"u"?window:null);if(o){let a=r.themeRoot||o.documentElement;if(t&&t!=="auto")a.setAttribute("data-theme",t),t==="dark"||t==="light"?a.style.colorScheme=t:a.style.colorScheme="light dark";else if(s&&s.matchMedia){let l=p=>{a.setAttribute("data-theme",p.matches?"dark":"light")},f=s.matchMedia("(prefers-color-scheme: dark)");if(l(f),a.style.colorScheme="light dark",!r.__prefersListener){r.__prefersListener=l;try{f.addEventListener("change",l)}catch{f.addListener(l)}}}else a.setAttribute("data-theme","light"),a.style.colorScheme="light"}let i=r.varPrefix?`--${r.varPrefix}-theme-`:"--theme-";for(let a in r.cssVars)a.startsWith(i)&&delete r.cssVars[a];for(let a in r.cssMediaVars)delete r.cssMediaVars[a];if(o&&r.cssVars){let a=r.scopeSelector||":root",c=o.styleSheets;for(let l=0;l<c.length;l++)try{let f=c[l].cssRules;for(let p=0;p<f.length;p++)if(f[p].selectorText===a){for(let u in r.cssVars)f[p].style.setProperty(u,r.cssVars[u]);return r}}catch{}}return r},iw={},Wr=(t,e=iw)=>{let r=e.config||E(),{version:n,verbose:o,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:c,useIconSprite:l,globalTheme:f,themeRoot:p,useDocumentTheme:u,useDefaultConfig:d,semanticIcons:h,files:g,assets:m,...y}=t;e.newConfig&&(r=qf(e.newConfig)),g!==void 0&&(r.files=g),m!==void 0&&(r.assets=m),o!==void 0&&(r.verbose=o),s!==void 0&&(r.useVariable=s),i!==void 0&&(r.useReset=i),c!==void 0&&(r.useFontImport=c),a!==void 0&&(r.useSvgSprite=a),l!==void 0&&(r.useIconSprite=l),u!==void 0&&(r.useDocumentTheme=u),f!==void 0&&(r.globalTheme=f),p!==void 0&&(r.themeRoot=p),t.useThemeSuffixedVars!==void 0&&(r.useThemeSuffixedVars=t.useThemeSuffixedVars),d!==void 0&&(r.useDefaultConfig=d),h!==void 0&&(r.semanticIcons=h),r.verbose&&console.log(r);let w=(r.document&&r.document.documentElement?r.document:null)||(typeof document<"u"?document:null),x=w&&w.defaultView||(typeof window<"u"?window:null),v=w&&(r.themeRoot||w.documentElement);if(v&&typeof v.setAttribute=="function")if(r.globalTheme&&r.globalTheme!=="auto")v.setAttribute("data-theme",r.globalTheme),r.globalTheme==="dark"||r.globalTheme==="light"?v.style.colorScheme=r.globalTheme:v.style.colorScheme="light dark";else if(x&&x.matchMedia){let L=tt=>{v.setAttribute("data-theme",tt.matches?"dark":"light")},V=x.matchMedia("(prefers-color-scheme: dark)");if(L(V),v.style.colorScheme="light dark",!r.__prefersListener){r.__prefersListener=L;try{V.addEventListener("change",L)}catch{V.addListener(L)}}}else v.setAttribute("data-theme","light"),v.style.colorScheme="light";r.__svgCache||(r.__svgCache={});let A=Object.keys(y),R=new Set(A);if(A.forEach(O=>{let L=O.toLowerCase();L!==O&&R.has(L)&&W(y[L],y[O])}),A.map(O=>{let L=O.toLowerCase();if(!(L!==O&&R.has(L)))return $g(O,y[O])}),r.varPrefix&&(r.typography&&(r.typography.varPrefix=r.varPrefix),r.spacing&&(r.spacing.varPrefix=r.varPrefix),r.timing&&(r.timing.varPrefix=r.varPrefix)),y.typography)try{Wi()}catch(O){r.verbose&&console.warn("Error applying typography sequence",O)}if(y.spacing)try{qi()}catch(O){r.verbose&&console.warn("Error applying spacing sequence",O)}if(y.timing)try{Xi()}catch(O){r.verbose&&console.warn("Error applying timing sequence",O)}Zi();let H=ea();return H&&(r.reset=H),r};var Hr=new Map,aw=null,du=null,cw=null;function aa(t){t.batchAtomicCss&&(du=t.batchAtomicCss),t.compoundCssClass&&(cw=t.compoundCssClass)}var lw=new Set;function Mg(t){try{let e=E();e&&(e.document=t)}catch{}t&&lw.add(t)}function hu(){try{let t=E();if(t?.document)return t.document}catch{}return typeof document<"u"?document:null}var fw={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 pr(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function ia(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 uw(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():ia(e)}function Fg(t,e,r){let n=(r?r+"":"")+t+":"+e,o=Hr.get(n),s=o?null:pr(t);if(!o){let a=fw[t]||ia(t),c=uw(e);o=r?`_${r}_${a}-${c}`:`_${a}-${c}`,Hr.set(n,o)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return o;let i=`.${o}{${s||pr(t)}:${e}}`;return jt(i),o}var Dg=new WeakMap;function jt(t,e){let r=Ng(e);if(!r)return;let n=Dg.get(r);if(n||(n=new Set,Dg.set(r,n)),!n.has(t)){n.add(t);try{r.insertRule(t,r.cssRules.length)}catch{}}}var Lg=new WeakMap;function Ng(t){let e=t||hu();if(!e||!e.head)return null;let r=Lg.get(e);if(r&&r.ownerNode&&r.ownerNode.parentNode===e.head)return r;let n=e.head.querySelector("style[data-smbls]");n||(n=e.createElement("style"),n.setAttribute("data-smbls",""),e.head.appendChild(n));let o=n.sheet;return Lg.set(e,o),aw=o,o}var pw=8;function Le(t,e,r){if(!t||typeof t!="object")return"";let n=null,o=0,s=[],i=[];for(let c in t){let l=t[c];l==null||l===!1||l===""||(typeof l=="object"?i.push([c,l]):du?(n||(n=[]),n.push(c,String(l)),o++):s.push(Fg(c,String(l),r)))}if(n&&o>=pw){let c=n.join("\0"),l=du(c),f=l.indexOf("\0"),p=l.substring(0,f),u=l.substring(f+1);if(u){let d=u.split(`
36
- `);for(let h=0;h<d.length;h++)d[h]&&jt(d[h])}s.push(p)}else if(n)for(let c=0;c<n.length;c+=2)s.push(Fg(n[c],n[c+1],r));let a=[];for(let c=0;c<i.length;c++)a.push(dw(i[c][0],i[c][1],r));return s.concat(a).join(" ").trim()}var pu=new Map;function dw(t,e,r){let n=(r?r+"":"")+t+JSON.stringify(e),o=Hr.get(n);if(o){let u=pu.get(o);if(u)for(let d=0;d<u.length;d++)jt(u[d]);return o}o=r?`_${r}_c${ia(n)}`:`_c${ia(n)}`;let s="",i=[],a=u=>typeof u=="string"&&(u.indexOf("{")!==-1||u.indexOf("}")!==-1),c=(u,d)=>{let h="";for(let g in d){let m=d[g];if(m!=null)if(typeof m=="object")c([...u,g],m);else{if(a(m))continue;h+=`${pr(g)}:${m};`}}h&&(u.length===0?s+=h:i.push({chain:u,body:h}))};c([],e);let l=u=>{if(!u.length)return`.${o}`;let d=u[0].split(",").map(h=>h.trim()).map(h=>h.includes("&")?h.replace(/&/g,`.${o}`):h.startsWith(":")?`.${o}${h}`:`.${o} ${h}`);for(let h=1;h<u.length;h++){let g=u[h].split(",").map(y=>y.trim()),m=[];for(let y of d)for(let b of g)b.includes("&")?m.push(b.replace(/&/g,y)):b.startsWith(":")?m.push(y+b):m.push(y+" "+b);d=m}return d.join(", ")},f=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(s){let u=`${t}{.${o}{${s}}}`;f.push(u),jt(u)}for(let u of i){let d=l(u.chain),h=`${t}{${d}{${u.body}}}`;f.push(h),jt(h)}return pu.set(o,f),Hr.set(n,o),o}let p=l([t]);if(s){let u=`${p}{${s}}`;f.push(u),jt(u)}for(let u of i){let h=`${l([t,...u.chain])}{${u.body}}`;f.push(h),jt(h)}return pu.set(o,f),Hr.set(n,o),o}function ft(t){if(Ng(),typeof t=="string"){jt(t);return}let e=Object.keys(t),r=n=>{let o=n.match(/max-width:\s*(\d+)/);return o?parseInt(o[1]):0};e.sort((n,o)=>{let s=n.startsWith("@media"),i=o.startsWith("@media");return!s&&!i?0:s?i?r(o)-r(n):1:-1});for(let n of e){let o=t[n];if(n.startsWith("@media")||n.startsWith("@supports"))for(let s in o){let i=o[s];if(typeof i=="object"&&i!==null){let a="";for(let c in i){let l=c.startsWith("--")?c:pr(c);a+=`${l}:${i[c]};`}jt(`${n}{${s}{${a}}}`)}else{let a=s.startsWith("--")?s:pr(s);jt(`${n}{${a}:${i};}`)}}else{let s="",i=!1;for(let a in o){let c=o[a];if(typeof c=="object"&&c!==null)i=!0;else{let l=a.startsWith("--")?a:pr(a);s+=`${l}:${c};`}}if(s&&jt(`${n}{${s}}`),i){let a=[],c=[];for(let l in o)typeof o[l]=="object"&&o[l]!==null&&(l.startsWith("@media")||l.startsWith("@supports")?a.push(l):c.push(l));a.sort((l,f)=>{let p=u=>{let d=u.match(/max-width:\s*(\d+)/);return d?parseInt(d[1]):0};return p(f)-p(l)});for(let l of c)ft({[`${n} ${l}`]:o[l]});for(let l of a)ft({[l]:{[n]:o[l]}})}}}}function Mo(t,e){let r="";for(let n in e){let o="";for(let s in e[n])o+=`${pr(s)}:${e[n][s]};`;r+=`${n}{${o}}`}return jt(`@keyframes ${t}{${r}}`),t}function jg(){return Hr.size}P();var gu="http://www.w3.org/2000/svg",Bo=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"]),hw=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 No(t){return hw.has(t)||Bo.has(t)}function Vo(t){return Bo.has(t)}function dr(t){let{tag:e,key:r}=t;if(typeof e=="function"&&(e=e(t)),e===!0&&(e=r),typeof e=="string"&&No(e))return e;if(!r||typeof r!="string")return"div";let n=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template"]),o=r.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),No(o)&&!n.has(o)?o:"div"}var Bg={};function jo(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(Vo(t)){let n=e?.parent;if(t==="svg"||n?.node?.namespaceURI===gu)return r.createElementNS(gu,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function hr(t){let e=t.tag=dr(t),n=Vo(e)&&(e==="svg"||t.parent?.node?.namespaceURI===gu)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=Bg[n];if(s||(s=Bg[n]=jo(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?jo(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var Tt=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"]),mu={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},gr=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","beforeRemove","remove"]),yu=new Set(["load","error","abort","canplay","canplaythrough","ended","pause","play","playing","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","durationchange","loadeddata","loadedmetadata","progress","emptied","resize"]),Vg=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),Uo=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","scroll","wheel","contextmenu","drag","dragstart","dragend","dragenter","dragleave","dragover","drop"]);var bu=new WeakMap,gw={passive:!0},mw={passive:!0,capture:!0},xu=(t,e)=>Vg.has(t)?e?mw:gw:e||!1;function zg(t){let e=bu.get(t);return e||(e={handlers:new Map,installed:new Set},bu.set(t,e)),e}function yw(t,e){let r=zg(e);if(r.installed.has(t))return;r.installed.add(t);let n=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave",o=t==="mouseenter"||t==="mouseleave";e.addEventListener(t,s=>{let i=s.target;for(;i&&i!==e;){let a=r.handlers.get(t);if(a){let c=a.get(i);if(c){if(o&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(c(s),s.cancelBubble)return}}i=i.parentNode}},xu(t,n))}function ca(t,e,r,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let o=zg(n);yw(t,n),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,r)}function la(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let n=bu.get(r);if(!n)return;let o=n.handlers.get(t);o&&o.delete(e)}function Ug(t){return Uo.has(t)&&!gr.has(t)}function zo(t,e,r){let{node:n,context:o}=e;if(!n)return;let s=o?.designSystem,i=c=>{s&&lt(s);try{let l=r.call(e,c,e,e.state,o);if(l&&typeof l.then=="function"){l.catch(f=>{e.error=f,console.error("[DOMQL] Async event error:",f)}).finally(()=>{s&&ot()});return}}catch(l){if(e.error=l,console.error("[DOMQL] Event error:",l),o?.strictMode)throw l}s&&ot()},a=yu.has(t);if(!a&&Ug(t)){let c=o?.rootNode||n.ownerDocument?.documentElement;ca(t,n,i,c)}else n.addEventListener(t,i,xu(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!a&&Ug(t)){let c=o?.rootNode||n.ownerDocument?.documentElement;la(t,n,c)}else n.removeEventListener(t,i,xu(t,!1))})}function Wg(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 Wo(t,e,r){let n=Wg(e);if(!n.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<n.length;i++){let a=Hg(n[i],s);a&&a!==e&&Gg(t,a,r,new Set([e]))}}function Hg(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(o=>o.trim()),n=e[r[0]]||e[`smbls.${r[0]}`];for(let o=1;o<r.length&&n;o++)n=n[r[o]];return n||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function Gg(t,e,r,n=new Set){if(n.has(e))return;n.add(e);let o=Wg(e);if(o.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<o.length;a++){let c=Hg(o[a],i);c&&Gg(t,c,r,n)}}for(let s in e){if(s==="extends"||s==="extend")continue;let i=e[s];t[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[s]={...i}:t[s]=i:typeof t[s]=="object"&&typeof i=="object"&&!Array.isArray(t[s])&&!Array.isArray(i)&&t[s]!==null&&i!==null?t[s]=qg(t[s],i):t[s]=i}}function qg(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=qg(o,s):r[n]=s}return r}Ir();function Ho(t={},e={}){let r=this,n=r.__ref;if(n){if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof r.onBeforeUpdate=="function"&&r.onBeforeUpdate(r,r.state,r.context,e)===!1)return r;if(we(()=>{if(t.state&&ct(r.state)&&r.state.update(t.state),t.text!==void 0&&(r.text=t.text,!n.__exec.text&&r.node&&(r.tag==="string"?r.node.nodeValue=t.text??"":r.node.textContent=t.text??"")),t.html!==void 0&&(r.html=t.html,!n.__exec.html&&r.node&&(r.node.innerHTML=t.html)),t.style&&r.node?.style){if(!n.__exec.style)for(let o in t.style){let s=t.style[o];if(s==null)continue;let i=o.replace(/[A-Z]/g,c=>"-"+c.toLowerCase()),a=String(s).replace(/\s*!important\s*$/,"");r.node.style.setProperty(i,a,"important")}r.style||(r.style={}),Object.assign(r.style,t.style)}if(t.attr&&r.node?.setAttribute){for(let o in t.attr){let s=t.attr[o];s==null||s===!1?r.node.removeAttribute(o):typeof s!="function"&&typeof s!="object"&&r.node.setAttribute(o,s===!0?"":s)}r.attr||(r.attr={}),Object.assign(r.attr,t.attr)}if(t.data&&r.node?.dataset){for(let o in t.data)r.node.dataset[o]=t.data[o];r.data||(r.data={}),Object.assign(r.data,t.data)}for(let o in t){if(Tt.has(o)||o==="state")continue;let s=t[o],i=r[o];if(i&&i.__ref&&typeof i.update=="function")i.update(s,e);else if(typeof s=="object"&&s!==null){let a=o.charCodeAt(0);a>=65&&a<=90&&Zt(s,r,o,e)}else o!=="text"&&o!=="html"&&o!=="style"&&o!=="attr"&&o!=="data"&&(r[o]=s)}}),r.node&&n.__conditionalRunners)for(let o of n.__conditionalRunners)o();return Dt("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}}function mr(t){if(!t)return;let e=t.__ref;if(e){try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(r){console.error("[smbls] onBeforeRemove error:",r)}if(e.__effects){for(let r=0;r<e.__effects.length;r++)e.__effects[r].dispose();e.__effects.length=0}if(e.__eventCleanup){for(let r=0;r<e.__eventCleanup.length;r++)e.__eventCleanup[r]();e.__eventCleanup.length=0}if(e.__children){for(let r=0;r<e.__children.length;r++){let n=e.__children[r],o=t[n];o&&o.__ref&&mr(o)}e.__children.length=0}if(t.node?.parentNode&&t.node.remove(),t.state?.destroy&&t.state.__element===t&&t.state.destroy(),t.parent?.__ref?.__children){let r=t.parent.__ref.__children.indexOf(t.key);r!==-1&&t.parent.__ref.__children.splice(r,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(r){console.error("[smbls] onRemove error:",r)}t.node=null,t.parent=null,t.__ref=null}}function Go(){mr(this)}P();P();var bw=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],xw=["none","forwards","backwards","both"],_w=["normal","reverse","alternate","alternate-reverse"],Sw=["running","paused"],ww=t=>/^[\d.]+m?s$/.test(t),kw=0,Kg=new Map,_u=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(_(t)){let o=JSON.stringify(t),s=Kg.get(o);if(s)return s;let i=`smbls-anim-${kw++}`,a=Mo(i,t);return Kg.set(o,a),a}let n=r&&r[t];return _(n)?Mo(t,n):t},vw=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},n=t.split(/\s+/),o=null,s=[],i=null,a=null,c=null,l=null,f=null;for(let p of n)r&&r[p]?o=p:ww(p)?s.push(p):bw.includes(p)||p.startsWith("cubic-bezier")||p.startsWith("steps(")?i=p:p==="infinite"||/^\d+$/.test(p)?a=p==="infinite"?p:Number(p):_w.includes(p)?c=p:xw.includes(p)?l=p:Sw.includes(p)?f=p:o||(o=p);return{name:o,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},Su={animation:(t,e)=>{if(S(t)&&t.includes(" ")){let r=vw(t,e);return{animationName:_u(r.name||t,e),animationDuration:r.durations[0]||Nt(e.animationDuration||"A").timing,animationDelay:r.durations[1]||Nt(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||Xt(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||"both",animationIterationCount:r.iterationCount!=null?r.iterationCount:e.animationIterationCount||1,animationPlayState:r.playState||e.animationPlayState,animationDirection:r.direction||e.animationDirection}}return{animationName:_u(t,e),animationDuration:Nt(e.animationDuration||"A").timing,animationDelay:Nt(e.animationDelay||"0s").timing,animationTimingFunction:Xt(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||"both",animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:_u(t,e)}),animationDuration:t=>({animationDuration:Nt(t).timing}),animationDelay:t=>({animationDelay:Nt(t).timing}),animationTimingFunction:t=>({animationTimingFunction:Xt(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};P();var wu={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>j("height",t,e),width:(t,e)=>j("width",t,e),boxSizing:t=>ht(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...st("height",e),...st("width",r||e)}},inlineSize:(t,e)=>j("inlineSize",t,e),blockSize:(t,e)=>j("blockSize",t,e),minWidth:(t,e)=>j("minWidth",t,e),maxWidth:(t,e)=>j("maxWidth",t,e),widthRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...st("minWidth",e),...st("maxWidth",r||e)}},minHeight:(t,e)=>j("minHeight",t,e),maxHeight:(t,e)=>j("maxHeight",t,e),heightRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...st("minHeight",e),...st("maxHeight",r||e)}},size:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...j("inlineSize",e),...j("blockSize",r||e)}},minBlockSize:(t,e)=>j("minBlockSize",t,e),minInlineSize:(t,e)=>j("minInlineSize",t,e),maxBlockSize:(t,e)=>j("maxBlockSize",t,e),maxInlineSize:(t,e)=>j("maxInlineSize",t,e),minSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...st("minInlineSize",e),...st("minBlockSize",r||e)}},maxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...st("maxInlineSize",e),...st("maxBlockSize",r||e)}},borderWidth:(t,e)=>j("borderWidth",t,e),padding:(t,e)=>j("padding",t,e),scrollPadding:(t,e)=>j("scrollPadding",t,e),paddingInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...st("paddingInlineStart",e),...st("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...st("paddingBlockStart",e),...st("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>j("paddingBlockStart",t,e),paddingBottom:(t,e)=>j("paddingBlockEnd",t,e),paddingLeft:(t,e)=>j("paddingInlineStart",t,e),paddingRight:(t,e)=>j("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>j("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>j("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>j("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>j("paddingInlineEnd",t,e),margin:(t,e)=>j("margin",t,e),marginInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...st("marginInlineStart",e),...st("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!S(e.marginBlock))return;let[r,n]=e.marginBlock.split(" ");return{...st("marginBlockStart",r),...st("marginBlockEnd",n||r)}},marginTop:(t,e)=>j("marginBlockStart",t,e),marginBottom:(t,e)=>j("marginBlockEnd",t,e),marginLeft:(t,e)=>j("marginInlineStart",t,e),marginRight:(t,e)=>j("marginInlineEnd",t,e),marginInlineStart:(t,e)=>j("marginInlineStart",t,e),marginInlineEnd:(t,e)=>j("marginInlineEnd",t,e),marginBlockStart:(t,e)=>j("marginBlockStart",t,e),marginBlockEnd:(t,e)=>j("marginBlockEnd",t,e),gap:t=>({gap:cu(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(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},flexAlign:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>sa(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>sa(t??e.round,e,"borderRadius")};var ku={fontSize:t=>Hi(t)||t,fontFamily:t=>({fontFamily:zi(t)||t}),fontWeight:t=>({fontWeight:t,fontVariationSettings:'"wght" '+t})};var vu={overflow:t=>({overflow:t,scrollBehavior:"smooth"}),cursor:(t,e,r,n)=>{if(!t)return;let o=n.assets&&n.assets[t];if(o&&o.content)t=`url(${o.content.src})`;else{let s=n.files&&n.files[t];s&&s.content&&(t=`url(${s.content.src})`)}return{cursor:t}},opacity:t=>t!=null?{opacity:String(t)}:void 0,visibility:t=>t!=null?{visibility:t}:void 0,pointerEvents:t=>t!=null?{pointerEvents:t}:void 0};var Cu={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>dt(r,"k").k).join(" ")}},left:t=>dt(t,"left"),top:t=>dt(t,"top"),right:t=>dt(t,"right"),bottom:t=>dt(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>dt(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=>dt(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};P();var Bt=({context:t,state:e})=>{let r=e?.root?.globalTheme||t.designSystem?.globalTheme;return r==="auto"?null:r},Au={theme:(t,e)=>{if(t)return e.themeModifier?Yt(t,`@${e.themeModifier}`):Yt(t)},color:(t,e)=>{let r=Bt(e);if(t)return{color:mt(t,r)}},background:(t,e)=>{let r=Bt(e);if(t)return S(t)&&t.includes("gradient")?{background:na(t,r)}:{background:mt(t,r)}},backgroundColor:(t,e)=>{let r=Bt(e);if(t)return{backgroundColor:mt(t,r)}},backgroundImage:(t,e,r,n)=>{let o=Bt(e);if(!t)return;let s=n.assets&&n.assets[t];if(s&&s.content)t=s.content.src;else{let i=n.files&&n.files[t];i&&i.content&&(t=i.content.src)}return{backgroundImage:au(t,o)}},textStroke:t=>({WebkitTextStroke:su(t)}),outline:t=>({outline:ye(t)}),outlineOffset:(t,e)=>j("outlineOffset",t,e),border:t=>({border:ye(t)}),borderColor:(t,e)=>{let r=Bt(e);if(t)return{borderColor:mt(t,r)}},borderTopColor:(t,e)=>{let r=Bt(e);if(t)return{borderTopColor:mt(t,r)}},borderBottomColor:(t,e)=>{let r=Bt(e);if(t)return{borderBottomColor:mt(t,r)}},borderLeftColor:(t,e)=>{let r=Bt(e);if(t)return{borderLeftColor:mt(t,r)}},borderRightColor:(t,e)=>{let r=Bt(e);if(t)return{borderRightColor:mt(t,r)}},borderLeft:t=>({borderLeft:ye(t)}),borderTop:t=>({borderTop:ye(t)}),borderRight:t=>({borderRight:ye(t)}),borderBottom:t=>({borderBottom:ye(t)}),shadow:(t,e)=>{let r=Bt(e);if(t)return{boxShadow:iu(t,r)}},boxShadow:(t,e)=>{if(!S(t))return;let[r,n]=t.split("!importan"),o=Bt(e),s=n?" !important":"";return{boxShadow:ra(r.trim(),o)+s}},textShadow:(t,{context:e})=>({textShadow:ra(t,e.designSystem.globalTheme)}),columnRule:t=>({columnRule:ye(t)})};var qo={transition:t=>({transition:lu(t)}),transitionDuration:t=>({transitionDuration:oa(t)}),transitionDelay:t=>({transitionDelay:oa(t)}),transitionTimingFunction:t=>({transitionTimingFunction:Xt(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};P();var Eu={flow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},wrap:(t,e)=>({display:"flex",flexWrap:t}),align:(t,e)=>{let[r,n]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:n}}};var Tu={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 ut={...Su,...wu,...ku,...vu,...Cu,...Au,...qo,...Eu,...Tu};var yt=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","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","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","top","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);P();var Cw=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,Aw=(t,e,r)=>{let{context:n}=r;if(!n.designSystem?.media)return;let o=t.slice(1),s=n.designSystem.media[o],i=It(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(Cw),c=a?a[1]||a[2]:o,l={[`${s} &`]:i};if(c==="dark"||c==="light"){let f=n.designSystem?.scopeSelector||":root",p=f===":root"?":root:not([data-theme])":`${f}:not([data-theme])`;l[`@media (prefers-color-scheme: ${c})`]={[`${p} &`]:i}}return l},Yg=(t,e,r)=>({[t]:It(e,r)}),Ko=(t,e,r)=>{let n=`&${t}`,o=It(e,r);if(t.includes(",")&&o){let s={},i={};for(let a in o)typeof o[a]=="object"&&o[a]!==null?i[a]=o[a]:s[a]=o[a];if(Object.keys(i).length){let a=n.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[n]=s);for(let l in i){let f=a.map(p=>`${p} ${l}`).join(", ");c[f]=i[l]}return c}}return{[n]:o}},Ou=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return C(r)?r.call(e,e):!!r},Ew=(t,e,r)=>{let n=t.slice(1),o=Ou(n,r);if(o===void 0&&(o=!!r[n]),!!o)return It(e,r)},Tw=(t,e,r)=>({[t]:e}),Ow=(t,e,r)=>{let n=t.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=Ou(n,r);s!==void 0&&(o=s)}if(o)return It(e,r)},Rw=(t,e,r)=>{let n=t.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=Ou(n,r);s!==void 0&&(o=s)}if(!o)return It(e,r)},Ru=(t,e)=>It(t,e),Pu={"@":Aw,":":Ko,"[":Ko,"*":Ko,"+":Ko,"~":Ko,"&":Yg,">":Yg,$:Ew,"-":Tw,".":Ow,"!":Rw};var Iu=Ce(),Xg=(t,e,r)=>{let n=e?.context?.designSystem;n&&lt(n);try{let o={},s={},i=(a,c)=>{if(r.unpack){o={...o,...c};return}o[a]=c};for(let a in t){let c=t[a];if(a==="class"&&e.call("isString",t.class)){let l=c.split(" ");if(l.length){let f=e.context.designSystem.class,p=l.reduce((u,d)=>et(u,f[d]),{});o.designSystemClass=p}}else if(a==="true"){let l=q(c,e);et(o,Ru(l,e))}else if(e.classlist[a]){let l=e.classlist[a],f=C(l)?l(e,e.state,e.context):l;f&&i(a,f),!Iu&&_(o[a])&&(o[a].label=a)}else if(ut[a]){let l=q(c,e);T(l)&&(l=l.reduce((p,u)=>et(p,u),{}));let f=ut[a](l,e,e.state,e.context);T(f)&&(f=f.reduce((p,u)=>et(p,u),{})),f&&i(a,f),!Iu&&_(o[a])&&(o[a].label=a)}else if(yt.has(a)){let l=q(c,e);typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),i(a,{[a]:l}),!Iu&&_(o[a])&&(o[a].label=a)}else s[a]=c}return[o,s]}finally{n&&ot()}},Zg=(t,e)=>{let r={};for(let n in t){let o=Pu[n.slice(0,1)];if(o){let s=o(n,t[n],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]&&typeof r[i]=="object"&&typeof s[i]=="object"?Ct(r[i],s[i]):r[i]=s[i])}}return r},It=(t,e,r={unpack:!0})=>{let[n,o]=Xg(t,e,r),s=Zg(o,e),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return On(n,s);n._selectors=s}return n},Pw=(t,e)=>{let r={};if(t.class)for(let n in t.class)r[n]=t.class[n](e);return r};P();var Jg=t=>{if(_(t))return It(t,t)},Iw=(t,e)=>{let r=Jg(t);return typeof e=="function"?e(r):Le(r)};P();function em(t,e,r){let n=t?.context?.analyze;if(!n||!n.emit||e==="warn"&&!n.shouldCapture("warnings")||e==="error"&&!n.shouldCapture("errors"))return;let o=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");n.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:e==="error"?"error":"warning",level:e,hook:e==="error"?"el.error":"el.warn",element:{key:t.key!=null?String(t.key):null,name:t.__name||null,tag:t.tag||null},message:o||null,args:r})}function $w(...t){return em(this,"warn",t),go.apply(this,t)}function Fw(...t){return em(this,"error",t),rr.apply(this,t)}var Qg={update:Ho,remove:Go,getDB:xo,getQuery:_o,getRootData:uo,getChildren:io,getPath:ao,nextElement:mo,previousElement:yo,verbose:Mr,warn:$w,error:Fw,variables:bo,spotByPath:so,set(t,e){if(this.removeContent(),t!=null){let r=this.context?.__create;r&&r(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,n=this.key,o=this.parse();return this.remove(),e(o,r,n,t)},lookup(t){let e=this.parent;for(;e;){if(typeof t=="function"){if(t(e))return e}else if(typeof t=="string"){if(e.key===t)return e;if(e[t]&&e[t].__ref)return e[t]}e=e.parent}return null},lookdown(t){let e=this.__ref;if(!e?.__children)return null;for(let r of e.__children){let n=this[r];if(!n)continue;if(typeof t=="function"){if(t(n))return n}else if(typeof t=="string"&&n.key===t)return n;let o=n.lookdown?.(t);if(o)return o}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let n of r.__children){let o=this[n];o&&(typeof t=="function"?t(o)&&e.push(o):typeof t=="string"&&o.key===t&&e.push(o),o.lookdownAll?.(t,e))}return e},getRef(){return this.__ref},getRoot:fo,getRootState:lo,getRootContext:po,getContext:ho,parse(t){let e={},r=t?new Set(t):null,n=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!r?.has(o)){if(n&&n[o]!==void 0){e[o]=n[o];continue}typeof this[o]!="function"&&(e[o]=this[o])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let n of r.__children)this[n]?.parseDeep&&(e[n]=this[n].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let r of t)e[r]=this[r];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(let e in t){let r=t[e];if(r==null)continue;let n=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(n,o,"important")}},call(t,...e){let r=this.context,n=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof n=="function")return n.call(this,...e)},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)}},tm=new WeakMap;function Dw(t){if(!t)return Qg;let e=tm.get(t);if(e)return e;e=Object.create(Qg);let r=t.methods;if(r)for(let n in r)e[n]=r[n];return tm.set(t,e),e}function Yo(t){let e=Dw(t.context);Object.setPrototypeOf(t,e)}P();Ir();var Lw=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},Vt=(t,e)=>{if(ct(e)){let o=e.__raw||e;e.toggle||Object.defineProperty(o,"toggle",{value:function(s,i={}){e[s]=!e[s]},enumerable:!1,configurable:!0}),e.set||Object.defineProperty(o,"set",{value:function(s,i={}){return e.clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.update(s,i),e},enumerable:!1,configurable:!0}),Object.defineProperty(o,"setByPath",{value: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},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"getByPath",{value: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},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"removeByPath",{value: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},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"reset",{value:function(s={}){let i=e.parse();return e.set(i,s)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"apply",{value:function(s,i={}){if(typeof s=="function"){let a=s(e);return e.update(a,i)}},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"applyFunction",{value:function(s,i={}){if(typeof s=="function")return s(e),e.update(e.parse(),i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"rootUpdate",{value:function(s,i={}){let a=e;for(;a?.parent&&ct(a.parent);)a=a.parent;return a.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"parentUpdate",{value:function(s,i={}){if(e.parent)return e.parent.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"quietReplace",{value:function(s,i={}){return e.replace(s,{quiet:!0,...i})},enumerable:!1,configurable:!0,writable:!0}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=e,i=ct(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,ct(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o]},n={update(o){if(!o||typeof o!="object")return e;for(let s in o)e[s]=o[s];return e},apply(o){if(typeof o!="function")return e;let s=o(e);return s?e.update(s):e},parse(){return{...e}},toggle(o){return e[o]=!e[o],e},set(o){if(!o||typeof o!="object")return e;r();for(let s in o)e[s]=o[s];return e},replace(o){return e.set(o)},clean(){return r(),e}};for(let o in n)typeof e[o]!="function"&&Lw(e,o,n[o])};var rm=function(t,e,r){return t.state=Fu(t,e,r),t.state},Fu=function(t,e,r){let{__ref:n}=t,o=t.state;if(o==null||o===!1){let s=e?.state||{};return Vt(t,s),s}if(typeof o=="string")return n&&(n.__state=o),n.__stateType="string",Mw(o,t,e);if(typeof o=="number"||typeof o=="boolean"){n&&(n.__state=o,n.__stateType=typeof o,n.__hasRootState=!0);let s=Ft({value:o});return s.__element=t,e?.state&&(s.parent=e.state),Vt(t,s),s}if(typeof o=="function"&&(o=o(t,e?.state)||{}),typeof o=="object"&&!ct(o)){n&&(n.__hasRootState=!0),o.isRootState&&n&&(n.__hasRootState=!0);let s=Ft({...o});if(s.__element=t,!Object.getOwnPropertyDescriptor(s,"root")){let i=e?.state?.root||e?.state||s;Object.defineProperty(s,"root",{get:()=>i,enumerable:!1,configurable:!0})}return e?.state&&(s.parent=e.state,e.state.__children&&(e.state.__children[t.key]=s)),Vt(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,r),s}return ct(o)?(o.__element=t,o):e?.state||{}};function $u(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function Mw(t,e,r){if(!r?.state)return{};if(t===".")return r.state;if(t.startsWith("../")){let o=t.slice(3),s=r.state?.parent;return o&&s?$u(s,o):s??r.state??{}}if(t.startsWith("~/")){let o=r.state;for(;o?.parent;)o=o.parent;let s=t.slice(2);return s?$u(o,s):o??{}}let n=$u(r.state,t);if(n&&typeof n=="object"&&!ct(n)&&!Object.getOwnPropertyDescriptor(n,"root")){let o=r.state?.root||r.state;Object.defineProperty(n,"root",{get:()=>o,enumerable:!1,configurable:!0})}return n}var sm=(t,e)=>{if(!t)return om;let r=jw(t,e);return!r||!r.state?om:Vw(r.state)},im=()=>Sr()!=null,Nw=128;function jw(t,e){let r=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,n=t,o=null;for(let s=0;s<Nw&&n;s++){if(r(n)&&n.state)return n;if(n.state&&!o&&(o=n),!n.parent||n.parent===n)break;n=n.parent}return o}var Bw={get(t,e){return t[e]}},nm=new WeakMap,Vw=t=>{let e=nm.get(t);return e||(e=new Proxy(t,Bw),nm.set(t,e)),e},om=new Proxy(Object.create(null),{get(){},has(){return!1}});P();var Uw=["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"],fa={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"]},cm=["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"],Mu=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()):null,Ne=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Mu(e)||fa.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(fa,t)?fa[t].includes(e):!1,Nu=t=>{if(!S(t))return!1;let e=t.toLowerCase();return cm.includes(e)},zw=(t,e,r)=>{let n={};for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(r&&o in r)continue;if(o==="aria"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])kt(e[o][a])&&(n["aria-"+a]=e[o][a]);continue}if(o==="data"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])if(kt(e[o][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());n["data-"+c]=e[o][a]}continue}let s=Ne(t,o),i=Nu(o);if(kt(e[o])&&(s||i)){let a=Mu(o)||o;n[a]=e[o]}}return n},Ww=(t,e)=>{let r={};if(t.attr)for(let n in t.attr)r[n]=t.attr[n](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let n in t.aria){let o=t.aria[n];typeof o=="function"&&(r["aria-"+n]=o(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let n in t.data){let o=t.data[n];if(typeof o=="function"){let s=n.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());r["data-"+s]=o(e,e.state,e.context)}}return r},Me=(t,e)=>{let r=t.call("exec",e,t);if(r)return S(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},Du=(t,e)=>{let r=(t.preSrc||"")+(Me(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:n}=t;if(!n.files&&!n.assets)return r;if(r.startsWith("/assets/")){let o=r.slice(8),s=n.assets&&(n.assets[r]||n.assets[o]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let o=r.slice(7),s=n.files&&(n.files[r]||n.files[o]);return s&&s.content?s.content.src:r}if(n.assets){let o=n.assets[r];if(o&&o.content)return o.content.src}if(n.files){let o=n.files[r];if(o&&o.content)return o.content.src}return r},Lu={src:t=>Du(t,t.src),href:t=>Me(t,t.href),action:t=>Me(t,t.action),poster:t=>Du(t,t.poster),data:t=>Me(t,t.data)},ju=t=>{let e=t.tag||"div",r={};for(let n in Lu)if(t[n]!==void 0&&Ne(e,n)){let o=Lu[n](t);o!==void 0&&(r[n]=o)}return r},am=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return C(r)?r.call(e,e):!!r},Hw=(t,e,r)=>{if(t==="$"){let o=am(e,r);return o===void 0&&(o=!!r[e]),o}let n=r[e]===!0||r.state[e];if(!n){let o=am(e,r);o!==void 0&&(n=o)}return t==="."?!!n:!n},Gw=new Set(["$",".","!"]),qw=(t,e,r)=>{let n={},o=(s,i,a,c)=>{let l=i;n[s]=f=>{if(Hw(a,c,f))return C(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!Gw.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 d in a[l])o("aria-"+d,a[l][d],i,c);continue}if(l==="data"&&a[l]&&typeof a[l]=="object"){for(let d in a[l]){let h=d.replace(/([A-Z])/g,g=>"-"+g.toLowerCase());o("data-"+h,a[l][d],i,c)}continue}let f=Ne(e,l),p=Nu(l);if(!f&&!p)continue;let u=Mu(l)||l;o(u,a[l],i,c)}}return n};var Kw=1;function qr(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function Yw(t){return t.charAt(2).toLowerCase()+t.slice(3)}function Xw(t){return t.toLowerCase()}function zu(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=zu(o,s):r[n]=s}return r}function Zt(t,e,r,n={},o){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});let s=Object.create(null);s.key=r||t.key||`_${Kw++}`,s.parent=e||null,s.context=t.context||e?.context||n.context||{},s.context.__create||(s.context.__create=Zt);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]};if(r&&!t.extends&&!t.extend){let g=r.indexOf("_");if(g>0){let m=r.substring(0,g),y=s.context?.components;y&&(y[m]||y["smbls."+m])&&(t={extends:m,...t})}}Wo(s,t,n);let a=new Set(["childProps","attr","style","scope","data"]),c=s.props&&typeof s.props=="object"?s.props:null;for(let g in t){if(g==="parent"||g==="node"||g==="__ref"||g==="extends"||g==="context"||g==="props")continue;let m=t[g],y=s[g],b=y&&m&&typeof y=="object"&&typeof m=="object"&&!Array.isArray(y)&&!Array.isArray(m)&&typeof y!="function"&&typeof m!="function";b&&g.charCodeAt(0)>=65&&g.charCodeAt(0)<=90?s[g]=zu(y,m):b&&a.has(g)?s[g]={...y,...m}:s[g]=m}function l(g){for(let m in g){let y=g[m],b=s[m],w=b&&y&&typeof b=="object"&&typeof y=="object"&&!Array.isArray(b)&&!Array.isArray(y)&&typeof b!="function"&&typeof y!="function";w&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?s[m]=zu(b,y):w&&a.has(m)?s[m]={...b,...y}:s[m]=y}}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,p=e?.scope,u=s.context&&typeof s.context.globalScope=="object"&&s.context.globalScope||null,d=p||u||null;if(t.scope!==void 0||f){let g={};f&&Object.assign(g,f),t.scope!==void 0&&Object.assign(g,t.scope),s.scope=As(g,d)}else d&&(s.scope=d);if(t.if!==void 0&&(s.if=t.if),Yo(s),Zw(s,e,t),s.if!=null){let g;if(typeof s.if=="function")try{g=s.if(s,s.state,s.context)}catch(m){if(g=!1,i.__ifError=m,typeof console<"u"&&console.warn){let y=s.key||s.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${y} \u2014 treating as false:`,m?.message||m)}}else g=s.if;i.__if=!!g}if(i.__if)typeof t.if=="function"&&(i.__ifInitialized=!0);else return e&&(e[s.key]=s),typeof t.if=="function"&&Wu(s,{if:t.if}),s;s.tag||(s.tag=dr(s)),je("Init",s,n);let h=s.node=hr(s);if(!h)return s;je("AttachNode",s,n),h.ref=s,h.setAttribute&&s.key&&h.setAttribute("data-key",s.key),h.setAttribute&&s.context?.scopeSelector&&s.context.scopeSelector!==":root"&&s.context.key&&s.key===s.context.key&&h.setAttribute("data-smbls-app",s.context.key),s.id&&h.setAttribute&&(h.id=s.id),dm(s,n),Wu(s,t),Hu(s),um(s),s0(s);try{hm(s,n)}catch(g){if(typeof console<"u"&&console.error){let m=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${m}:`,g?.message||g,g?.stack?`
36
+ `);for(let h=0;h<d.length;h++)d[h]&&jt(d[h])}s.push(p)}else if(n)for(let c=0;c<n.length;c+=2)s.push(Fg(n[c],n[c+1],r));let a=[];for(let c=0;c<i.length;c++)a.push(dw(i[c][0],i[c][1],r));return s.concat(a).join(" ").trim()}var pu=new Map;function dw(t,e,r){let n=(r?r+"":"")+t+JSON.stringify(e),o=Hr.get(n);if(o){let u=pu.get(o);if(u)for(let d=0;d<u.length;d++)jt(u[d]);return o}o=r?`_${r}_c${ia(n)}`:`_c${ia(n)}`;let s="",i=[],a=u=>typeof u=="string"&&(u.indexOf("{")!==-1||u.indexOf("}")!==-1),c=(u,d)=>{let h="";for(let g in d){let m=d[g];if(m!=null)if(typeof m=="object")c([...u,g],m);else{if(a(m))continue;h+=`${pr(g)}:${m};`}}h&&(u.length===0?s+=h:i.push({chain:u,body:h}))};c([],e);let l=u=>{if(!u.length)return`.${o}`;let d=u[0].split(",").map(h=>h.trim()).map(h=>h.includes("&")?h.replace(/&/g,`.${o}`):h.startsWith(":")?`.${o}${h}`:`.${o} ${h}`);for(let h=1;h<u.length;h++){let g=u[h].split(",").map(y=>y.trim()),m=[];for(let y of d)for(let b of g)b.includes("&")?m.push(b.replace(/&/g,y)):b.startsWith(":")?m.push(y+b):m.push(y+" "+b);d=m}return d.join(", ")},f=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(s){let u=`${t}{.${o}{${s}}}`;f.push(u),jt(u)}for(let u of i){let d=l(u.chain),h=`${t}{${d}{${u.body}}}`;f.push(h),jt(h)}return pu.set(o,f),Hr.set(n,o),o}let p=l([t]);if(s){let u=`${p}{${s}}`;f.push(u),jt(u)}for(let u of i){let h=`${l([t,...u.chain])}{${u.body}}`;f.push(h),jt(h)}return pu.set(o,f),Hr.set(n,o),o}function ft(t){if(Ng(),typeof t=="string"){jt(t);return}let e=Object.keys(t),r=n=>{let o=n.match(/max-width:\s*(\d+)/);return o?parseInt(o[1]):0};e.sort((n,o)=>{let s=n.startsWith("@media"),i=o.startsWith("@media");return!s&&!i?0:s?i?r(o)-r(n):1:-1});for(let n of e){let o=t[n];if(n.startsWith("@media")||n.startsWith("@supports"))for(let s in o){let i=o[s];if(typeof i=="object"&&i!==null){let a="";for(let c in i){let l=c.startsWith("--")?c:pr(c);a+=`${l}:${i[c]};`}jt(`${n}{${s}{${a}}}`)}else{let a=s.startsWith("--")?s:pr(s);jt(`${n}{${a}:${i};}`)}}else{let s="",i=!1;for(let a in o){let c=o[a];if(typeof c=="object"&&c!==null)i=!0;else{let l=a.startsWith("--")?a:pr(a);s+=`${l}:${c};`}}if(s&&jt(`${n}{${s}}`),i){let a=[],c=[];for(let l in o)typeof o[l]=="object"&&o[l]!==null&&(l.startsWith("@media")||l.startsWith("@supports")?a.push(l):c.push(l));a.sort((l,f)=>{let p=u=>{let d=u.match(/max-width:\s*(\d+)/);return d?parseInt(d[1]):0};return p(f)-p(l)});for(let l of c)ft({[`${n} ${l}`]:o[l]});for(let l of a)ft({[l]:{[n]:o[l]}})}}}}function Mo(t,e){let r="";for(let n in e){let o="";for(let s in e[n])o+=`${pr(s)}:${e[n][s]};`;r+=`${n}{${o}}`}return jt(`@keyframes ${t}{${r}}`),t}function jg(){return Hr.size}P();var gu="http://www.w3.org/2000/svg",Bo=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"]),hw=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 No(t){return hw.has(t)||Bo.has(t)}function Vo(t){return Bo.has(t)}function dr(t){let{tag:e,key:r}=t;if(typeof e=="function"&&(e=e(t)),e===!0&&(e=r),typeof e=="string"&&No(e))return e;if(!r||typeof r!="string")return"div";let n=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template"]),o=r.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),No(o)&&!n.has(o)?o:"div"}var Bg={};function jo(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(Vo(t)){let n=e?.parent;if(t==="svg"||n?.node?.namespaceURI===gu)return r.createElementNS(gu,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function hr(t){let e=t.tag=dr(t),n=Vo(e)&&(e==="svg"||t.parent?.node?.namespaceURI===gu)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=Bg[n];if(s||(s=Bg[n]=jo(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?jo(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var Tt=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"]),mu={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},gr=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","beforeRemove","remove"]),yu=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"]),Vg=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),Uo=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 bu=new WeakMap,gw={passive:!0},mw={passive:!0,capture:!0},xu=(t,e)=>Vg.has(t)?e?mw:gw:e||!1;function zg(t){let e=bu.get(t);return e||(e={handlers:new Map,installed:new Set},bu.set(t,e)),e}function yw(t,e){let r=zg(e);if(r.installed.has(t))return;r.installed.add(t);let n=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave",o=t==="mouseenter"||t==="mouseleave";e.addEventListener(t,s=>{let i=s.target;for(;i&&i!==e;){let a=r.handlers.get(t);if(a){let c=a.get(i);if(c){if(o&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(c(s),s.cancelBubble)return}}i=i.parentNode}},xu(t,n))}function ca(t,e,r,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let o=zg(n);yw(t,n),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,r)}function la(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let n=bu.get(r);if(!n)return;let o=n.handlers.get(t);o&&o.delete(e)}function Ug(t){return Uo.has(t)&&!gr.has(t)}function zo(t,e,r){let{node:n,context:o}=e;if(!n)return;let s=o?.designSystem,i=c=>{s&&lt(s);try{let l=r.call(e,c,e,e.state,o);if(l&&typeof l.then=="function"){l.catch(f=>{e.error=f,console.error("[DOMQL] Async event error:",f)}).finally(()=>{s&&ot()});return}}catch(l){if(e.error=l,console.error("[DOMQL] Event error:",l),o?.strictMode)throw l}s&&ot()},a=yu.has(t);if(!a&&Ug(t)){let c=o?.rootNode||n.ownerDocument?.documentElement;ca(t,n,i,c)}else n.addEventListener(t,i,xu(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!a&&Ug(t)){let c=o?.rootNode||n.ownerDocument?.documentElement;la(t,n,c)}else n.removeEventListener(t,i,xu(t,!1))})}function Wg(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 Wo(t,e,r){let n=Wg(e);if(!n.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<n.length;i++){let a=Hg(n[i],s);a&&a!==e&&Gg(t,a,r,new Set([e]))}}function Hg(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(o=>o.trim()),n=e[r[0]]||e[`smbls.${r[0]}`];for(let o=1;o<r.length&&n;o++)n=n[r[o]];return n||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function Gg(t,e,r,n=new Set){if(n.has(e))return;n.add(e);let o=Wg(e);if(o.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<o.length;a++){let c=Hg(o[a],i);c&&Gg(t,c,r,n)}}for(let s in e){if(s==="extends"||s==="extend")continue;let i=e[s];t[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[s]={...i}:t[s]=i:typeof t[s]=="object"&&typeof i=="object"&&!Array.isArray(t[s])&&!Array.isArray(i)&&t[s]!==null&&i!==null?t[s]=qg(t[s],i):t[s]=i}}function qg(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=qg(o,s):r[n]=s}return r}Ir();function Ho(t={},e={}){let r=this,n=r.__ref;if(n){if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof r.onBeforeUpdate=="function"&&r.onBeforeUpdate(r,r.state,r.context,e)===!1)return r;if(we(()=>{if(t.state&&ct(r.state)&&r.state.update(t.state),t.text!==void 0&&(r.text=t.text,!n.__exec.text&&r.node&&(r.tag==="string"?r.node.nodeValue=t.text??"":r.node.textContent=t.text??"")),t.html!==void 0&&(r.html=t.html,!n.__exec.html&&r.node&&(r.node.innerHTML=t.html)),t.style&&r.node?.style){if(!n.__exec.style)for(let o in t.style){let s=t.style[o];if(s==null)continue;let i=o.replace(/[A-Z]/g,c=>"-"+c.toLowerCase()),a=String(s).replace(/\s*!important\s*$/,"");r.node.style.setProperty(i,a,"important")}r.style||(r.style={}),Object.assign(r.style,t.style)}if(t.attr&&r.node?.setAttribute){for(let o in t.attr){let s=t.attr[o];s==null||s===!1?r.node.removeAttribute(o):typeof s!="function"&&typeof s!="object"&&r.node.setAttribute(o,s===!0?"":s)}r.attr||(r.attr={}),Object.assign(r.attr,t.attr)}if(t.data&&r.node?.dataset){for(let o in t.data)r.node.dataset[o]=t.data[o];r.data||(r.data={}),Object.assign(r.data,t.data)}for(let o in t){if(Tt.has(o)||o==="state")continue;let s=t[o],i=r[o];if(i&&i.__ref&&typeof i.update=="function")i.update(s,e);else if(typeof s=="object"&&s!==null){let a=o.charCodeAt(0);a>=65&&a<=90&&Zt(s,r,o,e)}else o!=="text"&&o!=="html"&&o!=="style"&&o!=="attr"&&o!=="data"&&(r[o]=s)}}),r.node&&n.__conditionalRunners)for(let o of n.__conditionalRunners)o();return Dt("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}}function mr(t){if(!t)return;let e=t.__ref;if(e){try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(r){console.error("[smbls] onBeforeRemove error:",r)}if(e.__effects){for(let r=0;r<e.__effects.length;r++)e.__effects[r].dispose();e.__effects.length=0}if(e.__eventCleanup){for(let r=0;r<e.__eventCleanup.length;r++)e.__eventCleanup[r]();e.__eventCleanup.length=0}if(e.__children){for(let r=0;r<e.__children.length;r++){let n=e.__children[r],o=t[n];o&&o.__ref&&mr(o)}e.__children.length=0}if(t.node?.parentNode&&t.node.remove(),t.state?.destroy&&t.state.__element===t&&t.state.destroy(),t.parent?.__ref?.__children){let r=t.parent.__ref.__children.indexOf(t.key);r!==-1&&t.parent.__ref.__children.splice(r,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(r){console.error("[smbls] onRemove error:",r)}t.node=null,t.parent=null,t.__ref=null}}function Go(){mr(this)}P();P();var bw=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],xw=["none","forwards","backwards","both"],_w=["normal","reverse","alternate","alternate-reverse"],Sw=["running","paused"],ww=t=>/^[\d.]+m?s$/.test(t),kw=0,Kg=new Map,_u=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(_(t)){let o=JSON.stringify(t),s=Kg.get(o);if(s)return s;let i=`smbls-anim-${kw++}`,a=Mo(i,t);return Kg.set(o,a),a}let n=r&&r[t];return _(n)?Mo(t,n):t},vw=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},n=t.split(/\s+/),o=null,s=[],i=null,a=null,c=null,l=null,f=null;for(let p of n)r&&r[p]?o=p:ww(p)?s.push(p):bw.includes(p)||p.startsWith("cubic-bezier")||p.startsWith("steps(")?i=p:p==="infinite"||/^\d+$/.test(p)?a=p==="infinite"?p:Number(p):_w.includes(p)?c=p:xw.includes(p)?l=p:Sw.includes(p)?f=p:o||(o=p);return{name:o,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},Su={animation:(t,e)=>{if(S(t)&&t.includes(" ")){let r=vw(t,e);return{animationName:_u(r.name||t,e),animationDuration:r.durations[0]||Nt(e.animationDuration||"A").timing,animationDelay:r.durations[1]||Nt(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||Xt(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||"both",animationIterationCount:r.iterationCount!=null?r.iterationCount:e.animationIterationCount||1,animationPlayState:r.playState||e.animationPlayState,animationDirection:r.direction||e.animationDirection}}return{animationName:_u(t,e),animationDuration:Nt(e.animationDuration||"A").timing,animationDelay:Nt(e.animationDelay||"0s").timing,animationTimingFunction:Xt(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||"both",animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:_u(t,e)}),animationDuration:t=>({animationDuration:Nt(t).timing}),animationDelay:t=>({animationDelay:Nt(t).timing}),animationTimingFunction:t=>({animationTimingFunction:Xt(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};P();var wu={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>j("height",t,e),width:(t,e)=>j("width",t,e),boxSizing:t=>ht(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...st("height",e),...st("width",r||e)}},inlineSize:(t,e)=>j("inlineSize",t,e),blockSize:(t,e)=>j("blockSize",t,e),minWidth:(t,e)=>j("minWidth",t,e),maxWidth:(t,e)=>j("maxWidth",t,e),widthRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...st("minWidth",e),...st("maxWidth",r||e)}},minHeight:(t,e)=>j("minHeight",t,e),maxHeight:(t,e)=>j("maxHeight",t,e),heightRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...st("minHeight",e),...st("maxHeight",r||e)}},size:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...j("inlineSize",e),...j("blockSize",r||e)}},minBlockSize:(t,e)=>j("minBlockSize",t,e),minInlineSize:(t,e)=>j("minInlineSize",t,e),maxBlockSize:(t,e)=>j("maxBlockSize",t,e),maxInlineSize:(t,e)=>j("maxInlineSize",t,e),minSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...st("minInlineSize",e),...st("minBlockSize",r||e)}},maxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...st("maxInlineSize",e),...st("maxBlockSize",r||e)}},borderWidth:(t,e)=>j("borderWidth",t,e),padding:(t,e)=>j("padding",t,e),scrollPadding:(t,e)=>j("scrollPadding",t,e),paddingInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...st("paddingInlineStart",e),...st("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...st("paddingBlockStart",e),...st("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>j("paddingBlockStart",t,e),paddingBottom:(t,e)=>j("paddingBlockEnd",t,e),paddingLeft:(t,e)=>j("paddingInlineStart",t,e),paddingRight:(t,e)=>j("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>j("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>j("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>j("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>j("paddingInlineEnd",t,e),margin:(t,e)=>j("margin",t,e),marginInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...st("marginInlineStart",e),...st("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!S(e.marginBlock))return;let[r,n]=e.marginBlock.split(" ");return{...st("marginBlockStart",r),...st("marginBlockEnd",n||r)}},marginTop:(t,e)=>j("marginBlockStart",t,e),marginBottom:(t,e)=>j("marginBlockEnd",t,e),marginLeft:(t,e)=>j("marginInlineStart",t,e),marginRight:(t,e)=>j("marginInlineEnd",t,e),marginInlineStart:(t,e)=>j("marginInlineStart",t,e),marginInlineEnd:(t,e)=>j("marginInlineEnd",t,e),marginBlockStart:(t,e)=>j("marginBlockStart",t,e),marginBlockEnd:(t,e)=>j("marginBlockEnd",t,e),gap:t=>({gap:cu(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(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},flexAlign:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>sa(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>sa(t??e.round,e,"borderRadius")};var ku={fontSize:t=>Hi(t)||t,fontFamily:t=>({fontFamily:zi(t)||t}),fontWeight:t=>({fontWeight:t,fontVariationSettings:'"wght" '+t})};var vu={overflow:t=>({overflow:t}),cursor:(t,e,r,n)=>{if(!t)return;let o=n.assets&&n.assets[t];if(o&&o.content)t=`url(${o.content.src})`;else{let s=n.files&&n.files[t];s&&s.content&&(t=`url(${s.content.src})`)}return{cursor:t}},opacity:t=>t!=null?{opacity:String(t)}:void 0,visibility:t=>t!=null?{visibility:t}:void 0,pointerEvents:t=>t!=null?{pointerEvents:t}:void 0};var Cu={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>dt(r,"k").k).join(" ")}},left:t=>dt(t,"left"),top:t=>dt(t,"top"),right:t=>dt(t,"right"),bottom:t=>dt(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>dt(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=>dt(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};P();var Bt=({context:t,state:e})=>{let r=e?.root?.globalTheme||t.designSystem?.globalTheme;return r==="auto"?null:r},Au={theme:(t,e)=>{if(t)return e.themeModifier?Yt(t,`@${e.themeModifier}`):Yt(t)},color:(t,e)=>{let r=Bt(e);if(t)return{color:mt(t,r)}},background:(t,e)=>{let r=Bt(e);if(t)return S(t)&&t.includes("gradient")?{background:na(t,r)}:{background:mt(t,r)}},backgroundColor:(t,e)=>{let r=Bt(e);if(t)return{backgroundColor:mt(t,r)}},backgroundImage:(t,e,r,n)=>{let o=Bt(e);if(!t)return;let s=n.assets&&n.assets[t];if(s&&s.content)t=s.content.src;else{let i=n.files&&n.files[t];i&&i.content&&(t=i.content.src)}return{backgroundImage:au(t,o)}},textStroke:t=>({WebkitTextStroke:su(t)}),outline:t=>({outline:ye(t)}),outlineOffset:(t,e)=>j("outlineOffset",t,e),border:t=>({border:ye(t)}),borderColor:(t,e)=>{let r=Bt(e);if(t)return{borderColor:mt(t,r)}},borderTopColor:(t,e)=>{let r=Bt(e);if(t)return{borderTopColor:mt(t,r)}},borderBottomColor:(t,e)=>{let r=Bt(e);if(t)return{borderBottomColor:mt(t,r)}},borderLeftColor:(t,e)=>{let r=Bt(e);if(t)return{borderLeftColor:mt(t,r)}},borderRightColor:(t,e)=>{let r=Bt(e);if(t)return{borderRightColor:mt(t,r)}},borderLeft:t=>({borderLeft:ye(t)}),borderTop:t=>({borderTop:ye(t)}),borderRight:t=>({borderRight:ye(t)}),borderBottom:t=>({borderBottom:ye(t)}),shadow:(t,e)=>{let r=Bt(e);if(t)return{boxShadow:iu(t,r)}},boxShadow:(t,e)=>{if(!S(t))return;let[r,n]=t.split("!importan"),o=Bt(e),s=n?" !important":"";return{boxShadow:ra(r.trim(),o)+s}},textShadow:(t,{context:e})=>({textShadow:ra(t,e.designSystem.globalTheme)}),columnRule:t=>({columnRule:ye(t)})};var qo={transition:t=>({transition:lu(t)}),transitionDuration:t=>({transitionDuration:oa(t)}),transitionDelay:t=>({transitionDelay:oa(t)}),transitionTimingFunction:t=>({transitionTimingFunction:Xt(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};P();var Eu={flow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},wrap:(t,e)=>({display:"flex",flexWrap:t}),align:(t,e)=>{let[r,n]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:n}}};var Tu={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 ut={...Su,...wu,...ku,...vu,...Cu,...Au,...qo,...Eu,...Tu};var yt=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","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","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","top","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);P();var Cw=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,Aw=(t,e,r)=>{let{context:n}=r;if(!n.designSystem?.media)return;let o=t.slice(1),s=n.designSystem.media[o],i=It(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(Cw),c=a?a[1]||a[2]:o,l={[`${s} &`]:i};if(c==="dark"||c==="light"){let f=n.designSystem?.scopeSelector||":root",p=f===":root"?":root:not([data-theme])":`${f}:not([data-theme])`;l[`@media (prefers-color-scheme: ${c})`]={[`${p} &`]:i}}return l},Yg=(t,e,r)=>({[t]:It(e,r)}),Ko=(t,e,r)=>{let n=`&${t}`,o=It(e,r);if(t.includes(",")&&o){let s={},i={};for(let a in o)typeof o[a]=="object"&&o[a]!==null?i[a]=o[a]:s[a]=o[a];if(Object.keys(i).length){let a=n.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[n]=s);for(let l in i){let f=a.map(p=>`${p} ${l}`).join(", ");c[f]=i[l]}return c}}return{[n]:o}},Ou=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return C(r)?r.call(e,e):!!r},Ew=(t,e,r)=>{let n=t.slice(1),o=Ou(n,r);if(o===void 0&&(o=!!r[n]),!!o)return It(e,r)},Tw=(t,e,r)=>({[t]:e}),Ow=(t,e,r)=>{let n=t.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=Ou(n,r);s!==void 0&&(o=s)}if(o)return It(e,r)},Rw=(t,e,r)=>{let n=t.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=Ou(n,r);s!==void 0&&(o=s)}if(!o)return It(e,r)},Ru=(t,e)=>It(t,e),Pu={"@":Aw,":":Ko,"[":Ko,"*":Ko,"+":Ko,"~":Ko,"&":Yg,">":Yg,$:Ew,"-":Tw,".":Ow,"!":Rw};var Iu=Ce(),Xg=(t,e,r)=>{let n=e?.context?.designSystem;n&&lt(n);try{let o={},s={},i=(a,c)=>{if(r.unpack){o={...o,...c};return}o[a]=c};for(let a in t){let c=t[a];if(a==="class"&&e.call("isString",t.class)){let l=c.split(" ");if(l.length){let f=e.context.designSystem.class,p=l.reduce((u,d)=>et(u,f[d]),{});o.designSystemClass=p}}else if(a==="true"){let l=q(c,e);et(o,Ru(l,e))}else if(e.classlist[a]){let l=e.classlist[a],f=C(l)?l(e,e.state,e.context):l;f&&i(a,f),!Iu&&_(o[a])&&(o[a].label=a)}else if(ut[a]){let l=q(c,e);T(l)&&(l=l.reduce((p,u)=>et(p,u),{}));let f=ut[a](l,e,e.state,e.context);T(f)&&(f=f.reduce((p,u)=>et(p,u),{})),f&&i(a,f),!Iu&&_(o[a])&&(o[a].label=a)}else if(yt.has(a)){let l=q(c,e);typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),i(a,{[a]:l}),!Iu&&_(o[a])&&(o[a].label=a)}else s[a]=c}return[o,s]}finally{n&&ot()}},Zg=(t,e)=>{let r={};for(let n in t){let o=Pu[n.slice(0,1)];if(o){let s=o(n,t[n],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]&&typeof r[i]=="object"&&typeof s[i]=="object"?Ct(r[i],s[i]):r[i]=s[i])}}return r},It=(t,e,r={unpack:!0})=>{let[n,o]=Xg(t,e,r),s=Zg(o,e),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return On(n,s);n._selectors=s}return n},Pw=(t,e)=>{let r={};if(t.class)for(let n in t.class)r[n]=t.class[n](e);return r};P();var Jg=t=>{if(_(t))return It(t,t)},Iw=(t,e)=>{let r=Jg(t);return typeof e=="function"?e(r):Le(r)};P();function em(t,e,r){let n=t?.context?.analyze;if(!n||!n.emit||e==="warn"&&!n.shouldCapture("warnings")||e==="error"&&!n.shouldCapture("errors"))return;let o=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");n.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:e==="error"?"error":"warning",level:e,hook:e==="error"?"el.error":"el.warn",element:{key:t.key!=null?String(t.key):null,name:t.__name||null,tag:t.tag||null},message:o||null,args:r})}function $w(...t){return em(this,"warn",t),go.apply(this,t)}function Fw(...t){return em(this,"error",t),rr.apply(this,t)}var Qg={update:Ho,remove:Go,getDB:xo,getQuery:_o,getRootData:uo,getChildren:io,getPath:ao,nextElement:mo,previousElement:yo,verbose:Mr,warn:$w,error:Fw,variables:bo,spotByPath:so,set(t,e){if(this.removeContent(),t!=null){let r=this.context?.__create;r&&r(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,n=this.key,o=this.parse();return this.remove(),e(o,r,n,t)},lookup(t){let e=this.parent;for(;e;){if(typeof t=="function"){if(t(e))return e}else if(typeof t=="string"){if(e.key===t)return e;if(e[t]&&e[t].__ref)return e[t]}e=e.parent}return null},lookdown(t){let e=this.__ref;if(!e?.__children)return null;for(let r of e.__children){let n=this[r];if(!n)continue;if(typeof t=="function"){if(t(n))return n}else if(typeof t=="string"&&n.key===t)return n;let o=n.lookdown?.(t);if(o)return o}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let n of r.__children){let o=this[n];o&&(typeof t=="function"?t(o)&&e.push(o):typeof t=="string"&&o.key===t&&e.push(o),o.lookdownAll?.(t,e))}return e},getRef(){return this.__ref},getRoot:fo,getRootState:lo,getRootContext:po,getContext:ho,parse(t){let e={},r=t?new Set(t):null,n=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!r?.has(o)){if(n&&n[o]!==void 0){e[o]=n[o];continue}typeof this[o]!="function"&&(e[o]=this[o])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let n of r.__children)this[n]?.parseDeep&&(e[n]=this[n].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let r of t)e[r]=this[r];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(let e in t){let r=t[e];if(r==null)continue;let n=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(n,o,"important")}},call(t,...e){let r=this.context,n=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof n=="function")return n.call(this,...e)},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)}},tm=new WeakMap;function Dw(t){if(!t)return Qg;let e=tm.get(t);if(e)return e;e=Object.create(Qg);let r=t.methods;if(r)for(let n in r)e[n]=r[n];return tm.set(t,e),e}function Yo(t){let e=Dw(t.context);Object.setPrototypeOf(t,e)}P();Ir();var Lw=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},Vt=(t,e)=>{if(ct(e)){let o=e.__raw||e;e.toggle||Object.defineProperty(o,"toggle",{value:function(s,i={}){e[s]=!e[s]},enumerable:!1,configurable:!0}),e.set||Object.defineProperty(o,"set",{value:function(s,i={}){return e.clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.update(s,i),e},enumerable:!1,configurable:!0}),Object.defineProperty(o,"setByPath",{value: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},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"getByPath",{value: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},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"removeByPath",{value: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},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"reset",{value:function(s={}){let i=e.parse();return e.set(i,s)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"apply",{value:function(s,i={}){if(typeof s=="function"){let a=s(e);return e.update(a,i)}},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"applyFunction",{value:function(s,i={}){if(typeof s=="function")return s(e),e.update(e.parse(),i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"rootUpdate",{value:function(s,i={}){let a=e;for(;a?.parent&&ct(a.parent);)a=a.parent;return a.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"parentUpdate",{value:function(s,i={}){if(e.parent)return e.parent.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"quietReplace",{value:function(s,i={}){return e.replace(s,{quiet:!0,...i})},enumerable:!1,configurable:!0,writable:!0}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=e,i=ct(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,ct(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o]},n={update(o){if(!o||typeof o!="object")return e;for(let s in o)e[s]=o[s];return e},apply(o){if(typeof o!="function")return e;let s=o(e);return s?e.update(s):e},parse(){return{...e}},toggle(o){return e[o]=!e[o],e},set(o){if(!o||typeof o!="object")return e;r();for(let s in o)e[s]=o[s];return e},replace(o){return e.set(o)},clean(){return r(),e}};for(let o in n)typeof e[o]!="function"&&Lw(e,o,n[o])};var rm=function(t,e,r){return t.state=Fu(t,e,r),t.state},Fu=function(t,e,r){let{__ref:n}=t,o=t.state;if(o==null||o===!1){let s=e?.state||{};return Vt(t,s),s}if(typeof o=="string")return n&&(n.__state=o),n.__stateType="string",Mw(o,t,e);if(typeof o=="number"||typeof o=="boolean"){n&&(n.__state=o,n.__stateType=typeof o,n.__hasRootState=!0);let s=Ft({value:o});return s.__element=t,e?.state&&(s.parent=e.state),Vt(t,s),s}if(typeof o=="function"&&(o=o(t,e?.state)||{}),typeof o=="object"&&!ct(o)){n&&(n.__hasRootState=!0),o.isRootState&&n&&(n.__hasRootState=!0);let s=Ft({...o});if(s.__element=t,!Object.getOwnPropertyDescriptor(s,"root")){let i=e?.state?.root||e?.state||s;Object.defineProperty(s,"root",{get:()=>i,enumerable:!1,configurable:!0})}return e?.state&&(s.parent=e.state,e.state.__children&&(e.state.__children[t.key]=s)),Vt(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,r),s}return ct(o)?(o.__element=t,o):e?.state||{}};function $u(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function Mw(t,e,r){if(!r?.state)return{};if(t===".")return r.state;if(t.startsWith("../")){let o=t.slice(3),s=r.state?.parent;return o&&s?$u(s,o):s??r.state??{}}if(t.startsWith("~/")){let o=r.state;for(;o?.parent;)o=o.parent;let s=t.slice(2);return s?$u(o,s):o??{}}let n=$u(r.state,t);if(n&&typeof n=="object"&&!ct(n)&&!Object.getOwnPropertyDescriptor(n,"root")){let o=r.state?.root||r.state;Object.defineProperty(n,"root",{get:()=>o,enumerable:!1,configurable:!0})}return n}var sm=(t,e)=>{if(!t)return om;let r=jw(t,e);return!r||!r.state?om:Vw(r.state)},im=()=>Sr()!=null,Nw=128;function jw(t,e){let r=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,n=t,o=null;for(let s=0;s<Nw&&n;s++){if(r(n)&&n.state)return n;if(n.state&&!o&&(o=n),!n.parent||n.parent===n)break;n=n.parent}return o}var Bw={get(t,e){return t[e]}},nm=new WeakMap,Vw=t=>{let e=nm.get(t);return e||(e=new Proxy(t,Bw),nm.set(t,e)),e},om=new Proxy(Object.create(null),{get(){},has(){return!1}});P();var Uw=["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"],fa={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"]},cm=["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"],Mu=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()):null,Ne=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Mu(e)||fa.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(fa,t)?fa[t].includes(e):!1,Nu=t=>{if(!S(t))return!1;let e=t.toLowerCase();return cm.includes(e)},zw=(t,e,r)=>{let n={};for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(r&&o in r)continue;if(o==="aria"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])kt(e[o][a])&&(n["aria-"+a]=e[o][a]);continue}if(o==="data"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])if(kt(e[o][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());n["data-"+c]=e[o][a]}continue}let s=Ne(t,o),i=Nu(o);if(kt(e[o])&&(s||i)){let a=Mu(o)||o;n[a]=e[o]}}return n},Ww=(t,e)=>{let r={};if(t.attr)for(let n in t.attr)r[n]=t.attr[n](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let n in t.aria){let o=t.aria[n];typeof o=="function"&&(r["aria-"+n]=o(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let n in t.data){let o=t.data[n];if(typeof o=="function"){let s=n.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());r["data-"+s]=o(e,e.state,e.context)}}return r},Me=(t,e)=>{let r=t.call("exec",e,t);if(r)return S(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},Du=(t,e)=>{let r=(t.preSrc||"")+(Me(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:n}=t;if(!n.files&&!n.assets)return r;if(r.startsWith("/assets/")){let o=r.slice(8),s=n.assets&&(n.assets[r]||n.assets[o]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let o=r.slice(7),s=n.files&&(n.files[r]||n.files[o]);return s&&s.content?s.content.src:r}if(n.assets){let o=n.assets[r];if(o&&o.content)return o.content.src}if(n.files){let o=n.files[r];if(o&&o.content)return o.content.src}return r},Lu={src:t=>Du(t,t.src),href:t=>Me(t,t.href),action:t=>Me(t,t.action),poster:t=>Du(t,t.poster),data:t=>Me(t,t.data)},ju=t=>{let e=t.tag||"div",r={};for(let n in Lu)if(t[n]!==void 0&&Ne(e,n)){let o=Lu[n](t);o!==void 0&&(r[n]=o)}return r},am=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return C(r)?r.call(e,e):!!r},Hw=(t,e,r)=>{if(t==="$"){let o=am(e,r);return o===void 0&&(o=!!r[e]),o}let n=r[e]===!0||r.state[e];if(!n){let o=am(e,r);o!==void 0&&(n=o)}return t==="."?!!n:!n},Gw=new Set(["$",".","!"]),qw=(t,e,r)=>{let n={},o=(s,i,a,c)=>{let l=i;n[s]=f=>{if(Hw(a,c,f))return C(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!Gw.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 d in a[l])o("aria-"+d,a[l][d],i,c);continue}if(l==="data"&&a[l]&&typeof a[l]=="object"){for(let d in a[l]){let h=d.replace(/([A-Z])/g,g=>"-"+g.toLowerCase());o("data-"+h,a[l][d],i,c)}continue}let f=Ne(e,l),p=Nu(l);if(!f&&!p)continue;let u=Mu(l)||l;o(u,a[l],i,c)}}return n};var Kw=1;function qr(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function Yw(t){return t.charAt(2).toLowerCase()+t.slice(3)}function Xw(t){return t.toLowerCase()}function zu(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=zu(o,s):r[n]=s}return r}function Zt(t,e,r,n={},o){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});let s=Object.create(null);s.key=r||t.key||`_${Kw++}`,s.parent=e||null,s.context=t.context||e?.context||n.context||{},s.context.__create||(s.context.__create=Zt);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]};if(r&&!t.extends&&!t.extend){let g=r.indexOf("_");if(g>0){let m=r.substring(0,g),y=s.context?.components;y&&(y[m]||y["smbls."+m])&&(t={extends:m,...t})}}Wo(s,t,n);let a=new Set(["childProps","attr","style","scope","data"]),c=s.props&&typeof s.props=="object"?s.props:null;for(let g in t){if(g==="parent"||g==="node"||g==="__ref"||g==="extends"||g==="context"||g==="props")continue;let m=t[g],y=s[g],b=y&&m&&typeof y=="object"&&typeof m=="object"&&!Array.isArray(y)&&!Array.isArray(m)&&typeof y!="function"&&typeof m!="function";b&&g.charCodeAt(0)>=65&&g.charCodeAt(0)<=90?s[g]=zu(y,m):b&&a.has(g)?s[g]={...y,...m}:s[g]=m}function l(g){for(let m in g){let y=g[m],b=s[m],w=b&&y&&typeof b=="object"&&typeof y=="object"&&!Array.isArray(b)&&!Array.isArray(y)&&typeof b!="function"&&typeof y!="function";w&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?s[m]=zu(b,y):w&&a.has(m)?s[m]={...b,...y}:s[m]=y}}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,p=e?.scope,u=s.context&&typeof s.context.globalScope=="object"&&s.context.globalScope||null,d=p||u||null;if(t.scope!==void 0||f){let g={};f&&Object.assign(g,f),t.scope!==void 0&&Object.assign(g,t.scope),s.scope=As(g,d)}else d&&(s.scope=d);if(t.if!==void 0&&(s.if=t.if),Yo(s),Zw(s,e,t),s.if!=null){let g;if(typeof s.if=="function")try{g=s.if(s,s.state,s.context)}catch(m){if(g=!1,i.__ifError=m,typeof console<"u"&&console.warn){let y=s.key||s.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${y} \u2014 treating as false:`,m?.message||m)}}else g=s.if;i.__if=!!g}if(i.__if)typeof t.if=="function"&&(i.__ifInitialized=!0);else return e&&(e[s.key]=s),typeof t.if=="function"&&Wu(s,{if:t.if}),s;s.tag||(s.tag=dr(s)),je("Init",s,n);let h=s.node=hr(s);if(!h)return s;je("AttachNode",s,n),h.ref=s,h.setAttribute&&s.key&&h.setAttribute("data-key",s.key),h.setAttribute&&s.context?.scopeSelector&&s.context.scopeSelector!==":root"&&s.context.key&&s.key===s.context.key&&h.setAttribute("data-smbls-app",s.context.key),s.id&&h.setAttribute&&(h.id=s.id),dm(s,n),Wu(s,t),Hu(s),um(s),s0(s);try{hm(s,n)}catch(g){if(typeof console<"u"&&console.error){let m=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${m}:`,g?.message||g,g?.stack?`
37
37
  `+g.stack.split(`
38
38
  `).slice(0,6).join(`
39
39
  `):"")}}if(Ku(s,e,o),e&&(e[s.key]=s,e.__ref?.__children&&(e.__ref.__children.includes(s.key)||e.__ref.__children.push(s.key))),typeof s.html=="function"&&s.node&&!s.node.innerHTML){let g=s.context?.designSystem;g&&lt(g);try{let m=s.html(s,s.state,s.context);m!=null&&typeof m!="function"&&(s.node.innerHTML=m)}catch{}finally{g&&ot()}}if(je("Create",s,n),je("Complete",s,n),je("Render",s,n),je("RenderRouter",s,n),typeof s.onFrame=="function"){let g=s.onFrame,m=s.context?.designSystem,y=()=>{if(s.node){if(s.node.isConnected){m&&lt(m);try{g(s,s.state,s.context)}catch(b){console.error("[DOMQL] onFrame error:",b)}finally{m&&ot()}}requestAnimationFrame(y)}};requestAnimationFrame(y)}return s}function Zw(t,e,r){let n=!e,o=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=n&&o&&t.context?.state,i=r.state!==void 0&&!s?r.state:t.state&&!ct(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,Vt(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",p=l.translations[f];if(p&&typeof p=="object")for(let d in p)c[d]===void 0&&(c[d]=p[d]);let u=new Set(l.languages||[]);for(let d in l.translations)!u.has(d)&&c[d]===void 0&&(c[d]=l.translations[d])}t.state=ct(c)?c:Ft(c),t.state.__element=t,t.state.root=t.state,Vt(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),Vt(t,t.state);return}if(typeof i=="string"){if(t.state=fm(i,e),t.state&&typeof t.state=="object"&&!ct(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}Vt(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=Ft(a||{})}else t.state=Ft({...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,Vt(t,t.state)}function Bu(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function fm(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let o=t.slice(3);return o?Bu(e.state,o):e.state??{}}if(t.startsWith("~/")){let o=e.state?.root||e.state,s=t.slice(2);return s?Bu(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=Bu(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let n=e.context?.polyglot;if(n?.translations){let o=e.state?.root?.lang||n.defaultLang||"en",s=n.translations[o];if(s?.[t]!==void 0)return s[t];if(n.translations[t]!==void 0)return n.translations[t]}return{}}function Jw(t){let e=t.__ref,r=t.tag||"div",n=t.context?.designSystem,o=[],s=Object.keys(t);for(let i=0;i<s.length;i++){let a=s[i];if(typeof t[a]!="function"||Tt.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||qr(a)||ut[a]||yt&&yt.has(a)||Ne(r,a)||o.push({prop:a,fn:t[a]})}for(let i=0;i<o.length;i++){let{prop:a,fn:c}=o[i];e.__exec[a]=c,Object.defineProperty(t,a,{get(){n&&lt(n);try{return c(t,t.state,t.context)}catch{return}finally{n&&ot()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function Wu(t,e){let r=t.__ref;if(Jw(t),typeof t.text=="function"){let o=t.text,s=at(()=>{if(!r.contentManaged)try{let i=o(t,t.state,t.context);t.node&&i!=null&&typeof i!="function"&&typeof i!="object"&&(typeof i=="string"&&i.includes("{{")&&(i=Ke.call(t,i,t.state)),t.tag==="string"?t.node.nodeValue=i:t.node.textContent=i)}catch{}},{depth:r.path.length});r.__effects.push(s),r.__exec.text=o}else if(typeof t.text=="string"&&t.text.includes("{{")){let o=t.text,s=at(()=>{if(r.contentManaged)return;let i=Ke.call(t,o,t.state);i!=null&&(t.text=i),t.node&&(t.tag==="string"?t.node.nodeValue=i??"":t.node.textContent=i??"")},{depth:r.path.length});r.__effects.push(s),r.__exec.text=o}for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&typeof t[o]=="function"&&!Tt.has(o)&&!qr(o)&&!r.__exec[o]){if(ut[o]){let s=t[o],i=o,a,c=at(()=>{let l=t.context?.designSystem;l&&lt(l);try{let f=s(t,t.state,t.context),p=ut[i](f,t,t.state,t.context);if(p&&t.node){let u=lm(p);(u===null||u!==a)&&(a=u,Gr(t.node,p))}else t.node&&(i==="show"||i==="hide")&&(a=void 0,t.node.style.display="")}finally{l&&ot()}},{depth:r.path.length});r.__effects.push(c),r.__exec[o]=s}else if(yt&&yt.has(o)){let s=t[o],i=o,a,c=at(()=>{let l=t.context?.designSystem;l&&lt(l);try{let f=s(t,t.state,t.context);if(t.node)if(f!=null){let p=i+":"+String(f);p!==a&&(a=p,Gr(t.node,{[i]:f}))}else a=void 0,t.node.style[i]=""}finally{l&&ot()}},{depth:r.path.length});r.__effects.push(c),r.__exec[o]=s}}if(typeof e.html=="function"){let o=e.html,s=at(()=>{let i=t.context?.designSystem;i&&lt(i);try{let a=o(t,t.state,t.context);t.node&&a!=null&&typeof a!="function"&&(t.node.innerHTML=a)}finally{i&&ot()}},{depth:r.path.length});r.__effects.push(s),r.__exec.html=o}if(typeof e.value=="function"){let o=e.value,s=at(()=>{try{let i=o(t,t.state,t.context);if(!t.node||!("value"in t.node))return;let a=i==null?"":String(i);if(t.node.value===a)return;let c=typeof document<"u"&&document.activeElement===t.node,l=c&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,f=c&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=a,c&&l!=null&&f!=null)try{t.node.setSelectionRange(l,f)}catch{}}catch{}},{depth:r.path.length});r.__effects.push(s),r.__exec.value=o}if(typeof e.style=="function"){let o=e.style,s,i=at(()=>{let a=o(t,t.state,t.context),c=lm(a);(c===null||c!==s)&&(s=c,Gr(t.node,a))},{depth:r.path.length});r.__effects.push(i),r.__exec.style=o}else if(t.style&&typeof t.style=="object")for(let o in t.style){let s=t.style[o];if(typeof s!="function")continue;let i,a=at(()=>{try{let c=s(t,t.state,t.context);if(t.node){let l=o+":"+String(c);l!==i&&(i=l,Gr(t.node,{[o]:c}))}}catch{}},{depth:r.path.length});r.__effects.push(a)}if(t.attr&&typeof t.attr=="object"){for(let o in t.attr)if(typeof t.attr[o]=="function"){let s=t.attr[o],i=o,a=at(()=>{try{let c=s(t,t.state,t.context);t.node?.setAttribute&&(c==null||c===!1?t.node.removeAttribute(i):typeof c!="function"&&typeof c!="object"&&t.node.setAttribute(i,c===!0?"":c))}catch{}},{depth:r.path.length});r.__effects.push(a)}}if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let s=t.aria[o];if(typeof s!="function")continue;let i="aria-"+o.replace(/[A-Z]/g,c=>"-"+c.toLowerCase()),a=at(()=>{try{let c=s(t,t.state,t.context);if(!t.node?.setAttribute)return;c==null||c===!1?t.node.removeAttribute(i):typeof c!="function"&&typeof c!="object"&&t.node.setAttribute(i,c===!0?"":c)}catch{}},{depth:r.path.length});r.__effects.push(a)}if(t.data&&typeof t.data=="object")for(let o in t.data){let s=t.data[o];if(typeof s!="function")continue;let a="data-"+o.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=at(()=>{try{let l=s(t,t.state,t.context);if(!t.node?.setAttribute)return;l==null||l===!1?t.node.removeAttribute(a):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(a,l===!0?"":l)}catch{}},{depth:r.path.length});r.__effects.push(c)}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 o in n){let s=n[o];if(typeof s!="function")continue;let i=at(()=>{try{let a=s(t,t.state,t.context);if(!t.node?.classList)return;typeof a=="string"?t.node.classList.add(a):a?t.node.classList.add(o):t.node.classList.remove(o)}catch{}},{depth:r.path.length});r.__effects.push(i)}if(typeof e.if=="function"){let o=e.if,s=at(()=>{let i;try{i=o(t,t.state,t.context)}catch(c){if(i=!1,r.__ifError=c,typeof console<"u"&&console.warn){let l=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${l} \u2014 treating as false:`,c?.message||c)}return}let a=r.__if;if(r.__if=!!i,a&&!r.__if&&t.node)t.node.remove();else if(!a&&r.__if)if(r.__ifInitialized){t.node||(t.node=hr(t)),t.node&&(t.node.ref=t);let c=t.parent,l=c?.node;if(l&&t.node){let f=null,p=Object.keys(c),u=p.indexOf(t.key);for(let d=u+1;d<p.length;d++){let h=c[p[d]];if(h?.node?.parentNode===l){f=h.node;break}}f?l.insertBefore(t.node,f):l.appendChild(t.node)}else Ku(t,t.parent);Hu(t)}else{if(r.__ifInitialized=!0,t.tag||(t.tag=dr(t)),je("Init",t,{}),t.node||(t.node=hr(t)),!t.node)return;je("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),dm(t,{});let c=e.if;delete e.if;try{Wu(t,e)}finally{e.if=c}Hu(t),um(t),hm(t,{}),Ku(t,t.parent)}},{depth:r.path.length});r.__effects.push(s)}for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||Tt.has(o)||typeof t[o]!="function")continue;let s=o.charCodeAt(0);if(s>=65&&s<=90||qr(o))continue;let i=t[o];r.__exec[o]=i;let a=t.tag||"div";if(Ne(a,o)&&!ut[o]&&!(yt&&yt.has(o))){let c=o,l=at(()=>{try{let f=i(t,t.state,t.context);t.node?.setAttribute&&(f==null||f===!1?t.node.removeAttribute(c):typeof f!="function"&&typeof f!="object"&&(c==="src"&&"src"in t.node?t.node.src=f:t.node.setAttribute(c,f===!0?"":f)))}catch{}},{depth:r.path.length});r.__effects.push(l)}}e0(t),r0(t)}function Hu(t){let{node:e}=t;if(e){if(typeof t.text=="string"&&!t.text.includes("{{")?t.tag==="string"?e.nodeValue=t.text:e.textContent=t.text:typeof t.text=="number"&&(e.textContent=t.text),o0(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"&&Gr(e,t.style),t.attr&&typeof t.attr=="object")for(let r in t.attr){let n=t.attr[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||e.setAttribute&&e.setAttribute(r,n===!0?"":n)}if(t.data&&typeof t.data=="object")for(let r in t.data){let n=t.data[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||e.dataset&&(e.dataset[r]=n===!0?"":n)}if(t.classlist||t.class){let r=t.classlist||t.class;if(typeof r=="string")r.split(" ").forEach(n=>n&&e.classList.add(n));else if(typeof r=="object")for(let n in r){let o=typeof r[n]=="function"?r[n](t,t.state,t.context):r[n];o&&e.classList.add(typeof o=="string"?o:n)}}}}function lm(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function Gr(t,e){if(!t||!e||!t.style)return;let r=null;for(let n in e){let o=e[n];if(o!=null){if(n.charAt(0)==="&"&&typeof o=="object"){r||(r={}),r[n]=o;continue}try{let s=String(o),i=n.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),a=s.trim(),c=/\s*!important\s*$/.test(a),l=a.replace(/\s*!important\s*$/,"");t.style.setProperty(i,l,c?"important":"")}catch{}}}r&&t0(t,r)}var Qw=0;function t0(t,e){let r=`_ds${Qw++}`;t.classList.add(r);let n=t.ownerDocument,o=n.querySelector("style[data-smbls-scoped]");o||(o=n.createElement("style"),o.setAttribute("data-smbls-scoped",""),n.head.appendChild(o));let s="";for(let i in e){let a="."+r,c=i.replace(/&/g,a).split(",").map(f=>{let p=f.trim();return p.includes(a)?p:a+p}).join(", "),l=e[i];if(typeof l=="object"){let f="",p="";for(let u in l){let d=l[u];if(typeof d=="object"){let h=u.includes("&")?c.split(", ").map(m=>u.replace(/&/g,m)).join(", "):c.split(", ").map(m=>`${m} ${u}`).join(", "),g="";for(let m in d)g+=`${m.replace(/[A-Z]/g,y=>"-"+y.toLowerCase())}: ${d[m]};`;p+=`${h} { ${g} }