efficient-storefront-blocks 0.125.3 → 0.125.5

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 (83) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/chunks/{CustomHtmlCodeWindow-VRZ524JP.js → CustomHtmlCodeWindow-HSZVKXL4.js} +1 -1
  3. package/dist/chunks/{EditorPreviewCheckout-OMVFLWD5.js → EditorPreviewCheckout-3ZX2DIIL.js} +1 -1
  4. package/dist/chunks/SiteEditorProvider-6X2YHTVA.js +1 -0
  5. package/dist/chunks/{chunk-PULBLZRR.js → chunk-4WRJWM6K.js} +1 -1
  6. package/dist/chunks/{chunk-TXL5UDD5.js → chunk-5SWY36EZ.js} +1 -1
  7. package/dist/chunks/{chunk-FNCEZSDY.js → chunk-ACYEMD5J.js} +1 -1
  8. package/dist/chunks/chunk-B3U6XXDZ.js +337 -0
  9. package/dist/chunks/chunk-GATK7RJE.js +7 -0
  10. package/dist/chunks/chunk-HKL2EKLO.js +96 -0
  11. package/dist/chunks/{chunk-TVMCJUOE.js → chunk-RGLTNGJH.js} +1 -1
  12. package/dist/chunks/{fitment-data-C2NHZBPR.js → fitment-data-CFDAFXJB.js} +1 -1
  13. package/dist/chunks/{section-css-style-BECHWIDU.js → section-css-style-TKWJ7WU2.js} +1 -1
  14. package/dist/editor/lib/document/blocks/commerce/AccountBlock/fields.js +1 -1
  15. package/dist/editor/lib/document/blocks/commerce/CartBlock/fields.js +1 -1
  16. package/dist/editor/lib/document/blocks/commerce/CountrySwitchBlock/fields.js +1 -1
  17. package/dist/editor/lib/document/blocks/commerce/SearchBlock/fields.js +1 -1
  18. package/dist/editor/lib/document/blocks/commerce/ThemeSwitchBlock/fields.js +1 -1
  19. package/dist/editor/lib/document/blocks/service/ContactRouting/fields.js +1 -1
  20. package/dist/editor/lib/document/blocks/service/Form/fields.js +1 -1
  21. package/dist/editor/lib/storefront-editor-words.d.ts +1 -0
  22. package/dist/editor/lib/storefront-editor-words.js +1 -1
  23. package/dist/editor.css +1 -1
  24. package/dist/index.js +67 -30
  25. package/dist/render/built-with.json +1 -1
  26. package/dist/render/components/AppointmentBooking.js +1 -1
  27. package/dist/render/components/CollectionCard.js +1 -1
  28. package/dist/render/components/Collections.js +1 -1
  29. package/dist/render/components/ContactRouting.d.ts +3 -1
  30. package/dist/render/components/ContactRouting.js +1 -1
  31. package/dist/render/components/Events.js +1 -1
  32. package/dist/render/components/FitmentTable.js +1 -1
  33. package/dist/render/components/FooterMenu.js +1 -1
  34. package/dist/render/components/FooterSection.js +1 -1
  35. package/dist/render/components/FormBlock.d.ts +9 -2
  36. package/dist/render/components/FormBlock.js +1 -1
  37. package/dist/render/components/GalleryGrid.js +3 -3
  38. package/dist/render/components/GalleryItem.js +1 -1
  39. package/dist/render/components/GalleryShowcase.js +1 -1
  40. package/dist/render/components/HeaderToolBlocks.d.ts +11 -5
  41. package/dist/render/components/HeaderToolBlocks.js +1 -1
  42. package/dist/render/components/HeaderTools.d.ts +1 -0
  43. package/dist/render/components/HeaderTools.js +1 -1
  44. package/dist/render/components/PhoneMenuAccount.d.ts +6 -0
  45. package/dist/render/components/PhoneMenuAccount.js +1 -0
  46. package/dist/render/components/PhoneSheet.js +1 -1
  47. package/dist/render/components/ProductGridSection.js +1 -1
  48. package/dist/render/components/ProductHeroPanel.js +1 -1
  49. package/dist/render/components/ReviewForm.js +1 -1
  50. package/dist/render/components/SectionBand.js +1 -1
  51. package/dist/render/components/SectionGroupBody.js +1 -1
  52. package/dist/render/components/SectionNotice.js +1 -1
  53. package/dist/render/components/ThanksCard.d.ts +9 -0
  54. package/dist/render/components/ThanksCard.js +1 -0
  55. package/dist/render/components/pdp-dynamic/DynamicGalleryGrid.js +1 -1
  56. package/dist/render/lib/content/thanks-slot.d.ts +12 -0
  57. package/dist/render/lib/content/thanks-slot.js +1 -0
  58. package/dist/render/lib/document/blocks/commerce/AccountBlock/render.js +1 -1
  59. package/dist/render/lib/document/blocks/commerce/CartBlock/render.js +1 -1
  60. package/dist/render/lib/document/blocks/commerce/CountrySwitchBlock/render.js +1 -1
  61. package/dist/render/lib/document/blocks/commerce/SearchBlock/render.js +1 -1
  62. package/dist/render/lib/document/blocks/commerce/ThemeSwitchBlock/render.js +1 -1
  63. package/dist/render/lib/document/blocks/service/ContactRouting/meta.d.ts +4 -0
  64. package/dist/render/lib/document/blocks/service/ContactRouting/meta.js +1 -1
  65. package/dist/render/lib/document/blocks/service/ContactRouting/render.js +1 -1
  66. package/dist/render/lib/document/blocks/service/Form/meta.d.ts +6 -0
  67. package/dist/render/lib/document/blocks/service/Form/meta.js +1 -1
  68. package/dist/render/lib/document/blocks/service/Form/render.js +1 -1
  69. package/dist/render/lib/document/card-templates.js +1 -1
  70. package/dist/routine-index.json +1 -1
  71. package/dist/value-index.json +1 -1
  72. package/dist/words.d.ts +2 -0
  73. package/dist/words.js +2 -2
  74. package/package.json +2 -2
  75. package/dist/chunks/SiteEditorProvider-OBXLJM7I.js +0 -1
  76. package/dist/chunks/chunk-4KN3VTQU.js +0 -7
  77. package/dist/chunks/chunk-6ABZ7XWF.js +0 -96
  78. package/dist/chunks/chunk-J6SPMJBT.js +0 -337
  79. /package/dist/chunks/{chunk-7UJXVH57.js → chunk-3DCSW3PN.js} +0 -0
  80. /package/dist/chunks/{chunk-EZ5QLDA5.js → chunk-5NGS7VFJ.js} +0 -0
  81. /package/dist/chunks/{chunk-FNCEZSDY.js.LEGAL.txt → chunk-ACYEMD5J.js.LEGAL.txt} +0 -0
  82. /package/dist/chunks/{chunk-UV27QVUD.js → chunk-AEBQM5LZ.js} +0 -0
  83. /package/dist/chunks/{chunk-J6SPMJBT.js.LEGAL.txt → chunk-B3U6XXDZ.js.LEGAL.txt} +0 -0
@@ -0,0 +1,7 @@
1
+ import{b as au,c as su,d as yu,e as Su}from"./chunk-AEBQM5LZ.js";import{$f as Ls,$g as gt,$h as bu,Aa as Sc,Ac as So,Ag as Bs,Ah as cu,Bc as xc,Ca as O,Cb as Tc,Cc as vc,Ce as Lc,Da as go,Dc as wc,Dd as Os,E as mc,Eb as $t,Ec as ws,Fb as Be,Fc as Cc,Ia as Ts,Id as le,If as Mc,Jf as Is,Ka as _c,Kf as Pe,Kg as ht,Kh as Ms,L as j,Ld as Pc,Lf as Uc,Lh as xo,M as he,Mf as Gc,Mg as Jc,Mh as uu,Nf as Kt,Nh as U,Ob as bo,Of as ce,Og as Qc,Qg as eu,Rc as Oc,Rf as jt,Rh as du,Sc as Cs,Sd as kc,Sf as Vt,Sg as tu,Sh as pu,Th as fu,Uh as mu,Vd as Ac,Vf as $c,Wg as nu,Wh as hu,Xg as ou,Ye as To,Yf as Ns,Yh as Xt,Zh as gu,_f as zc,_h as vo,ah as Hs,b as W,ba as Gt,c as Ve,ca as hc,cg as Wc,dg as Kc,dh as ru,ea as ut,ee as Ps,ef as Rs,ga as ho,hc as Ec,i as ic,ka as Tn,kg as jc,l as fo,le as _o,lg as Ds,li as B,m as lc,n as cc,ne as zt,ng as Vc,oa as dt,oc as pt,oe as ft,of as M,og as ae,p as uc,pf as F,pg as Yc,ph as iu,q as dc,qc as Es,qf as Dc,qg as Xc,qi as Tu,r as pc,rc as xs,re as Rc,rf as Wt,rg as ke,se as ks,sf as Fc,sg as Yt,t as mo,tc as yo,te as Ic,tf as Bc,u as fc,uf as mt,va as gc,vf as Hc,vg as qc,vh as lu,wa as bc,we as Nc,wg as Fs,xa as yc,xb as En,xe as As,yf as Ye,yh as Eo,za as _s,zc as vs,zf as Xe,zg as Zc}from"./chunk-HKL2EKLO.js";import{d as _u}from"./chunk-3DCSW3PN.js";var xu="en",wo=null,vu=xu,wu=null;function hI(e,t,n){wo=e??null,vu=t||xu,wu=n??null}function P(){return wu}function gI(){return vu}function bI(){return wo}function Eu(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=wo?j(wo,e):void 0;if(typeof n=="function"){try{let o=W(n(t??{}));if(o)return o}catch{}return Eu(e,t)}return Eu(W(n)??e,t)}function xn(e,t,n,o){return c(n===1?e:t,{...o,n})}import{parseHexColor as Au}from"efficient-shell/format";import{COLOR_SLOTS as Ru,FILL_COLOR_SLOTS as wb,colorRole as Cb,fillColorRole as Iu}from"efficient-shell/markup";import{parseHexColor as Cu}from"efficient-shell/format";import{FILL_COLOR_SLOTS as Tb}from"efficient-shell/markup";var Co=e=>{let t=tu.find(n=>n.role===e);return t?`var(${t.token})`:""},Eb=e=>Co(e)?`var(--theme-${e})`:"",xb={main:{ink:dt.accent,page:dt.accent,key:"accent",label:()=>c("Main"),words:e=>c("Theme {n} main color",{n:e})},text:{ink:dt.text,page:dt.text,key:"text",label:()=>c("Text"),words:e=>c("Theme {n} text color",{n:e})},background:{ink:Co("bg"),page:Eb("bg"),key:"background",label:()=>c("Background"),words:e=>c("Theme {n} background",{n:e})},muted:{ink:dt.labels,page:dt.labels,key:"muted",label:()=>c("Muted"),words:e=>c("Theme {n} muted color",{n:e})},surface:{ink:Co("surface"),page:Co("surface"),key:"surface",label:()=>c("Surface"),words:e=>c("Theme {n} surface color",{n:e})}};function qe(e){return j(xb,e)}var Us="#9ca3af";function qt(e,t,n){let o=qe(e);return o?{hex:Cu(t[o.key]??"")??"",words:o.words(n)}:null}function Ou(e,t){return Tb.flatMap(n=>{let o=qt(n,e,t);return o&&qe(n)?.ink?[{name:n,label:o.words,value:o.hex||Us}]:[]})}var vb=["main","text","background"];function Pu(e){let t=new Set,n=[];return Pe(e).themes.forEach((o,a)=>{for(let s of vb){let r=qe(s),i=r?o[r.key]:void 0,l=typeof i=="string"&&i?Cu(i):null;!r||!l||t.has(l)||(t.add(l),n.push({value:l,label:r.words(a+1)}))}}),n}function He(e){return qe(e)?.ink??""}function Ae(e){if(typeof e!="string")return null;let t=Iu(e.trim());return t?.kind==="slot"&&He(t.slot)?t.slot:null}var Ob={accent:"main",labels:"muted"};function Me(e){return j(Ob,e)??e}function Oo(e){if(!e)return"";if(e.startsWith("#"))return Au(e)===e.toLowerCase()?e:"";let t=Cb(Me(e));return t?.kind==="slot"?He(t.slot):""}function Nu(e,t=Ru){return t.flatMap(n=>{let o=qe(n);return o?.ink?[{name:n,label:o.label(),value:e?.[n]||Us}]:[]})}function Lu(e){let t=Iu(Me(e));return t?.kind==="slot"?He(t.slot):""}function RI(e){let t=e?.trim();return t?wb.find(n=>He(n)===t)??null:null}function II(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 Ru){let i=He(r);if(!i)continue;let l=i.replace(/^var\((--[\w-]+)\)$/,"$1"),u=a.getPropertyValue(l).trim();if(!u)continue;let d=ku(u);!d&&s&&(s.fillStyle="#000000",s.fillStyle=u,d=ku(String(s.fillStyle))),d&&(t[r]=d)}return t}function ku(e){let t=e.trim().toLowerCase();if(t.startsWith("#"))return Au(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 Po="sf.gapContainer",Ue={min:-32,max:64,step:2},Gu={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},Zt={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},Pb=new Set(["Events","GalleryB"]);function vn(e,t,n){if(typeof t=="number"&&Number.isFinite(t)&&t>=Ue.min)return t;if(typeof t=="string"){let o=Gu[e]?.[t];if(typeof o=="number")return o}return typeof n=="number"&&Number.isFinite(n)?n:Zt[e]}var kb="sf-gap-overlap",Ab="--sf-gap-overlap",Gs="--sf-block-gap",Du="--sf-block-gap-rem",ge={min:0,max:Ue.max,step:Ue.step};function wn(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.min(Math.max(Math.round(e),ge.min),ge.max);return t-t%ge.step}function DI(e,t){let n=mt(e,t,"gap",ge);if(n!==null)return{[Gs]:n,[Du]:n};let o=wn(e);return o===null?{}:{[Gs]:`${o}px`,[Du]:`${o/16}rem`}}var Fu="--sf-block-gap-phone",Bu="--sf-block-gap-phone-rem",Rb="--sf-block-gap-on-phone",Ib="max-view-tablet:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]",Nb="max-view-wide:[&_[data-sf-line~=edge]:not([data-sf-line~=edge]_*)]:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";function FI(e,t){let n=mt(e,t,"gap",ge);if(n!==null)return{[Fu]:n,[Bu]:n};let o=wn(e);return o===null?{}:{[Fu]:`${o}px`,[Bu]:`${o/16}rem`}}function BI(e){return wn(e)===null?"":`${Ib} ${Nb}`}var Hu="sf-gap-zone",Mu="--sf-gap-len";function ko(e,t){return typeof t=="number"&&Number.isFinite(t)&&t>=Ue.min?!0:typeof t=="string"&&typeof Gu[e]?.[t]=="number"}var Uu="--sf-gap-len-phone",Lb="--sf-gap-len-tablet",Cn={min:0,max:Ue.max,step:Ue.step};function Ze(e){return typeof e=="number"&&Number.isFinite(e)&&e>=Cn.min}function $s(e){return e/2}function zs(e,t,n){return Ze(n)&&!ko(e,t)}function Ws(e,t,n,o,a){return Ze(t)?t:zs(e,n,a)?a:$s(vn(e,n,o))}var Db={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function HI(e,t,n,o,a){let s={...Ze(o)?{[Uu]:`${o}px`}:null,...Ze(a)?{[Lb]:`${a}px`}:null};if(!ko(e,t)){let i=`${Zt[e]}px`,l=Pb.has(e)?`var(--sf-card-gap, ${i})`:i;return{className:` ${Hu}`,style:{[Mu]:`var(${Gs}, ${l})`,[Uu]:`var(${Rb})`,...s}}}let r=vn(e,t);return r>=0?{className:` ${Hu}`,style:{[Mu]:`${r}px`,...s}}:{className:` ${kb} ${Db[n]}`,style:{gap:"0px",[Ab]:`${-r/2}px`}}}import{jsx as Y,jsxs as yt,Fragment as Cy}from"react/jsx-runtime";import{useCallback as nd,useContext as Oy,useId as sd,useRef as od,useState as ad}from"react";import{ThemeIcon as Py}from"efficient-easel/icons";import{Button as ky,useClickOutside as Ay}from"efficient-shell/ui";import{SettingsField as Ry}from"efficient-easel/panel";import{ScreenDocumentContext as Iy}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as k,jsxs as Qe,Fragment as sy}from"react/jsx-runtime";import{parseHexColor as ry}from"efficient-shell/format";import{Button as Ys,IconButton as iy,Tooltip as ly}from"efficient-shell/ui";import{jsx as Je,jsxs as Zb}from"react/jsx-runtime";import{AccentIcon as Jb}from"efficient-easel/icons";import{Button as Qb,Tooltip as ey}from"efficient-shell/ui";import{jsx as se,jsxs as js}from"react/jsx-runtime";import{useRef as Fb}from"react";import{ColorPicker as Bb,ColorPickerPanel as Hb,ColorSwatch as Mb,HexInput as Ub,Popover as Gb,Tooltip as $b,colorFill as zb,colorSwatchClasses as Wb,useShellStrings as Kb}from"efficient-shell/ui";import{SettingsDefaultReset as jb,SettingsField as Vb}from"efficient-easel/panel";import{typedHex as Ks}from"efficient-easel/pick";var $u="Not set";function zu({value:e,onChange:t,label:n,id:o,caption:a,inherited:s,ariaLabel:r,choices:i}){return se(Xb,{value:e,onChange:t,label:c(r??n),id:o,caption:a,inherited:s,choices:i})}function Yb(){let{theme:e}=B();return Pu(e)}function Xb({value:e,onChange:t,label:n,id:o,caption:a,inherited:s,choices:r}){let i=Yb(),l=e?null:Ks(s??""),u=a!==void 0&&(!e||Ks(a)!==Ks(e))?a:null,d=f=>{f!==e&&t(f)};return js("div",{className:"sf-colour",children:[r?se(qb,{id:o,value:e,onChange:t,label:n,presets:i,follows:l,choices:r}):se(Bb,{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(Ub,{value:e||l||"",onChange:d,label:c("{label} hex code",{label:n}),placeholder:e||l?void 0:c($u),className:l?"sf-colour-hex is-inherited":"sf-colour-hex",size:"md"})})]})}function qb({value:e,onChange:t,label:n,id:o,presets:a,follows:s,choices:r}){let i=Kb().color,l=e||s||"",u=r.findIndex(p=>p.selected),d=u>=0,f=Fb(u);return d&&(f.current=u),se(Gb,{id:o,trigger:se("span",{"aria-hidden":"true",className:"absolute inset-0",style:zb(l)}),triggerLabel:i.swatch(n,l.toUpperCase()||i.none),triggerClassName:Wb({size:"md"}),"aria-label":i.panel(n),align:"start",children:js("div",{className:"sf-colour-window",children:[se("div",{role:"group","aria-label":n,className:"sf-colour-choices",children:r.map(p=>se($b,{content:p.label,children:se(Mb,{color:p.color,"aria-label":p.label,selected:p.selected,onClick:()=>{p.selected||p.onPick()}})},p.label))}),se(Hb,{value:d?"":e,onChange:t,label:n,presets:a,fallback:(d?l:s)??void 0},f.current)]})})}function be({label:e,icon:t,changed:n,hint:o,onReset:a,resetTo:s,children:r,...i}){return se(Vb,{label:e,icon:t,htmlFor:i.id,changed:n,hint:o,action:a?se(jb,{words:P()?.panel,label:e,changed:!!n,detail:s,onReset:a}):void 0,children:r?js("div",{className:"es-width-stack",children:[zu({...i,label:e}),r]}):zu({...i,label:e})})}function On({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(be,{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 Vs(e){return ce(e).background}function ty(e){let t=Ye(e.accent,Vs(e));return t===null?null:{ratio:t,grade:Vt(t)}}function ny(e){let t=Vs(e),n=Ye(e.accent,t);return n===null?[]:$c(e.accent).filter(o=>{let a=Ye(o,t);return a!==null&&a>n&&Vt(a)==="good"})}var oy={good:"Easy to read","large-only":jt["large-only"],hard:jt.hard};function Wu({value:e,onChange:t}){let n=ty(e),o=n?.grade,a=n&&n.grade!=="good"?ny(e):[];return Je(be,{label:c("Main color"),icon:Je(Jb,{}),hint:n?c(oy[n.grade]):void 0,value:e.accent,onChange:s=>t({...e,accent:s}),children:a.length>0?Je("div",{className:"w-full min-w-0",children:Zb("div",{className:"sf-readability",children:[Je("p",{className:"sf-readability-advice",children:ay(o,!0)}),Je("div",{className:"sf-readability-suggestions",children:a.map(s=>{let r=Ye(s,Vs(e));return Je(ey,{content:c("Use {colour}",{colour:s.toUpperCase()}),children:Je(Qb,{variant:"secondary",className:"sf-readability-suggestion",leftIcon:Je("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 ay(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 cy,ChevronDownIcon as ju,ChevronUpIcon as uy,GroundIcon as dy,LayoutIcon as py,SquareIcon as fy,TextSmallIcon as my,TypeIcon as Ku}from"efficient-easel/icons";var Pn=e=>c("Theme {n}",{n:e+1});function Vu({colors:e}){let t=ce(e),n=Ns(e)??t.accent;return Qe("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")}),Qe("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")}),Qe("span",{className:"sf-theme-row",children:[k("span",{className:"sf-theme-btn",style:{background:n,color:Ls(e,t.accent)},children:c("button")}),k("span",{className:"sf-theme-mini",style:{background:t.surface,borderColor:t.line},children:c("card")})]})]})}var Xs={"Text color":k(Ku,{}),"Label color":k(my,{}),Background:k(dy,{}),"Panels & cards":k(py,{}),Borders:k(fy,{}),"Button color":k(cy,{}),"Button text color":k(Ku,{})};function hy({label:e,colorKey:t,value:n,onChange:o,idPrefix:a="sf-theme-ink"}){let s=`${a}-${t}`;return k(be,{label:c(e),icon:Xs[e],id:s,value:n,onChange:r=>o(t,r)})}function gy({value:e,accent:t,onChange:n,idPrefix:o="sf-theme-ink"}){let a=`${o}-button`,s=e!==void 0&&ry(e)===e.toLowerCase(),r=s?e:t;return k(be,{label:c("Button color"),icon:Xs["Button color"],id:a,value:r,caption:s?r:c("Main"),onChange:n})}function by({colors:e,accent:t,onChange:n,idPrefix:o="sf-theme-ink"}){let a=`${o}-button-ink`,s=zc(e),r=Ls(e,t),i=Ns(e)??t,l=Vt(Ye(r,i)??0);return k(be,{label:c("Button text color"),icon:Xs["Button text color"],hint:s&&l!=="good"?c("{grade} on the button",{grade:c(jt[l])}):void 0,id:a,value:r,caption:s?r:c("Auto"),onChange:n})}var yy=[{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 qs({colors:e,onChange:t,idPrefix:n}){let o=ce(e);return k(sy,{children:yy.map(a=>"colour"in a?k(Wu,{value:e,onChange:t},"colour"):"moduleBreak"in a?k("div",{className:"sf-theme-module-break","aria-hidden":"true"},"module-break"):"button"in a?k(gy,{value:e.button,accent:o.accent,onChange:s=>t({...e,button:s}),idPrefix:n},"button"):"buttonInk"in a?k(by,{colors:e,accent:o.accent,onChange:s=>t({...e,buttonInk:s}),idPrefix:n},"buttonInk"):k(hy,{label:a.label,colorKey:a.key,value:o[a.key],onChange:(s,r)=>t({...e,[s]:r}),idPrefix:n},a.key))})}function Ao({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=Pn(e),f=e<Is.length&&!t.brandInk?Is[e]:null,p=Vt(Ye(u.text,u.background)??0),m=f?JSON.stringify(t)!==JSON.stringify(f):!1,b=a!==void 0;return Qe("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(Vu,{colors:t})}),Qe("div",{className:"sf-theme-foot",children:[k("span",{className:"sf-theme-name",children:d}),p!=="good"&&k("span",{className:"sf-theme-warn",children:c(jt[p])}),s&&i&&b&&k("span",{className:"sf-theme-edit",children:k(ly,{content:a?c("Collapse"):c("Edit colors"),children:k(iy,{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(uy,{size:14}):k(ju,{size:14})})})}),s&&i&&!b&&k(Ys,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":c("Edit {name}",{name:d}),onClick:i,children:c("Edit")})]}),a&&Qe("div",{id:`sf-theme-colours-${e}`,className:"sf-theme-colours",children:[k(qs,{colors:t,onChange:y=>l?.(y)}),f&&k(Ys,{variant:"link",size:"sm",className:"sf-theme-reset",disabled:!m,onClick:()=>l?.({...f}),children:m?c("Reset {name} to the preset",{name:d}):c("Not changed")})]})]})}function Yu({colors:e,name:t,nameId:n,open:o,menuId:a,labelId:s,buttonRef:r,onClick:i,onKeyDown:l,onEdit:u}){return Qe("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(Vu,{colors:e}):k("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),Qe("div",{className:"sf-theme-foot",children:[k("span",{id:n,className:"sf-theme-name",children:t}),u&&k(Ys,{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(ju,{size:12,className:"sf-multi-caret","aria-hidden":"true"})})]})]})}import{useCallback as tr,useEffect as Qu,useRef as Io}from"react";import{currentEaselSession as Ey}from"efficient-easel/screen/lib/session";import{backendOf as Sy}from"efficient-easel/screen/lib/session";var Ee=Sy,m0=e=>e.blocks;import{useEaselSession as xy}from"efficient-easel/screen/lib/session-context";import{useSyncExternalStore as _y}from"react";var qu,Zs=null,bt=null,Ro=0,Js=new Set;function Qs(e){qu=e;for(let t of Js)t()}function b0(e){Zs=e,Ro+=1,bt&&clearTimeout(bt),bt=null,Qs(void 0)}function y0(e){Ro+=1,Qs(e)}function Zu(e=250){Zs&&(bt&&clearTimeout(bt),bt=setTimeout(()=>{bt=null;let t=Zs;if(!t)return;let n=++Ro;t().then(o=>{n===Ro&&Qs(o)}).catch(()=>{})},e))}function Xu(){return qu}function Ty(e){return Js.add(e),()=>{Js.delete(e)}}function S0(){return _y(Ty,Xu,Xu)}var er=new Set;function Ju(e){return er.add(e),()=>{er.delete(e)}}async function T0(){let e=(await Promise.allSettled([...er].map(async t=>t()))).find(t=>t.status==="rejected");if(e)throw e.reason}import{WebsiteBackendError as vy}from"efficient-easel/screen/lib/backend-error";function ed(e=Ey()){return(t,n,o)=>{let a=Ee(e).theme;return a?a.update(t,o?{siteId:o}:void 0):Promise.reject(new vy("invalid","This backend stores no site theme."))}}function td(e){return e.themeFromDocument?{status:"skipped",reason:"template"}:e.token?null:{status:"skipped",reason:"no-token"}}async function wy(e,t=ed()){let{themeFromDocument:n,token:o,siteId:a,patch:s}=e,r=td({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 No({themeFromDocument:e,tokenRef:t,siteId:n,onResult:o}){let a=Io(null),s=Io({}),r=xy(),i=Io(o);i.current=o;let l=Io(null),u=tr(p=>{if(p.status==="skipped"){let m=`skipped:${p.reason}`;if(l.current===m)return;l.current=m}else l.current=null;i.current?.(p)},[]),d=tr(async()=>{a.current&&(clearTimeout(a.current),a.current=null);let p=s.current;s.current={};let m=await wy({themeFromDocument:e,token:t?.current,siteId:n,patch:p},ed(r));return u(m),m.status==="saved"&&Zu(),m.status==="failed"&&(s.current={...p,...s.current}),m},[e,t,n,u,r]),f=tr((p,m=!1)=>{let b=td({themeFromDocument:e,token:t?.current});if(b){u(b);return}s.current={...s.current,...p},a.current&&clearTimeout(a.current),m?d():a.current=setTimeout(()=>{d()},500)},[e,t,d,u]);return Qu(()=>()=>{d()},[d]),Qu(()=>Ju(async()=>{if(!a.current&&Object.keys(s.current).length===0)return;let p=await d();if(p.status==="failed")throw p.error}),[d]),{persist:f,flush:d}}var Ny="Follow the page",z0="Follow the slideshow",Ly=e=>c("Editing {name} changes it everywhere.",{name:e});function Dy({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 Fy({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(Cy,{children:[yt("button",{type:"button",role:"option","aria-selected":t===null,className:`sf-secttheme-item${t===null?" is-active":""}`,onClick:()=>n(nu),children:[Y(Dy,{}),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:Pn(t)})}),e.map((r,i)=>i===t?null:Y(Ao,{role:"option",index:i,colors:r,selected:!1,onPick:()=>n(i),onEdit:o?()=>o(i):void 0},i))]})}function By({index:e,colors:t,onChange:n,onDone:o}){let a=Pn(e),s=sd();return yt("div",{className:"sf-secttheme-sheet",children:[yt("div",{className:"sf-secttheme-sheet-head",children:[Y("span",{children:a}),Y(ky,{variant:"secondary",className:"sf-secttheme-done",onClick:o,children:c("Done")})]}),Y("div",{className:"sf-secttheme-rows",children:Y(qs,{colors:t,onChange:n,idPrefix:s})}),Y("p",{className:"sf-secttheme-warn",children:Ly(a)})]})}function rd({value:e,onChange:t,followLabel:n,hint:o,canEdit:a=!0}){let{theme:s,setTheme:r}=B(),i=Pe(s),l=Oy(Iy),u=l?.tokenRef,d=l?.siteId??null,f=!l?.capabilities?.hasSiteTheme,{persist:p,flush:m}=No({themeFromDocument:f,tokenRef:u,siteId:d}),b=Pe(i),y=b.themes,T=gt(e),S=T!==null?y[T]:void 0,E=S??(y.length?Kt(b):void 0),[x,v]=ad(!1),[w,L]=ad(null),C=od(null),D=od(null),z=sd(),Te=nd(()=>{v(!1),L(null)},[]),co=nd(()=>{!x&&w===null||(m(),Te())},[x,w,Te,m]);Ay(C,co);let uo=X=>{t(X),Te()},po=X=>{if(w===null)return;let yb=y.map((Sb,_b)=>_b===w?X:Sb),Ss={...b,themes:yb};r(Ss),p({selected_preset:Ss.selected,theme_presets:Ss.themes})};return yt("div",{className:"sf-secttheme",ref:C,children:[Y(Ry,{label:c("Theme"),icon:Y(Py,{}),labelId:`${z}-label`,hint:o,children:Y(Yu,{colors:E,onEdit:a&&T!==null?()=>{L(T),v(!1)}:void 0,name:S?Pn(T):c(n??Ny),nameId:`${z}-value`,labelId:`${z}-label`,open:x,menuId:z,buttonRef:D,onClick:()=>{L(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(Fy,{themes:y,value:T,onPick:uo,onEdit:a?X=>{L(X),v(!1)}:void 0,menuId:z,followLabel:n})}),a&&w!==null&&y[w]&&Y(By,{index:w,colors:y[w],onChange:po,onDone:()=>{m(),Te(),D.current?.focus()}})]})}import{defaultTextStyles as Md,textStyleCaseCss as l_}from"efficient-easel/text-styles/model";import{resolveViewValue as Ud}from"efficient-easel/draw";import{VIEW_DESKTOP_MIN as id,VIEW_TABLET_MIN as ld}from"efficient-easel/draw";var Lo=.02,cd=`(min-width: ${En}px) and (max-width: ${id-Lo}px)`,ud=`(max-width: ${En-Lo}px)`,Do=`(min-width: ${ld}px) and (max-width: ${id-Lo}px)`,Fo=`(max-width: ${ld-Lo}px)`;import{textStyleCaseCss as aS,textStyleCaseOfCss as sS,viewKeyAt as Nd}from"efficient-easel/draw";function Bo(e,t){return t?`${e}[${t.index}].${t.rowKey}`:e}function Hy(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 sr,encodePartId as SN}from"efficient-easel/draw";import{LINK_FIELD_MARKER as Td,SCAFFOLD_FIELD_MARKER as Sd,TEXT_FIELD_MARKER as Go}from"efficient-easel/draw";import{readHidable as Ed}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as Zy}from"efficient-easel/draw";var dd={ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},pd={Events:["posts"],SubscribeBlogs:["posts"]};var My=["anchor"],Uy=/^href$|Href$|^url$|Url$|^link$|^mailto$|^tel$/;function kn(e){return My.includes(e)||Uy.test(e)}var Gy={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"}}};Gy.ContactLocations={"locations[].lat":{verb:"pii"},"locations[].lng":{verb:"pii"},"locations[].mapsUrl":{verb:"pii"},"locations[].geocode":{verb:"pii"}};var Q0=Object.fromEntries(Object.entries(dd).map(([e,t])=>[e,Object.keys(t)])),eN=Object.fromEntries(Object.entries(pd).map(([e,t])=>[e,[...t]]));var nr="__ownBox";function fd(e){return!!e&&typeof e=="object"&&e[nr]===!0}var or="sfPanelOnly";function Ho(e){return!!e&&typeof e=="object"&&e[or]===!0}import{TEXT_FIELD_MARKER as Vy}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as md}from"efficient-easel/draw";import{readHidable as hd}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as $y}from"efficient-easel/draw";var zy=$y,Wy=["text","textarea"],Ky=["textarea","plainTextarea"];function jy(e){return!e||typeof e!="object"?null:e[md]?.control??null}function gd(e){let t=jy(e);return t&&zy.includes(t)?t:null}function iN(e){return Ky.includes(e)}function lN(e){return!e||typeof e!="object"?void 0:e[md]?.placeholder}function Mo(e){return hd(e).text}function ar(e,t,n){return Wy.includes(e)?{text:n,hidden:hd(t).hidden}:n}function cN(e,t,n,o){return Mo(e[t])===o?null:{...e,[t]:ar(n,e[t],o)}}function bd(e){if(!(!e||typeof e!="object"))return e[Vy]}function Yy(e){if(!e||typeof e!="object")return null;let t=e.arrayFields;return t&&typeof t=="object"?t:null}function yd(e,t){if(!Array.isArray(t))return[];let n=bd(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=Yy(e);return a?(t.forEach((s,r)=>{for(let[i,l]of Object.entries(a)){if(!gd(l))continue;let u=Mo(s?.[i])||bd(l)?.placeholder||"";u&&o.push({row:{index:r,rowKey:i},text:u})}}),o):[]}function Xy(e,t){if(Array.isArray(e))return e[t.index]?.[t.rowKey]}function qy(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 hN(e,t,n,o,a){let s=Xy(e[t],n);return Mo(s)===a?null:qy(e,t,n,ar(o,s,a))}function gN(e,t){return t?`${e} \xB7 row ${t.index+1}`:e}var kN="data-sf-part",AN="data-sf-region-part",RN="data-sf-part-row";function IN(e,t){return`${e}[${t}]`}var NN="data-sf-part-kind",Jy="data-sf-part-style-owner",Qy="data-sf-part-style-kind";function LN(e){for(let t=e;t;t=t.parentElement){let n=t.getAttribute(Jy),o=t.getAttribute(Qy);if(n&&o)return{owner:n,kind:o};if(t.getAttribute("data-easel-block"))return null}return null}var _d=2;function Jt(e){return _s(e).replace(/\s+/gu,"")}function Uo(e,t,n){let o=e[Go];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}=Ed(t);a?n.push(a):o.placeholder&&n.push(o.placeholder);return}if(!e[Td]){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))Uo(r,a?.[s],n);return}if(e.objectFields&&t&&typeof t=="object")for(let[a,s]of Object.entries(e.objectFields))Uo(s,t[a],n)}}function eS(e){if(!e||typeof e!="object")return!1;let t=e;return t[Td]?!1:!!t[Go]||t.type==="text"||t.type==="textarea"}function xd(e,t){let n=e[Go];return n?.label?n.label:typeof e.label=="string"?e.label:t}function tS(e){let t=e.indexOf(" (");return(t>0?e.slice(0,t):e).trim()}function DN(e,t,n){if(!e)return[];let o=[];for(let[a,s]of Object.entries(e)){if(!s||typeof s!="object"||kn(a))continue;let r=s,i=[];Uo(r,t?.[a],i),!i.length&&r[Sd]!==void 0&&Uo(r,r[Sd],i);let l=xd(r,a);if(n?.(a)&&eS(r)){i.length&&o.push({key:a,label:l,texts:[],keyed:!0});continue}let u=new Set;for(let{row:p,text:m}of yd(r,t?.[a])){let b=Jt(m);b.length<_d||(u.add(b),o.push({key:a,label:l,texts:[b],row:p}))}let d=new Set(u),f=[];for(let p of i){let m=Jt(p);m.length<_d||d.has(m)||(d.add(m),f.push(m))}f.length&&o.push({key:a,label:l,texts:f})}return o}function nS(e){return!e.offPage&&!e.hidden&&e.panelOnly!==!0}var oS=Zy;function vd(e,t){if(!t||typeof t!="object"||kn(e)||fd(t))return null;let n=t[Go];return!n||!oS.includes(n.control)?null:n}function FN(e,t){let n=vd(e,t);return n!==null&&n.identifier!==!0}function BN(e,t){if(!e)return[];let n=[];for(let[o,a]of Object.entries(e)){let s=vd(o,a);if(!s)continue;let{text:r,hidden:i}=Ed(t?.[o]);if(nS({offPage:s.offPage===!0,hidden:!!i,panelOnly:Ho(a)}))continue;let l=r||s.placeholder||"",u=_s(l).replace(/\s+/gu," ").trim();n.push({key:o,label:tS(xd(a,o)),preview:u,offPage:s.offPage===!0,identifier:s.identifier===!0,hidden:!!i})}return n}function Qt(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function $o(e,t){return Qt(e?.[t])??{}}function wd(e,t,n){let o=$o(e,t);return Qt(j(o,n))??{}}function Cd(e,t,n,o){let{[n]:a,...s}=$o(e,t),r=o?{...s,[n]:o}:s,{[t]:i,...l}=e;return Object.keys(r).length?{...l,[t]:r}:l}import{isLengthUnit as dr}from"efficient-easel/screen/lib/content/length-units";var pr="_partStyles",rS="data-sf-part-styled",zo="data-sf-text-style",iS=/^(heading|body)-[1-7]$/;function Et(e){return typeof e=="string"&&iS.test(e)}var Wo={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function lS(e){if(!e)return null;for(let[t,n]of Object.entries(Wo))if(n===e)return t;return null}function JN(e){if(Et(e.textStyle))return e.textStyle;let t=ut(e.role);return t?Wo[t]:void 0}var cS=[400,500,600,700],Rn=["left","center","right","justify"],rr=5,ir=1e3,uS=-5,dS=10,pS=0,fS=64,mS=2,Od={size:{min:rr,max:ir,step:1},sizeTablet:{min:rr,max:ir,step:1},sizePhone:{min:rr,max:ir,step:1},padding:{min:pS,max:fS,step:mS}},hS=.05,gS=.01,bS=["line","letter"],yS=.5,SS=2.5,_S=-1,TS=1,ES=0,xS=400,vS=[...new Set(Object.values(ho))];function QN(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 e1(e){return $o(e,pr)}function wS(e,t){return wd(e,pr,t)}function Ld(e,t,n){return Cd(e,pr,t,CS(n).length?n:null)}function CS(e){return Object.entries(e).filter(([,t])=>t!==void 0)}function OS(e){return bS.includes(e)}var An=(e,t,n)=>Math.min(n,Math.max(t,e)),PS=["sizeUnit","sizeUnitTablet","sizeUnitPhone"];function lr(e){let t=Nd("sizeUnit",e),n=PS.find(o=>o===t);if(!n)throw new Error(`a part stores no unit key ${t}`);return n}var St={size:lr("desktop"),sizeTablet:lr("tablet"),sizePhone:lr("mobile"),paragraphSpacing:"paragraphSpacingUnit",padding:"paddingUnit"},Dd=Object.values(St);function Re(e,t){return F(e[St[t]])}function kS(e,t,n={}){if(Dd.includes(e))return dr(t)&&t!=="px"?t:null;if(he(St,e)&&Re(n,e)!=="px"){let o=Tt(Number(t),2);return!Number.isFinite(o)||o<0||o===0&&e!=="padding"?null:o}if(OS(e)){let o=Math.round(Number(t));return!Number.isFinite(o)||o===0?null:An(o,uS,dS)}if(e==="lineHeight"){let o=Number(t);return Number.isFinite(o)?Tt(An(o,yS,SS),3):null}if(e==="letterSpacing"){let o=Number(t);return Number.isFinite(o)?Tt(An(o,_S,TS),4):null}if(e==="paragraphSpacing"){let o=Math.round(Number(t));return!Number.isFinite(o)||o<=0?null:An(o,ES,xS)}if(he(Od,e)){let{min:o,max:a}=Od[e],s=Math.round(Number(t));return Number.isFinite(s)?An(s,o,a):null}return e==="italic"?typeof t=="boolean"?t:null:e==="role"||e==="fontRole"?ut(t)?t:null:e==="sizeToken"?fr(t)?t:null:e==="textStyle"?Et(t)?t:null:e==="alignPhone"||e==="alignTablet"?Rn.includes(t)?t:null:t}var AS=["weight","size","sizeTablet","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding"];function en(e){let t=null,n=o=>{t??={...e},delete t[o]};for(let o of AS){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&&!Et(e.textStyle)&&n("textStyle"),e.sizeToken!==void 0&&!fr(e.sizeToken)&&n("sizeToken"),e.fontRole!==void 0&&!ut(e.fontRole)&&n("fontRole");for(let o of Dd)e[o]!==void 0&&!dr(e[o])&&n(o);return t??e}function fr(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"&&vS.includes(l);return i(t)&&r(n)&&(o===void 0||i(o))&&(a===void 0||r(a))&&(s===void 0||RS(s,n))}function RS(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 mr(e){return e?.pxPhone&&fr(e)?{step:e.stepPhone??e.step,px:e.pxPhone}:null}function Fd({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 IS=[["font","role"],["font","fontRole"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function NS(e){let t=[];for(let[n,o]of IS)n===e?t.push(o):o===e&&t.push(n);return t}function t1(e,t,n,o){let a={...wS(e,t)},s=o==null?null:kS(n,o,a);if(s===null)delete a[n];else{a[n]=s;for(let r of NS(n))delete a[r]}return Ld(e,t,a)}function n1(e,t){return Ld(e,t,{})}function LS(e){return sS(e)??"none"}function DS(e){return aS(e)??""}var Pd={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 FS(e,t){return ut(e.role)||(t?.blockDrawsStyle?null:lS(e.textStyle))}var BS="--sf-part-size-cap";function hr(e,t){return e&&t?.sizeCap?`min(${e}, var(${BS}, ${e}))`:e}function o1(e,t){return e?.[t]===!0}function a1(e,t){return e==="Text"&&t==="text"}var HS={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 MS(e){let t=ho[e],n=j(HS,t);return n?`var(--size-${t}, ${n})`:`var(--size-${t})`}function gr(e){let t={};return typeof e.lineHeight=="number"?t.lineHeight=e.lineHeight:e.line&&(t.lineHeight=Tt(US+e.line*hS,3)),typeof e.letterSpacing=="number"?t.letterSpacingEm=e.letterSpacing:e.letter&&(t.letterSpacingEm=Tt(e.letter*gS,4)),t}var US=1,_t="--sf-part-para";function GS(e,t){e=en(e);let n={};if(typeof e.sizePhone=="number"&&e.sizePhone>0)n.fontSize=M(e.sizePhone,Re(e,"sizePhone"));else{let a=mr(e.sizeToken);if(a)n.fontSize=Fd(a);else{let s=jo(e);s!==void 0&&(n.fontSize=M(s,Re(e,"sizeTablet")))}}n.fontSize&&(n.fontSize=hr(n.fontSize,t));let o=e.alignPhone??Ko(e);return o&&(n.textAlign=o),n}function Ko(e){return e.alignTablet&&e.alignTablet!==e.align?e.alignTablet:void 0}function jo(e){let t=e.sizeTablet!==void 0&&Re(e,"sizeTablet")!==Re(e,"size")?e.sizeTablet:Be("textSize",e.size,e.sizeTablet,void 0).tablet;return t&&t>0?t:void 0}function $S(e,t){let n=en(e),o={},a=jo(n);a!==void 0&&(o.fontSize=hr(M(a,Re(n,"sizeTablet")),t));let s=Ko(n);return s&&(o.textAlign=s),o}function s1(e,t){if(t==="desktop")return;let n=en(e);return(t==="mobile"?Ko(n):void 0)??n.align}function zS(e,t){if(t==="desktop")return e;let n=en(e),o=jo(n),a=Ko(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=mr(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 br(e,t,n){return yr(zS(e,t),Vo,n)}function WS(e){return Nd("size",e)}function r1(e,t){if(t==="desktop")return null;let n=en(e);if(t==="mobile"){if(mr(n.sizeToken))return null;let o=jo(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 Bd(e,t){let n=WS(t);if(!he(e,n))return e;let o={...e};return delete o[n],o}function i1(e,t,n){let o=br(Bd(e,t),t,n);return{fontFamily:o.fontFamily,fontSize:o.fontSize}}function yr(e,t,n){e=en(e);let o=FS(e,n),a=gr(e),s=hr(e.size?M(e.size,Re(e,"size")):e.sizeToken?Fd(e.sizeToken):o?MS(o):"",n);return{fontFamily:e.font?YS(e.font):e.fontRole?`var(${Pd[e.fontRole]})`:o?`var(${Pd[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:DS(e.case),textAlign:e.align??"",paddingTop:kd(e.padding,Re(e,"padding")),paddingBottom:kd(e.padding,Re(e,"padding")),color:KS(e.color),fontStyle:e.italic===!0?"italic":e.italic===!1?"normal":""}}var KS=e=>Oo(e),kd=(e,t)=>e===void 0?"":M(e,t),Tt=(e,t)=>Number(e.toFixed(t));function l1(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:jS(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(o)?Tt(o/n,3):1.2,letterEm:Number.isFinite(a)?Tt(a/n,4):0,align:VS(e.textAlign),case:LS(e.textTransform),paddingPx:Number.isFinite(s)?Math.round(s):0}}function jS(e){return Number.isFinite(e)?cS.reduce((t,n)=>Math.abs(n-e)<Math.abs(t-e)?n:t):400}function VS(e){for(let t of Rn)if(t===e)return t;return e==="end"?"right":"left"}function c1(e,t){let n=Ad(e);if(!n)return"";for(let o of Gt)if(Ad(t(o.cssVar))===n)return o.key;return""}var Ad=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function YS(e){let t=hc(e);return t?`var(${t.cssVar})`:""}function u1(e,t,n,o){return!t||sr(t)?.nodeId!==e?null:n.find(a=>o(a.getAttribute("class")))??n[0]??null}function XS(e,t){return Qt(j(e,t))??{}}function d1(e,t,n=()=>Vo,o=l=>l,a=JS,s="desktop",r=()=>!1,i=()=>!1){let l=0;for(let{element:u,partId:d}of e){let f=sr(d)?.propKey;if(!f)continue;let p=XS(t,o(f)),m=br(p,s,{blockDrawsStyle:r(f),sizeCap:i(f)});Et(p.textStyle)?u.setAttribute?.(zo,p.textStyle):u.removeAttribute?.(zo);let b=cr.some(T=>u.style[T]),y=!1;for(let[T,S]of Object.entries(m))t_(u,T,S),S&&(y=!0);if(b||cr.some(T=>m[T]))for(let T of qS(u,a))for(let S of cr)T.style[S]=m[S]??"";y&&(l+=1)}return l}function qS(e,t){let n=Jt(e.textContent??""),o=[],a=e;for(let s=0;s<ZS&&t(a);s+=1){let r=a.parentElement;if(!r||Jt(r.textContent??"")!==n)break;o.push(r),a=r}return o}var ZS=8;function JS(e){let t=e;return typeof window>"u"||!t?.ownerDocument?!1:window.getComputedStyle(t).display==="inline"}var Vo={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0};function QS(e){if(!e||typeof e!="object")return null;let t={};Et(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&&dr(e[o])&&(t[o]=e[o])}return Object.keys(t).length?t:null}function e_(e,t,n){let o=QS(e);if(!o)return{};let a=br(o,t,n?.sizeCap?{sizeCap:!0}:void 0);return{...a.fontFamily?{fontFamily:a.fontFamily}:{},...a.fontSize?{fontSize:a.fontSize}:{}}}function p1(e){return Et(e?.textStyle)||!!e?.role||typeof e?.size=="number"&&e.size>0}function f1(e,t,n){if(!e||typeof e!="object")return{};let o=Ac(e.role,t,ho)??{},a=t.sized?e_(Bd(e,n),n):{};return{...o,...a}}function m1(e,t,n){n.fontFamily&&e.fontFamily===n.fontFamily&&(e.fontFamily=t.fontFamily),n.fontSize&&e.fontSize===n.fontSize&&(e.fontSize=t.fontSize)}function t_(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?.(Rd,""):a.removeAttribute?.(Rd))}var Rd="data-sf-part-para",n_=Object.keys(yr({},Vo)),ur=new Set(["color","overflowWrap",_t,"fontStyle"]),cr=n_.filter(e=>!ur.has(e));function h1(e,t,n,o=l=>l,a=()=>!1,s=()=>null,r=[],i=()=>!1){let l=new Map;for(let p of e){let m=Bo(p.key,p.row);for(let b of p.texts){let y=l.get(b);y?(y.keys.add(p.key),y.partKeys.add(m)):l.set(b,{keys:new Set([p.key]),partKeys:new Set([m])})}}let u=new Map;for(let p of new Set([...Object.keys(t),...r])){if(!o_(p))continue;let m=Id(n,p,Qt(t[p])??{},{blockDrawsStyle:!1,sizeCap:i(p)},s(p));m&&u.set(p,m)}let d=p=>{let m=o(p),b=s(m);if(!he(t,m)&&!b)return null;let y=Qt(t[m])??{};return Id(n,p,y,{blockDrawsStyle:a(p),sizeCap:i(p)},b)},f=new Map;for(let[p,{keys:m,partKeys:b}]of l){let y=b.size===1?[...b][0]:m.size===1?[...m][0]:null;if(!y)continue;let T=d(y);T&&f.set(p,T)}for(let p of e){if(!p.keyed)continue;let m=d(Bo(p.key,p.row));m&&u.set(p.key,m)}return f.size||u.size?{rules:f,kindRules:u,drawn:new Set(l.keys())}:null}function Id(e,t,n,o,a){let s=yr(n,Vo,o),r=$S(n,o),i=GS(n,o),l=Et(n.textStyle)?n.textStyle:void 0;return!Object.values(s).some(Boolean)&&!Object.keys(r).length&&!Object.keys(i).length&&!l&&!a?null:{stamp:a_(e,t),declarations:s,...Object.keys(r).length?{tablet:r}:{},...Object.keys(i).length?{phone:i}:{},...l?{textStyle:l}:{},...a?{motion:a}:{}}}function o_(e){return e.startsWith("@")}function g1(e,t){return e?.kindRules.get(t)??null}function a_(e,t){let n=o=>o.replace(/[^A-Za-z0-9_-]+/g,"-");return`${n(e)}~${n(t)}`}function s_(e){return e?{tablet:cd,phone:ud}:{tablet:Do,phone:Fo}}function b1(e,{inBox:t=!1}={}){let{tablet:n,phone:o}=s_(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!==""),f=S=>S.map(([E,x])=>`${r_(E)}: ${x}`).join("; "),p=`[${rS}="${l}"]`,m=d.filter(([S])=>!ur.has(S)),b=d.filter(([S])=>ur.has(S));m.length&&a.push(`${p}, *:has(> ${p}) { ${f(m)} }`),b.length&&a.push(`${p} { ${f(b)} }`),u[_t]&&(a.push(`*:has(> ${p}) { ${_t}: ${u[_t]} }`),a.push(...Yo(p,`*:has(> ${p})`)));let y=Object.entries(i.tablet??{}).filter(([,S])=>S!=="");y.length&&a.push(`@media ${n} { ${p}, *:has(> ${p}) { ${f(y)} } }`);let T=Object.entries(i.phone??{}).filter(([,S])=>S!=="");T.length&&a.push(`@media ${o} { ${p}, *:has(> ${p}) { ${f(T)} } }`)};for(let i of e.rules.values())r(i);for(let i of e.kindRules.values())r(i);return a.join(`
2
+ `)}function Yo(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 r_=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);function y1(e,t){if(!e)return null;let n=Jt(t),o=e.rules.get(n);if(o)return o;if(n.length<i_||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 i_=8;var Sr=e=>e==="sentence"?"none":void 0,Gd=["font","color","size","sizeTablet","sizePhone","weight","italic","lineHeight","lineHeightTablet","lineHeightPhone","letterSpacing","letterSpacingTablet","letterSpacingPhone","paragraphSpacing","paragraphSpacingTablet","paragraphSpacingPhone","letterCase","largestSize","largestSizeTablet","largestSizePhone"],tn=["desktop","tablet","phone"],xt=(e,t)=>U(e,t);function Er(e,t,n,o=$t()){return Ud("textSize",t,e.sizeTablet,e.sizePhone,o)[n]}var c_=[["lineSpacing","lineHeight","line"],["letterSpacing","letterSpacing","letter"]];function _r(e){for(let[t,n,o]of c_)for(let a of tn)if(e===xt(t,a))return{key:U(n,a),view:a,spacing:o};return{key:e,view:"desktop",spacing:null}}function Ie(e){let t={};for(let n of Gd)e[n]!==void 0&&(t[n]=e[n]);return t}function xr(e,t){let{auto:n,...o}=e,a=new Set(t??[]),s=Gd.filter(r=>a.has(r)&&e.values[r]===void 0);return s.length?{...o,auto:s}:o}function $d(e){let t=e.fonts,n=e.sizes,o=e.typography,a=Jc(e.compression),s={"heading-1":{font:W(t.heading),size:O(n.headingLarge),weight:O(o.weight),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Sr(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:Sr(o.case2)},"heading-3":{font:W(t.heading3),size:O(n.headingSmall),weight:O(o.weight3),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Sr(o.case3)},"body-1":{font:W(t.body),size:O(n.body)},"body-5":{font:W(t.label),size:O(n.label)}};return Md().map(({id:r,kind:i,name:l})=>({id:r,kind:i,name:l,values:Ie(s[r]??{})}))}function vr(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=>xr({...t,values:Ie(t.values??{})},Array.isArray(t.auto)?t.auto:void 0)):null}function R1(e){return vr(e)??[]}function zd(e){return vr(e)??Md().map(({id:t,kind:n,name:o})=>({id:t,kind:n,name:o,values:{}}))}function on(e,t){let n=$d(t),o=vr(e);return o?o.map(a=>{let s={...Tr(n,a.id)};for(let r of a.auto??[])delete s[r];return{...a,values:Ie({...s,...a.values})}}):n}var Tr=(e,t)=>e.find(n=>n.id===t)?.values??{},Hd=["heading-1","heading-2","heading-3"];function Wd({saved:e,old:t,cur:n,next:o,sizeOf:a,panelView:s="desktop"}){let r=$d(t),i=zd(e),l=on(i,t),u=[],d=o.map(p=>{let m=n.find(w=>w.id===p.id),b=i.find(w=>w.id===p.id);if(!m||!b){let w=u_([p],a,s)[0],L=w.values.color;return L===void 0?w:{...w,values:{...w.values,color:Me(L)}}}let y={...b.values},T=new Set(b.auto??[]),S=p.values,E=m.values,x=[...new Set([...Object.keys(S),...Object.keys(E)])].filter(w=>JSON.stringify(S[w])!==JSON.stringify(E[w])),v=w=>_r(w).spacing==="letter";x.sort((w,L)=>Number(v(w))-Number(v(L)));for(let w of x){let{key:L,view:C,spacing:D}=_r(w),z=L,Te=S[w];if(Te===void 0){delete y[z],Tr(r,p.id)[z]!==void 0&&(u.push([p.id,z]),T.add(z));continue}if(T.delete(z),D==="line")y[z]=nn(Te/100,3);else if(D==="letter"){let co={...l.find(X=>X.id===p.id)?.values??{}};for(let X of x)S[X]===void 0&&delete co[_r(X).key];let uo=Ie({...co,...y}),po=Er(uo,a({...p,values:uo}),C);y[z]=po?nn(Te/po,4):0}else y[z]=Te}return xr({id:p.id,kind:p.kind,name:p.name,values:Ie(y)},T)}),f=t.compression;if(u.some(([p,m])=>(m==="lineHeight"||m==="letterSpacing")&&Hd.includes(p))&&ht(f)!=="normal"){for(let p of Hd){let m=d.find(y=>y.id===p);if(!m)continue;let b={...m.values};for(let y of["lineHeight","letterSpacing"])u.some(([T,S])=>T===p&&S===y)||b[y]===void 0&&!(m.auto??[]).includes(y)&&(b[y]=Tr(r,p)[y]);m.values=Ie(b)}f="normal"}return{saved:d,old:{...t,compression:f}}}function Kd(e,t){let n={text_styles:e.saved};return e.old.compression!==t.compression&&(n.heading_compression=ht(e.old.compression)),n}var nn=(e,t)=>Number(e.toFixed(t)),jd=(e,t)=>tn.indexOf(e)<tn.indexOf(t)?t:e;function Vd(e,t,n="desktop"){return e.map(o=>{let a={...o.values},s=t(o);for(let r of tn){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)]=nn(l*100,1));let d=jd(r,n);u!==void 0&&(a[xt("letterSpacing",r)]=nn(u*Er(o.values,s,d),d===r?2:4))}return{id:o.id,kind:o.kind,name:o.name,values:a}})}function u_(e,t,n="desktop"){return e.map(o=>{let a=o.values,s={...a};for(let u of tn)delete s[xt("lineSpacing",u)],delete s[xt("letterSpacing",u)];let r={id:o.id,kind:o.kind,name:o.name,values:Ie(s)},i={...r.values},l=t({...r,values:{...r.values}});for(let u of tn){let d=a[xt("lineSpacing",u)],f=a[xt("letterSpacing",u)];if(typeof d=="number"&&(i[U("lineHeight",u)]=nn(d/100,3)),typeof f=="number"){let p=Er(r.values,l,jd(u,n));i[U("letterSpacing",u)]=p?nn(f/p,4):0}}return{...r,values:Ie(i)}})}function I1(e){let t={fonts:Tn({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}),sizes:Ds({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:eu(e)},n=e.text_styles??null,o=Array.isArray(n)?wr(on(n,t),t):t;return{fonts:Tn(o.fonts),sizes:Ds(o.sizes),compression:ht(o.compression),typography:o.typography,textStyles:n}}function wr(e,t){let n=p=>e.find(m=>m.id===p)?.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,f=p=>p==="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:f(o.letterCase),weight:o.weight??null,maxPx:o.largestSize??null,weight2:a.weight??null,weight3:s.weight??null,case2:f(a.letterCase),case3:f(s.letterCase)}}}function N1(e){let t=[];for(let n of e){let o=n.values,a=`.${yu(n)}`,s=`[${zo}="${n.id}"]`,r=`${a}, ${s}`,i=[],l=o.font!==void 0?Gt.find(p=>p.key===o.font)?.cssVar:void 0;if(l&&i.push(`font-family: var(${l})`),o.size!==void 0){let p=o.largestSize!==void 0?Math.min(o.size,o.largestSize):o.size;i.push(`font-size: ${p}px`)}let u=Oo(o.color);u&&i.push(`color: ${u}`),o.italic===!0&&i.push("font-style: italic"),o.weight!==void 0&&i.push(`font-weight: ${o.weight}`);let d=[];o.lineHeight!==void 0&&d.push(`line-height: ${o.lineHeight}`),o.letterSpacing!==void 0&&d.push(`letter-spacing: ${o.letterSpacing}em`),n.kind==="body"&&i.push(...d);let f=l_(o.letterCase);f&&n.kind==="body"&&i.push(`text-transform: ${f}`),o.paragraphSpacing&&i.push(`--sf-part-para: ${o.paragraphSpacing}px`),i.length&&t.push(`${r} { ${i.join("; ")} }`),n.kind==="heading"&&d.length&&t.push(`${r}, ${a}:is(h1, h2, h3, h4), ${s}:is(h1, h2, h3, h4) { ${d.join("; ")} }`),n.kind==="heading"&&f&&t.push(`${s}, ${a}:is(h1, h2, h3, h4) { text-transform: ${f} }`),o.paragraphSpacing&&(t.push(`*:has(> ${s}) { --sf-part-para: ${o.paragraphSpacing}px }`),t.push(...Yo(`:is(${r})`,`*:has(> ${s})`))),t.push(...d_(n,r,a,s))}return t.join(`
3
+ `)}function d_(e,t,n,o){let a=e.values,s=Be("textSize",a.size,a.sizeTablet,a.sizePhone),r=Be("textSize",a.largestSize,a.largestSizeTablet,a.largestSizePhone),i=Be("same",a.lineHeight,a.lineHeightTablet,a.lineHeightPhone),l=Be("same",a.letterSpacing,a.letterSpacingTablet,a.letterSpacingPhone),u=Be("spacing",a.paragraphSpacing,a.paragraphSpacingTablet,a.paragraphSpacingPhone),d=Ud("textSize",a.size,a.sizeTablet,a.sizePhone,$t()),f=p_[e.id],p=[];for(let[m,b]of[["tablet",Do],["phone",Fo]]){let y=[],T=[],S=d[m],E=r[m],x=s[m]===void 0&&E===void 0||S===void 0?void 0:E===void 0?S:Math.min(S,E);x!==void 0&&T.push(`font-size: ${x}px`);let v=[];i[m]!==void 0&&v.push(`line-height: ${i[m]}`),l[m]!==void 0&&v.push(`letter-spacing: ${l[m]}em`),e.kind==="body"&&T.push(...v),u[m]!==void 0&&T.push(`--sf-part-para: ${u[m]}px`),T.length&&y.push(`${t} { ${T.join("; ")} }`),e.kind==="heading"&&v.length&&y.push(`${t}, ${n}:is(h1, h2, h3, h4), ${o}:is(h1, h2, h3, h4) { ${v.join("; ")} }`),u[m]!==void 0&&y.push(`*:has(> ${o}) { --sf-part-para: ${u[m]}px }`),u[m]!==void 0&&!a.paragraphSpacing&&y.push(...Yo(`:is(${t})`,`*:has(> ${o})`)),x!==void 0&&f&&y.push(`.sf-themed-content { --size-${f}: ${x}px !important }`),y.length&&p.push(`@media ${b} { ${y.join(" ")} }`)}return p}var p_=Object.fromEntries(Object.entries(Su).map(([e,{step:t}])=>[e,t]));function L1(e){return e!==!0&&e!==!1?"":`em.text-accent { font-style: ${e?"italic":"normal"} }`}function D1(e){return e?Wo[e]:void 0}function f_(e){let t=gr(e);return Ie({font:e.font,color:e.color===void 0?void 0:Me(e.color),size:e.size,weight:e.weight,italic:e.italic,lineHeight:t.lineHeight,letterSpacing:t.letterSpacingEm,paragraphSpacing:e.paragraphSpacing,letterCase:e.case})}function F1(e){return Object.keys(f_(e)).length>0}function B1({saved:e,old:t,styleId:n,values:o}){let a=zd(e);return{saved:m_(a,n,o),old:t}}function m_(e,t,n){return e.map(o=>o.id===t?xr({...o,values:Ie({...o.values,...n})},o.auto):o)}import{jsx as h_}from"react/jsx-runtime";import{useState as g_}from"react";import{TextStylesList as b_}from"efficient-easel/text-styles";import{usePreviewDevice as y_}from"efficient-easel/draw/client";var Yd=["font","color","size","weight","emphasis","lineSpacing","letterSpacing","paragraphSpacing","letterCase","largestSize"],S_=["size","lineSpacing","letterSpacing","letterCase"],__=500,Cr=Gt.map(e=>({value:e.key,label:e.label,family:`var(${e.cssVar})`,italic:e.italicLoaded}));function Xd({saved:e,old:t,colours:n,colourNameOf:o,sizeOf:a,onChange:s,openId:r,onOpenChange:i,readOnly:l=!1,withoutSize:u=!1,onPick:d}){let f=y_(),[p,m]=g_(null),b=on(e,t),y=xo(f),T=Vd(b,a,y);return h_(b_,{styles:T,onChange:S=>s(Wd({saved:e,old:t,cur:T,next:S,sizeOf:a,panelView:y})),fonts:Cr,colours:n,colourNameOf:o,settings:u?Yd.filter(S=>S!=="size"):Yd,auto:S_,openId:r===void 0?p:r,onOpenChange:i??m,readOnly:l,device:y,onPick:d?S=>{let E=b.find(x=>x.id===S.id);E&&d(E)}:void 0,fallback:S=>{let E=b.find(v=>v.id===(S.kind==="heading"?"heading-1":"body-1")),x={};return E?.values.font&&S.id!==E.id&&(x.font=E.values.font),S.kind==="heading"&&(x.weight=__),x}})}var qd="background";function Zd(e){let t=ce(Kt(e));return Nu({main:t.accent,text:t.text,background:t.background,muted:t.muted}).map(n=>({key:n.name,name:n.label??n.name,value:n.value}))}function Jd(e){return Zd(e).filter(t=>t.key!==qd)}function Qd(e){let t=Zd(e).filter(n=>n.key===qd);return n=>{let o=Me(n);return t.find(a=>a.key===o)?.value??o}}import{useEasel as T_}from"efficient-easel/easel";function ep({themeFromDocument:e,persist:t}){let{appState:n,dispatch:o}=T_(C=>C),{fonts:a,setFonts:s,sizes:r,setSizes:i,headingCompression:l,setHeadingCompression:u,headingTypography:d,setHeadingTypography:f,textStyles:p,setTextStyles:m}=B(),b=n.data,y=b.root?.props??{},T=e?Tn(y.fonts):a,S=e?jc:r,E=e?ht(y.headingCompression):l,x=e?Qc(y.headingTypography):d,v={fonts:T,sizes:S,compression:E,typography:x},w=e?y.textStyles:p,L=C=>o({type:"replaceRoot",root:{...b.root,props:{...y,...C}},recordHistory:!0});return{fonts:T,sizes:S,compression:E,typography:x,old:v,saved:w,write:(C,D)=>{let z=wr(on(C.saved,C.old),C.old);e?L({textStyles:C.saved,fonts:z.fonts,headingCompression:z.compression,headingTypography:z.typography}):(m(C.saved),s(z.fonts),i(z.sizes),u(z.compression),f(z.typography)),t(Kd(C,v),D)},writeRoot:L}}import{jsx as N,Fragment as _n,jsxs as Ut}from"react/jsx-runtime";import{useEasel as gb,useRootFields as OR}from"efficient-easel/easel";import{Inspector as PR}from"efficient-easel/fields";import{SettingsGroup as kR}from"efficient-easel/panel";import{useEffect as AR,useRef as RR,useState as sc}from"react";import{jsx as vt,Fragment as w_,jsxs as C_}from"react/jsx-runtime";import{useState as ap}from"react";import{SettingsDefaultReset as O_,SettingsField as P_}from"efficient-easel/panel";import{useEaselStrings as k_}from"efficient-easel/strings";import{AddIcon as A_}from"efficient-easel/icons";import{Button as R_}from"efficient-shell/ui";import{iconOf as I_,noGlyph as N_}from"efficient-easel/screen/lib/document/box-fields";import{jsx as Xo,Fragment as E_,jsxs as tp}from"react/jsx-runtime";import{Button as np,Dialog as x_}from"efficient-shell/ui";function v_(e){return xn("This site has {n} color theme of its own. Clearing takes them away and puts back the four the shop supplies.","This site has {n} color themes of its own. Clearing takes them away and puts back the four the shop supplies.",e)}function op({count:e,onCancel:t,onConfirm:n}){return tp(x_,{open:!0,onClose:t,role:"alertdialog",size:"sm",title:c("Clear this site\u2019s colors?"),footer:tp(E_,{children:[Xo(np,{variant:"secondary",onClick:t,children:c("Cancel")}),Xo(np,{variant:"danger",onClick:n,children:c("Clear colors")})]}),children:[Xo("p",{children:v_(e)}),Xo("p",{className:"mt-2 font-medium",children:c("This cannot be undone.")})]})}var L_=N_("the row's whole content is an action; the gutter names a subject and this row has none \u2014 the button's label is the name GG, 2026-09-23"),D_="Reset color",F_={selected:0,themes:[]};function B_(e){e(F_)}function sp({value:e,onChange:t}){let n=e?.themes??[],o=n.length===0,a=Pe(e),[s,r]=ap(!1),i=k_(),[l,u]=ap(null),d=(S,E)=>{t({...a,themes:a.themes.map((x,v)=>v===S?E:x)})},f=Kt(a).accent,p=new Set(a.themes.map(S=>S.brandInk).filter(Boolean)),m=Uc.filter(S=>!p.has(S)).map(S=>Gc(f,S)),b=[...a.themes,...m],y=S=>{if(S<a.themes.length)return t({...a,selected:S});let E=[...a.themes,b[S]];t({...a,themes:E,selected:E.length-1})},T=()=>{let S=[...a.themes,{...ce(a.themes[a.selected])}];t({...a,themes:S,selected:S.length-1}),u(S.length-1)};return C_(w_,{children:[o?null:vt(P_,{label:c(D_),icon:I_(L_),labelId:"sf-theme-reset",action:vt(O_,{label:c("all theme colors"),words:i.panel,changed:!0,onReset:()=>r(!0)})}),s&&vt(op,{count:n.length,onCancel:()=>r(!1),onConfirm:()=>{r(!1),B_(t)}}),vt("div",{className:"sf-theme-list",role:"radiogroup","aria-label":c("Theme"),children:b.map((S,E)=>vt(Ao,{index:E,colors:S,selected:E===a.selected,open:l===E&&E<a.themes.length,editable:E<a.themes.length,onPick:()=>y(E),onEdit:()=>u(x=>x===E?null:E),onChangeColors:x=>d(E,x)},E))}),vt(R_,{variant:"secondary",leftIcon:vt(A_,{}),onClick:T,className:"sf-theme-add",children:c("Add new theme")})]})}import{jsx as as}from"react/jsx-runtime";import{SettingsDefaultReset as Lk,SettingsField as Dk}from"efficient-easel/panel";import{SquareIcon as Fk}from"efficient-easel/icons";import{jsx as g,jsxs as We,Fragment as je}from"react/jsx-runtime";import{parseOption as ip}from"efficient-shell/format";var Or=["image","video"],lp={image:"imageFocal",image2:"imageFocal2"},H_={HeroSingle:"image",HeroSlide:"video"};function SL(e,t){return ip(Or,H_[e],t)}var cp=["one","side","stacked"],M_="one",_L={one:"One",side:"Side by side",stacked:"Stacked"};function up(e){return ip(cp,M_,e)}function rp(e){return e==="one"?1:2}function U_(e,t){if(cp.includes(e))return e;let n=up(t);return n==="side"?"stacked":n}function TL(e){let t=up(e.mediaLayout);return Math.max(rp(t),rp(U_(e.mediaLayoutPhone,t)))}import{cloneElement as El,createContext as tO,useContext as Fh,useEffect as nO,useId as Bh,useRef as to,useState as no}from"react";import{useEasel as es,useSelectedHost as Lt}from"efficient-easel/easel";import{PIN_LENGTH as Va,toDateKey as wz,fromDateKey as Cz,parseOption as oO}from"efficient-shell/format";function G_(e){return!!e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.src=="string"}function re(e){return typeof e=="string"?e:G_(e)?e.src:""}function xL(e,t,n){return Pr(e,t.split("."),n)}function Pr(e,t,n){if(t.length===0)return n(e);let[o,...a]=t,s=o.endsWith("[]"),r=s?o.slice(0,-2):o;if(!e||typeof e!="object"||Array.isArray(e))return e;let i=e;if(!(r in i))return e;let l=i[r];if(s){if(!Array.isArray(l))return e;let d=!1,f=l.map(p=>{let m=Pr(p,a,n);return m!==p&&(d=!0),m});return d?{...i,[r]:f}:e}let u=Pr(l,a,n);return u===l?e:{...i,[r]:u}}import{parseOption as pp}from"efficient-shell/format";var $_=["upload","youtube"],z_="upload",OL={upload:"Upload",youtube:"YouTube"},W_=["background","click"],K_="background",PL={background:"Background",click:"Click to play"};function kL(e){return pp($_,z_,e)}function AL(e){return pp(W_,K_,e)}var dp=/^[A-Za-z0-9_-]{11}$/,j_=/^(?:www\.|m\.|music\.)?(?:youtube\.com|youtube-nocookie\.com|youtu\.be)$/;function RL(e){let t=typeof e=="string"?e.trim():"";if(!t)return null;if(dp.test(t))return t;let n;try{n=new URL(/^[a-z]+:\/\//i.test(t)?t:`https://${t}`)}catch{return null}if(n.protocol!=="https:"&&n.protocol!=="http:"||!j_.test(n.hostname))return null;let o=n.pathname.split("/").filter(Boolean),a=n.hostname.endsWith("youtu.be")?o[0]:o[0]==="watch"?n.searchParams.get("v"):o[0]==="embed"||o[0]==="shorts"||o[0]==="live"||o[0]==="v"?o[1]:null;return a&&dp.test(a)?a:null}function IL(e,t){let n=t==="click"?"autoplay=1&playsinline=1&rel=0":`autoplay=1&mute=1&loop=1&playlist=${e}&controls=0&playsinline=1&rel=0&disablekb=1`;return`https://www.youtube-nocookie.com/embed/${e}?${n}`}function NL(e){return`https://i.ytimg.com/vi/${e}/maxresdefault.jpg`}function LL(e){return`https://i.ytimg.com/vi/${e}/hqdefault.jpg`}var DL="Play video";var kr={frame:"Video frame",image:"Image"},FL={any:[{field:"loadingShows",is:"image"},{all:[{not:{field:"loadingShows",set:!0}},{field:"poster",set:!0}]}]};function In(e){let t=e.loadingShows;return t==="image"?"image":t!=null&&t!==""?"frame":re(e.poster)?"image":"frame"}function BL(e,t="desktop"){let[n,o]=t==="phone"?[e.posterPhone,e.videoFramePhone]:[e.poster,e.videoFrame],[a,s]=In(e)==="image"?[n,o]:[o,n];return re(a)||re(s)||void 0}function fp(e){if(re(e.mediaVideo)){if(In(e)==="frame")return re(e.videoFrame)?void 0:re(e.poster)?"frame-missing-image":"frame-missing-surface";if(!re(e.poster))return re(e.videoFrame)?"image-missing-frame":"image-missing-surface"}}var qo="videoFrames",Ar="videoFramesNotOwn";function mp(e,t,n){let o=re(e.mediaVideo);if(!o||!t||In(e)!=="frame"||re(e.videoFrame))return;let a=t[o],s=!!re(e.poster);if(a?.state==="ready")return null;if(s)return!a||a.state==="pending"?void 0:"image-no-frame";if(!a)return n?"save-makes-frame":void 0;switch(a.state){case"pending":return a.noted!=="save"&&n?"save-makes-frame":null;case"dark":return"starts-dark";case"outside":return"outside";case"unsupported":return"unsupported";case"failed":return"failed";default:return null}}function V_(e,t){let n=re(e),o=n&&t?t[n]:void 0;return o?.state==="ready"&&o.frame?o.frame:void 0}function HL(e,t,n){let o=n?.[Ar];if(!(Array.isArray(o)&&o.includes(e)))return V_(t,n?.[qo])}import{useSyncExternalStore as Y_}from"react";function hp(){let e=new Map,t=new Set,n=o=>(t.add(o),()=>{t.delete(o)});return{get:o=>e.get(o),has:o=>e.has(o),set(o,a){if(!(e.has(o)&&e.get(o)===a)){e.set(o,a);for(let s of t)s()}},use(o){let a=()=>o?e.get(o):void 0;return Y_(n,a,a)}}}import{zoneKey as X_}from"efficient-easel/data";var xe="SiteHeader",Ge="SiteFooter",Rr="sections",zL=[xe,Ge],Zo=e=>e===xe||e===Ge,WL=e=>X_({parentId:e,slot:Rr});function KL(e,t,n=[]){return{type:e,props:{id:t,[Rr]:n}}}var q_=new Set(["Footer",xe,Ge]);function Jo(e){let t=new Set,n=!1,o=e.filter(a=>{let s=a?.type??"";return s==="Header"?(n=!0,!1):q_.has(s)?t.has(s)?(n=!0,!1):(t.add(s),!0):!0});return n?o:e}function jL(e,t){return e.some(n=>n?.type===t.type)?e:t.type===xe?[t,...e]:[...e,t]}var gp={[xe]:{max:3,takes:["Flex","Ticker"]},[Ge]:{max:6,takes:["Flex","Prose","Logos","Divider"]}};function VL(e,t,n){if(!Zo(e))return!0;let o=gp[e];return n<o.max&&o.takes.includes(t)}function YL(e,t){let n=t,o=n?.props?.id;if(o==null)return null;let a=e?.content;if(!Array.isArray(a))return null;for(let s of a){if(!Zo(s?.type))continue;let r=s.props?.[Rr];if(!Array.isArray(r)||!r.some(l=>l?.props?.id===o))continue;let i=gp[s.type];return i.takes.includes(n?.type??"")?r.length>=i.max?{group:s.type,why:"full"}:null:{group:s.type,why:"type"}}return null}import{locateNode as Z_}from"efficient-easel/draw";function Ir(e){if(!e)return null;let t=e.lastIndexOf(":");return t>0?{ownerId:e.slice(0,t),slot:e.slice(t+1)}:null}function Qo(e,t,n){let o=Ir(n?.zone),a=o?Z_(e,t,o.ownerId):null;return a&&o?{...a,slot:o.slot}:null}import{isNode as CT}from"efficient-easel/data";import{convertLength as J_,rowGrid as Q_}from"efficient-easel/screen/lib/content/length-units";var V={min:1e3,max:2e3,step:50,default:1600};function eT(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}var Dr="--sf-site-width",Br=`var(${Dr},${V.default}px)`,tD="100vw",nD=`max-w-[${Br}]`,oD=`max-w-[${V.default}px]`;function yp(e){return typeof e!="number"||!Number.isFinite(e)?V.default:Math.round(Math.min(Math.max(e,V.min),V.max))}function aD(e,t){let n=mt(e,t,"size",V);if(n!==null)return{[Dr]:n};let o=yp(e);return o===V.default?{}:{[Dr]:`${o}px`}}var ie={min:0,max:80,step:4,default:40,typedMax:Number.POSITIVE_INFINITY},Fr="--sf-site-gutter",Ne={min:0,max:24,step:4,typedMax:Number.POSITIVE_INFINITY},tT=Q_({kind:"spacing"},"vw",ie).max;function Sp(e,t){return e<=t?`${e}px`:`min(${e}px, ${tT}vw)`}var bp="--sf-site-gutter-phone",nT="max-view-tablet:[--sf-site-gutter:var(--sf-site-gutter-phone)]!",oT="max-view-wide:[&_[data-sf-line~=edge]:not([data-sf-line~=edge]_*)]:[--sf-site-gutter:var(--sf-site-gutter-phone)]",ve=`var(${Fr},${ie.default}px)`,aT=`px-[${ve}]`;var et={md:`min(24px,${ve})`,sm:`min(20px,${ve})`,frame:`min(24px,${ve})`,tabs:`min(16px,${ve})`},sD=[[`max-view-desktop:px-[${et.md}]`,"max-view-desktop:px-6"],[`max-view-desktop:px-[${et.tabs}]`,"max-view-desktop:px-4"],[`max-[960px]:px-[${et.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${et.md}]`,"max-[900px]:px-6"],[`max-view-wide:px-[${et.md}]`,"max-view-wide:px-6"],[`max-view-tablet:px-[${et.sm}]`,"max-view-tablet:px-5"],[`max-view-wide:px-[${et.sm}]`,"max-view-wide:px-5"],[`max-[640px]:px-[${et.sm}]`,"max-[640px]:px-5"],[`view-wide:px-[${ve}]`,"view-wide:px-10"],[`max-view-tablet:px-[min(24px,${ve})]`,"max-view-tablet:px-6"],[`max-view-wide:-mx-[min(20px,${ve})]`,"max-view-wide:-mx-5"],[`max-view-tablet:-mx-[min(20px,${ve})]`,"max-view-tablet:-mx-5"],[`-mx-[${ve}]`,"-mx-10"],[aT,"px-10"]];var wt="sideSpaceOnce",rD="data-sf-side",sT="once";function iD(e){if(!(!e||typeof e!="object"))return e[wt]===!0?sT:void 0}var _p="max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";function Hr(e){return Ln[e??"box"]}var ea="[[data-sf-side=once]_&]:max-view-wide:px-[var(--sf-site-gutter-phone,min(24px,var(--sf-site-gutter,40px)))]",Nn="[[data-sf-side=once]_&]:max-view-wide:px-[var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]",ta={"max-[960px]":ea,"max-[900px]":ea,"max-view-desktop":ea,"max-[1100px]":ea,"max-view-wide":Nn,"max-view-tablet":Nn,"max-[720px]":Nn,"max-[640px]":Nn,"max-[800px]":Nn},Nr="var(--sf-pad-site,var(--sf-box-g,var(--sf-site-gutter,40px)))",Lr="[--sf-edge-g:var(--sf-pad-site)]",Ln={box:{className:"[--sf-pad-site:var(--sf-box-g,var(--sf-site-gutter,40px))] max-[960px]:[--sf-pad-site:min(24px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:Nr,edge:Lr,frame:"max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",once:"[[data-sf-side=once]_&]:max-view-wide:[--sf-pad-site:var(--sf-site-gutter-phone,min(24px,var(--sf-box-g,var(--sf-site-gutter,40px))))]",onceFrame:ta["max-[960px]"],onceGutter:"[[data-sf-side=once]_&]:max-[960px]:[--sf-box-g:min(24px,var(--sf-site-gutter,40px))] [[data-sf-side=once]_&]:max-view-wide:[--sf-box-g:var(--sf-site-gutter-phone,min(24px,var(--sf-site-gutter,40px)))]"},site:{className:"[--sf-pad-site:var(--sf-box-g,var(--sf-site-gutter,40px))] max-view-wide:[--sf-pad-site:min(20px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:Nr,edge:Lr,frame:_p,once:"[[data-sf-side=once]_&]:max-view-wide:[--sf-pad-site:var(--sf-site-gutter-phone,min(20px,var(--sf-box-g,var(--sf-site-gutter,40px))))]",onceFrame:ta["max-view-wide"],onceGutter:"[[data-sf-side=once]_&]:max-view-wide:[--sf-box-g:var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]"},none:{className:"[--sf-pad-site:0px] max-view-wide:[--sf-pad-site:min(20px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:Nr,edge:Lr,frame:"view-wide:px-0 max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]",once:"[[data-sf-side=once]_&]:max-view-wide:[--sf-pad-site:var(--sf-site-gutter-phone,min(20px,var(--sf-box-g,var(--sf-site-gutter,40px))))]",onceFrame:ta["max-view-wide"],onceGutter:"[[data-sf-side=once]_&]:max-view-wide:[--sf-box-g:var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]"}},lD=`mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] ${_p}`,cD="[--sf-box-g:var(--sf-site-gutter,40px)] [&>*]:[--sf-site-gutter:0px]",rT="[[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter-phone:0px]";function uD(e){return`${rT} ${Ln[e].onceGutter}`}var iT="[[data-sf-side=once]_&]:[--sf-box-g:var(--sf-site-gutter,40px)] [[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter:0px] [[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter-phone:0px]",lT="[[data-sf-side=once]_&]:max-view-wide:-mx-[var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]",cT=/^([^\s:]+):px-\[min\((?:20|24)px,var\(--sf-site-gutter,40px\)\)\]$/,uT="max-view-wide:-mx-[min(20px,var(--sf-site-gutter,40px))]";function dT(e){if(!e)return"";let t=[];for(let n of e.split(/\s+/)){let o=cT.exec(n)?.[1],a=o?j(ta,o):void 0;a?t.push(a):n===uT&&t.push(lT)}return t.join(" ")}var dD="[[data-sf-side=once]_&]:[--sf-pad-site:inherit]",pD="[[data-sf-side=once]_&]:[--sf-edge-g:var(--sf-box-g,var(--sf-site-gutter,40px))]";function pT(e){if(!e)return"";let t=e.split(" "),n=["none","site","box"].find(o=>Ln[o].className.split(" ").every(a=>t.includes(a)));return n?`${iT} ${Ln[n].once} ${Ln[n].onceGutter}`:""}function fD(e,t){let n=t?[pT(e),dT(e)].filter(Boolean).join(" "):"";return n?`${e} ${n}`:e}var mD="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]";function Tp(e){return typeof e!="number"||!Number.isFinite(e)?ie.default:Math.round(Math.min(Math.max(e,ie.min),ie.typedMax))}function hD(e,t){let n=mt(e,t,"spacing",ie);if(n!==null)return{[Fr]:n};let o=Tp(e);return o===ie.default?{}:{[Fr]:Sp(o,ie.max)}}function Ep(e){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,Ne.min),Ne.typedMax))}function xp(e){return typeof e=="number"&&Number.isFinite(e)?yp(e):null}function gD(e,t){let n=mt(e,t,"spacing",Ne);if(n!==null)return{[bp]:n};let o=Ep(e);return o===null?{}:{[bp]:Sp(o,Ne.max)}}function bD(e){return Ep(e)===null?"":`${nT} ${oT}`}function vp(e,t){let n=Bc(e,t,"spacing",ie),o=n===null?Tp(e):J_(n,F(t),"px","mobile",Ne);return Math.min(Ne.max,o)}var wp=Br,yD=`max-w-[${wp}]`,SD=`max-w-[min(var(--sf-page-cap,${V.default}px),${V.default}px)]`,Cp="--sf-hero-cap",fT=`var(${Cp},none)`,_D=`max-w-[${fT}]`,mT="--sf-hero-bleed-m",hT="--sf-hero-bleed-w",gT="--sf-hero-chrome-x",bT="--sf-hero-chrome-cap";function TD(e){return e===!0?{[Cp]:wp,[mT]:"auto",[hT]:"100%",[gT]:"24px",[bT]:"none"}:{}}var Mr=`calc(${Br} - ${ve}*2)`,ED=`max-w-[${Mr.replace(/ /g,"_")}]`;var yT="--sf-chrome-cap",ST=`var(${yT},${Mr})`,xD="data-page-width";function vD(e){return e==="full"?"full":null}function wD(e){return e==="full"?null:eT(e==="content"?Mr:ST)}function CD(e){if(e==="full")return"full";if(e==="content")return"content"}var kD="data-sf-site-css",_T="site",Dn="siteCustomCss";function TT(e){return e&&typeof e=="object"?su(e,Dn):""}function AD(e){return TT(e)?_T:void 0}var ET=["tall","square","wide"],xT="tall";function ND(e){return ET.includes(String(e??""))?String(e):xT}var LD={sectionNumber:"\xB7 Locations",heading:"Our *locations.*",tagline:"Visit us in person \u2014 find your nearest studio below.",galleryKicker:"Gallery",galleryHint:"Hover to see in colour \xB7 click to jump",mapTheme:"auto"},DD=[{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
4
+ Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""},{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
5
+ Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""}],vT=/^https?:\/\//i;function FD(e){let t=(e.mapsUrl??"").trim();return{photo:"",group:"",groupName:"",name:e.name??"",state:e.state??"",country:e.country??"",timezone:"",address:e.address??"",phone:e.phone??"",hours:e.hours??"",lat:Ps(e.lat),lng:Ps(e.lng),mapsUrl:vT.test(t)?t:""}}function Op(e){let t=String(e??"").split(" \xB7 ");return{state:(t[0]??"").trim(),country:(t[1]??"").trim()}}var BD="other",HD={routingNumber:"02 \xB7 Routing",routingTagline:"What can we help you with?",groups:[{id:"fitment",eyebrow:"A \xB7 Label",title:"Group one",copy:"Short description of this routing group.",response:"< 48h"},{id:"trade",eyebrow:"B \xB7 Label",title:"Group two",copy:"Short description of this routing group.",response:"< 24h"},{id:"press",eyebrow:"C \xB7 Label",title:"Group three",copy:"Short description of this routing group.",response:"< 48h"},{id:"order",eyebrow:"D \xB7 Label",title:"Group four",copy:"Short description of this routing group.",response:"< 24h"}],formNumber:"03 \xB7 Message",formHeading:"Send *a note.*",metaLines:["Encrypted in transit","Stored 12 months"],showOther:!0,otherLabel:"Other",otherNoteTitle:"No matching team",otherNoteBody:"Tell us what you need in the message field below \u2014 we'll route it to whoever can help.",buttonText:"Send Message \u2192",consent:"By submitting, you agree to our privacy policy. We never share contact details with third parties.",channels:[{label:"Team one",value:"team-one@email.com",href:"mailto:team-one@email.com",sub:"Detail \xB7 Detail",groupId:"fitment"},{label:"Team two",value:"team-two@email.com",href:"mailto:team-two@email.com",sub:"Detail \xB7 Detail",groupId:"trade"},{label:"Team three",value:"team-three@email.com",href:"mailto:team-three@email.com",sub:"Detail \xB7 Detail",groupId:"press"},{label:"Team four",value:"team-four@email.com",href:"mailto:team-four@email.com",sub:"Detail \xB7 Detail",groupId:"order"},{label:"Phone",value:"+1 (000) 000-0000",href:"tel:+10000000000",sub:"Mon\u2013Fri \xB7 9:00\u201318:00"}]};var tt="siteOffices",an=e=>typeof e=="string"?e:"",Pp=e=>O(e)??0;function wT(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t=e;return{role:an(t.role),city:an(t.city),country:an(t.country),address:an(t.address),phone:an(t.phone),group:an(t.group),hq:t.hq===!0,lat:Pp(t.lat),lng:Pp(t.lng)}}function zD(e){let t=e&&typeof e=="object"?e[tt]:void 0;return Array.isArray(t)?t.map(wT).filter(n=>n!==null):[]}function WD(e){let{state:t,country:n}=e.country.includes(" \xB7 ")?Op(e.country):{state:"",country:e.country.trim()};return{photo:"",group:e.group??"",groupName:"",name:e.city,state:t,country:n,timezone:"",address:e.address??"",phone:e.phone??"",hours:"",lat:e.lat,lng:e.lng,mapsUrl:""}}var kp={key:lc,label:"Site offices",blocks:["Footprint","ContactLocations"]};var Gr="Footer",Ap=[xe,Gr,Ge],Fn=[wt,tt,Dn],OT=[Ge,Gr],$r=e=>OT.includes(e?.type??"");function PT(e){let t=e?.props;if(!t||!Fn.some(o=>o in t))return e;let n={};for(let[o,a]of Object.entries(t))Fn.includes(o)||(n[o]=a);return{...e,props:n}}function kT(e,t){let n=Fn.filter(a=>t&&a in t);if(!n.length)return e;let o={...e.props??{}};for(let a of n)o[a]=t[a];return{...e,props:o}}function JD(e){return Array.isArray(e)?e.find(t=>$r(t))?.props??null:null}function AT(e,t){if(!t)return e;let n=Fn.filter(a=>a in t&&(!e||JSON.stringify(e[a])!==JSON.stringify(t[a])));if(!n.length)return e;let o={...e??{}};for(let a of n)o[a]=t[a];return o}var nt=e=>{let t=e?.content;return Array.isArray(t)?t:[]},ot=e=>{let t=e?.zones;return t&&typeof t=="object"&&!Array.isArray(t)?t:null},sn=e=>{let t=e?.props?.id;return typeof t=="string"?t:void 0},Rp=e=>Ir(e)?.ownerId??"";function Ip(e){let t=Jo(nt(e)),n=t.some(o=>o?.type===Ge);return t.filter(o=>o?.type===xe||o?.type===Ge||o?.type===Gr&&!n)}function na(e,t){let n=new Set,o=a=>{if(Array.isArray(a)){for(let s of a)o(s);return}if(!(!a||typeof a!="object")){if(CT(a)){let s=sn(a);s&&n.add(s)}for(let s of Object.values(a))o(s)}};if(o(e),t){let a=!0,s=new Set;for(;a;){a=!1;for(let[r,i]of Object.entries(t))s.has(r)||!n.has(Rp(r))||(s.add(r),o(i),a=!0)}}return n}function Np(e,t){let n=nt(e).filter(o=>{let a=sn(o);return typeof o?.type=="string"&&Ap.includes(o.type)||a!==void 0&&t(a)});return n.length?na(n,ot(e)):new Set}function Ur(e,t){let n={},o={};for(let[a,s]of Object.entries(e??{}))(t.has(Rp(a))?n:o)[a]=s;return{owned:n,rest:o}}function Lp(e){let t=e?.root,n=t&&typeof t=="object"?t.props:void 0;return n&&typeof n=="object"&&!Array.isArray(n)?n:null}function QD(e,t){if(!t)return e;let n=Ip(t);if(!n.length)return e;let o=n.filter(l=>l.type===xe),a=Lp(t),s=n.filter(l=>l.type!==xe).map(l=>$r(l)?kT(l,a):l),r={...e,content:[...o,...nt(e),...s]},{owned:i}=Ur(ot(t),na(n,ot(t)));return Object.keys(i).length&&(r.zones={...ot(e)??{},...i}),r}function eF(e,t){if(!t)return{page:e,chrome:null};let n=Ip(t),o=new Set(n.map(sn).filter(v=>!!v)),a=[],s=[],r=null;for(let v of nt(e)){let w=sn(v),L=w&&o.has(w)||Zo(v?.type);if(L&&$r(v)&&!r){r={};for(let D of Fn)v.props&&D in v.props&&(r[D]=v.props[D])}let C=PT(v);L?s.push(C):a.push(C)}let i=new Map(s.map(v=>[sn(v),v])),l=new Set,u=Jo(nt(t)).flatMap(v=>{let w=sn(v);if(!w||!o.has(w))return[v];let L=i.get(w);return L?(l.add(L),[L]):[]});for(let v of s)l.has(v)||u.some(w=>w?.type===v.type)||(u=v.type===xe?[v,...u]:[...u,v]);u=Jo(u);let d=u.length===nt(t).length&&u.every((v,w)=>v===nt(t)[w]||JSON.stringify(v)===JSON.stringify(nt(t)[w])),f=ot(e),p=na(u,f),{owned:m,rest:b}=Ur(f,p),y=Ur(ot(t),na(n,ot(t))).owned,T={...t,content:d?t.content:[...u]},S=RT(t,r);S!==t.root&&(T.root=S);let E=ot(t);if(E||Object.keys(m).length){let v={};for(let[w,L]of Object.entries(E??{}))w in y?w in m&&(v[w]=m[w]):v[w]=L;for(let[w,L]of Object.entries(m))w in v||(v[w]=L);T.zones=v,E&&IT(T.zones,E)&&(T.zones=E)}let x={...e,content:a};return f&&(Object.keys(b).length||!Object.keys(y).length?x.zones=b:delete x.zones),{page:x,chrome:T}}function RT(e,t){let n=Lp(e),o=AT(n,t);return o===n?e.root:{...e.root&&typeof e.root=="object"?e.root:{},props:o}}function IT(e,t){let n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&n.every((a,s)=>a===o[s]&&e[a]===t[a])}function tF(e,t){return n=>e(n)||n!==void 0&&Ap.includes(n)&&t()}var Dp=null;function oF(e){Dp=e}function Fp(){return Dp}var Bp=null;function aF(e){Bp=e}function sF(){return Bp}var zr=hp();function Hp(e,t,n){if(!t)return;let o={...zr.get(e)};for(let[a,s]of Object.entries(t))o[a]={...s,noted:n};zr.set(e,o)}function dF(e,t){Hp(e,t,"load")}function pF(e,t){Hp(e,t,"save")}function Mp(e){return zr.use(e)}var Wr=e=>!!Fp()?.sectionOf(e);function Up(e,t=Wr){return Np(e,t)}function Gp(e,t,n,o=Wr){if(n)return e&&Up(t,o).has(e)?void 0:n}function fF(e,t,n=Wr){if(!e)return{};let o=[...Up(t,n)];return o.length?{[qo]:e,[Ar]:o}:{[qo]:e}}import{ScreenDocumentContext as aO}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as sO,hidableText as rO}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Hh,LINK_FIELD_MARKER as iO,MEDIA_FIELD_MARKER as lO,SCAFFOLD_FIELD_MARKER as cO,TEXT_FIELD_MARKER as Ke,foldMetaOf as Mh,textFieldIdentifier as Lz}from"efficient-easel/draw";import{jsx as Yp}from"react/jsx-runtime";import{useCallback as BT}from"react";import{useEasel as HT}from"efficient-easel/easel";import{SettingsAction as MT}from"efficient-easel/panel";import{isLengthUnit as DT}from"efficient-easel/screen/lib/content/length-units";import{CORNER_SIDES as oa,hasCornerSubset as Bn,normalizeCornerSides as Le}from"efficient-easel/screen/lib/content/style-keys";import{isLengthUnit as NT}from"efficient-easel/screen/lib/content/length-units";var Kr={kind:"radius",unitKey:"sectionCornersUnit"};function jr(e){return typeof e=="number"&&Number.isFinite(e)}function yF(e,t,n){if(!jr(e))return;let o=NT(n)&&n!=="px"?Yt(e,n):Yt(ke(e));if(Object.keys(o).length===0)return;let a=o[Vr];if(typeof a!="string")return o;let s=Bn(t)?Ct(a,Le(t)??[]):a;return{...o,[LT]:s}}var LT="--sf-section-radius",Vr="--sf-card-radius";function Ct(e,t){return oa.map(n=>t.includes(n)?e:"0").join(" ")}var $p=[{value:"tl",label:"Top left"},{value:"tr",label:"Top right"},{value:"bl",label:"Bottom left"},{value:"br",label:"Bottom right"}];var Hn={kind:"radius",unitKey:"cardCornersUnit"},FT="--sf-card-box-radius";function Yr(e){return typeof e=="number"&&Number.isFinite(e)}function xF(e,t,n){if(!Yr(e))return;let o=(DT(n)&&n!=="px"?Yt(e,n):Yt(ke(e)))[Vr];if(typeof o!="string")return;let a=Bn(t)?Ct(o,Le(t)??[]):o;return{[FT]:a}}function zp(e,t){let n=e.find(r=>r?.props?.id===t);if(!n)return[...e];let o=n.props?.cardCorners,a=n.props?.cardCornerSides,s=n.props?.[Hn.unitKey];return e.map(r=>r?.props?.id===t?r:{...r,props:{...r.props,cardCorners:o,cardCornerSides:a,[Hn.unitKey]:s}})}function Wp(e,t,n){let o=Qo(e,t,n),a=o?.slot??"",s=o&&Array.isArray(o.item.props[a])?o.item.props[a]:[],r=n?.index??-1,i=r>=0?s[r]:void 0,l=i?.props?.id?String(i.props.id):"",u=Math.max(s.length-1,0);return!o||!l?{can:!1,reason:"unreachable",others:0}:s.length<=1?{can:!1,reason:"alone",others:u}:Yr(i?.props?.cardCorners)?{can:!0,others:u,zone:o.zone,index:o.index,data:{...o.item,props:{...o.item.props,[a]:zp(s,l)}}}:{can:!1,reason:"unset",others:u}}function Kp(e){return e.can?xn("Gives the other card this card's Corners.","Gives the other {n} cards this card's Corners.",e.others):e.reason==="alone"?c("This is the only card in the section."):e.reason==="unset"?c("Set this card's corners first."):c("This card is not in a section that can share corners.")}function jp(e){return xn("Applied to {n} card","Applied to {n} cards",e)}function Vp(e,t){e.can&&t(e.zone,e.index,e.data)}import{useSectionOps as UT}from"efficient-easel/screen/lib/document/use-section-ops";var GT="apply-corners-to-siblings",$T="Apply to all cards";function zT({plan:e,onPress:t}){return Yp(MT,{id:GT,label:c($T),note:Kp(e),disabled:!e.can,doneLabel:jp(e.others),onPress:t})}function Xp(){let{appState:e,config:t}=HT(s=>s),n=UT(),o=Wp(t,e.data.content??[],e.ui.itemSelector),a=BT(()=>{Vp(o,n.replaceComponent)},[o,n]);return Yp(zT,{plan:o,onPress:a})}import{isShown as af,lazyShowWhenContext as aE}from"efficient-shell/format";var at="product",aa="recordType",qp={key:at,label:"Product",fields:[]},WT=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,KT=/^[a-z][A-Za-z0-9]*$/,jT=["text","date","images"],Xr=new Map,Zp=0;function VT(e){if(typeof e.key!="string"||!WT.test(e.key))throw new Error(`A record type key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(e.key===at)throw new Error("The product record type is the builder's own and is not declared by a host.");if(typeof e.label!="string"||!e.label.trim())throw new Error(`The record type ${e.key} has no label.`);let t=new Set;for(let n of e.fields){if(typeof n.key!="string"||!KT.test(n.key)||t.has(n.key))throw new Error(`The record type ${e.key} has a field key it cannot use: ${JSON.stringify(n.key)}.`);if(!jT.includes(n.kind))throw new Error(`The field ${n.key} of ${e.key} has no kind ${JSON.stringify(n.kind)}.`);t.add(n.key)}return{key:e.key,label:e.label.trim(),fields:e.fields.map(n=>({...n}))}}function BF(e){let t=e.map(VT);for(let n of t)Xr.set(n.key,n);t.length&&(Zp+=1)}function qr(){return[qp,...Xr.values()]}function YT(e){return e===at?qp:Xr.get(e)??null}function Zr(){return Zp}function Mn(e){let t=e?.[aa];return typeof t!="string"?at:t.trim()||at}function Jr(e){return Mn(e)===at}function HF(e,t){let n=YT(e)?.fields??[];return t?n.filter(o=>t.includes(o.kind)):n}var sa="product",Jp="tyre",XT=[sa,Jp];function GF(e){return XT.includes(e)}var qT="productType",ZT={[sa]:"alloy-wheel",[Jp]:"tyre"},JT=["alloy-wheel","tyre"];function Qp(e,t){return Jr(t)?ef(t)??ZT[e]??null:null}function ef(e){if(!Jr(e))return null;let t=e?.[qT];return typeof t=="string"&&JT.includes(t)?t:null}function $F(e){let t=e?.root;return ef(t?.props)}var QT="Main Pages",eE="Dynamic Pages",tE="dynamic",nE="dynamic";function Qr(e){return e.kind===nE}var ei="lightbox";function WF(e){return e.kind===ei}function KF(e){let t=[],n=[];for(let o of e){if(Qr(o)){n.push(o);continue}let a=o.groupKey??(o.group?`folder:${o.group}`:"top"),s=t[t.length-1];s&&s.key===a?s.rows.push(o):t.push({key:a,label:o.group??QT,rows:[o]})}if(n.length){let o=t.findIndex(a=>a.key.startsWith("system:"));t.splice(o===-1?t.length:o,0,{key:tE,label:eE,rows:n})}return t}var ra=null,tf=null;function oE(e,t){ra=e,tf=t}function qF(e){oE(e,null)}function ZF(){return ra}function Un(){return Qr({kind:tf})||ra===sa}function JF(e){return Qp(ra??"",e)??"alloy-wheel"}function nf(e){return Un()?Mn(e):null}function uB(e,t,n){let o=!1,a={};for(let[s,r]of Object.entries(e)){if(!af(Os(r),t??{},n)){o=!0;continue}let i=sE(r,t?.[s],t??{},n);i!==r&&(o=!0),a[s]=i}return o?a:e}function sE(e,t,n,o){let a=e?.options;if(!Array.isArray(a))return e;let s=a.filter(r=>r?.value===t||!r?.showWhen||af(r.showWhen,n,o));return s.length===a.length?e:{...e,options:s}}function dB(e,t,n,o){let a=Qo(t,n,o);return{device:e,parentType:a?.item.type,parent:a?.item.props}}function of(e,t){if(!e||typeof e!="object")return!1;let n=e;if(typeof n.context=="string"&&(n.context===t||n.context.startsWith(`${t}.`)))return!0;if("not"in n)return of(n.not,t);for(let o of[n.all,n.any])if(Array.isArray(o)&&o.some(a=>of(a,t)))return!0;return!1}function pB(e,t={}){return aE({parentType:()=>e.parent?.type??void 0,parent:()=>e.parent?.props??void 0,dynamicPage:()=>Un(),root:()=>e.appState?.data?.root?.props,...t})}import{isLengthUnit as rE}from"efficient-easel/screen/lib/content/length-units";var sf=1,iE="cardImageUnit",ti={kind:"radius",unitKey:iE},rf={kind:"radius"};function lE(e){return ke(e)}function yB(e,t){if(rE(t)&&t!=="px"){let o=O(e);return o!==void 0&&o>=0?{"--sf-card-image-radius":M(o,t)}:{}}let n=lE(e);return n===null?{}:{"--sf-card-image-radius":`${n}px`}}import{isLengthUnit as cE}from"efficient-easel/screen/lib/content/length-units";var lf={kind:"radius",unitKey:"cornersUnit"},cf=1,uf="Corners";function uE(e){return ke(e)}function wB(e,t,n){let o=cE(n)&&n!=="px"?O(e):void 0,a=o===void 0?uE(e):null;if(o===void 0&&a===null)return null;let s=o!==void 0?M(Math.max(0,o),n):`${a}px`;return{borderRadius:Bn(t)?Ct(s,Le(t)??[]):s}}import{phoneKey as yf}from"efficient-easel/screen/lib/content/view-tiers";var pf=12,rn=6,dE=En,ia={twoAcross:{label:"Two across",across:2,acrossPhone:2,desktop:[[6,1],[6,1]],phone:[[3,1],[3,1]]},zigzag:{label:"Zigzag",across:2,acrossPhone:2,desktop:[[8,1],[4,1],[4,1],[8,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},brick:{label:"Brick",across:2,acrossPhone:2,desktop:[[5,1],[7,1],[7,1],[5,1]],phone:[[2,1],[4,1],[4,1],[2,1]]},twoTall:{label:"Two tall",across:2,acrossPhone:2,desktop:[[6,2],[6,2]],phone:[[3,2],[3,2]]},offsetTall:{label:"Offset tall",across:2,acrossPhone:2,desktop:[[5,2],[7,1],[3,1],[4,1]],phone:[[3,2],[3,1],[3,1]]},ladder:{label:"Ladder",across:2,acrossPhone:2,desktop:[[3,2],[9,1],[5,1],[4,1]],phone:[[2,2],[4,1],[2,1],[2,1]]},threeAcross:{label:"Three across",across:3,acrossPhone:3,desktop:[[4,1],[4,1],[4,1]],phone:[[2,1],[2,1],[2,1]]},bigLeft:{label:"Big left",across:3,acrossPhone:3,desktop:[[6,1],[3,1],[3,1]],phone:[[4,1],[1,1],[1,1]]},bigRight:{label:"Big right",across:3,acrossPhone:3,desktop:[[3,1],[3,1],[6,1]],phone:[[1,1],[1,1],[4,1]]},threeStagger:{label:"Three stagger",across:3,acrossPhone:3,desktop:[[5,1],[4,1],[3,1],[3,1],[4,1],[5,1]],phone:[[3,1],[2,1],[1,1],[1,1],[2,1],[3,1]]},threeLadder:{label:"Three ladder",across:3,acrossPhone:3,desktop:[[3,1],[4,1],[5,1],[5,1],[4,1],[3,1]],phone:[[1,1],[2,1],[3,1],[3,1],[2,1],[1,1]]},tallMiddle:{label:"Tall middle",across:3,acrossPhone:3,desktop:[[4,1],[4,2],[4,1],[4,1],[4,1]],phone:[[2,1],[2,2],[2,1],[2,1],[2,1]]},fourAcross:{label:"Four across",across:4,acrossPhone:2,desktop:[[3,1],[3,1],[3,1],[3,1]],phone:[[3,1],[3,1]]},bigFirst:{label:"Big first",across:4,acrossPhone:2,desktop:[[6,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},fourStagger:{label:"Four stagger",across:4,acrossPhone:2,desktop:[[4,1],[3,1],[2,1],[3,1],[2,1],[3,1],[4,1],[3,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},tallFirst:{label:"Tall first",across:4,acrossPhone:2,desktop:[[3,2],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[3,2],[3,1],[3,1]]},oneThenFour:{label:"One then four",across:4,acrossPhone:2,desktop:[[12,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},sixAcross:{label:"Six across",across:6,acrossPhone:3,desktop:[[2,1],[2,1],[2,1],[2,1],[2,1],[2,1]],phone:[[2,1],[2,1],[2,1]]},sixStagger:{label:"Six stagger",across:6,acrossPhone:6,desktop:[[3,1],[2,1],[1,1],[2,1],[1,1],[3,1],[1,1],[3,1],[2,1],[2,1],[1,1],[3,1]],phone:[[1,1],[1,1],[1,1],[1,1],[1,1],[1,1]]},twoThenThrees:{label:"Two, then threes",across:3,acrossPhone:3,lead:[[6,1],[6,1]],desktop:[[4,1],[4,1],[4,1]],leadPhone:[[3,1],[3,1]],phone:[[2,1],[2,1],[2,1]]},twoThenThreesPhoto:{label:"Two, then threes \xB7 photo",across:3,acrossPhone:1,lead:[[6,1],[6,1]],desktop:[[4,1],[4,1],[4,1]],phone:[[6,1]],ratio:"landscape"}},ff=["phone","acrossPhone","leadPhone"];var pE=new Set(ff),Gn=Object.fromEntries(Object.entries(ia).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).filter(([n])=>!pE.has(n)))])),ni=Object.keys(ia),mf=[2,3,4,6];function oi(e,t){return ni.filter(n=>n===t||e===null||Gn[n].across===e)}function hf(e){let t=e.layout;return typeof t=="string"&&he(ia,t)?t:null}function ai(e){let t=hf(e);return t?fE(t,e.layoutPhone):null}var la={oneAcross:{label:"One across",phone:[[rn,2]],acrossPhone:1}};function gf(e){return typeof e=="string"&&he(la,e)?e:null}function df(e,t){return t?rn/e.acrossPhone:pf/e.across}function si(e){return e.ratio?cu.find(t=>t.shape===e.ratio)?.ratio??null:null}function bf(e){return[...e.lead??[],...e.desktop]}function fE(e,t){let n=ia[e],o=gf(t);if(!o)return n;let{phone:a,acrossPhone:s}=la[o],r=Object.fromEntries(ff.map(i=>[i,void 0]));return{...n,...r,phone:a,acrossPhone:s}}var mE="sf-wall--";function hE(e){let t=hf(e);if(!t)return"";let n=gf(e.layoutPhone);return`${mE}${t}${n?`--${n}`:""}`}function AB(e){let t=ai(e);if(!t)return"";let n=`.${hE(e)}`,o=[],a=(i,l,u)=>`${n}:has(> :nth-child(${i}n+${l+u}):last-child) > :nth-last-child(-n+${u})`,s=(i,l,u=[])=>{let d=[],f=i.length,p=u.length;u.forEach(([m,b],y)=>{d.push(`${n} > :nth-child(${y+1}){grid-column:span ${m};grid-row:span ${b}}`)}),i.forEach(([m,b],y)=>{d.push(`${n} > :nth-child(${f}n+${p+y+1}){grid-column:span ${m};grid-row:span ${b}}`)});for(let m=1;m<f;m+=1)d.push(`${a(f,p,m)}{grid-column:span ${l};grid-row:span 1}`);return d};o.push(`${n}{grid-template-columns:repeat(${pf},minmax(0,1fr))}`);let r=si(t);if(r&&(o.push(`${n}${n}{grid-auto-rows:auto}`),o.push(`${n}${n} > *{aspect-ratio:${r[0]}/${r[1]};height:auto}`)),o.push(...s(t.desktop,df(t,!1),t.lead)),o.push(`@media (max-width:${dE}px){`),o.push(`${n}{grid-template-columns:repeat(${rn},minmax(0,1fr))}`),o.push(...s(t.phone,df(t,!0),t.leadPhone)),t.phone.length===1&&!t.leadPhone?.length){let[i,l]=t.phone[0],u=t.lead?.length??0;for(let d=1;d<t.desktop.length;d+=1)o.push(`${a(t.desktop.length,u,d)}{grid-column:span ${i};grid-row:span ${l}}`)}return o.push("}"),o.join("")}var ca=12,Sf=1,ua=3;var gE=3;function ln(e,t,n){let o=typeof e=="number"?e:Number.parseInt(String(e??""),10);return Number.isFinite(o)?Math.min(n,Math.max(t,Math.trunc(o))):null}function bE(e){return ln(e,1,ca)??gE}function LB(e,t){return ln(e,Sf,ua)??(bE(t)===4?2:Sf)}function DB(e){return e==null||e===""?null:ln(e,1,ca)}var FB="data-sf-span",da=4;function yE(e){return e==null||e===""?null:ln(e,1,da)}var BB="data-sf-row-span",ri="gridTileAt",ii=48;function HB(e){return e==null||e===""?null:ln(e,1,ii)}var MB="--sf-tile-at";function UB(e){return e==null||e===""?null:ln(e,1,ua)}function GB(e){return yE(e)}var $B="data-sf-span-phone",zB="data-sf-row-span-phone",WB=["gridSpan","gridRowSpan",ri,yf("gridSpan"),yf("gridRowSpan")];function KB(e,t){if(!e)return!1;if(SE(e,t)||e.type==="Grid")return!0;if(e.type==="GalleryB"){if(ai(e.props??{}))return!1;let n=e.props?.columns;return n!=null&&n!==""}return!1}var _f=new Map;function jB(e,t){_f.set(e,[...t])}function SE(e,t){if(!e||typeof e.type!="string"||typeof t!="string")return!1;let n=_f.get(e.type);return n?n.some(o=>{let a=e.props?.[o];return Array.isArray(a)&&a.some(s=>s?.props?.id===t)}):!1}import{jsx as _E}from"react/jsx-runtime";import*as TE from"efficient-easel/icons";function Tf(e){let t=e.replace(/(^|-)([a-z])/g,(o,a,s)=>s.toUpperCase()),n=TE[`${t}Icon`];return n?_E(n,{size:16}):null}import{jsx as st,Fragment as vE,jsxs as Af}from"react/jsx-runtime";import{useContext as wE,useEffect as CE,useId as OE,useState as Rf}from"react";import{SettingsField as PE,SettingsSwitch as kE}from"efficient-easel/panel";import{AnchorIcon as AE}from"efficient-easel/icons";import{ScreenDocumentContext as RE}from"efficient-easel/screen/components/ScreenDocumentContext";import{Snippet as IE}from"efficient-shell/ui";import{slugify as NE}from"efficient-shell/format";import{slugify as EE}from"efficient-shell/format";function li(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}var ZB=e=>EE(li(e));var Ef="homepage";import{slugify as xE}from"efficient-shell/format";var xf=[{value:"page",label:"Page"},{value:"anchor",label:"Anchor"},{value:"blog",label:"Blog post",needs:"service"},{value:"product",label:"Product",needs:"commerce"},{value:"popup",label:"Popup"},{value:"custom",label:"Custom URL"}];function vf(e){return e.offersCommerce&&e.offersService?xf:xf.filter(t=>!t.needs||(t.needs==="commerce"?e.offersCommerce:e.offersService))}var ci="#popup:";function wf(e){return`${ci}${e}`}function Cf(e){return e.startsWith(ci)&&e.slice(ci.length).trim()||null}function $n(e){return e===Ef?"/":`/${e}`}function Of(e){return`/journal/${e}`}function oH(e){return`/wheels/${e}`}function pa(e,t){return`${$n(e)}#${t}`}function Pf(...e){let t=new Set,n=[];for(let o of e)for(let a of o?.content??[]){let s=li(a?.props?.anchor);if(!s)continue;let r=xE(s);!r||t.has(r)||(t.add(r),n.push({slug:r,name:s}))}return n}function aH(e){let t=e.indexOf("#"),n=t===-1?e:e.slice(0,t),o=n.indexOf("?");return o===-1?n:n.slice(0,o)}function kf(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}import{readHidable as LE}from"efficient-easel/draw";function If({value:e,onChange:t,nameBox:n}){let o=LE(e).text,[a,s]=Rf(!1),r=a||o.trim()!=="",i=OE();return Af(vE,{children:[st(PE,{label:c("Add an anchor"),labelId:i,icon:st(AE,{}),action:st(kE,{checked:r,ariaLabelledBy:i,onChange:l=>{s(l),!l&&o!==""&&t("")}})}),r&&n(e,t),r&&st(DE,{name:o})]})}function DE({name:e}){let t=wE(RE),n=t?.templateId?"":t?.currentSlug??"",[o,a]=Rf("");CE(()=>a(_u()),[]);let s=NE(e);if(!s||!n)return null;let r=`${o}${pa(n,s)}`,i=r.replace(/^https?:\/\//,""),l=i.lastIndexOf("#");return st("div",{className:"sf-anchor-link",children:st(IE,{value:r,label:c("link"),size:"sm",children:Af("span",{className:"sf-anchor-link-text",children:[st("span",{className:"sf-anchor-link-path",children:i.slice(0,l)}),st("span",{className:"sf-anchor-link-hash",children:i.slice(l)})]})})})}import{jsx as De,jsxs as FE}from"react/jsx-runtime";import{Fragment as BE}from"react";import{Button as fa,Tooltip as HE}from"efficient-shell/ui";function ma({status:e,statusText:t,onRefresh:n,busy:o=!1,edit:a,hint:s,spaced:r=!0,compact:i=!1,oneLine:l=!1}){return i?De("div",{className:`sf-blogsource sf-blogsource--compact${l?" sf-blogsource--line":""}`,style:r?{marginTop:8}:void 0,children:De(HE,{content:s,className:l?"sf-name-tip":void 0,children:De("p",{className:"sf-blogsource-status","data-state":e,children:[t?De(BE,{children:t},"status"):null,n?De(fa,{variant:"link",size:"sm",className:"sf-blogsource-link",onClick:n,disabled:o,children:c("Refresh now")},"refresh"):null,a?De(fa,{variant:"link",size:"sm",className:"sf-blogsource-link",onClick:a.onClick,children:a.label},"edit"):null].filter(Boolean).flatMap((u,d)=>d?[" \xB7 ",u]:[u])})})}):FE("div",{className:"sf-blogsource",style:r?{marginTop:9}:void 0,children:[De("p",{className:"sf-blogsource-status","data-state":e,children:t}),n?De(fa,{variant:"secondary",className:"sf-blogsource-action",onClick:n,disabled:o,children:c("Refresh now")}):null,a?De(fa,{variant:"secondary",className:"sf-blogsource-action",onClick:a.onClick,children:a.label}):null,De("p",{className:"es-field-hint",children:s})]})}import{AdjustIcon as uO,EyeIcon as dO,AnimationIcon as pO,BackgroundIcon as wh,BorderAllIcon as fO,BlockSectionIcon as mO,ColumnWidthsIcon as Za,ColumnsIcon as Uh,CornerIcon as Gh,DirectionDownIcon as hO,DirectionLeftIcon as gO,DirectionRightIcon as bO,DirectionUpIcon as yO,EditIcon as SO,GapIcon as _O,GridIcon as $h,GroundIcon as Sl,HashIcon as zh,HeightIcon as Ja,ImageIcon as TO,ListIcon as EO,LocationIcon as Ch,PaddingBottomIcon as Wh,PaddingLeftIcon as Kh,PaddingRightIcon as jh,PaddingTopIcon as xl,PageIcon as xO,PhoneIcon as vO,StickyIcon as Vh,SearchIcon as wO,SquareIcon as CO,TypeIcon as OO,WidthIcon as PO}from"efficient-easel/icons";import{jsx as G,Fragment as Ot,jsxs as Pt}from"react/jsx-runtime";import{CaptionIcon as ME,DateIcon as UE,FlagIcon as GE,TitleIcon as $E,ButtonIcon as zE,DollarIcon as WE,HashIcon as KE,LinkIcon as jE,NoteIcon as VE,TagIcon as YE,TextLinesIcon as XE}from"efficient-easel/icons";var Nf={body:XE,button:zE,link:jE,label:YE,number:KE,price:WE,note:VE,name:GE,date:UE,caption:ME,title:$E},Lf={eyebrow:Pt(Ot,{children:[G("path",{d:"M5 6.5h5"}),G("path",{d:"M5 12.5h14"}),G("path",{d:"M5 18h11"})]}),heading:Pt(Ot,{children:[G("path",{d:"M6.5 5v14"}),G("path",{d:"M17.5 5v14"}),G("path",{d:"M6.5 12h11"})]}),intro:Pt(Ot,{children:[G("path",{d:"M4 5.5v13"}),G("path",{d:"M8 7.5h12"}),G("path",{d:"M8 12h12"}),G("path",{d:"M8 16.5h8"})]}),value:Pt(Ot,{children:[G("rect",{x:"2.5",y:"7",width:"19",height:"10",rx:"2"}),G("path",{d:"M6.5 12h7"})]}),quote:Pt(Ot,{children:[G("path",{d:"M9.5 5.5C7 7.2 5.5 9.7 5.5 12.8h4v5.7h-5v-5.7"}),G("path",{d:"M19.5 5.5c-2.5 1.7-4 4.2-4 7.3h4v5.7h-5v-5.7"})]}),tag:Pt(Ot,{children:[G("rect",{x:"3",y:"5.5",width:"18",height:"13",rx:"2.5"}),G("path",{d:"M8 9.5h8"}),G("path",{d:"M12 9.5v5"})]}),meta:Pt(Ot,{children:[G("path",{d:"M4 7h16"}),G("path",{d:"M4 14h3.5"}),G("path",{d:"M10.5 14h3"}),G("path",{d:"M17 14h3"})]})};function ui({noun:e,size:t=14,strokeWidth:n=1.8,className:o,style:a}){let s=Nf[e];return s?G("span",{className:o,style:{display:"inline-flex",...a},"aria-hidden":"true",children:G(s,{size:t})}):G("svg",{className:o,style:a,width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:Lf[e]})}var wH=Object.keys(Nf);var CH=Object.keys(Lf);import{parseHexColor as qE}from"efficient-shell/format";var ZE="#ffffff";function di(e){return Df(e)||(JE(e)?e:ZE)}function Df(e){let t=Ae(e);return t?qe(t)?.page??"":""}function JE(e){return typeof e=="string"&&qE(e)===e.toLowerCase()||Df(e)!==""}function RH(e){return{"--bg":di(e)}}import{parseHexColor as QE}from"efficient-shell/format";import{fillColorRole as ex}from"efficient-shell/markup";function kt(e,t,n,o){let a=o??n??t,s=n!==null&&n!==t,r=a!==null&&a!==t;return{className:[s?e.tabletClass:"",r?e.phoneClass:""].filter(Boolean).join(" "),style:{...s?{[e.tabletVar]:n}:{},...r?{[e.phoneVar]:a}:{}}}}var pi=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}];var WH="sf-card",KH="[--sf-card-lift:none] [--sf-card-shadow-hover:var(--sf-card-shadow,none)]",Ff={min:0,max:100,step:5,fallback:0,unit:"%"},tx="68%",VH={desktop:20,phone:20,side:40,sidePhone:24},YH="sf-box-sides";function nx(e){return typeof e=="string"&&e.trim()!==""}function XH(e){return nx(typeof e?.bgImage=="string"?e.bgImage:null)||Hf(e)}function Hf(e){return To(e,bo)!==""}function qH(e,t){return t||!Hf(e)?e:{...e,[bo]:""}}function ZH(e,t){return Rs(t,To(e,bo))?.trim()||null}function Bf(e,t){let n=typeof e=="number"?e:Number.parseFloat(String(e??""));if(!Number.isFinite(n)||n<=0)return null;let o=(Math.min(Ff.max,Math.max(Ff.min,n))/100).toFixed(2);return t!=="bottom"?{background:Eo(Number(o))}:{background:`linear-gradient(0deg, ${Eo(Number(o))} 0%, ${Eo(0)} ${tx})`}}var ha=[{label:"Flat",value:"",hint:"One colour from top to bottom"},{label:"Fade",value:"down",hint:"The colour fades into the page colour at the bottom"}],Mf="fillFade",fi=ha[1].value,ga=e=>e===fi?fi:ha[0].value,ox=[{mix:"12%",at:"50%"},{mix:"19%",at:"70%"},{mix:"50%",at:"95%"}];function JH(e){return ga(e)!==fi?null:{backgroundImage:`linear-gradient(to bottom, transparent, ${ox.map(t=>`color-mix(in srgb, var(--bg) ${t.mix}, transparent) ${t.at}`).join(", ")})`}}var ba=e=>typeof e=="string"?QE(e.trim()):null,zn=e=>{let t=ba(e);if(t!==null||typeof e!="string")return t;let n=e.trim();return n&&!n.startsWith("#")&&Lu(n)||null},ya=e=>{if(typeof e!="string")return null;let t=ex(Me(e.trim()));return t?.kind==="slot"?t.slot:null},mi="swatch";function QH(e,t){if(!t)return null;let n=Rs(t,To(e,mi)),o=Ae(n);return ba(n)??(o&&He(o)||null)}var ax={tabletClass:"sf-fill-tablet",tabletVar:"--sf-fill-tablet",phoneClass:"sf-fill-phone",phoneVar:"--sf-fill-phone"};function eM(e,t,n){return kt(ax,zn(e),zn(t),zn(n))}var sx={tabletClass:"sf-wash-tablet",tabletVar:"--sf-wash-tablet",phoneClass:"sf-wash-phone",phoneVar:"--sf-wash-phone"};function tM(e){let t=Bf(e.darken,e.darkenStyle);if(!t)return{className:"",style:{}};let n=(f,p)=>String(Bf(f,p)?.background??"none"),o=f=>(typeof f=="number"||typeof f=="string"&&f.trim()!=="")&&Number.isFinite(Number(f))?f:void 0,a=f=>pi.some(p=>p.value===f)?f:void 0,[s,r,i,l]=[o(e.darkenTablet),a(e.darkenStyleTablet),o(e.darkenPhone),a(e.darkenStylePhone)],u=s??e.darken,d=r??e.darkenStyle;return kt(sx,String(t.background),s!==void 0||r!==void 0?n(u,d):null,i!==void 0||l!==void 0?n(i??u,l??d):null)}function nM(e,t){let n={"top-left":["start","start"],"top-center":["center","start"],"top-right":["end","start"],left:["start","center"],center:["center","center"],right:["end","center"],"bottom-left":["start","end"],"bottom-center":["center","end"],"bottom-right":["end","end"]},[o,a]=n[e]??n.center,[s,r]=t==="column"?[a,o]:[o,a];return Ec(s,r)}function Uf(e,t){let n=e?.content;if(!Array.isArray(n))return null;for(let o of n){if(!o||typeof o!="object")continue;let{type:a,props:s}=o;if(s?.id===t)return null;if(hi(o,t,0))return{type:typeof a=="string"?a:"",props:s??{}}}return null}function hi(e,t,n){if(n>12||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(a=>hi(a,t,n+1));let o=e.props;return o&&typeof o=="object"&&o.id===t?!0:Object.values(e).some(a=>hi(a,t,n+1))}function Gf(e,t){let n=e?.content;return Array.isArray(n)?Sa(n,t,0)??[]:[]}function Sa(e,t,n){if(n>12||!e||typeof e!="object")return null;if(Array.isArray(e)){for(let a of e){let s=Sa(a,t,n+1);if(s)return s}return null}let o=e.props;if(o&&typeof o=="object"){if(o.id===t)return[];for(let a of Object.values(o)){let s=Sa(a,t,n+1);if(s)return[o,...s]}return null}for(let a of Object.values(e)){let s=Sa(a,t,n+1);if(s)return s}return null}import{SettingsDefaultReset as oe,SettingsDrill as kO,SettingsField as K,SettingsGroup as AO,SettingsSegmented as RO,SettingsBorder as IO,SettingsSidesEach as NO,SettingsSwitch as vl,borderSides as LO,borderStartEach as DO}from"efficient-easel/panel";import{ListField as FO}from"efficient-easel/fields";import{CodeIcon as BO}from"efficient-shell/icons/efficient";import{DisplayChips as HO}from"efficient-shell/ui";import{HIDDEN_KEY as rx,hiddenInEveryView as ix,hiddenInView as gi,hiddenKeyOf as $f}from"efficient-easel/screen/lib/content/view-hide";import{VIEW_TIERS as lx}from"efficient-easel/screen/lib/content/view-tiers";var cx={"000":"",100:"view-desktop:hidden","010":"view-wide:max-view-desktop:hidden","001":"max-view-wide:hidden",110:"view-wide:hidden","011":"max-view-desktop:hidden",101:"view-desktop:hidden max-view-wide:hidden",111:"hidden"},ux={"000":"",100:"view-desktop:hidden","010":"view-tablet:max-view-desktop:hidden","001":"max-view-tablet:hidden",110:"view-tablet:hidden","011":"max-view-desktop:hidden",101:"view-desktop:hidden max-view-tablet:hidden",111:"hidden"},zf=e=>(e.desktop?"1":"0")+(e.tablet?"1":"0")+(e.mobile?"1":"0");function Wf(e,{atSectionLine:t=!1}={}){return(t?ux:cx)[zf(e)]}var iM=[rx,$f("tablet"),$f("mobile")];function Kf(e){return{desktop:gi(e,"desktop"),tablet:gi(e,"tablet"),mobile:gi(e,"mobile")}}function lM(e){return ix(e)}function cM(e){let t=Kf(e);return lx.filter(n=>t[n]).join(" ")}var dx={"000":"",100:"view-desktop:hidden!","010":"view-wide:max-view-desktop:hidden!","001":"max-view-wide:hidden!",110:"view-wide:hidden!","011":"max-view-desktop:hidden!",101:"view-desktop:hidden! max-view-wide:hidden!",111:"hidden!"},px={"000":"",100:"view-desktop:hidden!","010":"view-tablet:max-view-desktop:hidden!","001":"max-view-tablet:hidden!",110:"view-tablet:hidden!","011":"max-view-desktop:hidden!",101:"view-desktop:hidden! max-view-tablet:hidden!",111:"hidden!"};function uM(e,{atSectionLine:t=!1}={}){return(t?px:dx)[zf(Kf(e))]}function cn(e){if(!e||typeof e!="object"||Array.isArray(e))return{};let t={};for(let[n,o]of Object.entries(e))typeof o=="boolean"&&(t[n]=o);return t}function _a(e,t){return cn(e)[t]!==!1}function bi(e,t,n){let o=cn(t)[n];return typeof o=="boolean"?o:_a(e,n)}function jf(e){return Object.values(cn(e)).some(t=>t===!1)}function Vf(e){return Object.keys(cn(e)).length>0}function Yf(e,t,n){let o={...cn(e)};return n?delete o[t]:o[t]=!1,Object.keys(o).length?o:void 0}function Xf(e,t,n){return{...cn(e),[t]:n}}function fM(e,t,n,{atSectionLine:o=!0}={}){let a=!_a(e,n);return Wf({desktop:a,tablet:a,mobile:!bi(e,t,n)},{atSectionLine:o})}import{ColorSwatch as MO,CornersInput as UO,DatePicker as sW,DateTimePicker as GO,FOCAL_DEFAULT as rW,IconPicker as Yh,COLUMN_COUNT_MAX as Oh,COLUMN_SHARE_MIN as $O,COLUMN_SHARES_EQUAL as zO,resolveColumnShares as Xh,WidthsBar as WO,useShellStrings as KO,IconButton as qh,InputNumber as Ph,Slider as jO,Textarea as VO,Tooltip as wl}from"efficient-shell/ui";async function qf(e){let t=e.trim();if(!t)return null;let n=Ee().geocode;if(!n)throw new Error("geocode_unavailable");return n.locate(t)}var yi="Lookup busy \u2014 try again in a moment.",Ta=e=>typeof e=="number"&&Number.isFinite(e);function Ea(e){return e.some(t=>{let n=t?.geocode;return n?n.pending||n.manual&&n.lat===void 0&&n.lng===void 0?!0:Ta(n.lat)&&n.lat!==t.lat||Ta(n.lng)&&n.lng!==t.lng:!1})}async function Zf(e,t,{geocode:n=qf,courtesyGapMs:o=1100}={}){let a=r=>new Promise(i=>setTimeout(i,r)),s=e.slice();if(e.some(r=>r?.geocode?.pending)){let r=[],i=!1;for(let l of e){if(!l?.geocode?.pending){r.push(l);continue}i&&o>0&&await a(o),i=!0;try{let u=await n(t(l));r.push(u?{...l,lat:u.lat,lng:u.lng,geocode:{...l.geocode,pending:!1,ok:!0,status:`Found \u2014 ${u.label.split(",").slice(0,3).join(",").trim()}`,lat:u.lat,lng:u.lng}}:{...l,geocode:{...l.geocode,pending:!1,ok:!1,status:"No match \u2014 check the address and try again."}})}catch{r.push({...l,geocode:{...l.geocode,pending:!1,ok:!1,status:yi}})}}s=r}return s.map(r=>{let i=r?.geocode;if(!i)return r;if(i.manual&&i.lat===void 0&&i.lng===void 0)return{...r,geocode:{...i,lat:r.lat,lng:r.lng}};let l=Ta(i.lat)&&i.lat!==r.lat?i.lat:r.lat,u=Ta(i.lng)&&i.lng!==r.lng?i.lng:r.lng;return l!==r.lat||u!==r.lng?{...r,lat:l,lng:u}:r})}import{keptByRow as _l}from"efficient-easel/screen/lib/document/style-fields";import{jsx as fx}from"react/jsx-runtime";import{useEffect as mx,useState as hx}from"react";import{clearRangeOf as gx,markSelection as bx,useCaretEdit as yx}from"efficient-easel/copy";import{TextToolbar as Sx}from"efficient-shell/ui";function _x(e,t,n){return bx(e,t,n,bc)}function Jf(e,t){let n=gx(t,e.length),o=Sc(e,n.start,n.end);return o.text===e?null:o}function Tx(e){let[t,n]=hx(null);return mx(()=>{let o=e.current?.ownerDocument??(typeof document>"u"?null:document);if(!o)return;let a=()=>{let s=e.current;if(!s||o.activeElement!==s)return;let r=s.selectionStart??s.value.length,i=s.selectionEnd??r;n(l=>l&&l.start===r&&l.end===i?l:{start:r,end:i})};return o.addEventListener("selectionchange",a),()=>o.removeEventListener("selectionchange",a)},[e]),[t,n]}function Ex({target:e,value:t,onChange:n,disabled:o=!1,label:a="Formatting"}){let s=yx({target:e,onChange:n}),[r,i]=Tx(e),l=p=>s(m=>{let b=_x(t,p,m);return i({start:b.selectionStart,end:b.selectionEnd}),b}),u=gc(),d={};if(r)for(let p of u)d[p.style]=yc(t,r.start,r.end,p.style);let f=o?null:Jf(t,r);return fx(Sx,{offered:new Set(u.map(p=>p.style)),onMark:p=>l(p),pressed:d,disabled:o,"aria-label":c(a),className:"sf-markup-bar",clear:f?{onClear:()=>s(()=>{let p=e.current,m=p&&p.ownerDocument.activeElement===p?{start:p.selectionStart??0,end:p.selectionEnd??0}:null,b=Jf(t,m)??{text:t,selectionStart:m?.start??0,selectionEnd:m?.end??0};return i({start:b.selectionStart,end:b.selectionEnd}),b})}:void 0})}var Si=Ex;import{deviceField as ee}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as YO,NoControlMark as XO,noControlField as Zh}from"efficient-easel/screen/lib/document/panel-no-control-mark";function xa(e,t,n){return typeof e=="number"?e:typeof t=="number"?t:n}var va=void 0;import{phoneKey as rt,tabletKey as Cl,viewKeyAt as Ol}from"efficient-easel/draw";import{jsx as wa,Fragment as xx,jsxs as vx}from"react/jsx-runtime";import{useRef as wx}from"react";import{SettingsDefaultReset as Cx}from"efficient-easel/panel";import{effectTiles as Ox}from"efficient-easel/screen/lib/document/effect-tiles";import{VIEW_KEY_ACCESS as Qf,describedAs as Px,onDesktopWords as kx,phoneTwinFields as em}from"efficient-easel/screen/lib/document/box-fields";function Ax({row:e,read:t,...n}){let o=t(Z(),n.followsView??"desktop");return e({...n,follows:o})}function $e(e,t){return Object.fromEntries(uu.map(n=>{let o=U(e,n);return[o,em(e,t(n),Qf)[o]]}))}function DM(e,t,n){let o=t.render,a={...t,render:s=>wa(Ax,{...s,row:o,read:n})};return $e(e,s=>s==="desktop"?t:a)}function Rx({spec:e,...t}){let n=e.values.includes(t.value),o="follows"in t,a=e.read(Z(),t.followsView??"desktop"),s=n?t.value:a,r=wx(null),{preview:i}=e,l=Ox({label:c(e.label),options:e.values.map(d=>({value:d,label:c(e.word(d)),picture:e.picture(d)})),fallback:e.fallback,onPreview:i?d=>r.current&&i(r.current,d):void 0}).render,u=l({value:s,onChange:d=>t.onChange(d??e.fallback)});return vx(xx,{children:[i?wa("div",{ref:r,style:{display:"contents"},children:u}):u,o&&n&&wa(Cx,{words:P()?.panel,label:c(e.tileWord),changed:!0,detail:kx(d=>c(d),c(e.word(a)),t.followsView),onReset:()=>t.onChange(void 0)})]})}function FM(e,t){let n=Px({type:"custom",render:o=>wa(Rx,{...o,spec:t})},{type:"select",label:t.label,options:t.values.map(o=>({value:o,label:t.word(o)}))});return em(e,n,Qf)}import{jsx as _i,Fragment as Ix}from"react/jsx-runtime";import{createContext as Nx,useContext as Lx}from"react";import{NoControlMark as Dx}from"efficient-easel/screen/lib/document/panel-no-control-mark";var tm=Nx(!1);function $M({children:e}){return _i(tm.Provider,{value:!0,children:e})}function Fx(){return Lx(tm)}function nm({name:e,children:t}){return!Fx()||!e||!Bx(e)||kn(e)?_i(Ix,{children:t}):_i(Dx,{})}function Bx(e){return/^[A-Za-z0-9_$]+$/u.test(e)}import{parseOption as Hx}from"efficient-shell/format";var Ti="off",am="none",Ei=[{label:"None",value:"off"},{label:"1, 2, 3",value:"plain"},{label:"01, 02, 03",value:"padded"},{label:"N\xB001, N\xB002",value:"numero"}],sm=[{label:"None",value:"none"},{label:"Hairline",value:"hairline"}];function KM(e){return Hx(Ei,Ti,e)}var om="sf-card-index",Wn="sf-card-index",jM="pointer-events-none absolute left-[18px] top-[18px] z-10 border border-line bg-bg/70 px-2 py-1 font-mono text-[length:var(--size-label,10px)] uppercase tracking-[0.16em] text-fg-dim",Mx={plain:`counter(${Wn})`,padded:`counter(${Wn}, decimal-leading-zero)`,numero:`"N\xB0" counter(${Wn}, decimal-leading-zero)`};function VM(e,t){return t==="off"?"":`.${e}{counter-reset:${Wn}}.${e} .${om}{counter-increment:${Wn}}.${e} .${om}::before{content:${Mx[t]}}`}function YM(e){return e==="hairline"?"border border-line hover:border-accent":""}var rm=[{value:"1",label:"1st rendering"},{value:"2",label:"2nd rendering"},{value:"3",label:"3rd rendering"},{value:"4",label:"4th rendering"},{value:"5",label:"5th rendering"}];import{SCALAR_TEXT_CONTROLS as qO}from"efficient-easel/draw";import{jsx as ue}from"react/jsx-runtime";import{SettingsDefaultReset as Vx,SettingsField as xi}from"efficient-easel/panel";import{useSelectedHost as Yx}from"efficient-easel/easel";import{FOCAL_DEFAULT as Xx}from"efficient-shell/format";import{ImageIcon as vi,PlayIcon as im}from"efficient-easel/icons";import{ImageFocusPoint as qx,MediaUploadField as Zx}from"efficient-shell/ui";import{useContext as Jx}from"react";import{ScreenDocumentContext as Qx}from"efficient-easel/screen/components/ScreenDocumentContext";import{tabletKey as ev,viewKeyAt as tv}from"efficient-easel/draw";import{usePreviewDevice as nv}from"efficient-easel/draw/client";import{formatFocal as Ux,parseFocal as Gx}from"efficient-shell/format";var $x="sf-focus-phone",zx="--sf-focus-phone",Wx="sf-focus-tablet",Kx="--sf-focus-tablet",Kn=e=>{if(typeof e!="string"||!/^\s*-?\d+(\.\d+)?%\s+-?\d+(\.\d+)?%\s*$/.test(e))return null;let{x:t,y:n}=Gx(e);return Ux(t,n)};function QM(e,t){return kt(jx,null,Kn(t),Kn(e))}var jx={tabletClass:Wx,tabletVar:Kx,phoneClass:$x,phoneVar:zx};import{shownTier as wi}from"efficient-easel/screen/lib/document/device-fields";import{onDesktopWords as ov}from"efficient-easel/screen/lib/document/box-fields";import{requestMediaPick as av}from"efficient-easel/screen/lib/media-picker";import{useEaselHost as sv}from"efficient-easel/screen/lib/host";import{useEaselSession as rv}from"efficient-easel/screen/lib/session-context";function iv(e,t,n,o=!0){let a=wi(n),s=typeof e[t]=="string"&&e[t]?String(e[t]):Xx;if(a==="desktop")return{ownView:!1,followed:s,followsView:"desktop",own:void 0,focus:s,key:t};let r=tv(t,a),i=Kn(e[r])??void 0,l=a==="mobile"&&o?Kn(e[ev(t)])??void 0:void 0,u=l??s;return{ownView:!0,followed:u,followsView:l?"tablet":"desktop",own:i,focus:i??u,key:r}}function lv(e,t,n){let o=Yx();if(!t||!o)return null;let a=o.values??{};if(n&&!n(a,wi(e)))return null;let s=iv(a,t,e,n?n(a,"tablet"):!0),r=o.onChange;return{...s,set:i=>r(s.key,i),clear:()=>r(s.key,va)}}function lm({value:e,onChange:t,label:n,accept:o,placeholder:a,focusKey:s,focusWhen:r,frameKey:i,fieldKey:l}){let u=sv(),d=rv(),f=c(n),p=nv(),m=o.startsWith("video"),b=lv(p,m?void 0:s,r),y=!!s&&wi(p)!=="desktop",T=Jx(Qx),S=un(),E=i&&l?{video:l,frame:i}:null,x=C=>av(u,{accept:o,title:f,...C?{file:C}:{}}).then(D=>!D||!E?D?.url??null:(S({[E.video]:D.url,[E.frame]:D.posterUrl??""}),null)),v=E?C=>C?t(C):S({[E.video]:"",[E.frame]:""}):t,w=re(e);if(y&&(!b||!w))return null;if(T&&!T.capabilities.mediaEditing)return ue(xi,{label:f,icon:m?ue(im,{}):ue(vi,{}),children:ue("div",{className:"sf-image-slot-inert",children:m?c("Templates don\u2019t store videos \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created."):c("Templates don\u2019t store images \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created.")})});let L=b?.ownView&&w?ue(Vx,{words:P()?.panel,label:c("Image focus"),changed:!!b.own,detail:ov(C=>c(C),b.followed,b.followsView),onReset:b.clear}):void 0;return y&&b?ue(xi,{label:f,icon:ue(vi,{}),action:L,children:ue("div",{style:{flex:"1 1 auto",minWidth:0},children:ue(qx,{value:b.focus,onChange:b.set,label:c("Image focus"),image:w,hint:null})})}):ue(xi,{label:f,icon:m?ue(im,{}):ue(vi,{}),children:ue("div",{style:{flex:"1 1 auto",minWidth:0},children:ue(Zx,{value:w,onChange:v,onPick:x,accept:m?"video/*":"image/*",kind:m?"video":"image",placeholder:a===void 0?void 0:c(a),maxSizeBytes:Ee(d).media.maxUploadBytes,...b?{focus:b.focus,onFocusChange:b.set}:{}})})})}import{jsx as cm}from"react/jsx-runtime";import{useId as cv}from"react";import{FieldSelect as uv}from"efficient-easel/fields";import{SettingsField as dv}from"efficient-easel/panel";function pv(e){return e.map(({value:t,label:n,note:o})=>({value:t,label:n,...o?{meta:o}:{}}))}function um({label:e,options:t,value:n,onChange:o,emptyLabel:a,icon:s,hint:r}){let i=cv(),l=`${i}-label`,u=`${i}-button`,d=Array.isArray(n)?n:[];return cm(dv,{label:c(e),labelId:l,icon:s,hint:r,children:cm(uv,{id:u,multiple:!0,value:d,options:pv(t),onChange:o,placeholder:a===void 0?c("None"):c(a),ariaLabelledBy:`${l} ${u}`,inline:!0})})}import{jsx as dm}from"react/jsx-runtime";import{useId as fv}from"react";import{FieldSelect as mv}from"efficient-easel/fields";import{SettingsField as hv}from"efficient-easel/panel";function gv(e){return e.map(({value:t,label:n,group:o,thumb:a,meta:s})=>({value:t,label:n,...o!==void 0?{group:o}:{},...a!==void 0?{thumb:a}:{},...s!==void 0?{meta:s}:{}}))}function LU({label:e,options:t,fallback:n,value:o,onChange:a,placeholder:s,bare:r=!1,icon:i}){let l=fv(),u=`${l}-label`,d=`${l}-button`,f=o??"",p=t.some(T=>T.value===f)?f:n,m=c(e),b=s===void 0?void 0:c(s),y=dm(mv,{id:d,value:p,options:gv(t),onChange:a,placeholder:b,searchPlaceholder:b,...r?{ariaLabel:m}:{ariaLabelledBy:`${u} ${d}`},searchable:!0,groupCount:!0,inline:!0});return r?y:dm(hv,{label:m,labelId:u,icon:i,children:y})}import{jsx as Rt,jsxs as Zv}from"react/jsx-runtime";import{SettingsField as Nm}from"efficient-easel/panel";import{LinkIcon as Jv}from"efficient-easel/icons";import{LinkPicker as Qv,TextLinkField as ew}from"efficient-shell/ui";import{useEffect as Im,useMemo as ka,useRef as tw,useState as Pa}from"react";import{currentEaselSession as bv}from"efficient-easel/screen/lib/session";function pm(){return bv().auth.token}import{currentEaselSession as nw}from"efficient-easel/screen/lib/session";import{useScreenDocument as ow}from"efficient-easel/screen/components/ScreenDocumentContext";var yv=()=>({choosePage:c("Choose a page"),chooseSection:c("Choose a section"),noSections:c("No section anchors yet"),sectionHint:c("Jumps to a section on that page."),choosePost:c("Choose a post"),chooseProduct:c("Choose a product"),choosePopup:c("Choose a popup")});function fm(e,t,n){if(!e)return"page";if(Cf(e))return"popup";if(e.startsWith("/journal/"))return"blog";if(kf(e))return"product";if(e.includes("#")){let o=e.slice(0,e.indexOf("#"));if(o===""||o==="/"||t.includes(o))return"anchor"}return e==="/"||t.includes(e)||n&&n.listingPaths.includes(n.targetOf(e))?"page":"custom"}function Ci(e,t){let n=yv(),o=e.pages.map(d=>({value:$n(d.slug),label:d.title})),a=t?.pageOptions?t.pageOptions(o):o,s=a.map(d=>d.value),r=e.pages.map(d=>({label:d.title,options:Pf(...d.docs).map(f=>({value:pa(d.slug,f.slug),label:f.name}))})).filter(d=>d.options.length>0),i=d=>{switch(d){case"page":return{type:"select",options:a,placeholder:n.choosePage};case"anchor":return{type:"groups",groups:r,placeholder:r.length?n.chooseSection:n.noSections};case"blog":return{type:"select",options:e.posts.map(f=>({value:Of(f.slug),label:f.title||f.slug})),placeholder:n.choosePost};case"product":return{type:"select",options:e.products.map(f=>({value:f.href,label:f.name||f.href})),placeholder:n.chooseProduct};case"popup":return{type:"select",options:(e.popups??[]).map(f=>({value:wf(f.slug),label:f.title||f.slug})),placeholder:n.choosePopup};case"custom":return{type:"text"}}},l=vf(e.offers).map(d=>({value:d.value,label:c(d.label),target:i(d.value),...d.value==="anchor"?{hint:n.sectionHint}:{},...d.value==="blog"||d.value==="product"||d.value==="popup"?{hideWhenEmpty:!0}:{}}));if(!t)return{kinds:l,rules:{kindOf:d=>fm(d,s),targetOf:d=>d,readFilter:()=>null,withFilter:d=>d}};let u=d=>{let f=t.withFilter(d,null);return t.listingPaths.includes(f)?f:d};return{kinds:l,rules:{kindOf:d=>fm(d,s,{listingPaths:t.listingPaths,targetOf:u}),targetOf:u,readFilter:t.readFilter,withFilter:t.withFilter},filtersFor:d=>t.listingPaths.includes(d)?t.filtersFor(d):null}}import{useEaselSession as aw}from"efficient-easel/screen/lib/session-context";function J(e,t){if(typeof e=="string")return e||t;if(e&&typeof e=="object"&&"text"in e){let n=e.text;return W(n)??t}return t}function mm(e,t){return O(e)??t}function ze(e,t){return typeof e=="boolean"?e:t}function Ca(e,t){if(!Array.isArray(e))return t;let n=e.map(o=>typeof o=="string"?o:J(o?.text,"")).map(o=>o.trim()).filter(Boolean);return n.length?n:t}var gm=["delay","scroll","exit"],bm=["all","chosen","except"],ym=["visit","days","never","once"],Sv=["all","desktop","phone"],_v=["stop","continue"],Sm={min:0,max:60},_m={min:10,max:90},Tm={min:1,max:90},we={autoOpen:!1,trigger:"delay",autoOpenDelaySec:15,scrollPercent:50,showOn:"all",showOnPages:[],devices:"all",hideAfter:"days",hideDays:7,afterSubmit:"stop",startDate:null,endDate:null};function pe(e,t,n){return typeof t=="string"&&e.includes(t)?t:n}function dn(e,t,n){let o=mm(e,n);return Math.min(t.max,Math.max(t.min,Math.round(o)))}function Tv(e){return typeof e.hideAfter=="string"?pe(ym,e.hideAfter,we.hideAfter):e.oncePerSession===!0?"visit":e.oncePerSession===!1?"never":we.hideAfter}function Ev(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t.trim():"").filter(Boolean).map(t=>t.startsWith("/")?t:`/${t}`):[]}function hm(e){if(typeof e!="string")return null;let t=e.trim();return/^\d{4}-\d{2}-\d{2}$/.test(t)?t:null}function Em(e){let t=e??{},n=we;return{autoOpen:ze(t.autoOpen,n.autoOpen),trigger:pe(gm,t.trigger,n.trigger),autoOpenDelaySec:dn(t.autoOpenDelaySec,Sm,n.autoOpenDelaySec),scrollPercent:dn(t.scrollPercent,_m,n.scrollPercent),showOn:pe(bm,t.showOn,n.showOn),showOnPages:Ev(t.showOnPages),devices:pe(Sv,t.devices,n.devices),hideAfter:Tv(t),hideDays:dn(t.hideDays,Tm,n.hideDays),afterSubmit:pe(_v,t.afterSubmit,n.afterSubmit),startDate:hm(t.startDate),endDate:hm(t.endDate)}}import{parseHexColor as xv}from"efficient-shell/format";var xm="#000000";var Oi="popup",vv=ru,wv=["auto","full"],Cv=["inside","outside","none"],Ov={min:240,max:1440},Pv={min:0,max:100},jn={placement:"center",fullWidth:!1,width:720,height:"auto",tintColor:xm,tintOpacity:60,outsideClick:!0,closeButton:"inside"};function kv(e,t){let n=typeof e=="string"?e.trim():"";return n&&xv(n)===n.toLowerCase()?n:t}function Pi(e,t=jn){let n=e??{},o=t;return{placement:pe(vv,n.placement,o.placement),fullWidth:ze(n.fullWidth,o.fullWidth),width:dn(n.width,Ov,o.width),height:pe(wv,n.height,o.height),tintColor:kv(n.tintColor,o.tintColor),tintOpacity:dn(n.tintOpacity,Pv,o.tintOpacity),outsideClick:ze(n.outsideClick,o.outsideClick),closeButton:pe(Cv,n.closeButton,o.closeButton)}}var vm="cart-drawer",nG="cart-drawer",Av={kickerBadge:"",kickerText:"Your order",titleLead:"Your",titleAccent:"cart.",subtitleEmpty:"Empty for now.",subtitleOne:"One set in your cart.",subtitleMany:"{count} sets in your cart.",leadTimeValue:"",shipsToFallback:"",promises:[],emptyKicker:"No wheels yet",emptyBody:"Your cart is empty. Pick a wheel to get started."};function oG(e,t){return t===0?e.subtitleEmpty:t===1?e.subtitleOne:e.subtitleMany.replace("{count}",String(t))}function aG(e){let t=e??{},n=Av;return{kickerBadge:J(t.kickerBadge,n.kickerBadge),kickerText:J(t.kickerText,n.kickerText),titleLead:J(t.titleLead,n.titleLead),titleAccent:J(t.titleAccent,n.titleAccent),subtitleEmpty:J(t.subtitleEmpty,n.subtitleEmpty),subtitleOne:J(t.subtitleOne,n.subtitleOne),subtitleMany:J(t.subtitleMany,n.subtitleMany),leadTimeValue:J(t.leadTimeValue,n.leadTimeValue),shipsToFallback:J(t.shipsToFallback,n.shipsToFallback),promises:Ca(t.promises,n.promises),emptyKicker:J(t.emptyKicker,n.emptyKicker),emptyBody:J(t.emptyBody,n.emptyBody)}}var Rv=["right","left"],Iv={...jn,width:520,tintOpacity:68};function sG(e){let t=e??{};return{...Pi(t,Iv),placement:pe(Rv,t.placement,"right"),height:"full",fullWidth:!1,autoOpen:ze(t.autoOpen,!0)}}var Cm="consent-banner",cG="consent-banner";var Nv=[{value:"bar",label:"Bar"},{value:"card",label:"Card"}],uG="Layout",wm={layout:"bar"},Lv=e=>Nv.some(t=>t.value===e);function dG(e){let t=J((e??{}).layout,wm.layout);return{layout:Lv(t)?t:wm.layout}}var pG={...jn,placement:"bottom-center",fullWidth:!0,width:440,tintOpacity:0,outsideClick:!1,closeButton:"none"};var Dv="consentWords",Fv=["eyebrow","notice","accept","reject","choose"];function Bv(e){let t=(e??{})[Dv];return typeof t=="string"&&Fv.includes(t)?t:null}function Hv(e){let t=e?.props;return t?Bv(t)!==null?!0:Object.values(t).some(n=>Array.isArray(n)&&n.some(o=>o&&typeof o=="object"&&"props"in o&&Hv(o))):!1}var Mv=["meta","eyebrow","heading","body","statName","statValue","formEyebrow","formHeading","formIntro","fieldLabel","option","finePrint","dismiss","doneHeading","doneBody"],hG={meta:"Meta line",eyebrow:"Eyebrow",heading:"Heading",body:"Body",statName:"Stat name",statValue:"Stat value",formEyebrow:"Form eyebrow",formHeading:"Form heading",formIntro:"Form intro",fieldLabel:"Field label",option:"Option",finePrint:"Fine print",dismiss:"Dismiss link",doneHeading:"Success heading",doneBody:"Success message"},Uv={meta:"styleMeta",eyebrow:"styleEyebrow",heading:"styleHeading",body:"styleBody",statName:"styleStatName",statValue:"styleStatValue",formEyebrow:"styleFormEyebrow",formHeading:"styleFormHeading",formIntro:"styleFormIntro",fieldLabel:"styleFieldLabel",option:"styleOption",finePrint:"styleFinePrint",dismiss:"styleDismiss",doneHeading:"styleDoneHeading",doneBody:"styleDoneBody"},gG={meta:{font:"--pp-meta-font",size:"--pp-meta-size"},eyebrow:{font:"--pp-eyebrow-font",size:"--pp-eyebrow-size"},heading:{font:"--pp-heading-font",size:"--pp-heading-size"},body:{font:"--pp-body-font",size:"--pp-body-size"},statName:{font:"--pp-statname-font",size:"--pp-statname-size"},statValue:{font:"--pp-statvalue-font",size:"--pp-statvalue-size"},formEyebrow:{font:"--pp-formeyebrow-font",size:"--pp-formeyebrow-size"},formHeading:{font:"--pp-formheading-font",size:"--pp-formheading-size"},formIntro:{font:"--pp-formintro-font",size:"--pp-formintro-size"},fieldLabel:{font:"--pp-fieldlabel-font",size:"--pp-fieldlabel-size"},option:{font:"--pp-option-font",size:"--pp-option-size"},finePrint:{font:"--pp-fineprint-font",size:"--pp-fineprint-size"},dismiss:{font:"--pp-dismiss-font",size:"--pp-dismiss-size"},doneHeading:{font:"--pp-doneheading-font",size:"--pp-doneheading-size"},doneBody:{font:"--pp-donebody-font",size:"--pp-donebody-size"}};function Om(e){let t={};for(let n of Mv){let o=ut(e[Uv[n]]);o&&(t[n]=o)}return t}var SG={heading:"Join our email list",placeholder:"Email address",buttonLabel:"Subscribe"},Gv={lead:"We accept"},_G={...Gv,methods:[],size:"sm",align:"start",dataSource:ic},Ai="site-footer";var Ri=Ai,TG={desktop:!0,tablet:!0,mobile:!0},EG={desktop:!1,tablet:!1,mobile:!1},ki=1,Pm=6,xG=Array.from({length:Pm-ki+1},(e,t)=>ki+t),Oa={desktop:6,tablet:3,mobile:2},$v={2:{desktop:2,tablet:2,mobile:1},3:{desktop:3,tablet:3,mobile:1},4:{desktop:4,tablet:2,mobile:2},5:{desktop:5,tablet:3,mobile:2},6:{desktop:6,tablet:3,mobile:2}},At=e=>Math.min(Math.max(Math.round(e),ki),Pm);function vG(e){if(typeof e=="number")return $v[At(e)]??{desktop:At(e),tablet:At(e),mobile:At(e)};if(e&&typeof e=="object"){let t=e;return{desktop:At(t.desktop??Oa.desktop),tablet:At(t.tablet??Oa.tablet),mobile:At(t.mobile??Oa.mobile)}}return{...Oa}}var Ii="subscribe-popup",IG="subscribe-popup",zv=[Ii,Ai,vm,Cm];function Am(e){return zv.includes(e)}var Wv=["right","left"],Kv={metaLabel:"Meta label",issueLabel:"Label",issueNumber:"00",kicker:"Kicker",heading:`Main heading
6
+ *Highlight line*`,deck:"Add a sentence or two of supporting copy.",stats:[{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"}],formLabel:"Section label",formHeading:"Main heading *highlight*",formIntro:"Add a sentence or two of supporting copy.",firstNameLabel:"Field label",firstNamePlaceholder:"Placeholder",emailLabel:"Field label",emailPlaceholder:"Placeholder",interestsLabel:"Field label",interests:["Option one","Option two","Option three"],frequencyLabel:"Field label",frequencies:["Option one","Option two","Option three"],submitText:"Button label",finePrint:"Fine print",dismissText:"Dismiss link",emailInvalidText:"Enter a valid email address.",submitErrorText:"Could not subscribe right now. Please try again.",successHeading:"Main heading *highlight*",successBody:"Add a sentence or two of supporting copy \u2014 the {email} and {issue} tokens are substituted here.",keepBrowsingText:"Button label",autoOpen:we.autoOpen,autoOpenDelaySec:we.autoOpenDelaySec,formSlug:"",trigger:we.trigger,scrollPercent:we.scrollPercent,showOn:we.showOn,showOnPages:[],hideAfter:we.hideAfter,hideDays:we.hideDays,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},$=J,jv=ze,Rm=Ca;function km(e,t){if(e==null)return t;let n=o=>o.trim()?o:"";if(typeof e=="string")return n(e);if(typeof e=="object"&&"text"in e){let o=e.text;return typeof o=="string"?n(o):""}return t}function Vv(e,t){return Array.isArray(e)?Rm(e,[]):t}function Yv(e,t){return Array.isArray(e)?e.map(n=>{let o=n??{};return{label:$(o.label,""),value:$(o.value,"")}}).filter(n=>n.label||n.value):t}function LG(e){let t=e??{},n=Kv,o=Em(t);return{metaLabel:$(t.metaLabel,n.metaLabel),issueLabel:km(t.issueLabel,n.issueLabel),issueNumber:km(t.issueNumber,n.issueNumber),kicker:$(t.kicker,n.kicker),heading:$(t.heading,n.heading),deck:$(t.deck,n.deck),stats:Yv(t.stats,n.stats),formLabel:$(t.formLabel,n.formLabel),formHeading:$(t.formHeading,n.formHeading),formIntro:$(t.formIntro,n.formIntro),firstNameLabel:$(t.firstNameLabel,n.firstNameLabel),firstNamePlaceholder:$(t.firstNamePlaceholder,n.firstNamePlaceholder),emailLabel:$(t.emailLabel,n.emailLabel),emailPlaceholder:$(t.emailPlaceholder,n.emailPlaceholder),interestsLabel:$(t.interestsLabel,n.interestsLabel),interests:Rm(t.interests,n.interests),frequencyLabel:$(t.frequencyLabel,n.frequencyLabel),frequencies:Vv(t.frequencies,n.frequencies),submitText:$(t.submitText,n.submitText),finePrint:$(t.finePrint,n.finePrint),dismissText:$(t.dismissText,n.dismissText),emailInvalidText:$(t.emailInvalidText,n.emailInvalidText),submitErrorText:$(t.submitErrorText,n.submitErrorText),successHeading:$(t.successHeading,n.successHeading),successBody:$(t.successBody,n.successBody),keepBrowsingText:$(t.keepBrowsingText,n.keepBrowsingText),formSlug:typeof t.formSlug=="string"?t.formSlug.trim():n.formSlug,autoOpen:o.autoOpen,autoOpenDelaySec:o.autoOpenDelaySec,trigger:o.trigger,scrollPercent:o.scrollPercent,showOn:o.showOn,showOnPages:o.showOnPages,hideAfter:o.hideAfter,hideDays:o.hideDays,formSide:pe(Wv,t.formSide,n.formSide),valuePanelOnPhone:jv(t.valuePanelOnPhone,n.valuePanelOnPhone),sectionAccent:t.sectionAccent,sectionCorners:t.sectionCorners,sectionCornerSides:t.sectionCornerSides,textStyles:Om(t)}}function Xv(e,t=Math.random){for(;;){let n=`popup-${Math.floor(t()*2176782336).toString(36).padStart(6,"0")}`;if(!e.has(n))return n}}function qv(e){return{root:{props:{title:e,kind:Oi}},content:[],zones:{}}}function HG(e,t,n){return{slug:Xv(t,n),title:e,kind:ei,layout:qv(e)}}function Ni(e){return e?.root?.props?.kind===Oi}function Lm(e){let t=new Map;return(n="")=>{let o=pm(),a=t.get(n);if(!a||a.token===null&&o!==null){let s=o||!nw().usesBridgedToken?e(o??"",n).catch(()=>[]):Promise.resolve([]);return t.set(n,{promise:s,token:o}),s}return a.promise}}var sw=Lm(async(e,t)=>{let n=t?{siteId:t}:void 0,{pages:o}=Ee();return o.linkTargets?o.linkTargets(n):(await o.list(n)).map(a=>({id:a.id,slug:a.slug,label:a.label,layout:null}))}),rw=Lm(async(e,t)=>await Ee().blog?.posts(t?{siteId:t}:void 0)??[]);function iw({value:e,onChange:t,label:n="Link",data:o,filters:a}){let s=ka(()=>Ci(o,a),[o,a]),r=c(n);return Rt(Nm,{label:r,icon:Rt(Jv,{}),children:Rt(Qv,{value:e,onChange:i=>t(i),kinds:s.kinds,rules:s.rules,filtersFor:s.filtersFor,label:r})})}function Dm(){let{siteId:e,capabilities:t}=ow(),{offersCommerce:n,hasBlog:o}=t,[a,s]=Pa([]),[r,i]=Pa([]),[l,u]=Pa([]),[d,f]=Pa(null),p=aw().chrome,m=p?.products?.list,b=p?.linkFilters,y=b?void 0:p?.linkRow,T=tw(!0);Im(()=>(T.current=!0,()=>{T.current=!1}),[]),Im(()=>{let x=!0;return sw(e??void 0).then(v=>x&&T.current&&s(v)),o&&rw(e??void 0).then(v=>x&&T.current&&i(v)),n&&m?.().then(v=>x&&T.current&&u(v)),n&&b?b.load(e).catch(()=>null).then(v=>x&&T.current&&f(()=>v)):f(null),()=>{x=!1}},[e,n,o,m,b]);let S=ka(()=>({pages:a.filter(x=>!Am(x.slug)&&!Ni(x.layout)).map(x=>({slug:x.slug,title:x.label,docs:[x.layout]})),popups:a.filter(x=>x.slug===Ii||Ni(x.layout)).map(x=>({slug:x.slug,title:x.label})),posts:o?r.map(x=>({slug:x.slug,title:x.title})):[],products:n?l.map(x=>({href:x.href,name:x.name})):[],offers:{offersCommerce:n,offersService:o}}),[a,r,l,n,o]),E=ka(()=>d?d(S.pages):null,[d,S]);return{data:S,filters:E,pages:a,offersCommerce:n,HostLinkRow:y}}function t2({label:e,icon:t,text:n,onTextChange:o,link:a,onLinkChange:s}){let{data:r,filters:i}=Dm(),l=ka(()=>Ci(r,i),[r,i]),u=c(e);return Rt(Nm,{label:u,icon:t,children:Rt(ew,{label:u,text:n,onTextChange:o,link:a,onLinkChange:d=>s(d),kinds:l.kinds,rules:l.rules,filtersFor:l.filtersFor})})}function Fm({value:e,onChange:t,label:n="Link"}){let o=typeof e=="string"?e:"",{data:a,filters:s,pages:r,offersCommerce:i,HostLinkRow:l}=Dm(),u=a.pages.map(f=>$n(f.slug)),d=i&&l&&(o==="/"||u.includes(o))?l:void 0;return Zv("div",{children:[Rt(iw,{value:o,onChange:t,label:n,data:a,filters:s}),d&&Rt(d,{value:o,onChange:t,pages:r})]})}import{UiIcon as kh}from"efficient-easel/draw/client";import{VIEW_TIERS as Ia,phoneKey as Bm,resolveViewValue as lw,tabletKey as Hm,viewKeyAt as H}from"efficient-easel/draw";import{SECTION_PAD_UNIT_KEY as $m,SITE_SIDE as cw,VIEW_ABOVE as uw,convertLength as zm,isLengthUnit as dw,isSiteSide as Wm,sideLengthAt as pw,sideValueAt as fw,withLength as Na}from"efficient-easel/screen/lib/content/length-units";var fe={min:10,max:200,step:10};function mw(e,t,n,o=0){let a=O(e),s=O(t);if(a===void 0&&s===void 0)return;let r=It(n),i=l=>l===void 0?void 0:r==="px"?l:Na(l,r,o);return{paddingTop:i(a),paddingBottom:i(s)}}var It=e=>F(e),Li=(e,t)=>typeof e=="object"?e[t]:e??0,hw=e=>typeof e=="object"&&e!==null&&"top"in e,Vn=(e,t,n)=>hw(e)?Li(e[t],n):Li(e,n),gw={top:"top",bottom:"bottom"};function bw(e,t,n,o){let a=O(e),s=O(t);if(a===void 0&&s===void 0)return;let r=It(n),i=(l,u)=>l===void 0?void 0:r==="px"?l:Na(l,r,u);return{paddingTop:i(a,o("top","desktop")),paddingBottom:i(s,o("bottom","desktop"))}}var yw="sf-pad-top-phone",Sw="sf-pad-bottom-phone",_w="--sf-pad-t-phone",Tw="--sf-pad-b-phone",Ew="sf-pad-left-phone",xw="sf-pad-right-phone",vw="--sf-pad-l-phone",ww="--sf-pad-r-phone",Cw="sf-pad-top-tablet",Ow="sf-pad-bottom-tablet",Pw="sf-pad-left-tablet",kw="sf-pad-right-tablet",Aw="--sf-pad-t-tablet",Rw="--sf-pad-b-tablet",Iw="--sf-pad-l-tablet",Nw="--sf-pad-r-tablet",Hi="sf-section-pad";function Mi(e){let t={desktop:e.unit,tablet:e.unitTablet,phone:e.unitPhone},n=e.totals?.length||typeof e.frame=="object"?(s,r)=>e.totals?.includes(H(s,r))?0:Vn(e.frame,s,r):e.frame,o=typeof n=="function"?bw(e.top,e.bottom,e.unit,n):mw(e.top,e.bottom,e.unit,n),a=Ui({left:e.left,right:e.right},{top:e.topPhone,bottom:e.bottomPhone,left:e.leftPhone,right:e.rightPhone},{top:e.topTablet,bottom:e.bottomTablet,left:e.leftTablet,right:e.rightTablet},{top:e.top,bottom:e.bottom,left:e.left,right:e.right},t,n,e.sideSpace);return o===void 0&&!a.classes.length&&!Object.keys(a.style).length?null:{className:[Hi,...a.classes].join(" "),style:{...o,...a.style}}}var Lw=e=>Wm(e)?e:O(e),Dw=[["top","paddingTop",[Cw,Aw],[yw,_w]],["bottom","paddingBottom",[Ow,Rw],[Sw,Tw]],["left","paddingLeft",[Pw,Iw],[Ew,vw]],["right","paddingRight",[kw,Nw],[xw,ww]]];function Di(e,t,n){return!dw(t)||t==="px"?e:zm(e,"px",t,n,{min:0,max:fe.max,step:1})}var Km=e=>{let t=uw[e];return t?[e,...Km(t)]:[e]},Aa=Object.fromEntries(Ia.map(e=>[e,Km(e)]));function Fw(e,t,n,o={},a=0){let s={desktop:!0,tablet:t!==void 0,mobile:n!==void 0},r=(b,y,T)=>{if(y==="px")return`${b}px`;let S=Aa[T].find(x=>s[x])??"desktop",E=Na(b,y,Li(a,S));return typeof E=="number"?`${E}px`:E},i={n:e,[Hm("n")]:t,[Bm("n")]:n,u:o.desktop,[Hm("u")]:o.tablet,[Bm("u")]:o.phone},l=lw("spacing",O(e),O(t),O(n),$t()),u=(b,y,T)=>{if(fw(i,{side:"n"},b,"side",["side"])?.value===cw)return Hr().value;let S=pw(i,{side:"n"},"u",b,"side");if(!S)return;let E=y!==null&&!T&&S.unit==="px"&&typeof l[y]=="number";return r(E?l[y]:S.value,S.unit,b)},d=u("desktop",null,!0),f={},p=u("tablet","tablet",t!==void 0);p!==void 0&&(t!==void 0||p!==d)&&(f.tablet=p);let m=u("mobile","phone",n!==void 0);return m!==void 0&&(n!==void 0||m!==d)&&(f.phone=m),f}function Ui(e,t,n={},o=e,a={},s=0,r="box"){let i={},l={},u=[],d=Hr(r),f=!1;for(let[p,m,...b]of Dw){let y=p==="left"||p==="right"?Lw:O,T=y(e[p]),S=j(gw,p),E=S?typeof s=="function"?{desktop:s(S,"desktop"),tablet:s(S,"tablet"),mobile:s(S,"mobile")}:s:0,x=typeof E=="object"?E.desktop:E;Wm(T)?(i[m]=d.value,f=!0):T!==void 0&&(i[m]=It(a.desktop)==="px"?T:Na(T,It(a.desktop),x));let v=Fw(y(o[p]),y(n[p]),y(t[p]),a,E);for(let[w,[L,C]]of[["tablet",b[0]],["phone",b[1]]]){let D=v[w];D!==void 0&&(u.push(L),l[C]=D,D===d.value&&(f=!0))}}return f&&u.push(...d.className.split(" ")),{classes:u,style:{...i,...l}}}var jm={top:"padTop",bottom:"padBottom",left:"padLeft",right:"padRight"},Gi="padUnit";function Bw(e,t){let n=e[Gi],o=(a,s,r)=>{let i=O(a)??(r===void 0?void 0:Di(r,n,"desktop")),l=O(s);return l===void 0?i:(i??0)+Di(l,n,"desktop")};return{top:o(e.padTop,e.sectionPaddingTop,t.top),bottom:o(e.padBottom,e.sectionPaddingBottom,t.bottom)}}function d2(e,t,n={}){let o=Bw(e,t),a={...Hw(e,jm,!0,Gi),top:o.top,bottom:o.bottom};n.noTop&&Object.assign(a,{top:0,topTablet:void 0,topPhone:void 0});let s=Mi(a),r=s?s.className.split(" ").filter(i=>i!==Hi):[];return{...r.length?{className:r.join(" ")}:{},style:s?.style??{}}}var Ra={top:"sectionPaddingTop",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft",right:"sectionPaddingRight"},p2=[...["top","bottom","left","right"].map(e=>[jm[e],Ra[e]]),[Gi,$m]].flatMap(([e,t])=>[[e,t],...["tablet","mobile"].map(n=>[H(e,n),H(t,n)])]);function Hw(e,t=Ra,n=!0,o=t===Ra?$m:void 0){let a={};if(o){e[o]!==void 0&&(a.unit=e[o]);for(let r of["tablet","mobile"])e[H(o,r)]!==void 0&&(a[H("unit",r)]=e[H(o,r)])}for(let r of n?["top","bottom","left","right"]:["top","bottom"]){a[r]=e[t[r]];for(let i of["tablet","mobile"])a[H(r,i)]=e[H(t[r],i)]}let s=e[Mw];if(Array.isArray(s)){let r=Vm.flatMap(i=>Ia.filter(l=>s.includes(H(t[i],l))).map(l=>H(i,l)));r.length&&(a.totals=r)}return a}var Mw="padTotal",Vm=["top","bottom"];function f2(e=Ra){return Vm.flatMap(t=>Ia.map(n=>H(e[t],n)))}var Fi=16,Bi=24,Uw={text:Fi,heading:Bi,line:0},Mm={all:{12:"py-3",16:"py-4",24:"py-6"},edge:{12:"max-view-wide:py-3"}},Gw={[Fi]:Mm.all[Fi],[Bi]:Mm.all[Bi],[Uw.line]:""};function m2(e,t){return{className:Gw[t]??"",...e?{pad:{values:e,frame:t}}:{}}}var h2=e=>({desktop:e.top,tablet:e.top,mobile:e.topPhone});function g2(e,t){if(!t)return{root:Gm(e.values,e.frame),outer:null};if(!e.values.totals?.length)return{root:null,outer:Um(e.values)};let n=e.values,{top:o,bottom:a,topTablet:s,bottomTablet:r,topPhone:i,bottomPhone:l,left:u,right:d,leftTablet:f,rightTablet:p,leftPhone:m,rightPhone:b,...y}=n,T={...y,top:o,bottom:a,topTablet:s,bottomTablet:r,topPhone:i,bottomPhone:l},S=Gm(e.drawsFrame?$w(T,e.frame):T,e.frame),E=S&&e.drawsFrame?{...S,className:S.className.split(" ").filter(v=>v!==Hi).join(" ")}:S,x=["tablet","mobile"].some(v=>["top","bottom"].some(w=>typeof n[H(w,v)]=="number"&&!n.totals?.includes(H(w,v))));return{root:E&&e.edge&&E.className&&!x?{...E,attrs:Tc}:E,outer:Um({...y,totals:void 0,left:u,right:d,leftTablet:f,rightTablet:p,leftPhone:m,rightPhone:b})}}function $w(e,t){let n={...e},o=[...e.totals??[]];for(let a of Ia)for(let s of["top","bottom"]){if(Aa[a].some(l=>O(e[H(s,l)])!==void 0))continue;let r=l=>Vn(t,s,l),i=Aa[a][1];i&&r(i)===r(a)||(n[H(s,a)]=Di(r(a),e[H("unit",a)],a),o.push(H(s,a)))}return{...n,totals:o}}function zw(e,t){let n={...e};for(let o of["tablet","mobile"]){let a=H("unit",o),s=["top","bottom","left","right"].some(r=>O(e[H(r,o)])!==void 0);for(let r of["top","bottom"]){if(O(n[H(r,o)])!==void 0)continue;let i=Aa[o].slice(1).find(d=>O(n[H(r,d)])!==void 0);if(!i||Vn(t,r,i)===Vn(t,r,o)||e.totals?.includes(H(r,i)))continue;let l=O(n[H(r,i)]),u=It(n[H("unit",i)]);if(s){let d=It(n[a]);n[H(r,o)]=u===d?l:zm(l,u,d,o,{min:0,max:fe.max,step:1})}else n[H(r,o)]=l,n[a]=n[H("unit",i)]}}return n}function Um(e){return Mi(e)}function Gm(e,t){let n=typeof t=="object"?zw(e,t):e,o=(a,s,r,i,l)=>typeof a!="number"?void 0:It(s)==="px"&&!n.totals?.includes(r)?a+Vn(t,i,l):a;return Mi({...n,frame:t,top:o(n.top,n.unit,"top","top","desktop"),bottom:o(n.bottom,n.unit,"bottom","bottom","desktop"),topTablet:o(n.topTablet,n.unitTablet,"topTablet","top","tablet"),bottomTablet:o(n.bottomTablet,n.unitTablet,"bottomTablet","bottom","tablet"),topPhone:o(n.topPhone,n.unitPhone,"topPhone","top","mobile"),bottomPhone:o(n.bottomPhone,n.unitPhone,"bottomPhone","bottom","mobile")})}import{BUTTON_PAD_KEYS as La,buttonBorderOf as Ww,buttonFillOpacityOf as Kw,buttonPadSidesOf as jw,viewKeyAt as Vw}from"efficient-easel/draw";import{BUTTON_PAD_UNIT_KEY as $i,lengthOf as Yw}from"efficient-easel/screen/lib/content/length-units";var Xw="px-6 py-4",qw=4,Da=e=>{let t=new RegExp(`\\bp${e}-(?:\\[(\\d+)px\\]|(\\d+))`).exec(Xw);if(!t)throw new Error(`BUTTON_PAD_CLASSES has no p${e}`);return t[1]!==void 0?Number(t[1]):Number(t[2])*qw},w2={top:Da("y"),right:Da("x"),bottom:Da("y"),left:Da("x")},Xm="var(--btn)";function Zw(e){let t=e.variant==="ghost",n=Kw(e.buttonFillOpacity),o=Ww(e.buttonBorder),a=W(e.buttonColor);return{fillOpacity:n??(t?0:100),border:{width:o?.width??1,color:o?.color??a??(t?"currentColor":Xm)},changed:n!==void 0||o!==void 0}}function C2(e){let t=Zw(e);if(!t.changed)return null;let n=W(e.buttonColor)??Xm;return{background:t.fillOpacity===0?"transparent":t.fillOpacity===100?n:`color-mix(in srgb, ${n} ${t.fillOpacity}%, transparent)`,borderWidth:Yw(t.border.width,F(e.buttonBorderUnit)),borderStyle:"solid",borderColor:t.border.color}}var Jw="var(--sf-button-radius, 0)";function O2(e){let t=O(e.buttonCorners),n=Le(e.buttonCornerSides);if(t===void 0&&n===null)return null;let o=t===void 0?Jw:M(Math.max(0,t),e.buttonCornersUnit);return{borderRadius:n===null?o:Ct(o,n)}}function P2(e){let t=(r,i)=>e[Vw(r,i)],n=r=>jw({top:t(La.top,r),right:t(La.right,r),bottom:t(La.bottom,r),left:t(La.left,r)})??{},o={desktop:t($i,"desktop"),tablet:t($i,"tablet"),phone:t($i,"mobile")},{classes:a,style:s}=Ui(n("desktop"),n("mobile"),n("tablet"),void 0,o);return Object.keys(s).length?{className:a.join(" "),style:s}:null}var Ym="upper";function qm(e,t,n){let o=e&&typeof e=="object"?e:{},a=W(o.textStyle),s=a?W(t?.find(d=>d?.id===a)?.name):void 0,r=a?/^(heading|body)-(\d+)$/.exec(a):null,i=a?s||(r?n.styleName({kind:r[1],n:Number(r[2])}):a):n.noStyle,{cases:l}=n,u=W(o.case)??Ym;return`${i} \xB7 ${l[u]??l[Ym]}`}import{usePreviewParts as ZO}from"efficient-easel/draw/client";import{encodePartId as JO}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as QO,useEaselStrings as eP}from"efficient-easel/strings";import{PIN_STICK_VAR as Qw,PIN_TRACK_POSITION_VAR as eC,pinAttrs as Zm,pinStickVars as tC,readPin as Ki}from"efficient-shell/format";var L2="Stick to top",ye={min:0,max:200,step:4,fallback:0},Yn={kind:"position",unitKey:"stickTopDistanceUnit"},Jm=Wt(Yn),[nC,oC,aC]=Jm,ji="Pin while scrolling",Qm="Scroll",Ce={distance:"--sf-pin-distance",position:"--sf-pin-position",on:"--sf-pin-on",length:"--sf-pin-length",stick:"--sf-pin-stick",trackPosition:"--sf-pin-track-position",header:"--sf-pin-header"},Xn="stickTopScreens",sC=[Xn,"stickTopScreensTablet","stickTopScreensPhone"],Vi="Screens",Yi="stickTopStop",pn="screen",eh="Pin stops at",th=[{value:"header",label:"Under the header"},{value:pn,label:"Screen top"}],nh="header",oh="Under the header: the section stops below the site header. Screen top: it stops at the top edge of the screen, under a see-through header.";function Xi(e){return e===pn?pn:"header"}function ah(e){return e===pn?pn:void 0}var qi="stickAbove",sh="Stays above",rh="On: the pinned box stays on top, and the sections after it scroll under it.";function rC(e){return e.stickAbove===!0}var D2=["stickTop","stickTopDistance","stickTopTablet","stickTopDistanceTablet","stickTopPhone","stickTopDistancePhone",...Jm,...sC,Yi,qi],F2=new Set(["IntroBleed"]),B2=new Set(["CategoryBar","DocTabs","Contents"]);function iC(e){return typeof e.stickTop=="boolean"?e.stickTop:e.sticky!==!1}var zi=e=>Ki(!0,e).length,Zi={any:["stickTop","stickTopTablet","stickTopPhone"].map(e=>({field:e,is:!0}))},ih={all:[{not:{field:"stickTop",in:[!0,!1]}},{not:{field:"sticky",is:!1}}]};function Wi(e,t="px"){let n=O(e)??ye.fallback;return t!=="px"?Math.max(ye.min,n):Math.min(ye.max,Math.max(ye.min,Math.round(n)))}function Ji(e){return typeof e.stickTopTablet=="boolean"}function Qi(e){return typeof e.stickTopPhone=="boolean"}function fn(e,t={}){let n=t.intro?iC(e):e.stickTop===!0,o=e,a=F(o[nC]),s=Wi(e.stickTopDistance,a),r=zi(e.stickTopScreens),i=Ji(e),l=i?e.stickTopTablet===!0:n,u=i?F(o[oC]):a,d=i?Wi(e.stickTopDistanceTablet,u):s,f=i?zi(e.stickTopScreensTablet):r,p=Qi(e),m=p?e.stickTopPhone===!0:l,b=p?F(o[aC]):u,y=p?Wi(e.stickTopDistancePhone,b):d,T=p?zi(e.stickTopScreensPhone):f;return{desktop:n,desktopDistance:s,desktopUnit:a,desktopScreens:r,tablet:l,tabletDistance:d,tabletUnit:u,tabletScreens:f,ownTablet:i,phone:m,phoneDistance:y,phoneUnit:b,phoneScreens:T,ownPhone:p}}function H2(e,t={}){let n=fn(e,{intro:t.atScreenTop});if(!n.desktop&&!n.tablet&&!n.phone)return null;let o=t.atScreenTop===!0&&typeof e.stickTop!="boolean",a=n.desktop&&n.desktopScreens>0||n.tablet&&n.tabletScreens>0||n.phone&&n.phoneScreens>0,s=t.above===!0&&rC(e),r=t.track===!0&&!o&&a&&!s,i=(f,p,m,b)=>kt({tabletClass:"",tabletVar:`${f}-tablet`,phoneClass:"",phoneVar:`${f}-phone`},p,m,b).style,l={...t.atScreenTop||Xi(e.stickTopStop)===pn?{[Ce.header]:"0px"}:{},[Ce.distance]:M(n.desktopDistance,n.desktopUnit),...i(Ce.distance,M(n.desktopDistance,n.desktopUnit),M(n.tabletDistance,n.tabletUnit),M(n.phoneDistance,n.phoneUnit))};if(r){let f=m=>m?"1":"0",p={...l,...n.desktop?{}:{[Ce.on]:"0"},...i(Ce.on,f(n.desktop),f(n.tablet),f(n.phone)),[Ce.length]:String(n.desktopScreens),...i(Ce.length,String(n.desktopScreens),String(n.tabletScreens),String(n.phoneScreens)),...lC(n.desktop&&n.desktopScreens===0,n.tablet&&n.tabletScreens===0,n.phone&&n.phoneScreens===0,i)};return{attrs:Zm(Ki(!0),"track").attrs,style:p}}let u=f=>f?"sticky":"static",d={...l,...n.desktop?{}:{[Ce.position]:"static"},...i(Ce.position,u(n.desktop),u(n.tablet),u(n.phone))};return{attrs:Zm(Ki(!0),"stick",s?{above:s}:{}).attrs,style:d}}function lC(e,t,n,o){let a=[[Ce.stick,Qw],[Ce.trackPosition,eC]],[s,r,i]=[e,t,n].map(tC);return Object.fromEntries(a.flatMap(([l,u])=>[...e?[[l,s[u]]]:[],...Object.entries(o(l,s[u],r[u],i[u]))]))}import{parseOption as cC}from"efficient-shell/format";var uC=["column","row","tabs","accordion"];var dC={column:"Stacked",row:"One row",tabs:"Tabs",accordion:"Accordion"},lh={Flex:uC,HeroGroup:["column","row"]},pC={Flex:"row",HeroGroup:"column"},fC={column:"flex-col",row:"flex-row",tabs:"flex-col",accordion:"flex-col"};function Fa(e,t){return cC(lh[e],pC[e],t)}function G2(e,t){return fC[Fa(e,t)]}function ch(e){return lh[e].map(t=>({label:dC[t],value:t}))}import{viewKeyAt as el}from"efficient-easel/screen/lib/content/view-tiers";import{BORDER_WIDTH_MAX as Ha}from"efficient-easel/screen/lib/content/style-keys";var mC=["solid","dashed","dotted"],Ma=["top","right","bottom","left"],j2="sf-section-border",V2="sf-section-border-self",hC=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,gC=e=>typeof e=="number"&&Number.isFinite(e)?`${Math.min(Ha,Math.max(0,Math.round(e)))}px`:void 0,qn={kind:"border",unitKey:"sectionBorderUnit"},Y2=Wt(qn);function X2(e){let t=qn.unitKey;return{desktop:e[el(t,"desktop")],tablet:e[el(t,"tablet")],phone:e[el(t,"mobile")]}}var uh=(e,t)=>t==="px"?gC(e):typeof e=="number"&&Number.isFinite(e)?M(Math.max(0,e),t):void 0;function Ba(e,{phone:t=!1,tablet:n=!1,unit:o}={}){if(!e||typeof e!="object")return;let a=t?"-phone":n?"-tablet":"",s={},r=F(o);for(let i of Ma){let l=uh(e[i],r)??uh(e.width,r);l!==void 0&&(s[`--sf-border-${i}-width${a}`]=l)}return typeof e.style=="string"&&mC.includes(e.style)&&(s[`--sf-border-style${a}`]=e.style),typeof e.color=="string"&&hC.test(e.color)&&(s[`--sf-border-color${a}`]=e.color.toLowerCase()),Object.keys(s).length?s:void 0}function tl(e){let{width:t,...n}=e;return typeof t!="number"?e:{...n,...Object.fromEntries(Ma.map(o=>[o,n[o]??t]))}}function q2(e,t,n,o={}){let a=Ba(e,{unit:o.desktop}),s=Ba(n,{tablet:!0,unit:o.tablet}),r=Ba(n,{phone:!0,unit:o.tablet}),i=Ba(t,{phone:!0,unit:o.phone}),l=r||i?{...r,...i}:void 0;return a||s||l?{...a,...s,...l}:void 0}import{parseHexColor as bC}from"efficient-shell/format";var mn="var(--section-bg)",nl="inherit";function ol(e,t){return e===nl?mn:e===void 0?t:Ua(e)}var yC=/var\(\s*--(surface-2|surface|line)\s*(?=[,)])/g;function Ua(e){let t=Ae(e);return t?He(t):e.replace(yC,"var(--site-$1")}var SC={"var(--section-bg)":"band","var(--site-surface)":"surface","var(--site-surface-2)":"surface2"};function al(e,t,n){let o=ol(e,t);if(!o||o==="transparent")return n.background.toLowerCase();let a=o.trim(),s=a.startsWith("#")?bC(a):null;if(s)return s.toLowerCase();let r=SC[a.replace(/\s+/g,"")];return(r?n[r]:n.background).toLowerCase()}var sl="transparent";function dh(e,t){let n=ol(e,t);return!n||n===sl?"none":n===mn?"band":null}function ph(e,t,n=t){let o=s=>!s||s==="transparent",a=ol(e,t);return a===n||o(a)&&o(n)}var fh=["transparent","var(--wheel-stage)","var(--surface)","var(--surface-2)"],mh={transparent:"No fill","var(--wheel-stage)":"Image stage","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},hn="var(--wheel-stage)",Ga="transparent",Zn="inherit";function n$(e,t){return Ua(rl(e,t))}function rl(e,t){return e===Zn?hn:e==null?t:e===!0?hn:e===!1?Ga:e}function o$(e){return typeof e=="string"&&e!==Zn?Ua(e):hn}function a$(e){return e!==Ga&&e!=="none"&&e!==""}function hh(e,t){return e===Zn||e===!0?!0:e==null?t===hn:!1}var gh="inherit",$a="fixed",bh=e=>typeof e!="number"&&e!==$a,_C="var(--sf-heading-max, 9999px)";function i$(e,t,n,o,a){if(typeof e=="number")return M(e,a);if(e===$a)return t;let s=o?`var(--size-${o}, ${t})`:t;return n==="heading"?`min(${s}, ${_C})`:s}var il={kind:"fontSize",unitKey:"titleSizeUnit"},ll={kind:"fontSize",unitKey:"bodySizeUnit"},TC=["desktop","mobile"],l$=[il,ll].flatMap(e=>Wt(e,TC));function c$(e){let t=(n,o)=>Dc(e,n,o);return{titleDesktop:t(il,"desktop"),titleMobile:t(il,"mobile"),bodyDesktop:t(ll,"desktop"),bodyMobile:t(ll,"mobile")}}var EC=["page","full"],yh=["full","page"],Nt={full:"Full",page:"Content"},cl="inherit",xC=e=>typeof e=="string"&&EC.includes(e),vC=e=>e===cl;function wC(e,t){return vC(e.widthMode)?{mode:"full",inherited:!0}:xC(e.widthMode)?{mode:e.widthMode,inherited:!1}:{mode:t,inherited:t==="full"}}function m$(e){return wC(e,"page").mode==="full"}var CC={CustomHTML:"rawMarkup",Hero:"hero",HeroSingle:"hero",IntroBleed:"scrollOver",SpecStrip:"background",Timeline:"background",Footprint:"background",Prose:"background",ParagraphsA:"background",Cards:"background",KeyFeatures:"background",Chart:"background",Mockup:"background",Testimonials:"background",TitleWithButtons:"background",Countdown:"background",DocMasthead:"background",DocBody:"background",DocMetaCards:"background",Gallery:"background",GalleryB:"background",Reviews:"background",ReviewForm:"background",Form:"background",AppointmentBooking:"background",FAQ:"background",Events:"background",Split:"both",Breadcrumb:"both",Collections:"both",CatalogFilterBar:"both",AlloyWheelsListing:"both",Banner:"contained",Stats:"contained",Logos:"contained",Divider:"contained",OrderSummary:"contained",DeliveryOptions:"contained",PaymentBadges:"contained",CheckoutCTA:"contained",Flex:"contained",Grid:"contained",ContactCards:"contained",MessagingCards:"contained",OpeningHours:"contained",RateTable:"contained",Manifesto:"contentColumn",SectionHeader:"contentFull",ProductHero:"contentFull",ProductGrid:"productGrid",TimelineTrack:"capped",DetailRows:"capped",FitmentTable:"capped",TyreSizes:"capped",TyreFitment:"capped",EuTyreLabel:"capped",BundleOffer:"capped",CompatibleTyres:"capped",RelatedProducts:"capped",ProcessSteps:"capped",StatsParagraph:"capped",Masthead:"capped",FeaturedCover:"capped",LongRead:"capped",Series:"capped",ContactLocations:"capped",FitmentFinder:"capped",SpecTable:"capped",Subscribe:"capped",SubscribeBlogs:"capped",ContactRouting:"capped",SubmitBuild:"capped"};function h$(e){return he(CC,e)}var te={background:"sectionBackgroundWidth",content:"sectionContentWidth",contentMax:"sectionContentMax",contentMaxUnit:"sectionContentMaxUnit"},g$={kind:"size",unitKey:te.contentMaxUnit};function OC(e){let t=e[te.contentMaxUnit],n=F(t),o=e[te.contentMax],a=n==="px"?xp(o):typeof o=="number"&&Number.isFinite(o)&&o>0?o:null,s=gn(e[te.content])??(a===null?null:"content");return{background:gn(e[te.background]),content:s,contentMax:s==="content"?a:null,contentMaxUnit:n}}function b$(e){let t=OC(e);return t.content===null&&e.fullWidth===!0?{...t,content:"full"}:t}function y$(e){return e.background!==null||e.content!==null}var S$=e=>({[te.background]:e}),_$=e=>e==="full"?{[te.content]:e,[te.contentMax]:void 0,[te.contentMaxUnit]:void 0}:{[te.content]:e},T$=e=>({[te.content]:"content",[te.contentMax]:e}),E$=e=>e==="background"?{[te.background]:void 0}:{[te.content]:void 0,[te.contentMax]:void 0,[te.contentMaxUnit]:void 0},Sh="siteWidths",PC=e=>e==="full"||e==="content";function gn(e){return PC(e)?e:null}function x$(e,t){return{[Sh]:{background:gn(e),content:gn(t)}}}function v$(e){let t=e.editor?.metadata?.[Sh];return{background:gn(t?.background),content:gn(t?.content)}}import{useEaselSession as tP}from"efficient-easel/screen/lib/session-context";import{BOX_GAP as nP,describedAs as it,group as _e,iconOf as Dt,sharedStyleKinds as so}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Jh,onDesktopWords as Ft,phoneTwinFields as Tl,saidAlignmentGrid as oP,useLengthUnit as aP}from"efficient-easel/screen/lib/document/box-fields";import{createElement as Se}from"react";import{SettingsDefaultReset as kC,SettingsField as AC}from"efficient-easel/panel";import{boxFieldBuilders as RC,describedAs as IC,iconOf as NC,onDesktopWords as LC}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_KIND_UNITS as DC}from"efficient-easel/screen/lib/content/length-units";import{IconPicker as FC,Tooltip as BC,useShellStrings as HC}from"efficient-shell/ui";import{RotateIcon as MC}from"efficient-easel/icons";var _h=e=>c(e),Jn=DC,q=RC(_h,{lengthUnits:Jn}),Fe=q.slider,ne=q.select,Qn=q.Segmented,bn=q.segmented,L$=q.alignmentField,D$=q.alignmentFields,F$=q.blockAlignmentField,B$=q.blockAlignmentFields,H$=q.boxJustifyField,M$=q.boxAlignField,U$=q.boxWrapField,Th=q.directionField,za=q.gapField,G$=q.placementField,$$=q.PlacementGridView,z$=q.positionFields,W$=q.sidesPaddingFields,eo=q.lengthUnitFields;function K$(e,t){return Fe("Angle",Se(MC),go.min,go.max,go.step,e,"\xB0",t)}var ul=Symbol("efficient-web-builder.picture-picker-row"),UC={width:"3.5rem",height:"2.75rem",words:!0};function GC({value:e}){return HC().iconNames[e]??e}function dl(e,t,n){return Se(BC,{content:n,className:"sf-pick-tip",children:Se("span",{className:"sf-pick"},Se("span",{className:"sf-pick-pic"},e),Se("span",{className:"sf-pick-cap"},t))})}function $C(e){let t=n=>n.label===void 0?Se(GC,{value:n.value}):c(n.label);return e.map(n=>({value:n.value,...n.label===void 0?{}:{label:c(n.hint??n.label)},icon:dl(n.picture,t(n),n.hint===void 0?t(n):c(n.hint))}))}function Eh(e,t){return Se("span",{className:"sf-pick"},Se("span",{className:"sf-pick-pic"},e),Se("span",{className:"sf-pick-cap sf-pick-cap-closed"},t))}function pl(e,t,n,o,a={}){let s=l=>n.some(u=>u.value===l),r=l=>a.resolve?a.resolve(l):s(l)?l:void 0,i=n.map(l=>({value:l.value,...l.label===void 0?{}:{label:l.label},...l.showWhen?{showWhen:l.showWhen}:{}}));return{type:"custom",[ul]:!0,...IC({},{type:"radio",label:e,options:i}),options:i,render:l=>{let{value:u,onChange:d,field:f}=l,p=f?.options,m=$C(n.filter(v=>!p||p.some(w=>w.value===v.value))),b="follows"in l,y=b?r(a.phoneRest?a.phoneRest(l.follows):l.follows)??o:void 0,T=f?.currentValue,S=r(u)??y??r(T)??o,E=u!=null&&u!=="",x=y===void 0?void 0:n.find(v=>v.value===y);return Se(AC,{label:c(e),icon:NC(t),action:b?Se(kC,{words:P()?.panel,label:c(e),changed:E,detail:x?.label!==void 0?LC(_h,c(x.label),l.followsView):void 0,disabled:l.readOnly===!0,onReset:()=>d(void 0)}):void 0},Se(FC,{label:c(e),value:S,options:m,onChange:d,columns:a.columns,cell:a.cell??UC,tooltips:!1,disabled:l.readOnly===!0}))}}}import{VIEW_ABOVE as hl}from"efficient-easel/screen/lib/content/length-units";import{jsx as h,jsxs as R}from"react/jsx-runtime";import{NoSymbolIcon as ZC}from"efficient-easel/icons";import{useId as JC}from"react";import{parseOption as xh}from"efficient-shell/format";var zC="line",WC=[{label:"None",value:"none"},{label:"Line",value:"line"},{label:"Stripes \xB7 fine",value:"stripes-fine"},{label:"Stripes \xB7 medium",value:"stripes-medium"},{label:"Stripes \xB7 bold",value:"stripes-bold"}],fl={"stripes-fine":{ink:4,period:12},"stripes-medium":{ink:8,period:18},"stripes-bold":{ink:14,period:28}},Y$=28,KC="-45deg",jC="color-mix(in oklab, var(--accent) 50%, var(--bg))";function VC(e){return e!=="line"&&e!=="none"}var YC={sm:24,md:48,lg:80},XC="md",qC=Object.keys(YC);function X$(e){return xh(qC,XC,e)}function q$(e){return xh(WC,zC,e)}function Z$(e){if(!VC(e))return null;let{ink:t,period:n}=fl[e];return`repeating-linear-gradient(${KC}, ${jC} 0 ${t}px, transparent ${t}px ${n}px)`}var J$={kind:"border",unitKey:"thicknessUnit"},Q$={kind:"size",base:"%",unitKey:"lengthPctUnit"};var Wa=44,Ka=28;function A({children:e}){return h("svg",{width:Wa,height:Ka,viewBox:`0 0 ${Wa} ${Ka}`,"aria-hidden":"true",fill:"currentColor",stroke:"currentColor",strokeWidth:1.25,children:e})}var _=({x:e,y:t,w:n,t:o=2,faint:a=!1})=>h("rect",{x:e,y:t,width:n,height:o,rx:o/2,stroke:"none",opacity:a?.45:1}),I=({x:e,y:t,w:n,h:o})=>h("rect",{x:e,y:t,width:n,height:o,rx:2,fill:"none"}),me=({x:e,y:t})=>h("circle",{cx:e,cy:t,r:1.75,stroke:"none"}),Q=({x1:e,y1:t,x2:n,y2:o})=>h("line",{x1:e,y1:t,x2:n,y2:o});function ml(e){let t=20/rn,n=5,o=1,a=[],s=0,r=0,i=0;for(let[d,f]of e)s+d>rn&&(r+=i*(n+o),s=0,i=0),a.push({x:12+s*t,y:r,w:d*t-o,h:f*n+(f-1)*o}),s+=d,i=Math.max(i,f);let l=r+i*(n+o)-o,u=(Ka-l)/2;return h(A,{children:a.map((d,f)=>h("rect",{x:d.x,y:u+d.y,width:d.w,height:d.h,rx:1,stroke:"none",opacity:.6},f))})}var rz={bars:R(A,{children:[h(_,{x:8,y:14,w:5,t:10}),h(_,{x:16,y:8,w:5,t:16}),h(_,{x:24,y:18,w:5,t:6}),h(_,{x:32,y:11,w:5,t:13})]}),line:R(A,{children:[h("polyline",{points:"6,22 14,15 22,18 30,8 38,11",fill:"none",strokeWidth:1.75,strokeLinejoin:"round"}),h(Q,{x1:6,y1:25,x2:38,y2:25})]}),donut:R(A,{children:[h("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,opacity:.45}),h("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,strokeDasharray:"34 57",transform:"rotate(-90 22 14)"})]})};function iz(e){if(e==="none")return h("span",{style:{display:"flex",width:Wa,height:Ka,alignItems:"center",justifyContent:"center"},children:h(ZC,{size:20})});if(e==="line")return h(A,{children:h(Q,{x1:4,y1:14,x2:40,y2:14})});let{ink:t,period:n}=fl[e],o=.4,a=[];for(let s=-12;s<Wa;s+=n*o)a.push(h("polygon",{points:`${s},22 ${s+t*o},22 ${s+t*o+10},6 ${s+10},6`,stroke:"none"},s));return h(QC,{children:a})}function QC({children:e}){let t=`sf-div-${JC().replace(/[^\w-]/g,"")}`;return R(A,{children:[h("clipPath",{id:t,children:h("rect",{x:4,y:6,width:36,height:16,rx:2})}),h("g",{clipPath:`url(#${t})`,children:e})]})}var ja=({x:e,y:t,w:n,h:o})=>h("rect",{x:e,y:t,width:n,height:o,rx:2,stroke:"none",opacity:.3}),lz={tabs:R(A,{children:[h(_,{x:5,y:10,w:9}),h(_,{x:18,y:10,w:9,faint:!0}),h(_,{x:31,y:10,w:9,faint:!0}),h(Q,{x1:4,y1:17,x2:40,y2:17}),h(_,{x:4,y:16,w:11,t:2})]}),largeTabs:R(A,{children:[h(Q,{x1:4,y1:5,x2:40,y2:5}),h(me,{x:7,y:10}),h(_,{x:11,y:9,w:16}),h(_,{x:31,y:9,w:9,faint:!0}),h(Q,{x1:4,y1:14,x2:40,y2:14}),h(me,{x:7,y:19}),h(_,{x:11,y:18,w:13,faint:!0}),h(_,{x:31,y:18,w:9,faint:!0}),h(Q,{x1:4,y1:23,x2:40,y2:23})]})},cz={card:R(A,{children:[h(I,{x:10,y:3,w:24,h:22}),h(ja,{x:12,y:5,w:20,h:10}),h(_,{x:13,y:18,w:16}),h(_,{x:13,y:21,w:11,t:1.5,faint:!0})]}),cover:R(A,{children:[h(ja,{x:10,y:3,w:24,h:22}),h(I,{x:10,y:3,w:24,h:22}),h(_,{x:13,y:17,w:16}),h(_,{x:13,y:21,w:11,t:1.5})]})},uz={cards:R(A,{children:[h(I,{x:3,y:5,w:11,h:18}),h(I,{x:17,y:5,w:11,h:18}),h(I,{x:31,y:5,w:11,h:18}),h(_,{x:5,y:9,w:7}),h(_,{x:19,y:9,w:7}),h(_,{x:33,y:9,w:7}),h(_,{x:5,y:13,w:5,t:1.5,faint:!0}),h(_,{x:19,y:13,w:5,t:1.5,faint:!0}),h(_,{x:33,y:13,w:5,t:1.5,faint:!0})]}),"label-only":R(A,{children:[h("path",{d:"M8.5 7l3 3-3 3-3-3zM22.5 7l3 3-3 3-3-3zM36.5 7l3 3-3 3-3-3z",stroke:"none"}),h(_,{x:5,y:18,w:7}),h(_,{x:19,y:18,w:7}),h(_,{x:33,y:18,w:7})]})},dz={table:R(A,{children:[h(I,{x:3,y:5,w:38,h:18}),h(Q,{x1:15.7,y1:5,x2:15.7,y2:23}),h(Q,{x1:28.3,y1:5,x2:28.3,y2:23}),h("path",{d:"M15.7 5v18M28.3 5v18",fill:"none",strokeWidth:2.5}),h(_,{x:6,y:9,w:6,t:3}),h(_,{x:19,y:9,w:6,t:3}),h(_,{x:31,y:9,w:6,t:3}),h(_,{x:6,y:18,w:7,t:1.5,faint:!0}),h(_,{x:19,y:18,w:7,t:1.5,faint:!0}),h(_,{x:31,y:18,w:7,t:1.5,faint:!0})]}),list:R(A,{children:[h(Q,{x1:3,y1:7,x2:13,y2:7}),h(Q,{x1:17,y1:7,x2:27,y2:7}),h(Q,{x1:31,y1:7,x2:41,y2:7}),h(_,{x:3,y:11,w:6,t:3}),h(_,{x:17,y:11,w:6,t:3}),h(_,{x:31,y:11,w:6,t:3}),h(_,{x:3,y:17,w:8,t:1.5,faint:!0}),h(_,{x:17,y:17,w:8,t:1.5,faint:!0}),h(_,{x:31,y:17,w:8,t:1.5,faint:!0})]})},pz={plain:R(A,{children:[h(_,{x:5,y:12,w:9,t:4}),h(_,{x:18,y:12,w:9,t:4}),h(_,{x:31,y:12,w:9,t:4})]}),cards:R(A,{children:[h(I,{x:3,y:7,w:11,h:14}),h(I,{x:17,y:7,w:11,h:14}),h(I,{x:31,y:7,w:11,h:14}),h(_,{x:5,y:13,w:7}),h(_,{x:19,y:13,w:7}),h(_,{x:33,y:13,w:7})]}),marks:R(A,{children:[h(_,{x:8,y:12,w:6,t:4}),h(_,{x:17,y:12,w:6,t:4}),h(_,{x:26,y:12,w:6,t:4}),h(_,{x:35,y:12,w:3,t:4})]}),chips:R(A,{children:[h(I,{x:3,y:9,w:18,h:10}),h(I,{x:23,y:9,w:18,h:10}),h(me,{x:7,y:14}),h(_,{x:10,y:13,w:8}),h(me,{x:27,y:14}),h(_,{x:30,y:13,w:8})]})},fz={overlay:R(A,{children:[h(ja,{x:4,y:3,w:36,h:22}),h(I,{x:4,y:3,w:36,h:22}),h(_,{x:8,y:15,w:18,t:3}),h(_,{x:8,y:20,w:12})]}),stacked:R(A,{children:[h(_,{x:4,y:3,w:18,t:3}),h(_,{x:4,y:8,w:12}),h(ja,{x:4,y:13,w:36,h:12}),h(I,{x:4,y:13,w:36,h:12})]})},mz={split:R(A,{children:[h(_,{x:4,y:6,w:12,t:3}),h(_,{x:4,y:11,w:9,faint:!0}),h(Q,{x1:20,y1:4,x2:20,y2:24}),h(_,{x:24,y:6,w:16}),h(_,{x:24,y:10,w:11,faint:!0}),h(_,{x:24,y:17,w:16}),h(_,{x:24,y:21,w:11,faint:!0})]}),spine:R(A,{children:[h(Q,{x1:9,y1:4,x2:9,y2:24}),h(me,{x:9,y:8}),h(_,{x:14,y:7,w:24}),h(me,{x:9,y:14}),h(_,{x:14,y:13,w:20}),h(me,{x:9,y:20}),h(_,{x:14,y:19,w:24})]}),alternating:R(A,{children:[h(Q,{x1:22,y1:4,x2:22,y2:24}),h(me,{x:22,y:8}),h(_,{x:4,y:7,w:14}),h(me,{x:22,y:14}),h(_,{x:26,y:13,w:14}),h(me,{x:22,y:20}),h(_,{x:4,y:19,w:14})]}),track:R(A,{children:[h(Q,{x1:4,y1:12,x2:40,y2:12}),h(me,{x:8,y:12}),h(me,{x:22,y:12}),h(me,{x:36,y:12}),h(_,{x:4,y:17,w:8}),h(_,{x:18,y:17,w:8}),h(_,{x:32,y:17,w:8}),h(_,{x:4,y:21,w:6,faint:!0}),h(_,{x:18,y:21,w:6,faint:!0}),h(_,{x:32,y:21,w:6,faint:!0})]})},hz={standard:R(A,{children:[h(_,{x:4,y:5,w:10,t:1.5,faint:!0}),h(_,{x:4,y:10,w:28,t:4}),h(_,{x:4,y:18,w:34,faint:!0}),h(_,{x:4,y:22,w:24,faint:!0})]}),editorial:R(A,{children:[h(_,{x:4,y:5,w:5,t:1.5,faint:!0}),h(_,{x:4,y:10,w:20,t:5}),h(_,{x:28,y:11,w:12,faint:!0}),h(_,{x:28,y:15,w:9,faint:!0}),h(Q,{x1:4,y1:22,x2:40,y2:22})]}),simple:R(A,{children:[h(_,{x:4,y:8,w:10,t:1.5,faint:!0}),h(_,{x:4,y:13,w:26,t:4})]}),statement:R(A,{children:[h(_,{x:4,y:6,w:36,t:7}),h(_,{x:4,y:16,w:24,t:7})]}),natural:R(A,{children:[h(_,{x:4,y:8,w:22,t:3}),h(_,{x:4,y:15,w:34,faint:!0}),h(_,{x:4,y:19,w:28,faint:!0})]}),essay:R(A,{children:[h(_,{x:4,y:5,w:24,t:4}),h(_,{x:4,y:13,w:36,faint:!0}),h(_,{x:4,y:17,w:36,faint:!0}),h(_,{x:4,y:21,w:30,faint:!0})]})},gz={"spec-card":R(A,{children:[h(I,{x:4,y:3,w:36,h:22}),h(_,{x:8,y:7,w:14}),h(I,{x:8,y:12,w:8,h:9}),h(I,{x:18,y:12,w:8,h:9}),h(I,{x:28,y:12,w:8,h:9})]}),fitment:R(A,{children:[h(I,{x:4,y:4,w:10,h:5}),h(I,{x:16,y:4,w:10,h:5}),h(I,{x:28,y:4,w:10,h:5}),h(_,{x:4,y:14,w:34,faint:!0}),h(_,{x:4,y:18,w:34,faint:!0}),h(_,{x:4,y:22,w:34,faint:!0})]}),portal:R(A,{children:[h(I,{x:4,y:3,w:36,h:22}),h(_,{x:8,y:7,w:10,t:4}),h(_,{x:8,y:14,w:16,faint:!0}),h(_,{x:26,y:18,w:10,t:4})]}),kanban:R(A,{children:[h(I,{x:4,y:3,w:10,h:22}),h(I,{x:17,y:3,w:10,h:22}),h(I,{x:30,y:3,w:10,h:22}),h(_,{x:6,y:6,w:6,t:4}),h(_,{x:6,y:12,w:6,t:4}),h(_,{x:19,y:6,w:6,t:4}),h(_,{x:32,y:6,w:6,t:4}),h(_,{x:32,y:12,w:6,t:4})]}),claims:R(A,{children:[h(_,{x:4,y:5,w:12,faint:!0}),h(_,{x:20,y:4,w:18,t:4}),h(_,{x:4,y:12,w:12,faint:!0}),h(_,{x:20,y:11,w:10,t:4}),h(_,{x:4,y:19,w:12,faint:!0}),h(_,{x:20,y:18,w:14,t:4})]}),browser:R(A,{children:[h(I,{x:4,y:3,w:36,h:22}),h(Q,{x1:4,y1:8,x2:40,y2:8}),h(_,{x:8,y:11,w:28,t:5,faint:!0}),h(I,{x:8,y:18,w:8,h:4}),h(I,{x:18,y:18,w:8,h:4}),h(I,{x:28,y:18,w:8,h:4})]}),terminal:R(A,{children:[h(I,{x:4,y:3,w:36,h:22}),h("polyline",{points:"8,9 11,11 8,13",fill:"none"}),h(_,{x:13,y:10,w:14}),h(_,{x:8,y:16,w:22,faint:!0}),h(_,{x:8,y:20,w:16,faint:!0})]})},vh={width:"5.75rem",height:"3.75rem",words:!0},bz={width:"8.5rem",height:"3.75rem",words:!0},yz={columns:R(A,{children:[h(I,{x:3,y:4,w:11,h:8}),h(I,{x:17,y:4,w:11,h:8}),h(I,{x:31,y:4,w:11,h:8}),h(_,{x:3,y:16,w:9}),h(_,{x:17,y:16,w:9}),h(_,{x:31,y:16,w:9}),h(_,{x:3,y:20,w:7,t:1.5,faint:!0}),h(_,{x:17,y:20,w:7,t:1.5,faint:!0}),h(_,{x:31,y:20,w:7,t:1.5,faint:!0})]}),"rows-left":R(A,{children:[h(I,{x:6,y:3,w:14,h:9}),h(_,{x:24,y:5,w:14}),h(_,{x:24,y:9,w:10,t:1.5,faint:!0}),h(I,{x:24,y:16,w:14,h:9}),h(_,{x:6,y:18,w:14}),h(_,{x:6,y:22,w:10,t:1.5,faint:!0})]}),"rows-right":R(A,{children:[h(I,{x:24,y:3,w:14,h:9}),h(_,{x:6,y:5,w:14}),h(_,{x:6,y:9,w:10,t:1.5,faint:!0}),h(I,{x:6,y:16,w:14,h:9}),h(_,{x:24,y:18,w:14}),h(_,{x:24,y:22,w:10,t:1.5,faint:!0})]})};import{TEXT_CONTROL_KINDS as m4,SCALAR_TEXT_CONTROLS as h4}from"efficient-easel/draw";function Bt(e,t){return c("{value} from {from}",{value:e,from:t})}function sP(){let{blockGap:e}=B();return e===null?c("this container's own spacing"):Bt(`${e}px`,c("Styles"))}function rP({inherited:e,onReset:t,label:n}){return g(oe,{words:P()?.panel,label:c(n),changed:!e,detail:sP(),onReset:t})}function iP(e){return za({...nP,builtIn:Zt[e],resolve:(t,n)=>vn(e,t,n?.siteGap),action:(t,n)=>g(rP,{inherited:!ko(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[Po]:e}})}function lP(e){return le(ee("mobile",{[Po]:e,type:"custom",render:t=>g(dP,{container:e,...t})}),Qh)}function cP(e){return le(ee("tablet",{[Po]:e,type:"custom",render:t=>g(uP,{container:e,...t})}),Qh)}var Qh={not:{field:"gap",in:Array.from({length:-Ue.min},(e,t)=>Ue.min+t)}};function s4(e){return{gap:ee("desktop",iP(e)),[Cl("gap")]:cP(e),[rt("gap")]:lP(e)}}function uP({container:e,...t}){let[n]=Oe("gap"),{siteGap:o}=t.field??{},a=Math.max(Cn.min,vn(e,n,o));return za({...Cn,builtIn:a,resolve:s=>Ze(s)?s:a,action:(s,r)=>g(oe,{words:P()?.panel,label:c("Gap"),changed:Ze(s),detail:Ft(i=>c(i),`${a}px`),onReset:()=>r(void 0)})}).render(t)}function dP({container:e,...t}){let[n]=Oe("gap"),{siteGap:o,siteGapPhone:a}=t.field??{},s=Ws(e,void 0,n,o,a);return za({...Cn,builtIn:s,resolve:r=>Ws(e,r,n,o,a),action:(r,i)=>g(oe,{words:P()?.panel,label:c("Gap"),changed:Ze(r),detail:Bt(`${s}px`,zs(e,n,a)?c("Styles"):c("Desktop")),onReset:()=>i(void 0)})}).render(t)}function r4(e){return Th({offered:ch(e),fallback:Fa(e,void 0),resolve:t=>Fa(e,t)})}function i4(e,t){return iu(t?lu(e,t):[],t)}function pP({inherited:e,onReset:t,label:n}){return g(oe,{words:P()?.panel,label:c(n),changed:!e,detail:Bt(c("Full"),c("the page")),onReset:t})}function Ht({value:e,onChange:t,label:n,placeholder:o,hint:a,multiline:s,hideable:r=!0,markup:i=!0}){let{text:l,hidden:u}=sO(e),d=to(null),f=to(null),p=E=>t(r?{text:E,hidden:u}:E),m=()=>t({text:l,hidden:!u}),b=r&&u,y=Bh(),T=a?bP(a)?g("span",{className:"sf-hint-while-typing",children:c(a)}):c(a):void 0,S=u?c("Show {label} on the slide",{label:c(n)}):c("Hide {label} on the slide",{label:c(n)});return g(K,{label:c(n),icon:g(OO,{}),htmlFor:y,className:b?"is-hidden":void 0,hint:T,action:r?g(wl,{content:S,children:g(qh,{"aria-pressed":u,"aria-label":S,onClick:m,children:u?g(kh,{name:"eye-off",size:14}):g(kh,{name:"eye",size:14})})}):void 0,children:We("div",{className:"sf-copybox",children:[i&&g(Si,{target:s?f:d,value:l,onChange:p}),s?g("textarea",{id:y,ref:f,value:l,placeholder:o===void 0?void 0:c(o),onChange:E=>p(E.target.value)}):g("input",{id:y,ref:d,type:"text",value:l,placeholder:o===void 0?void 0:c(o),onChange:E=>p(E.target.value)})]})})}function l4(e,t){return{...e,[cO]:t}}function c4(e){let t=e[Ke];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[Ke]:{...t,offPage:!0}}}function u4(e){return!e||typeof e!="object"?!1:e[Ke]?.offPage===!0}function Pl(e){if(!e[Ke])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[or]:!0}}function d4(e){return Ho(e)}function p4(e){let t=e[Ke];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[Ke]:{...t,identifier:!0}}}function g4(e,t){if(!e[Ke])throw new Error("inOwnBox: the field holds no authored text");let{[YO]:n,...o}=e;return{...o,[nr]:!0,render:t}}var fP=new Set(qO),Qa={type:"radio",options:[{value:!0},{value:!1}]},eg={text:{type:"object",objectFields:{text:{type:"text"},hidden:Qa}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:Qa}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},Mt=(e,t)=>{let n=it({...t,[Ke]:e},{...eg[e.control],label:e.label});if(!fP.has(e.control))return n;let o=t.render;return{...Zh(n,"authored-copy"),render:a=>g(nm,{name:a.name,children:o(a)})}},b4="Everything else on this block comes from the linked post. Unlink it to edit by hand.",mP={field:"source.slug",set:!0},y4={not:mP},hP="Select a word, then press the highlighter.",gP=new Set([hP]),bP=e=>gP.has(e);function ts(e,t,n){return Mt({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:e,placeholder:t,hint:n})})}function kl(e,t,n){return Mt({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:e,placeholder:t,hint:n,multiline:!0})})}function yn(e,t,n){return Mt({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function tg(e,t,n){return Mt({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:e,placeholder:t,hint:n,hideable:!1})})}function S4(e){return{type:"custom",[iO]:{label:e},...it({},{type:"text",label:e}),render:({value:t,onChange:n})=>g(Fm,{value:rO(t),onChange:n,label:e})}}function _4(e,t,n){return Mt({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}var T4={Design:uO,Animation:pO};function E4(e,t){return{type:"custom",render:()=>g(yP,{text:e,values:t})}}function yP({text:e,values:t}){return g("p",{className:"sf-note",children:c(e,t)})}function x4(e){return Mh(e)!==null&&e?.tabs!==void 0}var Ah=new Map;function v4(e,t){let n=`${e}\0${t?t.join(""):""}`,o=Ah.get(n)??{type:"custom",tabs:t,[Hh]:{label:e,level:1},bucket:e,marker:!0,render:()=>g(je,{})};return Ah.set(n,o),o}var Rh=new Map;function w4(e){let t=Rh.get(e)??{type:"custom",[Hh]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>g(je,{})};return Rh.set(e,t),t}function SP(e){let t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function C4(e,t){return SP(e)===t?e:{...e,marker:!0,fold:t,render:()=>g(je,{})}}function O4(e){let t=e;if(t.marker===!0&&t.fold===void 0)return e;let{fold:n,...o}=e;return{...o,marker:!0,render:()=>g(je,{})}}function P4({title:e,children:t}){let[n,o]=no(()=>!gl.has(e));return g(AO,{title:e,open:n,onToggle:a=>{o(a),a?gl.delete(e):gl.add(e)},children:t})}var gl=new Set;function _P({swatches:e,current:t,onPick:n,names:o}){let a=e.find(i=>i.toLowerCase()===t.toLowerCase()),s=a?o?.[a]:void 0,r=s?c(s):t;return We("div",{className:"sf-swatches",children:[e.map(i=>{let l=o?.[i]?c(o[i]):i;return g(wl,{content:l,children:g(MO,{color:i,selected:t.toLowerCase()===i.toLowerCase(),onClick:()=>n(i),"aria-label":l})},i)}),g("span",{className:"sf-swatch-hex",children:r})]})}function k4(e,t,n=!1){return{type:"custom",render:({value:o,onChange:a})=>g(TP,{label:e,builtIn:t,followsBand:n,value:o,onChange:a})}}function TP({label:e,builtIn:t,followsBand:n,value:o,onChange:a}){let s=typeof o=="string"?o:void 0,{colors:r,n:i}=Ll(),l={background:r.background,surface:r.surface,surface2:Wc(r),band:Kc(r)},u=n?mn:t,d=ph(s,t,u),f=al(void 0,u,l),p=n?nl:void 0,m=u===mn?c("the theme's section background"):c("Theme {n} background",{n:i}),b=EP(s,t,r,i,l,a),y=Bt(f.toUpperCase(),m),T=Ae(s),S=T?qt(T,r,i):null;return S?g(be,{label:c(e),icon:g(wh,{}),value:S.hex,caption:S.words,onChange:a,changed:!0,onReset:()=>a(p),resetTo:y,choices:b}):g(On,{label:c(e),icon:g(wh,{}),value:d?"":al(s,t,l),inherited:f,resetTo:y,onChange:a,onReset:()=>a(p),choices:b})}function EP(e,t,n,o,a,s){let r=dh(e,t);return[{label:c("No fill"),color:"",selected:r==="none",onPick:()=>s(sl)},{label:`${c("Section band")} \xB7 ${a.band.toUpperCase()}`,color:a.band,selected:r==="band",onPick:()=>s(mn)},...Nl(Ae(e)??"",n,o,s)]}function xP(e,t){return{type:"custom",render:({value:n,onChange:o})=>{let a=n,s=hh(a,t);return g(K,{label:c(e),icon:g(Sl,{}),changed:!s,action:g(oe,{words:P()?.panel,label:c(e),changed:!s,detail:c("the theme's image stage"),onReset:()=>o(Zn)}),children:_P({swatches:fh,current:s?hn:rl(a,t),onPick:o,names:mh})})}}}function A4(e=n=>n,t){return so({_gSectionTheme:_e(ou),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>g(rd,{value:e(n),onChange:o,followLabel:t})}})}function ns(e){let t=Z(),n=Ms(e?.view),o=r=>Ol(e.valueKey,r),a=e.numbersIn??(r=>O(t[o(r)])!==void 0),s=e.followsView??HP(n,a);return aP({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Jn,label:c(e.label),grid:e.grid,hasOwn:a(n),view:{tier:n,numbersIn:a,followsView:s},convertTo:e.convertTo??(r=>{let i=O(t[o(n)]);return i===void 0?{}:{[o(n)]:r(i)}})})}function de({min:e,max:t,step:n,value:o,onChange:a,suffix:s="",readout:r=!0,notch:i,ariaLabel:l,disabled:u=!1,placeholder:d,placeholderWord:f,onClear:p,units:m,inputMax:b}){let y=i!==void 0&&Number.isFinite(i)&&i>=e&&i<=t;return g("div",{className:y?"sf-slider has-notch":"sf-slider",style:y?{"--sf-notch":(i-e)/(t-e)}:void 0,children:g(jO,{min:e,max:t,step:n,value:o,...o===null&&d!==void 0?{placeholderValue:d}:{},...f?{emptyLabel:c(f)}:{},suffix:s||void 0,...m?{units:m}:{},...b!==void 0?{inputMax:b}:{},showInput:r,label:l===void 0?void 0:c(l),disabled:u,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:T=>{T===null?p?.():T!==o&&a(T)}})})}function vP(e,t){let{min:n,max:o,step:a=1,unsetLabel:s,hint:r,restTrack:i,unsetMark:l,icon:u,unit:d="px"}=t;return{type:"custom",render:({value:f,onChange:p})=>{let m=typeof f=="number"?f:null,b=m===null;return g(K,{label:c(e),icon:u?Dt(u):void 0,value:b?l||s===void 0?void 0:c(s):`${m}${d}`,changed:!b,action:l?El(l,{changed:!b,onReset:()=>p(null)}):g(oe,{words:P()?.panel,label:c(e),changed:!b,onReset:()=>p(null)}),hint:typeof r=="string"?c(r):r,children:i?i({min:n,max:o,step:a,px:m,label:e,onChange:p}):de({min:n,max:o,step:a,value:m??n,readout:!1,ariaLabel:e,onChange:p})})}}}var oo="Corners",wP={kind:"radius"};function Al(e){return{type:"custom",render:t=>{let{value:n,onChange:o}=t,a=typeof n=="number"&&Number.isFinite(n)?n:null,s=a!==null;return g(K,{label:c(oo),icon:g(Gh,{}),changed:s,action:El(e.mark,{changed:s,onReset:()=>o(null)}),hint:e.hint,children:g(CP,{tier:e,px:a,name:t.name,onRadius:o})})}}}function Oe(e){let t=Lt();return[t?.values?.[e],n=>t?.onChange(e,n)]}function ng(){return Zh({type:"custom",render:()=>g(XO,{})},"always")}function un(){let e=Lt();return t=>e?.onChangeMany(t)}function CP({tier:e,px:t,name:n,onRadius:o}){let a=e.useFollowed(),[s,r]=Oe(e.sidesKey),i=un(),l=ns({row:e.row??wP,label:oo,grid:{min:ae,max:Xe,step:e.step??1},valueKey:n??"",view:"desktop"}),u=Le(s)??[...oa];return g(UO,{label:c(oo),value:u,corners:$p,onChange:d=>{let f=Le(d)??[];r(f.length===oa.length?null:f)},radius:t,onRadiusChange:l&&n?d=>i({[n]:d,...l.unitPatch(d===null)}):o,radiusMin:l?.grid.min??ae,radiusMax:l?.grid.max??Xe,radiusStep:l?.grid.step??e.step??1,radiusPlaceholder:l&&l.unit!=="px"?"\u2013":String(a),...l?{radiusUnit:l.unit,units:l.units}:{}})}function og(e,t){return eo(e,t)}function ag(){return ng()}function OP({label:e,changed:t=!1,onReset:n=()=>{}}){let{cornerRadiusPx:o}=B(),a=typeof o=="number"?`${o}px`:c("not set");return g(oe,{words:P()?.panel,label:c(e),changed:t,detail:o==null?c("the built-in corners"):Bt(a,c("Styles")),onReset:n})}function PP(){let{cornerRadiusPx:e}=B();return typeof e=="number"?e:ae}function kP(){return Al({sidesKey:"sectionCornerSides",row:Kr,useFollowed:PP,mark:g(OP,{label:oo}),hint:AP})}var AP="Follows Styles \u25B8 Basics \u25B8 Corners until you set a number here.";function R4(){return so({_gShape:_e("Shape"),sectionCorners:kP(),...og(Kr,"sectionCorners"),sectionCornerSides:ag(),...$e("sectionBorder",BP),...eo(qn,"sectionBorder",{tablet:!0,phone:!0})})}var RP=()=>({width:c("Border width"),sides:{top:c("Border top"),right:c("Border right"),bottom:c("Border bottom"),left:c("Border left")},style:c("Border style"),styles:{solid:c("Solid"),dashed:c("Dashed"),dotted:c("Dotted")},color:c("Border color"),unit:"px"});function IP(e){let t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function NP(){let e;try{let t=Pe(B().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Mc.line}function LP({value:e,onChange:t,placeholder:n,presets:o,sides:a=!0,styles:s=!0,above:r={},length:i}){let l=e&&typeof e=="object"?e:{},[u,d]=no(()=>a?DO(l,r):!1),f=RP(),p=m=>IP(a&&s?m:{width:m.width,color:m.color,...s?{style:m.style}:{}});return g(K,{label:c("Border"),icon:g(fO,{}),action:a?g(NO,{each:u,label:c("Each side"),onChange:d}):void 0,children:g(IO,{label:c("Border"),value:l,each:u,onChange:m=>t(p(m)),placeholder:n,presets:o,words:i?{...f,unit:i.unit}:f,styles:s,max:i?.grid.max??Ha,...i?{step:i.grid.step,units:i.units}:{}})})}function DP({value:e,onChange:t,view:n}){let[o]=Oe("sectionBorder"),[a]=Oe(Cl("sectionBorder")),s=NP(),r=p=>p&&typeof p=="object"?p:{},i=n==="phone"?{...tl(r(o)),...tl(r(a))}:n==="tablet"?r(o):{},l=Z(),u=un(),d=U("sectionBorder",n),f=ns({row:qn,label:"Border",grid:{min:0,max:Ha,step:1},valueKey:"sectionBorder",view:n,numbersIn:p=>bl(l[Ol("sectionBorder",p)]),convertTo:p=>{let m=r(l[d]);return bl(m)?{[d]:FP(m,p)}:{}}});return g(LP,{value:e,length:f,onChange:f?p=>u({[d]:p,...f.unitPatch(!bl(p))}):t,placeholder:{sides:LO(i),style:i.style??"solid",color:i.color||s},presets:[s],above:i})}var sg=["width",...Ma];function bl(e){if(!e||typeof e!="object")return!1;let t=e;return sg.some(n=>O(t[n])!==void 0)}function FP(e,t){let n={...e};for(let o of sg){let a=O(n[o]);a!==void 0&&(n[o]=t(a))}return n}function BP(e){return{type:"custom",render:({value:t,onChange:n})=>g(DP,{value:t,onChange:n,view:e})}}function HP(e,t){let n=hl[e];for(;n&&hl[n]!==null&&!t(n);)n=hl[n];return n??e}function I4(e){return{type:"custom",render:()=>g(MP,{partKey:e})}}function MP({partKey:e}){let[t]=Oe("id"),[n]=Oe("_partStyles"),{textStyles:o}=B(),a=eP(),s=null;try{s=ZO().select}catch{s=null}let r=n&&typeof n=="object"?n[e]:void 0,i=Array.isArray(o)?o:null;return g(kO,{name:c("Text"),preview:qm(r,i,{noStyle:c("No style"),styleName:a.textStyles.styleName,cases:(a.copy.panel??QO.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(JO(t,e))}})}function rg(e){let{cornerRadiusPx:t}=B(),n=typeof t=="number"?t:e,o=null;try{let{appState:s,selectedItem:r}=es(l=>l),i=r?.props?.id?String(r.props.id):void 0;o=i?Uf(s?.data,i)?.props??null:null}catch{o=null}if(!o)return n;let a=o.sectionCorners;return jr(a)?a:n}function UP({label:e,changed:t=!1,onReset:n=()=>{}}){let o=rg(ae);return g(oe,{words:P()?.panel,label:c(e),changed:t,detail:Bt(`${o}px`,c("the section")),onReset:n})}function GP(){return g(je,{children:c("Follows the section's Corners until you set a number here.")})}function $P(){return Al({sidesKey:"cardCornerSides",row:Hn,useFollowed:()=>rg(ae),mark:g(UP,{label:oo}),hint:g(GP,{})})}function zP(){return{type:"custom",render:()=>g(Xp,{})}}function N4(){return{_gShape:_e("Shape"),cardCorners:$P(),...og(Hn,"cardCorners"),cardCornerSides:ag(),cardCornersApplyAll:zP()}}function WP(){return it({type:"custom",[ul]:!0,render:e=>g(jP,{...e})},{type:"select",label:pt,options:[{value:"content",label:"Fit content"},{value:"equal",label:"Equal"},{value:[50],label:"Custom: the width of each block in %, the last block left out"}]})}function KP(e,t){let n=xs(e);if(n!=="custom")return c(Es.find(a=>a.value===n)?.label??"");let o=Xh(yo(e,t),t);return o?[...o,100-o.reduce((a,s)=>a+s,0)].join(" / "):c("Custom")}function jP(e){let{value:t,onChange:n}=e,[o]=Oe("content"),a=Array.isArray(o)?o.length:0,s="follows"in e,r=t!=null,i=r?t:s?e.follows:void 0,l=xs(i),u=a>=2&&a<=Oh,d=()=>[...zO[a]??[]],f=to(null),p=S=>{let E=f.current;E&&JSON.stringify(S)===JSON.stringify(E.shares)?n(E.value):S&&n(S)},m=S=>{S===l||S==="custom"&&!u||n(S==="custom"?d():S)},b=c("The width bar works for 2 to {count} blocks.",{count:Oh}),y=r&&(s||t!=="content"),T=KO().widths.hint(a,$O);return g(K,{label:c(pt),icon:g(Za,{}),changed:y,hint:l!=="custom"?void 0:u?T:b,action:g(oe,{words:P()?.panel,label:c(pt),changed:y,disabled:e.readOnly===!0,detail:s?Ft(S=>c(S),KP(e.follows,a),e.followsView):c("Fit content"),onReset:()=>n(void 0)}),children:We("div",{className:"sf-share-row",children:[g("div",{className:"sf-share-pick",children:g(Yh,{label:c(pt),value:l,options:Es.map(S=>({value:S.value,label:S.value==="custom"&&!u?b:c(S.label),icon:dl(g("span",{className:"sf-gallery-pic sf-share-pic",children:ig(S.weights).map((E,x)=>g("i",{style:{gridColumn:`span ${E}`}},x))}),c(S.label),S.value==="custom"&&!u?b:c(S.label))})),onChange:m,columns:3,cell:lg,tooltips:!1,disabled:e.readOnly===!0})}),l==="custom"&&u?g("div",{onFocus:()=>{f.current={value:t,shares:Xh(yo(i,a),a)}},onBlur:()=>{f.current=null},children:g(WO,{label:c(pt),count:a,value:yo(i,a),onChange:p,readOnly:e.readOnly===!0})}):null]})})}function ig(e){if(!e)return[3,4];let t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function L4(){return ne(Oc,g(_O,{}),Cs,Cs[0].value)}function D4(e){return ne("On a phone",g(vO,{}),[{label:"In the header",value:"header"},{label:"In the menu",value:"menu"}],e)}function F4(){return ee("mobile",pl(pt,g(Za,{}),vc.map(e=>({label:e.label,value:e.value,picture:g("span",{className:"sf-gallery-pic sf-share-pic",children:ig(e.weights).map((t,n)=>g("i",{style:{gridColumn:`span ${t}`}},n))})})),wc,{columns:2,cell:lg}))}var lg={width:"5.75rem",height:"3.25rem",words:!0};function B4(){return Tl("share",WP(),Jh)[Cl("share")]}function VP(){return ee("mobile",Fe(vs,g(Uh,{}),So,xc,1,So,"",{clear:{phoneFollows:!1,hint:So}}))}var Ih={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function H4(){let e=Fe(vs,g(Uh,{}),ws,Cc,1,ws,"",{clear:{emptyLabel:"Auto"}}),t=Tl("columns",e,{...Ih,tablet:Jh.tablet}),n=Tl("columns",e,Ih,{phoneRow:VP()});return{...t,phoneRow:n.phoneRow}}function M4(e,t,n,o,a,s,r){return{type:"custom",render:({value:i,onChange:l,name:u})=>g(YP,{label:e,min:t,max:n,step:o,fallback:a,role:s,value:i,onChange:l,name:u??"",length:r})}}function YP({label:e,min:t,max:n,step:o,fallback:a,role:s,value:r,onChange:i,name:l,length:u}){let d=Z(),f=un(),p=Ms(u?.view),m=ns({row:u?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:u?l:"",view:u?.view??"desktop",numbersIn:y=>y===p&&typeof d[l]=="number",followsView:p,convertTo:y=>typeof d[l]=="number"?{[l]:y(d[l])}:{}}),b=y=>m?f({[l]:y,...m.unitPatch(typeof y!="number")}):i(y);return g(K,{label:c(e),icon:g(ui,{noun:s}),action:g(oe,{words:P()?.panel,label:c(e),changed:!bh(r),detail:c("the Text style in Styles"),onReset:()=>b(gh),defaultAction:{onPress:()=>b($a),title:c("Keep this section's own built-in size"),icon:g(mO,{})}}),children:de({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof r=="number"?r:a,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:b})})}function Ya(e,t,n){return[{label:"Auto",value:""},...Array.from({length:e},(o,a)=>({label:a===0?`1 ${t}`:`${a+1} ${n}`,value:String(a+1)}))]}function U4(){return{_gCellWidth:_e("Cell size"),gridSpan:ee("desktop",ne("Positions",g(Za,{}),Ya(ca,"position","positions"),"")),gridRowSpan:ee("desktop",ne("Rows tall",g(Ja,{}),Ya(da,"row","rows"),"")),[ri]:Fe("At card",g(zh,{}),1,ii,1,1,""),[rt("gridSpan")]:ee("mobile",ne("Positions",g(Za,{}),[{label:"Full row",value:""},...Ya(ua,"position","positions").slice(1)],"")),[rt("gridRowSpan")]:ee("mobile",ne("Rows tall",g(Ja,{}),Ya(da,"row","rows"),""))}}function Z(){let e=null,t=null;try{e=Fh(XP),t=es(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}var XP=tO(null);function qP({min:e,max:t,step:n,px:o,label:a,onChange:s,desktopKey:r,fallback:i}){let l=Z()[r],u=xa(void 0,l,i);return g(je,{children:de({min:e,max:t,step:n,value:xa(o,l,i),readout:!1,ariaLabel:a,notch:u,onChange:s})})}function ZP({label:e,desktopKey:t,fallback:n,unit:o="px",changed:a=!1,onReset:s=()=>{}}){let r=Z()[t],i=xa(void 0,r,n);return g(oe,{words:P()?.panel,label:c(e),changed:a,detail:Ft(l=>c(l),`${i}${o}`),onReset:s})}function JP(e){return vP(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:g(ZP,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>g(qP,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}var QP={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},ek={Top:xl,Bottom:Wh,Left:Kh,Right:jh},tk=e=>{let t=ek[e];return g(t,{})};function G4(e={}){let t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,a=T=>QP[T],s=T=>Fe(a("Top"),g(xl,{}),fe.min,fe.max,fe.step,T,"px"),r=(T,S,E,x=fe)=>ee("mobile",JP({label:a(T),icon:tk(T),desktopKey:S,min:x.min,max:x.max,step:x.step,fallback:E})),i=e.top??fe.min,l=e.bottom??fe.min,u="sectionPaddingLeft",d="sectionPaddingRight",f=e.sideBounds??fe,p=e.side??f.min,m=e.sidePhone??p,b=e.phone===!0,y=T=>b?ee("desktop",T):T;return so({...o?{_gSpacing:_e("Padding")}:{},[t]:y(s(i)),...b?{[rt(t)]:r("Top",t,i)}:{},...e.only==="top"?{}:{[n]:y(Fe(a("Bottom"),g(Wh,{}),fe.min,fe.max,fe.step,l,"px")),...b?{[rt(n)]:r("Bottom",n,l)}:{}},...e.sides?{[u]:y(Fe(a("Left"),g(Kh,{}),f.min,f.max,f.step,p,"px")),...b?{[rt(u)]:r("Left",u,m,f)}:{},[d]:y(Fe(a("Right"),g(jh,{}),f.min,f.max,f.step,p,"px")),...b?{[rt(d)]:r("Right",d,m,f)}:{}}:{}})}function $4(e,t){let n=Object.fromEntries(Object.entries(t).map(([s,r])=>[s,s in e&&Mh(r)?e[s]:r])),o={},a=!1;for(let[s,r]of Object.entries(e)){if(s in t){a||Object.assign(o,n),a=!0;continue}o[s]=r}return a||Object.assign(o,n),o}var Xa="Width";function z4(e,t=yh,n=!0){let o=t.map(a=>({label:Nt[a],value:a}));return so({...n?{_gWidth:_e(Xa)}:{},widthMode:{type:"custom",render:({onChange:a,field:s})=>g(K,{label:c(Xa),icon:g(PO,{}),action:n?g(pP,{inherited:s?.inherited??!1,onReset:()=>a(cl),label:Xa}):void 0,children:Qn({options:o,value:s?.currentValue||e,onChange:a,ariaLabel:Xa})})}})}function W4({fill:e=!1}={}){let t=(a,s)=>({type:"custom",render:({value:r,onChange:i})=>g(nk,{value:r,onChange:i,view:a,badge:s,fill:e})}),n=()=>_l("sectionHeightMode"),o=()=>_l("sectionHeightMode");return so({_gHeight:_e(Xt),...$e("sectionHeightMode",a=>a==="desktop"?t(a):t(a,s=>g(rk,{view:a,onClear:()=>s(void 0)}))),...$e("sectionHeightValue",n),...$e("sectionHeightUnit",o)})}function nk({value:e,onChange:t,view:n,badge:o,fill:a=!1}){let s=Z(),{mode:r,number:i,unit:l}=ok(n,s,e);return g(K,{label:Xt,icon:Dt(g(Ja,{})),action:o?o(t):void 0,children:We("div",{className:"es-width-stack",children:[Qn({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...a?[{label:"Fill",value:"fill"}]:[]],value:r,onChange:t,ariaLabel:Xt}),i?g(sk,{view:n,mode:r,menu:l}):null]})})}function cg(e,t){return e==="phone"&&vo(t)?bu(t):hu(t)}function os(e,t){return e==="desktop"||(e==="tablet"?vo(t):gu(t))?null:cg(e,t)}function ok(e,t,n){let o=(a=>du.includes(a))(n)?n:os(e,t)?.mode??"auto";return{mode:o,number:o!=="auto"&&o!=="fill",unit:o==="fixed"}}function ak(e,t,n,o){let a=os(e,t);return!a||e==="desktop"?null:o===void 0?{}:{[U("sectionHeightMode",e)]:a.mode,...a.mode==="fixed"?{[U("sectionHeightUnit",e)]:a.unit}:{},...n==="sectionHeightUnit"?{[U("sectionHeightValue",e)]:a.value}:{},[U(n,e)]:o}}function Nh(e,t,n){let o=Lt(),a=os(e,Z());return!o||!a?{followed:null,write:n}:{followed:a,write:s=>o.onChangeMany(r=>{let i=ak(e,r,t,s);return i===null?{[U(t,e)]:s}:Object.keys(i).length?i:null})}}function sk({view:e,mode:t,menu:n}){let o=Lt(),a=Z(),s=U("sectionHeightValue",e),r=U("sectionHeightUnit",e),i=T=>S=>o?.onChangeMany(()=>({[T]:S})),{followed:l,write:u}=Nh(e,"sectionHeightValue",i(s)),{write:d}=Nh(e,"sectionHeightUnit",i(r)),f=t==="screen"?"%":a[r],p=oO(pu,"px",l?l.unit:f),m=p==="%"?mu:fu,b=a[s],y=n?{options:["px","%"],label:c("Unit"),onChange:T=>d(T)}:void 0;return de({min:m.min,max:m.max,step:m.step,value:l?null:typeof b=="number"?b:m.fallback,...l?{placeholder:l.value}:{},suffix:p,...y?{units:y}:{},ariaLabel:Xt,onChange:u})}function rk({view:e,onClear:t}){let n=Z(),o=os(e,n)===null,a=e==="phone"&&vo(n),s=cg(e,n),r=Ft(i=>c(i),s.mode==="auto"?c("Auto"):`${s.value}${s.unit}`,a?"tablet":"desktop");return g(oe,{words:P()?.panel,label:c(Xt),changed:o,detail:r,onReset:t})}function K4(e={}){let t=e.intro===!0,n=s=>({type:"custom",render:({value:r,onChange:i,id:l,name:u})=>g(fk,{value:r,onChange:i,labelId:`${l??u??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:r,onChange:i})=>g(uk,{value:r,onChange:i,view:s,intro:t})}),a=s=>({type:"custom",render:({value:r,onChange:i})=>g(dk,{value:r,onChange:i,view:s,intro:t})});return{_gStick:_e(Qm,{dot:t?ck:Zi}),...$e("stickTop",n),...$e("stickTopDistance",o),...eo(Yn,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?$e(Xn,a):{},...t?{}:{[Yi]:ik()},...t||e.above===!1?{}:{[qi]:lk()}}}function ik(){let e=ne(eh,g(xl,{}),th,nh);return ee("desktop",{...e,render:t=>{let n=e.render({...t,value:Xi(t.value),onChange:o=>t.onChange(ah(o))});return El(n,{hint:c(oh)})}})}function lk(){let e=lt(sh,!1,g(Vh,{}),rh);return ee("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}var ck={any:[Zi,ih]};function ug(e,t,n,o,a){let s=Lt(),r=Z(),i=e==="desktop"||ao(e,r)?null:Rl(e,fn(r,{intro:o}));return{followed:i,write:(i||a)&&s?l=>s.onChangeMany(u=>{let d=pk(e,u,l,t,o),f=d===null?{[U(t,e)]:l}:d;return Object.keys(f).length?{...f,...a?.(l)??{}}:null}):n}}function uk({value:e,onChange:t,view:n,intro:o}){let a=Z(),s=fn(a,{intro:o}),r=d=>{let f=xo(d);return f==="desktop"||ao(f,a)},i=ns({row:Yn,label:"Distance from top",grid:{min:ye.min,max:ye.max,step:ye.step},valueKey:"stickTopDistance",view:n,numbersIn:d=>r(d)&&O(a[Ol("stickTopDistance",d)])!==void 0,followsView:n==="phone"&&s.ownTablet?"tablet":"desktop"}),{followed:l,write:u}=ug(n,"stickTopDistance",t,o,i?d=>i.unitPatch(d===void 0):void 0);return g("div",{className:"sf-field",children:de({min:i?.grid.min??ye.min,max:i?.grid.max??ye.max,step:i?.grid.step??ye.step,value:l?null:typeof e=="number"?e:ye.fallback,...l?{placeholder:l.distance}:{},...i?{suffix:i.unit,units:i.units}:{suffix:"px"},ariaLabel:c("Distance from top"),onChange:u})})}function dk({value:e,onChange:t,view:n,intro:o}){let{followed:a,write:s}=ug(n,Xn,t,o);return g(K,{label:c(Vi),icon:Dt(g(Ja,{})),children:de({min:Va.min,max:Va.max,step:Va.step,value:a?null:O(e)??Va.default,...a?{placeholder:a.screens}:{},ariaLabel:c(Vi),onChange:s})})}function ao(e,t){return e==="tablet"?Ji(t):Qi(t)}function Rl(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,unit:t.tabletUnit,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,unit:t.desktopUnit,screens:t.desktopScreens}}function pk(e,t,n,o="stickTopDistance",a=!1){if(e==="desktop"||ao(e,t))return null;if(n===void 0)return{};let s=Rl(e,fn(t,{intro:a})),r=e==="phone"&&ao("tablet",t)?d=>U(d,"tablet"):d=>d,i=(d,f)=>t[r(d)]==null?{}:{[U(d,e)]:f},l=Yn.unitKey,u=t[r(l)]==null?{}:{[U(l,e)]:s.unit};return{[U("stickTop",e)]:!0,...i("stickTopDistance",s.distance),...u,...i(Xn,s.screens),[U(o,e)]:n}}function fk({value:e,onChange:t,labelId:n,view:o,intro:a}){let s=Z(),r=fn(s,{intro:a}),i=o==="phone"?r.phone:o==="tablet"?r.tablet:a?r.desktop:e===!0,l=o==="phone"&&r.ownTablet,u=o==="desktop"?null:Rl(o,r),d=u?.on?M(u.distance,u.unit):c("Off");return g(K,{label:c(ji),labelId:n,icon:Dt(g(Vh,{})),action:We(je,{children:[o!=="desktop"?g(oe,{words:P()?.panel,label:c(ji),changed:ao(o,s),detail:Ft(f=>c(f),d,l?"tablet":"desktop"),onReset:()=>t(void 0)}):null,g(vl,{checked:i,onChange:t,ariaLabelledBy:n})]})})}var Lh="e.g. about";function j4(){return{_gAnchor:_e("Anchor"),anchor:Mt({control:"plainText",label:"Name",placeholder:Lh},{type:"custom",render:({value:e,onChange:t})=>g(If,{value:e,onChange:t,nameBox:(n,o)=>g(Ht,{value:n,onChange:o,label:"Name",placeholder:Lh,hideable:!1,markup:!1})})})}}function V4(){return{_gAdvanced:_e("Advanced"),[au]:Il}}var Il={type:"custom",render:({value:e,onChange:t})=>g(K,{label:c("Custom CSS"),icon:Dt(g(BO,{})),children:g(VO,{"aria-label":c("Custom CSS"),spellCheck:!1,autoGrow:!0,className:"font-mono",value:typeof e=="string"?e:"",onChange:n=>t(n.target.value)})})};function Y4(e,t,n){return{type:"custom",render:({value:o,onChange:a,id:s,name:r})=>{let i=`${s??r??e}-datetime`,l=Date.parse(typeof o=="string"?o:"");return g(K,{label:c(e),icon:t,htmlFor:i,hint:n===void 0?void 0:c(n),children:g(GO,{id:i,value:Number.isFinite(l)?new Date(l):null,onChange:u=>a(u?u.toISOString():"")})})}}}function lt(e,t,n,o){return{type:"custom",...it({},{...Qa,label:e}),render:a=>{let{value:s,onChange:r,id:i,name:l}=a,u="follows"in a,d=a,f=typeof s=="boolean",p=typeof d.follows=="boolean"?d.follows:t,m=f?s:u?p:t,b=`${i??l??e}-label`,y=d.readOnly===!0,T=g(vl,{checked:m,onChange:r,disabled:y,ariaLabelledBy:b});return g(K,{label:c(e),labelId:b,icon:n,hint:o===void 0?void 0:c(o),action:u?We(je,{children:[g(oe,{words:P()?.panel,label:c(e),changed:f,detail:d.followsNoView?c(p?"On":"Off"):Ft(S=>c(S),c(p?"On":"Off"),d.followsView),disabled:y,onReset:()=>r(void 0)}),T]}):T})}}}function dg(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{let a=`${String(n??o??"pageBackground")}-colour`;return g(mk,{label:"Background",icon:g(xO,{}),id:a,value:e,shown:di(e),onChange:t})}}}function X4(e,t,n){return{type:"custom",render:({value:o,onChange:a})=>g(be,{label:c(e),icon:n,value:o||t,onChange:a})}}function mk({label:e,icon:t,id:n,value:o,shown:a,onChange:s}){let{colors:r,n:i}=Ll(),l=Ae(o),u=l?qt(l,r,i):null;return g(be,{label:c(e),icon:t,id:n,value:u?u.hex:a,caption:u?.words,onChange:s,choices:Nl(l??"",r,i,s)})}function q4(){return{type:"custom",render:e=>{let{value:t,onChange:n}=e,o=e;return g(hk,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Nl(e,t,n,o){let a=ya(e);return Ou(t,n).map(s=>({label:s.label,color:s.value,selected:a===s.name,onPick:()=>o(s.name)}))}function hk({value:e,onChange:t,twin:n}){let{colors:o,n:a}=Ll(),s=o.background,r=Bt(s.toUpperCase(),c("Theme {n} background",{n:a})),[i,l]=Oe(Mf),[u]=Oe(mi),d=typeof u=="string"&&u.trim()!=="",f=ga(i),p=v=>l(ga(v)||void 0),m=ya(e),b=m?qt(m,o,a):null,y=Nl(e,o,a,t),T=n?()=>t(void 0):()=>t(""),S=s,E=r;if(n){let v=ya(n.follows),w=ba(n.follows),L=v?qt(v,o,a):w?{hex:w,words:w.toUpperCase()}:null;S=L?.hex??s,E=Ft(C=>c(C),L?L.words:r,n.view)}let x=!n&&(zn(e)||d)?g(gk,{value:f,onChange:p}):null;return b?g(be,{label:c("Fill"),icon:g(Sl,{}),value:b.hex,caption:b.words,onChange:t,changed:!0,onReset:T,resetTo:E,choices:y,children:x}):g(On,{label:c("Fill"),icon:g(Sl,{}),value:e,inherited:S,resetTo:E,onChange:t,onReset:T,choices:y,children:x})}function gk({value:e,onChange:t}){return Qn({options:ha.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:c("Fill")})}function bk(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return gt(n);let o=Gf(e,t);if(o.length===0)return null;let a=gt(Hs(n));if(a!==null)return a;for(let s=o.length-1;s>0;s-=1){let r=gt(Hs(o[s].sectionAccent));if(r!==null)return r}return gt(o[0].sectionAccent)}function Ll(){let e=Pe(B().theme),[t]=Oe("sectionAccent"),n=null;try{let{appState:a,selectedItem:s}=es(i=>i),r=s?.props?.id?String(s.props.id):void 0;n=r?bk(a?.data,r,t):null}catch{n=null}let o=n!==null&&e.themes[n]?n:e.selected;return{colors:ce(e.themes[o]),n:o+1}}function Z4(){return ng()}var J4={top:g(yO,{}),right:g(bO,{}),bottom:g(hO,{}),left:g(gO,{})};function Q4(e,t,n,o,a,s,r){let i=f=>t.find(p=>p.value===f),l=f=>({value:f,label:"",disabled:!0,title:o}),u=f=>{let p=t.find(b=>b.cell===f);if(!p)return l(`missing-${f}`);let m=s?.[f];return m?{value:p.value,label:p.label,icon:m}:{value:p.value,label:p.label}},d=[l("corner-top-left"),u("top"),l("corner-top-right"),u("left"),l("centre"),u("right"),l("corner-bottom-left"),u("bottom"),l("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:p})=>{let m=t.some(b=>b.value===f)?f:n;return g(K,{label:c(e),icon:a,value:i(m)?.label?c(i(m).label):r?c(r):"",children:oP(c,{label:e,value:m,onChange:p,points:d})})}}}function eK(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:a,field:s})=>g(um,{label:e,options:(s.options??t).map(r=>({...r,label:c(r.label)})),value:Array.isArray(o)?o:[],onChange:a,...n?{emptyLabel:c(n)}:{}})}}function pg(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{let a={value:n,onChange:o,...t};return g(e,{...a})}}}var yk={image:"Image",video:"Video"},tK=Or.map(e=>({label:yk[e],value:e}));function nK(e,t,n){let o=Object.keys(kr).map(a=>({label:kr[a],value:a,picture:n[a]}));return{type:"custom",...it({},{type:"radio",label:e,options:o.map(a=>({value:a.value,label:a.label}))}),render:({onChange:a})=>g(_k,{label:e,icon:t,options:o,onChange:a})}}function Sk(e,t,n){let o=mp(e,t,n);if(o!==void 0)return o==="save-makes-frame"?c("A frame is made from this video when you save the page."):o==="starts-dark"?c("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="outside"?c("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="unsupported"?c("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="failed"?c("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):o==="image-no-frame"?c("The slide shows your Image while the video loads, because this video has no frame."):void 0;let a=fp(e);return a==="frame-missing-image"?c("This video has no frame yet. The slide shows its image until one is made."):a==="frame-missing-surface"?c("This video has no frame yet. The slide shows its background colour until one is made."):a==="image-missing-frame"?c("No image yet. The slide shows the video's frame until you choose one."):a==="image-missing-surface"?c("No image yet. The slide shows its background colour until you choose one."):void 0}function _k({label:e,icon:t,options:n,onChange:o}){let a=Lt(),s=a?.values??{},r=In(s),i=Fh(aO),l=Mp(i?.docId??null),u=null;try{u=es(f=>f.appState.data)}catch{u=null}let d=Gp(a?.id,u,l);return g(K,{label:c(e),icon:Dt(t),hint:Sk(s,d,i?.hasUnsavedEdits??!1),children:Qn({options:n,value:r,onChange:o,ariaLabel:e})})}function oK(e,t,n,o={}){let a={type:"custom",[lO]:!0,render:({value:s,onChange:r,name:i})=>g(lm,{value:s||"",onChange:r,fieldKey:i,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?ee("each",a):a}var aK={HeroSingle:[lp.image],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Tk(e){let t=c(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} \xB7 ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function fg({value:e,onChange:t,label:n}){let o=e||{},a=Lt(),s=a?a.values!==a.node.props:!0,r=!!o.pending&&s,i=!!o.pending&&!s,l=!!Ee(tP()).geocode,u=Bh(),d=(f,p)=>t({...o,[f]:p??void 0});return We(je,{children:[g(K,{label:c(n),icon:g(Ch,{}),action:l?g(wl,{content:c("Find from the address (OpenStreetMap)"),children:g(qh,{"aria-label":c("Find from the address"),"aria-busy":r||void 0,disabled:r,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding\u2026"}),children:g(wO,{})})}):void 0,children:l&&o.status?g(ma,{compact:!0,oneLine:!0,spaced:!1,status:r?"busy":o.ok&&!i?"found":"notfound",statusText:r?c("Finding\u2026"):i?c(yi):c(o.status),hint:Tk(o)}):null}),g(K,{label:c("Enter by hand"),labelId:u,icon:g(SO,{}),action:g(vl,{checked:!!o.manual,onChange:f=>t({...o,manual:f}),ariaLabelledBy:u})}),o.manual&&g(K,{label:c("Latitude, longitude"),icon:g(Ch,{}),children:We("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[g(Ph,{value:typeof o.lat=="number"?o.lat:null,onChange:f=>d("lat",f),min:-90,max:90,step:1e-4,placeholder:c("Latitude")}),g(Ph,{value:typeof o.lng=="number"?o.lng:null,onChange:f=>d("lng",f),min:-180,max:180,step:1e-4,placeholder:c("Longitude")})]})})]})}function Ek(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function xk(e,t,n){let o=e.map(a=>({text:a?.text??""}));return t===null||t<0||t>=e.length?o:o.map((a,s)=>s===t?{text:n}:a)}function vk(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}var sK={label:"Ticker items",icon:g(EO,{})};function rK(e,t,n,o){return{type:"custom",[Ke]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...it({},{...eg.textList,label:e}),render:({value:a,onChange:s})=>g(wk,{label:e,icon:Dt(t),items:Array.isArray(a)?a:[],placeholder:n,onChange:s,markup:o==="markup"})}}function wk({label:e,icon:t,items:n,placeholder:o,onChange:a,markup:s=!1}){let r=to(null),[i,l]=no(null),u=f=>f.map(p=>({text:p?.text??""})),d=f=>{let p=vk(n,f,i);p===null&&(r.current=null),l(p),a(u(f))};return g(FO,{label:c(e),icon:t,noun:c("item"),items:n,onChange:d,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?g(Si,{target:r,value:Ek(n,i),onChange:f=>a(xk(n,i??-1,f)),disabled:i===null,label:i===null?c("Formatting \u2014 click a row first"):c("Formatting \u2014 row {n}",{n:i+1})}):void 0,renderRow:(f,p,m)=>g("input",{type:"text",className:s&&i===p?"sf-list-marking":void 0,value:f?.text??"",placeholder:c(o),"aria-label":c("{label} {n}",{label:c(e),n:p+1}),onChange:b=>m({text:b.target.value}),onFocus:b=>{r.current=b.currentTarget,l(p)}})})}function iK(e,t){let n=`${e.label} \u2014 row ${t+1}`;return Mt({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:c("{label} \u2014 row {n}",{label:c(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function lK(e){return{_gCards:_e("Cards"),coverIndex:ne("Cover image",g(TO,{}),rm,String(1),e?.coverHint??"A card's opening picture \u2014 a card pinned to a finish keeps its own."),imageBackground:xP("Image background",Ga),cardImage:mg()}}function cK(){return{outline:ne("Card outline",g(CO,{}),sm,am),indexBadge:ne("Card number",g(zh,{}),Ei,Ti),showBadge:lt("Product badge",!0,g(ui,{noun:"tag"}))}}function uK(e){let t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=a=>({...Qa,label:qa.find(s=>s.id===a).label}),o=a=>it(_l(yl),n(a));return{_gShowOnCard:_e("Show on a card"),[yl]:it({type:"custom",render:()=>g(Ck,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(yl)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}var yl="showCardPrice",qa=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function Ck({rest:e}){let t=Z(),n=un(),o=r=>typeof t[r]=="boolean"?t[r]:void 0,a=r=>o(r)??e[r],s=qa.some(({id:r})=>o(r)!==void 0&&o(r)!==e[r]);return g(Dl,{parts:qa,changed:s,shown:a,onPress:(r,i)=>n({[r]:i}),onReset:()=>n(Object.fromEntries(qa.map(({id:r})=>[r,void 0])))})}function dK(e,t="display"){let n=rt(t);return{[t]:ee("desktop",{type:"custom",render:({value:o,onChange:a})=>g(Dl,{parts:e,changed:jf(o),shown:s=>_a(o,s),onPress:(s,r)=>a(Yf(o,s,r)),onReset:()=>a(void 0)})}),[n]:ee("mobile",{type:"custom",render:({value:o,onChange:a})=>g(Ok,{parts:e,desktopKey:t,value:o,onChange:a})})}}function Dl({parts:e,changed:t,shown:n,onPress:o,onReset:a,detail:s,disabledReason:r}){let i=c("Display");return g(K,{label:i,icon:g(dO,{}),changed:t,action:g(oe,{words:P()?.panel,label:i,changed:t,detail:s,onReset:a}),children:g(HO,{label:i,items:e.map(l=>({id:l.id,label:c(l.label),shown:n(l.id),...r?{disabled:!0,disabledReason:c(r)}:{}})),onChange:o})})}function Ok({parts:e,desktopKey:t,value:n,onChange:o}){let a=Z()[t];return g(Dl,{parts:e,changed:Vf(n),shown:s=>bi(a,n,s),onPress:(s,r)=>o(Xf(n,s,r)),onReset:()=>o(va),detail:c("the same as Desktop")})}function mg(e=rf){return Fe("Card image",g(Gh,{}),ae,Xe,sf,ae,e,{clear:{hint:ae},hint:"Rounds the picture. The card's own corner is in Styles."})}function Pk(){return eo(ti,"cardImage")}function pK(){return{cardImage:mg(ti),...Pk()}}function fK(){return Al({sidesKey:"cornerSides",row:lf,step:cf,useFollowed:()=>ae,mark:g(kk,{label:uf}),hint:c("Rounds the picture. Left alone it stays square.")})}function kk({label:e,changed:t=!1,onReset:n=()=>{}}){return g(oe,{words:P()?.panel,label:c(e),changed:t,onReset:n})}function mK(){return{type:"custom",render:({value:e,onChange:t})=>g(Nk,{value:typeof e=="string"?e:"",onChange:t})}}var Dh="own";function hK(){let e=[{value:Dh,label:"Layout's own",picture:ml(Array.from({length:8},()=>[3,1]))},...Object.entries(la).map(([t,n])=>({value:t,label:n.label,picture:ml([...n.phone,...n.phone])}))];return ee("mobile",pl("Layout",g($h,{}),e,Dh,{columns:2,cell:vh}))}function Ak({layout:e,width:t}){let n=si(e),o=n?`${n[0]}/${n[1]}`:void 0;return g("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:o?"auto":6,gridAutoFlow:"row dense",gap:2},children:bf(e).map(([a,s],r)=>g("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${a}`,gridRow:`span ${s}`,aspectRatio:o}},r))})}var Rk={width:"3.5rem",height:"2.5rem",words:!1},Ik=200;function Nk({value:e,onChange:t}){let[n,o]=no(null),[a,s]=no(4),r=to(null);nO(()=>{let m=r.current;if(!m||typeof ResizeObserver!="function")return;let b=()=>s(m.getBoundingClientRect().width>=Ik?4:3);b();let y=new ResizeObserver(b);return y.observe(m),()=>y.disconnect()},[]);let i=e?j(Gn,e):void 0,l=i?e:"",u=oi(n,l),d=oi(n,"").length,f=Tf("no-symbol"),p=[{value:"",label:c("Not chosen"),icon:Eh(f,c("Not chosen"))},...u.map(m=>({value:m,label:c(Gn[m].label),icon:g(Ak,{layout:Gn[m],width:40})}))];return g(K,{label:c("Layout"),icon:g($h,{}),value:i?c(i.label):void 0,children:g("div",{ref:r,style:{flex:"1 1 auto",minWidth:0},children:g(Yh,{label:c("Layout"),value:l,options:p,onChange:t,columns:a,cell:Rk,header:We("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[g("span",{className:"text-2xs text-ink-faint",children:c("Photos in a row")}),g(RO,{options:[{id:"all",label:c("All")},...mf.map(m=>({id:String(m),label:String(m)}))],value:n===null?"all":String(n),ariaLabel:c("Photos in a row"),onChange:m=>o(m==="all"?null:Number(m))}),g("span",{className:"text-2xs text-ink-faint",children:c("{n} of {total} layouts",{n:d,total:ni.length})})]})})})})}var Bk="Applies to panels, cards, inputs and buttons. Round things \u2014 color swatches, switches, status dots \u2014 stay round.",Fl="Corners";function hg({value:e,onChange:t,length:n}){let o=e===null;return as(Dk,{label:c(Fl),icon:as(Fk,{}),changed:!o,action:as(Lk,{words:P()?.panel,label:c(Fl),changed:!o,detail:c("the built-in corners"),onReset:()=>t(null)}),hint:c(Bk),children:as(de,{min:n?.grid.min??ae,max:n?.grid.max??Xe,step:n?.grid.step??1,value:e,...e===null?{}:{suffix:n?.unit??"px",...n?{units:n.units}:{}},placeholder:ae,placeholderWord:"Auto",onClear:()=>t(null),ariaLabel:c(Fl),onChange:t})})}import{jsx as ro}from"react/jsx-runtime";import{SettingsDefaultReset as Hk,SettingsField as Mk}from"efficient-easel/panel";import{IconPicker as Uk}from"efficient-shell/ui";import{ShadowIcon as Gk}from"efficient-easel/icons";import{SHADOW_PREVIEW as $k}from"efficient-easel/screen/lib/document/shadow-values";var Bl={none:"None",soft:"Soft",lifted:"Lifted"},zk="Applies to cards \u2014 products, brands, journal entries and filter cells. Round things like swatches and status dots are never shadowed.";function gg({value:e,onChange:t}){let n=e===null,o=e??Fs;return ro(Mk,{label:c("Card shadow"),icon:ro(Gk,{}),value:c(Bl[o]),changed:!n,action:ro(Hk,{words:P()?.panel,label:c("Card shadow"),changed:!n,detail:c(Bl[Fs]),onReset:()=>t(null)}),hint:c(zk),children:ro(Uk,{label:c("Card shadow"),value:o,options:qc.map(a=>({value:a,label:c(Bl[a]),icon:ro("span",{className:"sf-shadow-chip border border-line bg-surface",style:{boxShadow:$k[a]}})})),onChange:t})})}import{jsx as bg}from"react/jsx-runtime";import{ShadowIcon as Wk}from"efficient-easel/icons";import{DEFAULT_SHADOW_COLOR as yg}from"efficient-easel/screen/lib/document/shadow-values";var Kk="Most useful on a dark theme, where a black shadow cannot be seen. Also used by the Lift hover, even with the card shadow off.";function Sg({value:e,onChange:t}){let n=e===null;return bg(On,{label:c("Shadow color"),icon:bg(Wk,{}),value:e??"",inherited:yg,resetTo:yg,onChange:t,onReset:()=>t(null),hint:c(Kk)})}import{jsx as rs}from"react/jsx-runtime";import{SettingsDefaultReset as jk,SettingsField as Vk}from"efficient-easel/panel";import{AlignSeparateIcon as Yk}from"efficient-easel/icons";function ss(e,t){return e==="tablet"?null:e==="mobile"?t.phone:t.desktop}var Xk="The space between the blocks inside a row, a grid or a box. Auto means each one keeps the spacing it already has.",qk="The space between the blocks inside a row, a grid or a box, on a phone. Until you set it, a phone uses half the desktop gap.",Hl="Block gap",_g=Zt.Grid;function Tg(e,t){return ss(e,{desktop:{key:"block_gap",value:t.gap,followsPx:null},phone:{key:"block_gap_phone",value:t.phone,followsPx:t.gap===null?null:$s(t.gap)}})}function Eg({value:e,onChange:t,followsPx:n=null,length:o,followsUnit:a="px"}){let s=e===null,r=n===null?null:`${n}${a}`,i=a==="px"&&(o?.unit??"px")==="px",l=n===null?_g:i?wn(n)??_g:n;return rs(Vk,{label:c(Hl),labelId:"sf-block-gap",icon:rs(Yk,{}),changed:!s,action:rs(jk,{words:P()?.panel,label:c(Hl),changed:!s,detail:r??c("each block's own spacing"),onReset:()=>t(null)}),hint:c(r===null?Xk:qk),children:rs(de,{min:(o?.grid??ge).min,max:(o?.grid??ge).max,step:(o?.grid??ge).step,value:e,...e===null&&n===null?{}:{suffix:o?.unit??"px",...o?{units:o.units}:{}},placeholder:l,...n===null?{placeholderWord:"Auto"}:i&&n===l?{}:{placeholderWord:String(n)},onClear:()=>t(null),ariaLabel:c(Hl),onChange:t})})}import{jsx as is}from"react/jsx-runtime";import{SettingsDefaultReset as Zk,SettingsField as Jk,SettingsSegmented as Qk}from"efficient-easel/panel";import{HoverIcon as eA}from"efficient-easel/icons";var Ml={none:Ts.none,lift:Ts.lift,highlight:_c},tA="What a card does when a shopper points at it \u2014 or taps it, on a phone. Highlight is the effect your cards already use.";function xg({value:e,onChange:t}){let n=e===null,o=e??Bs;return is(Jk,{label:c("Hover effect"),icon:is(eA,{}),value:c(Ml[o]),changed:!n,action:is(Zk,{words:P()?.panel,label:c("Hover effect"),changed:!n,detail:c(Ml[Bs]),onReset:()=>t(null)}),hint:c(tA),children:is(Qk,{options:Zc.map(a=>({id:a,label:c(Ml[a])})),value:o,ariaLabel:c("Hover effect"),onChange:t})})}import{jsx as ls}from"react/jsx-runtime";import{SettingsDefaultReset as nA,SettingsField as oA,SettingsSegmented as aA}from"efficient-easel/panel";import{DropIcon as sA}from"efficient-easel/icons";var Ul="Photography",vg={shot:"As shot",mono:"Black and white"},Gl=[{grayscale:!1,label:vg.shot},{grayscale:!0,label:vg.mono}],rA="Black and white photographs return to color on hover. Wheels and tyres keep their real finish either way.";function wg({value:e,onChange:t}){let n=e===null,o=e??!1;return ls(oA,{label:c(Ul),icon:ls(sA,{}),value:c(Gl.find(a=>a.grayscale===o).label),changed:!n,action:ls(nA,{words:P()?.panel,label:c(Ul),changed:!n,detail:c(Gl.find(a=>!a.grayscale).label),onReset:()=>t(null)}),hint:c(rA),children:ls(aA,{options:Gl.map(a=>({id:a.grayscale,label:c(a.label)})),value:o,ariaLabel:c(Ul),onChange:t})})}import{jsx as $l}from"react/jsx-runtime";import{useId as iA}from"react";import{SettingsField as lA,SettingsSwitch as cA}from"efficient-easel/panel";import{ShareIcon as uA}from"efficient-easel/icons";var dA="Share button",pA="On every blog post.";function Cg({value:e,onChange:t}){let n=iA();return $l(lA,{label:c(dA),labelId:n,icon:$l(uA,{}),action:$l(cA,{checked:e===!0,onChange:t,ariaLabelledBy:n}),hint:c(pA)})}import{usePreviewDevice as rc}from"efficient-easel/draw/client";import{jsx as cs}from"react/jsx-runtime";import{SettingsDefaultReset as fA,SettingsField as mA}from"efficient-easel/panel";import{PaddingXIcon as hA}from"efficient-easel/icons";var zl="Side space",Og=ie.default,gA="The room left at the left and right edge of every page.";function Pg(e,t){return ss(e,{desktop:{key:"site_gutter",value:t.gutter,unsetPx:Og,bounds:ie},phone:{key:"site_gutter_phone",value:t.phone,unsetPx:vp(t.gutter,t.gutterUnit),bounds:Ne}})}function kg({value:e,onChange:t,unsetPx:n=Og,bounds:o=ie,length:a,restsOn:s=n}){let r=e===null;return cs(mA,{label:c(zl),labelId:"sf-side-space",icon:cs(hA,{}),changed:!r,action:cs(fA,{words:P()?.panel,label:c(zl),changed:!r,detail:`${n}px`,onReset:()=>t(null)}),hint:c(gA),children:cs(de,{min:(a?.grid??o).min,max:(a?.grid??o).max,step:(a?.grid??o).step,value:e,suffix:a?.unit??"px",...a?{units:a.units}:{},...o.typedMax!==void 0&&(a?.unit??"px")==="px"?{inputMax:o.typedMax}:{},placeholder:s,onClear:()=>t(null),ariaLabel:c(zl),onChange:t})})}import{jsx as Wl}from"react/jsx-runtime";import{BACKGROUND_WIDTHS as Tj,SettingsBackgroundWidth as bA,SettingsContentWidth as yA}from"efficient-easel/panel";var SA="Background width",_A="Content width";var us=e=>c(Nt[e==="content"?"page":"full"]),Ag="The width of every section's background.",Rg="The width of every section's content.";function Ig({value:e,changed:t,detail:n,onChange:o,onReset:a,hint:s,labelId:r}){return Wl(bA,{value:e,changed:t,detail:n,onChange:o,onReset:a,hint:s?c(s):void 0,labelId:r,words:{label:c(SA),full:us("full"),content:us("content")},resetWords:P()?.panel})}function Ng({mode:e,px:t,max:n=V.max,min:o=V.min,changed:a,detail:s,fullClosed:r,onMode:i,onPx:l,onReset:u,hint:d,labelId:f,length:p}){let m=c(_A),b=p?.grid.min??o,y=p?.grid.max??n,T=e!=="full"?Wl(de,{min:b,max:y,step:p?.grid.step??V.step,value:Math.min(Math.max(t,b),y),onChange:l,...p?{suffix:p.unit,units:p.units}:{suffix:"px"},ariaLabel:m}):null;return Wl(yA,{mode:e,onMode:i,number:T,changed:a,detail:s,fullClosed:r,onReset:u,hint:d?c(d):void 0,labelId:f,words:{label:m,full:us("full"),content:us("content")},resetWords:P()?.panel})}import{jsx as Lg}from"react/jsx-runtime";import{TextStyleItem as TA,TextStylesGroup as EA}from"efficient-easel/text-styles";var Dg=["font","size","weight","emphasis"],xA=500;function vA({font:e,size:t,weight:n,italic:o}){let a={font:e};return t!==null&&(a.size=t),n!==null&&(a.weight=n),o!==null&&(a.italic=o),{id:"accent",kind:"heading",name:c("Emphasis"),values:a}}function wA(e,t){let n=[],o=e.values,a=t.values;return a.font!==o.font&&a.font!==void 0&&n.push({key:"font",value:a.font}),a.size!==o.size&&n.push({key:"size",value:a.size??null}),a.weight!==o.weight&&n.push({key:"weight",value:a.weight??null}),a.italic!==o.italic&&n.push({key:"italic",value:a.italic??null}),n}function Fg(e){let{headingWeight:t,open:n,onOpenChange:o,onChange:a,withoutSize:s=!1}=e,r=vA(e);return Lg(EA,{label:c("Emphasis"),children:Lg(TA,{style:r,fonts:Cr,settings:s?Dg.filter(i=>i!=="size"):Dg,auto:["size"],fallback:()=>({weight:t??xA}),open:n,onOpenChange:o,onChange:i=>wA(r,i).forEach(a)})})}import{viewKeyAt as Gg}from"efficient-easel/draw";import{shownUnitAt as RA,unitKeyOnWrite as IA}from"efficient-easel/screen/lib/content/length-units";import{convertRowLength as CA,rowUnits as OA,unitPickPatch as PA}from"efficient-easel/screen/lib/content/length-units";import{viewKeyAt as kA}from"efficient-easel/draw";var AA=["cornerRadius","siteWidth","siteGutter","siteGutterPhone","blockGap","blockGapPhone"],ds={cornerRadius:{number:"corner_radius_px",kind:"radius",grid:Yc,tier:"desktop"},siteWidth:{number:"site_width",kind:"size",grid:V,tier:"desktop"},siteGutter:{number:"site_gutter",kind:"spacing",grid:ie,tier:"desktop"},siteGutterPhone:{number:"site_gutter_phone",kind:"spacing",grid:Ne,tier:"mobile"},blockGap:{number:"block_gap",kind:"gap",grid:ge,tier:"desktop"},blockGapPhone:{number:"block_gap_phone",kind:"gap",grid:ge,tier:"mobile"}};function ps(e){return{number:ds[e].number,unit:Hc[`${e}Unit`]}}function Bg(e,t,n){let o=F(n),{number:a,unit:s}=ps(e);return{[a]:t,[s]:t===null||o==="px"?null:o}}function fs(e,t,n,o){let{kind:a,grid:s,tier:r}=ds[e],i=F(n),l=F(o),u=s.typedMax,d=u!==void 0&&l==="px"?{...s,max:u}:s;return i===l?t:CA(t,i,l,r,{kind:a},d)}function Hg(e,t,n,o){let{number:a,unit:s}=ps(e),r=PA({[a]:t},i=>fs(e,i,n,o),s,F(o),"px");return{[a]:r[a],[s]:r[s]??null}}function Mg(e,t){let{kind:n,grid:o}=ds[e];return Fc(n,F(t),o)}function Ug(e){return OA({kind:ds[e].kind},Jn)}function Kl(e,t){let n=kA(e,t);if(!AA.includes(n))throw new Error(`no site length row ${n}`);return n}function io(e,t,n,o,a){let{siteLengthUnits:s,setSiteLengthUnits:r}=B(),i=`${e}Unit`,l=s[i],u=RA({n:a?.figure??null,u:a?.unit??null,[Gg("n","mobile")]:t,[Gg("u","mobile")]:l??null},{n:"n"},"u","mobile"),d=b=>r({[i]:b==="px"?null:b}),f=b=>{n(b);let y=IA(i,l,u,"px",b===null);i in y&&d(y[i]==null?null:F(y[i])),o(Bg(e,b,u),b===null)},p=b=>{let y=F(b);if(y===u||(d(y),t===null))return;let T=Hg(e,t,u,y);n(T[ps(e).number]),o(T,!0)},m=a?a.unit===u?a.figure:fs(e,a.figure,a.unit,u):null;return{length:{unit:u,grid:Mg(e,u),units:{options:Ug(e),onChange:p,label:c("Unit")}},write:f,rest:m,shown:b=>fs(e,b,"px",u)}}import{EmptyState as IR,SliderGroup as NR,Tabs as LR,Tooltip as tY,tabButtonId as DR,tabPanelId as FR}from"efficient-shell/ui";import{ContrastIcon as BR,SettingsIcon as HR,TypeIcon as MR}from"efficient-easel/icons";function $g(e){switch(e.status){case"saved":return null;case"failed":return{msg:c("Not saved. Try again."),tone:"error"};case"skipped":switch(e.reason){case"empty":return null;case"no-token":return{msg:c("Not saved. Reload the page."),tone:"error"};case"template":return{msg:c("Templates keep their look. Press Done."),tone:"success"}}}}import{jsx as bs}from"react/jsx-runtime";import{ListIcon as hR,PaddingTopIcon as gR,PaddingXIcon as bR}from"efficient-easel/icons";import{jsx as ms}from"react/jsx-runtime";import{SettingsDefaultReset as NA,SettingsField as LA,SettingsSegmented as DA}from"efficient-easel/panel";import{WidthIcon as FA}from"efficient-easel/icons";function zg({value:e,resolved:t,onChange:n,label:o="Width",labelId:a,followsLabel:s,hint:r}){let i=e===void 0,l=i?t:e,u=c(o);return ms(LA,{label:u,labelId:a,icon:ms(FA,{}),value:i?s:void 0,changed:!i,action:ms(NA,{words:P()?.panel,label:u,changed:!i,onReset:()=>n(void 0)}),hint:r,children:ms(DA,{options:[{label:c(Nt.full),id:"full"},{label:c(Nt.page),id:"content"}],value:l,ariaLabel:u,onChange:n})})}import{group as yR}from"efficient-easel/screen/lib/document/box-fields";import{jsx as ct}from"react/jsx-runtime";import{ColumnsIcon as YA,HeadquartersIcon as XA,HeightIcon as qA,LayoutIcon as ZA,LocationIcon as JA,MapIcon as QA,SearchIcon as eR,ThemeIcon as tR}from"efficient-easel/icons";import{group as Xl}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as Sn}from"efficient-easel/screen/lib/document/device-fields";import{jsx as Vl}from"react/jsx-runtime";import{ListIcon as BA}from"efficient-easel/icons";import{NoControlMark as HA,noControlField as MA}from"efficient-easel/screen/lib/document/panel-no-control-mark";function Zg(e,t){return ne(e,Vl(BA,{}),[{label:t,value:""}],"")}var UA="_sourceEdit";function u3(){return MA({type:"custom",render:()=>Vl(HA,{})},"always")}var Wg=new Map,Kg=new WeakMap,jg=(e,t)=>({type:"custom",render:()=>Vl(ma,{compact:!0,status:"ok",hint:c("Where this content is edited."),edit:{label:e,onClick:t}})});function GA(e){if(cc(e)){let o=Kg.get(e.open);o||Kg.set(e.open,o=new Map);let a=o.get(e.label);return a||o.set(e.label,a=jg(e.label,e.open)),a}let t=`${e.label}\0${e.href}`,n=Wg.get(t);return n||(n=jg(e.label,()=>window.open(e.href,"_blank","noopener")),Wg.set(t,n)),n}var Vg=new WeakMap,Yg=-1,jl={},Xg=new WeakMap;function Jg(e,t,n){return dc(e).filter(o=>!o.records||o.key===t||n!==null&&o.records.includes(n))}function $A(e,t,n,o){Yg!==mo()&&(Yg=mo(),jl={});let a=Vg.get(t);(!a||Xg.get(a)!==jl)&&(a=new Map,Xg.set(a,jl),Vg.set(t,a));let s=Jg(e,n,o),r=n&&!s.some(u=>u.key===n)?n:"",i=`${e}\0${r}\0${o??""}\0${s.map(u=>u.key).join(",")}`,l=a.get(i);return l||(l={...t,options:[...t.options,...s.map(u=>({label:u.label,value:u.key})),...r?[{label:r,value:r}]:[]]},a.set(i,l)),l}var qg=new WeakMap,zA={not:{field:Ve,set:!0}};function Qg(e,t,n,o={}){let a=t[Ve];if(!a)return t;let s=fc(n),r=nf(o.root),i=Jg(e,s,r).length>0||s!=="",l=i?$A(e,a,s,r):null,u=qg.get(t);u||qg.set(t,u=new Map);let d=`${mo()}\0${i?"1":"0"}\0${s}\0${(o.hides??[]).join(",")}\0${r??""}`,f=u.get(d);if(f)return f;let p=new Set(o.hides??[]),m=s?pc(s)?.edit:void 0,b={};for(let[y,T]of Object.entries(t))y===Ve?l&&(b[y]=l):y===UA?m&&(b[y]=GA(m)):b[y]=p.has(y)&&T&&typeof T=="object"?le(T,zA):T;return u.set(d,b),b}import{createContext as WA,useContext as KA}from"react";var eb=WA(null),m3=eb.Provider,h3=()=>KA(eb);function g3(e){let t=[];for(let n of e)n.placement!=="located"&&n.placement!=="approximate"||n.lat===null||n.lng===null||t.push({key:n.id,label:n.name,lat:n.lat,lng:n.lng,glyph:"",tone:"",approximate:n.placement==="approximate"});return t}function jA(e){return e===null||!Number.isFinite(e)?"":e<10?`${e.toFixed(1)} km`:`${Math.round(e)} km`}function b3(e,t){let n=[e.city,[e.state,e.postcode].filter(Boolean).join(" ")].filter(Boolean).join(" ");return{name:e.name,address:e.address,place:n,distance:t?jA(e.distanceKm):"",phone:e.phone,phoneHref:e.phone?`tel:${e.phone.replace(/[^\d+]/g,"")}`:"",website:e.website.replace(/^https?:\/\//,"").replace(/\/$/,""),websiteHref:e.website&&!/^[a-z][a-z\d+.-]*:/i.test(e.website)?`https://${e.website}`:e.website}}var VA=[{key:"name",label:"Dealer name",plain:!0},{key:"address",label:"Address"},{key:"place",label:"City \xB7 state \xB7 postcode",plain:!0},{key:"distance",label:"Distance",plain:!0},{key:"phone",label:"Phone"},{key:"phoneHref",label:"Phone link",kind:"link"},{key:"website",label:"Website",plain:!0},{key:"websiteHref",label:"Website link",kind:"link"}],tb={key:fo,label:"Dealers",blocks:["Footprint"],fields:VA};function y3(e){return[e.name,e.city].filter(Boolean).join(", ")}var _3={text:"Button label",href:"#"},T3=e=>e.replace(/\*([^*]+)\*/g,"==$1=="),lo={eyebrow:"Eyebrow",heading:"Main heading",accent:"Highlight line",body:"Add a sentence or two of supporting copy.",button:"Button label",link:"#",sectionHeading:"Section heading",slideName:"Slide name",boxName:"Box name",headingAccent:"Section heading *here.*",sectionNumber:"Section number",imageCaption:"Image caption",bookingConfirmation:"Thanks \u2014 we'll email you to confirm.",imageMeta:"Image meta",label:"Label",value:"Value",viewAll:"View all",date:"Month DD, YYYY",category:"Category"};var hs={sectionNumber:lo.sectionNumber,heading:`${lo.heading}
7
+ *${lo.accent}*`,tagline:lo.body},Yl=mc.Footprint,C3={label:"Locations Map",fields:Yl,defaultProps:{sectionNumber:"",heading:"",tagline:"",offices:[],mapTheme:_o.mapTheme,padTop:120,padBottom:120,search:!1,searchHint:"",noMatchText:"",listPosition:"below",showDistance:!0}};var ob={field:Ve,is:fo,default:""},ql={field:zt,is:ft,default:ft},nR={field:zt,is:"list",default:ft},oR={field:zt,is:"map",default:ft},ab={all:[ql,{field:"listPosition",in:["left","right"],default:"below"}]},sb={any:[{all:[ob,{not:oR}]},ab]},aR={any:[{all:[ql,{field:"listPosition",is:"below",default:"below"}]},nR]},nb={all:[sb,{field:"search",is:!0,default:!1}]};uc([tb,kp]);async function Zl(e){return Ea(e)?Zf(e,t=>[t.address,t.city,t.country].map(n=>String(n??"").replace(/\*/g,"").trim()).filter(Boolean).join(", ")):e}var sR={fields:{_gContent:Xl("Section"),sectionNumber:ts("Section number",hs.sectionNumber),heading:kl("Heading",hs.heading),tagline:kl("Body",hs.tagline),_gOffices:Xl("Offices"),[Ve]:Zg("Office content","Manual"),offices:{type:"array",label:"Offices",arrayFields:{role:yn("Role"),city:yn("City"),country:yn("Region \xB7 country"),address:tg("Address"),phone:yn("Phone"),group:yn("Group"),hq:lt("HQ",!1,ct(XA,{})),geocode:pg(fg,{label:"Coordinates"})},defaultItemProps:{role:"Sales & Distribution",city:"City",country:"Country",address:"",phone:"",group:"",hq:!1,lat:0,lng:0},getItemSummary:e=>e?.city||"Office"},...Yl,[zt]:bn("Shows",ct(QA,{}),[{label:"Map and list",value:ft},{label:"Map only",value:"map"},{label:"List only",value:"list"}],ft),mapTheme:bn("Map theme",ct(tR,{}),[{label:"Auto",value:"auto"},{label:"Dark",value:"dark"},{label:"Light",value:"light"}],_o.mapTheme),_gList:Xl("List"),listPosition:Sn("desktop",le(bn("Position",ct(ZA,{}),[{label:"Left",value:"left"},{label:"Right",value:"right"},{label:"Below",value:"below"}],"below"),ql)),listColumns:Sn("desktop",le(bn("Columns",ct(YA,{}),[{label:"Auto",value:As},...Nc.map(e=>({label:String(e),value:String(e)}))],As),aR)),[Rc]:Sn("desktop",le(bn("Map height",ct(qA,{}),[{label:"Fixed",value:ks},{label:"Full height",value:Ic}],ks),ab)),search:Sn("desktop",le(lt("Search",!1,ct(eR,{})),sb)),searchHint:Sn("desktop",le(Pl(ts("Hint","Type a postcode or address")),nb)),noMatchText:Sn("desktop",le(Pl(ts("No match","No place found. Try another postcode.")),nb)),showDistance:le(lt("Distance",!0,ct(JA,{})),ob)},resolveData:async(e,t)=>{let n=t?.changed,o=e.props;if(n?.listPosition===!0||n?.[zt]===!0||n?.[Ve]===!0){let i=Lc(o);i!==o&&(e={...e,props:i})}let a=e.props,s=a.offices??[],r=await Zl(s);return r===s?e:{...e,props:{...a,offices:[...r]}}},resolveFields:(e,{fields:t})=>kc(Qg("Footprint",t,e.props,{hides:["offices"]}),e.props.headPlacement,Pc.Footprint.headRows)},rb=sR.fields.offices;var gs=null;function K3(e){gs=e}function j3(){return!!(gs&&gs.state().lockHolder)}function Jl(){return gs!==null}import{BUCKET_KEY as SR}from"efficient-easel/screen/lib/document/field-buckets";import{HEADER_TYPE as Ql,FOOTER_TYPE as rR}from"efficient-easel/draw";import{parseOption as iR}from"efficient-shell/format";var lR=new Set(["Hero","HeroSingle","IntroBleed"]),ib={min:56,max:140,default:88},q3={min:0,max:120,step:2,default:32},Z3=`var(--sf-header-h, ${ib.default}px)`,cR="--sf-header-set-h",J3="--sf-header-h",Q3=`var(${cR}, ${ib.default}px)`,eV="sf-header-clearance",tV="sf-sticky-underheader";function uR(e){return e?.find(t=>t?.type&&t.type!==Ql)??null}function lb(e){let t=uR(e)?.type;return!t||!lR.has(t)}function nV(e){return!lb(e)}function oV(e){return!!e?.some(t=>t?.type===Ql)}function aV(e){return!e||e.length===0?!1:!e.some(t=>t?.type===Ql||t?.type===rR)}var dR=["auto","shared","own"],ec="auto",pR="topSpace",sV="data-top-space";function fR(e){return iR(dR,ec,e)}function mR(e,t){let n=fR(e?.props?.[pR]);return n==="own"?!0:n==="shared"?!1:lb(t)}function rV(e,t){return mR(e,t)?"own":null}function _R(){return{type:"custom",render:({value:e,onChange:t})=>bs(zg,{value:e==="full"?"full":e==="content"?"content":void 0,resolved:"content",label:"Page width",followsLabel:c("Follows the site"),hint:c("Whether this page sits on the site's content column, or runs edge to edge."),onChange:n=>t(n)})}}var TR=[{label:"Auto",value:"auto"},{label:"Shared",value:"shared"},{label:"Its own",value:"own"}],CV={pageBackground:dg(),topSpace:ne("Top space",bs(gR,{}),TR,ec),widthChoice:_R()},fb=["pageBackground","topSpace","widthChoice"],ER="Record type",tc=new Map,cb=-1;function xR(e){cb!==Zr()&&(tc.clear(),cb=Zr());let t=qr(),n=t.some(a=>a.key===e)?"":e,o=tc.get(n);return o||(o=ne(ER,bs(hR,{}),[...t.map(a=>({label:a.label,value:a.key})),...n?[{label:n,value:n}]:[]],at),tc.set(n,o)),o}var ub=new WeakMap;function OV(e,t){if(!Un()||qr().length<2||aa in e)return e;let n=xR(Mn(t)),o=ub.get(e);if(o&&o.row===n)return o.fields;let a={[aa]:n,...e};return ub.set(e,{row:n,fields:a}),a}var vR="On: the site's Side space is counted once at each edge of every page. Off: as before.",wR=lt("Count side space once",!1,bs(bR,{}),vR),nc={_gWebsite:yR("Website"),[wt]:wR,[tt]:rb,[Dn]:Il},db=new WeakMap;function PV(e,t){if(t?.kind!==Ri||wt in e)return e;let n=db.get(e);return n||(n={...e,...nc},db.set(e,n)),n}function kV(e){if(!Jl()||wt in e)return e;let t=pb.get(e);if(!t){t={};let n=!1;for(let[o,a]of Object.entries(e))o===CR&&!n&&(Object.assign(t,nc),n=!0),t[o]=a;n||Object.assign(t,nc),pb.set(e,t)}return t}var CR=SR.Animation,pb=new WeakMap;function AV(e){return Jl()?mb(e):e}function mb(e){let t=e?.props;if(!t||!Array.isArray(t[tt]))return e;let n=t[tt];return Ea(n)?Zl(n).then(o=>({...e,props:{...t,[tt]:[...o]}})):e}function RV(e){return e?.props?.kind===Ri?mb(e):e}import{previewFrame as UR}from"efficient-easel/screen/lib/document/preview-dom";import{pictureShadowColor as GR}from"efficient-easel/screen/lib/document/shadow-values";var ac="sf-site-styles",$R="sf-site-styles-tabpanel",gY="text",bb="basics",hb="this-page-group",ys=[{id:bb,label:"Basics",icon:N(HR,{})},{id:"theme",label:"Theme",icon:N(BR,{})},{id:"text",label:"Text",icon:N(MR,{})}];function zR({themeFromDocument:e,persist:t}){let{appState:n,dispatch:o}=gb(u=>u),{theme:a,setTheme:s}=B(),r=n.data,i=r.root?.props??{},l=u=>{if(e){let d={...i,theme:u};o({type:"replaceRoot",root:{...r.root,props:d},recordHistory:!0})}else s(u);t({selected_preset:u.selected,theme_presets:u.themes})};return N(sp,{value:e?i.theme:a,onChange:l})}function WR({themeFromDocument:e,persist:t}){let[n,o]=sc(null),{theme:a,setFonts:s,setSizes:r,setHeadingTypography:i}=B(),l=ep({themeFromDocument:e,persist:t}),{old:u,saved:d,writeRoot:f}=l,p=l.fonts,m=l.sizes,b=l.typography,y=VR,T=C=>l.write(C),S=Jd(a),E=Qd(a),x=C=>{let D={...p,accent:C};e?f({fonts:D}):s(D),t({accent_font:C})},v=C=>{r({...m,accent:C}),t({accent_size_px:C})},w=C=>{let D={...b,weightStrong:C};e?f({headingTypography:D}):i(D),t({heading_weight_strong:C})},L=C=>{let D={...b,italicStrong:C};e?f({headingTypography:D}):i(D),t({accent_italic:C})};return Ut(_n,{children:[N(Xd,{saved:d,old:u,colours:S,colourNameOf:E,sizeOf:y,onChange:T,openId:n===oc?null:n,onOpenChange:o,withoutSize:e}),N(Fg,{font:p.accent,size:m.accent,weight:b.weightStrong,italic:b.italicStrong,headingWeight:b.weight,open:n===oc,onOpenChange:C=>o(C?oc:null),onChange:C=>{C.key==="font"?x(C.value):C.key==="size"?v(C.value):C.key==="weight"?w(C.value):L(C.value)},withoutSize:e})]})}var oc="accent",KR={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},jR={heading:32,body:14};function VR(e){return e.values.size??XR(j(KR,e.id)??"body")??jR[e.kind]}var YR={heading:"main h1, main h2",heading2:"main h1, main h2",heading3:"main h1, main h2",accent:"main h1 em, main h2 em",body:"main p",label:"main .mono-eyebrow"};function XR(e){if(typeof document>"u")return null;let t=(UR()?.contentDocument??document).querySelector(YR[e]);if(!t)return null;let n=parseFloat(getComputedStyle(t).fontSize);return Number.isFinite(n)?n:null}function qR({themeFromDocument:e,persist:t}){let{appState:n,dispatch:o}=gb(p=>p),{cornerRadiusPx:a,setCornerRadiusPx:s}=B(),r=n.data,i=r.root?.props??{},l=i.cornerRadiusPx===void 0?Xc[Vc(i.cornerStyle)]:ke(i.cornerRadiusPx),u=e?l:a,d=io("cornerRadius",a,s,t),f=p=>o({type:"replaceRoot",root:{...r.root,props:{...i,...p}},recordHistory:!0});return N(hg,{value:u,onChange:p=>{e?(f({cornerRadiusPx:p}),t({corner_radius_px:p})):d.write(p)},...e?{}:{length:d.length}})}function ZR({persist:e}){let{siteWidth:t,setSiteWidth:n,sectionBackgroundWidth:o,setSectionBackgroundWidth:a,sectionContentWidth:s,setSectionContentWidth:r}=B(),i=rc(),l=io("siteWidth",t??null,n,e);if(i!=="desktop")return null;let u=typeof t=="number"?t:l.shown(V.default),d=l.write,f=m=>{a(m),e({section_background_width:m},!0)},p=m=>{r(m),e({section_content_width:m},!0)};return Ut(_n,{children:[N(Ig,{value:o??"full",changed:o!==null,detail:c("Full width"),onChange:f,onReset:()=>f(null),hint:Ag}),N(Ng,{mode:s??"content",px:u,min:V.min,max:V.max,changed:typeof t=="number"||s!==null,detail:`${c("Content width")} ${V.default}px`,onMode:p,onPx:m=>d(m),onReset:()=>{p(null),d(null)},hint:Rg,length:l.length})]})}function JR({persist:e}){let{siteGutter:t,siteGutterPhone:n,setSiteGutter:o,setSiteGutterPhone:a,siteLengthUnits:s}=B(),r=Pg(rc(),{gutter:t,phone:n,gutterUnit:s.siteGutterUnit}),i=r?.key==="site_gutter_phone",l=io(Kl("siteGutter",i?"mobile":"desktop"),r?.value??null,i?a:o,e);return r?N(kg,{value:r.value,onChange:l.write,unsetPx:r.unsetPx,restsOn:l.shown(r.unsetPx),bounds:r.bounds,length:l.length}):null}function QR({persist:e}){let{blockGap:t,blockGapPhone:n,setBlockGap:o,setBlockGapPhone:a,siteLengthUnits:s}=B(),r=Tg(rc(),{gap:t,phone:n}),i=r?.key==="block_gap_phone",l=r?.followsPx==null?null:{figure:r.followsPx,unit:F(s.blockGapUnit)},u=io(Kl("blockGap",i?"mobile":"desktop"),r?.value??null,i?a:o,e,l);return r?N(Eg,{value:r.value,onChange:u.write,followsPx:u.rest,followsUnit:u.length.unit,length:u.length}):null}function eI({persist:e}){return Ut(_n,{children:[N(ZR,{persist:e}),N(JR,{persist:e}),N(QR,{persist:e})]})}function tI(e){return{card_shadow:e}}function nI(e){return e===null?{shadow_color:null}:{shadow_color:GR(e)}}function oI(e){return{hover_effect:e}}function aI({persist:e}){let{cardShadow:t,setCardShadow:n,shadowColor:o,setShadowColor:a,hoverEffect:s,setHoverEffect:r}=B();return Ut(_n,{children:[N(gg,{value:t,onChange:i=>{n(i),e(tI(i),!0)}}),N(Sg,{value:o,onChange:i=>{a(i),e(nI(i),i===null)}}),N(xg,{value:s,onChange:i=>{r(i),e(oI(i),!0)}})]})}function sI(e){return{photography_grayscale:e}}function rI({persist:e}){let{photographyGrayscale:t,setPhotographyGrayscale:n}=B();return N(wg,{value:t,onChange:o=>{n(o),e(sI(o),!0)}})}function iI({persist:e}){return N(_n,{children:N(rI,{persist:e})})}function lI(e){return{share_button_on_posts:e}}function cI({persist:e}){let{shareButtonOnPosts:t,setShareButtonOnPosts:n}=B();return N(Cg,{value:t,onChange:o=>{n(o),e(lI(o),!0)}})}function bY(){let{websiteName:e}=B();return e?.trim()||Tu}function yY({themeFromDocument:e=!1,tokenRef:t,siteId:n,onNotify:o,tab:a,onTabChange:s,initialTab:r,revealPageGroup:i=!1,onPageGroupRevealed:l}){let{persist:u}=No({themeFromDocument:e,tokenRef:t,siteId:n,onResult:T=>{let S=$g(T);S&&o?.(S.msg,S.tone)}}),[d,f]=sc(r??ys[0].id),p=a!==void 0,m=p?a:d,b=p?s??(()=>{}):f,y=ys.find(T=>T.id===m)??ys[0];return Ut(NR,{children:[N(pI,{activeId:y.id,onSelect:b}),Ut("div",{id:FR(ac,y.id),className:$R,role:"tabpanel","aria-labelledby":DR(ac,y.id),children:[m===bb&&Ut(_n,{children:[N(qR,{themeFromDocument:e,persist:u}),!e&&N(aI,{persist:u}),!e&&N(eI,{persist:u}),!e&&N(iI,{persist:u}),!e&&N(cI,{persist:u}),N(uI,{reveal:i,onRevealed:l})]}),m==="theme"&&N(zR,{themeFromDocument:e,persist:u}),m==="text"&&N(WR,{themeFromDocument:e,persist:u})]})]})}function uI({reveal:e,onRevealed:t}){let[n,o]=sc(!0),a=RR(t);return a.current=t,AR(()=>{if(!e)return;o(!0);let s=requestAnimationFrame(()=>{document.getElementById(hb)?.scrollIntoView({block:"start"}),a.current?.()});return()=>cancelAnimationFrame(s)},[e]),N(kR,{title:c("This page"),open:n,onToggle:o,id:hb,children:N(dI,{})})}function dI(){let{fields:e,values:t,readOnly:n,onChange:o}=OR(),a=Object.fromEntries(fb.filter(s=>s in e).map(s=>[s,e[s]]));return Object.keys(a).length===0?N(IR,{variant:"none",icon:!1,message:c("This page has no look of its own to set.")}):N(PR,{fields:a,values:t,onChange:o,readOnly:n,tabs:!1,idPrefix:"this-page",ariaLabel:c("This page")})}function pI({activeId:e,onSelect:t}){return N("div",{className:"es-insp-tabs",children:N(LR,{variant:"underline",block:!0,labelsFit:!0,"aria-label":c("Styles"),idPrefix:ac,value:e,onChange:t,items:ys.map(n=>{let o=c(n.label);return{id:n.id,icon:n.icon,label:o}})})})}export{Ee as a,m0 as b,hI as c,P as d,gI as e,bI as f,c as g,xn as h,V as i,eT as j,Br as k,tD as l,yp as m,aD as n,ie as o,Ne as p,ve as q,et as r,rD as s,sT as t,iD as u,Hr as v,lD as w,cD as x,uD as y,iT as z,dD as A,pD as B,fD as C,mD as D,Tp as E,hD as F,Ep as G,gD as H,bD as I,vp as J,wp as K,Cp as L,gT as M,bT as N,TD as O,xD as P,vD as Q,wD as R,CD as S,yh as T,Nt as U,wC as V,m$ as W,CC as X,h$ as Y,te as Z,g$ as _,OC as $,b$ as aa,y$ as ba,S$ as ca,_$ as da,T$ as ea,E$ as fa,gn as ga,x$ as ha,v$ as ia,ni as ja,ai as ka,df as la,si as ma,hE as na,AB as oa,ca as pa,Sf as qa,ua as ra,gE as sa,bE as ta,LB as ua,DB as va,FB as wa,yE as xa,BB as ya,ri as za,HB as Aa,MB as Ba,UB as Ca,GB as Da,$B as Ea,zB as Fa,WB as Ga,KB as Ha,jB as Ia,SE as Ja,Or as Ka,lp as La,H_ as Ma,SL as Na,cp as Oa,M_ as Pa,_L as Qa,up as Ra,U_ as Sa,TL as Ta,L2 as Ua,Xn as Va,sC as Wa,Yi as Xa,pn as Ya,qi as Za,D2 as _a,F2 as $a,B2 as ab,Zi as bb,ih as cb,H2 as db,Le as eb,Kr as fb,yF as gb,Ct as hb,j2 as ib,V2 as jb,Y2 as kb,X2 as lb,q2 as mb,Vn as nb,Mi as ob,Lw as pb,Di as qb,Ui as rb,jm as sb,Gi as tb,Bw as ub,d2 as vb,Ra as wb,p2 as xb,Hw as yb,Mw as zb,f2 as Ab,Uw as Bb,Mm as Cb,m2 as Db,h2 as Eb,g2 as Fb,kD as Gb,_T as Hb,TT as Ib,AD as Jb,Me as Kb,Oo as Lb,Nu as Mb,RI as Nb,II as Ob,ku as Pb,pi as Qb,WH as Rb,KH as Sb,Ff as Tb,VH as Ub,YH as Vb,nx as Wb,XH as Xb,Hf as Yb,qH as Zb,ZH as _b,Bf as $b,Mf as ac,JH as bc,zn as cc,mi as dc,QH as ec,eM as fc,tM as gc,nM as hc,Bo as ic,Hy as jc,dd as kc,pd as lc,kn as mc,Gy as nc,Ho as oc,gd as pc,iN as qc,lN as rc,ar as sc,cN as tc,bd as uc,Yy as vc,Xy as wc,qy as xc,hN as yc,gN as zc,sr as Ac,SN as Bc,kN as Cc,AN as Dc,RN as Ec,IN as Fc,NN as Gc,Jy as Hc,Qy as Ic,LN as Jc,Jt as Kc,eS as Lc,xd as Mc,tS as Nc,DN as Oc,nS as Pc,FN as Qc,BN as Rc,ud as Sc,Fo as Tc,$o as Uc,wd as Vc,Cd as Wc,pr as Xc,rS as Yc,zo as Zc,Et as _c,JN as $c,pS as ad,fS as bd,mS as cd,QN as dd,e1 as ed,wS as fd,St as gd,t1 as hd,n1 as id,BS as jd,o1 as kd,a1 as ld,gr as md,s1 as nd,br as od,WS as pd,r1 as qd,i1 as rd,yr as sd,l1 as td,c1 as ud,u1 as vd,XS as wd,d1 as xd,QS as yd,e_ as zd,p1 as Ad,f1 as Bd,m1 as Cd,n_ as Dd,h1 as Ed,g1 as Fd,s_ as Gd,b1 as Hd,y1 as Id,mn as Jd,nl as Kd,ol as Ld,Wf as Md,iM as Nd,Kf as Od,lM as Pd,cM as Qd,uM as Rd,li as Sd,ZB as Td,SG as Ud,Gv as Vd,_G as Wd,Ai as Xd,Ri as Yd,TG as Zd,EG as _d,xG as $d,Oa as ae,vG as be,Po as ce,Zt as de,vn as ee,Gs as fe,wn as ge,DI as he,FI as ie,BI as je,Hu as ke,Mu as le,Uu as me,HI as ne,xe as oe,Ge as pe,Rr as qe,zL as re,Zo as se,WL as te,KL as ue,Jo as ve,jL as we,VL as xe,YL as ye,_3 as ze,T3 as Ae,lo as Be,ND as Ce,LD as De,DD as Ee,FD as Fe,Op as Ge,BD as He,HD as Ie,gh as Je,i$ as Ke,il as Le,ll as Me,l$ as Ne,c$ as Oe,QM as Pe,ib as Qe,q3 as Re,Z3 as Se,cR as Te,J3 as Ue,Q3 as Ve,eV as We,tV as Xe,uR as Ye,nV as Ze,oV as _e,aV as $e,sV as af,mR as bf,rV as cf,at as df,BF as ef,YT as ff,Zr as gf,Mn as hf,HF as if,GF as jf,qT as kf,Qp as lf,$F as mf,QT as nf,tE as of,Qr as pf,WF as qf,KF as rf,oE as sf,qF as tf,ZF as uf,Un as vf,JF as wf,nf as xf,Ir as yf,uB as zf,dB as Af,of as Bf,pB as Cf,G_ as Df,re as Ef,xL as Ff,$_ as Gf,z_ as Hf,OL as If,W_ as Jf,K_ as Kf,PL as Lf,kL as Mf,AL as Nf,RL as Of,IL as Pf,NL as Qf,LL as Rf,DL as Sf,FL as Tf,BL as Uf,HL as Vf,xm as Wf,dC as Xf,Fa as Yf,G2 as Zf,xF as _f,_h as $f,Jn as ag,Fe as bg,ne as cg,Qn as dg,bn as eg,L$ as fg,D$ as gg,B$ as hg,H$ as ig,M$ as jg,U$ as kg,G$ as lg,z$ as mg,W$ as ng,eo as og,K$ as pg,GC as qg,$C as rg,Eh as sg,pl as tg,hp as ug,zD as vg,WD as wg,OT as xg,PT as yg,JD as zg,AT as Ag,Lp as Bg,QD as Cg,eF as Dg,tF as Eg,oF as Fg,Fp as Gg,aF as Hg,sF as Ig,dF as Jg,pF as Kg,Mp as Lg,fF as Mg,yB as Ng,lf as Og,wB as Pg,Tf as Qg,Ef as Rg,$n as Sg,Of as Tg,oH as Ug,aH as Vg,ma as Wg,ui as Xg,JE as Yg,RH as Zg,Gf as _g,fM as $g,Ea as ah,Zf as bh,Yb as ch,be as dh,On as eh,$M as fh,Ti as gh,Ei as hh,KM as ih,om as jh,jM as kh,VM as lh,YM as mh,lm as nh,um as oh,b0 as ph,y0 as qh,Zu as rh,S0 as sh,Ju as th,T0 as uh,No as vh,Ny as wh,z0 as xh,rd as yh,LU as zh,pm as Ah,gm as Bh,bm as Ch,ym as Dh,Sm as Eh,_m as Fh,Tm as Gh,Oi as Hh,Ov as Ih,Pv as Jh,jn as Kh,Pi as Lh,vm as Mh,nG as Nh,Av as Oh,oG as Ph,aG as Qh,sG as Rh,Cm as Sh,cG as Th,Nv as Uh,uG as Vh,dG as Wh,Dv as Xh,Bv as Yh,Hv as Zh,Mv as _h,hG as $h,Uv as ai,gG as bi,Ii as ci,IG as di,Am as ei,Kv as fi,LG as gi,HG as hi,Ni as ii,sw as ji,t2 as ki,Xw as li,w2 as mi,Zw as ni,C2 as oi,O2 as pi,P2 as qi,hn as ri,Ga as si,n$ as ti,o$ as ui,a$ as vi,zC as wi,WC as xi,Y$ as yi,YC as zi,XC as Ai,X$ as Bi,q$ as Ci,Z$ as Di,J$ as Ei,Q$ as Fi,rz as Gi,iz as Hi,lz as Ii,cz as Ji,uz as Ki,dz as Li,pz as Mi,fz as Ni,mz as Oi,hz as Pi,gz as Qi,vh as Ri,bz as Si,yz as Ti,sO as Ui,rO as Vi,Mh as Wi,Bt as Xi,s4 as Yi,r4 as Zi,i4 as _i,l4 as $i,c4 as aj,u4 as bj,Pl as cj,d4 as dj,p4 as ej,g4 as fj,b4 as gj,mP as hj,y4 as ij,ts as jj,kl as kj,yn as lj,tg as mj,S4 as nj,_4 as oj,T4 as pj,E4 as qj,yP as rj,x4 as sj,v4 as tj,w4 as uj,C4 as vj,O4 as wj,P4 as xj,k4 as yj,A4 as zj,ns as Aj,de as Bj,Oe as Cj,ng as Dj,un as Ej,og as Fj,ag as Gj,R4 as Hj,I4 as Ij,N4 as Jj,WP as Kj,L4 as Lj,D4 as Mj,F4 as Nj,B4 as Oj,H4 as Pj,M4 as Qj,U4 as Rj,Z as Sj,XP as Tj,G4 as Uj,$4 as Vj,Xa as Wj,z4 as Xj,W4 as Yj,K4 as Zj,j4 as _j,V4 as $j,Y4 as ak,lt as bk,X4 as ck,mk as dk,q4 as ek,Z4 as fk,J4 as gk,Q4 as hk,eK as ik,pg as jk,tK as kk,nK as lk,oK as mk,fg as nk,sK as ok,rK as pk,wk as qk,iK as rk,lK as sk,cK as tk,uK as uk,dK as vk,Dl as wk,mg as xk,pK as yk,fK as zk,mK as Ak,hK as Bk,DM as Ck,FM as Dk,K3 as Ek,j3 as Fk,Jl as Gk,_A as Hk,Ig as Ik,Ng as Jk,zl as Kk,R1 as Lk,on as Mk,I1 as Nk,N1 as Ok,L1 as Pk,D1 as Qk,f_ as Rk,F1 as Sk,B1 as Tk,Xd as Uk,zg as Vk,Zg as Wk,UA as Xk,u3 as Yk,zA as Zk,Qg as _k,h3 as $k,g3 as al,b3 as bl,VA as cl,y3 as dl,hs as el,C3 as fl,sR as gl,CV as hl,fb as il,OV as jl,PV as kl,kV as ll,AV as ml,RV as nl,Jd as ol,Qd as pl,ep as ql,gY as rl,bb as sl,ys as tl,VR as ul,bY as vl,yY as wl};