efficient-storefront-blocks 0.125.22 → 0.126.0

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.
Files changed (33) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/chunks/{CustomHtmlCodeWindow-LITJEQFG.js → CustomHtmlCodeWindow-LBWGRQID.js} +1 -1
  3. package/dist/chunks/{EditorPreviewCheckout-LRPANZRI.js → EditorPreviewCheckout-PWVUKVPS.js} +1 -1
  4. package/dist/chunks/SiteEditorProvider-73GAIF7L.js +1 -0
  5. package/dist/chunks/{chunk-PVRWP47B.js → chunk-3ZZ3Z6U5.js} +1 -1
  6. package/dist/chunks/{chunk-YOF4KT5H.js → chunk-ADYUBBPE.js} +1 -1
  7. package/dist/chunks/{chunk-ZHEHF42C.js → chunk-BLDYFJQ6.js} +1 -1
  8. package/dist/chunks/{chunk-TT3AZYTK.js → chunk-CKAOUQ5E.js} +1 -1
  9. package/dist/chunks/chunk-JYZ42RYY.js +337 -0
  10. package/dist/chunks/{chunk-ESKHLPB5.js → chunk-SI2DLHOL.js} +1 -1
  11. package/dist/chunks/{chunk-TMSNT2CP.js → chunk-VUFE7ACW.js} +1 -1
  12. package/dist/chunks/{chunk-DQ2TQC5H.js → chunk-WR3AVDA5.js} +1 -1
  13. package/dist/chunks/{fitment-data-FJ3MIJXK.js → fitment-data-VOATE5L5.js} +1 -1
  14. package/dist/chunks/{section-css-style-JQZMV74P.js → section-css-style-42PP2TPA.js} +1 -1
  15. package/dist/editor/lib/storefront-editor-words.d.ts +1 -0
  16. package/dist/editor/lib/storefront-editor-words.js +1 -1
  17. package/dist/index.js +26 -26
  18. package/dist/render/app/globals.css +76 -0
  19. package/dist/render/built-with.json +1 -1
  20. package/dist/render/components/GridCardTemplate.d.ts +3 -0
  21. package/dist/render/components/GridCardTemplate.js +1 -1
  22. package/dist/routine-index.json +1 -1
  23. package/dist/value-index.json +1 -1
  24. package/dist/words.d.ts +4 -0
  25. package/dist/words.js +3 -3
  26. package/package.json +2 -2
  27. package/dist/chunks/SiteEditorProvider-FT3P5QZM.js +0 -1
  28. package/dist/chunks/chunk-EEHSAQWF.js +0 -337
  29. /package/dist/chunks/{chunk-TT3AZYTK.js.LEGAL.txt → chunk-CKAOUQ5E.js.LEGAL.txt} +0 -0
  30. /package/dist/chunks/{chunk-LY7GZJ6M.js → chunk-D5HXXBSX.js} +0 -0
  31. /package/dist/chunks/{chunk-EEHSAQWF.js.LEGAL.txt → chunk-JYZ42RYY.js.LEGAL.txt} +0 -0
  32. /package/dist/chunks/{chunk-G5LEO2F2.js → chunk-OHEU7JQW.js} +0 -0
  33. /package/dist/chunks/{chunk-DFYWYSOT.js → chunk-ZV2GXEDX.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{b as hu,c as gu,d as ku,e as Au,g as Ks,h as Iu,i as Ru}from"./chunk-ESKHLPB5.js";import{$ as ge,$f as Ms,$g as gt,$h as Pu,Aa as Ic,Ac as _o,Ag as Gs,Ah as _u,Bc as Dc,Ca as O,Cb as Nc,Cc as Fc,Ce as jc,Da as bo,Dc as Bc,Dd as Is,E as vc,Eb as $t,Ec as ks,Fb as He,Fc as Hc,Ia as ws,Id as le,If as qc,Jf as Bs,Ka as Rc,Kf as ke,Kg as ht,Kh as Ws,Ld as Uc,Lf as Zc,Lh as vo,Mf as Jc,Mg as cu,Mh as Eu,Nf as Wt,Nh as U,Ob as yo,Of as ce,Og as uu,Qg as du,Rc as Mc,Rf as Kt,Rh as Tu,Sc as As,Sd as $c,Sf as jt,Sg as pu,Sh as xu,Th as vu,Uh as wu,Vd as Gc,Vf as Qc,Wg as fu,Wh as Cu,Xg as mu,Ye as To,Yf as Hs,Yh as Yt,Zh as Ou,_f as eu,_h as wo,aa as wc,ah as zs,b as W,ba as Cc,c as Ye,ca as Oc,cg as tu,dg as nu,dh as bu,ea as dt,ee as Rs,ef as Ds,ga as go,hc as Lc,i as bc,ka as _n,kg as ou,l as mo,le as Eo,lg as Us,li as B,m as yc,n as Sc,ne as Gt,ng as au,oa as pt,oc as ft,oe as mt,of as M,og as ae,p as _c,pf as F,pg as su,ph as yu,q as Ec,qc as Cs,qf as Vc,qg as ru,qi as Lu,r as Tc,rc as Os,re as zc,rf as zt,rg as Ae,se as Ns,sf as Yc,sg as Vt,t as ho,tc as So,te as Wc,tf as Fs,u as xc,uf as Tn,va as Pc,vf as Xc,vg as iu,vh as Su,wa as kc,we as Kc,wg as $s,xa as Ac,xb as En,xe as Ls,yf as Xe,yh as xo,za as vs,zc as Ps,zf as qe,zg as lu}from"./chunk-PVRWP47B.js";import{a as j,b as he}from"./chunk-G5LEO2F2.js";import{d as Nu}from"./chunk-LY7GZJ6M.js";var Fu="en",Co=null,Bu=Fu,Hu=null;function t0(e,t,n){Co=e??null,Bu=t||Fu,Hu=n??null}function P(){return Hu}function n0(){return Bu}function o0(){return Co}function Du(e,t){return t?e.replace(/\{([A-Za-z][A-Za-z0-9_]*)\}/g,(n,o)=>he(t,o)?String(j(t,o)):n):e}function c(e,t){let n=Co?j(Co,e):void 0;if(typeof n=="function"){try{let o=W(n(t??{}));if(o)return o}catch{}return Du(e,t)}return Du(W(n)??e,t)}function xn(e,t,n,o){return c(n===1?e:t,{...o,n})}import{parseHexColor as zu}from"efficient-shell/format";import{COLOR_SLOTS as Wu,FILL_COLOR_SLOTS as Zb,colorRole as Jb,fillColorRole as Ku}from"efficient-shell/markup";import{parseHexColor as Mu}from"efficient-shell/format";import{FILL_COLOR_SLOTS as Vb}from"efficient-shell/markup";var Oo=e=>{let t=pu.find(n=>n.role===e);return t?`var(${t.token})`:""},Yb=e=>Oo(e)?`var(--theme-${e})`:"",Xb={main:{ink:pt.accent,page:pt.accent,key:"accent",label:()=>c("Main"),words:e=>c("Theme {n} main color",{n:e})},text:{ink:pt.text,page:pt.text,key:"text",label:()=>c("Text"),words:e=>c("Theme {n} text color",{n:e})},background:{ink:Oo("bg"),page:Yb("bg"),key:"background",label:()=>c("Background"),words:e=>c("Theme {n} background",{n:e})},muted:{ink:pt.labels,page:pt.labels,key:"muted",label:()=>c("Muted"),words:e=>c("Theme {n} muted color",{n:e})},surface:{ink:Oo("surface"),page:Oo("surface"),key:"surface",label:()=>c("Surface"),words:e=>c("Theme {n} surface color",{n:e})}};function Ze(e){return j(Xb,e)}var js="#9ca3af";function Xt(e,t,n){let o=Ze(e);return o?{hex:Mu(t[o.key]??"")??"",words:o.words(n)}:null}function Uu(e,t){return Vb.flatMap(n=>{let o=Xt(n,e,t);return o&&Ze(n)?.ink?[{name:n,label:o.words,value:o.hex||js}]:[]})}var qb=["main","text","background"];function $u(e){let t=new Set,n=[];return ke(e).themes.forEach((o,a)=>{for(let s of qb){let r=Ze(s),i=r?o[r.key]:void 0,l=typeof i=="string"&&i?Mu(i):null;!r||!l||t.has(l)||(t.add(l),n.push({value:l,label:r.words(a+1)}))}}),n}function Me(e){return Ze(e)?.ink??""}function Ie(e){if(typeof e!="string")return null;let t=Ku(e.trim());return t?.kind==="slot"&&Me(t.slot)?t.slot:null}var Qb={accent:"main",labels:"muted"};function Ue(e){return j(Qb,e)??e}function Po(e){if(!e)return"";if(e.startsWith("#"))return zu(e)===e.toLowerCase()?e:"";let t=Jb(Ue(e));return t?.kind==="slot"?Me(t.slot):""}function ju(e,t=Wu){return t.flatMap(n=>{let o=Ze(n);return o?.ink?[{name:n,label:o.label(),value:e?.[n]||js}]:[]})}function Vu(e){let t=Ku(Ue(e));return t?.kind==="slot"?Me(t.slot):""}function b0(e){let t=e?.trim();return t?Zb.find(n=>Me(n)===t)??null:null}function y0(e){let t={},n=e.ownerDocument,o=n?.defaultView;if(!n||!o)return t;let a=o.getComputedStyle(e),s=n.createElement("canvas").getContext("2d");for(let r of Wu){let i=Me(r);if(!i)continue;let l=i.replace(/^var\((--[\w-]+)\)$/,"$1"),u=a.getPropertyValue(l).trim();if(!u)continue;let d=Gu(u);!d&&s&&(s.fillStyle="#000000",s.fillStyle=u,d=Gu(String(s.fillStyle))),d&&(t[r]=d)}return t}function Gu(e){let t=e.trim().toLowerCase();if(t.startsWith("#"))return zu(t);let n=t.match(/^rgba?\(\s*(\d+)[\s,]+(\d+)[\s,]+(\d+)/);return n?`#${n.slice(1,4).map(o=>Math.min(255,Number(o)).toString(16).padStart(2,"0")).join("")}`:null}var ko="sf.gapContainer",$e={min:-32,max:64,step:2},ed={Grid:{sm:12,md:24,lg:40},Flex:{sm:12,md:24,lg:40},FooterGroup:{sm:8,md:16,lg:32},HeroGroup:null,Events:null,GalleryB:null,ProductGrid:null},qt={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},ey=new Set(["Events","GalleryB"]);function vn(e,t,n){if(typeof t=="number"&&Number.isFinite(t)&&t>=$e.min)return t;if(typeof t=="string"){let o=ed[e]?.[t];if(typeof o=="number")return o}return typeof n=="number"&&Number.isFinite(n)?n:qt[e]}var ty="sf-gap-overlap",ny="--sf-gap-overlap",Vs="--sf-block-gap",Yu="--sf-block-gap-rem",be={min:0,max:$e.max,step:$e.step};function wn(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.min(Math.max(Math.round(e),be.min),be.max);return t-t%be.step}function E0(e,t){let n=Tn(e,t,"gap",be);if(n!==null)return{[Vs]:n,[Yu]:n};let o=wn(e);return o===null?{}:{[Vs]:`${o}px`,[Yu]:`${o/16}rem`}}var Xu="--sf-block-gap-phone",qu="--sf-block-gap-phone-rem",oy="--sf-block-gap-on-phone",ay="max-view-tablet:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]",sy="max-view-wide:[&_[data-sf-line~=edge]:not([data-sf-line~=edge]_*)]:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";function T0(e,t){let n=Tn(e,t,"gap",be);if(n!==null)return{[Xu]:n,[qu]:n};let o=wn(e);return o===null?{}:{[Xu]:`${o}px`,[qu]:`${o/16}rem`}}function x0(e){return wn(e)===null?"":`${ay} ${sy}`}var Zu="sf-gap-zone",Ju="--sf-gap-len";function Ao(e,t){return typeof t=="number"&&Number.isFinite(t)&&t>=$e.min?!0:typeof t=="string"&&typeof ed[e]?.[t]=="number"}var Qu="--sf-gap-len-phone",ry="--sf-gap-len-tablet",Cn={min:0,max:$e.max,step:$e.step};function Je(e){return typeof e=="number"&&Number.isFinite(e)&&e>=Cn.min}function Ys(e){return e/2}function Xs(e,t,n){return Je(n)&&!Ao(e,t)}function qs(e,t,n,o,a){return Je(t)?t:Xs(e,n,a)?a:Ys(vn(e,n,o))}var iy={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function v0(e,t,n,o,a){let s={...Je(o)?{[Qu]:`${o}px`}:null,...Je(a)?{[ry]:`${a}px`}:null};if(!Ao(e,t)){let i=`${qt[e]}px`,l=ey.has(e)?`var(--sf-card-gap, ${i})`:i;return{className:` ${Zu}`,style:{[Ju]:`var(${Vs}, ${l})`,[Qu]:`var(${oy})`,...s}}}let r=vn(e,t);return r>=0?{className:` ${Zu}`,style:{[Ju]:`${r}px`,...s}}:{className:` ${ty} ${iy[n]}`,style:{gap:"0px",[ny]:`${-r/2}px`}}}import{jsx as Js,Fragment as hy,jsxs as gy}from"react/jsx-runtime";import{createContext as by,useContext as yy,useMemo as Sy}from"react";var ly=4,cy={sans:"Arial",condensed:"Arial Narrow",serif:"Times New Roman",mono:"Courier New"},uy={sans:"sans-serif",serif:"serif",mono:"monospace"},dy="latin",py=/^\/(?![\/\\])[^\s"'()\\<>:]+$/,fy=/^U\+[0-9A-Fa-f?]{1,6}(?:-[0-9A-Fa-f]{1,6})?(?:\s*,\s*U\+[0-9A-Fa-f?]{1,6}(?:-[0-9A-Fa-f]{1,6})?)*$/,Zs=e=>`"${Iu(e)}"`,td=e=>`${e} Fallback`;function my(e){return typeof e?.url=="string"&&py.test(e.url)&&typeof e.unicodeRange=="string"&&fy.test(e.unicodeRange.trim())&&Number.isInteger(e.weight)&&e.weight>=1&&e.weight<=1e3&&(e.style==="normal"||e.style==="italic")}var Io=e=>`${e}%`,Ro=e=>typeof e=="number"&&Number.isFinite(e);function nd(e,t){let n={css:"",vars:{},preload:[]};if(e.siteFonts.size===0)return n;let o=[],a=[];for(let s of new Set(t)){let r=e.siteFonts.get(s),i=e.byKey.get(s);if(!r||!i)continue;let l=Zs(r.family);for(let p of r.files??[])my(p)&&(o.push(`@font-face { font-family: ${l}; src: url("${p.url}") format("woff2"); font-weight: ${p.weight}; font-style: ${p.style}; unicode-range: ${p.unicodeRange.trim()}; font-display: swap; }`),p.subset===dy&&a.push(p));let u=r.fallbackMetrics,d=!!u&&Ro(u.ascent)&&Ro(u.descent)&&Ro(u.lineGap)&&Ro(u.sizeAdjust);if(d){let p=cy[r.condensed?"condensed":i.category];o.push(`@font-face { font-family: ${Zs(td(r.family))}; src: local("${p}"); ascent-override: ${Io(u.ascent)}; descent-override: ${Io(u.descent)}; line-gap-override: ${Io(u.lineGap)}; size-adjust: ${Io(u.sizeAdjust)}; }`)}n.vars[i.cssVar]=Ks([l,...d?[Zs(td(r.family))]:[],uy[i.category]].join(", "))}return n.css=Ks(o.join(`
1
+ import{b as hu,c as gu,d as ku,e as Au,g as Ks,h as Iu,i as Ru}from"./chunk-SI2DLHOL.js";import{$ as ge,$f as Ms,$g as gt,$h as Pu,Aa as Ic,Ac as _o,Ag as Gs,Ah as _u,Bc as Dc,Ca as O,Cb as Nc,Cc as Fc,Ce as jc,Da as bo,Dc as Bc,Dd as Is,E as vc,Eb as $t,Ec as ks,Fb as He,Fc as Hc,Ia as ws,Id as le,If as qc,Jf as Bs,Ka as Rc,Kf as ke,Kg as ht,Kh as Ws,Ld as Uc,Lf as Zc,Lh as vo,Mf as Jc,Mg as cu,Mh as Eu,Nf as Wt,Nh as U,Ob as yo,Of as ce,Og as uu,Qg as du,Rc as Mc,Rf as Kt,Rh as Tu,Sc as As,Sd as $c,Sf as jt,Sg as pu,Sh as xu,Th as vu,Uh as wu,Vd as Gc,Vf as Qc,Wg as fu,Wh as Cu,Xg as mu,Ye as To,Yf as Hs,Yh as Yt,Zh as Ou,_f as eu,_h as wo,aa as wc,ah as zs,b as W,ba as Cc,c as Ye,ca as Oc,cg as tu,dg as nu,dh as bu,ea as dt,ee as Rs,ef as Ds,ga as go,hc as Lc,i as bc,ka as _n,kg as ou,l as mo,le as Eo,lg as Us,li as B,m as yc,n as Sc,ne as Gt,ng as au,oa as pt,oc as ft,oe as mt,of as M,og as ae,p as _c,pf as F,pg as su,ph as yu,q as Ec,qc as Cs,qf as Vc,qg as ru,qi as Lu,r as Tc,rc as Os,re as zc,rf as zt,rg as Ae,se as Ns,sf as Yc,sg as Vt,t as ho,tc as So,te as Wc,tf as Fs,u as xc,uf as Tn,va as Pc,vf as Xc,vg as iu,vh as Su,wa as kc,we as Kc,wg as $s,xa as Ac,xb as En,xe as Ls,yf as Xe,yh as xo,za as vs,zc as Ps,zf as qe,zg as lu}from"./chunk-3ZZ3Z6U5.js";import{a as j,b as he}from"./chunk-OHEU7JQW.js";import{d as Nu}from"./chunk-D5HXXBSX.js";var Fu="en",Co=null,Bu=Fu,Hu=null;function t0(e,t,n){Co=e??null,Bu=t||Fu,Hu=n??null}function P(){return Hu}function n0(){return Bu}function o0(){return Co}function Du(e,t){return t?e.replace(/\{([A-Za-z][A-Za-z0-9_]*)\}/g,(n,o)=>he(t,o)?String(j(t,o)):n):e}function c(e,t){let n=Co?j(Co,e):void 0;if(typeof n=="function"){try{let o=W(n(t??{}));if(o)return o}catch{}return Du(e,t)}return Du(W(n)??e,t)}function xn(e,t,n,o){return c(n===1?e:t,{...o,n})}import{parseHexColor as zu}from"efficient-shell/format";import{COLOR_SLOTS as Wu,FILL_COLOR_SLOTS as Zb,colorRole as Jb,fillColorRole as Ku}from"efficient-shell/markup";import{parseHexColor as Mu}from"efficient-shell/format";import{FILL_COLOR_SLOTS as Vb}from"efficient-shell/markup";var Oo=e=>{let t=pu.find(n=>n.role===e);return t?`var(${t.token})`:""},Yb=e=>Oo(e)?`var(--theme-${e})`:"",Xb={main:{ink:pt.accent,page:pt.accent,key:"accent",label:()=>c("Main"),words:e=>c("Theme {n} main color",{n:e})},text:{ink:pt.text,page:pt.text,key:"text",label:()=>c("Text"),words:e=>c("Theme {n} text color",{n:e})},background:{ink:Oo("bg"),page:Yb("bg"),key:"background",label:()=>c("Background"),words:e=>c("Theme {n} background",{n:e})},muted:{ink:pt.labels,page:pt.labels,key:"muted",label:()=>c("Muted"),words:e=>c("Theme {n} muted color",{n:e})},surface:{ink:Oo("surface"),page:Oo("surface"),key:"surface",label:()=>c("Surface"),words:e=>c("Theme {n} surface color",{n:e})}};function Ze(e){return j(Xb,e)}var js="#9ca3af";function Xt(e,t,n){let o=Ze(e);return o?{hex:Mu(t[o.key]??"")??"",words:o.words(n)}:null}function Uu(e,t){return Vb.flatMap(n=>{let o=Xt(n,e,t);return o&&Ze(n)?.ink?[{name:n,label:o.words,value:o.hex||js}]:[]})}var qb=["main","text","background"];function $u(e){let t=new Set,n=[];return ke(e).themes.forEach((o,a)=>{for(let s of qb){let r=Ze(s),i=r?o[r.key]:void 0,l=typeof i=="string"&&i?Mu(i):null;!r||!l||t.has(l)||(t.add(l),n.push({value:l,label:r.words(a+1)}))}}),n}function Me(e){return Ze(e)?.ink??""}function Ie(e){if(typeof e!="string")return null;let t=Ku(e.trim());return t?.kind==="slot"&&Me(t.slot)?t.slot:null}var Qb={accent:"main",labels:"muted"};function Ue(e){return j(Qb,e)??e}function Po(e){if(!e)return"";if(e.startsWith("#"))return zu(e)===e.toLowerCase()?e:"";let t=Jb(Ue(e));return t?.kind==="slot"?Me(t.slot):""}function ju(e,t=Wu){return t.flatMap(n=>{let o=Ze(n);return o?.ink?[{name:n,label:o.label(),value:e?.[n]||js}]:[]})}function Vu(e){let t=Ku(Ue(e));return t?.kind==="slot"?Me(t.slot):""}function b0(e){let t=e?.trim();return t?Zb.find(n=>Me(n)===t)??null:null}function y0(e){let t={},n=e.ownerDocument,o=n?.defaultView;if(!n||!o)return t;let a=o.getComputedStyle(e),s=n.createElement("canvas").getContext("2d");for(let r of Wu){let i=Me(r);if(!i)continue;let l=i.replace(/^var\((--[\w-]+)\)$/,"$1"),u=a.getPropertyValue(l).trim();if(!u)continue;let d=Gu(u);!d&&s&&(s.fillStyle="#000000",s.fillStyle=u,d=Gu(String(s.fillStyle))),d&&(t[r]=d)}return t}function Gu(e){let t=e.trim().toLowerCase();if(t.startsWith("#"))return zu(t);let n=t.match(/^rgba?\(\s*(\d+)[\s,]+(\d+)[\s,]+(\d+)/);return n?`#${n.slice(1,4).map(o=>Math.min(255,Number(o)).toString(16).padStart(2,"0")).join("")}`:null}var ko="sf.gapContainer",$e={min:-32,max:64,step:2},ed={Grid:{sm:12,md:24,lg:40},Flex:{sm:12,md:24,lg:40},FooterGroup:{sm:8,md:16,lg:32},HeroGroup:null,Events:null,GalleryB:null,ProductGrid:null},qt={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},ey=new Set(["Events","GalleryB"]);function vn(e,t,n){if(typeof t=="number"&&Number.isFinite(t)&&t>=$e.min)return t;if(typeof t=="string"){let o=ed[e]?.[t];if(typeof o=="number")return o}return typeof n=="number"&&Number.isFinite(n)?n:qt[e]}var ty="sf-gap-overlap",ny="--sf-gap-overlap",Vs="--sf-block-gap",Yu="--sf-block-gap-rem",be={min:0,max:$e.max,step:$e.step};function wn(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.min(Math.max(Math.round(e),be.min),be.max);return t-t%be.step}function E0(e,t){let n=Tn(e,t,"gap",be);if(n!==null)return{[Vs]:n,[Yu]:n};let o=wn(e);return o===null?{}:{[Vs]:`${o}px`,[Yu]:`${o/16}rem`}}var Xu="--sf-block-gap-phone",qu="--sf-block-gap-phone-rem",oy="--sf-block-gap-on-phone",ay="max-view-tablet:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]",sy="max-view-wide:[&_[data-sf-line~=edge]:not([data-sf-line~=edge]_*)]:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";function T0(e,t){let n=Tn(e,t,"gap",be);if(n!==null)return{[Xu]:n,[qu]:n};let o=wn(e);return o===null?{}:{[Xu]:`${o}px`,[qu]:`${o/16}rem`}}function x0(e){return wn(e)===null?"":`${ay} ${sy}`}var Zu="sf-gap-zone",Ju="--sf-gap-len";function Ao(e,t){return typeof t=="number"&&Number.isFinite(t)&&t>=$e.min?!0:typeof t=="string"&&typeof ed[e]?.[t]=="number"}var Qu="--sf-gap-len-phone",ry="--sf-gap-len-tablet",Cn={min:0,max:$e.max,step:$e.step};function Je(e){return typeof e=="number"&&Number.isFinite(e)&&e>=Cn.min}function Ys(e){return e/2}function Xs(e,t,n){return Je(n)&&!Ao(e,t)}function qs(e,t,n,o,a){return Je(t)?t:Xs(e,n,a)?a:Ys(vn(e,n,o))}var iy={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function v0(e,t,n,o,a){let s={...Je(o)?{[Qu]:`${o}px`}:null,...Je(a)?{[ry]:`${a}px`}:null};if(!Ao(e,t)){let i=`${qt[e]}px`,l=ey.has(e)?`var(--sf-card-gap, ${i})`:i;return{className:` ${Zu}`,style:{[Ju]:`var(${Vs}, ${l})`,[Qu]:`var(${oy})`,...s}}}let r=vn(e,t);return r>=0?{className:` ${Zu}`,style:{[Ju]:`${r}px`,...s}}:{className:` ${ty} ${iy[n]}`,style:{gap:"0px",[ny]:`${-r/2}px`}}}import{jsx as Js,Fragment as hy,jsxs as gy}from"react/jsx-runtime";import{createContext as by,useContext as yy,useMemo as Sy}from"react";var ly=4,cy={sans:"Arial",condensed:"Arial Narrow",serif:"Times New Roman",mono:"Courier New"},uy={sans:"sans-serif",serif:"serif",mono:"monospace"},dy="latin",py=/^\/(?![\/\\])[^\s"'()\\<>:]+$/,fy=/^U\+[0-9A-Fa-f?]{1,6}(?:-[0-9A-Fa-f]{1,6})?(?:\s*,\s*U\+[0-9A-Fa-f?]{1,6}(?:-[0-9A-Fa-f]{1,6})?)*$/,Zs=e=>`"${Iu(e)}"`,td=e=>`${e} Fallback`;function my(e){return typeof e?.url=="string"&&py.test(e.url)&&typeof e.unicodeRange=="string"&&fy.test(e.unicodeRange.trim())&&Number.isInteger(e.weight)&&e.weight>=1&&e.weight<=1e3&&(e.style==="normal"||e.style==="italic")}var Io=e=>`${e}%`,Ro=e=>typeof e=="number"&&Number.isFinite(e);function nd(e,t){let n={css:"",vars:{},preload:[]};if(e.siteFonts.size===0)return n;let o=[],a=[];for(let s of new Set(t)){let r=e.siteFonts.get(s),i=e.byKey.get(s);if(!r||!i)continue;let l=Zs(r.family);for(let p of r.files??[])my(p)&&(o.push(`@font-face { font-family: ${l}; src: url("${p.url}") format("woff2"); font-weight: ${p.weight}; font-style: ${p.style}; unicode-range: ${p.unicodeRange.trim()}; font-display: swap; }`),p.subset===dy&&a.push(p));let u=r.fallbackMetrics,d=!!u&&Ro(u.ascent)&&Ro(u.descent)&&Ro(u.lineGap)&&Ro(u.sizeAdjust);if(d){let p=cy[r.condensed?"condensed":i.category];o.push(`@font-face { font-family: ${Zs(td(r.family))}; src: local("${p}"); ascent-override: ${Io(u.ascent)}; descent-override: ${Io(u.descent)}; line-gap-override: ${Io(u.lineGap)}; size-adjust: ${Io(u.sizeAdjust)}; }`)}n.vars[i.cssVar]=Ks([l,...d?[Zs(td(r.family))]:[],uy[i.category]].join(", "))}return n.css=Ks(o.join(`
2
2
  `)),n.preload=[...a.filter(s=>s.style==="normal"),...a.filter(s=>s.style!=="normal")].slice(0,ly),n}var ad=by(ge);function N0({siteFonts:e,children:t}){let n=Sy(()=>wc(e),[e]);return Js(ad.Provider,{value:n,children:t})}function On(){return yy(ad)}var od="sf-site-fonts";function L0({usedKeys:e,preload:t=!0}){let n=On(),o=nd(n,e),a=Object.entries(o.vars),s=[o.css,a.length?`:root { ${a.map(([r,i])=>`${r}: ${i}`).join("; ")} }`:""].filter(Boolean).join(`
3
3
  `);return s?gy(hy,{children:[(t?o.preload:[]).map(r=>Js("link",{rel:"preload",as:"font",type:"font/woff2",href:r.url,crossOrigin:""},r.id)),Js("style",{href:`${od}-${Ru(s)}`,precedence:od,dangerouslySetInnerHTML:{__html:s}})]}):null}import{jsx as Y,jsxs as yt,Fragment as uS}from"react/jsx-runtime";import{useCallback as Sd,useContext as dS,useId as Td,useRef as _d,useState as Ed}from"react";import{ThemeIcon as pS}from"efficient-easel/icons";import{Button as fS,useClickOutside as mS}from"efficient-shell/ui";import{SettingsField as hS}from"efficient-easel/panel";import{ScreenDocumentContext as gS}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as k,jsxs as et,Fragment as zy}from"react/jsx-runtime";import{parseHexColor as Wy}from"efficient-shell/format";import{Button as nr,IconButton as Ky,Tooltip as jy}from"efficient-shell/ui";import{jsx as Qe,jsxs as Dy}from"react/jsx-runtime";import{AccentIcon as Fy}from"efficient-easel/icons";import{Button as By,Tooltip as Hy}from"efficient-shell/ui";import{jsx as se,jsxs as er}from"react/jsx-runtime";import{useRef as _y}from"react";import{ColorPicker as Ey,ColorPickerPanel as Ty,ColorSwatch as xy,HexInput as vy,Popover as wy,Tooltip as Cy,colorFill as Oy,colorSwatchClasses as Py,useShellStrings as ky}from"efficient-shell/ui";import{SettingsDefaultReset as Ay,SettingsField as Iy}from"efficient-easel/panel";import{typedHex as Qs}from"efficient-easel/pick";var sd="Not set";function rd({value:e,onChange:t,label:n,id:o,caption:a,inherited:s,ariaLabel:r,choices:i}){return se(Ny,{value:e,onChange:t,label:c(r??n),id:o,caption:a,inherited:s,choices:i})}function Ry(){let{theme:e}=B();return $u(e)}function Ny({value:e,onChange:t,label:n,id:o,caption:a,inherited:s,choices:r}){let i=Ry(),l=e?null:Qs(s??""),u=a!==void 0&&(!e||Qs(a)!==Qs(e))?a:null,d=p=>{p!==e&&t(p)};return er("div",{className:"sf-colour",children:[r?se(Ly,{id:o,value:e,onChange:t,label:n,presets:i,follows:l,choices:r}):se(Ey,{id:o,value:e,onChange:d,label:n,presets:i,fallback:l??void 0,size:"md",align:"start"}),u!==null?se("span",{className:"sf-colour-caption",children:u}):se("span",{className:"sf-colour-hexwrap",children:se(vy,{value:e||l||"",onChange:d,label:c("{label} hex code",{label:n}),placeholder:e||l?void 0:c(sd),className:l?"sf-colour-hex is-inherited":"sf-colour-hex",size:"md"})})]})}function Ly({value:e,onChange:t,label:n,id:o,presets:a,follows:s,choices:r}){let i=ky().color,l=e||s||"",u=r.findIndex(f=>f.selected),d=u>=0,p=_y(u);return d&&(p.current=u),se(wy,{id:o,trigger:se("span",{"aria-hidden":"true",className:"absolute inset-0",style:Oy(l)}),triggerLabel:i.swatch(n,l.toUpperCase()||i.none),triggerClassName:Py({size:"md"}),"aria-label":i.panel(n),align:"start",children:er("div",{className:"sf-colour-window",children:[se("div",{role:"group","aria-label":n,className:"sf-colour-choices",children:r.map(f=>se(Cy,{content:f.label,children:se(xy,{color:f.color,"aria-label":f.label,selected:f.selected,onClick:()=>{f.selected||f.onPick()}})},f.label))}),se(Ty,{value:d?"":e,onChange:t,label:n,presets:a,fallback:(d?l:s)??void 0},p.current)]})})}function ye({label:e,icon:t,changed:n,hint:o,onReset:a,resetTo:s,children:r,...i}){return se(Iy,{label:e,icon:t,htmlFor:i.id,changed:n,hint:o,action:a?se(Ay,{words:P()?.panel,label:e,changed:!!n,detail:s,onReset:a}):void 0,children:r?er("div",{className:"es-width-stack",children:[rd({...i,label:e}),r]}):rd({...i,label:e})})}function Pn({label:e,icon:t,value:n,inherited:o,resetTo:a,onChange:s,onReset:r,hint:i,choices:l,children:u}){let d=!!n;return se(ye,{label:e,icon:t,value:n,inherited:d?void 0:o,onChange:s,changed:d,onReset:r,resetTo:a,hint:i,choices:l,children:u})}function tr(e){return ce(e).background}function My(e){let t=Xe(e.accent,tr(e));return t===null?null:{ratio:t,grade:jt(t)}}function Uy(e){let t=tr(e),n=Xe(e.accent,t);return n===null?[]:Qc(e.accent).filter(o=>{let a=Xe(o,t);return a!==null&&a>n&&jt(a)==="good"})}var $y={good:"Easy to read","large-only":Kt["large-only"],hard:Kt.hard};function id({value:e,onChange:t}){let n=My(e),o=n?.grade,a=n&&n.grade!=="good"?Uy(e):[];return Qe(ye,{label:c("Main color"),icon:Qe(Fy,{}),hint:n?c($y[n.grade]):void 0,value:e.accent,onChange:s=>t({...e,accent:s}),children:a.length>0?Qe("div",{className:"w-full min-w-0",children:Dy("div",{className:"sf-readability",children:[Qe("p",{className:"sf-readability-advice",children:Gy(o,!0)}),Qe("div",{className:"sf-readability-suggestions",children:a.map(s=>{let r=Xe(s,tr(e));return Qe(Hy,{content:c("Use {colour}",{colour:s.toUpperCase()}),children:Qe(By,{variant:"secondary",className:"sf-readability-suggestion",leftIcon:Qe("span",{className:"sf-readability-chip",style:{background:s},"aria-hidden":!0}),onClick:()=>t({...e,accent:s}),children:r?`${r.toFixed(1)}:1`:s.toUpperCase()})},s)})})]})}):null})}function Gy(e,t){return e?e==="good"?c("This color reads clearly on your pages."):t?c("This color is hard to read on this theme's page. The buttons below are the same hue, darkened."):c("This color is hard to read on your page background. Pick one further from it \u2014 lighter if your pages are dark, deeper if they are light."):c("Pick a color to see how it reads.")}import{ButtonIcon as Vy,ChevronDownIcon as cd,ChevronUpIcon as Yy,GroundIcon as Xy,LayoutIcon as qy,SquareIcon as Zy,TextSmallIcon as Jy,TypeIcon as ld}from"efficient-easel/icons";var kn=e=>c("Theme {n}",{n:e+1});function ud({colors:e}){let t=ce(e),n=Hs(e)??t.accent;return et("span",{className:"sf-theme-page",style:{background:t.background,color:t.text},"aria-hidden":!0,children:[k("span",{className:"sf-theme-eyebrow",style:{color:t.muted},children:c("label")}),et("span",{className:"sf-theme-headline",children:[c("Heading")," ",k("span",{style:{color:t.accent},children:c("main")})]}),k("span",{className:"sf-theme-body",children:c("body text")}),et("span",{className:"sf-theme-row",children:[k("span",{className:"sf-theme-btn",style:{background:n,color:Ms(e,t.accent)},children:c("button")}),k("span",{className:"sf-theme-mini",style:{background:t.surface,borderColor:t.line},children:c("card")})]})]})}var or={"Text color":k(ld,{}),"Label color":k(Jy,{}),Background:k(Xy,{}),"Panels & cards":k(qy,{}),Borders:k(Zy,{}),"Button color":k(Vy,{}),"Button text color":k(ld,{})};function Qy({label:e,colorKey:t,value:n,onChange:o,idPrefix:a="sf-theme-ink"}){let s=`${a}-${t}`;return k(ye,{label:c(e),icon:or[e],id:s,value:n,onChange:r=>o(t,r)})}function eS({value:e,accent:t,onChange:n,idPrefix:o="sf-theme-ink"}){let a=`${o}-button`,s=e!==void 0&&Wy(e)===e.toLowerCase(),r=s?e:t;return k(ye,{label:c("Button color"),icon:or["Button color"],id:a,value:r,caption:s?r:c("Main"),onChange:n})}function tS({colors:e,accent:t,onChange:n,idPrefix:o="sf-theme-ink"}){let a=`${o}-button-ink`,s=eu(e),r=Ms(e,t),i=Hs(e)??t,l=jt(Xe(r,i)??0);return k(ye,{label:c("Button text color"),icon:or["Button text color"],hint:s&&l!=="good"?c("{grade} on the button",{grade:c(Kt[l])}):void 0,id:a,value:r,caption:s?r:c("Auto"),onChange:n})}var nS=[{colour:!0},{label:"Text color",key:"text"},{label:"Label color",key:"muted"},{button:!0},{buttonInk:!0},{moduleBreak:!0},{label:"Background",key:"background"},{label:"Panels & cards",key:"surface"},{label:"Borders",key:"line"}];function ar({colors:e,onChange:t,idPrefix:n}){let o=ce(e);return k(zy,{children:nS.map(a=>"colour"in a?k(id,{value:e,onChange:t},"colour"):"moduleBreak"in a?k("div",{className:"sf-theme-module-break","aria-hidden":"true"},"module-break"):"button"in a?k(eS,{value:e.button,accent:o.accent,onChange:s=>t({...e,button:s}),idPrefix:n},"button"):"buttonInk"in a?k(tS,{colors:e,accent:o.accent,onChange:s=>t({...e,buttonInk:s}),idPrefix:n},"buttonInk"):k(Qy,{label:a.label,colorKey:a.key,value:o[a.key],onChange:(s,r)=>t({...e,[s]:r}),idPrefix:n},a.key))})}function No({index:e,colors:t,selected:n,role:o="radio",open:a,editable:s=!0,onPick:r,onEdit:i,onChangeColors:l}){let u=ce(t),d=kn(e),p=e<Bs.length&&!t.brandInk?Bs[e]:null,f=jt(Xe(u.text,u.background)??0),m=p?JSON.stringify(t)!==JSON.stringify(p):!1,b=a!==void 0;return et("div",{className:`sf-theme-card${n?" is-selected":""}`,children:[k("button",{type:"button",role:o,"aria-checked":o==="radio"?n:void 0,"aria-selected":o==="option"?n:void 0,"aria-label":d,className:"sf-theme-pick",onClick:r,children:k(ud,{colors:t})}),et("div",{className:"sf-theme-foot",children:[k("span",{className:"sf-theme-name",children:d}),f!=="good"&&k("span",{className:"sf-theme-warn",children:c(Kt[f])}),s&&i&&b&&k("span",{className:"sf-theme-edit",children:k(jy,{content:a?c("Collapse"):c("Edit colors"),children:k(Ky,{size:"sm","aria-expanded":a,"aria-controls":`sf-theme-colours-${e}`,"aria-label":a?c("Collapse {name}",{name:d}):c("Edit colors for {name}",{name:d}),onClick:i,children:a?k(Yy,{size:14}):k(cd,{size:14})})})}),s&&i&&!b&&k(nr,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":c("Edit {name}",{name:d}),onClick:i,children:c("Edit")})]}),a&&et("div",{id:`sf-theme-colours-${e}`,className:"sf-theme-colours",children:[k(ar,{colors:t,onChange:y=>l?.(y)}),p&&k(nr,{variant:"link",size:"sm",className:"sf-theme-reset",disabled:!m,onClick:()=>l?.({...p}),children:m?c("Reset {name} to the preset",{name:d}):c("Not changed")})]})]})}function dd({colors:e,name:t,nameId:n,open:o,menuId:a,labelId:s,buttonRef:r,onClick:i,onKeyDown:l,onEdit:u}){return et("div",{className:"sf-secttheme-btn",children:[k("button",{ref:r,type:"button",className:"sf-theme-pick","aria-expanded":o,"aria-controls":a,"aria-labelledby":`${s} ${n}`,onClick:i,onKeyDown:l,children:e?k(ud,{colors:e}):k("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),et("div",{className:"sf-theme-foot",children:[k("span",{id:n,className:"sf-theme-name",children:t}),u&&k(nr,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":c("Edit {name}",{name:t}),onClick:u,children:c("Edit")}),k("button",{type:"button",className:"sf-secttheme-caret","aria-hidden":"true",tabIndex:-1,onClick:i,children:k(cd,{size:12,className:"sf-multi-caret","aria-hidden":"true"})})]})]})}import{useCallback as cr,useEffect as gd,useRef as Do}from"react";import{currentEaselSession as rS}from"efficient-easel/screen/lib/session";import{backendOf as oS}from"efficient-easel/screen/lib/session";var xe=oS,uN=e=>e.blocks;import{useEaselSession as iS}from"efficient-easel/screen/lib/session-context";import{useSyncExternalStore as aS}from"react";var fd,sr=null,bt=null,Lo=0,rr=new Set;function ir(e){fd=e;for(let t of rr)t()}function fN(e){sr=e,Lo+=1,bt&&clearTimeout(bt),bt=null,ir(void 0)}function mN(e){Lo+=1,ir(e)}function md(e=250){sr&&(bt&&clearTimeout(bt),bt=setTimeout(()=>{bt=null;let t=sr;if(!t)return;let n=++Lo;t().then(o=>{n===Lo&&ir(o)}).catch(()=>{})},e))}function pd(){return fd}function sS(e){return rr.add(e),()=>{rr.delete(e)}}function hN(){return aS(sS,pd,pd)}var lr=new Set;function hd(e){return lr.add(e),()=>{lr.delete(e)}}async function bN(){let e=(await Promise.allSettled([...lr].map(async t=>t()))).find(t=>t.status==="rejected");if(e)throw e.reason}import{WebsiteBackendError as lS}from"efficient-easel/screen/lib/backend-error";function bd(e=rS()){return(t,n,o)=>{let a=xe(e).theme;return a?a.update(t,o?{siteId:o}:void 0):Promise.reject(new lS("invalid","This backend stores no site theme."))}}function yd(e){return e.themeFromDocument?{status:"skipped",reason:"template"}:e.token?null:{status:"skipped",reason:"no-token"}}async function cS(e,t=bd()){let{themeFromDocument:n,token:o,siteId:a,patch:s}=e,r=yd({themeFromDocument:n,token:o});if(r)return r;if(Object.keys(s).length===0)return{status:"skipped",reason:"empty"};try{return await t(s,o,a??void 0),{status:"saved"}}catch(i){return{status:"failed",error:i}}}function Fo({themeFromDocument:e,tokenRef:t,siteId:n,onResult:o}){let a=Do(null),s=Do({}),r=iS(),i=Do(o);i.current=o;let l=Do(null),u=cr(f=>{if(f.status==="skipped"){let m=`skipped:${f.reason}`;if(l.current===m)return;l.current=m}else l.current=null;i.current?.(f)},[]),d=cr(async()=>{a.current&&(clearTimeout(a.current),a.current=null);let f=s.current;s.current={};let m=await cS({themeFromDocument:e,token:t?.current,siteId:n,patch:f},bd(r));return u(m),m.status==="saved"&&md(),m.status==="failed"&&(s.current={...f,...s.current}),m},[e,t,n,u,r]),p=cr((f,m=!1)=>{let b=yd({themeFromDocument:e,token:t?.current});if(b){u(b);return}s.current={...s.current,...f},a.current&&clearTimeout(a.current),m?d():a.current=setTimeout(()=>{d()},500)},[e,t,d,u]);return gd(()=>()=>{d()},[d]),gd(()=>hd(async()=>{if(!a.current&&Object.keys(s.current).length===0)return;let f=await d();if(f.status==="failed")throw f.error}),[d]),{persist:p,flush:d}}var bS="Follow the page",MN="Follow the slideshow",yS=e=>c("Editing {name} changes it everywhere.",{name:e});function SS({colors:e}){if(!e)return Y("span",{className:"sf-secttheme-chip sf-secttheme-chip--none","aria-hidden":"true"});let t=ce(e);return yt("span",{className:"sf-secttheme-chip","aria-hidden":"true",children:[Y("i",{style:{background:t.background}}),Y("i",{className:"sf-secttheme-chip-accent",style:{background:t.accent}})]})}function _S({themes:e,value:t,onPick:n,onEdit:o,menuId:a,followLabel:s}){return yt("div",{className:"sf-multi-menu sf-secttheme-menu",id:a,role:"listbox",children:[s!==void 0&&yt(uS,{children:[yt("button",{type:"button",role:"option","aria-selected":t===null,className:`sf-secttheme-item${t===null?" is-active":""}`,onClick:()=>n(fu),children:[Y(SS,{}),Y("span",{className:"sf-secttheme-name",children:c(s)})]}),Y("div",{className:"sf-secttheme-sep",role:"presentation"})]}),t!==null&&e[t]&&Y("p",{className:"sf-secttheme-oncard",role:"presentation",children:c("{name} is on this section",{name:kn(t)})}),e.map((r,i)=>i===t?null:Y(No,{role:"option",index:i,colors:r,selected:!1,onPick:()=>n(i),onEdit:o?()=>o(i):void 0},i))]})}function ES({index:e,colors:t,onChange:n,onDone:o}){let a=kn(e),s=Td();return yt("div",{className:"sf-secttheme-sheet",children:[yt("div",{className:"sf-secttheme-sheet-head",children:[Y("span",{children:a}),Y(fS,{variant:"secondary",className:"sf-secttheme-done",onClick:o,children:c("Done")})]}),Y("div",{className:"sf-secttheme-rows",children:Y(ar,{colors:t,onChange:n,idPrefix:s})}),Y("p",{className:"sf-secttheme-warn",children:yS(a)})]})}function xd({value:e,onChange:t,followLabel:n,hint:o,canEdit:a=!0}){let{theme:s,setTheme:r}=B(),i=ke(s),l=dS(gS),u=l?.tokenRef,d=l?.siteId??null,p=!l?.capabilities?.hasSiteTheme,{persist:f,flush:m}=Fo({themeFromDocument:p,tokenRef:u,siteId:d}),b=ke(i),y=b.themes,E=gt(e),S=E!==null?y[E]:void 0,T=S??(y.length?Wt(b):void 0),[x,v]=Ed(!1),[w,R]=Ed(null),C=_d(null),D=_d(null),z=Td(),Te=Sd(()=>{v(!1),R(null)},[]),uo=Sd(()=>{!x&&w===null||(m(),Te())},[x,w,Te,m]);mS(C,uo);let po=X=>{t(X),Te()},fo=X=>{if(w===null)return;let Wb=y.map((Kb,jb)=>jb===w?X:Kb),xs={...b,themes:Wb};r(xs),f({selected_preset:xs.selected,theme_presets:xs.themes})};return yt("div",{className:"sf-secttheme",ref:C,children:[Y(hS,{label:c("Theme"),icon:Y(pS,{}),labelId:`${z}-label`,hint:o,children:Y(dd,{colors:T,onEdit:a&&E!==null?()=>{R(E),v(!1)}:void 0,name:S?kn(E):c(n??bS),nameId:`${z}-value`,labelId:`${z}-label`,open:x,menuId:z,buttonRef:D,onClick:()=>{R(null),v(X=>!X)},onKeyDown:X=>{X.key==="Escape"&&(x||w!==null)&&(X.preventDefault(),Te())}})}),x&&w===null&&Y("div",{onKeyDown:X=>{X.key==="Escape"&&(X.preventDefault(),Te(),D.current?.focus())},children:Y(_S,{themes:y,value:E,onPick:po,onEdit:a?X=>{R(X),v(!1)}:void 0,menuId:z,followLabel:n})}),a&&w!==null&&y[w]&&Y(ES,{index:w,colors:y[w],onChange:fo,onDone:()=>{m(),Te(),D.current?.focus()}})]})}import{defaultTextStyles as np,textStyleCaseCss as j_}from"efficient-easel/text-styles/model";import{resolveViewValue as op}from"efficient-easel/draw";import{VIEW_DESKTOP_MIN as vd,VIEW_TABLET_MIN as wd}from"efficient-easel/draw";var Bo=.02,Cd=`(min-width: ${En}px) and (max-width: ${vd-Bo}px)`,Od=`(max-width: ${En-Bo}px)`,Ho=`(min-width: ${wd}px) and (max-width: ${vd-Bo}px)`,Mo=`(max-width: ${wd-Bo}px)`;import{textStyleCaseCss as GS,textStyleCaseOfCss as zS,viewKeyAt as qd}from"efficient-easel/draw";function Uo(e,t){return t?`${e}[${t.index}].${t.rowKey}`:e}function TS(e){let t=/^([A-Za-z0-9_$]+)\[(\d+)\]\.([A-Za-z0-9_$]+)$/u.exec(e);return t?{key:t[1],row:{index:Number(t[2]),rowKey:t[3]}}:{key:e,row:null}}import{decodePartId as fr,encodePartId as h1}from"efficient-easel/draw";import{LINK_FIELD_MARKER as Hd,SCAFFOLD_FIELD_MARKER as Fd,TEXT_FIELD_MARKER as Wo}from"efficient-easel/draw";import{readHidable as Md}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as DS}from"efficient-easel/draw";var Pd={ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},kd={Events:["posts"],SubscribeBlogs:["posts"]};var xS=["anchor"],vS=/^href$|Href$|^url$|Url$|^link$|^mailto$|^tel$/;function An(e){return xS.includes(e)||vS.test(e)}var wS={Gallery:{source:{verb:"snapshot",keep:[]}},ProductHero:{source:{verb:"snapshot",keep:[]}},SpecTable:{source:{verb:"snapshot",keep:[]},wheel:{verb:"reference"},finish:{verb:"reference"},size:{verb:"reference"}},CollectionCard:{collection:{verb:"snapshot",keep:[]}},FooterMenu:{menu:{verb:"snapshot",keep:[]}},MenuBlock:{menu:{verb:"snapshot",keep:[]}},ProductGrid:{design_codes:{verb:"reference"}},ProductRef:{code:{verb:"reference"},finish:{verb:"reference"}},FitmentTable:{wheel:{verb:"reference"}},GalleryItem:{fromProduct:{verb:"reference"}},Footprint:{"offices[].group":{verb:"groupKey"},"offices[].lat":{verb:"pii"},"offices[].lng":{verb:"pii"},"offices[].geocode":{verb:"pii"}}};wS.ContactLocations={"locations[].lat":{verb:"pii"},"locations[].lng":{verb:"pii"},"locations[].mapsUrl":{verb:"pii"},"locations[].geocode":{verb:"pii"}};var XN=Object.fromEntries(Object.entries(Pd).map(([e,t])=>[e,Object.keys(t)])),qN=Object.fromEntries(Object.entries(kd).map(([e,t])=>[e,[...t]]));var ur="__ownBox";function Ad(e){return!!e&&typeof e=="object"&&e[ur]===!0}var dr="sfPanelOnly";function $o(e){return!!e&&typeof e=="object"&&e[dr]===!0}import{TEXT_FIELD_MARKER as IS}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as Id}from"efficient-easel/draw";import{readHidable as Rd}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as CS}from"efficient-easel/draw";var OS=CS,PS=["text","textarea"],kS=["textarea","plainTextarea"];function AS(e){return!e||typeof e!="object"?null:e[Id]?.control??null}function Nd(e){let t=AS(e);return t&&OS.includes(t)?t:null}function o1(e){return kS.includes(e)}function a1(e){return!e||typeof e!="object"?void 0:e[Id]?.placeholder}function Go(e){return Rd(e).text}function pr(e,t,n){return PS.includes(e)?{text:n,hidden:Rd(t).hidden}:n}function s1(e,t,n,o){return Go(e[t])===o?null:{...e,[t]:pr(n,e[t],o)}}function Ld(e){if(!(!e||typeof e!="object"))return e[IS]}function RS(e){if(!e||typeof e!="object")return null;let t=e.arrayFields;return t&&typeof t=="object"?t:null}function Dd(e,t){if(!Array.isArray(t))return[];let n=Ld(e),o=[];if(n?.control==="textList"){let s=n.itemKey??"text";return t.forEach((r,i)=>{let l=W(r?.[s]);l&&o.push({row:{index:i,rowKey:s},text:l})}),o}let a=RS(e);return a?(t.forEach((s,r)=>{for(let[i,l]of Object.entries(a)){if(!Nd(l))continue;let u=Go(s?.[i])||Ld(l)?.placeholder||"";u&&o.push({row:{index:r,rowKey:i},text:u})}}),o):[]}function NS(e,t){if(Array.isArray(e))return e[t.index]?.[t.rowKey]}function LS(e,t,n,o){let a=e[t];return!Array.isArray(a)||n.index<0||n.index>=a.length?null:{...e,[t]:a.map((s,r)=>r===n.index?{...s,[n.rowKey]:o}:s)}}function d1(e,t,n,o,a){let s=NS(e[t],n);return Go(s)===a?null:LS(e,t,n,pr(o,s,a))}function p1(e,t){return t?`${e} \xB7 row ${t.index+1}`:e}var w1="data-sf-part",C1="data-sf-region-part",O1="data-sf-part-row";function P1(e,t){return`${e}[${t}]`}var k1="data-sf-part-kind",FS="data-sf-part-style-owner",BS="data-sf-part-style-kind";function A1(e){for(let t=e;t;t=t.parentElement){let n=t.getAttribute(FS),o=t.getAttribute(BS);if(n&&o)return{owner:n,kind:o};if(t.getAttribute("data-easel-block"))return null}return null}var Bd=2;function Zt(e){return vs(e).replace(/\s+/gu,"")}function zo(e,t,n){let o=e[Wo];if(o){if(o.control==="textList"){let s=o.itemKey??"text";if(!Array.isArray(t))return;for(let r of t){let i=r?.[s];typeof i=="string"&&n.push(i)}return}let{text:a}=Md(t);a?n.push(a):o.placeholder&&n.push(o.placeholder);return}if(!e[Hd]){if(e.type==="text"||e.type==="textarea"){let a=W(t);a&&n.push(a);return}if(e.arrayFields&&Array.isArray(t)){for(let a of t)for(let[s,r]of Object.entries(e.arrayFields))zo(r,a?.[s],n);return}if(e.objectFields&&t&&typeof t=="object")for(let[a,s]of Object.entries(e.objectFields))zo(s,t[a],n)}}function HS(e){if(!e||typeof e!="object")return!1;let t=e;return t[Hd]?!1:!!t[Wo]||t.type==="text"||t.type==="textarea"}function Ud(e,t){let n=e[Wo];return n?.label?n.label:typeof e.label=="string"?e.label:t}function MS(e){let t=e.indexOf(" (");return(t>0?e.slice(0,t):e).trim()}function I1(e,t,n){if(!e)return[];let o=[];for(let[a,s]of Object.entries(e)){if(!s||typeof s!="object"||An(a))continue;let r=s,i=[];zo(r,t?.[a],i),!i.length&&r[Fd]!==void 0&&zo(r,r[Fd],i);let l=Ud(r,a);if(n?.(a)&&HS(r)){i.length&&o.push({key:a,label:l,texts:[],keyed:!0});continue}let u=new Set;for(let{row:f,text:m}of Dd(r,t?.[a])){let b=Zt(m);b.length<Bd||(u.add(b),o.push({key:a,label:l,texts:[b],row:f}))}let d=new Set(u),p=[];for(let f of i){let m=Zt(f);m.length<Bd||d.has(m)||(d.add(m),p.push(m))}p.length&&o.push({key:a,label:l,texts:p})}return o}function US(e){return!e.offPage&&!e.hidden&&e.panelOnly!==!0}var $S=DS;function $d(e,t){if(!t||typeof t!="object"||An(e)||Ad(t))return null;let n=t[Wo];return!n||!$S.includes(n.control)?null:n}function R1(e,t){let n=$d(e,t);return n!==null&&n.identifier!==!0}function N1(e,t){if(!e)return[];let n=[];for(let[o,a]of Object.entries(e)){let s=$d(o,a);if(!s)continue;let{text:r,hidden:i}=Md(t?.[o]);if(US({offPage:s.offPage===!0,hidden:!!i,panelOnly:$o(a)}))continue;let l=r||s.placeholder||"",u=vs(l).replace(/\s+/gu," ").trim();n.push({key:o,label:MS(Ud(a,o)),preview:u,offPage:s.offPage===!0,identifier:s.identifier===!0,hidden:!!i})}return n}function Jt(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function Ko(e,t){return Jt(e?.[t])??{}}function Gd(e,t,n){let o=Ko(e,t);return Jt(j(o,n))??{}}function zd(e,t,n,o){let{[n]:a,...s}=Ko(e,t),r=o?{...s,[n]:o}:s,{[t]:i,...l}=e;return Object.keys(r).length?{...l,[t]:r}:l}import{isLengthUnit as Sr}from"efficient-easel/screen/lib/content/length-units";var _r="_partStyles",WS="data-sf-part-styled",jo="data-sf-text-style",KS=/^(heading|body)-[1-7]$/;function Tt(e){return typeof e=="string"&&KS.test(e)}var Vo={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function jS(e){if(!e)return null;for(let[t,n]of Object.entries(Vo))if(n===e)return t;return null}function Y1(e){if(Tt(e.textStyle))return e.textStyle;let t=dt(e.role);return t?Vo[t]:void 0}var VS=[400,500,600,700],Rn=["left","center","right","justify"],mr=5,hr=1e3,YS=-5,XS=10,qS=0,ZS=64,JS=2,Wd={size:{min:mr,max:hr,step:1},sizeTablet:{min:mr,max:hr,step:1},sizePhone:{min:mr,max:hr,step:1},padding:{min:qS,max:ZS,step:JS}},QS=.05,e_=.01,t_=["line","letter"],n_=.5,o_=2.5,a_=-1,s_=1,r_=0,i_=400,l_=[...new Set(Object.values(go))];function X1(e){return[`${e} { transition: translate var(--page-motion-hover-duration) var(--page-ease-media) var(--page-motion-hover-delay) }`,`${e}:hover, ${e}:active { translate: 0 calc(-1 * var(--page-hover-lift)) }`]}function q1(e){return Ko(e,_r)}function c_(e,t){return Gd(e,_r,t)}function Zd(e,t,n){return zd(e,_r,t,u_(n).length?n:null)}function u_(e){return Object.entries(e).filter(([,t])=>t!==void 0)}function d_(e){return t_.includes(e)}var In=(e,t,n)=>Math.min(n,Math.max(t,e)),p_=["sizeUnit","sizeUnitTablet","sizeUnitPhone"];function gr(e){let t=qd("sizeUnit",e),n=p_.find(o=>o===t);if(!n)throw new Error(`a part stores no unit key ${t}`);return n}var St={size:gr("desktop"),sizeTablet:gr("tablet"),sizePhone:gr("mobile"),paragraphSpacing:"paragraphSpacingUnit",padding:"paddingUnit"},Jd=Object.values(St);function Re(e,t){return F(e[St[t]])}function f_(e,t,n={}){if(Jd.includes(e))return Sr(t)&&t!=="px"?t:null;if(he(St,e)&&Re(n,e)!=="px"){let o=Et(Number(t),2);return!Number.isFinite(o)||o<0||o===0&&e!=="padding"?null:o}if(d_(e)){let o=Math.round(Number(t));return!Number.isFinite(o)||o===0?null:In(o,YS,XS)}if(e==="lineHeight"){let o=Number(t);return Number.isFinite(o)?Et(In(o,n_,o_),3):null}if(e==="letterSpacing"){let o=Number(t);return Number.isFinite(o)?Et(In(o,a_,s_),4):null}if(e==="paragraphSpacing"){let o=Math.round(Number(t));return!Number.isFinite(o)||o<=0?null:In(o,r_,i_)}if(he(Wd,e)){let{min:o,max:a}=Wd[e],s=Math.round(Number(t));return Number.isFinite(s)?In(s,o,a):null}return e==="italic"?typeof t=="boolean"?t:null:e==="role"||e==="fontRole"?dt(t)?t:null:e==="sizeToken"?Er(t)?t:null:e==="textStyle"?Tt(t)?t:null:e==="alignPhone"||e==="alignTablet"?Rn.includes(t)?t:null:t}var m_=["weight","size","sizeTablet","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding"];function Qt(e){let t=null,n=o=>{t??={...e},delete t[o]};for(let o of m_){let a=e[o];a!==void 0&&!(typeof a=="number"&&Number.isFinite(a))&&n(o)}e.align!==void 0&&!Rn.includes(e.align)&&n("align"),e.alignTablet!==void 0&&!Rn.includes(e.alignTablet)&&n("alignTablet"),e.alignPhone!==void 0&&!Rn.includes(e.alignPhone)&&n("alignPhone"),e.textStyle!==void 0&&!Tt(e.textStyle)&&n("textStyle"),e.sizeToken!==void 0&&!Er(e.sizeToken)&&n("sizeToken"),e.fontRole!==void 0&&!dt(e.fontRole)&&n("fontRole");for(let o of Jd)e[o]!==void 0&&!Sr(e[o])&&n(o);return t??e}function Er(e){if(!e||typeof e!="object")return!1;let{step:t,px:n,stepPhone:o,pxPhone:a,fluid:s}=e,r=l=>typeof l=="number"&&Number.isFinite(l)&&l>0,i=l=>typeof l=="string"&&l_.includes(l);return i(t)&&r(n)&&(o===void 0||i(o))&&(a===void 0||r(a))&&(s===void 0||h_(s,n))}function h_(e,t){if(!e||typeof e!="object"||Array.isArray(e))return!1;let{minPx:n,vw:o,...a}=e;return Object.keys(a).length===0&&typeof n=="number"&&Number.isFinite(n)&&n>0&&n<t&&typeof o=="number"&&Number.isFinite(o)&&o>0&&o<=100}function Tr(e){return e?.pxPhone&&Er(e)?{step:e.stepPhone??e.step,px:e.pxPhone}:null}function Qd({step:e,px:t,fluid:n}){let o=n?`clamp(${n.minPx}px, ${n.vw}vw, ${t}px)`:`${t}px`,a=`var(--size-${e}, ${o})`;return e.startsWith("heading")?`min(${a}, var(--sf-heading-max,9999px))`:a}var g_=[["font","role"],["font","fontRole"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function b_(e){let t=[];for(let[n,o]of g_)n===e?t.push(o):o===e&&t.push(n);return t}function Z1(e,t,n,o){let a={...c_(e,t)},s=o==null?null:f_(n,o,a);if(s===null)delete a[n];else{a[n]=s;for(let r of b_(n))delete a[r]}return Zd(e,t,a)}function J1(e,t){return Zd(e,t,{})}function y_(e){return zS(e)??"none"}function S_(e){return GS(e)??""}var Kd={heading:"--font-role-heading",heading2:"--font-role-heading2",heading3:"--font-role-heading3",body:"--font-role-body",accent:"--font-role-accent",label:"--font-role-label"};function __(e,t){return dt(e.role)||(t?.blockDrawsStyle?null:jS(e.textStyle))}var E_="--sf-part-size-cap";function xr(e,t){return e&&t?.sizeCap?`min(${e}, var(${E_}, ${e}))`:e}function Q1(e,t){return e?.[t]===!0}function eL(e,t){return e==="Text"&&t==="text"}var T_={headingLarge:"min(clamp(64px,9vw,144px), var(--sf-heading-max,9999px))",headingMedium:"min(32px, var(--sf-heading-max,9999px))",headingSmall:"min(24px, var(--sf-heading-max,9999px))",accent:"32px",body:"14px",label:"12px"};function x_(e){let t=go[e],n=j(T_,t);return n?`var(--size-${t}, ${n})`:`var(--size-${t})`}function vr(e){let t={};return typeof e.lineHeight=="number"?t.lineHeight=e.lineHeight:e.line&&(t.lineHeight=Et(v_+e.line*QS,3)),typeof e.letterSpacing=="number"?t.letterSpacingEm=e.letterSpacing:e.letter&&(t.letterSpacingEm=Et(e.letter*e_,4)),t}var v_=1,_t="--sf-part-para";function w_(e,t){e=Qt(e);let n={};if(typeof e.sizePhone=="number"&&e.sizePhone>0)n.fontSize=M(e.sizePhone,Re(e,"sizePhone"));else{let a=Tr(e.sizeToken);if(a)n.fontSize=Qd(a);else{let s=Xo(e);s!==void 0&&(n.fontSize=M(s,Re(e,"sizeTablet")))}}n.fontSize&&(n.fontSize=xr(n.fontSize,t));let o=e.alignPhone??Yo(e);return o&&(n.textAlign=o),n}function Yo(e){return e.alignTablet&&e.alignTablet!==e.align?e.alignTablet:void 0}function Xo(e){let t=e.sizeTablet!==void 0&&Re(e,"sizeTablet")!==Re(e,"size")?e.sizeTablet:He("textSize",e.size,e.sizeTablet,void 0).tablet;return t&&t>0?t:void 0}function C_(e,t){let n=Qt(e),o={},a=Xo(n);a!==void 0&&(o.fontSize=xr(M(a,Re(n,"sizeTablet")),t));let s=Yo(n);return s&&(o.textAlign=s),o}function tL(e,t){if(t==="desktop")return;let n=Qt(e);return(t==="mobile"?Yo(n):void 0)??n.align}function O_(e,t){if(t==="desktop")return e;let n=Qt(e),o=Xo(n),a=Yo(n);if(t==="tablet"){let i=e;return o!==void 0&&(i={...i,size:o,sizeUnit:n[St.sizeTablet]}),a&&(i={...i,align:a}),i}let s=e;if(typeof n.sizePhone=="number"&&n.sizePhone>0)s={...s,size:n.sizePhone,sizeUnit:n[St.sizePhone]};else{let i=Tr(n.sizeToken);i?s={...s,size:void 0,sizeToken:i}:o!==void 0&&(s={...s,size:o,sizeUnit:n[St.sizeTablet]})}let r=n.alignPhone??a;return r&&(s={...s,align:r}),s}function wr(e,t,n){return Cr(O_(e,t),qo,n)}function P_(e){return qd("size",e)}function nL(e,t){if(t==="desktop")return null;let n=Qt(e);if(t==="mobile"){if(Tr(n.sizeToken))return null;let o=Xo(n);if(o!==void 0)return{px:o,view:"tablet"}}return typeof n.size=="number"&&n.size>0?{px:n.size,view:"desktop"}:null}function ep(e,t){let n=P_(t);if(!he(e,n))return e;let o={...e};return delete o[n],o}function oL(e,t,n){let o=wr(ep(e,t),t,n);return{fontFamily:o.fontFamily,fontSize:o.fontSize}}function Cr(e,t,n){e=Qt(e);let o=__(e,n),a=vr(e),s=xr(e.size?M(e.size,Re(e,"size")):e.sizeToken?Qd(e.sizeToken):o?x_(o):"",n);return{fontFamily:e.font?R_(e.font,n?.fonts):e.fontRole?`var(${Kd[e.fontRole]})`:o?`var(${Kd[o]})`:"",fontWeight:e.weight?String(e.weight):"",fontSize:s,minWidth:s?"0":"",overflowWrap:s?"break-word":"",lineHeight:a.lineHeight!==void 0?String(a.lineHeight):"",letterSpacing:a.letterSpacingEm!==void 0?`${a.letterSpacingEm}em`:"",[_t]:e.paragraphSpacing?M(e.paragraphSpacing,Re(e,"paragraphSpacing")):"",textTransform:S_(e.case),textAlign:e.align??"",paddingTop:jd(e.padding,Re(e,"padding")),paddingBottom:jd(e.padding,Re(e,"padding")),color:k_(e.color),fontStyle:e.italic===!0?"italic":e.italic===!1?"normal":""}}var k_=e=>Po(e),jd=(e,t)=>e===void 0?"":M(e,t),Et=(e,t)=>Number(e.toFixed(t));function aL(e,t){let n=Number.parseFloat(e.fontSize)||16,o=Number.parseFloat(e.lineHeight),a=Number.parseFloat(e.letterSpacing),s=Number.parseFloat(e.paddingTop);return{fontKey:t,sizePx:n,weight:A_(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(o)?Et(o/n,3):1.2,letterEm:Number.isFinite(a)?Et(a/n,4):0,align:I_(e.textAlign),case:y_(e.textTransform),paddingPx:Number.isFinite(s)?Math.round(s):0}}function A_(e){return Number.isFinite(e)?VS.reduce((t,n)=>Math.abs(n-e)<Math.abs(t-e)?n:t):400}function I_(e){for(let t of Rn)if(t===e)return t;return e==="end"?"right":"left"}function sL(e,t,n=ge){let o=Vd(e);if(!o)return"";for(let a of n.options)if(Vd(t(a.cssVar))===o)return a.key;return""}var Vd=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function R_(e,t=ge){let n=Oc(e,t);return n?`var(${n.cssVar})`:""}function rL(e,t,n,o){return!t||fr(t)?.nodeId!==e?null:n.find(a=>o(a.getAttribute("class")))??n[0]??null}function N_(e,t){return Jt(j(e,t))??{}}function iL(e,t,n=()=>qo,o=u=>u,a=F_,s="desktop",r=()=>!1,i=()=>!1,l=ge){let u=0;for(let{element:d,partId:p}of e){let f=fr(p)?.propKey;if(!f)continue;let m=N_(t,o(f)),b=wr(m,s,{blockDrawsStyle:r(f),sizeCap:i(f),fonts:l});Tt(m.textStyle)?d.setAttribute?.(jo,m.textStyle):d.removeAttribute?.(jo);let y=br.some(S=>d.style[S]),E=!1;for(let[S,T]of Object.entries(b))M_(d,S,T),T&&(E=!0);if(y||br.some(S=>b[S]))for(let S of L_(d,a))for(let T of br)S.style[T]=b[T]??"";E&&(u+=1)}return u}function L_(e,t){let n=Zt(e.textContent??""),o=[],a=e;for(let s=0;s<D_&&t(a);s+=1){let r=a.parentElement;if(!r||Zt(r.textContent??"")!==n)break;o.push(r),a=r}return o}var D_=8;function F_(e){let t=e;return typeof window>"u"||!t?.ownerDocument?!1:window.getComputedStyle(t).display==="inline"}var qo={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0};function B_(e){if(!e||typeof e!="object")return null;let t={};Tt(e.textStyle)&&(t.textStyle=e.textStyle),typeof e.size=="number"&&e.size>0&&(t.size=e.size),typeof e.sizeTablet=="number"&&e.sizeTablet>0&&(t.sizeTablet=e.sizeTablet),typeof e.sizePhone=="number"&&e.sizePhone>0&&(t.sizePhone=e.sizePhone);for(let n of["size","sizeTablet","sizePhone"]){let o=St[n];t[n]!==void 0&&Sr(e[o])&&(t[o]=e[o])}return Object.keys(t).length?t:null}function H_(e,t,n){let o=B_(e);if(!o)return{};let a=wr(o,t,{...n?.sizeCap?{sizeCap:!0}:{},...n?.fonts?{fonts:n.fonts}:{}});return{...a.fontFamily?{fontFamily:a.fontFamily}:{},...a.fontSize?{fontSize:a.fontSize}:{}}}function lL(e){return Tt(e?.textStyle)||!!e?.role||typeof e?.size=="number"&&e.size>0}function cL(e,t,n,o){if(!e||typeof e!="object")return{};let a=Gc(e.role,t,go)??{},s=t.sized?H_(ep(e,n),n,o?{fonts:o}:void 0):{};return{...a,...s}}function uL(e,t,n){n.fontFamily&&e.fontFamily===n.fontFamily&&(e.fontFamily=t.fontFamily),n.fontSize&&e.fontSize===n.fontSize&&(e.fontSize=t.fontSize)}function M_(e,t,n){if(!t.startsWith("--")){e.style[t]=n;return}let o=e.style;typeof o.setProperty=="function"?n?o.setProperty(t,n):o.removeProperty?.(t):o[t]=n;let a=e;t===_t&&(n?a.setAttribute?.(Yd,""):a.removeAttribute?.(Yd))}var Yd="data-sf-part-para",U_=Object.keys(Cr({},qo)),yr=new Set(["color","overflowWrap",_t,"fontStyle"]),br=U_.filter(e=>!yr.has(e));function dL(e,t,n,o=u=>u,a=()=>!1,s=()=>null,r=[],i=()=>!1,l=ge){let u=new Map;for(let m of e){let b=Uo(m.key,m.row);for(let y of m.texts){let E=u.get(y);E?(E.keys.add(m.key),E.partKeys.add(b)):u.set(y,{keys:new Set([m.key]),partKeys:new Set([b])})}}let d=new Map;for(let m of new Set([...Object.keys(t),...r])){if(!$_(m))continue;let b=Xd(n,m,Jt(t[m])??{},{blockDrawsStyle:!1,sizeCap:i(m),fonts:l},s(m));b&&d.set(m,b)}let p=m=>{let b=o(m),y=s(b);if(!he(t,b)&&!y)return null;let E=Jt(t[b])??{};return Xd(n,m,E,{blockDrawsStyle:a(m),sizeCap:i(m),fonts:l},y)},f=new Map;for(let[m,{keys:b,partKeys:y}]of u){let E=y.size===1?[...y][0]:b.size===1?[...b][0]:null;if(!E)continue;let S=p(E);S&&f.set(m,S)}for(let m of e){if(!m.keyed)continue;let b=p(Uo(m.key,m.row));b&&d.set(m.key,b)}return f.size||d.size?{rules:f,kindRules:d,drawn:new Set(u.keys())}:null}function Xd(e,t,n,o,a){let s=Cr(n,qo,o),r=C_(n,o),i=w_(n,o),l=Tt(n.textStyle)?n.textStyle:void 0;return!Object.values(s).some(Boolean)&&!Object.keys(r).length&&!Object.keys(i).length&&!l&&!a?null:{stamp:G_(e,t),declarations:s,...Object.keys(r).length?{tablet:r}:{},...Object.keys(i).length?{phone:i}:{},...l?{textStyle:l}:{},...a?{motion:a}:{}}}function $_(e){return e.startsWith("@")}function pL(e,t){return e?.kindRules.get(t)??null}function G_(e,t){let n=o=>o.replace(/[^A-Za-z0-9_-]+/g,"-");return`${n(e)}~${n(t)}`}function z_(e){return e?{tablet:Cd,phone:Od}:{tablet:Ho,phone:Mo}}function fL(e,{inBox:t=!1}={}){let{tablet:n,phone:o}=z_(t),a=[],s=new Set,r=i=>{let{stamp:l,declarations:u}=i;if(s.has(l))return;s.add(l);let d=Object.entries(u).filter(([,S])=>S!==""),p=S=>S.map(([T,x])=>`${W_(T)}: ${x}`).join("; "),f=`[${WS}="${l}"]`,m=d.filter(([S])=>!yr.has(S)),b=d.filter(([S])=>yr.has(S));m.length&&a.push(`${f}, *:has(> ${f}) { ${p(m)} }`),b.length&&a.push(`${f} { ${p(b)} }`),u[_t]&&(a.push(`*:has(> ${f}) { ${_t}: ${u[_t]} }`),a.push(...Zo(f,`*:has(> ${f})`)));let y=Object.entries(i.tablet??{}).filter(([,S])=>S!=="");y.length&&a.push(`@media ${n} { ${f}, *:has(> ${f}) { ${p(y)} } }`);let E=Object.entries(i.phone??{}).filter(([,S])=>S!=="");E.length&&a.push(`@media ${o} { ${f}, *:has(> ${f}) { ${p(E)} } }`)};for(let i of e.rules.values())r(i);for(let i of e.kindRules.values())r(i);return a.join(`
4
4
  `)}function Zo(e,t){let n=`var(${_t})`,o=":is([data-sf-bullet], [data-sf-number])";return[`${e} br:not(br + br) { display: block; content: ""; margin-top: ${n} }`,`${e} ${o}:not(:first-child) { margin-top: ${n} }`,`${e} ${o}:not(:last-child) { margin-bottom: ${n} }`,`:is(${t}) + :is(${t}) { margin-top: ${n} }`]}var W_=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);function mL(e,t){if(!e)return null;let n=Zt(t),o=e.rules.get(n);if(o)return o;if(n.length<K_||e.drawn.has(n))return null;let a=null;for(let[s,r]of e.rules)if(s.includes(n)){if(a&&a.stamp!==r.stamp)return null;a=r}return a}var K_=8;var Or=e=>e==="sentence"?"none":void 0,ap=["font","color","size","sizeTablet","sizePhone","weight","italic","lineHeight","lineHeightTablet","lineHeightPhone","letterSpacing","letterSpacingTablet","letterSpacingPhone","paragraphSpacing","paragraphSpacingTablet","paragraphSpacingPhone","letterCase","largestSize","largestSizeTablet","largestSizePhone"],en=["desktop","tablet","phone"],xt=(e,t)=>U(e,t);function Ar(e,t,n,o=$t()){return op("textSize",t,e.sizeTablet,e.sizePhone,o)[n]}var V_=[["lineSpacing","lineHeight","line"],["letterSpacing","letterSpacing","letter"]];function Pr(e){for(let[t,n,o]of V_)for(let a of en)if(e===xt(t,a))return{key:U(n,a),view:a,spacing:o};return{key:e,view:"desktop",spacing:null}}function Ne(e){let t={};for(let n of ap)e[n]!==void 0&&(t[n]=e[n]);return t}function Ir(e,t){let{auto:n,...o}=e,a=new Set(t??[]),s=ap.filter(r=>a.has(r)&&e.values[r]===void 0);return s.length?{...o,auto:s}:o}function sp(e){let t=e.fonts,n=e.sizes,o=e.typography,a=cu(e.compression),s={"heading-1":{font:W(t.heading),size:O(n.headingLarge),weight:O(o.weight),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Or(o.case),largestSize:O(o.maxPx)},"heading-2":{font:W(t.heading2),size:O(n.headingMedium),weight:O(o.weight2),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Or(o.case2)},"heading-3":{font:W(t.heading3),size:O(n.headingSmall),weight:O(o.weight3),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Or(o.case3)},"body-1":{font:W(t.body),size:O(n.body)},"body-5":{font:W(t.label),size:O(n.label)}};return np().map(({id:r,kind:i,name:l})=>({id:r,kind:i,name:l,values:Ne(s[r]??{})}))}function Rr(e){return Array.isArray(e)&&e.every(t=>t&&typeof t=="object"&&typeof t.id=="string"&&(t.kind==="heading"||t.kind==="body")&&typeof t.name=="string")?e.map(t=>Ir({...t,values:Ne(t.values??{})},Array.isArray(t.auto)?t.auto:void 0)):null}function OL(e){return Rr(e)??[]}function rp(e){return Rr(e)??np().map(({id:t,kind:n,name:o})=>({id:t,kind:n,name:o,values:{}}))}function nn(e,t){let n=sp(t),o=Rr(e);return o?o.map(a=>{let s={...kr(n,a.id)};for(let r of a.auto??[])delete s[r];return{...a,values:Ne({...s,...a.values})}}):n}var kr=(e,t)=>e.find(n=>n.id===t)?.values??{},tp=["heading-1","heading-2","heading-3"];function ip({saved:e,old:t,cur:n,next:o,sizeOf:a,panelView:s="desktop"}){let r=sp(t),i=rp(e),l=nn(i,t),u=[],d=o.map(f=>{let m=n.find(w=>w.id===f.id),b=i.find(w=>w.id===f.id);if(!m||!b){let w=Y_([f],a,s)[0],R=w.values.color;return R===void 0?w:{...w,values:{...w.values,color:Ue(R)}}}let y={...b.values},E=new Set(b.auto??[]),S=f.values,T=m.values,x=[...new Set([...Object.keys(S),...Object.keys(T)])].filter(w=>JSON.stringify(S[w])!==JSON.stringify(T[w])),v=w=>Pr(w).spacing==="letter";x.sort((w,R)=>Number(v(w))-Number(v(R)));for(let w of x){let{key:R,view:C,spacing:D}=Pr(w),z=R,Te=S[w];if(Te===void 0){delete y[z],kr(r,f.id)[z]!==void 0&&(u.push([f.id,z]),E.add(z));continue}if(E.delete(z),D==="line")y[z]=tn(Te/100,3);else if(D==="letter"){let uo={...l.find(X=>X.id===f.id)?.values??{}};for(let X of x)S[X]===void 0&&delete uo[Pr(X).key];let po=Ne({...uo,...y}),fo=Ar(po,a({...f,values:po}),C);y[z]=fo?tn(Te/fo,4):0}else y[z]=Te}return Ir({id:f.id,kind:f.kind,name:f.name,values:Ne(y)},E)}),p=t.compression;if(u.some(([f,m])=>(m==="lineHeight"||m==="letterSpacing")&&tp.includes(f))&&ht(p)!=="normal"){for(let f of tp){let m=d.find(y=>y.id===f);if(!m)continue;let b={...m.values};for(let y of["lineHeight","letterSpacing"])u.some(([E,S])=>E===f&&S===y)||b[y]===void 0&&!(m.auto??[]).includes(y)&&(b[y]=kr(r,f)[y]);m.values=Ne(b)}p="normal"}return{saved:d,old:{...t,compression:p}}}function lp(e,t){let n={text_styles:e.saved};return e.old.compression!==t.compression&&(n.heading_compression=ht(e.old.compression)),n}var tn=(e,t)=>Number(e.toFixed(t)),cp=(e,t)=>en.indexOf(e)<en.indexOf(t)?t:e;function up(e,t,n="desktop"){return e.map(o=>{let a={...o.values},s=t(o);for(let r of en){let i=U("lineHeight",r),l=o.values[i],u=o.values[U("letterSpacing",r)];delete a[i],l!==void 0&&(a[xt("lineSpacing",r)]=tn(l*100,1));let d=cp(r,n);u!==void 0&&(a[xt("letterSpacing",r)]=tn(u*Ar(o.values,s,d),d===r?2:4))}return{id:o.id,kind:o.kind,name:o.name,values:a}})}function Y_(e,t,n="desktop"){return e.map(o=>{let a=o.values,s={...a};for(let u of en)delete s[xt("lineSpacing",u)],delete s[xt("letterSpacing",u)];let r={id:o.id,kind:o.kind,name:o.name,values:Ne(s)},i={...r.values},l=t({...r,values:{...r.values}});for(let u of en){let d=a[xt("lineSpacing",u)],p=a[xt("letterSpacing",u)];if(typeof d=="number"&&(i[U("lineHeight",u)]=tn(d/100,3)),typeof p=="number"){let f=Ar(r.values,l,cp(u,n));i[U("letterSpacing",u)]=f?tn(p/f,4):0}}return{...r,values:Ne(i)}})}function PL(e,t=ge){let n={fonts:_n({heading:e.heading_font??void 0,heading2:e.heading_2_font??void 0,heading3:e.heading_3_font??void 0,body:e.body_font??void 0,accent:e.accent_font??void 0,label:e.label_font??void 0},t),sizes:Us({headingLarge:e.heading_size_large_px,headingMedium:e.heading_size_medium_px,headingSmall:e.heading_size_small_px,accent:e.accent_size_px,body:e.body_size_px,label:e.label_size_px}),compression:ht(e.heading_compression),typography:du(e)},o=e.text_styles??null,a=Array.isArray(o)?Nr(nn(o,n),n):n;return{fonts:_n(a.fonts,t),sizes:Us(a.sizes),compression:ht(a.compression),typography:a.typography,textStyles:o}}function Nr(e,t){let n=f=>e.find(m=>m.id===f)?.values??{},o=n("heading-1"),a=n("heading-2"),s=n("heading-3"),r=n("body-1"),i=n("body-5"),l=t.fonts,u=t.sizes,d=t.typography,p=f=>f==="none"?"sentence":"authored";return{fonts:{...l,heading:o.font??l.heading,heading2:a.font??o.font??l.heading2,heading3:s.font??o.font??l.heading3,body:r.font??l.body,label:i.font??l.label},sizes:{...u,headingLarge:o.size??null,headingMedium:a.size??null,headingSmall:s.size??null,body:r.size??null,label:i.size??null},compression:t.compression,typography:{...d,case:p(o.letterCase),weight:o.weight??null,maxPx:o.largestSize??null,weight2:a.weight??null,weight3:s.weight??null,case2:p(a.letterCase),case3:p(s.letterCase)}}}function kL(e,t=ge){let n=[];for(let o of e){let a=o.values,s=`.${ku(o)}`,r=`[${jo}="${o.id}"]`,i=`${s}, ${r}`,l=[],u=a.font!==void 0?t.byKey.get(a.font)?.cssVar:void 0;if(u&&l.push(`font-family: var(${u})`),a.size!==void 0){let m=a.largestSize!==void 0?Math.min(a.size,a.largestSize):a.size;l.push(`font-size: ${m}px`)}let d=Po(a.color);d&&l.push(`color: ${d}`),a.italic===!0&&l.push("font-style: italic"),a.weight!==void 0&&l.push(`font-weight: ${a.weight}`);let p=[];a.lineHeight!==void 0&&p.push(`line-height: ${a.lineHeight}`),a.letterSpacing!==void 0&&p.push(`letter-spacing: ${a.letterSpacing}em`),o.kind==="body"&&l.push(...p);let f=j_(a.letterCase);f&&o.kind==="body"&&l.push(`text-transform: ${f}`),a.paragraphSpacing&&l.push(`--sf-part-para: ${a.paragraphSpacing}px`),l.length&&n.push(`${i} { ${l.join("; ")} }`),o.kind==="heading"&&p.length&&n.push(`${i}, ${s}:is(h1, h2, h3, h4), ${r}:is(h1, h2, h3, h4) { ${p.join("; ")} }`),o.kind==="heading"&&f&&n.push(`${r}, ${s}:is(h1, h2, h3, h4) { text-transform: ${f} }`),a.paragraphSpacing&&(n.push(`*:has(> ${r}) { --sf-part-para: ${a.paragraphSpacing}px }`),n.push(...Zo(`:is(${i})`,`*:has(> ${r})`))),n.push(...X_(o,i,s,r))}return n.join(`
@@ -1 +1 @@
1
- import{Ah as P,Bh as I,Ch as X,Db as b,Dh as S,Fh as j,Gh as z,Mh as U,Oh as Z,Qh as J,Yg as V,ci as Q,ei as ee,nf as q,vc as K}from"./chunk-PVRWP47B.js";import{forwardRef as Pe}from"react";import{jsx as He}from"react/jsx-runtime";function Ie(e){if(typeof e=="string")return e;let t=e.query?`?${new URLSearchParams(e.query).toString()}`:"",s=e.hash?e.hash.startsWith("#")?e.hash:`#${e.hash}`:"";return`${e.pathname??""}${t}${s}`}var Oe=Pe(function({href:t,prefetch:s,replace:a,scroll:n,shallow:r,legacyBehavior:i,passHref:o,locale:l,onClick:h,children:w,...u},_){let g=C=>{h?.(C),!(C.defaultPrevented||u.target==="_blank")&&C.preventDefault()};return He("a",{ref:_,href:Ie(t),onClick:g,...u,children:w})}),_t=Oe;var te=["instagram","facebook","tiktok","youtube","x","linkedin","pinterest","whatsapp","telegram","line","wechat"],Fe={instagram:"Instagram",facebook:"Facebook",tiktok:"TikTok",youtube:"YouTube",x:"X",linkedin:"LinkedIn",pinterest:"Pinterest",whatsapp:"WhatsApp",telegram:"Telegram",line:"LINE",wechat:"WeChat"},Me={};function At(e){if(!e||typeof e!="object")return Me;let t={};for(let s of te){let a=e[s];if(typeof a!="string")continue;let n=a.trim();!n||!/^https?:\/\//i.test(n)||(t[s]=n)}return t}function xt(e){return te.flatMap(t=>{let s=e[t];return s?[{platform:t,href:s,label:Fe[t]}]:[]})}var Nt=e=>`${e}_url`;import{createContext as _e,createElement as x,useContext as N}from"react";import{Fragment as it,jsx as m}from"react/jsx-runtime";import{createContext as W,useContext as d}from"react";import{jsx as E,Fragment as pe}from"react/jsx-runtime";import{createContext as et,useContext as fe,useEffect as tt,useRef as st,useState as at}from"react";import{SCROLL_ZOOM_VAR as me}from"efficient-shell/format";import{readEntrance as $e}from"efficient-shell/format";var A={kind:"entrance",from:"entranceFrom",duration:"entranceDuration",delay:"entranceDelay"},O="sectionAnimation",De=Z(Object.values(A));var se="sf-entrance",Ge=e=>e!=null&&e!=="";function Ye(e,t){let s=e[A[t]];return t==="kind"&&!Ge(s)?e[O]:s}var y=(e,t,s)=>J(e,A[t],s,Ye(e,t));function H(e,t){return $e(y(e,"kind",t),y(e,"from",t),y(e,"duration",t),y(e,"delay",t))}var Be=e=>({desktop:H(e,"desktop"),tablet:H(e,"tablet"),phone:H(e,"phone")});function Ht(e){let t=Be(e);return U.every(s=>t[s].kind==="none")?null:t}var We={...Object.fromEntries([...V].map(e=>[e,"a root position: sticky bar; an outer box becomes its sticky containing block and the pin collapses (the same fact every wrapper pass excludes it for, lib/content/section-surface)"])),HeroSlide:"a slide is a direct child of the Hero's transform track ([&>*]:basis-full); a wrapper would take its width, and the Hero already moves one slide in at a time",HeroGroup:"a slide box is placed by grid-item properties on its own root (--sf-hg-row, justify-self); a wrapper becomes the grid item and the box loses its anchor (lib/document/blocks/general/HeroGroup/meta)",[q]:"a host part draws its data block's answer with no element of its own (lib/content/card-template HOST_PART_TYPE); a wrapper would be one, and the host's content is not the merchant's to animate"},Ft=new Set(Object.keys(We));function ae(e,t,s,a){return t<=0?1/0:a?2*(e-4)/(t+s):2*(e-s/2-4)/t}function ne(e,t,s){let a=o=>o.width>0&&o.height>0;if(!a(e)||t.some(o=>o.mark&&!a(o.rect)))return 1;let n=e.left+e.width/2,r=e.top+e.height/2,i=s;for(let{rect:o,mark:l}of t){let h=Math.abs(o.left+o.width/2-n),w=Math.abs(o.top+o.height/2-r),u=Math.max(ae(h,e.width,o.width,l),ae(w,e.height,o.height,l));i=Math.min(i,Math.max(1,u))}return i}import{parseOption as Ke}from"efficient-shell/format";var re=["cover","contain"],qe={cover:"Cover",contain:"Contain"},Gt="Image fit";function F(e,t){return Ke(re,t,e)}function Yt(){return re.map(e=>({label:qe[e],value:e}))}function Bt(e){return e==="contain"?"object-contain":"object-cover"}function M(e,t){return e!=="auto"&&t==="cover"}var Ve=P.map(e=>e.image).filter(e=>e!==I),R=e=>S(e)?I:e,p="fill",Xt={label:"Fill row",value:p,showWhen:K},D="4/3",ie={frame:"view-wide:h-full view-wide:min-h-[240px]",img:"view-wide:absolute view-wide:inset-0",figure:"view-wide:h-full"},le={all:{frame:"h-full min-h-[240px]",img:"absolute inset-0",figure:"h-full"},wide:ie,tablet:ie,desktop:{frame:"view-desktop:h-full view-desktop:min-h-[240px] max-view-desktop:aspect-[4/3]",img:"view-desktop:absolute view-desktop:inset-0",figure:"view-desktop:h-full"}};function jt(e,t,s){return t&&!v(s)?"all":e??"wide"}function oe(e){return le[e]}var zt=le.all;function ce(e){return e?`${e.img} h-full w-full`:"relative h-full w-full"}var Xe={auto:"","3/4":"aspect-[3/4]","2/1":"aspect-[2/1]","21/9":"aspect-[21/9]","16/9":"aspect-[16/9]","4/3":"aspect-[4/3]","16/10":"aspect-[16/10]","1/1":"aspect-square","9/16":"aspect-[9/16]","2/3":"aspect-[2/3]","4/5":"aspect-[4/5]",custom:"aspect-[var(--shape-ratio)]"},je={auto:"","3/4":"view-wide:aspect-[3/4]","2/1":"view-wide:aspect-[2/1]","21/9":"view-wide:aspect-[21/9]","16/9":"view-wide:aspect-[16/9]","4/3":"view-wide:aspect-[4/3]","16/10":"view-wide:aspect-[16/10]","1/1":"view-wide:aspect-square","9/16":"view-wide:aspect-[9/16]","2/3":"view-wide:aspect-[2/3]","4/5":"view-wide:aspect-[4/5]",custom:"view-wide:aspect-[var(--shape-ratio)]"},ze={auto:"","3/4":"max-view-wide:aspect-[3/4]","2/1":"max-view-wide:aspect-[2/1]","21/9":"max-view-wide:aspect-[21/9]","16/9":"max-view-wide:aspect-[16/9]","4/3":"max-view-wide:aspect-[4/3]","16/10":"max-view-wide:aspect-[16/10]","1/1":"max-view-wide:aspect-square","9/16":"max-view-wide:aspect-[9/16]","2/3":"max-view-wide:aspect-[2/3]","4/5":"max-view-wide:aspect-[4/5]",custom:"max-view-wide:aspect-[var(--shape-ratio-phone)]"},Ue={auto:"max-view-wide:aspect-auto!","3/4":"max-view-wide:aspect-[3/4]!","2/1":"max-view-wide:aspect-[2/1]!","21/9":"max-view-wide:aspect-[21/9]!","16/9":"max-view-wide:aspect-[16/9]!","4/3":"","16/10":"max-view-wide:aspect-[16/10]!","1/1":"max-view-wide:aspect-square!","9/16":"max-view-wide:aspect-[9/16]!","2/3":"max-view-wide:aspect-[2/3]!","4/5":"max-view-wide:aspect-[4/5]!",custom:"max-view-wide:aspect-[var(--shape-ratio-phone)]!"},$=e=>Ve.includes(e)||S(e),v=$;function Ut(e){let t=$(e)?S(e)?X(e):P.find(s=>s.image===e)?.ratio:null;return t?j(t):null}function Zt(e,t){return z({desktop:e,phone:t})}function Jt(e,t,s){return s==="contain"?!0:[e,t??e].every(a=>a!==p&&(!$(a)||a==="auto"))}function Qt(e,t){return e===p&&!t?D:e}function es(e){return e===p?D:v(e)?e:void 0}function ue(e,t){return v(t)?t===e?null:t:e===p?D:null}function Ze(e,t){let s=ue(e,t);return M(e,"cover")||s!==null&&M(s,"cover")}function Je(e,t,s){return F(e,"cover")==="cover"&&Ze(t,s)}function ts(e,t,s,a){return e==="desktop"?Je(t,s,a):F(t,"cover")!=="cover"?!1:Qe(e==="tablet"?s:ue(s,a)??s)}var Qe=e=>e===p||v(e)&&e!=="auto";function ss(e,t,s="wide"){return e===p&&s==="all"?oe("all").frame:t===null?v(e)?Xe[R(e)]:"":[e===p?oe(s).frame:v(e)?je[R(e)]:"",e===p&&s==="desktop"?Ue[R(t)]:ze[R(t)]].filter(Boolean).join(" ")}var T=et(null);function us({attrs:e,style:t,children:s}){return E(T.Provider,{value:{attrs:e,style:t},children:s})}function he({children:e}){return E(T.Provider,{value:null,children:e})}function ms({fill:e=null,children:t}){let s=fe(T);return s?E("div",{className:ce(e),...s.attrs,style:s.style,children:t}):E(pe,{children:t})}var L="data-sf-mark";function de(e){let t=e.getBoundingClientRect(),s=e.firstElementChild,a=s&&typeof s.offsetWidth=="number"?s:e,n=Math.max(a.offsetWidth,e.offsetWidth),r=Math.max(a.offsetHeight,e.offsetHeight);return{left:t.left+t.width/2-n/2,top:t.top+t.height/2-r/2,width:n,height:r}}function nt(e){return e.closest(`[${L}]`)||e.closest("style, script")?!1:[...e.childNodes].some(t=>t.nodeType===3&&(t.textContent??"").trim()!=="")}var we=e=>e.closest(`.${se}`)??e.ownerDocument.body;function rt(e,t){let s=we(e),a=[];for(let n of s.querySelectorAll(`[${L}]`))n!==e&&a.push({rect:de(n),mark:!0});for(let n of s.querySelectorAll("*")){if(n.contains(e)||!nt(n))continue;let r=n.getBoundingClientRect();r.width===0||r.height===0||a.push({rect:{left:r.left,top:r.top,width:r.width,height:r.height},mark:!1})}return ne(de(e),a,t)}function ds({inCell:e=!1,children:t}){let s=fe(T),a=st(null),[n,r]=at(null),i=s?Number.parseFloat(String(s.style[me])):Number.NaN;if(tt(()=>{let l=a.current;if(!l||!Number.isFinite(i))return;let h=()=>r(rt(l,i));h();let w=l.ownerDocument.defaultView?.ResizeObserver;if(!w)return;let u=new w(h),_=we(l);u.observe(l),u.observe(_);for(let g of _.querySelectorAll(`[${L}]`))g!==l&&u.observe(g);return()=>u.disconnect()},[i]),!s)return E(pe,{children:t});let o=Number.isFinite(i)?{...s.style,[me]:String(n??1)}:s.style;return E("span",{ref:a,className:e?"inline-flex min-w-0 max-w-full items-center justify-center":"inline-flex items-center justify-center",[L]:"",...s.attrs,style:o,children:t})}var ge={stretchedRow:!1,fillingColumn:!1},c=W(null),ve=()=>d(c)!==null;function _s({line:e,draw:t}){return m(it,{children:t(b(e,ve()))})}var Cs=(e="by-box")=>b(e,ve()),bs=()=>d(c),As=()=>d(c)?.id??null,f=W(!1);function ot(){let e=d(c)?.stretchedRow===!0,t=d(f);return e&&!t}var lt=()=>d(f);function ct(){let e=d(c),t=ot(),s=lt();return{fill:s?` ${Q}`:"",inner:a=>{let n=t||s?m(f.Provider,{value:!0,children:a}):a;return e?.columnsRow?m(c.Provider,{value:{...e,columnsRow:!1},children:n}):n}}}function xs({className:e,style:t,attrs:s,children:a}){let{fill:n,inner:r}=ct(),i=Y();return i.scope(m("div",{className:B(`${e}${n}`,i.className),...t?{style:t}:{},...s,...i.attrs,children:r(a)}))}var G=W(!1);function Ns({children:e}){return m(G.Provider,{value:!0,children:m(f.Provider,{value:!0,children:e})})}function Ss({children:e,ownPictures:t=!1}){let s=d(c),a=d(G),n=d(f),r=a&&n,i=s===null?null:s.id===void 0?ge:{...ge,id:s.id};return m(c.Provider,{value:i,children:m(G.Provider,{value:!1,children:m(f.Provider,{value:r,children:t?e:m(he,{children:e})})})})}var k=_e(null),Ee="data-sf-view-hide",Ce=e=>x(k.Provider,{value:null},e),be={className:"",attrs:{},scope:Ce},ut=be,Ae=_e(null),Ps=(e,t)=>e?{className:e,views:t}:null,mt=e=>x(k.Provider,{value:null},x(Ae.Provider,{value:null},x(f.Provider,{value:!0},e))),Is=(e,t,s={})=>e?{className:e,words:t,...s}:null,xe=(e,t)=>e.sectionClassName===void 0?{className:e.className,words:e.words}:b(e.line??"by-box",t)?{className:e.className,words:`${e.words} edge`}:{className:e.sectionClassName,words:e.words};function Y(){let e=N(k),t=N(Ae),s=N(c)!==null;if(e===null&&t===null)return ut;let a=e===null?null:xe(e,s);return t===null?{className:a.className,attrs:{[Ee]:a.words},scope:Ce}:{className:a?`${a.className} ${t.className}`:t.className,attrs:{...a?{[Ee]:a.words}:{},[ee]:t.views},scope:mt}}function Os(){let e=N(k),t=N(c)!==null;return e===null?"":xe(e,t).className}var B=(e,t)=>t?e?`${e} ${t}`:t:e;function Hs(e){let t=Y(),s=e.takes===!1?be:t,a={},n=!1;for(let[r,i]of Object.entries(e))r==="as"||r==="takes"||r==="children"||(r==="className"?(a.className=B(i,s.className),n=!0):a[r]=i);return!n&&s.className&&(a.className=s.className),s.scope(x(e.as??"div",{...a,...s.attrs},e.children))}var Ms={small:54,medium:66,large:84},dt=44,pt=16,ft=140,Ds={min:pt,max:ft,step:1},$s=dt*4;import{forwardRef as ht}from"react";import{imageCopyUrl as Ne,imageSrcSet as Se}from"efficient-shell/image-copies";import{jsx as vt}from"react/jsx-runtime";var wt={position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,color:"transparent"};function ye(e,t,s){if(s){let a=Se(e);return a?{src:Ne(e,1280),srcSet:a,sizes:s}:{src:e,sizes:s}}if(t&&t>0){let a=Se(e,{maxWidth:t*3});return a?{src:Ne(e,t*2),srcSet:a,sizes:`${t}px`}:{src:e}}return{src:e}}var gt=ht(function({src:t,width:s,height:a,fill:n,priority:r,loading:i,style:o,quality:l,placeholder:h,blurDataURL:w,unoptimized:u,loader:_,overrideSrc:g,sizes:C,...Re},Le){let Te=g??(typeof t=="string"?t:t.src),ke=ye(Te,n?void 0:Number(s)||void 0,C??(n?"100vw":void 0));return vt("img",{ref:Le,...ke,width:n?void 0:s,height:n?void 0:a,loading:r?"eager":i??"lazy",fetchPriority:r?"high":void 0,decoding:"async",style:n?{...wt,...o}:{color:"transparent",...o},...Re})}),Ws=gt;function Ks(e){let t=e.overrideSrc??(typeof e.src=="string"?e.src:e.src.src),s=e.fill?void 0:Number(e.width)||void 0;return{props:ye(t,s,e.sizes??(e.fill?"100vw":void 0))}}export{A as a,O as b,De as c,se as d,H as e,Be as f,Ht as g,Ft as h,qe as i,Gt as j,F as k,Yt as l,Bt as m,p as n,Xt as o,jt as p,oe as q,zt as r,ce as s,Ut as t,Zt as u,Jt as v,Qt as w,es as x,ue as y,Ze as z,Je as A,ts as B,ss as C,us as D,he as E,ms as F,ds as G,k as H,be as I,Ae as J,Ps as K,Is as L,Y as M,Os as N,B as O,Hs as P,c as Q,_s as R,Cs as S,bs as T,As as U,f as V,ot as W,lt as X,ct as Y,xs as Z,Ns as _,Ss as $,Ms as aa,dt as ba,pt as ca,Ds as da,$s as ea,Ws as fa,Ks as ga,_t as ha,te as ia,Fe as ja,Me as ka,At as la,xt as ma,Nt as na};
1
+ import{Ah as P,Bh as I,Ch as X,Db as b,Dh as S,Fh as j,Gh as z,Mh as U,Oh as Z,Qh as J,Yg as V,ci as Q,ei as ee,nf as q,vc as K}from"./chunk-3ZZ3Z6U5.js";import{forwardRef as Pe}from"react";import{jsx as He}from"react/jsx-runtime";function Ie(e){if(typeof e=="string")return e;let t=e.query?`?${new URLSearchParams(e.query).toString()}`:"",s=e.hash?e.hash.startsWith("#")?e.hash:`#${e.hash}`:"";return`${e.pathname??""}${t}${s}`}var Oe=Pe(function({href:t,prefetch:s,replace:a,scroll:n,shallow:r,legacyBehavior:i,passHref:o,locale:l,onClick:h,children:w,...u},_){let g=C=>{h?.(C),!(C.defaultPrevented||u.target==="_blank")&&C.preventDefault()};return He("a",{ref:_,href:Ie(t),onClick:g,...u,children:w})}),_t=Oe;var te=["instagram","facebook","tiktok","youtube","x","linkedin","pinterest","whatsapp","telegram","line","wechat"],Fe={instagram:"Instagram",facebook:"Facebook",tiktok:"TikTok",youtube:"YouTube",x:"X",linkedin:"LinkedIn",pinterest:"Pinterest",whatsapp:"WhatsApp",telegram:"Telegram",line:"LINE",wechat:"WeChat"},Me={};function At(e){if(!e||typeof e!="object")return Me;let t={};for(let s of te){let a=e[s];if(typeof a!="string")continue;let n=a.trim();!n||!/^https?:\/\//i.test(n)||(t[s]=n)}return t}function xt(e){return te.flatMap(t=>{let s=e[t];return s?[{platform:t,href:s,label:Fe[t]}]:[]})}var Nt=e=>`${e}_url`;import{createContext as _e,createElement as x,useContext as N}from"react";import{Fragment as it,jsx as m}from"react/jsx-runtime";import{createContext as W,useContext as d}from"react";import{jsx as E,Fragment as pe}from"react/jsx-runtime";import{createContext as et,useContext as fe,useEffect as tt,useRef as st,useState as at}from"react";import{SCROLL_ZOOM_VAR as me}from"efficient-shell/format";import{readEntrance as $e}from"efficient-shell/format";var A={kind:"entrance",from:"entranceFrom",duration:"entranceDuration",delay:"entranceDelay"},O="sectionAnimation",De=Z(Object.values(A));var se="sf-entrance",Ge=e=>e!=null&&e!=="";function Ye(e,t){let s=e[A[t]];return t==="kind"&&!Ge(s)?e[O]:s}var y=(e,t,s)=>J(e,A[t],s,Ye(e,t));function H(e,t){return $e(y(e,"kind",t),y(e,"from",t),y(e,"duration",t),y(e,"delay",t))}var Be=e=>({desktop:H(e,"desktop"),tablet:H(e,"tablet"),phone:H(e,"phone")});function Ht(e){let t=Be(e);return U.every(s=>t[s].kind==="none")?null:t}var We={...Object.fromEntries([...V].map(e=>[e,"a root position: sticky bar; an outer box becomes its sticky containing block and the pin collapses (the same fact every wrapper pass excludes it for, lib/content/section-surface)"])),HeroSlide:"a slide is a direct child of the Hero's transform track ([&>*]:basis-full); a wrapper would take its width, and the Hero already moves one slide in at a time",HeroGroup:"a slide box is placed by grid-item properties on its own root (--sf-hg-row, justify-self); a wrapper becomes the grid item and the box loses its anchor (lib/document/blocks/general/HeroGroup/meta)",[q]:"a host part draws its data block's answer with no element of its own (lib/content/card-template HOST_PART_TYPE); a wrapper would be one, and the host's content is not the merchant's to animate"},Ft=new Set(Object.keys(We));function ae(e,t,s,a){return t<=0?1/0:a?2*(e-4)/(t+s):2*(e-s/2-4)/t}function ne(e,t,s){let a=o=>o.width>0&&o.height>0;if(!a(e)||t.some(o=>o.mark&&!a(o.rect)))return 1;let n=e.left+e.width/2,r=e.top+e.height/2,i=s;for(let{rect:o,mark:l}of t){let h=Math.abs(o.left+o.width/2-n),w=Math.abs(o.top+o.height/2-r),u=Math.max(ae(h,e.width,o.width,l),ae(w,e.height,o.height,l));i=Math.min(i,Math.max(1,u))}return i}import{parseOption as Ke}from"efficient-shell/format";var re=["cover","contain"],qe={cover:"Cover",contain:"Contain"},Gt="Image fit";function F(e,t){return Ke(re,t,e)}function Yt(){return re.map(e=>({label:qe[e],value:e}))}function Bt(e){return e==="contain"?"object-contain":"object-cover"}function M(e,t){return e!=="auto"&&t==="cover"}var Ve=P.map(e=>e.image).filter(e=>e!==I),R=e=>S(e)?I:e,p="fill",Xt={label:"Fill row",value:p,showWhen:K},D="4/3",ie={frame:"view-wide:h-full view-wide:min-h-[240px]",img:"view-wide:absolute view-wide:inset-0",figure:"view-wide:h-full"},le={all:{frame:"h-full min-h-[240px]",img:"absolute inset-0",figure:"h-full"},wide:ie,tablet:ie,desktop:{frame:"view-desktop:h-full view-desktop:min-h-[240px] max-view-desktop:aspect-[4/3]",img:"view-desktop:absolute view-desktop:inset-0",figure:"view-desktop:h-full"}};function jt(e,t,s){return t&&!v(s)?"all":e??"wide"}function oe(e){return le[e]}var zt=le.all;function ce(e){return e?`${e.img} h-full w-full`:"relative h-full w-full"}var Xe={auto:"","3/4":"aspect-[3/4]","2/1":"aspect-[2/1]","21/9":"aspect-[21/9]","16/9":"aspect-[16/9]","4/3":"aspect-[4/3]","16/10":"aspect-[16/10]","1/1":"aspect-square","9/16":"aspect-[9/16]","2/3":"aspect-[2/3]","4/5":"aspect-[4/5]",custom:"aspect-[var(--shape-ratio)]"},je={auto:"","3/4":"view-wide:aspect-[3/4]","2/1":"view-wide:aspect-[2/1]","21/9":"view-wide:aspect-[21/9]","16/9":"view-wide:aspect-[16/9]","4/3":"view-wide:aspect-[4/3]","16/10":"view-wide:aspect-[16/10]","1/1":"view-wide:aspect-square","9/16":"view-wide:aspect-[9/16]","2/3":"view-wide:aspect-[2/3]","4/5":"view-wide:aspect-[4/5]",custom:"view-wide:aspect-[var(--shape-ratio)]"},ze={auto:"","3/4":"max-view-wide:aspect-[3/4]","2/1":"max-view-wide:aspect-[2/1]","21/9":"max-view-wide:aspect-[21/9]","16/9":"max-view-wide:aspect-[16/9]","4/3":"max-view-wide:aspect-[4/3]","16/10":"max-view-wide:aspect-[16/10]","1/1":"max-view-wide:aspect-square","9/16":"max-view-wide:aspect-[9/16]","2/3":"max-view-wide:aspect-[2/3]","4/5":"max-view-wide:aspect-[4/5]",custom:"max-view-wide:aspect-[var(--shape-ratio-phone)]"},Ue={auto:"max-view-wide:aspect-auto!","3/4":"max-view-wide:aspect-[3/4]!","2/1":"max-view-wide:aspect-[2/1]!","21/9":"max-view-wide:aspect-[21/9]!","16/9":"max-view-wide:aspect-[16/9]!","4/3":"","16/10":"max-view-wide:aspect-[16/10]!","1/1":"max-view-wide:aspect-square!","9/16":"max-view-wide:aspect-[9/16]!","2/3":"max-view-wide:aspect-[2/3]!","4/5":"max-view-wide:aspect-[4/5]!",custom:"max-view-wide:aspect-[var(--shape-ratio-phone)]!"},$=e=>Ve.includes(e)||S(e),v=$;function Ut(e){let t=$(e)?S(e)?X(e):P.find(s=>s.image===e)?.ratio:null;return t?j(t):null}function Zt(e,t){return z({desktop:e,phone:t})}function Jt(e,t,s){return s==="contain"?!0:[e,t??e].every(a=>a!==p&&(!$(a)||a==="auto"))}function Qt(e,t){return e===p&&!t?D:e}function es(e){return e===p?D:v(e)?e:void 0}function ue(e,t){return v(t)?t===e?null:t:e===p?D:null}function Ze(e,t){let s=ue(e,t);return M(e,"cover")||s!==null&&M(s,"cover")}function Je(e,t,s){return F(e,"cover")==="cover"&&Ze(t,s)}function ts(e,t,s,a){return e==="desktop"?Je(t,s,a):F(t,"cover")!=="cover"?!1:Qe(e==="tablet"?s:ue(s,a)??s)}var Qe=e=>e===p||v(e)&&e!=="auto";function ss(e,t,s="wide"){return e===p&&s==="all"?oe("all").frame:t===null?v(e)?Xe[R(e)]:"":[e===p?oe(s).frame:v(e)?je[R(e)]:"",e===p&&s==="desktop"?Ue[R(t)]:ze[R(t)]].filter(Boolean).join(" ")}var T=et(null);function us({attrs:e,style:t,children:s}){return E(T.Provider,{value:{attrs:e,style:t},children:s})}function he({children:e}){return E(T.Provider,{value:null,children:e})}function ms({fill:e=null,children:t}){let s=fe(T);return s?E("div",{className:ce(e),...s.attrs,style:s.style,children:t}):E(pe,{children:t})}var L="data-sf-mark";function de(e){let t=e.getBoundingClientRect(),s=e.firstElementChild,a=s&&typeof s.offsetWidth=="number"?s:e,n=Math.max(a.offsetWidth,e.offsetWidth),r=Math.max(a.offsetHeight,e.offsetHeight);return{left:t.left+t.width/2-n/2,top:t.top+t.height/2-r/2,width:n,height:r}}function nt(e){return e.closest(`[${L}]`)||e.closest("style, script")?!1:[...e.childNodes].some(t=>t.nodeType===3&&(t.textContent??"").trim()!=="")}var we=e=>e.closest(`.${se}`)??e.ownerDocument.body;function rt(e,t){let s=we(e),a=[];for(let n of s.querySelectorAll(`[${L}]`))n!==e&&a.push({rect:de(n),mark:!0});for(let n of s.querySelectorAll("*")){if(n.contains(e)||!nt(n))continue;let r=n.getBoundingClientRect();r.width===0||r.height===0||a.push({rect:{left:r.left,top:r.top,width:r.width,height:r.height},mark:!1})}return ne(de(e),a,t)}function ds({inCell:e=!1,children:t}){let s=fe(T),a=st(null),[n,r]=at(null),i=s?Number.parseFloat(String(s.style[me])):Number.NaN;if(tt(()=>{let l=a.current;if(!l||!Number.isFinite(i))return;let h=()=>r(rt(l,i));h();let w=l.ownerDocument.defaultView?.ResizeObserver;if(!w)return;let u=new w(h),_=we(l);u.observe(l),u.observe(_);for(let g of _.querySelectorAll(`[${L}]`))g!==l&&u.observe(g);return()=>u.disconnect()},[i]),!s)return E(pe,{children:t});let o=Number.isFinite(i)?{...s.style,[me]:String(n??1)}:s.style;return E("span",{ref:a,className:e?"inline-flex min-w-0 max-w-full items-center justify-center":"inline-flex items-center justify-center",[L]:"",...s.attrs,style:o,children:t})}var ge={stretchedRow:!1,fillingColumn:!1},c=W(null),ve=()=>d(c)!==null;function _s({line:e,draw:t}){return m(it,{children:t(b(e,ve()))})}var Cs=(e="by-box")=>b(e,ve()),bs=()=>d(c),As=()=>d(c)?.id??null,f=W(!1);function ot(){let e=d(c)?.stretchedRow===!0,t=d(f);return e&&!t}var lt=()=>d(f);function ct(){let e=d(c),t=ot(),s=lt();return{fill:s?` ${Q}`:"",inner:a=>{let n=t||s?m(f.Provider,{value:!0,children:a}):a;return e?.columnsRow?m(c.Provider,{value:{...e,columnsRow:!1},children:n}):n}}}function xs({className:e,style:t,attrs:s,children:a}){let{fill:n,inner:r}=ct(),i=Y();return i.scope(m("div",{className:B(`${e}${n}`,i.className),...t?{style:t}:{},...s,...i.attrs,children:r(a)}))}var G=W(!1);function Ns({children:e}){return m(G.Provider,{value:!0,children:m(f.Provider,{value:!0,children:e})})}function Ss({children:e,ownPictures:t=!1}){let s=d(c),a=d(G),n=d(f),r=a&&n,i=s===null?null:s.id===void 0?ge:{...ge,id:s.id};return m(c.Provider,{value:i,children:m(G.Provider,{value:!1,children:m(f.Provider,{value:r,children:t?e:m(he,{children:e})})})})}var k=_e(null),Ee="data-sf-view-hide",Ce=e=>x(k.Provider,{value:null},e),be={className:"",attrs:{},scope:Ce},ut=be,Ae=_e(null),Ps=(e,t)=>e?{className:e,views:t}:null,mt=e=>x(k.Provider,{value:null},x(Ae.Provider,{value:null},x(f.Provider,{value:!0},e))),Is=(e,t,s={})=>e?{className:e,words:t,...s}:null,xe=(e,t)=>e.sectionClassName===void 0?{className:e.className,words:e.words}:b(e.line??"by-box",t)?{className:e.className,words:`${e.words} edge`}:{className:e.sectionClassName,words:e.words};function Y(){let e=N(k),t=N(Ae),s=N(c)!==null;if(e===null&&t===null)return ut;let a=e===null?null:xe(e,s);return t===null?{className:a.className,attrs:{[Ee]:a.words},scope:Ce}:{className:a?`${a.className} ${t.className}`:t.className,attrs:{...a?{[Ee]:a.words}:{},[ee]:t.views},scope:mt}}function Os(){let e=N(k),t=N(c)!==null;return e===null?"":xe(e,t).className}var B=(e,t)=>t?e?`${e} ${t}`:t:e;function Hs(e){let t=Y(),s=e.takes===!1?be:t,a={},n=!1;for(let[r,i]of Object.entries(e))r==="as"||r==="takes"||r==="children"||(r==="className"?(a.className=B(i,s.className),n=!0):a[r]=i);return!n&&s.className&&(a.className=s.className),s.scope(x(e.as??"div",{...a,...s.attrs},e.children))}var Ms={small:54,medium:66,large:84},dt=44,pt=16,ft=140,Ds={min:pt,max:ft,step:1},$s=dt*4;import{forwardRef as ht}from"react";import{imageCopyUrl as Ne,imageSrcSet as Se}from"efficient-shell/image-copies";import{jsx as vt}from"react/jsx-runtime";var wt={position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,color:"transparent"};function ye(e,t,s){if(s){let a=Se(e);return a?{src:Ne(e,1280),srcSet:a,sizes:s}:{src:e,sizes:s}}if(t&&t>0){let a=Se(e,{maxWidth:t*3});return a?{src:Ne(e,t*2),srcSet:a,sizes:`${t}px`}:{src:e}}return{src:e}}var gt=ht(function({src:t,width:s,height:a,fill:n,priority:r,loading:i,style:o,quality:l,placeholder:h,blurDataURL:w,unoptimized:u,loader:_,overrideSrc:g,sizes:C,...Re},Le){let Te=g??(typeof t=="string"?t:t.src),ke=ye(Te,n?void 0:Number(s)||void 0,C??(n?"100vw":void 0));return vt("img",{ref:Le,...ke,width:n?void 0:s,height:n?void 0:a,loading:r?"eager":i??"lazy",fetchPriority:r?"high":void 0,decoding:"async",style:n?{...wt,...o}:{color:"transparent",...o},...Re})}),Ws=gt;function Ks(e){let t=e.overrideSrc??(typeof e.src=="string"?e.src:e.src.src),s=e.fill?void 0:Number(e.width)||void 0;return{props:ye(t,s,e.sizes??(e.fill?"100vw":void 0))}}export{A as a,O as b,De as c,se as d,H as e,Be as f,Ht as g,Ft as h,qe as i,Gt as j,F as k,Yt as l,Bt as m,p as n,Xt as o,jt as p,oe as q,zt as r,ce as s,Ut as t,Zt as u,Jt as v,Qt as w,es as x,ue as y,Ze as z,Je as A,ts as B,ss as C,us as D,he as E,ms as F,ds as G,k as H,be as I,Ae as J,Ps as K,Is as L,Y as M,Os as N,B as O,Hs as P,c as Q,_s as R,Cs as S,bs as T,As as U,f as V,ot as W,lt as X,ct as Y,xs as Z,Ns as _,Ss as $,Ms as aa,dt as ba,pt as ca,Ds as da,$s as ea,Ws as fa,Ks as ga,_t as ha,te as ia,Fe as ja,Me as ka,At as la,xt as ma,Nt as na};
@@ -1,4 +1,4 @@
1
- import{f as fs,g as hs}from"./chunk-ESKHLPB5.js";import{a as T,b as Sr}from"./chunk-Y6SLVHK3.js";var Sn=T((ud,Ds)=>{"use strict";function Iu(i,e){this.v=i,this.k=e}function ps(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,r=Array(e);t<e;t++)r[t]=i[t];return r}function Lu(i){if(Array.isArray(i))return i}function Du(i,e){var t=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var r,n,s,o,l=[],a=!0,h=!1;try{if(s=(t=t.call(i)).next,e===0){if(Object(t)!==t)return;a=!1}else for(;!(a=(r=s.call(t)).done)&&(l.push(r.value),l.length!==e);a=!0);}catch(f){h=!0,n=f}finally{try{if(!a&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(h)throw n}}return l}}function Ru(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{f as fs,g as hs}from"./chunk-SI2DLHOL.js";import{a as T,b as Sr}from"./chunk-Y6SLVHK3.js";var Sn=T((ud,Ds)=>{"use strict";function Iu(i,e){this.v=i,this.k=e}function ps(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,r=Array(e);t<e;t++)r[t]=i[t];return r}function Lu(i){if(Array.isArray(i))return i}function Du(i,e){var t=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var r,n,s,o,l=[],a=!0,h=!1;try{if(s=(t=t.call(i)).next,e===0){if(Object(t)!==t)return;a=!1}else for(;!(a=(r=s.call(t)).done)&&(l.push(r.value),l.length!==e);a=!0);}catch(f){h=!0,n=f}finally{try{if(!a&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(h)throw n}}return l}}function Ru(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nu(i,e){return Lu(i)||Du(i,e)||ku(i,e)||Ru()}function ku(i,e){if(i){if(typeof i=="string")return ps(i,e);var t={}.toString.call(i).slice(8,-1);return t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set"?Array.from(i):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ps(i,e):void 0}}function br(i){var e,t;function r(s,o){try{var l=i[s](o),a=l.value,h=a instanceof Iu;Promise.resolve(h?a.v:a).then(function(f){if(h){var _=s==="return"&&a.k?s:"next";if(!a.k||f.done)return r(_,f);f=i[_](f).value}n(!!l.done,f)},function(f){r("throw",f)})}catch(f){n(2,f)}}function n(s,o){s===2?e.reject(o):e.resolve({value:o,done:s}),(e=e.next)?r(e.key,e.arg):t=null}this._invoke=function(s,o){return new Promise(function(l,a){var h={key:s,arg:o,resolve:l,reject:a,next:null};t?t=t.next=h:(e=t=h,r(s,o))})},typeof i.return!="function"&&(this.return=void 0)}br.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},br.prototype.next=function(i){return this._invoke("next",i)},br.prototype.throw=function(i){return this._invoke("throw",i)},br.prototype.return=function(i){return this._invoke("return",i)};var xs=Object.entries,ds=Object.setPrototypeOf,Mu=Object.isFrozen,Fu=Object.getPrototypeOf,qu=Object.getOwnPropertyDescriptor,J=Object.freeze,re=Object.seal,vt=Object.create,Cs=typeof Reflect<"u"&&Reflect,vn=Cs.apply,wn=Cs.construct;J||(J=function(e){return e});re||(re=function(e){return e});vn||(vn=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),s=2;s<r;s++)n[s-2]=arguments[s];return e.apply(t,n)});wn||(wn=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return new e(...r)});var Ge=X(Array.prototype.forEach);Array.prototype.indexOf;var ju=X(Array.prototype.lastIndexOf),ms=X(Array.prototype.pop),kt=X(Array.prototype.push);Array.prototype.slice;var Uu=X(Array.prototype.splice),wt=Array.isArray,qt=X(String.prototype.toLowerCase),pn=X(String.prototype.toString),gs=X(String.prototype.match),Mt=X(String.prototype.replace),ys=X(String.prototype.indexOf),Bu=X(String.prototype.trim),zu=X(Number.prototype.toString),Wu=X(Boolean.prototype.toString),_s=typeof BigInt>"u"?null:X(BigInt.prototype.toString),vs=typeof Symbol>"u"?null:X(Symbol.prototype.toString),ue=X(Object.prototype.hasOwnProperty),Ft=X(Object.prototype.toString),oe=X(RegExp.prototype.test),ke=Hu(TypeError);function X(i){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return vn(i,e,r)}}function Hu(i){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return wn(i,t)}}function D(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:qt;if(ds&&ds(i,null),!wt(e))return i;let r=e.length;for(;r--;){let n=e[r];if(typeof n=="string"){let s=t(n);s!==n&&(Mu(e)||(e[r]=s),n=s)}i[n]=!0}return i}function Gu(i){for(let e=0;e<i.length;e++)ue(i,e)||(i[e]=null);return i}function he(i){let e=vt(null);for(let r of xs(i)){var t=Nu(r,2);let n=t[0],s=t[1];ue(i,n)&&(wt(s)?e[n]=Gu(s):s&&typeof s=="object"&&s.constructor===Object?e[n]=he(s):e[n]=s)}return e}function Yu(i){switch(typeof i){case"string":return i;case"number":return zu(i);case"boolean":return Wu(i);case"bigint":return _s?_s(i):"0";case"symbol":return vs?vs(i):"Symbol()";case"undefined":return Ft(i);case"function":case"object":{if(i===null)return Ft(i);let e=i,t=me(e,"toString");if(typeof t=="function"){let r=t(e);return typeof r=="string"?r:Ft(r)}return Ft(i)}default:return Ft(i)}}function me(i,e){for(;i!==null;){let r=qu(i,e);if(r){if(r.get)return X(r.get);if(typeof r.value=="function")return X(r.value)}i=Fu(i)}function t(){return null}return t}function $u(i){try{return oe(i,""),!0}catch{return!1}}var ws=J(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),dn=J(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),mn=J(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Vu=J(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),gn=J(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Qu=J(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ss=J(["#text"]),bs=J(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),yn=J(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ts=J(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Tr=J(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Xu=re(/{{[\w\W]*|^[\w\W]*}}/g),Ku=re(/<%[\w\W]*|^[\w\W]*%>/g),Ju=re(/\${[\w\W]*/g),Zu=re(/^data-[\-\w.\u00B7-\uFFFF]+$/),el=re(/^aria-[\-\w]+$/),Es=re(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),tl=re(/^(?:\w+script|data):/i),rl=re(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),nl=re(/^html$/i),il=re(/^[a-z][.\w]*(-[.\w]+)+$/i),Os=re(/<[/\w!]/g),As=re(/<[/\w]/g),sl=re(/<\/no(script|embed|frames)/i),ol=re(/\/>/i),fe={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Is=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],al=J(D({},Is)),ul=(function(){let i={};return Ge(Is,e=>{i[e]=re(new RegExp("</"+e+"(?=[\\t\\n\\f\\r />])","i"))}),J(i)})(),ll=function(){return typeof window>"u"?null:window},cl=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null,n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(r=t.getAttribute(n));let s="dompurify"+(r?"#"+r:"");try{return e.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},Ps=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Me=function(e,t,r,n){return ue(e,t)&&wt(e[t])?D(n.base?he(n.base):{},e[t],n.transform):r},_n=function(e,t,r){let n=ue(e,t)?e[t]:void 0;return n&&typeof n=="object"?he(n):r()};function Ls(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ll(),e=y=>Ls(y);if(e.version="3.4.16",e.removed=[],!i||!i.document||i.document.nodeType!==fe.document||!i.Element)return e.isSupported=!1,e;let t=i.document,r=t,n=r.currentScript;i.DocumentFragment;let s=i.HTMLTemplateElement,o=i.Node,l=i.Element,a=i.NodeFilter;i.NamedNodeMap===void 0&&(i.NamedNodeMap||i.MozNamedAttrMap),i.HTMLFormElement;let h=i.DOMParser,f=i.trustedTypes,_=l.prototype,p=me(_,"cloneNode"),d=me(_,"remove"),v=me(_,"removeAttributeNode"),x=me(_,"nextSibling"),E=me(_,"childNodes"),U=me(_,"parentNode"),Y=me(_,"shadowRoot"),K=me(_,"attributes"),k=o&&o.prototype?me(o.prototype,"nodeType"):null,V=o&&o.prototype?me(o.prototype,"nodeName"):null,Q=o&&o.prototype?me(o.prototype,"ownerDocument"):null,ee=function(u){return k?k(u):u.nodeType},Se=function(u){return V?V(u):u.nodeName};if(typeof s=="function"){let y=t.createElement("template");y.content&&y.content.ownerDocument&&(t=y.content.ownerDocument)}let te,pe="",Lt,ar=!1,Be=0,Ni=function(){if(Be>0)throw ke('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},ct=function(u){Ni(),Be++;try{return te.createHTML(u)}finally{Be--}},ru=function(u){Ni(),Be++;try{return te.createScriptURL(u)}finally{Be--}},nu=function(){return ar||(Lt=cl(f,n),ar=!0),Lt},ur=t,Xr=ur.implementation,ki=ur.createNodeIterator,iu=ur.createDocumentFragment,su=ur.getElementsByTagName,ou=r.importNode,B=Ps();e.isSupported=typeof xs=="function"&&typeof U=="function"&&Xr&&Xr.createHTMLDocument!==void 0;let au=Xu,uu=Ku,lu=Ju,cu=Zu,fu=el,hu=tl,Mi=rl,pu=il,Fi=Es,z=null,Kr=D({},[...ws,...dn,...mn,...gn,...Ss]),W=null,Jr=D({},[...bs,...yn,...Ts,...Tr]),be=Object.seal(vt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Dt=null,qi=null,De=Object.seal(vt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ji=!0,Zr=!0,Ui=!1,Bi=!0,Re=!1,ze=!0,We=!1,en=!1,lr=null,cr=null,tn=!1,ft=!1,fr=!1,hr=!1,zi=!0,Wi=!1,Hi="user-content-",rn=!0,nn=!1,ht={},pt=null,Gi=D({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),Yi=null,$i=D({},["audio","video","img","source","image","track"]),Vi=null,Qi=D({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pr="http://www.w3.org/1998/Math/MathML",dr="http://www.w3.org/2000/svg",Te="http://www.w3.org/1999/xhtml",dt=Te,sn=!1,on=null,du=D({},[pr,dr,Te],pn),Xi=J(["mi","mo","mn","ms","mtext"]),an=D({},Xi),Ki=J(["annotation-xml"]),un=D({},Ki),mu=D({},["title","style","font","a","script"]),Rt=null,gu=["application/xhtml+xml","text/html"],yu="text/html",$=null,mt=null,_u=t.createElement("form"),Ji=function(u){return u instanceof RegExp||u instanceof Function},ln=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(mt&&mt===u)return;(!u||typeof u!="object")&&(u={}),u=he(u),Rt=gu.indexOf(u.PARSER_MEDIA_TYPE)===-1?yu:u.PARSER_MEDIA_TYPE,$=Rt==="application/xhtml+xml"?pn:qt,z=Me(u,"ALLOWED_TAGS",Kr,{transform:$}),W=Me(u,"ALLOWED_ATTR",Jr,{transform:$}),on=Me(u,"ALLOWED_NAMESPACES",du,{transform:pn}),Vi=Me(u,"ADD_URI_SAFE_ATTR",Qi,{transform:$,base:Qi}),Yi=Me(u,"ADD_DATA_URI_TAGS",$i,{transform:$,base:$i}),pt=Me(u,"FORBID_CONTENTS",Gi,{transform:$}),Dt=Me(u,"FORBID_TAGS",he({}),{transform:$}),qi=Me(u,"FORBID_ATTR",he({}),{transform:$}),ht=ue(u,"USE_PROFILES")?u.USE_PROFILES&&typeof u.USE_PROFILES=="object"?he(u.USE_PROFILES):u.USE_PROFILES:!1,ji=u.ALLOW_ARIA_ATTR!==!1,Zr=u.ALLOW_DATA_ATTR!==!1,Ui=u.ALLOW_UNKNOWN_PROTOCOLS||!1,Bi=u.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Re=u.SAFE_FOR_TEMPLATES||!1,ze=u.SAFE_FOR_XML!==!1,We=u.WHOLE_DOCUMENT||!1,ft=u.RETURN_DOM||!1,fr=u.RETURN_DOM_FRAGMENT||!1,hr=u.RETURN_TRUSTED_TYPE||!1,tn=u.FORCE_BODY||!1,zi=u.SANITIZE_DOM!==!1,Wi=u.SANITIZE_NAMED_PROPS||!1,rn=u.KEEP_CONTENT!==!1,nn=u.IN_PLACE||!1,Fi=$u(u.ALLOWED_URI_REGEXP)?u.ALLOWED_URI_REGEXP:Es,dt=typeof u.NAMESPACE=="string"?u.NAMESPACE:Te,an=_n(u,"MATHML_TEXT_INTEGRATION_POINTS",()=>D({},Xi)),un=_n(u,"HTML_INTEGRATION_POINTS",()=>D({},Ki));let c=_n(u,"CUSTOM_ELEMENT_HANDLING",()=>vt(null));if(be=vt(null),ue(c,"tagNameCheck")&&Ji(c.tagNameCheck)&&(be.tagNameCheck=c.tagNameCheck),ue(c,"attributeNameCheck")&&Ji(c.attributeNameCheck)&&(be.attributeNameCheck=c.attributeNameCheck),ue(c,"allowCustomizedBuiltInElements")&&typeof c.allowCustomizedBuiltInElements=="boolean"&&(be.allowCustomizedBuiltInElements=c.allowCustomizedBuiltInElements),re(be),Re&&(Zr=!1),fr&&(ft=!0),ht&&(z=D({},Ss),W=vt(null),ht.html===!0&&(D(z,ws),D(W,bs)),ht.svg===!0&&(D(z,dn),D(W,yn),D(W,Tr)),ht.svgFilters===!0&&(D(z,mn),D(W,yn),D(W,Tr)),ht.mathMl===!0&&(D(z,gn),D(W,Ts),D(W,Tr))),De.tagCheck=null,De.attributeCheck=null,ue(u,"ADD_TAGS")&&(typeof u.ADD_TAGS=="function"?De.tagCheck=u.ADD_TAGS:wt(u.ADD_TAGS)&&(z===Kr&&(z=he(z)),D(z,u.ADD_TAGS,$))),ue(u,"ADD_ATTR")&&(typeof u.ADD_ATTR=="function"?De.attributeCheck=u.ADD_ATTR:wt(u.ADD_ATTR)&&(W===Jr&&(W=he(W)),D(W,u.ADD_ATTR,$))),ue(u,"ADD_FORBID_CONTENTS")&&wt(u.ADD_FORBID_CONTENTS)&&(pt===Gi&&(pt=he(pt)),D(pt,u.ADD_FORBID_CONTENTS,$)),rn&&(z["#text"]=!0),We&&D(z,["html","head","body"]),z.table&&(D(z,["tbody"]),delete Dt.tbody),u.TRUSTED_TYPES_POLICY){if(typeof u.TRUSTED_TYPES_POLICY.createHTML!="function")throw ke('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof u.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ke('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let g=te;te=u.TRUSTED_TYPES_POLICY;try{pe=ct("")}catch(w){throw te=g,w}}else u.TRUSTED_TYPES_POLICY===null?(te=void 0,pe=""):(te===void 0&&(te=nu()),te&&typeof pe=="string"&&(pe=ct("")));J&&J(u),mt=u},Zi=D({},[...dn,...mn,...Vu]),es=D({},[...gn,...Qu]),vu=function(u,c,g){return c.namespaceURI===Te?u==="svg":c.namespaceURI===pr?u==="svg"&&(g==="annotation-xml"||an[g]):!!Zi[u]},wu=function(u,c,g){return c.namespaceURI===Te?u==="math":c.namespaceURI===dr?u==="math"&&un[g]:!!es[u]},Su=function(u,c,g){return c.namespaceURI===dr&&!un[g]||c.namespaceURI===pr&&!an[g]?!1:!es[u]&&(mu[u]||!Zi[u])},bu=function(u){let c=U(u);(!c||!c.tagName)&&(c={namespaceURI:dt,tagName:"template"});let g=qt(u.tagName),w=qt(c.tagName);return on[u.namespaceURI]?u.namespaceURI===dr?vu(g,c,w):u.namespaceURI===pr?wu(g,c,w):u.namespaceURI===Te?Su(g,c,w):!!(Rt==="application/xhtml+xml"&&on[u.namespaceURI]):!1},Ne=function(u){kt(e.removed,{element:u});try{U(u).removeChild(u)}catch{if(d(u),!U(u))throw ke("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},ts=function(u,c,g){try{v(u,c)}catch{try{u.removeAttribute(g)}catch{}}},mr=function(u){gr(u);let c=E(u);if(c){let w=[];Ge(c,A=>{kt(w,A)}),Ge(w,A=>{try{d(A)}catch{}})}let g=K(u);if(g)for(let w=g.length-1;w>=0;--w){let A=g[w],C=A&&A.name;typeof C=="string"&&ts(u,A,C)}},He=function(u,c,g){if(!g)try{g=c.getAttributeNode(u)}catch{g=null}kt(e.removed,{attribute:g||null,from:c});try{g?v(c,g):c.removeAttribute(u)}catch{try{c.removeAttribute(u)}catch{}}if(u==="is")if(ft||fr)try{Ne(c)}catch{}else try{c.setAttribute(u,"")}catch{}},Tu=function(u){let c=K(u);if(c)for(let g=c.length-1;g>=0;--g){let w=c[g],A=w&&w.name;typeof A!="string"||W[$(A)]||ts(u,w,A)}},gr=function(u){let c=[u];for(;c.length>0;){let g=c.pop();ee(g)===fe.element&&Tu(g);let w=E(g);if(w)for(let A=w.length-1;A>=0;--A)c.push(w[A])}},rs=function(u,c){return ze?u==="patchsrc"?!0:u==="for"&&c!=="label"&&c!=="output":!1},Eu=function(u){if(!ze)return;let c=[u];for(;c.length>0;){let g=c.pop(),w=ee(g);if(w===fe.processingInstruction||w===fe.comment&&oe(As,g.data)){try{d(g)}catch{}continue}if(w===fe.element){let C=g,L=$(Se(g));try{C.hasAttribute&&C.hasAttribute("patchsrc")&&C.removeAttribute("patchsrc"),C.hasAttribute&&C.hasAttribute("for")&&rs("for",L)&&C.removeAttribute("for")}catch{}}let A=E(g);if(A)for(let C=A.length-1;C>=0;--C)c.push(A[C])}},ns=function(u){let c=null,g=null;if(tn)u="<remove></remove>"+u;else{let C=gs(u,/^[\r\n\t ]+/);g=C&&C[0]}Rt==="application/xhtml+xml"&&dt===Te&&(u='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+u+"</body></html>");let w=te?ct(u):u;if(dt===Te)try{c=new h().parseFromString(w,Rt)}catch{}if(!c||!c.documentElement){c=Xr.createDocument(dt,"template",null);try{c.documentElement.innerHTML=sn?pe:w}catch{}}let A=c.body||c.documentElement;return u&&g&&A.insertBefore(t.createTextNode(g),A.childNodes[0]||null),dt===Te?su.call(c,We?"html":"body")[0]:We?c.documentElement:A},is=function(u){let c=Q?Q(u):u.ownerDocument;return ki.call(c||u,u,a.SHOW_ELEMENT|a.SHOW_COMMENT|a.SHOW_TEXT|a.SHOW_PROCESSING_INSTRUCTION|a.SHOW_CDATA_SECTION,null)},yr=function(u){return u=Mt(u,au," "),u=Mt(u,uu," "),u=Mt(u,lu," "),u},cn=function(u){var c;u.normalize();let g=Q?Q(u):u.ownerDocument,w=ki.call(g||u,u,a.SHOW_TEXT|a.SHOW_COMMENT|a.SHOW_CDATA_SECTION|a.SHOW_PROCESSING_INSTRUCTION,null),A=w.nextNode();for(;A;)A.data=yr(A.data),A=w.nextNode();let C=(c=u.querySelectorAll)===null||c===void 0?void 0:c.call(u,"template");C&&Ge(C,L=>{gt(L.content)&&cn(L.content)})},_r=function(u){let c=V?V(u):null;return typeof c!="string"||$(c)!=="form"?!1:typeof u.nodeName!="string"||typeof u.textContent!="string"||typeof u.removeChild!="function"||u.attributes!==K(u)||typeof u.removeAttribute!="function"||typeof u.removeAttributeNode!="function"||typeof u.getAttributeNode!="function"||typeof u.setAttribute!="function"||typeof u.namespaceURI!="string"||typeof u.insertBefore!="function"||typeof u.hasChildNodes!="function"||u.nodeType!==k(u)||u.childNodes!==E(u)},gt=function(u){if(!k||typeof u!="object"||u===null)return!1;try{return k(u)===fe.documentFragment}catch{return!1}},Nt=function(u){if(!k||typeof u!="object"||u===null)return!1;try{return typeof k(u)=="number"}catch{return!1}};function Ee(y,u,c){y.length!==0&&Ge(y,g=>{g.call(e,u,c,mt)})}let Ou=function(u,c){return!!(ze&&u.hasChildNodes()&&!Nt(u.firstElementChild)&&oe(Os,u.textContent)&&oe(Os,u.innerHTML)||ze&&u.namespaceURI===Te&&al[c]&&(Nt(u.firstElementChild)||typeof u.textContent=="string"&&oe(ul[c],u.textContent))||u.nodeType===fe.processingInstruction||ze&&u.nodeType===fe.comment&&oe(As,u.data))},vr=function(u,c){if(u instanceof RegExp)return oe(u,c);if(u instanceof Function){for(var g=arguments.length,w=new Array(g>2?g-2:0),A=2;A<g;A++)w[A-2]=arguments[A];return!!u(c,...w)}return!1},Au=function(u,c,g){if(!Dt[c]&&us(c)&&vr(be.tagNameCheck,c))return!1;if(rn&&!pt[c]){let w=U(u),A=E(u);if(A&&w){let C=A.length;for(let L=C-1;L>=0;--L){let G=u===g?p(A[L],!0):A[L];w.insertBefore(G,x(u))}}}return Ne(u),!0},ss=function(u,c,g,w){return u.length===0?c:c===g||c===w?he(c):c},yt=function(u,c){return u===c||U(u)!==null?!1:(nn&&gr(u),!0)},os=function(u,c){if(Ee(B.beforeSanitizeElements,u,null),yt(u,c))return!0;if(_r(u))return Ne(u),!0;let g=$(Se(u));if(z=ss(B.uponSanitizeElement,z,Kr,lr),Ee(B.uponSanitizeElement,u,{tagName:g,allowedTags:z}),yt(u,c))return!0;if(Ou(u,g))return Ne(u),!0;if(Dt[g]||!(De.tagCheck instanceof Function&&De.tagCheck(g))&&!z[g]){let w=Au(u,g,c);return w===!1&&(Ee(B.afterSanitizeElements,u,null),yt(u,c))?!0:w}if(ee(u)===fe.element&&!bu(u)||(g==="noscript"||g==="noembed"||g==="noframes")&&oe(sl,u.innerHTML))return Ne(u),!0;if(Re&&u.nodeType===fe.text){let w=yr(u.textContent);u.textContent!==w&&(kt(e.removed,{element:u.cloneNode()}),u.textContent=w)}return Ee(B.afterSanitizeElements,u,null),yt(u,c)},as=function(u,c,g){if(qi[c]||rs(c,u)||zi&&(c==="id"||c==="name")&&(g in t||g in _u))return!1;let w=W[c]||De.attributeCheck instanceof Function&&De.attributeCheck(c,u);return Zr&&oe(cu,c)||ji&&oe(fu,c)?!0:w?Vi[c]||oe(Fi,Mt(g,Mi,""))||(c==="src"||c==="xlink:href"||c==="href")&&u!=="script"&&ys(g,"data:")===0&&Yi[u]||Ui&&!oe(hu,Mt(g,Mi,""))?!0:!g:us(u)&&vr(be.tagNameCheck,u)&&vr(be.attributeNameCheck,c,u)||c==="is"&&be.allowCustomizedBuiltInElements&&vr(be.tagNameCheck,g)},Pu=D({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),us=function(u){return!Pu[qt(u)]&&oe(pu,u)},xu=function(u,c,g,w){if(te&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!g)switch(f.getAttributeType(u,c)){case"TrustedHTML":return ct(w);case"TrustedScriptURL":return ru(w)}return w},Cu=function(u,c,g,w){try{return g?u.setAttributeNS(g,c,w):u.setAttribute(c,w),_r(u)?(Ne(u),!1):!0}catch{return He(c,u),!1}},ls=function(u,c){if(Ee(B.beforeSanitizeAttributes,u,null),yt(u,c))return;let g=u.attributes;if(!g||_r(u))return;W=ss(B.uponSanitizeAttribute,W,Jr,cr);let w={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W,forceKeepAttr:void 0},A=g.length,C=$(u.nodeName);for(;A--;){let L=g[A],G=L.name,de=L.namespaceURI,ce=L.value,_t=$(G),hn=ce,ae=G==="value"?hn:Bu(hn),cs=!1;if(w.attrName=_t,w.attrValue=ae,w.keepAttr=!0,w.forceKeepAttr=void 0,Ee(B.uponSanitizeAttribute,u,w),ae=w.attrValue,Wi&&(_t==="id"||_t==="name")&&ys(ae,Hi)!==0&&(He(G,u,L),ae=Hi+ae,cs=!0),ze&&oe(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ae)){He(G,u,L);continue}if(_t==="attributename"&&gs(ae,"href")){He(G,u,L);continue}if(!w.forceKeepAttr){if(!w.keepAttr){He(G,u,L);continue}if(!Bi&&oe(ol,ae)){He(G,u,L);continue}if(Re&&(ae=yr(ae)),!as(C,_t,ae)){He(G,u,L);continue}ae=xu(C,_t,de,ae),ae!==hn&&Cu(u,G,de,ae)&&cs&&ms(e.removed)}}Ee(B.afterSanitizeAttributes,u,null),yt(u,c)},wr=function(u){let c=null,g=is(u);for(Ee(B.beforeSanitizeShadowDOM,u,null);c=g.nextNode();)if(Ee(B.uponSanitizeShadowNode,c,null),os(c,u),ls(c,u),gt(c.content)&&wr(c.content),ee(c)===fe.element){let w=Y(c);gt(w)&&(fn(w),wr(w))}Ee(B.afterSanitizeShadowDOM,u,null)},fn=function(u){let c=[{node:u,shadow:null}];for(;c.length>0;){let g=c.pop();if(g.shadow){wr(g.shadow);continue}let w=g.node,A=ee(w)===fe.element,C=E(w);if(C)for(let L=C.length-1;L>=0;--L)c.push({node:C[L],shadow:null});if(A){let L=V?V(w):null;if(typeof L=="string"&&$(L)==="template"){let G=w.content;gt(G)&&c.push({node:G,shadow:null})}}if(A){let L=Y(w);gt(L)&&c.push({node:null,shadow:L},{node:L,shadow:null})}}};return e.sanitize=function(y){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=null,g=null,w=null,A=null;if(sn=!y,sn&&(y="<!-->"),typeof y!="string"&&!Nt(y)&&(y=Yu(y),typeof y!="string"))throw ke("dirty is not a string, aborting");if(!e.isSupported)return y;en?(z=lr,W=cr):ln(u),(B.uponSanitizeElement.length>0||B.uponSanitizeAttribute.length>0)&&(z=he(z)),B.uponSanitizeAttribute.length>0&&(W=he(W)),e.removed=[];let C=nn&&typeof y!="string"&&Nt(y);if(C){Eu(y);let de=Se(y);if(typeof de=="string"){let ce=$(de);if(!z[ce]||Dt[ce])throw mr(y),ke("root node is forbidden and cannot be sanitized in-place")}if(_r(y))throw mr(y),ke("root node is clobbered and cannot be sanitized in-place");try{fn(y)}catch(ce){throw mr(y),ce}}else if(Nt(y))c=ns("<!---->"),g=c.ownerDocument.importNode(y,!0),g.nodeType===fe.element&&g.nodeName==="BODY"||g.nodeName==="HTML"?c=g:c.appendChild(g),fn(c);else{if(!ft&&!Re&&!We&&y.indexOf("<")===-1)return te&&hr?ct(y):y;if(c=ns(y),!c)return ft?null:hr?pe:""}c&&tn&&Ne(c.firstChild);let L=C?y:c;try{let de=is(L);for(;w=de.nextNode();)os(w,L),ls(w,L),gt(w.content)&&wr(w.content)}catch(de){throw C&&(mr(y),Ge(e.removed,ce=>{ce.element&&gr(ce.element)})),de}if(C){let de=!1;if(Ge(e.removed,ce=>{ce.element&&(ce.element===y&&(de=!0),gr(ce.element))}),de)throw ke("a node selected for removal could not be safely returned; refusing to sanitize in place");return Re&&cn(y),y}if(ft){if(Re&&cn(c),fr)for(A=iu.call(c.ownerDocument);c.firstChild;)A.appendChild(c.firstChild);else A=c;return(W.shadowroot||W.shadowrootmode)&&(A=ou.call(r,A,!0)),A}let G=We?c.outerHTML:c.innerHTML;return We&&z["!doctype"]&&c.ownerDocument&&c.ownerDocument.doctype&&c.ownerDocument.doctype.name&&oe(nl,c.ownerDocument.doctype.name)&&(G="<!DOCTYPE "+c.ownerDocument.doctype.name+`>
3
3
  `+G),Re&&(G=yr(G)),te&&hr?ct(G):G},e.setConfig=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ln(y),en=!0,lr=z,cr=W},e.clearConfig=function(){mt=null,en=!1,lr=null,cr=null,te=Lt,pe=""},e.isValidAttribute=function(y,u,c){mt||ln({});let g=$(y),w=$(u);return as(g,w,c)},e.addHook=function(y,u){typeof u=="function"&&ue(B,y)&&kt(B[y],u)},e.removeHook=function(y,u){if(ue(B,y)){if(u!==void 0){let c=ju(B[y],u);return c===-1?void 0:Uu(B[y],c,1)[0]}return ms(B[y])}},e.removeHooks=function(y){ue(B,y)&&(B[y]=[])},e.removeAllHooks=function(){B=Ps()},e}var fl=Ls();Ds.exports=fl});var Ns=T((ld,bn)=>{"use strict";var P=String,Rs=function(){return{isColorSupported:!1,reset:P,bold:P,dim:P,italic:P,underline:P,inverse:P,hidden:P,strikethrough:P,black:P,red:P,green:P,yellow:P,blue:P,magenta:P,cyan:P,white:P,gray:P,bgBlack:P,bgRed:P,bgGreen:P,bgYellow:P,bgBlue:P,bgMagenta:P,bgCyan:P,bgWhite:P,blackBright:P,redBright:P,greenBright:P,yellowBright:P,blueBright:P,magentaBright:P,cyanBright:P,whiteBright:P,bgBlackBright:P,bgRedBright:P,bgGreenBright:P,bgYellowBright:P,bgBlueBright:P,bgMagentaBright:P,bgCyanBright:P,bgWhiteBright:P}};bn.exports=Rs();bn.exports.createColors=Rs});var Tn=T(()=>{"use strict"});var Er=T((hd,Fs)=>{"use strict";var ks=Ns(),Ms=Tn(),jt=class i extends Error{constructor(e,t,r,n,s,o){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,i)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=ks.isColorSupported);let r=f=>f,n=f=>f,s=f=>f;if(e){let{bold:f,gray:_,red:p}=ks.createColors(!0);n=d=>f(p(d)),r=d=>_(d),Ms&&(s=d=>Ms(d))}let o=t.split(/\r?\n/),l=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),h=String(a).length;return o.slice(l,a).map((f,_)=>{let p=l+1+_,d=" "+(" "+p).slice(-h)+" | ";if(p===this.line){if(f.length>160){let x=20,E=typeof this.endColumn=="number"?this.endColumn:this.column,U=Math.max(0,this.column-x),Y=Math.max(this.column+x,E+x),K=f.slice(U,Y),k=r(d.replace(/\d/g," "))+f.slice(0,Math.min(this.column-1,x-1)).replace(/[^\t]/g," ");return n(">")+r(d)+s(K)+`
4
4
  `+k+n("^")}let v=r(d.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+r(d)+s(f)+`