efficient-storefront-blocks 0.125.2 → 0.125.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/dist/chunks/{CustomHtmlCodeWindow-VRZ524JP.js → CustomHtmlCodeWindow-KB7QEJAG.js} +1 -1
- package/dist/chunks/EditorPreviewCheckout-3ZX2DIIL.js +4 -0
- package/dist/chunks/SiteEditorProvider-TYNFV3WZ.js +1 -0
- package/dist/chunks/{chunk-4KN3VTQU.js → chunk-4M7WJPOZ.js} +6 -6
- package/dist/chunks/{chunk-PULBLZRR.js → chunk-4WRJWM6K.js} +1 -1
- package/dist/chunks/chunk-5SWY36EZ.js +1 -0
- package/dist/chunks/{chunk-FNCEZSDY.js → chunk-ACYEMD5J.js} +1 -1
- package/dist/chunks/chunk-DHKJAYUG.js +337 -0
- package/dist/chunks/chunk-HKL2EKLO.js +96 -0
- package/dist/chunks/{chunk-TVMCJUOE.js → chunk-RGLTNGJH.js} +1 -1
- package/dist/chunks/{fitment-data-C2NHZBPR.js → fitment-data-CFDAFXJB.js} +1 -1
- package/dist/chunks/{section-css-style-BECHWIDU.js → section-css-style-TKWJ7WU2.js} +1 -1
- package/dist/editor.css +1 -1
- package/dist/index.js +66 -29
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/CartContext.d.ts +2 -0
- package/dist/render/components/CartContext.js +1 -1
- package/dist/render/components/checkout/checkout-parts.js +1 -1
- package/dist/render/lib/cart/restore-lines.d.ts +13 -0
- package/dist/render/lib/cart/restore-lines.js +1 -0
- package/dist/routine-index.json +1 -1
- package/dist/value-index.json +1 -1
- package/dist/words.d.ts +1 -0
- package/dist/words.js +1 -1
- package/package.json +2 -2
- package/dist/chunks/EditorPreviewCheckout-3TKWZ44N.js +0 -4
- package/dist/chunks/SiteEditorProvider-OBXLJM7I.js +0 -1
- package/dist/chunks/chunk-6ABZ7XWF.js +0 -96
- package/dist/chunks/chunk-HQFRQZ6J.js +0 -1
- package/dist/chunks/chunk-J6SPMJBT.js +0 -337
- /package/dist/chunks/{chunk-7UJXVH57.js → chunk-3DCSW3PN.js} +0 -0
- /package/dist/chunks/{chunk-EZ5QLDA5.js → chunk-5NGS7VFJ.js} +0 -0
- /package/dist/chunks/{chunk-FNCEZSDY.js.LEGAL.txt → chunk-ACYEMD5J.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-UV27QVUD.js → chunk-AEBQM5LZ.js} +0 -0
- /package/dist/chunks/{chunk-J6SPMJBT.js.LEGAL.txt → chunk-DHKJAYUG.js.LEGAL.txt} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{b as nu,c as ou,d as gu,e as bu}from"./chunk-UV27QVUD.js";import{$g as Bs,Aa as bc,Ac as Tc,Bb as Sc,Bc as Ec,Be as Ic,Ca as O,Cc as xc,Cd as Cs,Da as go,Db as $t,Dc as vs,E as pc,Eb as Be,Ec as vc,Hd as le,Hf as Bc,Ia as _s,If as Rs,Jf as Pe,Jg as ht,Jh as Hs,Ka as yc,Kd as Cc,Kf as Hc,Kh as xo,L as j,Lf as Mc,Lg as qc,Lh as lu,M as he,Mf as Kt,Mh as U,Nb as bo,Nf as ce,Ng as Zc,Pg as Jc,Qc as wc,Qf as jt,Qh as cu,Rc as ws,Rd as Oc,Rf as Vt,Rg as Qc,Rh as uu,Sh as du,Th as pu,Ud as Pc,Uf as Uc,Vg as eu,Vh as fu,Wg as tu,Xe as To,Xf as Is,Xh as Xt,Yh as mu,Zf as Gc,Zh as vo,_f as Ns,_g as gt,_h as hu,b as W,ba as Gt,bg as $c,c as Ve,ca as fc,cg as zc,ch as au,de as Os,df as As,ea as ut,ga as ho,gc as _c,i as sc,jg as Wc,ka as Tn,ke as _o,kg as Ls,ki as B,l as fo,m as rc,me as zt,mg as Kc,n as ic,nc as pt,ne as ft,nf as M,ng as oe,oa as dt,of as F,og as jc,oh as su,p as lc,pc as Ts,pf as Nc,pg as Vc,pi as Su,q as cc,qc as Es,qe as kc,qf as Wt,qg as ke,r as uc,re as Ps,rf as Lc,rg as Yt,sc as yo,se as Ac,sf as Dc,t as mo,tf as mt,u as dc,uf as Fc,ug as Yc,uh as ru,va as mc,ve as Rc,vg as Ds,wa as hc,we as ks,xa as gc,xb as En,xf as Ye,xh as Eo,yc as xs,yf as Xe,yg as Xc,za as Ss,zc as So,zg as Fs,zh as iu}from"./chunk-6ABZ7XWF.js";import{d as yu}from"./chunk-7UJXVH57.js";var Tu="en",wo=null,Eu=Tu,xu=null;function mI(e,t,n){wo=e??null,Eu=t||Tu,xu=n??null}function P(){return xu}function hI(){return Eu}function gI(){return wo}function _u(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 _u(e,t)}return _u(W(n)??e,t)}function xn(e,t,n,o){return c(n===1?e:t,{...o,n})}import{parseHexColor as Pu}from"efficient-shell/format";import{COLOR_SLOTS as ku,FILL_COLOR_SLOTS as wb,colorRole as Cb,fillColorRole as Au}from"efficient-shell/markup";import{parseHexColor as vu}from"efficient-shell/format";import{FILL_COLOR_SLOTS as Tb}from"efficient-shell/markup";var Co=e=>{let t=Qc.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 Ms="#9ca3af";function qt(e,t,n){let o=qe(e);return o?{hex:vu(t[o.key]??"")??"",words:o.words(n)}:null}function wu(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||Ms}]:[]})}var vb=["main","text","background"];function Cu(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?vu(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=Au(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 Pu(e)===e.toLowerCase()?e:"";let t=Cb(Me(e));return t?.kind==="slot"?He(t.slot):""}function Ru(e,t=ku){return t.flatMap(n=>{let o=qe(n);return o?.ink?[{name:n,label:o.label(),value:e?.[n]||Ms}]:[]})}function Iu(e){let t=Au(Me(e));return t?.kind==="slot"?He(t.slot):""}function AI(e){let t=e?.trim();return t?wb.find(n=>He(n)===t)??null:null}function RI(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 ku){let i=He(r);if(!i)continue;let l=i.replace(/^var\((--[\w-]+)\)$/,"$1"),u=a.getPropertyValue(l).trim();if(!u)continue;let d=Ou(u);!d&&s&&(s.fillStyle="#000000",s.fillStyle=u,d=Ou(String(s.fillStyle))),d&&(t[r]=d)}return t}function Ou(e){let t=e.trim().toLowerCase();if(t.startsWith("#"))return Pu(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},Mu={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=Mu[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",Us="--sf-block-gap",Nu="--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 LI(e,t){let n=mt(e,t,"gap",ge);if(n!==null)return{[Us]:n,[Nu]:n};let o=wn(e);return o===null?{}:{[Us]:`${o}px`,[Nu]:`${o/16}rem`}}var Lu="--sf-block-gap-phone",Du="--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 DI(e,t){let n=mt(e,t,"gap",ge);if(n!==null)return{[Lu]:n,[Du]:n};let o=wn(e);return o===null?{}:{[Lu]:`${o}px`,[Du]:`${o/16}rem`}}function FI(e){return wn(e)===null?"":`${Ib} ${Nb}`}var Fu="sf-gap-zone",Bu="--sf-gap-len";function ko(e,t){return typeof t=="number"&&Number.isFinite(t)&&t>=Ue.min?!0:typeof t=="string"&&typeof Mu[e]?.[t]=="number"}var Hu="--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 Gs(e){return e/2}function $s(e,t,n){return Ze(n)&&!ko(e,t)}function zs(e,t,n,o,a){return Ze(t)?t:$s(e,n,a)?a:Gs(vn(e,n,o))}var Db={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function BI(e,t,n,o,a){let s={...Ze(o)?{[Hu]:`${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:` ${Fu}`,style:{[Bu]:`var(${Us}, ${l})`,[Hu]:`var(${Rb})`,...s}}}let r=vn(e,t);return r>=0?{className:` ${Fu}`,style:{[Bu]:`${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 ed,useContext as Oy,useId as od,useRef as td,useState as nd}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 Vs,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 ae,jsxs as Ks}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 Ws}from"efficient-easel/pick";var Uu="Not set";function Gu({value:e,onChange:t,label:n,id:o,caption:a,inherited:s,ariaLabel:r,choices:i}){return ae(Xb,{value:e,onChange:t,label:c(r??n),id:o,caption:a,inherited:s,choices:i})}function Yb(){let{theme:e}=B();return Cu(e)}function Xb({value:e,onChange:t,label:n,id:o,caption:a,inherited:s,choices:r}){let i=Yb(),l=e?null:Ws(s??""),u=a!==void 0&&(!e||Ws(a)!==Ws(e))?a:null,d=f=>{f!==e&&t(f)};return Ks("div",{className:"sf-colour",children:[r?ae(qb,{id:o,value:e,onChange:t,label:n,presets:i,follows:l,choices:r}):ae(Bb,{id:o,value:e,onChange:d,label:n,presets:i,fallback:l??void 0,size:"md",align:"start"}),u!==null?ae("span",{className:"sf-colour-caption",children:u}):ae("span",{className:"sf-colour-hexwrap",children:ae(Ub,{value:e||l||"",onChange:d,label:c("{label} hex code",{label:n}),placeholder:e||l?void 0:c(Uu),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),ae(Gb,{id:o,trigger:ae("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:Ks("div",{className:"sf-colour-window",children:[ae("div",{role:"group","aria-label":n,className:"sf-colour-choices",children:r.map(p=>ae($b,{content:p.label,children:ae(Mb,{color:p.color,"aria-label":p.label,selected:p.selected,onClick:()=>{p.selected||p.onPick()}})},p.label))}),ae(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 ae(Vb,{label:e,icon:t,htmlFor:i.id,changed:n,hint:o,action:a?ae(jb,{words:P()?.panel,label:e,changed:!!n,detail:s,onReset:a}):void 0,children:r?Ks("div",{className:"es-width-stack",children:[Gu({...i,label:e}),r]}):Gu({...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 ae(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 js(e){return ce(e).background}function ty(e){let t=Ye(e.accent,js(e));return t===null?null:{ratio:t,grade:Vt(t)}}function ny(e){let t=js(e),n=Ye(e.accent,t);return n===null?[]:Uc(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 $u({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,js(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 Wu,ChevronUpIcon as uy,GroundIcon as dy,LayoutIcon as py,SquareIcon as fy,TextSmallIcon as my,TypeIcon as zu}from"efficient-easel/icons";var Pn=e=>c("Theme {n}",{n:e+1});function Ku({colors:e}){let t=ce(e),n=Is(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:Ns(e,t.accent)},children:c("button")}),k("span",{className:"sf-theme-mini",style:{background:t.surface,borderColor:t.line},children:c("card")})]})]})}var Ys={"Text color":k(zu,{}),"Label color":k(my,{}),Background:k(dy,{}),"Panels & cards":k(py,{}),Borders:k(fy,{}),"Button color":k(cy,{}),"Button text color":k(zu,{})};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:Ys[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:Ys["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=Gc(e),r=Ns(e,t),i=Is(e)??t,l=Vt(Ye(r,i)??0);return k(be,{label:c("Button text color"),icon:Ys["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 Xs({colors:e,onChange:t,idPrefix:n}){let o=ce(e);return k(sy,{children:yy.map(a=>"colour"in a?k($u,{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<Rs.length&&!t.brandInk?Rs[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(Ku,{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(Wu,{size:14})})})}),s&&i&&!b&&k(Vs,{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(Xs,{colors:t,onChange:y=>l?.(y)}),f&&k(Vs,{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 ju({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(Ku,{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(Vs,{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(Wu,{size:12,className:"sf-multi-caret","aria-hidden":"true"})})]})]})}import{useCallback as er,useEffect as Zu,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,f0=e=>e.blocks;import{useEaselSession as xy}from"efficient-easel/screen/lib/session-context";import{useSyncExternalStore as _y}from"react";var Yu,qs=null,bt=null,Ro=0,Zs=new Set;function Js(e){Yu=e;for(let t of Zs)t()}function g0(e){qs=e,Ro+=1,bt&&clearTimeout(bt),bt=null,Js(void 0)}function b0(e){Ro+=1,Js(e)}function Xu(e=250){qs&&(bt&&clearTimeout(bt),bt=setTimeout(()=>{bt=null;let t=qs;if(!t)return;let n=++Ro;t().then(o=>{n===Ro&&Js(o)}).catch(()=>{})},e))}function Vu(){return Yu}function Ty(e){return Zs.add(e),()=>{Zs.delete(e)}}function y0(){return _y(Ty,Vu,Vu)}var Qs=new Set;function qu(e){return Qs.add(e),()=>{Qs.delete(e)}}async function _0(){let e=(await Promise.allSettled([...Qs].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 Ju(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 Qu(e){return e.themeFromDocument?{status:"skipped",reason:"template"}:e.token?null:{status:"skipped",reason:"no-token"}}async function wy(e,t=Ju()){let{themeFromDocument:n,token:o,siteId:a,patch:s}=e,r=Qu({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=er(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=er(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},Ju(r));return u(m),m.status==="saved"&&Xu(),m.status==="failed"&&(s.current={...p,...s.current}),m},[e,t,n,u,r]),f=er((p,m=!1)=>{let b=Qu({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 Zu(()=>()=>{d()},[d]),Zu(()=>qu(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",$0="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(eu),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=od();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(Xs,{colors:t,onChange:n,idPrefix:s})}),Y("p",{className:"sf-secttheme-warn",children:Ly(a)})]})}function ad({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]=nd(!1),[w,L]=nd(null),C=td(null),D=td(null),z=od(),Te=ed(()=>{v(!1),L(null)},[]),co=ed(()=>{!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),ys={...b,themes:yb};r(ys),p({selected_preset:ys.selected,theme_presets:ys.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(ju,{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 Bd,textStyleCaseCss as l_}from"efficient-easel/text-styles/model";import{resolveViewValue as Hd}from"efficient-easel/draw";import{VIEW_DESKTOP_MIN as sd,VIEW_TABLET_MIN as rd}from"efficient-easel/draw";var Lo=.02,id=`(min-width: ${En}px) and (max-width: ${sd-Lo}px)`,ld=`(max-width: ${En-Lo}px)`,Do=`(min-width: ${rd}px) and (max-width: ${sd-Lo}px)`,Fo=`(max-width: ${rd-Lo}px)`;import{textStyleCaseCss as aS,textStyleCaseOfCss as sS,viewKeyAt as Rd}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 ar,encodePartId as yN}from"efficient-easel/draw";import{LINK_FIELD_MARKER as Sd,SCAFFOLD_FIELD_MARKER as bd,TEXT_FIELD_MARKER as Go}from"efficient-easel/draw";import{readHidable as _d}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as Zy}from"efficient-easel/draw";var cd={ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},ud={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 J0=Object.fromEntries(Object.entries(cd).map(([e,t])=>[e,Object.keys(t)])),Q0=Object.fromEntries(Object.entries(ud).map(([e,t])=>[e,[...t]]));var tr="__ownBox";function dd(e){return!!e&&typeof e=="object"&&e[tr]===!0}var nr="sfPanelOnly";function Ho(e){return!!e&&typeof e=="object"&&e[nr]===!0}import{TEXT_FIELD_MARKER as Vy}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as pd}from"efficient-easel/draw";import{readHidable as fd}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[pd]?.control??null}function md(e){let t=jy(e);return t&&zy.includes(t)?t:null}function rN(e){return Ky.includes(e)}function iN(e){return!e||typeof e!="object"?void 0:e[pd]?.placeholder}function Mo(e){return fd(e).text}function or(e,t,n){return Wy.includes(e)?{text:n,hidden:fd(t).hidden}:n}function lN(e,t,n,o){return Mo(e[t])===o?null:{...e,[t]:or(n,e[t],o)}}function hd(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 gd(e,t){if(!Array.isArray(t))return[];let n=hd(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(!md(l))continue;let u=Mo(s?.[i])||hd(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 mN(e,t,n,o,a){let s=Xy(e[t],n);return Mo(s)===a?null:qy(e,t,n,or(o,s,a))}function hN(e,t){return t?`${e} \xB7 row ${t.index+1}`:e}var PN="data-sf-part",kN="data-sf-region-part",AN="data-sf-part-row";function RN(e,t){return`${e}[${t}]`}var IN="data-sf-part-kind",Jy="data-sf-part-style-owner",Qy="data-sf-part-style-kind";function NN(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 yd=2;function Jt(e){return Ss(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}=_d(t);a?n.push(a):o.placeholder&&n.push(o.placeholder);return}if(!e[Sd]){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[Sd]?!1:!!t[Go]||t.type==="text"||t.type==="textarea"}function Td(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 LN(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[bd]!==void 0&&Uo(r,r[bd],i);let l=Td(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 gd(r,t?.[a])){let b=Jt(m);b.length<yd||(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<yd||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 Ed(e,t){if(!t||typeof t!="object"||kn(e)||dd(t))return null;let n=t[Go];return!n||!oS.includes(n.control)?null:n}function DN(e,t){let n=Ed(e,t);return n!==null&&n.identifier!==!0}function FN(e,t){if(!e)return[];let n=[];for(let[o,a]of Object.entries(e)){let s=Ed(o,a);if(!s)continue;let{text:r,hidden:i}=_d(t?.[o]);if(nS({offPage:s.offPage===!0,hidden:!!i,panelOnly:Ho(a)}))continue;let l=r||s.placeholder||"",u=Ss(l).replace(/\s+/gu," ").trim();n.push({key:o,label:tS(Td(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 xd(e,t,n){let o=$o(e,t);return Qt(j(o,n))??{}}function vd(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 ur}from"efficient-easel/screen/lib/content/length-units";var dr="_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 ZN(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"],sr=5,rr=1e3,uS=-5,dS=10,pS=0,fS=64,mS=2,wd={size:{min:sr,max:rr,step:1},sizeTablet:{min:sr,max:rr,step:1},sizePhone:{min:sr,max:rr,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 JN(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 QN(e){return $o(e,dr)}function wS(e,t){return xd(e,dr,t)}function Id(e,t,n){return vd(e,dr,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 ir(e){let t=Rd("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:ir("desktop"),sizeTablet:ir("tablet"),sizePhone:ir("mobile"),paragraphSpacing:"paragraphSpacingUnit",padding:"paddingUnit"},Nd=Object.values(St);function Re(e,t){return F(e[St[t]])}function kS(e,t,n={}){if(Nd.includes(e))return ur(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(wd,e)){let{min:o,max:a}=wd[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"?pr(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&&!pr(e.sizeToken)&&n("sizeToken"),e.fontRole!==void 0&&!ut(e.fontRole)&&n("fontRole");for(let o of Nd)e[o]!==void 0&&!ur(e[o])&&n(o);return t??e}function pr(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 fr(e){return e?.pxPhone&&pr(e)?{step:e.stepPhone??e.step,px:e.pxPhone}:null}function Ld({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 e1(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 Id(e,t,a)}function t1(e,t){return Id(e,t,{})}function LS(e){return sS(e)??"none"}function DS(e){return aS(e)??""}var Cd={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 mr(e,t){return e&&t?.sizeCap?`min(${e}, var(${BS}, ${e}))`:e}function n1(e,t){return e?.[t]===!0}function o1(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 hr(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=fr(e.sizeToken);if(a)n.fontSize=Ld(a);else{let s=jo(e);s!==void 0&&(n.fontSize=M(s,Re(e,"sizeTablet")))}}n.fontSize&&(n.fontSize=mr(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=mr(M(a,Re(n,"sizeTablet")),t));let s=Ko(n);return s&&(o.textAlign=s),o}function a1(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=fr(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 gr(e,t,n){return br(zS(e,t),Vo,n)}function WS(e){return Rd("size",e)}function s1(e,t){if(t==="desktop")return null;let n=en(e);if(t==="mobile"){if(fr(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 Dd(e,t){let n=WS(t);if(!he(e,n))return e;let o={...e};return delete o[n],o}function r1(e,t,n){let o=gr(Dd(e,t),t,n);return{fontFamily:o.fontFamily,fontSize:o.fontSize}}function br(e,t,n){e=en(e);let o=FS(e,n),a=hr(e),s=mr(e.size?M(e.size,Re(e,"size")):e.sizeToken?Ld(e.sizeToken):o?MS(o):"",n);return{fontFamily:e.font?YS(e.font):e.fontRole?`var(${Cd[e.fontRole]})`:o?`var(${Cd[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:Od(e.padding,Re(e,"padding")),paddingBottom:Od(e.padding,Re(e,"padding")),color:KS(e.color),fontStyle:e.italic===!0?"italic":e.italic===!1?"normal":""}}var KS=e=>Oo(e),Od=(e,t)=>e===void 0?"":M(e,t),Tt=(e,t)=>Number(e.toFixed(t));function i1(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 l1(e,t){let n=Pd(e);if(!n)return"";for(let o of Gt)if(Pd(t(o.cssVar))===n)return o.key;return""}var Pd=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function YS(e){let t=fc(e);return t?`var(${t.cssVar})`:""}function c1(e,t,n,o){return!t||ar(t)?.nodeId!==e?null:n.find(a=>o(a.getAttribute("class")))??n[0]??null}function XS(e,t){return Qt(j(e,t))??{}}function u1(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=ar(d)?.propKey;if(!f)continue;let p=XS(t,o(f)),m=gr(p,s,{blockDrawsStyle:r(f),sizeCap:i(f)});Et(p.textStyle)?u.setAttribute?.(zo,p.textStyle):u.removeAttribute?.(zo);let b=lr.some(T=>u.style[T]),y=!1;for(let[T,S]of Object.entries(m))t_(u,T,S),S&&(y=!0);if(b||lr.some(T=>m[T]))for(let T of qS(u,a))for(let S of lr)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&&ur(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=gr(o,t,n?.sizeCap?{sizeCap:!0}:void 0);return{...a.fontFamily?{fontFamily:a.fontFamily}:{},...a.fontSize?{fontSize:a.fontSize}:{}}}function d1(e){return Et(e?.textStyle)||!!e?.role||typeof e?.size=="number"&&e.size>0}function p1(e,t,n){if(!e||typeof e!="object")return{};let o=Pc(e.role,t,ho)??{},a=t.sized?e_(Dd(e,n),n):{};return{...o,...a}}function f1(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?.(kd,""):a.removeAttribute?.(kd))}var kd="data-sf-part-para",n_=Object.keys(br({},Vo)),cr=new Set(["color","overflowWrap",_t,"fontStyle"]),lr=n_.filter(e=>!cr.has(e));function m1(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=Ad(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 Ad(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 Ad(e,t,n,o,a){let s=br(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 h1(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:id,phone:ld}:{tablet:Do,phone:Fo}}function g1(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])=>!cr.has(S)),b=d.filter(([S])=>cr.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 b1(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
|
|
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=Hd("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(bu).map(([e,{step:t}])=>[e,t]));function N1(e){return e!==!0&&e!==!1?"":`em.text-accent { font-style: ${e?"italic":"normal"} }`}function L1(e){return e?Wo[e]:void 0}function f_(e){let t=hr(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 D1(e){return Object.keys(f_(e)).length>0}function F1({saved:e,old:t,styleId:n,values:o}){let a=Gd(e);return{saved:m_(a,n,o),old:t}}function m_(e,t,n){return e.map(o=>o.id===t?Er({...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 jd=["font","color","size","weight","emphasis","lineSpacing","letterSpacing","paragraphSpacing","letterCase","largestSize"],S_=["size","lineSpacing","letterSpacing","letterCase"],__=500,wr=Gt.map(e=>({value:e.key,label:e.label,family:`var(${e.cssVar})`,italic:e.italicLoaded}));function Vd({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=Kd(b,a,y);return h_(b_,{styles:T,onChange:S=>s($d({saved:e,old:t,cur:T,next:S,sizeOf:a,panelView:y})),fonts:wr,colours:n,colourNameOf:o,settings:u?jd.filter(S=>S!=="size"):jd,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 Yd="background";function Xd(e){let t=ce(Kt(e));return Ru({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 qd(e){return Xd(e).filter(t=>t.key!==Yd)}function Zd(e){let t=Xd(e).filter(n=>n.key===Yd);return n=>{let o=Me(n);return t.find(a=>a.key===o)?.value??o}}import{useEasel as T_}from"efficient-easel/easel";function Jd({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?Wc:r,E=e?ht(y.headingCompression):l,x=e?Zc(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=vr(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(zd(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 CR}from"efficient-easel/easel";import{Inspector as OR}from"efficient-easel/fields";import{SettingsGroup as PR}from"efficient-easel/panel";import{useEffect as kR,useRef as AR,useState as oc}from"react";import{jsx as vt,Fragment as w_,jsxs as C_}from"react/jsx-runtime";import{useState as np}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 Qd}from"react/jsx-runtime";import{Button as ep,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 tp({count:e,onCancel:t,onConfirm:n}){return Qd(x_,{open:!0,onClose:t,role:"alertdialog",size:"sm",title:c("Clear this site\u2019s colors?"),footer:Qd(E_,{children:[Xo(ep,{variant:"secondary",onClick:t,children:c("Cancel")}),Xo(ep,{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 op({value:e,onChange:t}){let n=e?.themes??[],o=n.length===0,a=Pe(e),[s,r]=np(!1),i=k_(),[l,u]=np(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=Hc.filter(S=>!p.has(S)).map(S=>Mc(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(tp,{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 os}from"react/jsx-runtime";import{SettingsDefaultReset as Nk,SettingsField as Lk}from"efficient-easel/panel";import{SquareIcon as Dk}from"efficient-easel/icons";import{jsx as g,jsxs as We,Fragment as je}from"react/jsx-runtime";import{parseOption as sp}from"efficient-shell/format";var Cr=["image","video"],rp={image:"imageFocal",image2:"imageFocal2"},H_={HeroSingle:"image",HeroSlide:"video"};function yL(e,t){return sp(Cr,H_[e],t)}var ip=["one","side","stacked"],M_="one",SL={one:"One",side:"Side by side",stacked:"Stacked"};function lp(e){return sp(ip,M_,e)}function ap(e){return e==="one"?1:2}function U_(e,t){if(ip.includes(e))return e;let n=lp(t);return n==="side"?"stacked":n}function _L(e){let t=lp(e.mediaLayout);return Math.max(ap(t),ap(U_(e.mediaLayoutPhone,t)))}import{cloneElement as _l,createContext as tO,useContext as Fh,useEffect as nO,useId as Bh,useRef as to,useState as no}from"react";import{useEasel as Qa,useSelectedHost as Lt}from"efficient-easel/easel";import{PIN_LENGTH as ja,toDateKey as vz,fromDateKey as wz,parseOption as oO}from"efficient-shell/format";function G_(e){return!!e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.src=="string"}function se(e){return typeof e=="string"?e:G_(e)?e.src:""}function EL(e,t,n){return Or(e,t.split("."),n)}function Or(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=Or(p,a,n);return m!==p&&(d=!0),m});return d?{...i,[r]:f}:e}let u=Or(l,a,n);return u===l?e:{...i,[r]:u}}import{parseOption as up}from"efficient-shell/format";var $_=["upload","youtube"],z_="upload",CL={upload:"Upload",youtube:"YouTube"},W_=["background","click"],K_="background",OL={background:"Background",click:"Click to play"};function PL(e){return up($_,z_,e)}function kL(e){return up(W_,K_,e)}var cp=/^[A-Za-z0-9_-]{11}$/,j_=/^(?:www\.|m\.|music\.)?(?:youtube\.com|youtube-nocookie\.com|youtu\.be)$/;function AL(e){let t=typeof e=="string"?e.trim():"";if(!t)return null;if(cp.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&&cp.test(a)?a:null}function RL(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 IL(e){return`https://i.ytimg.com/vi/${e}/maxresdefault.jpg`}function NL(e){return`https://i.ytimg.com/vi/${e}/hqdefault.jpg`}var LL="Play video";var Pr={frame:"Video frame",image:"Image"},DL={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":se(e.poster)?"image":"frame"}function FL(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 se(a)||se(s)||void 0}function dp(e){if(se(e.mediaVideo)){if(In(e)==="frame")return se(e.videoFrame)?void 0:se(e.poster)?"frame-missing-image":"frame-missing-surface";if(!se(e.poster))return se(e.videoFrame)?"image-missing-frame":"image-missing-surface"}}var qo="videoFrames",kr="videoFramesNotOwn";function pp(e,t,n){let o=se(e.mediaVideo);if(!o||!t||In(e)!=="frame"||se(e.videoFrame))return;let a=t[o],s=!!se(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=se(e),o=n&&t?t[n]:void 0;return o?.state==="ready"&&o.frame?o.frame:void 0}function BL(e,t,n){let o=n?.[kr];if(!(Array.isArray(o)&&o.includes(e)))return V_(t,n?.[qo])}import{useSyncExternalStore as Y_}from"react";function fp(){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",Ar="sections",$L=[xe,Ge],Zo=e=>e===xe||e===Ge,zL=e=>X_({parentId:e,slot:Ar});function WL(e,t,n=[]){return{type:e,props:{id:t,[Ar]: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 KL(e,t){return e.some(n=>n?.type===t.type)?e:t.type===xe?[t,...e]:[...e,t]}var mp={[xe]:{max:3,takes:["Flex","Ticker"]},[Ge]:{max:6,takes:["Flex","Prose","Logos","Divider"]}};function jL(e,t,n){if(!Zo(e))return!0;let o=mp[e];return n<o.max&&o.takes.includes(t)}function VL(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?.[Ar];if(!Array.isArray(r)||!r.some(l=>l?.props?.id===o))continue;let i=mp[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 Rr(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=Rr(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 Ir="--sf-site-width",Dr=`var(${Ir},${V.default}px)`,eD="100vw",tD=`max-w-[${Dr}]`,nD=`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 oD(e,t){let n=mt(e,t,"size",V);if(n!==null)return{[Ir]:n};let o=yp(e);return o===V.default?{}:{[Ir]:`${o}px`}}var re={min:0,max:80,step:4,default:40,typedMax:Number.POSITIVE_INFINITY},Nr="--sf-site-gutter",Ne={min:0,max:24,step:4,typedMax:Number.POSITIVE_INFINITY},tT=Q_({kind:"spacing"},"vw",re).max;function Sp(e,t){return e<=t?`${e}px`:`min(${e}px, ${tT}vw)`}var hp="--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(${Nr},${re.default}px)`,aT=`px-[${ve}]`;var et={md:`min(24px,${ve})`,sm:`min(20px,${ve})`,frame:`min(24px,${ve})`,tabs:`min(16px,${ve})`},aD=[[`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",sD="data-sf-side",sT="once";function rD(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 Fr(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)))]",Lr={"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},gp="var(--sf-pad-site,var(--sf-box-g,var(--sf-site-gutter,40px)))",bp="[--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:gp,edge:bp,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:Lr["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:gp,edge:bp,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:Lr["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)))]"}},iD=`mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] ${_p}`,lD="[--sf-box-g:var(--sf-site-gutter,40px)] [&>*]:[--sf-site-gutter:0px]",rT="[[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter-phone:0px]";function cD(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(Lr,o):void 0;a?t.push(a):n===uT&&t.push(lT)}return t.join(" ")}var uD="[[data-sf-side=once]_&]:[--sf-pad-site:inherit]",dD="[[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=["site","box"].find(o=>Ln[o].className.split(" ").every(a=>t.includes(a)));return n?`${iT} ${Ln[n].once} ${Ln[n].onceGutter}`:""}function pD(e,t){let n=t?[pT(e),dT(e)].filter(Boolean).join(" "):"";return n?`${e} ${n}`:e}var fD="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)?re.default:Math.round(Math.min(Math.max(e,re.min),re.typedMax))}function mD(e,t){let n=mt(e,t,"spacing",re);if(n!==null)return{[Nr]:n};let o=Tp(e);return o===re.default?{}:{[Nr]:Sp(o,re.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 hD(e,t){let n=mt(e,t,"spacing",Ne);if(n!==null)return{[hp]:n};let o=Ep(e);return o===null?{}:{[hp]:Sp(o,Ne.max)}}function gD(e){return Ep(e)===null?"":`${nT} ${oT}`}function vp(e,t){let n=Dc(e,t,"spacing",re),o=n===null?Tp(e):J_(n,F(t),"px","mobile",Ne);return Math.min(Ne.max,o)}var wp=Dr,bD=`max-w-[${wp}]`,yD=`max-w-[min(var(--sf-page-cap,${V.default}px),${V.default}px)]`,Cp="--sf-hero-cap",fT=`var(${Cp},none)`,SD=`max-w-[${fT}]`,mT="--sf-hero-bleed-m",hT="--sf-hero-bleed-w",gT="--sf-hero-chrome-x",bT="--sf-hero-chrome-cap";function _D(e){return e===!0?{[Cp]:wp,[mT]:"auto",[hT]:"100%",[gT]:"24px",[bT]:"none"}:{}}var Br=`calc(${Dr} - ${ve}*2)`,TD=`max-w-[${Br.replace(/ /g,"_")}]`;var yT="--sf-chrome-cap",ST=`var(${yT},${Br})`,ED="data-page-width";function xD(e){return e==="full"?"full":null}function vD(e){return e==="full"?null:eT(e==="content"?Br:ST)}function wD(e){if(e==="full")return"full";if(e==="content")return"content"}var PD="data-sf-site-css",_T="site",Dn="siteCustomCss";function TT(e){return e&&typeof e=="object"?ou(e,Dn):""}function kD(e){return TT(e)?_T:void 0}var ET=["tall","square","wide"],xT="tall";function ID(e){return ET.includes(String(e??""))?String(e):xT}var ND={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"},LD=[{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
|
|
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 oe,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 mI(e,t,n){wo=e??null,vu=t||xu,wu=n??null}function P(){return wu}function hI(){return vu}function gI(){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 AI(e){let t=e?.trim();return t?wb.find(n=>He(n)===t)??null:null}function RI(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 LI(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 DI(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 FI(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 BI(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 ae,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 ae(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?ae(qb,{id:o,value:e,onChange:t,label:n,presets:i,follows:l,choices:r}):ae(Bb,{id:o,value:e,onChange:d,label:n,presets:i,fallback:l??void 0,size:"md",align:"start"}),u!==null?ae("span",{className:"sf-colour-caption",children:u}):ae("span",{className:"sf-colour-hexwrap",children:ae(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),ae(Gb,{id:o,trigger:ae("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:[ae("div",{role:"group","aria-label":n,className:"sf-colour-choices",children:r.map(p=>ae($b,{content:p.label,children:ae(Mb,{color:p.color,"aria-label":p.label,selected:p.selected,onClick:()=>{p.selected||p.onPick()}})},p.label))}),ae(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 ae(Vb,{label:e,icon:t,htmlFor:i.id,changed:n,hint:o,action:a?ae(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 ae(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,f0=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 g0(e){Zs=e,Ro+=1,bt&&clearTimeout(bt),bt=null,Qs(void 0)}function b0(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 y0(){return _y(Ty,Xu,Xu)}var er=new Set;function Ju(e){return er.add(e),()=>{er.delete(e)}}async function _0(){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",$0="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 yN}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 J0=Object.fromEntries(Object.entries(dd).map(([e,t])=>[e,Object.keys(t)])),Q0=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 rN(e){return Ky.includes(e)}function iN(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 lN(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 mN(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 hN(e,t){return t?`${e} \xB7 row ${t.index+1}`:e}var PN="data-sf-part",kN="data-sf-region-part",AN="data-sf-part-row";function RN(e,t){return`${e}[${t}]`}var IN="data-sf-part-kind",Jy="data-sf-part-style-owner",Qy="data-sf-part-style-kind";function NN(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 LN(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 DN(e,t){let n=vd(e,t);return n!==null&&n.identifier!==!0}function FN(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 ZN(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 JN(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 QN(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 e1(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 t1(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 n1(e,t){return e?.[t]===!0}function o1(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 a1(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 s1(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 r1(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 i1(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 l1(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 c1(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 u1(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 d1(e){return Et(e?.textStyle)||!!e?.role||typeof e?.size=="number"&&e.size>0}function p1(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 f1(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 m1(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 h1(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 g1(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 b1(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 A1(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 R1(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 I1(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 N1(e){return e!==!0&&e!==!1?"":`em.text-accent { font-style: ${e?"italic":"normal"} }`}function L1(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 D1(e){return Object.keys(f_(e)).length>0}function F1({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 CR}from"efficient-easel/easel";import{Inspector as OR}from"efficient-easel/fields";import{SettingsGroup as PR}from"efficient-easel/panel";import{useEffect as kR,useRef as AR,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 Nk,SettingsField as Lk}from"efficient-easel/panel";import{SquareIcon as Dk}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 yL(e,t){return ip(Or,H_[e],t)}var cp=["one","side","stacked"],M_="one",SL={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 _L(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 vz,fromDateKey as wz,parseOption as oO}from"efficient-shell/format";function G_(e){return!!e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.src=="string"}function se(e){return typeof e=="string"?e:G_(e)?e.src:""}function EL(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",CL={upload:"Upload",youtube:"YouTube"},W_=["background","click"],K_="background",OL={background:"Background",click:"Click to play"};function PL(e){return pp($_,z_,e)}function kL(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 AL(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 RL(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 IL(e){return`https://i.ytimg.com/vi/${e}/maxresdefault.jpg`}function NL(e){return`https://i.ytimg.com/vi/${e}/hqdefault.jpg`}var LL="Play video";var kr={frame:"Video frame",image:"Image"},DL={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":se(e.poster)?"image":"frame"}function FL(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 se(a)||se(s)||void 0}function fp(e){if(se(e.mediaVideo)){if(In(e)==="frame")return se(e.videoFrame)?void 0:se(e.poster)?"frame-missing-image":"frame-missing-surface";if(!se(e.poster))return se(e.videoFrame)?"image-missing-frame":"image-missing-surface"}}var qo="videoFrames",Ar="videoFramesNotOwn";function mp(e,t,n){let o=se(e.mediaVideo);if(!o||!t||In(e)!=="frame"||se(e.videoFrame))return;let a=t[o],s=!!se(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=se(e),o=n&&t?t[n]:void 0;return o?.state==="ready"&&o.frame?o.frame:void 0}function BL(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",$L=[xe,Ge],Zo=e=>e===xe||e===Ge,zL=e=>X_({parentId:e,slot:Rr});function WL(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 KL(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 jL(e,t,n){if(!Zo(e))return!0;let o=gp[e];return n<o.max&&o.takes.includes(t)}function VL(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)`,eD="100vw",tD=`max-w-[${Br}]`,nD=`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 oD(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 re={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",re).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},${re.default}px)`,aT=`px-[${ve}]`;var et={md:`min(24px,${ve})`,sm:`min(20px,${ve})`,frame:`min(24px,${ve})`,tabs:`min(16px,${ve})`},aD=[[`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",sD="data-sf-side",sT="once";function rD(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)))]"}},iD=`mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] ${_p}`,lD="[--sf-box-g:var(--sf-site-gutter,40px)] [&>*]:[--sf-site-gutter:0px]",rT="[[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter-phone:0px]";function cD(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 uD="[[data-sf-side=once]_&]:[--sf-pad-site:inherit]",dD="[[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 pD(e,t){let n=t?[pT(e),dT(e)].filter(Boolean).join(" "):"";return n?`${e} ${n}`:e}var fD="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)?re.default:Math.round(Math.min(Math.max(e,re.min),re.typedMax))}function mD(e,t){let n=mt(e,t,"spacing",re);if(n!==null)return{[Fr]:n};let o=Tp(e);return o===re.default?{}:{[Fr]:Sp(o,re.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 hD(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 gD(e){return Ep(e)===null?"":`${nT} ${oT}`}function vp(e,t){let n=Bc(e,t,"spacing",re),o=n===null?Tp(e):J_(n,F(t),"px","mobile",Ne);return Math.min(Ne.max,o)}var wp=Br,bD=`max-w-[${wp}]`,yD=`max-w-[min(var(--sf-page-cap,${V.default}px),${V.default}px)]`,Cp="--sf-hero-cap",fT=`var(${Cp},none)`,SD=`max-w-[${fT}]`,mT="--sf-hero-bleed-m",hT="--sf-hero-bleed-w",gT="--sf-hero-chrome-x",bT="--sf-hero-chrome-cap";function _D(e){return e===!0?{[Cp]:wp,[mT]:"auto",[hT]:"100%",[gT]:"24px",[bT]:"none"}:{}}var Mr=`calc(${Br} - ${ve}*2)`,TD=`max-w-[${Mr.replace(/ /g,"_")}]`;var yT="--sf-chrome-cap",ST=`var(${yT},${Mr})`,ED="data-page-width";function xD(e){return e==="full"?"full":null}function vD(e){return e==="full"?null:eT(e==="content"?Mr:ST)}function wD(e){if(e==="full")return"full";if(e==="content")return"content"}var PD="data-sf-site-css",_T="site",Dn="siteCustomCss";function TT(e){return e&&typeof e=="object"?su(e,Dn):""}function kD(e){return TT(e)?_T:void 0}var ET=["tall","square","wide"],xT="tall";function ID(e){return ET.includes(String(e??""))?String(e):xT}var ND={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"},LD=[{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
|
|
4
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 DD(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:Os(e.lat),lng:Os(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 FD="other",BD={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 $D(e){let t=e&&typeof e=="object"?e[tt]:void 0;return Array.isArray(t)?t.map(wT).filter(n=>n!==null):[]}function zD(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:rc,label:"Site offices",blocks:["Footprint","ContactLocations"]};var Mr="Footer",Ap=[xe,Mr,Ge],Fn=[wt,tt,Dn],OT=[Ge,Mr],Ur=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 ZD(e){return Array.isArray(e)?e.find(t=>Ur(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=>Rr(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===Mr&&!n)}function ta(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?ta(n,ot(e)):new Set}function Hr(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 JD(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=>Ur(l)?kT(l,a):l),r={...e,content:[...o,...nt(e),...s]},{owned:i}=Hr(ot(t),ta(n,ot(t)));return Object.keys(i).length&&(r.zones={...ot(e)??{},...i}),r}function QD(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&&Ur(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=ta(u,f),{owned:m,rest:b}=Hr(f,p),y=Hr(ot(t),ta(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 eF(e,t){return n=>e(n)||n!==void 0&&Ap.includes(n)&&t()}var Dp=null;function nF(e){Dp=e}function Fp(){return Dp}var Bp=null;function oF(e){Bp=e}function aF(){return Bp}var Gr=fp();function Hp(e,t,n){if(!t)return;let o={...Gr.get(e)};for(let[a,s]of Object.entries(t))o[a]={...s,noted:n};Gr.set(e,o)}function uF(e,t){Hp(e,t,"load")}function dF(e,t){Hp(e,t,"save")}function Mp(e){return Gr.use(e)}var $r=e=>!!Fp()?.sectionOf(e);function Up(e,t=$r){return Np(e,t)}function Gp(e,t,n,o=$r){if(n)return e&&Up(t,o).has(e)?void 0:n}function pF(e,t,n=$r){if(!e)return{};let o=[...Up(t,n)];return o.length?{[qo]:e,[kr]: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 Nz}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 na,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 zr={kind:"radius",unitKey:"sectionCornersUnit"};function Wr(e){return typeof e=="number"&&Number.isFinite(e)}function bF(e,t,n){if(!Wr(e))return;let o=NT(n)&&n!=="px"?Yt(e,n):Yt(ke(e));if(Object.keys(o).length===0)return;let a=o[Kr];if(typeof a!="string")return o;let s=Bn(t)?Ct(a,Le(t)??[]):a;return{...o,[LT]:s}}var LT="--sf-section-radius",Kr="--sf-card-radius";function Ct(e,t){return na.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 jr(e){return typeof e=="number"&&Number.isFinite(e)}function EF(e,t,n){if(!jr(e))return;let o=(DT(n)&&n!=="px"?Yt(e,n):Yt(ke(e)))[Kr];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}:jr(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",oa="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"],Vr=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 FF(e){let t=e.map(VT);for(let n of t)Vr.set(n.key,n);t.length&&(Zp+=1)}function Yr(){return[qp,...Vr.values()]}function YT(e){return e===at?qp:Vr.get(e)??null}function Xr(){return Zp}function Mn(e){let t=e?.[oa];return typeof t!="string"?at:t.trim()||at}function qr(e){return Mn(e)===at}function BF(e,t){let n=YT(e)?.fields??[];return t?n.filter(o=>t.includes(o.kind)):n}var aa="product",Jp="tyre",XT=[aa,Jp];function UF(e){return XT.includes(e)}var qT="productType",ZT={[aa]:"alloy-wheel",[Jp]:"tyre"},JT=["alloy-wheel","tyre"];function Qp(e,t){return qr(t)?ef(t)??ZT[e]??null:null}function ef(e){if(!qr(e))return null;let t=e?.[qT];return typeof t=="string"&&JT.includes(t)?t:null}function GF(e){let t=e?.root;return ef(t?.props)}var QT="Main Pages",eE="Dynamic Pages",tE="dynamic",nE="dynamic";function Zr(e){return e.kind===nE}var Jr="lightbox";function zF(e){return e.kind===Jr}function WF(e){let t=[],n=[];for(let o of e){if(Zr(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 sa=null,tf=null;function oE(e,t){sa=e,tf=t}function XF(e){oE(e,null)}function qF(){return sa}function Un(){return Zr({kind:tf})||sa===aa}function ZF(e){return Qp(sa??"",e)??"alloy-wheel"}function nf(e){return Un()?Mn(e):null}function cB(e,t,n){let o=!1,a={};for(let[s,r]of Object.entries(e)){if(!af(Cs(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 uB(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 dB(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",Qr={kind:"radius",unitKey:iE},rf={kind:"radius"};function lE(e){return ke(e)}function bB(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 vB(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,ra={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(ra).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).filter(([n])=>!pE.has(n)))])),ei=Object.keys(ra),mf=[2,3,4,6];function ti(e,t){return ei.filter(n=>n===t||e===null||Gn[n].across===e)}function hf(e){let t=e.layout;return typeof t=="string"&&he(ra,t)?t:null}function ni(e){let t=hf(e);return t?fE(t,e.layoutPhone):null}var ia={oneAcross:{label:"One across",phone:[[rn,2]],acrossPhone:1}};function gf(e){return typeof e=="string"&&he(ia,e)?e:null}function df(e,t){return t?rn/e.acrossPhone:pf/e.across}function oi(e){return e.ratio?iu.find(t=>t.shape===e.ratio)?.ratio??null:null}function bf(e){return[...e.lead??[],...e.desktop]}function fE(e,t){let n=ra[e],o=gf(t);if(!o)return n;let{phone:a,acrossPhone:s}=ia[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 kB(e){let t=ni(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=oi(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 la=12,Sf=1,ca=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,la)??gE}function NB(e,t){return ln(e,Sf,ca)??(bE(t)===4?2:Sf)}function LB(e){return e==null||e===""?null:ln(e,1,la)}var DB="data-sf-span",ua=4;function yE(e){return e==null||e===""?null:ln(e,1,ua)}var FB="data-sf-row-span",ai="gridTileAt",si=48;function BB(e){return e==null||e===""?null:ln(e,1,si)}var HB="--sf-tile-at";function MB(e){return e==null||e===""?null:ln(e,1,ca)}function UB(e){return yE(e)}var GB="data-sf-span-phone",$B="data-sf-row-span-phone",zB=["gridSpan","gridRowSpan",ai,yf("gridSpan"),yf("gridRowSpan")];function WB(e,t){if(!e)return!1;if(SE(e,t)||e.type==="Grid")return!0;if(e.type==="GalleryB"){if(ni(e.props??{}))return!1;let n=e.props?.columns;return n!=null&&n!==""}return!1}var _f=new Map;function KB(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 ri(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}var qB=e=>EE(ri(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 ii="#popup:";function wf(e){return`${ii}${e}`}function Cf(e){return e.startsWith(ii)&&e.slice(ii.length).trim()||null}function $n(e){return e===Ef?"/":`/${e}`}function Of(e){return`/journal/${e}`}function nH(e){return`/wheels/${e}`}function da(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=ri(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 oH(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(yu()),[]);let s=NE(e);if(!s||!n)return null;let r=`${o}${da(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 pa,Tooltip as HE}from"efficient-shell/ui";function fa({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(pa,{variant:"link",size:"sm",className:"sf-blogsource-link",onClick:n,disabled:o,children:c("Refresh now")},"refresh"):null,a?De(pa,{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(pa,{variant:"secondary",className:"sf-blogsource-action",onClick:n,disabled:o,children:c("Refresh now")}):null,a?De(pa,{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 qa,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 bl,HashIcon as zh,HeightIcon as Za,ImageIcon as TO,ListIcon as EO,LocationIcon as Ch,PaddingBottomIcon as Wh,PaddingLeftIcon as Kh,PaddingRightIcon as jh,PaddingTopIcon as Tl,PageIcon as xO,PhoneIcon as jz,StickyIcon as Vh,SearchIcon as vO,SquareIcon as wO,TypeIcon as CO,WidthIcon as OO}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 li({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 vH=Object.keys(Nf);var wH=Object.keys(Lf);import{parseHexColor as qE}from"efficient-shell/format";var ZE="#ffffff";function ci(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 AH(e){return{"--bg":ci(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 ui=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}];var zH="sf-card",WH="[--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%",jH={desktop:20,phone:20,side:40,sidePhone:24},VH="sf-box-sides";function nx(e){return typeof e=="string"&&e.trim()!==""}function YH(e){return nx(typeof e?.bgImage=="string"?e.bgImage:null)||Hf(e)}function Hf(e){return To(e,bo)!==""}function XH(e,t){return t||!Hf(e)?e:{...e,[bo]:""}}function qH(e,t){return As(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 ma=[{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",di=ma[1].value,ha=e=>e===di?di:ma[0].value,ox=[{mix:"12%",at:"50%"},{mix:"19%",at:"70%"},{mix:"50%",at:"95%"}];function ZH(e){return ha(e)!==di?null:{backgroundImage:`linear-gradient(to bottom, transparent, ${ox.map(t=>`color-mix(in srgb, var(--bg) ${t.mix}, transparent) ${t.at}`).join(", ")})`}}var ga=e=>typeof e=="string"?QE(e.trim()):null,zn=e=>{let t=ga(e);if(t!==null||typeof e!="string")return t;let n=e.trim();return n&&!n.startsWith("#")&&Iu(n)||null},ba=e=>{if(typeof e!="string")return null;let t=ex(Me(e.trim()));return t?.kind==="slot"?t.slot:null},pi="swatch";function JH(e,t){if(!t)return null;let n=As(t,To(e,pi)),o=Ae(n);return ga(n)??(o&&He(o)||null)}var ax={tabletClass:"sf-fill-tablet",tabletVar:"--sf-fill-tablet",phoneClass:"sf-fill-phone",phoneVar:"--sf-fill-phone"};function QH(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 eM(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=>ui.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 tM(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 _c(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(fi(o,t,0))return{type:typeof a=="string"?a:"",props:s??{}}}return null}function fi(e,t,n){if(n>12||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(a=>fi(a,t,n+1));let o=e.props;return o&&typeof o=="object"&&o.id===t?!0:Object.values(e).some(a=>fi(a,t,n+1))}function Gf(e,t){let n=e?.content;return Array.isArray(n)?ya(n,t,0)??[]:[]}function ya(e,t,n){if(n>12||!e||typeof e!="object")return null;if(Array.isArray(e)){for(let a of e){let s=ya(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=ya(a,t,n+1);if(s)return[o,...s]}return null}for(let a of Object.values(e)){let s=ya(a,t,n+1);if(s)return s}return null}import{SettingsDefaultReset as ne,SettingsDrill as PO,SettingsField as K,SettingsGroup as kO,SettingsSegmented as AO,SettingsBorder as RO,SettingsSidesEach as IO,SettingsSwitch as El,borderSides as NO,borderStartEach as LO}from"efficient-easel/panel";import{ListField as DO}from"efficient-easel/fields";import{CodeIcon as FO}from"efficient-shell/icons/efficient";import{DisplayChips as BO}from"efficient-shell/ui";import{HIDDEN_KEY as rx,hiddenInEveryView as ix,hiddenInView as mi,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 rM=[rx,$f("tablet"),$f("mobile")];function Kf(e){return{desktop:mi(e,"desktop"),tablet:mi(e,"tablet"),mobile:mi(e,"mobile")}}function iM(e){return ix(e)}function lM(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 cM(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 Sa(e,t){return cn(e)[t]!==!1}function hi(e,t,n){let o=cn(t)[n];return typeof o=="boolean"?o:Sa(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 pM(e,t,n,{atSectionLine:o=!0}={}){let a=!Sa(e,n);return Wf({desktop:a,tablet:a,mobile:!hi(e,t,n)},{atSectionLine:o})}import{ColorSwatch as HO,CornersInput as MO,DatePicker as sW,DateTimePicker as UO,FOCAL_DEFAULT as rW,IconPicker as Yh,COLUMN_COUNT_MAX as Oh,COLUMN_SHARE_MIN as GO,COLUMN_SHARES_EQUAL as $O,resolveColumnShares as Xh,WidthsBar as zO,useShellStrings as WO,IconButton as qh,InputNumber as Ph,Slider as KO,Textarea as jO,Tooltip as xl}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 gi="Lookup busy \u2014 try again in a moment.",_a=e=>typeof e=="number"&&Number.isFinite(e);function Ta(e){return e.some(t=>{let n=t?.geocode;return n?n.pending||n.manual&&n.lat===void 0&&n.lng===void 0?!0:_a(n.lat)&&n.lat!==t.lat||_a(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:gi}})}}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=_a(i.lat)&&i.lat!==r.lat?i.lat:r.lat,u=_a(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 yl}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,hc)}function Jf(e,t){let n=gx(t,e.length),o=bc(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=mc(),d={};if(r)for(let p of u)d[p.style]=gc(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 bi=Ex;import{deviceField as ee}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as VO,NoControlMark as YO,noControlField as Zh}from"efficient-easel/screen/lib/document/panel-no-control-mark";function Ea(e,t,n){return typeof e=="number"?e:typeof t=="number"?t:n}var xa=void 0;import{phoneKey as rt,tabletKey as vl,viewKeyAt as wl}from"efficient-easel/draw";import{jsx as va,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(lu.map(n=>{let o=U(e,n);return[o,em(e,t(n),Qf)[o]]}))}function LM(e,t,n){let o=t.render,a={...t,render:s=>va(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?va("div",{ref:r,style:{display:"contents"},children:u}):u,o&&n&&va(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 DM(e,t){let n=Px({type:"custom",render:o=>va(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 yi,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 GM({children:e}){return yi(tm.Provider,{value:!0,children:e})}function Fx(){return Lx(tm)}function nm({name:e,children:t}){return!Fx()||!e||!Bx(e)||kn(e)?yi(Ix,{children:t}):yi(Dx,{})}function Bx(e){return/^[A-Za-z0-9_$]+$/u.test(e)}import{parseOption as Hx}from"efficient-shell/format";var Si="off",am="none",_i=[{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 WM(e){return Hx(_i,Si,e)}var om="sf-card-index",Wn="sf-card-index",KM="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 jM(e,t){return t==="off"?"":`.${e}{counter-reset:${Wn}}.${e} .${om}{counter-increment:${Wn}}.${e} .${om}::before{content:${Mx[t]}}`}function VM(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 XO}from"efficient-easel/draw";import{jsx as ue}from"react/jsx-runtime";import{SettingsDefaultReset as Vx,SettingsField as Ti}from"efficient-easel/panel";import{useSelectedHost as Yx}from"efficient-easel/easel";import{FOCAL_DEFAULT as Xx}from"efficient-shell/format";import{ImageIcon as Ei,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 JM(e,t){return kt(jx,null,Kn(t),Kn(e))}var jx={tabletClass:Wx,tabletVar:Kx,phoneClass:$x,phoneVar:zx};import{shownTier as xi}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=xi(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,xi(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,xa)}}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&&xi(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=se(e);if(y&&(!b||!w))return null;if(T&&!T.capabilities.mediaEditing)return ue(Ti,{label:f,icon:m?ue(im,{}):ue(Ei,{}),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(Ti,{label:f,icon:ue(Ei,{}),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(Ti,{label:f,icon:m?ue(im,{}):ue(Ei,{}),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 NU({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 Pa,useRef as tw,useState as Oa}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 vi(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:da(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 wa(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 wi="popup",vv=au,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 Ci(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",tG="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 nG(e,t){return t===0?e.subtitleEmpty:t===1?e.subtitleOne:e.subtitleMany.replace("{count}",String(t))}function oG(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:wa(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 aG(e){let t=e??{};return{...Ci(t,Iv),placement:pe(Rv,t.placement,"right"),height:"full",fullWidth:!1,autoOpen:ze(t.autoOpen,!0)}}var Cm="consent-banner",lG="consent-banner";var Nv=[{value:"bar",label:"Bar"},{value:"card",label:"Card"}],cG="Layout",wm={layout:"bar"},Lv=e=>Nv.some(t=>t.value===e);function uG(e){let t=J((e??{}).layout,wm.layout);return{layout:Lv(t)?t:wm.layout}}var dG={...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"],mG={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"},hG={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 yG={heading:"Join our email list",placeholder:"Email address",buttonLabel:"Subscribe"},Gv={lead:"We accept"},SG={...Gv,methods:[],size:"sm",align:"start",dataSource:sc},Pi="site-footer";var ki=Pi,_G={desktop:!0,tablet:!0,mobile:!0},TG={desktop:!1,tablet:!1,mobile:!1},Oi=1,Pm=6,EG=Array.from({length:Pm-Oi+1},(e,t)=>Oi+t),Ca={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),Oi),Pm);function xG(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??Ca.desktop),tablet:At(t.tablet??Ca.tablet),mobile:At(t.mobile??Ca.mobile)}}return{...Ca}}var Ai="subscribe-popup",RG="subscribe-popup",zv=[Ai,Pi,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=wa;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 NG(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:wi}},content:[],zones:{}}}function BG(e,t,n){return{slug:Xv(t,n),title:e,kind:Jr,layout:qv(e)}}function Ri(e){return e?.root?.props?.kind===wi}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=Pa(()=>vi(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]=Oa([]),[r,i]=Oa([]),[l,u]=Oa([]),[d,f]=Oa(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=Pa(()=>({pages:a.filter(x=>!Am(x.slug)&&!Ri(x.layout)).map(x=>({slug:x.slug,title:x.label,docs:[x.layout]})),popups:a.filter(x=>x.slug===Ai||Ri(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=Pa(()=>d?d(S.pages):null,[d,S]);return{data:S,filters:E,pages:a,offersCommerce:n,HostLinkRow:y}}function e2({label:e,icon:t,text:n,onTextChange:o,link:a,onLinkChange:s}){let{data:r,filters:i}=Dm(),l=Pa(()=>vi(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 Ra,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 Ia}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:Ia(l,r,o);return{paddingTop:i(a),paddingBottom:i(s)}}var It=e=>F(e),Ii=(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)?Ii(e[t],n):Ii(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:Ia(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",Fi="sf-section-pad";function Bi(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=Hi({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:[Fi,...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 Ni(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]},ka=Object.fromEntries(Ra.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=ka[T].find(x=>s[x])??"desktop",E=Ia(b,y,Ii(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 Fr().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 Hi(e,t,n={},o=e,a={},s=0,r="box"){let i={},l={},u=[],d=Fr(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:Ia(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"},Mi="padUnit";function Bw(e,t){let n=e[Mi],o=(a,s,r)=>{let i=O(a)??(r===void 0?void 0:Ni(r,n,"desktop")),l=O(s);return l===void 0?i:(i??0)+Ni(l,n,"desktop")};return{top:o(e.padTop,e.sectionPaddingTop,t.top),bottom:o(e.padBottom,e.sectionPaddingBottom,t.bottom)}}function u2(e,t,n={}){let o=Bw(e,t),a={...Hw(e,jm,!0,Mi),top:o.top,bottom:o.bottom};n.noTop&&Object.assign(a,{top:0,topTablet:void 0,topPhone:void 0});let s=Bi(a),r=s?s.className.split(" ").filter(i=>i!==Fi):[];return{...r.length?{className:r.join(" ")}:{},style:s?.style??{}}}var Aa={top:"sectionPaddingTop",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft",right:"sectionPaddingRight"},d2=[...["top","bottom","left","right"].map(e=>[jm[e],Aa[e]]),[Mi,$m]].flatMap(([e,t])=>[[e,t],...["tablet","mobile"].map(n=>[H(e,n),H(t,n)])]);function Hw(e,t=Aa,n=!0,o=t===Aa?$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=>Ra.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 p2(e=Aa){return Vm.flatMap(t=>Ra.map(n=>H(e[t],n)))}var Li=16,Di=24,Uw={text:Li,heading:Di,line:0},Mm={all:{12:"py-3",16:"py-4",24:"py-6"},edge:{12:"max-view-wide:py-3"}},Gw={[Li]:Mm.all[Li],[Di]:Mm.all[Di],[Uw.line]:""};function f2(e,t){return{className:Gw[t]??"",...e?{pad:{values:e,frame:t}}:{}}}var m2=e=>({desktop:e.top,tablet:e.top,mobile:e.topPhone});function h2(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!==Fi).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:Sc}: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 Ra)for(let s of["top","bottom"]){if(ka[a].some(l=>O(e[H(s,l)])!==void 0))continue;let r=l=>Vn(t,s,l),i=ka[a][1];i&&r(i)===r(a)||(n[H(s,a)]=Ni(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=ka[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 Bi(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 Bi({...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 Na,buttonBorderOf as Ww,buttonFillOpacityOf as Kw,buttonPadSidesOf as jw,viewKeyAt as Vw}from"efficient-easel/draw";import{BUTTON_PAD_UNIT_KEY as Ui,lengthOf as Yw}from"efficient-easel/screen/lib/content/length-units";var Xw="px-6 py-4",qw=4,La=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},v2={top:La("y"),right:La("x"),bottom:La("y"),left:La("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 w2(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 C2(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 O2(e){let t=(r,i)=>e[Vw(r,i)],n=r=>jw({top:t(Na.top,r),right:t(Na.right,r),bottom:t(Na.bottom,r),left:t(Na.left,r)})??{},o={desktop:t(Ui,"desktop"),tablet:t(Ui,"tablet"),phone:t(Ui,"mobile")},{classes:a,style:s}=Hi(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 qO}from"efficient-easel/draw/client";import{encodePartId as ZO}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as JO,useEaselStrings as QO}from"efficient-easel/strings";import{PIN_STICK_VAR as Qw,PIN_TRACK_POSITION_VAR as eC,pinAttrs as Zm,pinStickVars as tC,readPin as zi}from"efficient-shell/format";var N2="Stick to top",ye={min:0,max:200,step:4,fallback:0},Yn={kind:"position",unitKey:"stickTopDistanceUnit"},Jm=Wt(Yn),[nC,oC,aC]=Jm,Wi="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"],Ki="Screens",ji="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 Vi(e){return e===pn?pn:"header"}function ah(e){return e===pn?pn:void 0}var Yi="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 L2=["stickTop","stickTopDistance","stickTopTablet","stickTopDistanceTablet","stickTopPhone","stickTopDistancePhone",...Jm,...sC,ji,Yi],D2=new Set(["IntroBleed"]),F2=new Set(["CategoryBar","DocTabs","Contents"]);function iC(e){return typeof e.stickTop=="boolean"?e.stickTop:e.sticky!==!1}var Gi=e=>zi(!0,e).length,Xi={any:["stickTop","stickTopTablet","stickTopPhone"].map(e=>({field:e,is:!0}))},ih={all:[{not:{field:"stickTop",in:[!0,!1]}},{not:{field:"sticky",is:!1}}]};function $i(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 qi(e){return typeof e.stickTopTablet=="boolean"}function Zi(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=$i(e.stickTopDistance,a),r=Gi(e.stickTopScreens),i=qi(e),l=i?e.stickTopTablet===!0:n,u=i?F(o[oC]):a,d=i?$i(e.stickTopDistanceTablet,u):s,f=i?Gi(e.stickTopScreensTablet):r,p=Zi(e),m=p?e.stickTopPhone===!0:l,b=p?F(o[aC]):u,y=p?$i(e.stickTopDistancePhone,b):d,T=p?Gi(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 B2(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||Vi(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(zi(!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(zi(!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 Da(e,t){return cC(lh[e],pC[e],t)}function U2(e,t){return fC[Da(e,t)]}function ch(e){return lh[e].map(t=>({label:dC[t],value:t}))}import{viewKeyAt as Ji}from"efficient-easel/screen/lib/content/view-tiers";import{BORDER_WIDTH_MAX as Ba}from"efficient-easel/screen/lib/content/style-keys";var mC=["solid","dashed","dotted"],Ha=["top","right","bottom","left"],K2="sf-section-border",j2="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(Ba,Math.max(0,Math.round(e)))}px`:void 0,qn={kind:"border",unitKey:"sectionBorderUnit"},V2=Wt(qn);function Y2(e){let t=qn.unitKey;return{desktop:e[Ji(t,"desktop")],tablet:e[Ji(t,"tablet")],phone:e[Ji(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 Fa(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 Ha){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 Qi(e){let{width:t,...n}=e;return typeof t!="number"?e:{...n,...Object.fromEntries(Ha.map(o=>[o,n[o]??t]))}}function X2(e,t,n,o={}){let a=Fa(e,{unit:o.desktop}),s=Fa(n,{tablet:!0,unit:o.tablet}),r=Fa(n,{phone:!0,unit:o.tablet}),i=Fa(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)",el="inherit";function tl(e,t){return e===el?mn:e===void 0?t:Ma(e)}var yC=/var\(\s*--(surface-2|surface|line)\s*(?=[,)])/g;function Ma(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 nl(e,t,n){let o=tl(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 ol="transparent";function dh(e,t){let n=tl(e,t);return!n||n===ol?"none":n===mn?"band":null}function ph(e,t,n=t){let o=s=>!s||s==="transparent",a=tl(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)",Ua="transparent",Zn="inherit";function t$(e,t){return Ma(al(e,t))}function al(e,t){return e===Zn?hn:e==null?t:e===!0?hn:e===!1?Ua:e}function n$(e){return typeof e=="string"&&e!==Zn?Ma(e):hn}function o$(e){return e!==Ua&&e!=="none"&&e!==""}function hh(e,t){return e===Zn||e===!0?!0:e==null?t===hn:!1}var gh="inherit",Ga="fixed",bh=e=>typeof e!="number"&&e!==Ga,_C="var(--sf-heading-max, 9999px)";function r$(e,t,n,o,a){if(typeof e=="number")return M(e,a);if(e===Ga)return t;let s=o?`var(--size-${o}, ${t})`:t;return n==="heading"?`min(${s}, ${_C})`:s}var sl={kind:"fontSize",unitKey:"titleSizeUnit"},rl={kind:"fontSize",unitKey:"bodySizeUnit"},TC=["desktop","mobile"],i$=[sl,rl].flatMap(e=>Wt(e,TC));function l$(e){let t=(n,o)=>Nc(e,n,o);return{titleDesktop:t(sl,"desktop"),titleMobile:t(sl,"mobile"),bodyDesktop:t(rl,"desktop"),bodyMobile:t(rl,"mobile")}}var EC=["page","full"],yh=["full","page"],Nt={full:"Full",page:"Content"},il="inherit",xC=e=>typeof e=="string"&&EC.includes(e),vC=e=>e===il;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 f$(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 m$(e){return he(CC,e)}var te={background:"sectionBackgroundWidth",content:"sectionContentWidth",contentMax:"sectionContentMax",contentMaxUnit:"sectionContentMaxUnit"},h$={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 g$(e){let t=OC(e);return t.content===null&&e.fullWidth===!0?{...t,content:"full"}:t}function b$(e){return e.background!==null||e.content!==null}var y$=e=>({[te.background]:e}),S$=e=>e==="full"?{[te.content]:e,[te.contentMax]:void 0,[te.contentMaxUnit]:void 0}:{[te.content]:e},_$=e=>({[te.content]:"content",[te.contentMax]:e}),T$=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 E$(e,t){return{[Sh]:{background:gn(e),content:gn(t)}}}function x$(e){let t=e.editor?.metadata?.[Sh];return{background:gn(t?.background),content:gn(t?.content)}}import{useEaselSession as eP}from"efficient-easel/screen/lib/session-context";import{BOX_GAP as tP,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 Sl,saidAlignmentGrid as nP,useLengthUnit as oP}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,ie=q.select,Qn=q.Segmented,bn=q.segmented,N$=q.alignmentField,L$=q.alignmentFields,D$=q.blockAlignmentField,F$=q.blockAlignmentFields,B$=q.boxJustifyField,H$=q.boxAlignField,M$=q.boxWrapField,Th=q.directionField,$a=q.gapField,U$=q.placementField,G$=q.PlacementGridView,$$=q.positionFields,z$=q.sidesPaddingFields,eo=q.lengthUnitFields;function W$(e,t){return Fe("Angle",Se(MC),go.min,go.max,go.step,e,"\xB0",t)}var ll=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 cl(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:cl(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 ul(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",[ll]:!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 fl}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"}],dl={"stripes-fine":{ink:4,period:12},"stripes-medium":{ink:8,period:18},"stripes-bold":{ink:14,period:28}},V$=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 Y$(e){return xh(qC,XC,e)}function X$(e){return xh(WC,zC,e)}function q$(e){if(!VC(e))return null;let{ink:t,period:n}=dl[e];return`repeating-linear-gradient(${KC}, ${jC} 0 ${t}px, transparent ${t}px ${n}px)`}var Z$={kind:"border",unitKey:"thicknessUnit"},J$={kind:"size",base:"%",unitKey:"lengthPctUnit"};var za=44,Wa=28;function A({children:e}){return h("svg",{width:za,height:Wa,viewBox:`0 0 ${za} ${Wa}`,"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 pl(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=(Wa-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 sz={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 rz(e){if(e==="none")return h("span",{style:{display:"flex",width:za,height:Wa,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}=dl[e],o=.4,a=[];for(let s=-12;s<za;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 Ka=({x:e,y:t,w:n,h:o})=>h("rect",{x:e,y:t,width:n,height:o,rx:2,stroke:"none",opacity:.3}),iz={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})]})},lz={card:R(A,{children:[h(I,{x:10,y:3,w:24,h:22}),h(Ka,{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(Ka,{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})]})},cz={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})]})},uz={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})]})},dz={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})]})},pz={overlay:R(A,{children:[h(Ka,{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(Ka,{x:4,y:13,w:36,h:12}),h(I,{x:4,y:13,w:36,h:12})]})},fz={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})]})},mz={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})]})},hz={"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},gz={width:"8.5rem",height:"3.75rem",words:!0},bz={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 aP(){let{blockGap:e}=B();return e===null?c("this container's own spacing"):Bt(`${e}px`,c("Styles"))}function sP({inherited:e,onReset:t,label:n}){return g(ne,{words:P()?.panel,label:c(n),changed:!e,detail:aP(),onReset:t})}function rP(e){return $a({...tP,builtIn:Zt[e],resolve:(t,n)=>vn(e,t,n?.siteGap),action:(t,n)=>g(sP,{inherited:!ko(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[Po]:e}})}function iP(e){return le(ee("mobile",{[Po]:e,type:"custom",render:t=>g(uP,{container:e,...t})}),Qh)}function lP(e){return le(ee("tablet",{[Po]:e,type:"custom",render:t=>g(cP,{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",rP(e)),[vl("gap")]:lP(e),[rt("gap")]:iP(e)}}function cP({container:e,...t}){let[n]=Oe("gap"),{siteGap:o}=t.field??{},a=Math.max(Cn.min,vn(e,n,o));return $a({...Cn,builtIn:a,resolve:s=>Ze(s)?s:a,action:(s,r)=>g(ne,{words:P()?.panel,label:c("Gap"),changed:Ze(s),detail:Ft(i=>c(i),`${a}px`),onReset:()=>r(void 0)})}).render(t)}function uP({container:e,...t}){let[n]=Oe("gap"),{siteGap:o,siteGapPhone:a}=t.field??{},s=zs(e,void 0,n,o,a);return $a({...Cn,builtIn:s,resolve:r=>zs(e,r,n,o,a),action:(r,i)=>g(ne,{words:P()?.panel,label:c("Gap"),changed:Ze(r),detail:Bt(`${s}px`,$s(e,n,a)?c("Styles"):c("Desktop")),onReset:()=>i(void 0)})}).render(t)}function r4(e){return Th({offered:ch(e),fallback:Da(e,void 0),resolve:t=>Da(e,t)})}function i4(e,t){return su(t?ru(e,t):[],t)}function dP({inherited:e,onReset:t,label:n}){return g(ne,{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?gP(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(CO,{}),htmlFor:y,className:b?"is-hidden":void 0,hint:T,action:r?g(xl,{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(bi,{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 Cl(e){if(!e[Ke])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[nr]:!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{[VO]:n,...o}=e;return{...o,[tr]:!0,render:t}}var pP=new Set(XO),Ja={type:"radio",options:[{value:!0},{value:!1}]},eg={text:{type:"object",objectFields:{text:{type:"text"},hidden:Ja}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:Ja}},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(!pP.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.",fP={field:"source.slug",set:!0},y4={not:fP},mP="Select a word, then press the highlighter.",hP=new Set([mP]),gP=e=>hP.has(e);function es(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 Ol(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(bP,{text:e,values:t})}}function bP({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 yP(e){let t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function C4(e,t){return yP(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(()=>!ml.has(e));return g(kO,{title:e,open:n,onToggle:a=>{o(a),a?ml.delete(e):ml.add(e)},children:t})}var ml=new Set;function SP({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(xl,{content:l,children:g(HO,{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(_P,{label:e,builtIn:t,followsBand:n,value:o,onChange:a})}}function _P({label:e,builtIn:t,followsBand:n,value:o,onChange:a}){let s=typeof o=="string"?o:void 0,{colors:r,n:i}=Il(),l={background:r.background,surface:r.surface,surface2:$c(r),band:zc(r)},u=n?mn:t,d=ph(s,t,u),f=nl(void 0,u,l),p=n?el:void 0,m=u===mn?c("the theme's section background"):c("Theme {n} background",{n:i}),b=TP(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?"":nl(s,t,l),inherited:f,resetTo:y,onChange:a,onReset:()=>a(p),choices:b})}function TP(e,t,n,o,a,s){let r=dh(e,t);return[{label:c("No fill"),color:"",selected:r==="none",onPick:()=>s(ol)},{label:`${c("Section band")} \xB7 ${a.band.toUpperCase()}`,color:a.band,selected:r==="band",onPick:()=>s(mn)},...Rl(Ae(e)??"",n,o,s)]}function EP(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(bl,{}),changed:!s,action:g(ne,{words:P()?.panel,label:c(e),changed:!s,detail:c("the theme's image stage"),onReset:()=>o(Zn)}),children:SP({swatches:fh,current:s?hn:al(a,t),onPick:o,names:mh})})}}}function A4(e=n=>n,t){return so({_gSectionTheme:_e(tu),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>g(ad,{value:e(n),onChange:o,followLabel:t})}})}function ts(e){let t=Z(),n=Hs(e?.view),o=r=>wl(e.valueKey,r),a=e.numbersIn??(r=>O(t[o(r)])!==void 0),s=e.followsView??BP(n,a);return oP({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(KO,{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 xP(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?_l(l,{changed:!b,onReset:()=>p(null)}):g(ne,{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",vP={kind:"radius"};function Pl(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:_l(e.mark,{changed:s,onReset:()=>o(null)}),hint:e.hint,children:g(wP,{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(YO,{})},"always")}function un(){let e=Lt();return t=>e?.onChangeMany(t)}function wP({tier:e,px:t,name:n,onRadius:o}){let a=e.useFollowed(),[s,r]=Oe(e.sidesKey),i=un(),l=ts({row:e.row??vP,label:oo,grid:{min:oe,max:Xe,step:e.step??1},valueKey:n??"",view:"desktop"}),u=Le(s)??[...na];return g(MO,{label:c(oo),value:u,corners:$p,onChange:d=>{let f=Le(d)??[];r(f.length===na.length?null:f)},radius:t,onRadiusChange:l&&n?d=>i({[n]:d,...l.unitPatch(d===null)}):o,radiusMin:l?.grid.min??oe,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 CP({label:e,changed:t=!1,onReset:n=()=>{}}){let{cornerRadiusPx:o}=B(),a=typeof o=="number"?`${o}px`:c("not set");return g(ne,{words:P()?.panel,label:c(e),changed:t,detail:o==null?c("the built-in corners"):Bt(a,c("Styles")),onReset:n})}function OP(){let{cornerRadiusPx:e}=B();return typeof e=="number"?e:oe}function PP(){return Pl({sidesKey:"sectionCornerSides",row:zr,useFollowed:OP,mark:g(CP,{label:oo}),hint:kP})}var kP="Follows Styles \u25B8 Basics \u25B8 Corners until you set a number here.";function R4(){return so({_gShape:_e("Shape"),sectionCorners:PP(),...og(zr,"sectionCorners"),sectionCornerSides:ag(),...$e("sectionBorder",FP),...eo(qn,"sectionBorder",{tablet:!0,phone:!0})})}var AP=()=>({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 RP(e){let t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function IP(){let e;try{let t=Pe(B().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Bc.line}function NP({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?LO(l,r):!1),f=AP(),p=m=>RP(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(IO,{each:u,label:c("Each side"),onChange:d}):void 0,children:g(RO,{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??Ba,...i?{step:i.grid.step,units:i.units}:{}})})}function LP({value:e,onChange:t,view:n}){let[o]=Oe("sectionBorder"),[a]=Oe(vl("sectionBorder")),s=IP(),r=p=>p&&typeof p=="object"?p:{},i=n==="phone"?{...Qi(r(o)),...Qi(r(a))}:n==="tablet"?r(o):{},l=Z(),u=un(),d=U("sectionBorder",n),f=ts({row:qn,label:"Border",grid:{min:0,max:Ba,step:1},valueKey:"sectionBorder",view:n,numbersIn:p=>hl(l[wl("sectionBorder",p)]),convertTo:p=>{let m=r(l[d]);return hl(m)?{[d]:DP(m,p)}:{}}});return g(NP,{value:e,length:f,onChange:f?p=>u({[d]:p,...f.unitPatch(!hl(p))}):t,placeholder:{sides:NO(i),style:i.style??"solid",color:i.color||s},presets:[s],above:i})}var sg=["width",...Ha];function hl(e){if(!e||typeof e!="object")return!1;let t=e;return sg.some(n=>O(t[n])!==void 0)}function DP(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 FP(e){return{type:"custom",render:({value:t,onChange:n})=>g(LP,{value:t,onChange:n,view:e})}}function BP(e,t){let n=fl[e];for(;n&&fl[n]!==null&&!t(n);)n=fl[n];return n??e}function I4(e){return{type:"custom",render:()=>g(HP,{partKey:e})}}function HP({partKey:e}){let[t]=Oe("id"),[n]=Oe("_partStyles"),{textStyles:o}=B(),a=QO(),s=null;try{s=qO().select}catch{s=null}let r=n&&typeof n=="object"?n[e]:void 0,i=Array.isArray(o)?o:null;return g(PO,{name:c("Text"),preview:qm(r,i,{noStyle:c("No style"),styleName:a.textStyles.styleName,cases:(a.copy.panel??JO.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(ZO(t,e))}})}function rg(e){let{cornerRadiusPx:t}=B(),n=typeof t=="number"?t:e,o=null;try{let{appState:s,selectedItem:r}=Qa(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 Wr(a)?a:n}function MP({label:e,changed:t=!1,onReset:n=()=>{}}){let o=rg(oe);return g(ne,{words:P()?.panel,label:c(e),changed:t,detail:Bt(`${o}px`,c("the section")),onReset:n})}function UP(){return g(je,{children:c("Follows the section's Corners until you set a number here.")})}function GP(){return Pl({sidesKey:"cardCornerSides",row:Hn,useFollowed:()=>rg(oe),mark:g(MP,{label:oo}),hint:g(UP,{})})}function $P(){return{type:"custom",render:()=>g(Xp,{})}}function N4(){return{_gShape:_e("Shape"),cardCorners:GP(),...og(Hn,"cardCorners"),cardCornerSides:ag(),cardCornersApplyAll:$P()}}function zP(){return it({type:"custom",[ll]:!0,render:e=>g(KP,{...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 WP(e,t){let n=Es(e);if(n!=="custom")return c(Ts.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 KP(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=Es(i),u=a>=2&&a<=Oh,d=()=>[...$O[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=WO().widths.hint(a,GO);return g(K,{label:c(pt),icon:g(qa,{}),changed:y,hint:l!=="custom"?void 0:u?T:b,action:g(ne,{words:P()?.panel,label:c(pt),changed:y,disabled:e.readOnly===!0,detail:s?Ft(S=>c(S),WP(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:Ts.map(S=>({value:S.value,label:S.value==="custom"&&!u?b:c(S.label),icon:cl(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(zO,{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 ie(wc,g(_O,{}),ws,ws[0].value)}function D4(){return ee("mobile",ul(pt,g(qa,{}),Ec.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))})})),xc,{columns:2,cell:lg}))}var lg={width:"5.75rem",height:"3.25rem",words:!0};function F4(){return Sl("share",zP(),Jh)[vl("share")]}function jP(){return ee("mobile",Fe(xs,g(Uh,{}),So,Tc,1,So,"",{clear:{phoneFollows:!1,hint:So}}))}var Ih={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function B4(){let e=Fe(xs,g(Uh,{}),vs,vc,1,vs,"",{clear:{emptyLabel:"Auto"}}),t=Sl("columns",e,{...Ih,tablet:Jh.tablet}),n=Sl("columns",e,Ih,{phoneRow:jP()});return{...t,phoneRow:n.phoneRow}}function H4(e,t,n,o,a,s,r){return{type:"custom",render:({value:i,onChange:l,name:u})=>g(VP,{label:e,min:t,max:n,step:o,fallback:a,role:s,value:i,onChange:l,name:u??"",length:r})}}function VP({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=Hs(u?.view),m=ts({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(li,{noun:s}),action:g(ne,{words:P()?.panel,label:c(e),changed:!bh(r),detail:c("the Text style in Styles"),onReset:()=>b(gh),defaultAction:{onPress:()=>b(Ga),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 Va(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 M4(){return{_gCellWidth:_e("Cell size"),gridSpan:ee("desktop",ie("Positions",g(qa,{}),Va(la,"position","positions"),"")),gridRowSpan:ee("desktop",ie("Rows tall",g(Za,{}),Va(ua,"row","rows"),"")),[ai]:Fe("At card",g(zh,{}),1,si,1,1,""),[rt("gridSpan")]:ee("mobile",ie("Positions",g(qa,{}),[{label:"Full row",value:""},...Va(ca,"position","positions").slice(1)],"")),[rt("gridRowSpan")]:ee("mobile",ie("Rows tall",g(Za,{}),Va(ua,"row","rows"),""))}}function Z(){let e=null,t=null;try{e=Fh(YP),t=Qa(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}var YP=tO(null);function XP({min:e,max:t,step:n,px:o,label:a,onChange:s,desktopKey:r,fallback:i}){let l=Z()[r],u=Ea(void 0,l,i);return g(je,{children:de({min:e,max:t,step:n,value:Ea(o,l,i),readout:!1,ariaLabel:a,notch:u,onChange:s})})}function qP({label:e,desktopKey:t,fallback:n,unit:o="px",changed:a=!1,onReset:s=()=>{}}){let r=Z()[t],i=Ea(void 0,r,n);return g(ne,{words:P()?.panel,label:c(e),changed:a,detail:Ft(l=>c(l),`${i}${o}`),onReset:s})}function ZP(e){return xP(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:g(qP,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>g(XP,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}var JP={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},QP={Top:Tl,Bottom:Wh,Left:Kh,Right:jh},ek=e=>{let t=QP[e];return g(t,{})};function U4(e={}){let t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,a=T=>JP[T],s=T=>Fe(a("Top"),g(Tl,{}),fe.min,fe.max,fe.step,T,"px"),r=(T,S,E,x=fe)=>ee("mobile",ZP({label:a(T),icon:ek(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 G4(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 Ya="Width";function $4(e,t=yh,n=!0){let o=t.map(a=>({label:Nt[a],value:a}));return so({...n?{_gWidth:_e(Ya)}:{},widthMode:{type:"custom",render:({onChange:a,field:s})=>g(K,{label:c(Ya),icon:g(OO,{}),action:n?g(dP,{inherited:s?.inherited??!1,onReset:()=>a(il),label:Ya}):void 0,children:Qn({options:o,value:s?.currentValue||e,onChange:a,ariaLabel:Ya})})}})}function z4({fill:e=!1}={}){let t=(a,s)=>({type:"custom",render:({value:r,onChange:i})=>g(tk,{value:r,onChange:i,view:a,badge:s,fill:e})}),n=()=>yl("sectionHeightMode"),o=()=>yl("sectionHeightMode");return so({_gHeight:_e(Xt),...$e("sectionHeightMode",a=>a==="desktop"?t(a):t(a,s=>g(sk,{view:a,onClear:()=>s(void 0)}))),...$e("sectionHeightValue",n),...$e("sectionHeightUnit",o)})}function tk({value:e,onChange:t,view:n,badge:o,fill:a=!1}){let s=Z(),{mode:r,number:i,unit:l}=nk(n,s,e);return g(K,{label:Xt,icon:Dt(g(Za,{})),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(ak,{view:n,mode:r,menu:l}):null]})})}function cg(e,t){return e==="phone"&&vo(t)?hu(t):fu(t)}function ns(e,t){return e==="desktop"||(e==="tablet"?vo(t):mu(t))?null:cg(e,t)}function nk(e,t,n){let o=(a=>cu.includes(a))(n)?n:ns(e,t)?.mode??"auto";return{mode:o,number:o!=="auto"&&o!=="fill",unit:o==="fixed"}}function ok(e,t,n,o){let a=ns(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=ns(e,Z());return!o||!a?{followed:null,write:n}:{followed:a,write:s=>o.onChangeMany(r=>{let i=ok(e,r,t,s);return i===null?{[U(t,e)]:s}:Object.keys(i).length?i:null})}}function ak({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(uu,"px",l?l.unit:f),m=p==="%"?pu:du,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 sk({view:e,onClear:t}){let n=Z(),o=ns(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(ne,{words:P()?.panel,label:c(Xt),changed:o,detail:r,onReset:t})}function W4(e={}){let t=e.intro===!0,n=s=>({type:"custom",render:({value:r,onChange:i,id:l,name:u})=>g(pk,{value:r,onChange:i,labelId:`${l??u??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:r,onChange:i})=>g(ck,{value:r,onChange:i,view:s,intro:t})}),a=s=>({type:"custom",render:({value:r,onChange:i})=>g(uk,{value:r,onChange:i,view:s,intro:t})});return{_gStick:_e(Qm,{dot:t?lk:Xi}),...$e("stickTop",n),...$e("stickTopDistance",o),...eo(Yn,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?$e(Xn,a):{},...t?{}:{[ji]:rk()},...t||e.above===!1?{}:{[Yi]:ik()}}}function rk(){let e=ie(eh,g(Tl,{}),th,nh);return ee("desktop",{...e,render:t=>{let n=e.render({...t,value:Vi(t.value),onChange:o=>t.onChange(ah(o))});return _l(n,{hint:c(oh)})}})}function ik(){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 lk={any:[Xi,ih]};function ug(e,t,n,o,a){let s=Lt(),r=Z(),i=e==="desktop"||ao(e,r)?null:kl(e,fn(r,{intro:o}));return{followed:i,write:(i||a)&&s?l=>s.onChangeMany(u=>{let d=dk(e,u,l,t,o),f=d===null?{[U(t,e)]:l}:d;return Object.keys(f).length?{...f,...a?.(l)??{}}:null}):n}}function ck({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=ts({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[wl("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 uk({value:e,onChange:t,view:n,intro:o}){let{followed:a,write:s}=ug(n,Xn,t,o);return g(K,{label:c(Ki),icon:Dt(g(Za,{})),children:de({min:ja.min,max:ja.max,step:ja.step,value:a?null:O(e)??ja.default,...a?{placeholder:a.screens}:{},ariaLabel:c(Ki),onChange:s})})}function ao(e,t){return e==="tablet"?qi(t):Zi(t)}function kl(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 dk(e,t,n,o="stickTopDistance",a=!1){if(e==="desktop"||ao(e,t))return null;if(n===void 0)return{};let s=kl(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 pk({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:kl(o,r),d=u?.on?M(u.distance,u.unit):c("Off");return g(K,{label:c(Wi),labelId:n,icon:Dt(g(Vh,{})),action:We(je,{children:[o!=="desktop"?g(ne,{words:P()?.panel,label:c(Wi),changed:ao(o,s),detail:Ft(f=>c(f),d,l?"tablet":"desktop"),onReset:()=>t(void 0)}):null,g(El,{checked:i,onChange:t,ariaLabelledBy:n})]})})}var Lh="e.g. about";function K4(){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 j4(){return{_gAdvanced:_e("Advanced"),[nu]:Al}}var Al={type:"custom",render:({value:e,onChange:t})=>g(K,{label:c("Custom CSS"),icon:Dt(g(FO,{})),children:g(jO,{"aria-label":c("Custom CSS"),spellCheck:!1,autoGrow:!0,className:"font-mono",value:typeof e=="string"?e:"",onChange:n=>t(n.target.value)})})};function V4(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(UO,{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({},{...Ja,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(El,{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(ne,{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(fk,{label:"Background",icon:g(xO,{}),id:a,value:e,shown:ci(e),onChange:t})}}}function Y4(e,t,n){return{type:"custom",render:({value:o,onChange:a})=>g(be,{label:c(e),icon:n,value:o||t,onChange:a})}}function fk({label:e,icon:t,id:n,value:o,shown:a,onChange:s}){let{colors:r,n:i}=Il(),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:Rl(l??"",r,i,s)})}function X4(){return{type:"custom",render:e=>{let{value:t,onChange:n}=e,o=e;return g(mk,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Rl(e,t,n,o){let a=ba(e);return wu(t,n).map(s=>({label:s.label,color:s.value,selected:a===s.name,onPick:()=>o(s.name)}))}function mk({value:e,onChange:t,twin:n}){let{colors:o,n:a}=Il(),s=o.background,r=Bt(s.toUpperCase(),c("Theme {n} background",{n:a})),[i,l]=Oe(Mf),[u]=Oe(pi),d=typeof u=="string"&&u.trim()!=="",f=ha(i),p=v=>l(ha(v)||void 0),m=ba(e),b=m?qt(m,o,a):null,y=Rl(e,o,a,t),T=n?()=>t(void 0):()=>t(""),S=s,E=r;if(n){let v=ba(n.follows),w=ga(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(hk,{value:f,onChange:p}):null;return b?g(be,{label:c("Fill"),icon:g(bl,{}),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(bl,{}),value:e,inherited:S,resetTo:E,onChange:t,onReset:T,choices:y,children:x})}function hk({value:e,onChange:t}){return Qn({options:ma.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:c("Fill")})}function gk(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(Bs(n));if(a!==null)return a;for(let s=o.length-1;s>0;s-=1){let r=gt(Bs(o[s].sectionAccent));if(r!==null)return r}return gt(o[0].sectionAccent)}function Il(){let e=Pe(B().theme),[t]=Oe("sectionAccent"),n=null;try{let{appState:a,selectedItem:s}=Qa(i=>i),r=s?.props?.id?String(s.props.id):void 0;n=r?gk(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 q4(){return ng()}var Z4={top:g(yO,{}),right:g(bO,{}),bottom:g(hO,{}),left:g(gO,{})};function J4(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:nP(c,{label:e,value:m,onChange:p,points:d})})}}}function Q4(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 bk={image:"Image",video:"Video"},eK=Cr.map(e=>({label:bk[e],value:e}));function tK(e,t,n){let o=Object.keys(Pr).map(a=>({label:Pr[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(Sk,{label:e,icon:t,options:o,onChange:a})}}function yk(e,t,n){let o=pp(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=dp(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 Sk({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=Qa(f=>f.appState.data)}catch{u=null}let d=Gp(a?.id,u,l);return g(K,{label:c(e),icon:Dt(t),hint:yk(s,d,i?.hasUnsavedEdits??!1),children:Qn({options:n,value:r,onChange:o,ariaLabel:e})})}function nK(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 oK={HeroSingle:[rp.image],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function _k(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(eP()).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(xl,{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(vO,{})})}):void 0,children:l&&o.status?g(fa,{compact:!0,oneLine:!0,spaced:!1,status:r?"busy":o.ok&&!i?"found":"notfound",statusText:r?c("Finding\u2026"):i?c(gi):c(o.status),hint:_k(o)}):null}),g(K,{label:c("Enter by hand"),labelId:u,icon:g(SO,{}),action:g(El,{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 Tk(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Ek(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 xk(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 aK={label:"Ticker items",icon:g(EO,{})};function sK(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(vk,{label:e,icon:Dt(t),items:Array.isArray(a)?a:[],placeholder:n,onChange:s,markup:o==="markup"})}}function vk({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=xk(n,f,i);p===null&&(r.current=null),l(p),a(u(f))};return g(DO,{label:c(e),icon:t,noun:c("item"),items:n,onChange:d,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?g(bi,{target:r,value:Tk(n,i),onChange:f=>a(Ek(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 rK(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 iK(e){return{_gCards:_e("Cards"),coverIndex:ie("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:EP("Image background",Ua),cardImage:mg()}}function lK(){return{outline:ie("Card outline",g(wO,{}),sm,am),indexBadge:ie("Card number",g(zh,{}),_i,Si),showBadge:lt("Product badge",!0,g(li,{noun:"tag"}))}}function cK(e){let t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=a=>({...Ja,label:Xa.find(s=>s.id===a).label}),o=a=>it(yl(gl),n(a));return{_gShowOnCard:_e("Show on a card"),[gl]:it({type:"custom",render:()=>g(wk,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(gl)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}var gl="showCardPrice",Xa=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function wk({rest:e}){let t=Z(),n=un(),o=r=>typeof t[r]=="boolean"?t[r]:void 0,a=r=>o(r)??e[r],s=Xa.some(({id:r})=>o(r)!==void 0&&o(r)!==e[r]);return g(Nl,{parts:Xa,changed:s,shown:a,onPress:(r,i)=>n({[r]:i}),onReset:()=>n(Object.fromEntries(Xa.map(({id:r})=>[r,void 0])))})}function uK(e,t="display"){let n=rt(t);return{[t]:ee("desktop",{type:"custom",render:({value:o,onChange:a})=>g(Nl,{parts:e,changed:jf(o),shown:s=>Sa(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(Ck,{parts:e,desktopKey:t,value:o,onChange:a})})}}function Nl({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(ne,{words:P()?.panel,label:i,changed:t,detail:s,onReset:a}),children:g(BO,{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 Ck({parts:e,desktopKey:t,value:n,onChange:o}){let a=Z()[t];return g(Nl,{parts:e,changed:Vf(n),shown:s=>hi(a,n,s),onPress:(s,r)=>o(Xf(n,s,r)),onReset:()=>o(xa),detail:c("the same as Desktop")})}function mg(e=rf){return Fe("Card image",g(Gh,{}),oe,Xe,sf,oe,e,{clear:{hint:oe},hint:"Rounds the picture. The card's own corner is in Styles."})}function Ok(){return eo(Qr,"cardImage")}function dK(){return{cardImage:mg(Qr),...Ok()}}function pK(){return Pl({sidesKey:"cornerSides",row:lf,step:cf,useFollowed:()=>oe,mark:g(Pk,{label:uf}),hint:c("Rounds the picture. Left alone it stays square.")})}function Pk({label:e,changed:t=!1,onReset:n=()=>{}}){return g(ne,{words:P()?.panel,label:c(e),changed:t,onReset:n})}function fK(){return{type:"custom",render:({value:e,onChange:t})=>g(Ik,{value:typeof e=="string"?e:"",onChange:t})}}var Dh="own";function mK(){let e=[{value:Dh,label:"Layout's own",picture:pl(Array.from({length:8},()=>[3,1]))},...Object.entries(ia).map(([t,n])=>({value:t,label:n.label,picture:pl([...n.phone,...n.phone])}))];return ee("mobile",ul("Layout",g($h,{}),e,Dh,{columns:2,cell:vh}))}function kk({layout:e,width:t}){let n=oi(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 Ak={width:"3.5rem",height:"2.5rem",words:!1},Rk=200;function Ik({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>=Rk?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=ti(n,l),d=ti(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(kk,{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:Ak,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(AO,{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:ei.length})})]})})})})}var Fk="Applies to panels, cards, inputs and buttons. Round things \u2014 color swatches, switches, status dots \u2014 stay round.",Ll="Corners";function hg({value:e,onChange:t,length:n}){let o=e===null;return os(Lk,{label:c(Ll),icon:os(Dk,{}),changed:!o,action:os(Nk,{words:P()?.panel,label:c(Ll),changed:!o,detail:c("the built-in corners"),onReset:()=>t(null)}),hint:c(Fk),children:os(de,{min:n?.grid.min??oe,max:n?.grid.max??Xe,step:n?.grid.step??1,value:e,...e===null?{}:{suffix:n?.unit??"px",...n?{units:n.units}:{}},placeholder:oe,placeholderWord:"Auto",onClear:()=>t(null),ariaLabel:c(Ll),onChange:t})})}import{jsx as ro}from"react/jsx-runtime";import{SettingsDefaultReset as Bk,SettingsField as Hk}from"efficient-easel/panel";import{IconPicker as Mk}from"efficient-shell/ui";import{ShadowIcon as Uk}from"efficient-easel/icons";import{SHADOW_PREVIEW as Gk}from"efficient-easel/screen/lib/document/shadow-values";var Dl={none:"None",soft:"Soft",lifted:"Lifted"},$k="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??Ds;return ro(Hk,{label:c("Card shadow"),icon:ro(Uk,{}),value:c(Dl[o]),changed:!n,action:ro(Bk,{words:P()?.panel,label:c("Card shadow"),changed:!n,detail:c(Dl[Ds]),onReset:()=>t(null)}),hint:c($k),children:ro(Mk,{label:c("Card shadow"),value:o,options:Yc.map(a=>({value:a,label:c(Dl[a]),icon:ro("span",{className:"sf-shadow-chip border border-line bg-surface",style:{boxShadow:Gk[a]}})})),onChange:t})})}import{jsx as bg}from"react/jsx-runtime";import{ShadowIcon as zk}from"efficient-easel/icons";import{DEFAULT_SHADOW_COLOR as yg}from"efficient-easel/screen/lib/document/shadow-values";var Wk="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(zk,{}),value:e??"",inherited:yg,resetTo:yg,onChange:t,onReset:()=>t(null),hint:c(Wk)})}import{jsx as ss}from"react/jsx-runtime";import{SettingsDefaultReset as Kk,SettingsField as jk}from"efficient-easel/panel";import{AlignSeparateIcon as Vk}from"efficient-easel/icons";function as(e,t){return e==="tablet"?null:e==="mobile"?t.phone:t.desktop}var Yk="The space between the blocks inside a row, a grid or a box. Auto means each one keeps the spacing it already has.",Xk="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.",Fl="Block gap",_g=Zt.Grid;function Tg(e,t){return as(e,{desktop:{key:"block_gap",value:t.gap,followsPx:null},phone:{key:"block_gap_phone",value:t.phone,followsPx:t.gap===null?null:Gs(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 ss(jk,{label:c(Fl),labelId:"sf-block-gap",icon:ss(Vk,{}),changed:!s,action:ss(Kk,{words:P()?.panel,label:c(Fl),changed:!s,detail:r??c("each block's own spacing"),onReset:()=>t(null)}),hint:c(r===null?Yk:Xk),children:ss(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(Fl),onChange:t})})}import{jsx as rs}from"react/jsx-runtime";import{SettingsDefaultReset as qk,SettingsField as Zk,SettingsSegmented as Jk}from"efficient-easel/panel";import{HoverIcon as Qk}from"efficient-easel/icons";var Bl={none:_s.none,lift:_s.lift,highlight:yc},eA="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??Fs;return rs(Zk,{label:c("Hover effect"),icon:rs(Qk,{}),value:c(Bl[o]),changed:!n,action:rs(qk,{words:P()?.panel,label:c("Hover effect"),changed:!n,detail:c(Bl[Fs]),onReset:()=>t(null)}),hint:c(eA),children:rs(Jk,{options:Xc.map(a=>({id:a,label:c(Bl[a])})),value:o,ariaLabel:c("Hover effect"),onChange:t})})}import{jsx as is}from"react/jsx-runtime";import{SettingsDefaultReset as tA,SettingsField as nA,SettingsSegmented as oA}from"efficient-easel/panel";import{DropIcon as aA}from"efficient-easel/icons";var Hl="Photography",vg={shot:"As shot",mono:"Black and white"},Ml=[{grayscale:!1,label:vg.shot},{grayscale:!0,label:vg.mono}],sA="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 is(nA,{label:c(Hl),icon:is(aA,{}),value:c(Ml.find(a=>a.grayscale===o).label),changed:!n,action:is(tA,{words:P()?.panel,label:c(Hl),changed:!n,detail:c(Ml.find(a=>!a.grayscale).label),onReset:()=>t(null)}),hint:c(sA),children:is(oA,{options:Ml.map(a=>({id:a.grayscale,label:c(a.label)})),value:o,ariaLabel:c(Hl),onChange:t})})}import{jsx as Ul}from"react/jsx-runtime";import{useId as rA}from"react";import{SettingsField as iA,SettingsSwitch as lA}from"efficient-easel/panel";import{ShareIcon as cA}from"efficient-easel/icons";var uA="Share button",dA="On every blog post.";function Cg({value:e,onChange:t}){let n=rA();return Ul(iA,{label:c(uA),labelId:n,icon:Ul(cA,{}),action:Ul(lA,{checked:e===!0,onChange:t,ariaLabelledBy:n}),hint:c(dA)})}import{usePreviewDevice as ac}from"efficient-easel/draw/client";import{jsx as ls}from"react/jsx-runtime";import{SettingsDefaultReset as pA,SettingsField as fA}from"efficient-easel/panel";import{PaddingXIcon as mA}from"efficient-easel/icons";var Gl="Side space",Og=re.default,hA="The room left at the left and right edge of every page.";function Pg(e,t){return as(e,{desktop:{key:"site_gutter",value:t.gutter,unsetPx:Og,bounds:re},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=re,length:a,restsOn:s=n}){let r=e===null;return ls(fA,{label:c(Gl),labelId:"sf-side-space",icon:ls(mA,{}),changed:!r,action:ls(pA,{words:P()?.panel,label:c(Gl),changed:!r,detail:`${n}px`,onReset:()=>t(null)}),hint:c(hA),children:ls(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(Gl),onChange:t})})}import{jsx as $l}from"react/jsx-runtime";import{BACKGROUND_WIDTHS as _j,SettingsBackgroundWidth as gA,SettingsContentWidth as bA}from"efficient-easel/panel";var yA="Background width",SA="Content width";var cs=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 $l(gA,{value:e,changed:t,detail:n,onChange:o,onReset:a,hint:s?c(s):void 0,labelId:r,words:{label:c(yA),full:cs("full"),content:cs("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(SA),b=p?.grid.min??o,y=p?.grid.max??n,T=e!=="full"?$l(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 $l(bA,{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:cs("full"),content:cs("content")},resetWords:P()?.panel})}import{jsx as Lg}from"react/jsx-runtime";import{TextStyleItem as _A,TextStylesGroup as TA}from"efficient-easel/text-styles";var Dg=["font","size","weight","emphasis"],EA=500;function xA({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 vA(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=xA(e);return Lg(TA,{label:c("Emphasis"),children:Lg(_A,{style:r,fonts:wr,settings:s?Dg.filter(i=>i!=="size"):Dg,auto:["size"],fallback:()=>({weight:t??EA}),open:n,onOpenChange:o,onChange:i=>vA(r,i).forEach(a)})})}import{viewKeyAt as Gg}from"efficient-easel/draw";import{shownUnitAt as AA,unitKeyOnWrite as RA}from"efficient-easel/screen/lib/content/length-units";import{convertRowLength as wA,rowUnits as CA,unitPickPatch as OA}from"efficient-easel/screen/lib/content/length-units";import{viewKeyAt as PA}from"efficient-easel/draw";var kA=["cornerRadius","siteWidth","siteGutter","siteGutterPhone","blockGap","blockGapPhone"],us={cornerRadius:{number:"corner_radius_px",kind:"radius",grid:jc,tier:"desktop"},siteWidth:{number:"site_width",kind:"size",grid:V,tier:"desktop"},siteGutter:{number:"site_gutter",kind:"spacing",grid:re,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 ds(e){return{number:us[e].number,unit:Fc[`${e}Unit`]}}function Bg(e,t,n){let o=F(n),{number:a,unit:s}=ds(e);return{[a]:t,[s]:t===null||o==="px"?null:o}}function ps(e,t,n,o){let{kind:a,grid:s,tier:r}=us[e],i=F(n),l=F(o),u=s.typedMax,d=u!==void 0&&l==="px"?{...s,max:u}:s;return i===l?t:wA(t,i,l,r,{kind:a},d)}function Hg(e,t,n,o){let{number:a,unit:s}=ds(e),r=OA({[a]:t},i=>ps(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}=us[e];return Lc(n,F(t),o)}function Ug(e){return CA({kind:us[e].kind},Jn)}function zl(e,t){let n=PA(e,t);if(!kA.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=AA({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=RA(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[ds(e).number]),o(T,!0)},m=a?a.unit===u?a.figure:ps(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=>ps(e,b,"px",u)}}import{EmptyState as RR,SliderGroup as IR,Tabs as NR,Tooltip as eY,tabButtonId as LR,tabPanelId as DR}from"efficient-shell/ui";import{ContrastIcon as FR,SettingsIcon as BR,TypeIcon as HR}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 gs}from"react/jsx-runtime";import{ListIcon as mR,PaddingTopIcon as hR,PaddingXIcon as gR}from"efficient-easel/icons";import{jsx as fs}from"react/jsx-runtime";import{SettingsDefaultReset as IA,SettingsField as NA,SettingsSegmented as LA}from"efficient-easel/panel";import{WidthIcon as DA}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 fs(NA,{label:u,labelId:a,icon:fs(DA,{}),value:i?s:void 0,changed:!i,action:fs(IA,{words:P()?.panel,label:u,changed:!i,onReset:()=>n(void 0)}),hint:r,children:fs(LA,{options:[{label:c(Nt.full),id:"full"},{label:c(Nt.page),id:"content"}],value:l,ariaLabel:u,onChange:n})})}import{group as bR}from"efficient-easel/screen/lib/document/box-fields";import{jsx as ct}from"react/jsx-runtime";import{ColumnsIcon as VA,HeadquartersIcon as YA,HeightIcon as XA,LayoutIcon as qA,LocationIcon as ZA,MapIcon as JA,SearchIcon as QA,ThemeIcon as eR}from"efficient-easel/icons";import{group as Vl}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as Sn}from"efficient-easel/screen/lib/document/device-fields";import{jsx as Kl}from"react/jsx-runtime";import{ListIcon as FA}from"efficient-easel/icons";import{NoControlMark as BA,noControlField as HA}from"efficient-easel/screen/lib/document/panel-no-control-mark";function Zg(e,t){return ie(e,Kl(FA,{}),[{label:t,value:""}],"")}var MA="_sourceEdit";function c3(){return HA({type:"custom",render:()=>Kl(BA,{})},"always")}var Wg=new Map,Kg=new WeakMap,jg=(e,t)=>({type:"custom",render:()=>Kl(fa,{compact:!0,status:"ok",hint:c("Where this content is edited."),edit:{label:e,onClick:t}})});function UA(e){if(ic(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,Wl={},Xg=new WeakMap;function Jg(e,t,n){return cc(e).filter(o=>!o.records||o.key===t||n!==null&&o.records.includes(n))}function GA(e,t,n,o){Yg!==mo()&&(Yg=mo(),Wl={});let a=Vg.get(t);(!a||Xg.get(a)!==Wl)&&(a=new Map,Xg.set(a,Wl),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,$A={not:{field:Ve,set:!0}};function Qg(e,t,n,o={}){let a=t[Ve];if(!a)return t;let s=dc(n),r=nf(o.root),i=Jg(e,s,r).length>0||s!=="",l=i?GA(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?uc(s)?.edit:void 0,b={};for(let[y,T]of Object.entries(t))y===Ve?l&&(b[y]=l):y===MA?m&&(b[y]=UA(m)):b[y]=p.has(y)&&T&&typeof T=="object"?le(T,$A):T;return u.set(d,b),b}import{createContext as zA,useContext as WA}from"react";var eb=zA(null),f3=eb.Provider,m3=()=>WA(eb);function h3(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 KA(e){return e===null||!Number.isFinite(e)?"":e<10?`${e.toFixed(1)} km`:`${Math.round(e)} km`}function g3(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?KA(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 jA=[{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:jA};function b3(e){return[e.name,e.city].filter(Boolean).join(", ")}var S3={text:"Button label",href:"#"},_3=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 ms={sectionNumber:lo.sectionNumber,heading:`${lo.heading}
|
|
7
|
-
*${lo.accent}*`,tagline:lo.body},jl=pc.Footprint,w3={label:"Locations Map",fields:jl,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:""},Yl={field:zt,is:ft,default:ft},tR={field:zt,is:"list",default:ft},nR={field:zt,is:"map",default:ft},ab={all:[Yl,{field:"listPosition",in:["left","right"],default:"below"}]},sb={any:[{all:[ob,{not:nR}]},ab]},oR={any:[{all:[Yl,{field:"listPosition",is:"below",default:"below"}]},tR]},nb={all:[sb,{field:"search",is:!0,default:!1}]};lc([tb,kp]);async function Xl(e){return Ta(e)?Zf(e,t=>[t.address,t.city,t.country].map(n=>String(n??"").replace(/\*/g,"").trim()).filter(Boolean).join(", ")):e}var aR={fields:{_gContent:Vl("Section"),sectionNumber:es("Section number",ms.sectionNumber),heading:Ol("Heading",ms.heading),tagline:Ol("Body",ms.tagline),_gOffices:Vl("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(YA,{})),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"},...jl,[zt]:bn("Shows",ct(JA,{}),[{label:"Map and list",value:ft},{label:"Map only",value:"map"},{label:"List only",value:"list"}],ft),mapTheme:bn("Map theme",ct(eR,{}),[{label:"Auto",value:"auto"},{label:"Dark",value:"dark"},{label:"Light",value:"light"}],_o.mapTheme),_gList:Vl("List"),listPosition:Sn("desktop",le(bn("Position",ct(qA,{}),[{label:"Left",value:"left"},{label:"Right",value:"right"},{label:"Below",value:"below"}],"below"),Yl)),listColumns:Sn("desktop",le(bn("Columns",ct(VA,{}),[{label:"Auto",value:ks},...Rc.map(e=>({label:String(e),value:String(e)}))],ks),oR)),[kc]:Sn("desktop",le(bn("Map height",ct(XA,{}),[{label:"Fixed",value:Ps},{label:"Full height",value:Ac}],Ps),ab)),search:Sn("desktop",le(lt("Search",!1,ct(QA,{})),sb)),searchHint:Sn("desktop",le(Cl(es("Hint","Type a postcode or address")),nb)),noMatchText:Sn("desktop",le(Cl(es("No match","No place found. Try another postcode.")),nb)),showDistance:le(lt("Distance",!0,ct(ZA,{})),ob)},resolveData:async(e,t)=>{let n=t?.changed,o=e.props;if(n?.listPosition===!0||n?.[zt]===!0||n?.[Ve]===!0){let i=Ic(o);i!==o&&(e={...e,props:i})}let a=e.props,s=a.offices??[],r=await Xl(s);return r===s?e:{...e,props:{...a,offices:[...r]}}},resolveFields:(e,{fields:t})=>Oc(Qg("Footprint",t,e.props,{hides:["offices"]}),e.props.headPlacement,Cc.Footprint.headRows)},rb=aR.fields.offices;var hs=null;function W3(e){hs=e}function K3(){return!!(hs&&hs.state().lockHolder)}function ql(){return hs!==null}import{BUCKET_KEY as yR}from"efficient-easel/screen/lib/document/field-buckets";import{HEADER_TYPE as Zl,FOOTER_TYPE as sR}from"efficient-easel/draw";import{parseOption as rR}from"efficient-shell/format";var iR=new Set(["Hero","HeroSingle","IntroBleed"]),ib={min:56,max:140,default:88},X3={min:0,max:120,step:2,default:32},q3=`var(--sf-header-h, ${ib.default}px)`,lR="--sf-header-set-h",Z3="--sf-header-h",J3=`var(${lR}, ${ib.default}px)`,Q3="sf-header-clearance",eV="sf-sticky-underheader";function cR(e){return e?.find(t=>t?.type&&t.type!==Zl)??null}function lb(e){let t=cR(e)?.type;return!t||!iR.has(t)}function tV(e){return!lb(e)}function nV(e){return!!e?.some(t=>t?.type===Zl)}function oV(e){return!e||e.length===0?!1:!e.some(t=>t?.type===Zl||t?.type===sR)}var uR=["auto","shared","own"],Jl="auto",dR="topSpace",aV="data-top-space";function pR(e){return rR(uR,Jl,e)}function fR(e,t){let n=pR(e?.props?.[dR]);return n==="own"?!0:n==="shared"?!1:lb(t)}function sV(e,t){return fR(e,t)?"own":null}function SR(){return{type:"custom",render:({value:e,onChange:t})=>gs(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 _R=[{label:"Auto",value:"auto"},{label:"Shared",value:"shared"},{label:"Its own",value:"own"}],wV={pageBackground:dg(),topSpace:ie("Top space",gs(hR,{}),_R,Jl),widthChoice:SR()},fb=["pageBackground","topSpace","widthChoice"],TR="Record type",Ql=new Map,cb=-1;function ER(e){cb!==Xr()&&(Ql.clear(),cb=Xr());let t=Yr(),n=t.some(a=>a.key===e)?"":e,o=Ql.get(n);return o||(o=ie(TR,gs(mR,{}),[...t.map(a=>({label:a.label,value:a.key})),...n?[{label:n,value:n}]:[]],at),Ql.set(n,o)),o}var ub=new WeakMap;function CV(e,t){if(!Un()||Yr().length<2||oa in e)return e;let n=ER(Mn(t)),o=ub.get(e);if(o&&o.row===n)return o.fields;let a={[oa]:n,...e};return ub.set(e,{row:n,fields:a}),a}var xR="On: the site's Side space is counted once at each edge of every page. Off: as before.",vR=lt("Count side space once",!1,gs(gR,{}),xR),ec={_gWebsite:bR("Website"),[wt]:vR,[tt]:rb,[Dn]:Al},db=new WeakMap;function OV(e,t){if(t?.kind!==ki||wt in e)return e;let n=db.get(e);return n||(n={...e,...ec},db.set(e,n)),n}function PV(e){if(!ql()||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===wR&&!n&&(Object.assign(t,ec),n=!0),t[o]=a;n||Object.assign(t,ec),pb.set(e,t)}return t}var wR=yR.Animation,pb=new WeakMap;function kV(e){return ql()?mb(e):e}function mb(e){let t=e?.props;if(!t||!Array.isArray(t[tt]))return e;let n=t[tt];return Ta(n)?Xl(n).then(o=>({...e,props:{...t,[tt]:[...o]}})):e}function AV(e){return e?.props?.kind===ki?mb(e):e}import{previewFrame as MR}from"efficient-easel/screen/lib/document/preview-dom";import{pictureShadowColor as UR}from"efficient-easel/screen/lib/document/shadow-values";var nc="sf-site-styles",GR="sf-site-styles-tabpanel",hY="text",bb="basics",hb="this-page-group",bs=[{id:bb,label:"Basics",icon:N(BR,{})},{id:"theme",label:"Theme",icon:N(FR,{})},{id:"text",label:"Text",icon:N(HR,{})}];function $R({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(op,{value:e?i.theme:a,onChange:l})}function zR({themeFromDocument:e,persist:t}){let[n,o]=oc(null),{theme:a,setFonts:s,setSizes:r,setHeadingTypography:i}=B(),l=Jd({themeFromDocument:e,persist:t}),{old:u,saved:d,writeRoot:f}=l,p=l.fonts,m=l.sizes,b=l.typography,y=jR,T=C=>l.write(C),S=qd(a),E=Zd(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(Vd,{saved:d,old:u,colours:S,colourNameOf:E,sizeOf:y,onChange:T,openId:n===tc?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===tc,onOpenChange:C=>o(C?tc: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 tc="accent",WR={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},KR={heading:32,body:14};function jR(e){return e.values.size??YR(j(WR,e.id)??"body")??KR[e.kind]}var VR={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 YR(e){if(typeof document>"u")return null;let t=(MR()?.contentDocument??document).querySelector(VR[e]);if(!t)return null;let n=parseFloat(getComputedStyle(t).fontSize);return Number.isFinite(n)?n:null}function XR({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?Vc[Kc(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 qR({persist:e}){let{siteWidth:t,setSiteWidth:n,sectionBackgroundWidth:o,setSectionBackgroundWidth:a,sectionContentWidth:s,setSectionContentWidth:r}=B(),i=ac(),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 ZR({persist:e}){let{siteGutter:t,siteGutterPhone:n,setSiteGutter:o,setSiteGutterPhone:a,siteLengthUnits:s}=B(),r=Pg(ac(),{gutter:t,phone:n,gutterUnit:s.siteGutterUnit}),i=r?.key==="site_gutter_phone",l=io(zl("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 JR({persist:e}){let{blockGap:t,blockGapPhone:n,setBlockGap:o,setBlockGapPhone:a,siteLengthUnits:s}=B(),r=Tg(ac(),{gap:t,phone:n}),i=r?.key==="block_gap_phone",l=r?.followsPx==null?null:{figure:r.followsPx,unit:F(s.blockGapUnit)},u=io(zl("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 QR({persist:e}){return Ut(_n,{children:[N(qR,{persist:e}),N(ZR,{persist:e}),N(JR,{persist:e})]})}function eI(e){return{card_shadow:e}}function tI(e){return e===null?{shadow_color:null}:{shadow_color:UR(e)}}function nI(e){return{hover_effect:e}}function oI({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(eI(i),!0)}}),N(Sg,{value:o,onChange:i=>{a(i),e(tI(i),i===null)}}),N(xg,{value:s,onChange:i=>{r(i),e(nI(i),!0)}})]})}function aI(e){return{photography_grayscale:e}}function sI({persist:e}){let{photographyGrayscale:t,setPhotographyGrayscale:n}=B();return N(wg,{value:t,onChange:o=>{n(o),e(aI(o),!0)}})}function rI({persist:e}){return N(_n,{children:N(sI,{persist:e})})}function iI(e){return{share_button_on_posts:e}}function lI({persist:e}){let{shareButtonOnPosts:t,setShareButtonOnPosts:n}=B();return N(Cg,{value:t,onChange:o=>{n(o),e(iI(o),!0)}})}function gY(){let{websiteName:e}=B();return e?.trim()||Su}function bY({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]=oc(r??bs[0].id),p=a!==void 0,m=p?a:d,b=p?s??(()=>{}):f,y=bs.find(T=>T.id===m)??bs[0];return Ut(IR,{children:[N(dI,{activeId:y.id,onSelect:b}),Ut("div",{id:DR(nc,y.id),className:GR,role:"tabpanel","aria-labelledby":LR(nc,y.id),children:[m===bb&&Ut(_n,{children:[N(XR,{themeFromDocument:e,persist:u}),!e&&N(oI,{persist:u}),!e&&N(QR,{persist:u}),!e&&N(rI,{persist:u}),!e&&N(lI,{persist:u}),N(cI,{reveal:i,onRevealed:l})]}),m==="theme"&&N($R,{themeFromDocument:e,persist:u}),m==="text"&&N(zR,{themeFromDocument:e,persist:u})]})]})}function cI({reveal:e,onRevealed:t}){let[n,o]=oc(!0),a=AR(t);return a.current=t,kR(()=>{if(!e)return;o(!0);let s=requestAnimationFrame(()=>{document.getElementById(hb)?.scrollIntoView({block:"start"}),a.current?.()});return()=>cancelAnimationFrame(s)},[e]),N(PR,{title:c("This page"),open:n,onToggle:o,id:hb,children:N(uI,{})})}function uI(){let{fields:e,values:t,readOnly:n,onChange:o}=CR(),a=Object.fromEntries(fb.filter(s=>s in e).map(s=>[s,e[s]]));return Object.keys(a).length===0?N(RR,{variant:"none",icon:!1,message:c("This page has no look of its own to set.")}):N(OR,{fields:a,values:t,onChange:o,readOnly:n,tabs:!1,idPrefix:"this-page",ariaLabel:c("This page")})}function dI({activeId:e,onSelect:t}){return N("div",{className:"es-insp-tabs",children:N(NR,{variant:"underline",block:!0,labelsFit:!0,"aria-label":c("Styles"),idPrefix:nc,value:e,onChange:t,items:bs.map(n=>{let o=c(n.label);return{id:n.id,icon:n.icon,label:o}})})})}export{Ee as a,f0 as b,mI as c,P as d,hI as e,gI as f,c as g,xn as h,V as i,eT as j,Dr as k,eD as l,yp as m,oD as n,re as o,Ne as p,ve as q,et as r,sD as s,sT as t,rD as u,Fr as v,iD as w,lD as x,cD as y,iT as z,uD as A,dD as B,pD as C,fD as D,Tp as E,mD as F,Ep as G,hD as H,gD as I,vp as J,wp as K,Cp as L,gT as M,bT as N,_D as O,ED as P,xD as Q,vD as R,wD as S,yh as T,Nt as U,wC as V,f$ as W,CC as X,m$ as Y,te as Z,h$ as _,OC as $,g$ as aa,b$ as ba,y$ as ca,S$ as da,_$ as ea,T$ as fa,gn as ga,E$ as ha,x$ as ia,ei as ja,ni as ka,df as la,oi as ma,hE as na,kB as oa,la as pa,Sf as qa,ca as ra,gE as sa,bE as ta,NB as ua,LB as va,DB as wa,yE as xa,FB as ya,ai as za,BB as Aa,HB as Ba,MB as Ca,UB as Da,GB as Ea,$B as Fa,zB as Ga,WB as Ha,KB as Ia,SE as Ja,Cr as Ka,rp as La,H_ as Ma,yL as Na,ip as Oa,M_ as Pa,SL as Qa,lp as Ra,U_ as Sa,_L as Ta,N2 as Ua,Xn as Va,sC as Wa,ji as Xa,pn as Ya,Yi as Za,L2 as _a,D2 as $a,F2 as ab,Xi as bb,ih as cb,B2 as db,Le as eb,zr as fb,bF as gb,Ct as hb,K2 as ib,j2 as jb,V2 as kb,Y2 as lb,X2 as mb,Vn as nb,Bi as ob,Lw as pb,Ni as qb,Hi as rb,jm as sb,Mi as tb,Bw as ub,u2 as vb,Aa as wb,d2 as xb,Hw as yb,Mw as zb,p2 as Ab,Uw as Bb,Mm as Cb,f2 as Db,m2 as Eb,h2 as Fb,PD as Gb,_T as Hb,TT as Ib,kD as Jb,Me as Kb,Oo as Lb,Ru as Mb,AI as Nb,RI as Ob,Ou as Pb,ui as Qb,zH as Rb,WH as Sb,Ff as Tb,jH as Ub,VH as Vb,nx as Wb,YH as Xb,Hf as Yb,XH as Zb,qH as _b,Bf as $b,Mf as ac,ZH as bc,zn as cc,pi as dc,JH as ec,QH as fc,eM as gc,tM as hc,Bo as ic,Hy as jc,cd as kc,ud as lc,kn as mc,Gy as nc,Ho as oc,md as pc,rN as qc,iN as rc,or as sc,lN as tc,hd as uc,Yy as vc,Xy as wc,qy as xc,mN as yc,hN as zc,ar as Ac,yN as Bc,PN as Cc,kN as Dc,AN as Ec,RN as Fc,IN as Gc,Jy as Hc,Qy as Ic,NN as Jc,Jt as Kc,eS as Lc,Td as Mc,tS as Nc,LN as Oc,nS as Pc,DN as Qc,FN as Rc,ld as Sc,Fo as Tc,$o as Uc,xd as Vc,vd as Wc,dr as Xc,rS as Yc,zo as Zc,Et as _c,ZN as $c,pS as ad,fS as bd,mS as cd,JN as dd,QN as ed,wS as fd,St as gd,e1 as hd,t1 as id,BS as jd,n1 as kd,o1 as ld,hr as md,a1 as nd,gr as od,WS as pd,s1 as qd,r1 as rd,br as sd,i1 as td,l1 as ud,c1 as vd,XS as wd,u1 as xd,QS as yd,e_ as zd,d1 as Ad,p1 as Bd,f1 as Cd,n_ as Dd,m1 as Ed,h1 as Fd,s_ as Gd,g1 as Hd,b1 as Id,mn as Jd,el as Kd,tl as Ld,Wf as Md,rM as Nd,Kf as Od,iM as Pd,lM as Qd,cM as Rd,ri as Sd,qB as Td,yG as Ud,Gv as Vd,SG as Wd,Pi as Xd,ki as Yd,_G as Zd,TG as _d,EG as $d,Ca as ae,xG as be,Po as ce,Zt as de,vn as ee,Us as fe,wn as ge,LI as he,DI as ie,FI as je,Fu as ke,Bu as le,Hu as me,BI as ne,xe as oe,Ge as pe,Ar as qe,$L as re,Zo as se,zL as te,WL as ue,Jo as ve,KL as we,jL as xe,VL as ye,S3 as ze,_3 as Ae,lo as Be,ID as Ce,ND as De,LD as Ee,DD as Fe,Op as Ge,FD as He,BD as Ie,gh as Je,r$ as Ke,sl as Le,rl as Me,i$ as Ne,l$ as Oe,JM as Pe,ib as Qe,X3 as Re,q3 as Se,lR as Te,Z3 as Ue,J3 as Ve,Q3 as We,eV as Xe,cR as Ye,tV as Ze,nV as _e,oV as $e,aV as af,fR as bf,sV as cf,at as df,FF as ef,YT as ff,Xr as gf,Mn as hf,BF as if,UF as jf,qT as kf,Qp as lf,GF as mf,QT as nf,tE as of,Zr as pf,zF as qf,WF as rf,oE as sf,XF as tf,qF as uf,Un as vf,ZF as wf,nf as xf,Rr as yf,cB as zf,uB as Af,of as Bf,dB as Cf,G_ as Df,se as Ef,EL as Ff,$_ as Gf,z_ as Hf,CL as If,W_ as Jf,K_ as Kf,OL as Lf,PL as Mf,kL as Nf,AL as Of,RL as Pf,IL as Qf,NL as Rf,LL as Sf,DL as Tf,FL as Uf,BL as Vf,xm as Wf,dC as Xf,Da as Yf,U2 as Zf,EF as _f,_h as $f,Jn as ag,Fe as bg,ie as cg,Qn as dg,bn as eg,N$ as fg,L$ as gg,F$ as hg,B$ as ig,H$ as jg,M$ as kg,U$ as lg,$$ as mg,z$ as ng,eo as og,W$ as pg,GC as qg,$C as rg,Eh as sg,ul as tg,fp as ug,$D as vg,zD as wg,OT as xg,PT as yg,ZD as zg,AT as Ag,Lp as Bg,JD as Cg,QD as Dg,eF as Eg,nF as Fg,Fp as Gg,oF as Hg,aF as Ig,uF as Jg,dF as Kg,Mp as Lg,pF as Mg,bB as Ng,lf as Og,vB as Pg,Tf as Qg,Ef as Rg,$n as Sg,Of as Tg,nH as Ug,oH as Vg,fa as Wg,li as Xg,JE as Yg,AH as Zg,Gf as _g,pM as $g,Ta as ah,Zf as bh,Yb as ch,be as dh,On as eh,GM as fh,Si as gh,_i as hh,WM as ih,om as jh,KM as kh,jM as lh,VM as mh,lm as nh,um as oh,g0 as ph,b0 as qh,Xu as rh,y0 as sh,qu as th,_0 as uh,No as vh,Ny as wh,$0 as xh,ad as yh,NU as zh,pm as Ah,gm as Bh,bm as Ch,ym as Dh,Sm as Eh,_m as Fh,Tm as Gh,wi as Hh,Ov as Ih,Pv as Jh,jn as Kh,Ci as Lh,vm as Mh,tG as Nh,Av as Oh,nG as Ph,oG as Qh,aG as Rh,Cm as Sh,lG as Th,Nv as Uh,cG as Vh,uG as Wh,Dv as Xh,Bv as Yh,Hv as Zh,Mv as _h,mG as $h,Uv as ai,hG as bi,Ai as ci,RG as di,Am as ei,Kv as fi,NG as gi,BG as hi,Ri as ii,sw as ji,e2 as ki,Xw as li,v2 as mi,Zw as ni,w2 as oi,C2 as pi,O2 as qi,hn as ri,Ua as si,t$ as ti,n$ as ui,o$ as vi,zC as wi,WC as xi,V$ as yi,YC as zi,XC as Ai,Y$ as Bi,X$ as Ci,q$ as Di,Z$ as Ei,J$ as Fi,sz as Gi,rz as Hi,iz as Ii,lz as Ji,cz as Ki,uz as Li,dz as Mi,pz as Ni,fz as Oi,mz as Pi,hz as Qi,vh as Ri,gz as Si,bz 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,Cl as cj,d4 as dj,p4 as ej,g4 as fj,b4 as gj,fP as hj,y4 as ij,es as jj,Ol as kj,yn as lj,tg as mj,S4 as nj,_4 as oj,T4 as pj,E4 as qj,bP 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,ts 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,zP as Kj,L4 as Lj,D4 as Mj,F4 as Nj,B4 as Oj,H4 as Pj,M4 as Qj,Z as Rj,YP as Sj,U4 as Tj,G4 as Uj,Ya as Vj,$4 as Wj,z4 as Xj,W4 as Yj,K4 as Zj,j4 as _j,V4 as $j,lt as ak,Y4 as bk,fk as ck,X4 as dk,q4 as ek,Z4 as fk,J4 as gk,Q4 as hk,pg as ik,eK as jk,tK as kk,nK as lk,fg as mk,aK as nk,sK as ok,vk as pk,rK as qk,iK as rk,lK as sk,cK as tk,uK as uk,Nl as vk,mg as wk,dK as xk,pK as yk,fK as zk,mK as Ak,LM as Bk,DM as Ck,W3 as Dk,K3 as Ek,ql as Fk,SA as Gk,Ig as Hk,Ng as Ik,Gl as Jk,A1 as Kk,on as Lk,R1 as Mk,I1 as Nk,N1 as Ok,L1 as Pk,f_ as Qk,D1 as Rk,F1 as Sk,Vd as Tk,zg as Uk,Zg as Vk,MA as Wk,c3 as Xk,$A as Yk,Qg as Zk,m3 as _k,h3 as $k,g3 as al,jA as bl,b3 as cl,ms as dl,w3 as el,aR as fl,wV as gl,fb as hl,CV as il,OV as jl,PV as kl,kV as ll,AV as ml,qd as nl,Zd as ol,Jd as pl,hY as ql,bb as rl,bs as sl,jR as tl,gY as ul,bY as vl};
|
|
5
|
+
Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""}],vT=/^https?:\/\//i;function DD(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 FD="other",BD={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 $D(e){let t=e&&typeof e=="object"?e[tt]:void 0;return Array.isArray(t)?t.map(wT).filter(n=>n!==null):[]}function zD(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 ZD(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 JD(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 QD(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 eF(e,t){return n=>e(n)||n!==void 0&&Ap.includes(n)&&t()}var Dp=null;function nF(e){Dp=e}function Fp(){return Dp}var Bp=null;function oF(e){Bp=e}function aF(){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 uF(e,t){Hp(e,t,"load")}function dF(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 pF(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 Nz}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 bF(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 EF(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 FF(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 BF(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 UF(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 GF(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 zF(e){return e.kind===ei}function WF(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 XF(e){oE(e,null)}function qF(){return ra}function Un(){return Qr({kind:tf})||ra===sa}function ZF(e){return Qp(ra??"",e)??"alloy-wheel"}function nf(e){return Un()?Mn(e):null}function cB(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 uB(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 dB(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 bB(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 vB(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 kB(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 NB(e,t){return ln(e,Sf,ua)??(bE(t)===4?2:Sf)}function LB(e){return e==null||e===""?null:ln(e,1,ca)}var DB="data-sf-span",da=4;function yE(e){return e==null||e===""?null:ln(e,1,da)}var FB="data-sf-row-span",ri="gridTileAt",ii=48;function BB(e){return e==null||e===""?null:ln(e,1,ii)}var HB="--sf-tile-at";function MB(e){return e==null||e===""?null:ln(e,1,ua)}function UB(e){return yE(e)}var GB="data-sf-span-phone",$B="data-sf-row-span-phone",zB=["gridSpan","gridRowSpan",ri,yf("gridSpan"),yf("gridRowSpan")];function WB(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 KB(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 qB=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 nH(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 oH(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 jz,StickyIcon as Vh,SearchIcon as vO,SquareIcon as wO,TypeIcon as CO,WidthIcon as OO}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 vH=Object.keys(Nf);var wH=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 AH(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 zH="sf-card",WH="[--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%",jH={desktop:20,phone:20,side:40,sidePhone:24},VH="sf-box-sides";function nx(e){return typeof e=="string"&&e.trim()!==""}function YH(e){return nx(typeof e?.bgImage=="string"?e.bgImage:null)||Hf(e)}function Hf(e){return To(e,bo)!==""}function XH(e,t){return t||!Hf(e)?e:{...e,[bo]:""}}function qH(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 ZH(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 JH(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 QH(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 eM(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 tM(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 ne,SettingsDrill as PO,SettingsField as K,SettingsGroup as kO,SettingsSegmented as AO,SettingsBorder as RO,SettingsSidesEach as IO,SettingsSwitch as vl,borderSides as NO,borderStartEach as LO}from"efficient-easel/panel";import{ListField as DO}from"efficient-easel/fields";import{CodeIcon as FO}from"efficient-shell/icons/efficient";import{DisplayChips as BO}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 rM=[rx,$f("tablet"),$f("mobile")];function Kf(e){return{desktop:gi(e,"desktop"),tablet:gi(e,"tablet"),mobile:gi(e,"mobile")}}function iM(e){return ix(e)}function lM(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 cM(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 pM(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 HO,CornersInput as MO,DatePicker as sW,DateTimePicker as UO,FOCAL_DEFAULT as rW,IconPicker as Yh,COLUMN_COUNT_MAX as Oh,COLUMN_SHARE_MIN as GO,COLUMN_SHARES_EQUAL as $O,resolveColumnShares as Xh,WidthsBar as zO,useShellStrings as WO,IconButton as qh,InputNumber as Ph,Slider as KO,Textarea as jO,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 VO,NoControlMark as YO,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 LM(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 DM(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 GM({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 WM(e){return Hx(Ei,Ti,e)}var om="sf-card-index",Wn="sf-card-index",KM="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 jM(e,t){return t==="off"?"":`.${e}{counter-reset:${Wn}}.${e} .${om}{counter-increment:${Wn}}.${e} .${om}::before{content:${Mx[t]}}`}function VM(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 XO}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 JM(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=se(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 NU({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",tG="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 nG(e,t){return t===0?e.subtitleEmpty:t===1?e.subtitleOne:e.subtitleMany.replace("{count}",String(t))}function oG(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 aG(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",lG="consent-banner";var Nv=[{value:"bar",label:"Bar"},{value:"card",label:"Card"}],cG="Layout",wm={layout:"bar"},Lv=e=>Nv.some(t=>t.value===e);function uG(e){let t=J((e??{}).layout,wm.layout);return{layout:Lv(t)?t:wm.layout}}var dG={...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"],mG={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"},hG={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 yG={heading:"Join our email list",placeholder:"Email address",buttonLabel:"Subscribe"},Gv={lead:"We accept"},SG={...Gv,methods:[],size:"sm",align:"start",dataSource:ic},Ai="site-footer";var Ri=Ai,_G={desktop:!0,tablet:!0,mobile:!0},TG={desktop:!1,tablet:!1,mobile:!1},ki=1,Pm=6,EG=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 xG(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",RG="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 NG(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 BG(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 e2({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 u2(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"},d2=[...["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 p2(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 f2(e,t){return{className:Gw[t]??"",...e?{pad:{values:e,frame:t}}:{}}}var m2=e=>({desktop:e.top,tablet:e.top,mobile:e.topPhone});function h2(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},v2={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 w2(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 C2(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 O2(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 qO}from"efficient-easel/draw/client";import{encodePartId as ZO}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as JO,useEaselStrings as QO}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 N2="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 L2=["stickTop","stickTopDistance","stickTopTablet","stickTopDistanceTablet","stickTopPhone","stickTopDistancePhone",...Jm,...sC,Yi,qi],D2=new Set(["IntroBleed"]),F2=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 B2(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 U2(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"],K2="sf-section-border",j2="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"},V2=Wt(qn);function Y2(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 X2(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 t$(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 n$(e){return typeof e=="string"&&e!==Zn?Ua(e):hn}function o$(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 r$(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"],i$=[il,ll].flatMap(e=>Wt(e,TC));function l$(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 f$(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 m$(e){return he(CC,e)}var te={background:"sectionBackgroundWidth",content:"sectionContentWidth",contentMax:"sectionContentMax",contentMaxUnit:"sectionContentMaxUnit"},h$={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 g$(e){let t=OC(e);return t.content===null&&e.fullWidth===!0?{...t,content:"full"}:t}function b$(e){return e.background!==null||e.content!==null}var y$=e=>({[te.background]:e}),S$=e=>e==="full"?{[te.content]:e,[te.contentMax]:void 0,[te.contentMaxUnit]:void 0}:{[te.content]:e},_$=e=>({[te.content]:"content",[te.contentMax]:e}),T$=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 E$(e,t){return{[Sh]:{background:gn(e),content:gn(t)}}}function x$(e){let t=e.editor?.metadata?.[Sh];return{background:gn(t?.background),content:gn(t?.content)}}import{useEaselSession as eP}from"efficient-easel/screen/lib/session-context";import{BOX_GAP as tP,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 nP,useLengthUnit as oP}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,ie=q.select,Qn=q.Segmented,bn=q.segmented,N$=q.alignmentField,L$=q.alignmentFields,D$=q.blockAlignmentField,F$=q.blockAlignmentFields,B$=q.boxJustifyField,H$=q.boxAlignField,M$=q.boxWrapField,Th=q.directionField,za=q.gapField,U$=q.placementField,G$=q.PlacementGridView,$$=q.positionFields,z$=q.sidesPaddingFields,eo=q.lengthUnitFields;function W$(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}},V$=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 Y$(e){return xh(qC,XC,e)}function X$(e){return xh(WC,zC,e)}function q$(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 Z$={kind:"border",unitKey:"thicknessUnit"},J$={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 sz={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 rz(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}),iz={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})]})},lz={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})]})},cz={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})]})},uz={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})]})},dz={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})]})},pz={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})]})},fz={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})]})},mz={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})]})},hz={"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},gz={width:"8.5rem",height:"3.75rem",words:!0},bz={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 aP(){let{blockGap:e}=B();return e===null?c("this container's own spacing"):Bt(`${e}px`,c("Styles"))}function sP({inherited:e,onReset:t,label:n}){return g(ne,{words:P()?.panel,label:c(n),changed:!e,detail:aP(),onReset:t})}function rP(e){return za({...tP,builtIn:Zt[e],resolve:(t,n)=>vn(e,t,n?.siteGap),action:(t,n)=>g(sP,{inherited:!ko(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[Po]:e}})}function iP(e){return le(ee("mobile",{[Po]:e,type:"custom",render:t=>g(uP,{container:e,...t})}),Qh)}function lP(e){return le(ee("tablet",{[Po]:e,type:"custom",render:t=>g(cP,{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",rP(e)),[Cl("gap")]:lP(e),[rt("gap")]:iP(e)}}function cP({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(ne,{words:P()?.panel,label:c("Gap"),changed:Ze(s),detail:Ft(i=>c(i),`${a}px`),onReset:()=>r(void 0)})}).render(t)}function uP({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(ne,{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 dP({inherited:e,onReset:t,label:n}){return g(ne,{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?gP(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(CO,{}),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{[VO]:n,...o}=e;return{...o,[nr]:!0,render:t}}var pP=new Set(XO),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(!pP.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.",fP={field:"source.slug",set:!0},y4={not:fP},mP="Select a word, then press the highlighter.",hP=new Set([mP]),gP=e=>hP.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(bP,{text:e,values:t})}}function bP({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 yP(e){let t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function C4(e,t){return yP(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(kO,{title:e,open:n,onToggle:a=>{o(a),a?gl.delete(e):gl.add(e)},children:t})}var gl=new Set;function SP({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(HO,{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(_P,{label:e,builtIn:t,followsBand:n,value:o,onChange:a})}}function _P({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=TP(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 TP(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 EP(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(ne,{words:P()?.panel,label:c(e),changed:!s,detail:c("the theme's image stage"),onReset:()=>o(Zn)}),children:SP({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??BP(n,a);return oP({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(KO,{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 xP(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(ne,{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",vP={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(wP,{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(YO,{})},"always")}function un(){let e=Lt();return t=>e?.onChangeMany(t)}function wP({tier:e,px:t,name:n,onRadius:o}){let a=e.useFollowed(),[s,r]=Oe(e.sidesKey),i=un(),l=ns({row:e.row??vP,label:oo,grid:{min:oe,max:Xe,step:e.step??1},valueKey:n??"",view:"desktop"}),u=Le(s)??[...oa];return g(MO,{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??oe,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 CP({label:e,changed:t=!1,onReset:n=()=>{}}){let{cornerRadiusPx:o}=B(),a=typeof o=="number"?`${o}px`:c("not set");return g(ne,{words:P()?.panel,label:c(e),changed:t,detail:o==null?c("the built-in corners"):Bt(a,c("Styles")),onReset:n})}function OP(){let{cornerRadiusPx:e}=B();return typeof e=="number"?e:oe}function PP(){return Al({sidesKey:"sectionCornerSides",row:Kr,useFollowed:OP,mark:g(CP,{label:oo}),hint:kP})}var kP="Follows Styles \u25B8 Basics \u25B8 Corners until you set a number here.";function R4(){return so({_gShape:_e("Shape"),sectionCorners:PP(),...og(Kr,"sectionCorners"),sectionCornerSides:ag(),...$e("sectionBorder",FP),...eo(qn,"sectionBorder",{tablet:!0,phone:!0})})}var AP=()=>({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 RP(e){let t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function IP(){let e;try{let t=Pe(B().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Mc.line}function NP({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?LO(l,r):!1),f=AP(),p=m=>RP(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(IO,{each:u,label:c("Each side"),onChange:d}):void 0,children:g(RO,{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 LP({value:e,onChange:t,view:n}){let[o]=Oe("sectionBorder"),[a]=Oe(Cl("sectionBorder")),s=IP(),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]:DP(m,p)}:{}}});return g(NP,{value:e,length:f,onChange:f?p=>u({[d]:p,...f.unitPatch(!bl(p))}):t,placeholder:{sides:NO(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 DP(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 FP(e){return{type:"custom",render:({value:t,onChange:n})=>g(LP,{value:t,onChange:n,view:e})}}function BP(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(HP,{partKey:e})}}function HP({partKey:e}){let[t]=Oe("id"),[n]=Oe("_partStyles"),{textStyles:o}=B(),a=QO(),s=null;try{s=qO().select}catch{s=null}let r=n&&typeof n=="object"?n[e]:void 0,i=Array.isArray(o)?o:null;return g(PO,{name:c("Text"),preview:qm(r,i,{noStyle:c("No style"),styleName:a.textStyles.styleName,cases:(a.copy.panel??JO.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(ZO(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 MP({label:e,changed:t=!1,onReset:n=()=>{}}){let o=rg(oe);return g(ne,{words:P()?.panel,label:c(e),changed:t,detail:Bt(`${o}px`,c("the section")),onReset:n})}function UP(){return g(je,{children:c("Follows the section's Corners until you set a number here.")})}function GP(){return Al({sidesKey:"cardCornerSides",row:Hn,useFollowed:()=>rg(oe),mark:g(MP,{label:oo}),hint:g(UP,{})})}function $P(){return{type:"custom",render:()=>g(Xp,{})}}function N4(){return{_gShape:_e("Shape"),cardCorners:GP(),...og(Hn,"cardCorners"),cardCornerSides:ag(),cardCornersApplyAll:$P()}}function zP(){return it({type:"custom",[ul]:!0,render:e=>g(KP,{...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 WP(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 KP(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=()=>[...$O[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=WO().widths.hint(a,GO);return g(K,{label:c(pt),icon:g(Za,{}),changed:y,hint:l!=="custom"?void 0:u?T:b,action:g(ne,{words:P()?.panel,label:c(pt),changed:y,disabled:e.readOnly===!0,detail:s?Ft(S=>c(S),WP(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(zO,{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 ie(Oc,g(_O,{}),Cs,Cs[0].value)}function D4(){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 F4(){return Tl("share",zP(),Jh)[Cl("share")]}function jP(){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 B4(){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:jP()});return{...t,phoneRow:n.phoneRow}}function H4(e,t,n,o,a,s,r){return{type:"custom",render:({value:i,onChange:l,name:u})=>g(VP,{label:e,min:t,max:n,step:o,fallback:a,role:s,value:i,onChange:l,name:u??"",length:r})}}function VP({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(ne,{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 M4(){return{_gCellWidth:_e("Cell size"),gridSpan:ee("desktop",ie("Positions",g(Za,{}),Ya(ca,"position","positions"),"")),gridRowSpan:ee("desktop",ie("Rows tall",g(Ja,{}),Ya(da,"row","rows"),"")),[ri]:Fe("At card",g(zh,{}),1,ii,1,1,""),[rt("gridSpan")]:ee("mobile",ie("Positions",g(Za,{}),[{label:"Full row",value:""},...Ya(ua,"position","positions").slice(1)],"")),[rt("gridRowSpan")]:ee("mobile",ie("Rows tall",g(Ja,{}),Ya(da,"row","rows"),""))}}function Z(){let e=null,t=null;try{e=Fh(YP),t=es(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}var YP=tO(null);function XP({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 qP({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(ne,{words:P()?.panel,label:c(e),changed:a,detail:Ft(l=>c(l),`${i}${o}`),onReset:s})}function ZP(e){return xP(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:g(qP,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>g(XP,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}var JP={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},QP={Top:xl,Bottom:Wh,Left:Kh,Right:jh},ek=e=>{let t=QP[e];return g(t,{})};function U4(e={}){let t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,a=T=>JP[T],s=T=>Fe(a("Top"),g(xl,{}),fe.min,fe.max,fe.step,T,"px"),r=(T,S,E,x=fe)=>ee("mobile",ZP({label:a(T),icon:ek(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 G4(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 $4(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(OO,{}),action:n?g(dP,{inherited:s?.inherited??!1,onReset:()=>a(cl),label:Xa}):void 0,children:Qn({options:o,value:s?.currentValue||e,onChange:a,ariaLabel:Xa})})}})}function z4({fill:e=!1}={}){let t=(a,s)=>({type:"custom",render:({value:r,onChange:i})=>g(tk,{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(sk,{view:a,onClear:()=>s(void 0)}))),...$e("sectionHeightValue",n),...$e("sectionHeightUnit",o)})}function tk({value:e,onChange:t,view:n,badge:o,fill:a=!1}){let s=Z(),{mode:r,number:i,unit:l}=nk(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(ak,{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 nk(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 ok(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=ok(e,r,t,s);return i===null?{[U(t,e)]:s}:Object.keys(i).length?i:null})}}function ak({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 sk({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(ne,{words:P()?.panel,label:c(Xt),changed:o,detail:r,onReset:t})}function W4(e={}){let t=e.intro===!0,n=s=>({type:"custom",render:({value:r,onChange:i,id:l,name:u})=>g(pk,{value:r,onChange:i,labelId:`${l??u??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:r,onChange:i})=>g(ck,{value:r,onChange:i,view:s,intro:t})}),a=s=>({type:"custom",render:({value:r,onChange:i})=>g(uk,{value:r,onChange:i,view:s,intro:t})});return{_gStick:_e(Qm,{dot:t?lk:Zi}),...$e("stickTop",n),...$e("stickTopDistance",o),...eo(Yn,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?$e(Xn,a):{},...t?{}:{[Yi]:rk()},...t||e.above===!1?{}:{[qi]:ik()}}}function rk(){let e=ie(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 ik(){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 lk={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=dk(e,u,l,t,o),f=d===null?{[U(t,e)]:l}:d;return Object.keys(f).length?{...f,...a?.(l)??{}}:null}):n}}function ck({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 uk({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 dk(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 pk({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(ne,{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 K4(){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 j4(){return{_gAdvanced:_e("Advanced"),[au]:Il}}var Il={type:"custom",render:({value:e,onChange:t})=>g(K,{label:c("Custom CSS"),icon:Dt(g(FO,{})),children:g(jO,{"aria-label":c("Custom CSS"),spellCheck:!1,autoGrow:!0,className:"font-mono",value:typeof e=="string"?e:"",onChange:n=>t(n.target.value)})})};function V4(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(UO,{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(ne,{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(fk,{label:"Background",icon:g(xO,{}),id:a,value:e,shown:di(e),onChange:t})}}}function Y4(e,t,n){return{type:"custom",render:({value:o,onChange:a})=>g(be,{label:c(e),icon:n,value:o||t,onChange:a})}}function fk({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 X4(){return{type:"custom",render:e=>{let{value:t,onChange:n}=e,o=e;return g(mk,{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 mk({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(hk,{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 hk({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 gk(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?gk(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 q4(){return ng()}var Z4={top:g(yO,{}),right:g(bO,{}),bottom:g(hO,{}),left:g(gO,{})};function J4(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:nP(c,{label:e,value:m,onChange:p,points:d})})}}}function Q4(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 bk={image:"Image",video:"Video"},eK=Or.map(e=>({label:bk[e],value:e}));function tK(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(Sk,{label:e,icon:t,options:o,onChange:a})}}function yk(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 Sk({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:yk(s,d,i?.hasUnsavedEdits??!1),children:Qn({options:n,value:r,onChange:o,ariaLabel:e})})}function nK(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 oK={HeroSingle:[lp.image],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function _k(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(eP()).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(vO,{})})}):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:_k(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 Tk(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Ek(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 xk(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 aK={label:"Ticker items",icon:g(EO,{})};function sK(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(vk,{label:e,icon:Dt(t),items:Array.isArray(a)?a:[],placeholder:n,onChange:s,markup:o==="markup"})}}function vk({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=xk(n,f,i);p===null&&(r.current=null),l(p),a(u(f))};return g(DO,{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:Tk(n,i),onChange:f=>a(Ek(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 rK(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 iK(e){return{_gCards:_e("Cards"),coverIndex:ie("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:EP("Image background",Ga),cardImage:mg()}}function lK(){return{outline:ie("Card outline",g(wO,{}),sm,am),indexBadge:ie("Card number",g(zh,{}),Ei,Ti),showBadge:lt("Product badge",!0,g(ui,{noun:"tag"}))}}function cK(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(wk,{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 wk({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 uK(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(Ck,{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(ne,{words:P()?.panel,label:i,changed:t,detail:s,onReset:a}),children:g(BO,{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 Ck({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,{}),oe,Xe,sf,oe,e,{clear:{hint:oe},hint:"Rounds the picture. The card's own corner is in Styles."})}function Ok(){return eo(ti,"cardImage")}function dK(){return{cardImage:mg(ti),...Ok()}}function pK(){return Al({sidesKey:"cornerSides",row:lf,step:cf,useFollowed:()=>oe,mark:g(Pk,{label:uf}),hint:c("Rounds the picture. Left alone it stays square.")})}function Pk({label:e,changed:t=!1,onReset:n=()=>{}}){return g(ne,{words:P()?.panel,label:c(e),changed:t,onReset:n})}function fK(){return{type:"custom",render:({value:e,onChange:t})=>g(Ik,{value:typeof e=="string"?e:"",onChange:t})}}var Dh="own";function mK(){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 kk({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 Ak={width:"3.5rem",height:"2.5rem",words:!1},Rk=200;function Ik({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>=Rk?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(kk,{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:Ak,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(AO,{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 Fk="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(Lk,{label:c(Fl),icon:as(Dk,{}),changed:!o,action:as(Nk,{words:P()?.panel,label:c(Fl),changed:!o,detail:c("the built-in corners"),onReset:()=>t(null)}),hint:c(Fk),children:as(de,{min:n?.grid.min??oe,max:n?.grid.max??Xe,step:n?.grid.step??1,value:e,...e===null?{}:{suffix:n?.unit??"px",...n?{units:n.units}:{}},placeholder:oe,placeholderWord:"Auto",onClear:()=>t(null),ariaLabel:c(Fl),onChange:t})})}import{jsx as ro}from"react/jsx-runtime";import{SettingsDefaultReset as Bk,SettingsField as Hk}from"efficient-easel/panel";import{IconPicker as Mk}from"efficient-shell/ui";import{ShadowIcon as Uk}from"efficient-easel/icons";import{SHADOW_PREVIEW as Gk}from"efficient-easel/screen/lib/document/shadow-values";var Bl={none:"None",soft:"Soft",lifted:"Lifted"},$k="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(Hk,{label:c("Card shadow"),icon:ro(Uk,{}),value:c(Bl[o]),changed:!n,action:ro(Bk,{words:P()?.panel,label:c("Card shadow"),changed:!n,detail:c(Bl[Fs]),onReset:()=>t(null)}),hint:c($k),children:ro(Mk,{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:Gk[a]}})})),onChange:t})})}import{jsx as bg}from"react/jsx-runtime";import{ShadowIcon as zk}from"efficient-easel/icons";import{DEFAULT_SHADOW_COLOR as yg}from"efficient-easel/screen/lib/document/shadow-values";var Wk="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(zk,{}),value:e??"",inherited:yg,resetTo:yg,onChange:t,onReset:()=>t(null),hint:c(Wk)})}import{jsx as rs}from"react/jsx-runtime";import{SettingsDefaultReset as Kk,SettingsField as jk}from"efficient-easel/panel";import{AlignSeparateIcon as Vk}from"efficient-easel/icons";function ss(e,t){return e==="tablet"?null:e==="mobile"?t.phone:t.desktop}var Yk="The space between the blocks inside a row, a grid or a box. Auto means each one keeps the spacing it already has.",Xk="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(jk,{label:c(Hl),labelId:"sf-block-gap",icon:rs(Vk,{}),changed:!s,action:rs(Kk,{words:P()?.panel,label:c(Hl),changed:!s,detail:r??c("each block's own spacing"),onReset:()=>t(null)}),hint:c(r===null?Yk:Xk),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 qk,SettingsField as Zk,SettingsSegmented as Jk}from"efficient-easel/panel";import{HoverIcon as Qk}from"efficient-easel/icons";var Ml={none:Ts.none,lift:Ts.lift,highlight:_c},eA="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(Zk,{label:c("Hover effect"),icon:is(Qk,{}),value:c(Ml[o]),changed:!n,action:is(qk,{words:P()?.panel,label:c("Hover effect"),changed:!n,detail:c(Ml[Bs]),onReset:()=>t(null)}),hint:c(eA),children:is(Jk,{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 tA,SettingsField as nA,SettingsSegmented as oA}from"efficient-easel/panel";import{DropIcon as aA}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}],sA="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(nA,{label:c(Ul),icon:ls(aA,{}),value:c(Gl.find(a=>a.grayscale===o).label),changed:!n,action:ls(tA,{words:P()?.panel,label:c(Ul),changed:!n,detail:c(Gl.find(a=>!a.grayscale).label),onReset:()=>t(null)}),hint:c(sA),children:ls(oA,{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 rA}from"react";import{SettingsField as iA,SettingsSwitch as lA}from"efficient-easel/panel";import{ShareIcon as cA}from"efficient-easel/icons";var uA="Share button",dA="On every blog post.";function Cg({value:e,onChange:t}){let n=rA();return $l(iA,{label:c(uA),labelId:n,icon:$l(cA,{}),action:$l(lA,{checked:e===!0,onChange:t,ariaLabelledBy:n}),hint:c(dA)})}import{usePreviewDevice as rc}from"efficient-easel/draw/client";import{jsx as cs}from"react/jsx-runtime";import{SettingsDefaultReset as pA,SettingsField as fA}from"efficient-easel/panel";import{PaddingXIcon as mA}from"efficient-easel/icons";var zl="Side space",Og=re.default,hA="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:re},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=re,length:a,restsOn:s=n}){let r=e===null;return cs(fA,{label:c(zl),labelId:"sf-side-space",icon:cs(mA,{}),changed:!r,action:cs(pA,{words:P()?.panel,label:c(zl),changed:!r,detail:`${n}px`,onReset:()=>t(null)}),hint:c(hA),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 _j,SettingsBackgroundWidth as gA,SettingsContentWidth as bA}from"efficient-easel/panel";var yA="Background width",SA="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(gA,{value:e,changed:t,detail:n,onChange:o,onReset:a,hint:s?c(s):void 0,labelId:r,words:{label:c(yA),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(SA),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(bA,{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 _A,TextStylesGroup as TA}from"efficient-easel/text-styles";var Dg=["font","size","weight","emphasis"],EA=500;function xA({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 vA(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=xA(e);return Lg(TA,{label:c("Emphasis"),children:Lg(_A,{style:r,fonts:Cr,settings:s?Dg.filter(i=>i!=="size"):Dg,auto:["size"],fallback:()=>({weight:t??EA}),open:n,onOpenChange:o,onChange:i=>vA(r,i).forEach(a)})})}import{viewKeyAt as Gg}from"efficient-easel/draw";import{shownUnitAt as AA,unitKeyOnWrite as RA}from"efficient-easel/screen/lib/content/length-units";import{convertRowLength as wA,rowUnits as CA,unitPickPatch as OA}from"efficient-easel/screen/lib/content/length-units";import{viewKeyAt as PA}from"efficient-easel/draw";var kA=["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:re,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:wA(t,i,l,r,{kind:a},d)}function Hg(e,t,n,o){let{number:a,unit:s}=ps(e),r=OA({[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 CA({kind:ds[e].kind},Jn)}function Kl(e,t){let n=PA(e,t);if(!kA.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=AA({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=RA(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 RR,SliderGroup as IR,Tabs as NR,Tooltip as eY,tabButtonId as LR,tabPanelId as DR}from"efficient-shell/ui";import{ContrastIcon as FR,SettingsIcon as BR,TypeIcon as HR}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 mR,PaddingTopIcon as hR,PaddingXIcon as gR}from"efficient-easel/icons";import{jsx as ms}from"react/jsx-runtime";import{SettingsDefaultReset as IA,SettingsField as NA,SettingsSegmented as LA}from"efficient-easel/panel";import{WidthIcon as DA}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(NA,{label:u,labelId:a,icon:ms(DA,{}),value:i?s:void 0,changed:!i,action:ms(IA,{words:P()?.panel,label:u,changed:!i,onReset:()=>n(void 0)}),hint:r,children:ms(LA,{options:[{label:c(Nt.full),id:"full"},{label:c(Nt.page),id:"content"}],value:l,ariaLabel:u,onChange:n})})}import{group as bR}from"efficient-easel/screen/lib/document/box-fields";import{jsx as ct}from"react/jsx-runtime";import{ColumnsIcon as VA,HeadquartersIcon as YA,HeightIcon as XA,LayoutIcon as qA,LocationIcon as ZA,MapIcon as JA,SearchIcon as QA,ThemeIcon as eR}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 FA}from"efficient-easel/icons";import{NoControlMark as BA,noControlField as HA}from"efficient-easel/screen/lib/document/panel-no-control-mark";function Zg(e,t){return ie(e,Vl(FA,{}),[{label:t,value:""}],"")}var MA="_sourceEdit";function c3(){return HA({type:"custom",render:()=>Vl(BA,{})},"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 UA(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 GA(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,$A={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?GA(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===MA?m&&(b[y]=UA(m)):b[y]=p.has(y)&&T&&typeof T=="object"?le(T,$A):T;return u.set(d,b),b}import{createContext as zA,useContext as WA}from"react";var eb=zA(null),f3=eb.Provider,m3=()=>WA(eb);function h3(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 KA(e){return e===null||!Number.isFinite(e)?"":e<10?`${e.toFixed(1)} km`:`${Math.round(e)} km`}function g3(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?KA(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 jA=[{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:jA};function b3(e){return[e.name,e.city].filter(Boolean).join(", ")}var S3={text:"Button label",href:"#"},_3=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,w3={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},tR={field:zt,is:"list",default:ft},nR={field:zt,is:"map",default:ft},ab={all:[ql,{field:"listPosition",in:["left","right"],default:"below"}]},sb={any:[{all:[ob,{not:nR}]},ab]},oR={any:[{all:[ql,{field:"listPosition",is:"below",default:"below"}]},tR]},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 aR={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(YA,{})),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(JA,{}),[{label:"Map and list",value:ft},{label:"Map only",value:"map"},{label:"List only",value:"list"}],ft),mapTheme:bn("Map theme",ct(eR,{}),[{label:"Auto",value:"auto"},{label:"Dark",value:"dark"},{label:"Light",value:"light"}],_o.mapTheme),_gList:Xl("List"),listPosition:Sn("desktop",le(bn("Position",ct(qA,{}),[{label:"Left",value:"left"},{label:"Right",value:"right"},{label:"Below",value:"below"}],"below"),ql)),listColumns:Sn("desktop",le(bn("Columns",ct(VA,{}),[{label:"Auto",value:As},...Nc.map(e=>({label:String(e),value:String(e)}))],As),oR)),[Rc]:Sn("desktop",le(bn("Map height",ct(XA,{}),[{label:"Fixed",value:ks},{label:"Full height",value:Ic}],ks),ab)),search:Sn("desktop",le(lt("Search",!1,ct(QA,{})),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(ZA,{})),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=aR.fields.offices;var gs=null;function W3(e){gs=e}function K3(){return!!(gs&&gs.state().lockHolder)}function Jl(){return gs!==null}import{BUCKET_KEY as yR}from"efficient-easel/screen/lib/document/field-buckets";import{HEADER_TYPE as Ql,FOOTER_TYPE as sR}from"efficient-easel/draw";import{parseOption as rR}from"efficient-shell/format";var iR=new Set(["Hero","HeroSingle","IntroBleed"]),ib={min:56,max:140,default:88},X3={min:0,max:120,step:2,default:32},q3=`var(--sf-header-h, ${ib.default}px)`,lR="--sf-header-set-h",Z3="--sf-header-h",J3=`var(${lR}, ${ib.default}px)`,Q3="sf-header-clearance",eV="sf-sticky-underheader";function cR(e){return e?.find(t=>t?.type&&t.type!==Ql)??null}function lb(e){let t=cR(e)?.type;return!t||!iR.has(t)}function tV(e){return!lb(e)}function nV(e){return!!e?.some(t=>t?.type===Ql)}function oV(e){return!e||e.length===0?!1:!e.some(t=>t?.type===Ql||t?.type===sR)}var uR=["auto","shared","own"],ec="auto",dR="topSpace",aV="data-top-space";function pR(e){return rR(uR,ec,e)}function fR(e,t){let n=pR(e?.props?.[dR]);return n==="own"?!0:n==="shared"?!1:lb(t)}function sV(e,t){return fR(e,t)?"own":null}function SR(){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 _R=[{label:"Auto",value:"auto"},{label:"Shared",value:"shared"},{label:"Its own",value:"own"}],wV={pageBackground:dg(),topSpace:ie("Top space",bs(hR,{}),_R,ec),widthChoice:SR()},fb=["pageBackground","topSpace","widthChoice"],TR="Record type",tc=new Map,cb=-1;function ER(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=ie(TR,bs(mR,{}),[...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 CV(e,t){if(!Un()||qr().length<2||aa in e)return e;let n=ER(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 xR="On: the site's Side space is counted once at each edge of every page. Off: as before.",vR=lt("Count side space once",!1,bs(gR,{}),xR),nc={_gWebsite:bR("Website"),[wt]:vR,[tt]:rb,[Dn]:Il},db=new WeakMap;function OV(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 PV(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===wR&&!n&&(Object.assign(t,nc),n=!0),t[o]=a;n||Object.assign(t,nc),pb.set(e,t)}return t}var wR=yR.Animation,pb=new WeakMap;function kV(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 AV(e){return e?.props?.kind===Ri?mb(e):e}import{previewFrame as MR}from"efficient-easel/screen/lib/document/preview-dom";import{pictureShadowColor as UR}from"efficient-easel/screen/lib/document/shadow-values";var ac="sf-site-styles",GR="sf-site-styles-tabpanel",hY="text",bb="basics",hb="this-page-group",ys=[{id:bb,label:"Basics",icon:N(BR,{})},{id:"theme",label:"Theme",icon:N(FR,{})},{id:"text",label:"Text",icon:N(HR,{})}];function $R({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 zR({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=jR,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",WR={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},KR={heading:32,body:14};function jR(e){return e.values.size??YR(j(WR,e.id)??"body")??KR[e.kind]}var VR={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 YR(e){if(typeof document>"u")return null;let t=(MR()?.contentDocument??document).querySelector(VR[e]);if(!t)return null;let n=parseFloat(getComputedStyle(t).fontSize);return Number.isFinite(n)?n:null}function XR({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 qR({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 ZR({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 JR({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 QR({persist:e}){return Ut(_n,{children:[N(qR,{persist:e}),N(ZR,{persist:e}),N(JR,{persist:e})]})}function eI(e){return{card_shadow:e}}function tI(e){return e===null?{shadow_color:null}:{shadow_color:UR(e)}}function nI(e){return{hover_effect:e}}function oI({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(eI(i),!0)}}),N(Sg,{value:o,onChange:i=>{a(i),e(tI(i),i===null)}}),N(xg,{value:s,onChange:i=>{r(i),e(nI(i),!0)}})]})}function aI(e){return{photography_grayscale:e}}function sI({persist:e}){let{photographyGrayscale:t,setPhotographyGrayscale:n}=B();return N(wg,{value:t,onChange:o=>{n(o),e(aI(o),!0)}})}function rI({persist:e}){return N(_n,{children:N(sI,{persist:e})})}function iI(e){return{share_button_on_posts:e}}function lI({persist:e}){let{shareButtonOnPosts:t,setShareButtonOnPosts:n}=B();return N(Cg,{value:t,onChange:o=>{n(o),e(iI(o),!0)}})}function gY(){let{websiteName:e}=B();return e?.trim()||Tu}function bY({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(IR,{children:[N(dI,{activeId:y.id,onSelect:b}),Ut("div",{id:DR(ac,y.id),className:GR,role:"tabpanel","aria-labelledby":LR(ac,y.id),children:[m===bb&&Ut(_n,{children:[N(XR,{themeFromDocument:e,persist:u}),!e&&N(oI,{persist:u}),!e&&N(QR,{persist:u}),!e&&N(rI,{persist:u}),!e&&N(lI,{persist:u}),N(cI,{reveal:i,onRevealed:l})]}),m==="theme"&&N($R,{themeFromDocument:e,persist:u}),m==="text"&&N(zR,{themeFromDocument:e,persist:u})]})]})}function cI({reveal:e,onRevealed:t}){let[n,o]=sc(!0),a=AR(t);return a.current=t,kR(()=>{if(!e)return;o(!0);let s=requestAnimationFrame(()=>{document.getElementById(hb)?.scrollIntoView({block:"start"}),a.current?.()});return()=>cancelAnimationFrame(s)},[e]),N(PR,{title:c("This page"),open:n,onToggle:o,id:hb,children:N(uI,{})})}function uI(){let{fields:e,values:t,readOnly:n,onChange:o}=CR(),a=Object.fromEntries(fb.filter(s=>s in e).map(s=>[s,e[s]]));return Object.keys(a).length===0?N(RR,{variant:"none",icon:!1,message:c("This page has no look of its own to set.")}):N(OR,{fields:a,values:t,onChange:o,readOnly:n,tabs:!1,idPrefix:"this-page",ariaLabel:c("This page")})}function dI({activeId:e,onSelect:t}){return N("div",{className:"es-insp-tabs",children:N(NR,{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,f0 as b,mI as c,P as d,hI as e,gI as f,c as g,xn as h,V as i,eT as j,Br as k,eD as l,yp as m,oD as n,re as o,Ne as p,ve as q,et as r,sD as s,sT as t,rD as u,Hr as v,iD as w,lD as x,cD as y,iT as z,uD as A,dD as B,pD as C,fD as D,Tp as E,mD as F,Ep as G,hD as H,gD as I,vp as J,wp as K,Cp as L,gT as M,bT as N,_D as O,ED as P,xD as Q,vD as R,wD as S,yh as T,Nt as U,wC as V,f$ as W,CC as X,m$ as Y,te as Z,h$ as _,OC as $,g$ as aa,b$ as ba,y$ as ca,S$ as da,_$ as ea,T$ as fa,gn as ga,E$ as ha,x$ as ia,ni as ja,ai as ka,df as la,si as ma,hE as na,kB as oa,ca as pa,Sf as qa,ua as ra,gE as sa,bE as ta,NB as ua,LB as va,DB as wa,yE as xa,FB as ya,ri as za,BB as Aa,HB as Ba,MB as Ca,UB as Da,GB as Ea,$B as Fa,zB as Ga,WB as Ha,KB as Ia,SE as Ja,Or as Ka,lp as La,H_ as Ma,yL as Na,cp as Oa,M_ as Pa,SL as Qa,up as Ra,U_ as Sa,_L as Ta,N2 as Ua,Xn as Va,sC as Wa,Yi as Xa,pn as Ya,qi as Za,L2 as _a,D2 as $a,F2 as ab,Zi as bb,ih as cb,B2 as db,Le as eb,Kr as fb,bF as gb,Ct as hb,K2 as ib,j2 as jb,V2 as kb,Y2 as lb,X2 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,u2 as vb,Ra as wb,d2 as xb,Hw as yb,Mw as zb,p2 as Ab,Uw as Bb,Mm as Cb,f2 as Db,m2 as Eb,h2 as Fb,PD as Gb,_T as Hb,TT as Ib,kD as Jb,Me as Kb,Oo as Lb,Nu as Mb,AI as Nb,RI as Ob,ku as Pb,pi as Qb,zH as Rb,WH as Sb,Ff as Tb,jH as Ub,VH as Vb,nx as Wb,YH as Xb,Hf as Yb,XH as Zb,qH as _b,Bf as $b,Mf as ac,ZH as bc,zn as cc,mi as dc,JH as ec,QH as fc,eM as gc,tM 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,rN as qc,iN as rc,ar as sc,lN as tc,bd as uc,Yy as vc,Xy as wc,qy as xc,mN as yc,hN as zc,sr as Ac,yN as Bc,PN as Cc,kN as Dc,AN as Ec,RN as Fc,IN as Gc,Jy as Hc,Qy as Ic,NN as Jc,Jt as Kc,eS as Lc,xd as Mc,tS as Nc,LN as Oc,nS as Pc,DN as Qc,FN 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,ZN as $c,pS as ad,fS as bd,mS as cd,JN as dd,QN as ed,wS as fd,St as gd,e1 as hd,t1 as id,BS as jd,n1 as kd,o1 as ld,gr as md,a1 as nd,br as od,WS as pd,s1 as qd,r1 as rd,yr as sd,i1 as td,l1 as ud,c1 as vd,XS as wd,u1 as xd,QS as yd,e_ as zd,d1 as Ad,p1 as Bd,f1 as Cd,n_ as Dd,m1 as Ed,h1 as Fd,s_ as Gd,g1 as Hd,b1 as Id,mn as Jd,nl as Kd,ol as Ld,Wf as Md,rM as Nd,Kf as Od,iM as Pd,lM as Qd,cM as Rd,li as Sd,qB as Td,yG as Ud,Gv as Vd,SG as Wd,Ai as Xd,Ri as Yd,_G as Zd,TG as _d,EG as $d,Oa as ae,xG as be,Po as ce,Zt as de,vn as ee,Gs as fe,wn as ge,LI as he,DI as ie,FI as je,Hu as ke,Mu as le,Uu as me,BI as ne,xe as oe,Ge as pe,Rr as qe,$L as re,Zo as se,zL as te,WL as ue,Jo as ve,KL as we,jL as xe,VL as ye,S3 as ze,_3 as Ae,lo as Be,ID as Ce,ND as De,LD as Ee,DD as Fe,Op as Ge,FD as He,BD as Ie,gh as Je,r$ as Ke,il as Le,ll as Me,i$ as Ne,l$ as Oe,JM as Pe,ib as Qe,X3 as Re,q3 as Se,lR as Te,Z3 as Ue,J3 as Ve,Q3 as We,eV as Xe,cR as Ye,tV as Ze,nV as _e,oV as $e,aV as af,fR as bf,sV as cf,at as df,FF as ef,YT as ff,Zr as gf,Mn as hf,BF as if,UF as jf,qT as kf,Qp as lf,GF as mf,QT as nf,tE as of,Qr as pf,zF as qf,WF as rf,oE as sf,XF as tf,qF as uf,Un as vf,ZF as wf,nf as xf,Ir as yf,cB as zf,uB as Af,of as Bf,dB as Cf,G_ as Df,se as Ef,EL as Ff,$_ as Gf,z_ as Hf,CL as If,W_ as Jf,K_ as Kf,OL as Lf,PL as Mf,kL as Nf,AL as Of,RL as Pf,IL as Qf,NL as Rf,LL as Sf,DL as Tf,FL as Uf,BL as Vf,xm as Wf,dC as Xf,Fa as Yf,U2 as Zf,EF as _f,_h as $f,Jn as ag,Fe as bg,ie as cg,Qn as dg,bn as eg,N$ as fg,L$ as gg,F$ as hg,B$ as ig,H$ as jg,M$ as kg,U$ as lg,$$ as mg,z$ as ng,eo as og,W$ as pg,GC as qg,$C as rg,Eh as sg,pl as tg,hp as ug,$D as vg,zD as wg,OT as xg,PT as yg,ZD as zg,AT as Ag,Lp as Bg,JD as Cg,QD as Dg,eF as Eg,nF as Fg,Fp as Gg,oF as Hg,aF as Ig,uF as Jg,dF as Kg,Mp as Lg,pF as Mg,bB as Ng,lf as Og,vB as Pg,Tf as Qg,Ef as Rg,$n as Sg,Of as Tg,nH as Ug,oH as Vg,ma as Wg,ui as Xg,JE as Yg,AH as Zg,Gf as _g,pM as $g,Ea as ah,Zf as bh,Yb as ch,be as dh,On as eh,GM as fh,Ti as gh,Ei as hh,WM as ih,om as jh,KM as kh,jM as lh,VM as mh,lm as nh,um as oh,g0 as ph,b0 as qh,Zu as rh,y0 as sh,Ju as th,_0 as uh,No as vh,Ny as wh,$0 as xh,rd as yh,NU 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,tG as Nh,Av as Oh,nG as Ph,oG as Qh,aG as Rh,Cm as Sh,lG as Th,Nv as Uh,cG as Vh,uG as Wh,Dv as Xh,Bv as Yh,Hv as Zh,Mv as _h,mG as $h,Uv as ai,hG as bi,Ii as ci,RG as di,Am as ei,Kv as fi,NG as gi,BG as hi,Ni as ii,sw as ji,e2 as ki,Xw as li,v2 as mi,Zw as ni,w2 as oi,C2 as pi,O2 as qi,hn as ri,Ga as si,t$ as ti,n$ as ui,o$ as vi,zC as wi,WC as xi,V$ as yi,YC as zi,XC as Ai,Y$ as Bi,X$ as Ci,q$ as Di,Z$ as Ei,J$ as Fi,sz as Gi,rz as Hi,iz as Ii,lz as Ji,cz as Ki,uz as Li,dz as Mi,pz as Ni,fz as Oi,mz as Pi,hz as Qi,vh as Ri,gz as Si,bz 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,fP 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,bP 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,zP as Kj,L4 as Lj,D4 as Mj,F4 as Nj,B4 as Oj,H4 as Pj,M4 as Qj,Z as Rj,YP as Sj,U4 as Tj,G4 as Uj,Xa as Vj,$4 as Wj,z4 as Xj,W4 as Yj,K4 as Zj,j4 as _j,V4 as $j,lt as ak,Y4 as bk,fk as ck,X4 as dk,q4 as ek,Z4 as fk,J4 as gk,Q4 as hk,pg as ik,eK as jk,tK as kk,nK as lk,fg as mk,aK as nk,sK as ok,vk as pk,rK as qk,iK as rk,lK as sk,cK as tk,uK as uk,Dl as vk,mg as wk,dK as xk,pK as yk,fK as zk,mK as Ak,LM as Bk,DM as Ck,W3 as Dk,K3 as Ek,Jl as Fk,SA as Gk,Ig as Hk,Ng as Ik,zl as Jk,A1 as Kk,on as Lk,R1 as Mk,I1 as Nk,N1 as Ok,L1 as Pk,f_ as Qk,D1 as Rk,F1 as Sk,Xd as Tk,zg as Uk,Zg as Vk,MA as Wk,c3 as Xk,$A as Yk,Qg as Zk,m3 as _k,h3 as $k,g3 as al,jA as bl,b3 as cl,hs as dl,w3 as el,aR as fl,wV as gl,fb as hl,CV as il,OV as jl,PV as kl,kV as ll,AV as ml,Jd as nl,Qd as ol,ep as pl,hY as ql,bb as rl,ys as sl,jR as tl,gY as ul,bY as vl};
|